Belle II Software
release-08-01-10
|
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. More... | |
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 assoziated CDCSimHits. More... | |
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. More... | |
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 assoziated 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 assoziated 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.
|
private |
Sorts the given track for the FlightTime of the assoziated 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 seperatly.
Definition at line 341 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.