Belle II Software development
|
Singletone class to gather local information about the hits. More...
#include <CDCSimHitLookUp.h>
Public Member Functions | |
CDCSimHitLookUp (CDCSimHitLookUp &)=delete | |
Singleton: Delete copy constructor and assignment operator. | |
CDCSimHitLookUp & | operator= (const CDCSimHitLookUp &)=delete |
Operator =. | |
CDCSimHitLookUp ()=default | |
Default constructor - for cppcheck. | |
void | clear () |
Clear all information from the last event. | |
void | fill (const CDCMCMap *ptrMCMap) |
Gather the information about the right left passage using the CDCMCMap. | |
const CDCSimHit * | getClosestPrimarySimHit (const CDCHit *ptrHit) const |
Look up and return the closest primary simulated hit for the given CDCHit - if no suitable hit can be found return the secondary. | |
Vector3D | getDirectionOfFlight (const CDCHit *ptrHit) |
Calculate the local direction of flight. If the hit is secondary take the direction of flight from a close by primary - null vector if it cannot be assumed this way. | |
ERightLeft | getRLInfo (const CDCHit *ptrHit) const |
Look up the Monte Carlo right left passage information for the given hit. | |
Vector3D | getRecoPos3D (const CDCHit *ptrHit) const |
Look up the position of the primary ionisation from related simulated hit. | |
double | getDriftLength (const CDCHit *ptrHit) const |
Look up the drift length from the primary ionisation to the wire from related simulated hit. | |
Vector3D | getClosestPrimaryRecoPos3D (const CDCHit *ptrHit) const |
Look up the position of the primary ionisation from the closest primary simulated hit. | |
double | getClosestPrimaryDriftLength (const CDCHit *ptrHit) const |
Look up the drift length from the primary ionisation to the wire from related simulated hit. | |
const CDCWireHit * | getWireHit (const CDCHit *ptrHit, const std::vector< CDCWireHit > &wireHits) const |
Retrieve the wire hit the given CDCHit form the given wire hits. | |
CDCRLWireHit | getRLWireHit (const CDCHit *ptrHit, const std::vector< CDCWireHit > &wireHits) const |
Retrieve the wire hit including right left passage information for the given CDCHit form the given wire hits. | |
CDCRecoHit3D | getRecoHit3D (const CDCHit *ptrHit, const std::vector< CDCWireHit > &wireHits) const |
Construct an CDCRecoHit3D from the (potential secondary) CDCSimHit information related to the CDCHit. | |
CDCRecoHit3D | getClosestPrimaryRecoHit3D (const CDCHit *ptrHit, const std::vector< CDCWireHit > &wireHits) const |
Construct an CDCRecoHit3D from the closest primary CDCSimHit information related to the CDCHit. | |
CDCRecoHit2D | getRecoHit2D (const CDCHit *ptrHit, const std::vector< CDCWireHit > &wireHits) const |
Construct an CDCRecoHit2D from the (potential secondary) CDCSimHit information related to the CDCHit. | |
CDCRecoHit2D | getClosestPrimaryRecoHit2D (const CDCHit *ptrHit, const std::vector< CDCWireHit > &wireHits) const |
Construct an CDCRecoHit2D from the closest primary CDCSimHit information related to the CDCHit. | |
Static Public Member Functions | |
static const CDCSimHitLookUp & | getInstance () |
Getter for the singletone instance. | |
Private Member Functions | |
void | fillPrimarySimHits () |
Constructs the relation from reassigned secondary to a close by primary hit from the same MCParticle. | |
MayBePtr< const CDCSimHit > | getClosestPrimarySimHit (const CDCSimHit *ptrSimHit) const |
Helper function to find the closest primary hit for the given CDCSimHit from the same MCParticle - nullptr if no suitable hit can be found. | |
void | fillRLInfo () |
Construct the look up relation for the right left passage information as used in track finding. | |
Private Attributes | |
const CDCMCMap * | m_ptrMCMap |
Reference to the CDCMCMap to be used in this event. | |
std::map< const CDCHit *, MayBePtr< const CDCSimHit > > | m_primarySimHits |
Memory for the look up relation of close primary CDCSimHits. | |
std::map< const CDCHit *, ERightLeft > | m_rightLeftInfos |
Memory for the look up relation of the right left passage information as defined in tracking. | |
Singletone class to gather local information about the hits.
Because of the reassignment of secondary hits and the different definition of the right left passage in the CDCSimHit compared to the definition used in tracking finding, we provide this class to collect an manage localised information about each hit such as the local direction of travel and said left right passage information.
Definition at line 40 of file CDCSimHitLookUp.h.
void clear | ( | ) |
Clear all information from the last event.
Definition at line 36 of file CDCSimHitLookUp.cc.
void fill | ( | const CDCMCMap * | ptrMCMap | ) |
Gather the information about the right left passage using the CDCMCMap.
Definition at line 44 of file CDCSimHitLookUp.cc.
|
private |
Constructs the relation from reassigned secondary to a close by primary hit from the same MCParticle.
Definition at line 57 of file CDCSimHitLookUp.cc.
|
private |
Construct the look up relation for the right left passage information as used in track finding.
Definition at line 208 of file CDCSimHitLookUp.cc.
double getClosestPrimaryDriftLength | ( | const CDCHit * | ptrHit | ) | const |
Look up the drift length from the primary ionisation to the wire from related simulated hit.
If no primary sim hit is available use the information from the secondary hit
Definition at line 289 of file CDCSimHitLookUp.cc.
CDCRecoHit2D getClosestPrimaryRecoHit2D | ( | const CDCHit * | ptrHit, |
const std::vector< CDCWireHit > & | wireHits | ||
) | const |
Construct an CDCRecoHit2D from the closest primary CDCSimHit information related to the CDCHit.
Definition at line 351 of file CDCSimHitLookUp.cc.
CDCRecoHit3D getClosestPrimaryRecoHit3D | ( | const CDCHit * | ptrHit, |
const std::vector< CDCWireHit > & | wireHits | ||
) | const |
Construct an CDCRecoHit3D from the closest primary CDCSimHit information related to the CDCHit.
Definition at line 334 of file CDCSimHitLookUp.cc.
Look up the position of the primary ionisation from the closest primary simulated hit.
If no primary sim hit is available use the information from the secondary hit
Definition at line 279 of file CDCSimHitLookUp.cc.
Look up and return the closest primary simulated hit for the given CDCHit - if no suitable hit can be found return the secondary.
Definition at line 157 of file CDCSimHitLookUp.cc.
Helper function to find the closest primary hit for the given CDCSimHit from the same MCParticle - nullptr if no suitable hit can be found.
Definition at line 89 of file CDCSimHitLookUp.cc.
Calculate the local direction of flight. If the hit is secondary take the direction of flight from a close by primary - null vector if it cannot be assumed this way.
Definition at line 176 of file CDCSimHitLookUp.cc.
double getDriftLength | ( | const CDCHit * | ptrHit | ) | const |
Look up the drift length from the primary ionisation to the wire from related simulated hit.
Definition at line 260 of file CDCSimHitLookUp.cc.
|
static |
Getter for the singletone instance.
Definition at line 31 of file CDCSimHitLookUp.cc.
CDCRecoHit2D getRecoHit2D | ( | const CDCHit * | ptrHit, |
const std::vector< CDCWireHit > & | wireHits | ||
) | const |
Construct an CDCRecoHit2D from the (potential secondary) CDCSimHit information related to the CDCHit.
Definition at line 344 of file CDCSimHitLookUp.cc.
CDCRecoHit3D getRecoHit3D | ( | const CDCHit * | ptrHit, |
const std::vector< CDCWireHit > & | wireHits | ||
) | const |
Construct an CDCRecoHit3D from the (potential secondary) CDCSimHit information related to the CDCHit.
Definition at line 323 of file CDCSimHitLookUp.cc.
Look up the position of the primary ionisation from related simulated hit.
Definition at line 241 of file CDCSimHitLookUp.cc.
ERightLeft getRLInfo | ( | const CDCHit * | ptrHit | ) | const |
Look up the Monte Carlo right left passage information for the given hit.
Definition at line 235 of file CDCSimHitLookUp.cc.
CDCRLWireHit getRLWireHit | ( | const CDCHit * | ptrHit, |
const std::vector< CDCWireHit > & | wireHits | ||
) | const |
Retrieve the wire hit including right left passage information for the given CDCHit form the given wire hits.
Definition at line 313 of file CDCSimHitLookUp.cc.
const CDCWireHit * getWireHit | ( | const CDCHit * | ptrHit, |
const std::vector< CDCWireHit > & | wireHits | ||
) | const |
Retrieve the wire hit the given CDCHit form the given wire hits.
Definition at line 300 of file CDCSimHitLookUp.cc.
Memory for the look up relation of close primary CDCSimHits.
Definition at line 127 of file CDCSimHitLookUp.h.
|
private |
Reference to the CDCMCMap to be used in this event.
Definition at line 124 of file CDCSimHitLookUp.h.
|
private |
Memory for the look up relation of the right left passage information as defined in tracking.
Definition at line 130 of file CDCSimHitLookUp.h.