Belle II Software development
|
geant4e-based track extrapolation. More...
#include <TrackExtrapolateG4e.h>
Public Member Functions | |
~TrackExtrapolateG4e () | |
destructor | |
void | initialize (double minPt, double minKE, std::vector< Const::ChargedStable > &hypotheses) |
Initialize for track extrapolation by the EXT module. | |
void | initialize (double meanDt, double maxDt, double maxSeparation, double maxKLMTrackClusterDistance, double maxECLTrackClusterDistance, double minPt, double minKE, bool addHitsToRecoTrack, std::vector< Const::ChargedStable > &hypotheses) |
Initialize for track extrapolation by the MUID module. | |
void | beginRun (bool flag) |
Perform beginning-of-run actions. | |
void | event (bool flag) |
Performs track extrapolation for all tracks in one event. | |
void | endRun (bool flag) |
Perform end-of-run actions. | |
void | terminate (bool flag) |
Terminates this singleton. | |
void | extrapolate (int pdgCode, double tof, const G4ThreeVector &position, const G4ThreeVector &momentum, const G4ErrorSymMatrix &covariance) |
Performs track extrapolation for a single track (specified in genfit2 units). | |
Static Public Member Functions | |
static TrackExtrapolateG4e * | getInstance () |
Get the singleton's address. | |
Private Member Functions | |
TrackExtrapolateG4e () | |
constructor is hidden; user calls TrackExtrapolateG4e::getInstance() instead | |
TrackExtrapolateG4e (TrackExtrapolateG4e &) | |
copy constructor is hidden; user calls TrackExtrapolateG4e::getInstance() instead | |
void | swim (ExtState &, G4ErrorFreeTrajState &, const std::vector< std::pair< ECLCluster *, G4ThreeVector > > *, const std::vector< std::pair< KLMCluster *, G4ThreeVector > > *, std::vector< std::map< const Track *, double > > *) |
Swim a single track (MUID) until it stops or leaves the target cylinder. | |
void | swim (ExtState &, G4ErrorFreeTrajState &) |
Swim a single track (EXT) until it stops or leaves the target cylinder. | |
void | registerVolumes () |
Register the list of geant4 physical volumes whose entry/exit points will be saved during extrapolation. | |
void | getVolumeID (const G4TouchableHandle &, Const::EDetector &, int &) |
Get the physical volume information for a geant4 physical volume. | |
void | fromG4eToPhasespace (const G4ErrorFreeTrajState &, G4ErrorSymMatrix &) |
Convert the geant4e 5x5 covariance to phasespace 6x6 covariance. | |
void | fromPhasespaceToG4e (const G4ThreeVector &, const G4ErrorSymMatrix &, G4ErrorTrajErr &) |
Convert the phasespace covariance to geant4e covariance. | |
void | fromPhasespaceToG4e (const TVector3 &, const TMatrixDSym &, G4ErrorTrajErr &) |
Convert the phasespace covariance to geant4e covariance. | |
ExtState | getStartPoint (const Track &, int, G4ErrorFreeTrajState &) |
Get the start point for a new reconstructed track with specific PDG hypothesis. | |
void | createExtHit (ExtHitStatus, const ExtState &, const G4ErrorFreeTrajState &, const G4StepPoint *, const G4TouchableHandle &) |
Create another EXT extrapolation hit for a track candidate. | |
void | createECLHit (const ExtState &, const G4ErrorFreeTrajState &, const G4StepPoint *, const G4StepPoint *, const G4TouchableHandle &, const std::pair< ECLCluster *, G4ThreeVector > &, double, double) |
Create another EXT ECL-crystal-crossing hit for a track candidate. | |
bool | createMuidHit (ExtState &, G4ErrorFreeTrajState &, KLMMuidLikelihood *, std::vector< std::map< const Track *, double > > *) |
Create another MUID extrapolation hit for a track candidate. | |
bool | findBarrelIntersection (ExtState &, const G4ThreeVector &, Intersection &) |
Find the intersection point of the track with the crossed BKLM plane. | |
bool | findEndcapIntersection (ExtState &, const G4ThreeVector &, Intersection &) |
Find the intersection point of the track with the crossed EKLM plane. | |
bool | findMatchingBarrelHit (Intersection &, const Track *) |
Find the matching BKLM 2D hit nearest the intersection point of the track with the crossed BKLM plane. | |
bool | findMatchingEndcapHit (Intersection &, const Track *) |
Find the matching EKLM 2D hit nearest the intersection point of the track with the crossed EKLM plane. | |
void | adjustIntersection (Intersection &, const double *, const G4ThreeVector &, const G4ThreeVector &) |
Nudge the track using the matching hit. | |
void | finishTrack (const ExtState &, KLMMuidLikelihood *, bool) |
Complete muon identification after end of track extrapolation. | |
Private Attributes | |
bool | m_ExtInitialized |
Flag to indicate that EXT initialize() has been called. | |
bool | m_MuidInitialized |
Flag to indicate that MUID initialize() has been called. | |
double | m_MeanDt |
Mean hit - trigger time (ns) | |
double | m_MaxDt |
Coincidence window half-width for in-time KLM hits (ns) | |
double | m_MagneticField |
Magnetic field z component (gauss) at origin. | |
double | m_MaxDistSqInVariances |
user-defined maximum squared-distance (in number of variances) for matching hit to extrapolation | |
double | m_MaxKLMTrackClusterDistance |
user-defined maximum distance (mm) between KLMCluster and associated track (for KLID) | |
double | m_MaxECLTrackClusterDistance |
user-defined maximum distance (mm) between ECLCluster and associated track (for EID) | |
double | m_MinPt |
Minimum transverse momentum in MeV/c for extrapolation to be started. | |
double | m_MinKE |
Minimum kinetic energy in MeV for extrapolation to continue. | |
Simulation::ExtManager * | m_ExtMgr |
Pointer to the ExtManager singleton. | |
const std::vector< Const::ChargedStable > * | m_HypothesesExt |
ChargedStable hypotheses for EXT. | |
const std::vector< Const::ChargedStable > * | m_HypothesesMuid |
ChargedStable hypotheses for MUID. | |
std::vector< Const::ChargedStable > * | m_DefaultHypotheses |
Default ChargedStable hypotheses (needed as call argument but not used) | |
std::map< G4VPhysicalVolume *, enum VolTypes > * | m_EnterExit |
Pointers to geant4 physical volumes whose entry/exit points will be saved. | |
std::vector< G4VPhysicalVolume * > * | m_BKLMVolumes |
Pointers to BKLM geant4 sensitive (physical) volumes. | |
Simulation::ExtCylSurfaceTarget * | m_TargetExt |
virtual "target" cylinder for EXT (boundary beyond which extrapolation ends) | |
Simulation::ExtCylSurfaceTarget * | m_TargetMuid |
virtual "target" cylinder for MUID (boundary beyond which extrapolation ends) | |
DBObjPtr< COILGeometryPar > | m_COILGeometryPar |
Conditions-database object for COIL geometry. | |
DBObjPtr< BeamPipeGeo > | m_BeamPipeGeo |
Conditions-database object for beam pipe geometry. | |
double | m_MinRadiusSq |
Minimum squared radius (cm) outside of which extrapolation will continue. | |
double | m_OffsetZ |
offset (cm) along z axis of KLM midpoint from IP | |
int | m_BarrelNSector |
Number of barrel sectors. | |
double | m_BarrelMaxR |
maximum radius (cm) of the barrel | |
double | m_BarrelMinR |
minimum radius (cm) of the barrel | |
double | m_BarrelHalfLength |
half-length (cm) of the barrel | |
int | m_OutermostActiveBarrelLayer |
outermost barrel layer that is active for muon identification (user-defined) | |
double | m_BarrelPhiStripVariance [BKLMElementNumbers::getMaximalLayerNumber()+1] |
BKLM RPC phi-measuring strip position variance (cm^2) by layer. | |
double | m_BarrelZStripVariance [BKLMElementNumbers::getMaximalLayerNumber()+1] |
BKLM RPC z-measuring strip position variance (cm^2) by layer. | |
double | m_BarrelScintVariance |
BKLM scintillator strip position variance (cm^2) | |
double | m_BarrelModuleMiddleRadius [2][BKLMElementNumbers::getMaximalSectorNumber()+1][BKLMElementNumbers::getMaximalLayerNumber()+1] |
hit-plane radius (cm) at closest distance to IP of each barrel end | sector | layer | |
G4ThreeVector | m_BarrelSectorPerp [BKLMElementNumbers::getMaximalSectorNumber()+1] |
normal unit vector of each barrel sector | |
G4ThreeVector | m_BarrelSectorPhi [BKLMElementNumbers::getMaximalSectorNumber()+1] |
azimuthal unit vector of each barrel sector | |
double | m_EndcapMaxR |
maximum radius (cm) of the endcaps | |
double | m_EndcapMinR |
minimum radius (cm) of the endcaps | |
double | m_EndcapMiddleZ |
midpoint along z (cm) of the forward endcap from the KLM midpoint | |
double | m_EndcapHalfLength |
half-length (cm) of either endcap | |
int | m_OutermostActiveForwardEndcapLayer |
outermost forward-endcap layer that is active for muon identification (user-defined) | |
int | m_OutermostActiveBackwardEndcapLayer |
outermost backward-endcap layer that is active for muon identification (user-defined) | |
double | m_EndcapScintVariance |
EKLM scintillator strip position variance (cm^2) | |
double | m_EndcapModuleMiddleZ [BKLMElementNumbers::getMaximalLayerNumber()+1] |
hit-plane z (cm) of each IP layer relative to KLM midpoint | |
bool | m_addHitsToRecoTrack = false |
Parameter to add the found hits also to the reco tracks or not. Is turned off by default. | |
std::map< int, MuidBuilder * > | m_MuidBuilderMap |
PDF for the charged final state particle hypotheses. | |
const EKLMElementNumbers * | m_eklmElementNumbers |
EKLM element numbers. | |
const KLMElementNumbers * | m_klmElementNumbers |
KLM element numbers. | |
const EKLM::TransformDataGlobalAligned * | m_eklmTransformData |
EKLM transformation data. | |
DBObjPtr< KLMChannelStatus > | m_klmChannelStatus |
Conditions-database object for KLM channel status. | |
DBObjPtr< KLMStripEfficiency > | m_klmStripEfficiency |
Conditions-database object for KLM strip efficiency. | |
DBObjPtr< KLMLikelihoodParameters > | m_klmLikelihoodParameters |
Conditions-database object for KLM likelihood parameters. | |
StoreArray< ECLCluster > | m_eclClusters |
ECL clusters. | |
StoreArray< ExtHit > | m_extHits |
Ext hits. | |
StoreArray< KLMHit2d > | m_klmHit2ds |
KLM 2d hits. | |
StoreArray< KLMCluster > | m_klmClusters |
KLM clusters. | |
StoreArray< KLMMuidHit > | m_klmMuidHits |
KLM muid hits. | |
StoreArray< KLMMuidLikelihood > | m_klmMuidLikelihoods |
KLM muid likelihoods. | |
StoreArray< RecoTrack > | m_recoTracks |
Reco tracks. | |
StoreArray< Track > | m_tracks |
Tracks. | |
StoreArray< TrackClusterSeparation > | m_trackClusterSeparations |
Track cluster separation. | |
Static Private Attributes | |
static TrackExtrapolateG4e * | m_Singleton = nullptr |
Stores pointer to the singleton class. | |
geant4e-based track extrapolation.
This class extrapolates tracks outward from the outer perimeter of the CDC using geant4e.
This class requires a valid geometry in memory (gGeoManager). Therefore, a geometry building module should have been executed before this module is called.
This class has the same functions as a module - and these are called from the ExtModule's so-named functions - but also has an entry that can be called to extrapolate a single user-defined track.
Definition at line 168 of file TrackExtrapolateG4e.h.
~TrackExtrapolateG4e | ( | ) |
|
private |
constructor is hidden; user calls TrackExtrapolateG4e::getInstance() instead
Definition at line 79 of file TrackExtrapolateG4e.cc.
|
private |
Nudge the track using the matching hit.
Definition at line 1639 of file TrackExtrapolateG4e.cc.
void beginRun | ( | bool | flag | ) |
Perform beginning-of-run actions.
flag | True if called by Muid module, false if called by Ext module. |
Definition at line 333 of file TrackExtrapolateG4e.cc.
|
private |
Create another EXT extrapolation hit for a track candidate.
Definition at line 1182 of file TrackExtrapolateG4e.cc.
|
private |
Create another MUID extrapolation hit for a track candidate.
Definition at line 1206 of file TrackExtrapolateG4e.cc.
void endRun | ( | bool | flag | ) |
Perform end-of-run actions.
flag | True if called by Muid module, false if called by Ext module. |
Definition at line 413 of file TrackExtrapolateG4e.cc.
void event | ( | bool | flag | ) |
Performs track extrapolation for all tracks in one event.
flag | True if called by Muid module, false if called by Ext module. |
Definition at line 357 of file TrackExtrapolateG4e.cc.
void extrapolate | ( | int | pdgCode, |
double | tof, | ||
const G4ThreeVector & | position, | ||
const G4ThreeVector & | momentum, | ||
const G4ErrorSymMatrix & | covariance | ||
) |
Performs track extrapolation for a single track (specified in genfit2 units).
pdgCode | Signed PDG identifier of the particle hypothesis to be used for the extrapolation. |
tof | Starting time, i.e., time of flight from the IP, at the starting point (ns). |
position | Starting point of the extrapolation (cm). |
momentum | Momentum of the track at the starting point (GeV/c). |
covariance | Phase-space covariance matrix (6x6) at the starting point (cm, GeV/c). |
Definition at line 439 of file TrackExtrapolateG4e.cc.
|
private |
Find the intersection point of the track with the crossed BKLM plane.
Definition at line 1408 of file TrackExtrapolateG4e.cc.
|
private |
Find the intersection point of the track with the crossed EKLM plane.
Definition at line 1440 of file TrackExtrapolateG4e.cc.
|
private |
Find the matching BKLM 2D hit nearest the intersection point of the track with the crossed BKLM plane.
Definition at line 1472 of file TrackExtrapolateG4e.cc.
|
private |
Find the matching EKLM 2D hit nearest the intersection point of the track with the crossed EKLM plane.
Definition at line 1576 of file TrackExtrapolateG4e.cc.
|
private |
Complete muon identification after end of track extrapolation.
Definition at line 1762 of file TrackExtrapolateG4e.cc.
|
private |
Convert the geant4e 5x5 covariance to phasespace 6x6 covariance.
Definition at line 1031 of file TrackExtrapolateG4e.cc.
|
private |
Convert the phasespace covariance to geant4e covariance.
Definition at line 1133 of file TrackExtrapolateG4e.cc.
|
private |
Convert the phasespace covariance to geant4e covariance.
Definition at line 1080 of file TrackExtrapolateG4e.cc.
|
static |
Get the singleton's address.
Definition at line 72 of file TrackExtrapolateG4e.cc.
|
private |
Get the start point for a new reconstructed track with specific PDG hypothesis.
Definition at line 938 of file TrackExtrapolateG4e.cc.
|
private |
Get the physical volume information for a geant4 physical volume.
Definition at line 852 of file TrackExtrapolateG4e.cc.
void initialize | ( | double | meanDt, |
double | maxDt, | ||
double | maxSeparation, | ||
double | maxKLMTrackClusterDistance, | ||
double | maxECLTrackClusterDistance, | ||
double | minPt, | ||
double | minKE, | ||
bool | addHitsToRecoTrack, | ||
std::vector< Const::ChargedStable > & | hypotheses | ||
) |
Initialize for track extrapolation by the MUID module.
meanDt | Mean value of the in-time window (ns). |
maxDt | Half-width of the in-time window (ns). |
maxSeparation | Maximum separation between track crossing and matching hit in detector plane (number of sigmas). |
maxKLMTrackClusterDistance | Maximum distance between associated track and KLMCluster (cm), criterion for matching relation Track->KLMCluster on MDST. |
maxECLTrackClusterDistance | Maximum distance between associated track and ECLCluster (cm). |
minPt | Minimum transverse momentum to begin extrapolation (GeV/c). |
minKE | Minimum kinetic energy to continue extrapolation (GeV/c). |
addHitsToRecoTrack | Parameter to add the found hits also to the reco tracks or not. Is turned off by default. |
hypotheses | Vector of charged-particle hypotheses used in extrapolation of each track. |
Definition at line 191 of file TrackExtrapolateG4e.cc.
void initialize | ( | double | minPt, |
double | minKE, | ||
std::vector< Const::ChargedStable > & | hypotheses | ||
) |
Initialize for track extrapolation by the EXT module.
minPt | Minimum transverse momentum to begin extrapolation (GeV/c). |
minKE | Minimum kinetic energy to continue extrapolation (GeV/c). |
hypotheses | Vector of charged-particle hypotheses used in extrapolation of each track. |
Definition at line 138 of file TrackExtrapolateG4e.cc.
|
private |
Register the list of geant4 physical volumes whose entry/exit points will be saved during extrapolation.
Definition at line 788 of file TrackExtrapolateG4e.cc.
|
private |
Swim a single track (EXT) until it stops or leaves the target cylinder.
Definition at line 707 of file TrackExtrapolateG4e.cc.
|
private |
Swim a single track (MUID) until it stops or leaves the target cylinder.
Definition at line 488 of file TrackExtrapolateG4e.cc.
void terminate | ( | bool | flag | ) |
Terminates this singleton.
flag | True if called by Muid module, false if called by Ext module. |
Definition at line 417 of file TrackExtrapolateG4e.cc.
|
private |
Parameter to add the found hits also to the reco tracks or not. Is turned off by default.
Definition at line 421 of file TrackExtrapolateG4e.h.
|
private |
half-length (cm) of the barrel
Definition at line 372 of file TrackExtrapolateG4e.h.
|
private |
maximum radius (cm) of the barrel
Definition at line 366 of file TrackExtrapolateG4e.h.
|
private |
minimum radius (cm) of the barrel
Definition at line 369 of file TrackExtrapolateG4e.h.
|
private |
hit-plane radius (cm) at closest distance to IP of each barrel end | sector | layer
Definition at line 387 of file TrackExtrapolateG4e.h.
|
private |
Number of barrel sectors.
Definition at line 363 of file TrackExtrapolateG4e.h.
|
private |
BKLM RPC phi-measuring strip position variance (cm^2) by layer.
Definition at line 378 of file TrackExtrapolateG4e.h.
|
private |
BKLM scintillator strip position variance (cm^2)
Definition at line 384 of file TrackExtrapolateG4e.h.
|
private |
normal unit vector of each barrel sector
Definition at line 391 of file TrackExtrapolateG4e.h.
|
private |
azimuthal unit vector of each barrel sector
Definition at line 394 of file TrackExtrapolateG4e.h.
|
private |
BKLM RPC z-measuring strip position variance (cm^2) by layer.
Definition at line 381 of file TrackExtrapolateG4e.h.
|
private |
Conditions-database object for beam pipe geometry.
Definition at line 354 of file TrackExtrapolateG4e.h.
|
private |
Pointers to BKLM geant4 sensitive (physical) volumes.
Definition at line 342 of file TrackExtrapolateG4e.h.
|
private |
Conditions-database object for COIL geometry.
Definition at line 351 of file TrackExtrapolateG4e.h.
|
private |
Default ChargedStable hypotheses (needed as call argument but not used)
Definition at line 336 of file TrackExtrapolateG4e.h.
|
private |
ECL clusters.
Definition at line 445 of file TrackExtrapolateG4e.h.
|
private |
EKLM element numbers.
Definition at line 427 of file TrackExtrapolateG4e.h.
|
private |
EKLM transformation data.
Definition at line 433 of file TrackExtrapolateG4e.h.
|
private |
half-length (cm) of either endcap
Definition at line 406 of file TrackExtrapolateG4e.h.
|
private |
maximum radius (cm) of the endcaps
Definition at line 397 of file TrackExtrapolateG4e.h.
|
private |
midpoint along z (cm) of the forward endcap from the KLM midpoint
Definition at line 403 of file TrackExtrapolateG4e.h.
|
private |
minimum radius (cm) of the endcaps
Definition at line 400 of file TrackExtrapolateG4e.h.
|
private |
hit-plane z (cm) of each IP layer relative to KLM midpoint
Definition at line 418 of file TrackExtrapolateG4e.h.
|
private |
EKLM scintillator strip position variance (cm^2)
Definition at line 415 of file TrackExtrapolateG4e.h.
|
private |
Pointers to geant4 physical volumes whose entry/exit points will be saved.
Definition at line 339 of file TrackExtrapolateG4e.h.
|
private |
Ext hits.
Definition at line 448 of file TrackExtrapolateG4e.h.
|
private |
Flag to indicate that EXT initialize() has been called.
Definition at line 297 of file TrackExtrapolateG4e.h.
|
private |
Pointer to the ExtManager singleton.
Definition at line 327 of file TrackExtrapolateG4e.h.
|
private |
ChargedStable hypotheses for EXT.
Definition at line 330 of file TrackExtrapolateG4e.h.
|
private |
ChargedStable hypotheses for MUID.
Definition at line 333 of file TrackExtrapolateG4e.h.
|
private |
Conditions-database object for KLM channel status.
Definition at line 436 of file TrackExtrapolateG4e.h.
|
private |
KLM clusters.
Definition at line 454 of file TrackExtrapolateG4e.h.
|
private |
KLM element numbers.
Definition at line 430 of file TrackExtrapolateG4e.h.
|
private |
KLM 2d hits.
Definition at line 451 of file TrackExtrapolateG4e.h.
|
private |
Conditions-database object for KLM likelihood parameters.
Definition at line 442 of file TrackExtrapolateG4e.h.
|
private |
KLM muid hits.
Definition at line 457 of file TrackExtrapolateG4e.h.
|
private |
KLM muid likelihoods.
Definition at line 460 of file TrackExtrapolateG4e.h.
|
private |
Conditions-database object for KLM strip efficiency.
Definition at line 439 of file TrackExtrapolateG4e.h.
|
private |
Magnetic field z component (gauss) at origin.
Definition at line 309 of file TrackExtrapolateG4e.h.
|
private |
user-defined maximum squared-distance (in number of variances) for matching hit to extrapolation
Definition at line 312 of file TrackExtrapolateG4e.h.
|
private |
Coincidence window half-width for in-time KLM hits (ns)
Definition at line 306 of file TrackExtrapolateG4e.h.
|
private |
user-defined maximum distance (mm) between ECLCluster and associated track (for EID)
Definition at line 318 of file TrackExtrapolateG4e.h.
|
private |
user-defined maximum distance (mm) between KLMCluster and associated track (for KLID)
Definition at line 315 of file TrackExtrapolateG4e.h.
|
private |
Mean hit - trigger time (ns)
Definition at line 303 of file TrackExtrapolateG4e.h.
|
private |
Minimum kinetic energy in MeV for extrapolation to continue.
Definition at line 324 of file TrackExtrapolateG4e.h.
|
private |
Minimum transverse momentum in MeV/c for extrapolation to be started.
Definition at line 321 of file TrackExtrapolateG4e.h.
|
private |
Minimum squared radius (cm) outside of which extrapolation will continue.
Definition at line 357 of file TrackExtrapolateG4e.h.
|
private |
PDF for the charged final state particle hypotheses.
Definition at line 424 of file TrackExtrapolateG4e.h.
|
private |
Flag to indicate that MUID initialize() has been called.
Definition at line 300 of file TrackExtrapolateG4e.h.
|
private |
offset (cm) along z axis of KLM midpoint from IP
Definition at line 360 of file TrackExtrapolateG4e.h.
|
private |
outermost backward-endcap layer that is active for muon identification (user-defined)
Definition at line 412 of file TrackExtrapolateG4e.h.
|
private |
outermost barrel layer that is active for muon identification (user-defined)
Definition at line 375 of file TrackExtrapolateG4e.h.
|
private |
outermost forward-endcap layer that is active for muon identification (user-defined)
Definition at line 409 of file TrackExtrapolateG4e.h.
|
private |
Reco tracks.
Definition at line 463 of file TrackExtrapolateG4e.h.
|
staticprivate |
Stores pointer to the singleton class.
Definition at line 294 of file TrackExtrapolateG4e.h.
|
private |
virtual "target" cylinder for EXT (boundary beyond which extrapolation ends)
Definition at line 345 of file TrackExtrapolateG4e.h.
|
private |
virtual "target" cylinder for MUID (boundary beyond which extrapolation ends)
Definition at line 348 of file TrackExtrapolateG4e.h.
|
private |
Track cluster separation.
Definition at line 469 of file TrackExtrapolateG4e.h.
|
private |
Tracks.
Definition at line 466 of file TrackExtrapolateG4e.h.