Belle II Software  release-08-01-10
RelationCreator.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #pragma once
9 
10 #include <tracking/trackFindingCDC/findlets/base/Findlet.h>
11 #include <tracking/trackFindingCDC/filters/base/RelationFilterUtil.h>
12 #include <tracking/trackFindingCDC/utilities/WeightedRelation.h>
13 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
14 #include <framework/core/ModuleParamList.h>
15 
16 #include <vector>
17 #include <string>
18 
19 namespace Belle2 {
24  namespace vxdHoughTracking {
25 
27  template<class AHit, class ARelationFilter>
28  class RelationCreator : public TrackFindingCDC::Findlet<AHit*, TrackFindingCDC::WeightedRelation<AHit>> {
29  public:
32 
35  {
37  };
38 
40  ~RelationCreator() = default;
41 
43  void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final
44  {
45  m_relationFilter.exposeParameters(moduleParamList, TrackFindingCDC::prefixed("relation", prefix));
46  };
47 
49  void apply(std::vector<AHit*>& hits,
50  std::vector<TrackFindingCDC::WeightedRelation<AHit>>& relations) override
51  {
52  // relations += hits -> hits in each track candidate
54  };
55 
56  private:
58  ARelationFilter m_relationFilter;
59  };
60 
61  }
63 }
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition: Findlet.h:26
Interface for an algorithm part that needs to receive the module processing signals.
Findlet for applying filters for creating hit-hit relations in each track candidate.
~RelationCreator()=default
Default destructor.
void apply(std::vector< AHit * > &hits, std::vector< TrackFindingCDC::WeightedRelation< AHit >> &relations) override
Apply both filters for creating state-hit and hit-hit relations.
RelationCreator()
Construct this findlet and add the subfindlet as listener.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters of the subfindlet.
ARelationFilter m_relationFilter
Subfindlet for the relation checking between seed and hits.
Abstract base class for different kinds of events.
static void appendUsing(ARelationFilter &relationFilter, const std::vector< AObject * > &froms, const std::vector< AObject * > &tos, std::vector< WeightedRelation< AObject >> &weightedRelations, unsigned int maximumNumberOfRelations=std::numeric_limits< unsigned int >::max())
Appends relations between elements in the given AItems using the ARelationFilter.