Belle II Software  release-05-02-19
StereoHitTrackAdder Class Referenceabstract

Class to add the matched hits to the track and set the taken flag correctly. More...

#include <StereoHitTrackAdder.h>

Inheritance diagram for StereoHitTrackAdder:
Collaboration diagram for StereoHitTrackAdder:

Public Types

using WeightedRelationItem = WeightedRelation< CDCTrack, const CDCRLWireHit >
 Shortcut class name for a weighted relation between a collector item and a collection item.
 
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

void apply (std::vector< WeightedRelationItem > &weightedRelations) override
 Main function to do the adding. Override the add function below in your derived class.
 
virtual void apply (ToVector< AIOTypes > &... ioVectors)=0
 Main function executing the algorithm.
 
virtual std::string getDescription ()
 Brief description of the purpose of the concret findlet.
 
virtual void exposeParameters (ModuleParamList *moduleParamList __attribute__((unused)), const std::string &prefix __attribute__((unused)))
 Forward prefixed parameters of this findlet to the module parameter list.
 
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

virtual void add (CDCTrack &collectorItem __attribute__((unused)), const CDCRLWireHit &collectionItem __attribute__((unused)), Weight weight __attribute__((unused)))
 Override this function to implement how a collection item should be matched to a collector item.
 
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 = ProcessingSignalListener
 Type of the base class.
 

Private Member Functions

void add (CDCTrack &track, const CDCRLWireHit &hit, Weight weight) override
 Add the matched hits to the track and set the taken flag correctly. More...
 

Private Attributes

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

Class to add the matched hits to the track and set the taken flag correctly.

Definition at line 31 of file StereoHitTrackAdder.h.

Member Function Documentation

◆ add()

void add ( CDCTrack track,
const CDCRLWireHit hit,
Weight  weight 
)
overrideprivate

Add the matched hits to the track and set the taken flag correctly.

We ignore the weight completely here.

Definition at line 13 of file StereoHitTrackAdder.cc.

14 {
15  const CDCTrajectory2D& trajectory2D = track.getStartTrajectory3D().getTrajectory2D();
16  const double radius = trajectory2D.getGlobalCircle().absRadius();
17  const bool isCurler = trajectory2D.isCurler();
18 
19  Vector3D recoPos3D = hit.reconstruct3D(trajectory2D);
20  double arcLength2D = trajectory2D.calcArcLength2D(recoPos3D.xy());
21  if (isCurler and arcLength2D < 0) {
22  arcLength2D += 2 * TMath::Pi() * radius;
23  }
24 
25  B2ASSERT("A stereo hit should not be added twice!", not hit.getWireHit().getAutomatonCell().hasTakenFlag());
26  track.emplace_back(hit, recoPos3D, arcLength2D);
27  hit.getWireHit().getAutomatonCell().setTakenFlag();
28 }

The documentation for this class was generated from the following files:
Belle2::Vector3D
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:35