Belle II Software
release-08-01-10
|
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. More... | |
double | getClosestPrimaryDriftLength (const CDCHit *ptrHit) const |
Look up the drift length from the primary ionisation to the wire from related simulated hit. More... | |
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.
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.
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.