![]() |
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. | |
| ROOT::Math::XYZVector | 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. | |
| TrackingUtilities::ERightLeft | getRLInfo (const CDCHit *ptrHit) const |
| Look up the Monte Carlo right left passage information for the given hit. | |
| ROOT::Math::XYZVector | 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. | |
| ROOT::Math::XYZVector | 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 TrackingUtilities::CDCWireHit * | getWireHit (const CDCHit *ptrHit, const std::vector< TrackingUtilities::CDCWireHit > &wireHits) const |
| Retrieve the wire hit the given CDCHit form the given wire hits. | |
| TrackingUtilities::CDCRLWireHit | getRLWireHit (const CDCHit *ptrHit, const std::vector< TrackingUtilities::CDCWireHit > &wireHits) const |
| Retrieve the wire hit including right left passage information for the given CDCHit form the given wire hits. | |
| TrackingUtilities::CDCRecoHit3D | getRecoHit3D (const CDCHit *ptrHit, const std::vector< TrackingUtilities::CDCWireHit > &wireHits) const |
| Construct an CDCRecoHit3D from the (potential secondary) CDCSimHit information related to the CDCHit. | |
| TrackingUtilities::CDCRecoHit3D | getClosestPrimaryRecoHit3D (const CDCHit *ptrHit, const std::vector< TrackingUtilities::CDCWireHit > &wireHits) const |
| Construct an CDCRecoHit3D from the closest primary CDCSimHit information related to the CDCHit. | |
| TrackingUtilities::CDCRecoHit2D | getRecoHit2D (const CDCHit *ptrHit, const std::vector< TrackingUtilities::CDCWireHit > &wireHits) const |
| Construct an TrackingUtilities::CDCRecoHit2D from the (potential secondary) CDCSimHit information related to the CDCHit. | |
| TrackingUtilities::CDCRecoHit2D | getClosestPrimaryRecoHit2D (const CDCHit *ptrHit, const std::vector< TrackingUtilities::CDCWireHit > &wireHits) const |
| Construct an TrackingUtilities::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. | |
| TrackingUtilities::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 *, TrackingUtilities::MayBePtr< const CDCSimHit > > | m_primarySimHits |
| Memory for the look up relation of close primary CDCSimHits. | |
| std::map< const CDCHit *, TrackingUtilities::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 44 of file CDCSimHitLookUp.h.
| void clear | ( | ) |
Clear all information from the last event.
Definition at line 38 of file CDCSimHitLookUp.cc.
| void fill | ( | const CDCMCMap * | ptrMCMap | ) |
Gather the information about the right left passage using the CDCMCMap.
Definition at line 46 of file CDCSimHitLookUp.cc.
|
private |
Constructs the relation from reassigned secondary to a close by primary hit from the same MCParticle.
Definition at line 59 of file CDCSimHitLookUp.cc.
|
private |
Construct the look up relation for the right left passage information as used in track finding.
Definition at line 210 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 292 of file CDCSimHitLookUp.cc.
| CDCRecoHit2D getClosestPrimaryRecoHit2D | ( | const CDCHit * | ptrHit, |
| const std::vector< TrackingUtilities::CDCWireHit > & | wireHits ) const |
Construct an TrackingUtilities::CDCRecoHit2D from the closest primary CDCSimHit information related to the CDCHit.
Definition at line 354 of file CDCSimHitLookUp.cc.
| CDCRecoHit3D getClosestPrimaryRecoHit3D | ( | const CDCHit * | ptrHit, |
| const std::vector< TrackingUtilities::CDCWireHit > & | wireHits ) const |
Construct an CDCRecoHit3D from the closest primary CDCSimHit information related to the CDCHit.
Definition at line 337 of file CDCSimHitLookUp.cc.
| ROOT::Math::XYZVector getClosestPrimaryRecoPos3D | ( | const CDCHit * | ptrHit | ) | const |
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 282 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 159 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 91 of file CDCSimHitLookUp.cc.
| ROOT::Math::XYZVector 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.
Definition at line 178 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 263 of file CDCSimHitLookUp.cc.
|
static |
Getter for the singletone instance.
Definition at line 33 of file CDCSimHitLookUp.cc.
| CDCRecoHit2D getRecoHit2D | ( | const CDCHit * | ptrHit, |
| const std::vector< TrackingUtilities::CDCWireHit > & | wireHits ) const |
Construct an TrackingUtilities::CDCRecoHit2D from the (potential secondary) CDCSimHit information related to the CDCHit.
Definition at line 347 of file CDCSimHitLookUp.cc.
| CDCRecoHit3D getRecoHit3D | ( | const CDCHit * | ptrHit, |
| const std::vector< TrackingUtilities::CDCWireHit > & | wireHits ) const |
Construct an CDCRecoHit3D from the (potential secondary) CDCSimHit information related to the CDCHit.
Definition at line 326 of file CDCSimHitLookUp.cc.
| ROOT::Math::XYZVector getRecoPos3D | ( | const CDCHit * | ptrHit | ) | const |
Look up the position of the primary ionisation from related simulated hit.
Definition at line 244 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 238 of file CDCSimHitLookUp.cc.
| CDCRLWireHit getRLWireHit | ( | const CDCHit * | ptrHit, |
| const std::vector< TrackingUtilities::CDCWireHit > & | wireHits ) const |
Retrieve the wire hit including right left passage information for the given CDCHit form the given wire hits.
Definition at line 316 of file CDCSimHitLookUp.cc.
| const CDCWireHit * getWireHit | ( | const CDCHit * | ptrHit, |
| const std::vector< TrackingUtilities::CDCWireHit > & | wireHits ) const |
Retrieve the wire hit the given CDCHit form the given wire hits.
Definition at line 303 of file CDCSimHitLookUp.cc.
Memory for the look up relation of close primary CDCSimHits.
Definition at line 131 of file CDCSimHitLookUp.h.
|
private |
Reference to the CDCMCMap to be used in this event.
Definition at line 128 of file CDCSimHitLookUp.h.
|
private |
Memory for the look up relation of the right left passage information as defined in tracking.
Definition at line 134 of file CDCSimHitLookUp.h.