Belle II Software  release-08-01-10
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, const std::string &prefix)
 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

template<class T >
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 = 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 21 of file StereoHitTrackAdder.h.

Member Function Documentation

◆ add()

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

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

We ignore the weight completely here.

Reimplemented from AdderInterface< CDCTrack, CDCRLWireHit >.

Definition at line 20 of file StereoHitTrackAdder.cc.

21 {
22  const CDCTrajectory2D& trajectory2D = track.getStartTrajectory3D().getTrajectory2D();
23  const double radius = trajectory2D.getGlobalCircle().absRadius();
24  const bool isCurler = trajectory2D.isCurler();
25 
26  Vector3D recoPos3D = hit.reconstruct3D(trajectory2D);
27  double arcLength2D = trajectory2D.calcArcLength2D(recoPos3D.xy());
28  if (isCurler and arcLength2D < 0) {
29  arcLength2D += 2 * TMath::Pi() * radius;
30  }
31 
32  B2ASSERT("A stereo hit should not be added twice!", not hit.getWireHit().getAutomatonCell().hasTakenFlag());
33  track.emplace_back(hit, recoPos3D, arcLength2D);
34  hit.getWireHit().getAutomatonCell().setTakenFlag();
35 }
Particle trajectory as it is seen in xy projection represented as a circle.
PerigeeCircle getGlobalCircle() const
Getter for the circle in global coordinates.
double calcArcLength2D(const Vector2D &point) const
Calculate the travel distance from the start position of the trajectory.
bool isCurler(double factor=1) const
Checks if the trajectory leaves the outer radius of the CDC times the given tolerance factor.
double absRadius() const
Gives the signed radius of the circle. If it was a line this will be infinity.
A three dimensional vector.
Definition: Vector3D.h:33
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
Definition: Vector3D.h:508

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