CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
TrackInformation Class Reference

#include <TrackInformation.h>

Inheritance diagram for TrackInformation:

Public Member Functions

bool caloIDChecked () const
 
double caloSurfaceParticleP () const
 
int caloSurfaceParticlePID () const
 
bool crossedBoundary () const
 
double genParticleP () const
 
int genParticlePID () const
 
int getCastorHitPID () const
 
int getIDCaloVolume () const
 
int getIDLastVolume () const
 
int getIDonCaloSurface () const
 
const math::XYZTLorentzVectorFgetMomentumAtBoundary () const
 
const math::XYZTLorentzVectorFgetPositionAtBoundary () const
 
bool hasCastorHit () const
 
bool hasHits () const
 
bool isAncestor () const
 
bool isGeneratedSecondary () const
 
bool isInHistory () const
 
bool isPrimary () const
 
void operator delete (void *TrackInformation)
 
void * operator new (size_t)
 
void Print () const override
 
void putInHistory ()
 
void setAncestor ()
 
void setCaloIDChecked (bool f)
 
void setCaloSurfaceParticleP (double p)
 
void setCaloSurfaceParticlePID (int id)
 
void setCastorHitPID (const int pid)
 
void setCrossedBoundary (const G4Track *track)
 
void setGeneratedSecondary (bool v)
 
void setGenParticleP (double p)
 
void setGenParticlePID (int id)
 
void setHasHits (bool v)
 
void setIDonCaloSurface (int id, int ical, int last, int pdgID, double p)
 
void setPrimary (bool v)
 
void setStartedInFineVolume (bool flag=true)
 
void setStoreTrack ()
 can only be set to true, cannot be reset to false! More...
 
bool startedInFineVolume () const
 
bool startedInFineVolumeIsSet ()
 
bool storeTrack () const
 
 ~TrackInformation () override=default
 

Private Member Functions

 TrackInformation ()
 

Private Attributes

bool caloIDChecked_
 
double caloSurfaceParticleP_
 
int caloSurfaceParticlePID_
 
int castorHitPID_
 
bool crossedBoundary_
 
bool flagAncestor_
 
double genParticleP_
 
int genParticlePID_
 
bool hasCastorHit_
 
bool hasHits_
 
int idCaloVolume_
 
int idLastVolume_
 
int idOnCaloSurface_
 
bool isGeneratedSecondary_
 
bool isInHistory_
 
bool isPrimary_
 
math::XYZTLorentzVectorF momentumAtBoundary_
 
math::XYZTLorentzVectorF positionAtBoundary_
 
bool startedInFineVolume_
 
bool startedInFineVolumeIsSet_
 
bool storeTrack_
 

Friends

class NewTrackAction
 

Detailed Description

Definition at line 10 of file TrackInformation.h.

Constructor & Destructor Documentation

◆ ~TrackInformation()

TrackInformation::~TrackInformation ( )
overridedefault

◆ TrackInformation()

TrackInformation::TrackInformation ( )
inlineprivate

Definition at line 109 of file TrackInformation.h.

110  : G4VUserTrackInformation(),
111  storeTrack_(false),
112  isPrimary_(false),
113  hasHits_(false),
114  isGeneratedSecondary_(false),
115  isInHistory_(false),
116  flagAncestor_(false),
117  idOnCaloSurface_(0),
118  idCaloVolume_(-1),
119  idLastVolume_(-1),
120  caloIDChecked_(false),
121  crossedBoundary_(false),
122  startedInFineVolume_(false),
124  genParticlePID_(-1),
126  genParticleP_(0),
128  hasCastorHit_(false),
129  castorHitPID_(0) {}

Member Function Documentation

◆ caloIDChecked()

bool TrackInformation::caloIDChecked ( ) const
inline

Definition at line 49 of file TrackInformation.h.

References caloIDChecked_.

Referenced by Print(), and CaloTrkProcessing::update().

49 { return caloIDChecked_; }

◆ caloSurfaceParticleP()

double TrackInformation::caloSurfaceParticleP ( ) const
inline

Definition at line 53 of file TrackInformation.h.

References caloSurfaceParticleP_.

Referenced by NewTrackAction::addUserInfoToSecondary().

53 { return caloSurfaceParticleP_; }

◆ caloSurfaceParticlePID()

int TrackInformation::caloSurfaceParticlePID ( ) const
inline

Definition at line 51 of file TrackInformation.h.

References caloSurfaceParticlePID_.

Referenced by NewTrackAction::addUserInfoToSecondary().

◆ crossedBoundary()

bool TrackInformation::crossedBoundary ( ) const
inline

◆ genParticleP()

double TrackInformation::genParticleP ( ) const
inline

Definition at line 71 of file TrackInformation.h.

References genParticleP_.

Referenced by NewTrackAction::addUserInfoToSecondary(), and CaloSD::getResponseWt().

71 { return genParticleP_; }

◆ genParticlePID()

int TrackInformation::genParticlePID ( ) const
inline

◆ getCastorHitPID()

int TrackInformation::getCastorHitPID ( ) const
inline

Definition at line 81 of file TrackInformation.h.

References castorHitPID_.

Referenced by NewTrackAction::addUserInfoToSecondary(), and CastorSD::getEnergyDeposit().

81 { return castorHitPID_; }

◆ getIDCaloVolume()

int TrackInformation::getIDCaloVolume ( ) const
inline

Definition at line 47 of file TrackInformation.h.

References idCaloVolume_.

Referenced by NewTrackAction::addUserInfoToSecondary(), and CaloTrkProcessing::update().

47 { return idCaloVolume_; }

◆ getIDLastVolume()

int TrackInformation::getIDLastVolume ( ) const
inline

Definition at line 48 of file TrackInformation.h.

References idLastVolume_.

Referenced by NewTrackAction::addUserInfoToSecondary(), and CaloTrkProcessing::update().

48 { return idLastVolume_; }

◆ getIDonCaloSurface()

int TrackInformation::getIDonCaloSurface ( ) const
inline

◆ getMomentumAtBoundary()

const math::XYZTLorentzVectorF& TrackInformation::getMomentumAtBoundary ( ) const
inline

Definition at line 60 of file TrackInformation.h.

References momentumAtBoundary_.

Referenced by TrackingAction::PostUserTrackingAction().

60 { return momentumAtBoundary_; }
math::XYZTLorentzVectorF momentumAtBoundary_

◆ getPositionAtBoundary()

const math::XYZTLorentzVectorF& TrackInformation::getPositionAtBoundary ( ) const
inline

Definition at line 59 of file TrackInformation.h.

References positionAtBoundary_.

Referenced by TrackingAction::PostUserTrackingAction().

59 { return positionAtBoundary_; }
math::XYZTLorentzVectorF positionAtBoundary_

◆ hasCastorHit()

bool TrackInformation::hasCastorHit ( ) const
inline

◆ hasHits()

bool TrackInformation::hasHits ( ) const
inline

Definition at line 26 of file TrackInformation.h.

References hasHits_.

26 { return hasHits_; }

◆ isAncestor()

bool TrackInformation::isAncestor ( ) const
inline

Definition at line 35 of file TrackInformation.h.

References flagAncestor_.

Referenced by TrackingAction::PostUserTrackingAction().

35 { return flagAncestor_; }

◆ isGeneratedSecondary()

bool TrackInformation::isGeneratedSecondary ( ) const
inline

Definition at line 29 of file TrackInformation.h.

References isGeneratedSecondary_.

29 { return isGeneratedSecondary_; }

◆ isInHistory()

bool TrackInformation::isInHistory ( ) const
inline

Definition at line 32 of file TrackInformation.h.

References isInHistory_.

Referenced by TrackingAction::PostUserTrackingAction().

32 { return isInHistory_; }

◆ isPrimary()

bool TrackInformation::isPrimary ( ) const
inline

◆ operator delete()

void TrackInformation::operator delete ( void *  TrackInformation)
inline

Definition at line 141 of file TrackInformation.h.

References fpTrackInformationAllocator.

141  {
142  fpTrackInformationAllocator->FreeSingle((TrackInformation *)trkInfo);
143 }
G4ThreadLocal G4Allocator< TrackInformation > * fpTrackInformationAllocator

◆ operator new()

void * TrackInformation::operator new ( size_t  )
inline

Definition at line 135 of file TrackInformation.h.

References fpTrackInformationAllocator.

135  {
137  fpTrackInformationAllocator = new G4Allocator<TrackInformation>;
138  return (void *)fpTrackInformationAllocator->MallocSingle();
139 }
G4ThreadLocal G4Allocator< TrackInformation > * fpTrackInformationAllocator

◆ Print()

void TrackInformation::Print ( void  ) const
override

Definition at line 24 of file TrackInformation.cc.

References caloIDChecked(), getIDonCaloSurface(), hasHits_, idCaloVolume_, idLastVolume_, isGeneratedSecondary_, isInHistory_, isPrimary_, LogDebug, and storeTrack_.

24  {
25  LogDebug("TrackInformation") << " TrackInformation : storeTrack = " << storeTrack_ << "\n"
26  << " hasHits = " << hasHits_ << "\n"
27  << " isPrimary = " << isPrimary_ << "\n"
28  << " isGeneratedSecondary = " << isGeneratedSecondary_ << "\n"
29  << " isInHistory = " << isInHistory_ << "\n"
30  << " idOnCaloSurface = " << getIDonCaloSurface() << "\n"
31  << " caloIDChecked = " << caloIDChecked() << "\n"
32  << " idCaloVolume = " << idCaloVolume_ << "\n"
33  << " idLastVolume = " << idLastVolume_;
34 }
bool caloIDChecked() const
int getIDonCaloSurface() const
#define LogDebug(id)

◆ putInHistory()

void TrackInformation::putInHistory ( )
inline

◆ setAncestor()

void TrackInformation::setAncestor ( )
inline

Definition at line 36 of file TrackInformation.h.

References flagAncestor_.

36 { flagAncestor_ = true; }

◆ setCaloIDChecked()

void TrackInformation::setCaloIDChecked ( bool  f)
inline

Definition at line 50 of file TrackInformation.h.

References caloIDChecked_, and f.

Referenced by CaloTrkProcessing::update().

50 { caloIDChecked_ = f; }
double f[11][100]

◆ setCaloSurfaceParticleP()

void TrackInformation::setCaloSurfaceParticleP ( double  p)
inline

◆ setCaloSurfaceParticlePID()

void TrackInformation::setCaloSurfaceParticlePID ( int  id)
inline

◆ setCastorHitPID()

void TrackInformation::setCastorHitPID ( const int  pid)
inline

◆ setCrossedBoundary()

void TrackInformation::setCrossedBoundary ( const G4Track *  track)

Definition at line 11 of file TrackInformation.cc.

References crossedBoundary_, invgev, momentumAtBoundary_, AlCaHLTBitMon_ParallelJobs::p, positionAtBoundary_, edm::second(), HLT_2022v15_cff::track, and findQualityFiles::v.

Referenced by CaloTrkProcessing::update(), and SteppingAction::UserSteppingAction().

11  {
12  const double invcm = 1.0 / CLHEP::cm;
13  const double invgev = 1.0 / CLHEP::GeV;
14  const double invsec = 1.0 / CLHEP::second;
15  crossedBoundary_ = true;
16  const G4ThreeVector& v = track->GetPosition();
18  math::XYZTLorentzVectorF(v.x() * invcm, v.y() * invcm, v.z() * invcm, track->GetGlobalTime() * invsec);
19  const G4ThreeVector& p = track->GetMomentum();
21  math::XYZTLorentzVectorF(p.x() * invgev, p.y() * invgev, p.z() * invgev, track->GetTotalEnergy() * invgev);
22 }
math::XYZTLorentzVectorF momentumAtBoundary_
U second(std::pair< T, U > const &p)
static const float invgev
Definition: TimingSD.cc:32
math::XYZTLorentzVectorF positionAtBoundary_
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:22

◆ setGeneratedSecondary()

void TrackInformation::setGeneratedSecondary ( bool  v)
inline

◆ setGenParticleP()

void TrackInformation::setGenParticleP ( double  p)
inline

◆ setGenParticlePID()

void TrackInformation::setGenParticlePID ( int  id)
inline

◆ setHasHits()

void TrackInformation::setHasHits ( bool  v)
inline

Definition at line 27 of file TrackInformation.h.

References hasHits_, and findQualityFiles::v.

◆ setIDonCaloSurface()

void TrackInformation::setIDonCaloSurface ( int  id,
int  ical,
int  last,
int  pdgID,
double  p 
)
inline

◆ setPrimary()

void TrackInformation::setPrimary ( bool  v)
inline

◆ setStartedInFineVolume()

void TrackInformation::setStartedInFineVolume ( bool  flag = true)
inline

◆ setStoreTrack()

void TrackInformation::setStoreTrack ( )
inline

can only be set to true, cannot be reset to false!

Definition at line 18 of file TrackInformation.h.

References isInHistory_, and storeTrack_.

Referenced by NewTrackAction::addUserInfoToPrimary(), NewTrackAction::addUserInfoToSecondary(), CaloSD::createNewHit(), CaloSD::findBoundaryCrossingParent(), and DBremWatcher::update().

18  {
19  storeTrack_ = true;
20  isInHistory_ = true;
21  }

◆ startedInFineVolume()

bool TrackInformation::startedInFineVolume ( ) const
inline

Definition at line 61 of file TrackInformation.h.

References startedInFineVolume_.

Referenced by CaloTrkProcessing::update().

61 { return startedInFineVolume_; }

◆ startedInFineVolumeIsSet()

bool TrackInformation::startedInFineVolumeIsSet ( )
inline

Definition at line 66 of file TrackInformation.h.

References startedInFineVolumeIsSet_.

Referenced by CaloTrkProcessing::update().

66 { return startedInFineVolumeIsSet_; }

◆ storeTrack()

bool TrackInformation::storeTrack ( ) const
inline

Friends And Related Function Documentation

◆ NewTrackAction

friend class NewTrackAction
friend

Definition at line 130 of file TrackInformation.h.

Member Data Documentation

◆ caloIDChecked_

bool TrackInformation::caloIDChecked_
private

Definition at line 95 of file TrackInformation.h.

Referenced by caloIDChecked(), and setCaloIDChecked().

◆ caloSurfaceParticleP_

double TrackInformation::caloSurfaceParticleP_
private

◆ caloSurfaceParticlePID_

int TrackInformation::caloSurfaceParticlePID_
private

◆ castorHitPID_

int TrackInformation::castorHitPID_
private

Definition at line 106 of file TrackInformation.h.

Referenced by getCastorHitPID(), and setCastorHitPID().

◆ crossedBoundary_

bool TrackInformation::crossedBoundary_
private

Definition at line 96 of file TrackInformation.h.

Referenced by crossedBoundary(), and setCrossedBoundary().

◆ flagAncestor_

bool TrackInformation::flagAncestor_
private

Definition at line 91 of file TrackInformation.h.

Referenced by isAncestor(), and setAncestor().

◆ genParticleP_

double TrackInformation::genParticleP_
private

Definition at line 103 of file TrackInformation.h.

Referenced by genParticleP(), and setGenParticleP().

◆ genParticlePID_

int TrackInformation::genParticlePID_
private

Definition at line 102 of file TrackInformation.h.

Referenced by genParticlePID(), and setGenParticlePID().

◆ hasCastorHit_

bool TrackInformation::hasCastorHit_
private

Definition at line 105 of file TrackInformation.h.

Referenced by hasCastorHit(), and setCastorHitPID().

◆ hasHits_

bool TrackInformation::hasHits_
private

Definition at line 88 of file TrackInformation.h.

Referenced by hasHits(), Print(), and setHasHits().

◆ idCaloVolume_

int TrackInformation::idCaloVolume_
private

Definition at line 93 of file TrackInformation.h.

Referenced by getIDCaloVolume(), Print(), and setIDonCaloSurface().

◆ idLastVolume_

int TrackInformation::idLastVolume_
private

Definition at line 94 of file TrackInformation.h.

Referenced by getIDLastVolume(), Print(), and setIDonCaloSurface().

◆ idOnCaloSurface_

int TrackInformation::idOnCaloSurface_
private

Definition at line 92 of file TrackInformation.h.

Referenced by getIDonCaloSurface(), and setIDonCaloSurface().

◆ isGeneratedSecondary_

bool TrackInformation::isGeneratedSecondary_
private

Definition at line 89 of file TrackInformation.h.

Referenced by isGeneratedSecondary(), Print(), and setGeneratedSecondary().

◆ isInHistory_

bool TrackInformation::isInHistory_
private

Definition at line 90 of file TrackInformation.h.

Referenced by isInHistory(), Print(), putInHistory(), and setStoreTrack().

◆ isPrimary_

bool TrackInformation::isPrimary_
private

Definition at line 87 of file TrackInformation.h.

Referenced by isPrimary(), Print(), and setPrimary().

◆ momentumAtBoundary_

math::XYZTLorentzVectorF TrackInformation::momentumAtBoundary_
private

Definition at line 98 of file TrackInformation.h.

Referenced by getMomentumAtBoundary(), and setCrossedBoundary().

◆ positionAtBoundary_

math::XYZTLorentzVectorF TrackInformation::positionAtBoundary_
private

Definition at line 97 of file TrackInformation.h.

Referenced by getPositionAtBoundary(), and setCrossedBoundary().

◆ startedInFineVolume_

bool TrackInformation::startedInFineVolume_
private

Definition at line 99 of file TrackInformation.h.

Referenced by setStartedInFineVolume(), and startedInFineVolume().

◆ startedInFineVolumeIsSet_

bool TrackInformation::startedInFineVolumeIsSet_
private

Definition at line 100 of file TrackInformation.h.

Referenced by setStartedInFineVolume(), and startedInFineVolumeIsSet().

◆ storeTrack_

bool TrackInformation::storeTrack_
private

Definition at line 86 of file TrackInformation.h.

Referenced by Print(), setStoreTrack(), and storeTrack().