Belle II Software  release-08-01-10
CDCSimHitLookUp Class Reference

Singletone class to gather local information about the hits. More...

#include <CDCSimHitLookUp.h>

Collaboration diagram for CDCSimHitLookUp:

Public Member Functions

 CDCSimHitLookUp (CDCSimHitLookUp &)=delete
 Singleton: Delete copy constructor and assignment operator.
 
CDCSimHitLookUpoperator= (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 CDCSimHitgetClosestPrimarySimHit (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 CDCWireHitgetWireHit (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 CDCSimHitLookUpgetInstance ()
 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 CDCSimHitgetClosestPrimarySimHit (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 CDCMCMapm_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 *, ERightLeftm_rightLeftInfos
 Memory for the look up relation of the right left passage information as defined in tracking.
 

Detailed Description

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.

Member Function Documentation

◆ getClosestPrimaryDriftLength()

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.

290 {
291  const CDCSimHit* ptrPrimarySimHit = getClosestPrimarySimHit(ptrHit);
292  if (ptrPrimarySimHit) {
293  const CDCSimHit& primarySimHit = *ptrPrimarySimHit;
294  return primarySimHit.getDriftLength();
295  } else {
296  return getDriftLength(ptrHit);
297  }
298 }
Example Detector.
Definition: CDCSimHit.h:21
double getDriftLength() const
The method to get drift length.
Definition: CDCSimHit.h:181
double getDriftLength(const CDCHit *ptrHit) const
Look up the drift length from the primary ionisation to the wire from related simulated hit.
MayBePtr< const CDCSimHit > getClosestPrimarySimHit(const CDCSimHit *ptrSimHit) const
Helper function to find the closest primary hit for the given CDCSimHit from the same MCParticle - nu...

◆ getClosestPrimaryRecoPos3D()

Vector3D 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 279 of file CDCSimHitLookUp.cc.


The documentation for this class was generated from the following files: