Belle II Software  release-08-01-10
SVDHoughTrackingTreeSearcher< AHit, APathFilter, AResult > Class Template Referenceabstract

Findlet for constructing result paths out of a list of hits, which are connected with weighted relations. More...

#include <SVDHoughTrackingTreeSearcher.dcl.h>

Inheritance diagram for SVDHoughTrackingTreeSearcher< AHit, APathFilter, AResult >:
Collaboration diagram for SVDHoughTrackingTreeSearcher< AHit, APathFilter, AResult >:

Public Types

using IOTypes = std::tuple< AIOTypes... >
 Types that should be served to apply on invokation.
 
using IOVectors = std::tuple< std::vector< AIOTypes >... >
 Vector types that should be served to apply on invokation.
 

Public Member Functions

 SVDHoughTrackingTreeSearcher ()
 Construct this findlet and add the subfindlet as listener.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters of the subfindlet.
 
void apply (std::vector< AHit * > &hits, const std::vector< TrackFindingCDC::WeightedRelation< AHit >> &relations, std::vector< AResult > &results) final
 Main function of this findlet: traverse a tree starting from a given seed hits. More...
 
virtual std::string getDescription ()
 Brief description of the purpose of the concret findlet.
 
virtual void apply (ToVector< AIOTypes > &... ioVectors)=0
 Main function executing the algorithm.
 
void initialize () override
 Receive and dispatch signal before the start of the event processing.
 
void beginRun () override
 Receive and dispatch signal for the beginning of a new run.
 
void beginEvent () override
 Receive and dispatch signal for the start of a new event.
 
void endRun () override
 Receive and dispatch signal for the end of the run.
 
void terminate () override
 Receive and dispatch Signal for termination of the event processing.
 

Protected Types

using ToVector = typename ToVectorImpl< T >::Type
 Short hand for ToRangeImpl.
 

Protected Member Functions

void addProcessingSignalListener (ProcessingSignalListener *psl)
 Register a processing signal listener to be notified.
 
int getNProcessingSignalListener ()
 Get the number of currently registered listeners.
 

Private Types

using Super = TrackFindingCDC::Findlet< AHit *, const TrackFindingCDC::WeightedRelation< AHit >, AResult >
 Parent class.
 

Private Member Functions

void traverseTree (std::vector< TrackFindingCDC::WithWeight< const AHit * >> &path, const std::vector< TrackFindingCDC::WeightedRelation< AHit >> &relations, std::vector< AResult > &results)
 Implementation of the traverseTree function.
 

Private Attributes

APathFilter m_pathFilter
 State rejecter to decide which available continuations should be traversed next.
 
TrackFindingCDC::CellularAutomaton< AHit > m_automaton
 Findlet for adding a recursion cell state to the hits.
 
uint m_applyTwoHitFilterIfMoreChildStates = 50
 TwoHitFilter activarion cut.
 
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
 References to subordinary signal processing listener contained in this findlet.
 
bool m_initialized = false
 Flag to keep track whether initialization happend before.
 
bool m_terminated = false
 Flag to keep track whether termination happend before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Detailed Description

template<class AHit, class APathFilter, class AResult>
class Belle2::vxdHoughTracking::SVDHoughTrackingTreeSearcher< AHit, APathFilter, AResult >

Findlet for constructing result paths out of a list of hits, which are connected with weighted relations.

At each step, the hits are again tested using a state rejector, which also knows the current path of hits.

This rejector is allowed to alter the hits, so using a cellular automaton it is assured, that the hits are traversed in the correct order without overriding each other. It is however crucial, that the relations do not create cycles in the graph!

Definition at line 37 of file SVDHoughTrackingTreeSearcher.dcl.h.

Member Function Documentation

◆ apply()

void apply ( std::vector< AHit * > &  hits,
const std::vector< TrackFindingCDC::WeightedRelation< AHit >> &  relations,
std::vector< AResult > &  results 
)
final

Main function of this findlet: traverse a tree starting from a given seed hits.

ATTENTION: As described above, the hits themselves can be altered during the tree traversal.

Definition at line 44 of file SVDHoughTrackingTreeSearcher.icc.h.

47  {
48  B2ASSERT("Expected relation to be sorted", std::is_sorted(relations.begin(), relations.end()));
49 
50  m_automaton.applyTo(hits, relations);
51 
52  std::vector<const AHit*> seedHits;
53  for (const AHit* hit : hits) {
54  if (hit->getDataCache().layer >= 5) {
55  seedHits.emplace_back(hit);
56  }
57  }
58 
59  std::vector<TrackFindingCDC::WithWeight<const AHit*>> path;
60  for (const AHit* seedHit : seedHits) {
61  B2DEBUG(29, "Starting with new seed...");
62 
63  path.emplace_back(seedHit, 0);
64  traverseTree(path, relations, results);
65  path.pop_back();
66  B2ASSERT("Something went wrong during the path traversal", path.empty());
67 
68  B2DEBUG(29, "... finished with seed");
69  }
70  }
ACellHolder * applyTo(const std::vector< ACellHolder * > &cellHolders, const std::vector< WeightedRelation< ACellHolder >> &cellHolderRelations) const
Applies the cellular automaton to the collection of cells and its neighborhood.
void traverseTree(std::vector< TrackFindingCDC::WithWeight< const AHit * >> &path, const std::vector< TrackFindingCDC::WeightedRelation< AHit >> &relations, std::vector< AResult > &results)
Implementation of the traverseTree function.
TrackFindingCDC::CellularAutomaton< AHit > m_automaton
Findlet for adding a recursion cell state to the hits.

The documentation for this class was generated from the following files: