Belle II Software development
|
Class to organize and present the monte carlo hit information. More...
#include <CDCMCTrackStore.h>
Public Types | |
using | CDCHitVector = std::vector< const CDCHit * > |
Type for an ordered sequence of pointers to the CDCHit. | |
Public Member Functions | |
CDCMCTrackStore ()=default | |
Default constructor - for cppcheck. | |
CDCMCTrackStore (CDCMCTrackStore &)=delete | |
Singleton: Delete copy constructor and assignment operator. | |
CDCMCTrackStore & | operator= (const CDCMCTrackStore &)=delete |
Operator =. | |
void | clear () |
Clear all Monte Carlo hits. | |
void | fill (const CDCMCMap *ptrMCMap, const CDCSimHitLookUp *ptrSimHitLookUp) |
Fill the store with the tracks from Monte Carlo information. | |
const std::map< ITrackType, Belle2::TrackFindingCDC::CDCMCTrackStore::CDCHitVector > & | getMCTracksByMCParticleIdx () const |
Getter for the stored Monte Carlo tracks ordered by their Monte Carlo Id. | |
const std::map< ITrackType, std::vector< Belle2::TrackFindingCDC::CDCMCTrackStore::CDCHitVector > > & | getMCSegmentsByMCParticleIdx () const |
Getter for the stored Monte Carlo segments ordered by their Monte Carlo Id. | |
Index | getInTrackId (const CDCHit *ptrHit) const |
Getter for the index of the hit within its track. | |
Index | getInTrackSegmentId (const CDCHit *ptrHit) const |
Getter for the index of the segment of the hit within its track. | |
Index | getNPassedSuperLayers (const CDCHit *ptrHit) const |
Getter for the number of super layers traversed until this hit. | |
Index | getNLoops (const CDCHit *ptrHit) const |
Getter for the number of traversed loops until this hit. | |
Static Public Member Functions | |
static const CDCMCTrackStore & | getInstance () |
Getter for the singletone instance. | |
Private Member Functions | |
void | fillMCTracks () |
Construct the tracks by grouping the hits by the mc particle id and sorted them for the FlightTime of the related CDCSimHits. | |
void | fillMCSegments () |
Construct the segments by dividing the mc tracks in to disconnected parts and sorted them for the FlightTime of the related CDCSimHits. | |
void | arrangeMCTrack (CDCHitVector &mcTrack) const |
Sorts the given track for the FlightTime of the associated CDCSimHits. | |
void | fillInTrackId () |
Fill the look up table for the in track index of each hit. | |
void | fillInTrackSegmentId () |
Fill the look up table for the in track segment index of each hit. | |
void | fillNLoopsAndNPassedSuperLayers () |
Fill the look up table of the number of traversed super layers until each hit. | |
bool | changedSuperLayer (const CDCHitVector &mcSegment, const CDCHitVector &nextMCSegment) const |
Helper function to decide whether the number of passed superlayers changed from one segment to the next. | |
Private Attributes | |
const CDCMCMap * | m_ptrMCMap |
Reference to the MC map of the current event. | |
const CDCSimHitLookUp * | m_ptrSimHitLookUp |
Reference to the CDCSimHit look up for additional information about related primary sim hits. | |
std::map< ITrackType, CDCHitVector > | m_mcTracksByMCParticleIdx |
The memory for the tracks made of CDCHits sorted for the time of flight and associated to the Monte Carlo particle id. | |
std::map< ITrackType, std::vector< CDCHitVector > > | m_mcSegmentsByMCParticleIdx |
The memory for the segments made of CDCHits sorted for the time of flight and associated to the Monte Carlo particle id. | |
std::map< const CDCHit *, int > | m_inTrackIds |
Look up table for index of the hit within its track. | |
std::map< const CDCHit *, int > | m_inTrackSegmentIds |
Look up table for index of the segment of the hits within their respective tracks. | |
std::map< const CDCHit *, int > | m_nPassedSuperLayers |
Look up table for the number of super layers the particle traversed before making the individual hit. | |
std::map< const CDCHit *, int > | m_nLoops |
Look up table for the number of loops the particle traversed before making the individual hit. | |
Class to organize and present the monte carlo hit information.
Definition at line 28 of file CDCMCTrackStore.h.
using CDCHitVector = std::vector<const CDCHit*> |
Type for an ordered sequence of pointers to the CDCHit.
Definition at line 32 of file CDCMCTrackStore.h.
|
private |
Sorts the given track for the FlightTime of the associated CDCSimHits.
Sort with NaN as high.
Definition at line 235 of file CDCMCTrackStore.cc.
|
private |
Helper function to decide whether the number of passed superlayers changed from one segment to the next.
The number of passed superlayers is easily detectable in a switch of the superlayer number form one segment to the next. An exception to this rule happens were particles are curling back exiting the super layer 0 and reentering the CDC super layer 0. There is no change of super layer number in this case since consecutive segments (only looking at the CDC) have the super layer number 0. Since this case would screw the evaluation of segment pair or triple selection we have to treat it separately.
Definition at line 341 of file CDCMCTrackStore.cc.
void clear | ( | ) |
Clear all Monte Carlo hits.
Definition at line 33 of file CDCMCTrackStore.cc.
void fill | ( | const CDCMCMap * | ptrMCMap, |
const CDCSimHitLookUp * | ptrSimHitLookUp | ||
) |
Fill the store with the tracks from Monte Carlo information.
It uses the CDCMCMap to construct the Monte Carlo tracks.
Definition at line 52 of file CDCMCTrackStore.cc.
|
private |
Fill the look up table for the in track index of each hit.
Definition at line 274 of file CDCMCTrackStore.cc.
|
private |
Fill the look up table for the in track segment index of each hit.
Definition at line 291 of file CDCMCTrackStore.cc.
|
private |
Construct the segments by dividing the mc tracks in to disconnected parts and sorted them for the FlightTime of the related CDCSimHits.
Definition at line 121 of file CDCMCTrackStore.cc.
|
private |
Construct the tracks by grouping the hits by the mc particle id and sorted them for the FlightTime of the related CDCSimHits.
Definition at line 87 of file CDCMCTrackStore.cc.
|
private |
Fill the look up table of the number of traversed super layers until each hit.
Definition at line 308 of file CDCMCTrackStore.cc.
|
static |
Getter for the singletone instance.
Definition at line 27 of file CDCMCTrackStore.cc.
Index getInTrackId | ( | const CDCHit * | ptrHit | ) | const |
Getter for the index of the hit within its track.
Definition at line 376 of file CDCMCTrackStore.cc.
Index getInTrackSegmentId | ( | const CDCHit * | ptrHit | ) | const |
Getter for the index of the segment of the hit within its track.
Definition at line 386 of file CDCMCTrackStore.cc.
|
inline |
Getter for the stored Monte Carlo segments ordered by their Monte Carlo Id.
Definition at line 64 of file CDCMCTrackStore.h.
|
inline |
Getter for the stored Monte Carlo tracks ordered by their Monte Carlo Id.
Definition at line 60 of file CDCMCTrackStore.h.
Index getNLoops | ( | const CDCHit * | ptrHit | ) | const |
Getter for the number of traversed loops until this hit.
Definition at line 403 of file CDCMCTrackStore.cc.
Index getNPassedSuperLayers | ( | const CDCHit * | ptrHit | ) | const |
Getter for the number of super layers traversed until this hit.
Definition at line 395 of file CDCMCTrackStore.cc.
|
private |
Look up table for index of the hit within its track.
Definition at line 122 of file CDCMCTrackStore.h.
|
private |
Look up table for index of the segment of the hits within their respective tracks.
Definition at line 125 of file CDCMCTrackStore.h.
|
private |
The memory for the segments made of CDCHits sorted for the time of flight and associated to the Monte Carlo particle id.
Definition at line 119 of file CDCMCTrackStore.h.
|
private |
The memory for the tracks made of CDCHits sorted for the time of flight and associated to the Monte Carlo particle id.
Definition at line 116 of file CDCMCTrackStore.h.
|
private |
Look up table for the number of loops the particle traversed before making the individual hit.
Definition at line 131 of file CDCMCTrackStore.h.
|
private |
Look up table for the number of super layers the particle traversed before making the individual hit.
Definition at line 128 of file CDCMCTrackStore.h.
|
private |
Reference to the MC map of the current event.
Definition at line 110 of file CDCMCTrackStore.h.
|
private |
Reference to the CDCSimHit look up for additional information about related primary sim hits.
Definition at line 113 of file CDCMCTrackStore.h.