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
 
void hasHits (bool v)
 
bool isAncestor () const
 
bool isGeneratedSecondary () const
 
void isGeneratedSecondary (bool v)
 
bool isInHistory () const
 
bool isPrimary () const
 
void isPrimary (bool v)
 
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 setGenParticleP (double p)
 
void setGenParticlePID (int id)
 
void setIDonCaloSurface (int id, int ical, int last, int pdgID, double p)
 
void setStartedInFineVolume (bool flag=true)
 
bool startedInFineVolume () const
 
bool startedInFineVolumeIsSet ()
 
bool storeTrack () const
 
void storeTrack (bool v)
 can only be set to true, cannot be reset to false! More...
 
 ~TrackInformation () override
 

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 12 of file TrackInformation.h.

Constructor & Destructor Documentation

◆ ~TrackInformation()

TrackInformation::~TrackInformation ( )
inlineoverride

Definition at line 14 of file TrackInformation.h.

14 {}

◆ TrackInformation()

TrackInformation::TrackInformation ( )
inlineprivate

Definition at line 123 of file TrackInformation.h.

124  : G4VUserTrackInformation(),
125  storeTrack_(false),
126  isPrimary_(false),
127  hasHits_(false),
128  isGeneratedSecondary_(false),
129  isInHistory_(false),
130  flagAncestor_(false),
131  idOnCaloSurface_(0),
132  idCaloVolume_(-1),
133  idLastVolume_(-1),
134  caloIDChecked_(false),
135  crossedBoundary_(false),
136  startedInFineVolume_(false),
138  genParticlePID_(-1),
140  genParticleP_(0),
142  hasCastorHit_(false),
143  castorHitPID_(0) {}

Member Function Documentation

◆ caloIDChecked()

bool TrackInformation::caloIDChecked ( ) const
inline

Definition at line 53 of file TrackInformation.h.

References caloIDChecked_.

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

53 { return caloIDChecked_; }

◆ caloSurfaceParticleP()

double TrackInformation::caloSurfaceParticleP ( ) const
inline

Definition at line 57 of file TrackInformation.h.

References caloSurfaceParticleP_.

Referenced by NewTrackAction::addUserInfoToSecondary().

57 { return caloSurfaceParticleP_; }

◆ caloSurfaceParticlePID()

int TrackInformation::caloSurfaceParticlePID ( ) const
inline

Definition at line 55 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 85 of file TrackInformation.h.

References genParticleP_.

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

85 { return genParticleP_; }

◆ genParticlePID()

int TrackInformation::genParticlePID ( ) const
inline

◆ getCastorHitPID()

int TrackInformation::getCastorHitPID ( ) const
inline

Definition at line 95 of file TrackInformation.h.

References castorHitPID_.

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

95 { return castorHitPID_; }

◆ getIDCaloVolume()

int TrackInformation::getIDCaloVolume ( ) const
inline

Definition at line 51 of file TrackInformation.h.

References idCaloVolume_.

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

51 { return idCaloVolume_; }

◆ getIDLastVolume()

int TrackInformation::getIDLastVolume ( ) const
inline

Definition at line 52 of file TrackInformation.h.

References idLastVolume_.

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

52 { return idLastVolume_; }

◆ getIDonCaloSurface()

int TrackInformation::getIDonCaloSurface ( ) const
inline

◆ getMomentumAtBoundary()

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

Definition at line 74 of file TrackInformation.h.

References momentumAtBoundary_.

Referenced by TrackingAction::PostUserTrackingAction().

74 { return momentumAtBoundary_; }
math::XYZTLorentzVectorF momentumAtBoundary_

◆ getPositionAtBoundary()

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

Definition at line 73 of file TrackInformation.h.

References positionAtBoundary_.

Referenced by TrackingAction::PostUserTrackingAction().

73 { return positionAtBoundary_; }
math::XYZTLorentzVectorF positionAtBoundary_

◆ hasCastorHit()

bool TrackInformation::hasCastorHit ( ) const
inline

◆ hasHits() [1/2]

bool TrackInformation::hasHits ( ) const
inline

Definition at line 30 of file TrackInformation.h.

References hasHits_.

30 { return hasHits_; }

◆ hasHits() [2/2]

void TrackInformation::hasHits ( bool  v)
inline

Definition at line 31 of file TrackInformation.h.

References hasHits_, and findQualityFiles::v.

◆ isAncestor()

bool TrackInformation::isAncestor ( ) const
inline

Definition at line 39 of file TrackInformation.h.

References flagAncestor_.

39 { return flagAncestor_; }

◆ isGeneratedSecondary() [1/2]

bool TrackInformation::isGeneratedSecondary ( ) const
inline

Definition at line 33 of file TrackInformation.h.

References isGeneratedSecondary_.

33 { return isGeneratedSecondary_; }

◆ isGeneratedSecondary() [2/2]

void TrackInformation::isGeneratedSecondary ( bool  v)
inline

◆ isInHistory()

bool TrackInformation::isInHistory ( ) const
inline

Definition at line 36 of file TrackInformation.h.

References isInHistory_.

36 { return isInHistory_; }

◆ isPrimary() [1/2]

bool TrackInformation::isPrimary ( ) const
inline

◆ isPrimary() [2/2]

void TrackInformation::isPrimary ( bool  v)
inline

Definition at line 28 of file TrackInformation.h.

References isPrimary_, and findQualityFiles::v.

◆ operator delete()

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

Definition at line 155 of file TrackInformation.h.

References fpTrackInformationAllocator.

155  {
156  fpTrackInformationAllocator->FreeSingle((TrackInformation *)trkInfo);
157 }
G4ThreadLocal G4Allocator< TrackInformation > * fpTrackInformationAllocator

◆ operator new()

void * TrackInformation::operator new ( size_t  )
inline

Definition at line 149 of file TrackInformation.h.

References fpTrackInformationAllocator.

149  {
151  fpTrackInformationAllocator = new G4Allocator<TrackInformation>;
152  return (void *)fpTrackInformationAllocator->MallocSingle();
153 }
G4ThreadLocal G4Allocator< TrackInformation > * fpTrackInformationAllocator

◆ Print()

void TrackInformation::Print ( void  ) const
override

Definition at line 8 of file TrackInformation.cc.

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

8  {
9  LogDebug("TrackInformation") << " TrackInformation : storeTrack = " << storeTrack_ << "\n"
10  << " hasHits = " << hasHits_ << "\n"
11  << " isPrimary = " << isPrimary_ << "\n"
12  << " isGeneratedSecondary = " << isGeneratedSecondary_ << "\n"
13  << " isInHistory = " << isInHistory_ << "\n"
14  << " idOnCaloSurface = " << getIDonCaloSurface() << "\n"
15  << " caloIDChecked = " << caloIDChecked() << "\n"
16  << " idCaloVolume = " << idCaloVolume_ << "\n"
17  << " idLastVolume = " << idLastVolume_;
18 }
bool caloIDChecked() const
int getIDonCaloSurface() const
#define LogDebug(id)

◆ putInHistory()

void TrackInformation::putInHistory ( )
inline

◆ setAncestor()

void TrackInformation::setAncestor ( )
inline

Definition at line 40 of file TrackInformation.h.

References flagAncestor_.

40 { flagAncestor_ = true; }

◆ setCaloIDChecked()

void TrackInformation::setCaloIDChecked ( bool  f)
inline

Definition at line 54 of file TrackInformation.h.

References caloIDChecked_, and f.

Referenced by CaloTrkProcessing::update().

54 { 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)
inline

Definition at line 61 of file TrackInformation.h.

References crossedBoundary_, momentumAtBoundary_, positionAtBoundary_, and HLT_2022v12_cff::track.

Referenced by CaloTrkProcessing::update().

61  {
62  crossedBoundary_ = true;
63  positionAtBoundary_ = math::XYZTLorentzVectorF(track->GetPosition().x() / CLHEP::cm,
64  track->GetPosition().y() / CLHEP::cm,
65  track->GetPosition().z() / CLHEP::cm,
66  track->GetGlobalTime());
67  momentumAtBoundary_ = math::XYZTLorentzVectorF(track->GetMomentum().x() / CLHEP::GeV,
68  track->GetMomentum().y() / CLHEP::GeV,
69  track->GetMomentum().z() / CLHEP::GeV,
70  track->GetKineticEnergy() / CLHEP::GeV);
71  }
math::XYZTLorentzVectorF momentumAtBoundary_
math::XYZTLorentzVectorF positionAtBoundary_
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:22

◆ setGenParticleP()

void TrackInformation::setGenParticleP ( double  p)
inline

◆ setGenParticlePID()

void TrackInformation::setGenParticlePID ( int  id)
inline

◆ setIDonCaloSurface()

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

◆ setStartedInFineVolume()

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

◆ startedInFineVolume()

bool TrackInformation::startedInFineVolume ( ) const
inline

Definition at line 75 of file TrackInformation.h.

References startedInFineVolume_.

Referenced by CaloTrkProcessing::update().

75 { return startedInFineVolume_; }

◆ startedInFineVolumeIsSet()

bool TrackInformation::startedInFineVolumeIsSet ( )
inline

Definition at line 80 of file TrackInformation.h.

References startedInFineVolumeIsSet_.

Referenced by CaloTrkProcessing::update().

80 { return startedInFineVolumeIsSet_; }

◆ storeTrack() [1/2]

bool TrackInformation::storeTrack ( ) const
inline

◆ storeTrack() [2/2]

void TrackInformation::storeTrack ( bool  v)
inline

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

Definition at line 20 of file TrackInformation.h.

References putInHistory(), storeTrack_, and findQualityFiles::v.

20  {
21  if (v)
22  storeTrack_ = v;
23  if (v == true)
24  putInHistory();
25  }

Friends And Related Function Documentation

◆ NewTrackAction

friend class NewTrackAction
friend

Definition at line 144 of file TrackInformation.h.

Member Data Documentation

◆ caloIDChecked_

bool TrackInformation::caloIDChecked_
private

Definition at line 109 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 120 of file TrackInformation.h.

Referenced by getCastorHitPID(), and setCastorHitPID().

◆ crossedBoundary_

bool TrackInformation::crossedBoundary_
private

Definition at line 110 of file TrackInformation.h.

Referenced by crossedBoundary(), and setCrossedBoundary().

◆ flagAncestor_

bool TrackInformation::flagAncestor_
private

Definition at line 105 of file TrackInformation.h.

Referenced by isAncestor(), and setAncestor().

◆ genParticleP_

double TrackInformation::genParticleP_
private

Definition at line 117 of file TrackInformation.h.

Referenced by genParticleP(), and setGenParticleP().

◆ genParticlePID_

int TrackInformation::genParticlePID_
private

Definition at line 116 of file TrackInformation.h.

Referenced by genParticlePID(), and setGenParticlePID().

◆ hasCastorHit_

bool TrackInformation::hasCastorHit_
private

Definition at line 119 of file TrackInformation.h.

Referenced by hasCastorHit(), and setCastorHitPID().

◆ hasHits_

bool TrackInformation::hasHits_
private

Definition at line 102 of file TrackInformation.h.

Referenced by hasHits(), and Print().

◆ idCaloVolume_

int TrackInformation::idCaloVolume_
private

Definition at line 107 of file TrackInformation.h.

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

◆ idLastVolume_

int TrackInformation::idLastVolume_
private

Definition at line 108 of file TrackInformation.h.

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

◆ idOnCaloSurface_

int TrackInformation::idOnCaloSurface_
private

Definition at line 106 of file TrackInformation.h.

Referenced by getIDonCaloSurface(), and setIDonCaloSurface().

◆ isGeneratedSecondary_

bool TrackInformation::isGeneratedSecondary_
private

Definition at line 103 of file TrackInformation.h.

Referenced by isGeneratedSecondary(), and Print().

◆ isInHistory_

bool TrackInformation::isInHistory_
private

Definition at line 104 of file TrackInformation.h.

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

◆ isPrimary_

bool TrackInformation::isPrimary_
private

Definition at line 101 of file TrackInformation.h.

Referenced by isPrimary(), and Print().

◆ momentumAtBoundary_

math::XYZTLorentzVectorF TrackInformation::momentumAtBoundary_
private

Definition at line 112 of file TrackInformation.h.

Referenced by getMomentumAtBoundary(), and setCrossedBoundary().

◆ positionAtBoundary_

math::XYZTLorentzVectorF TrackInformation::positionAtBoundary_
private

Definition at line 111 of file TrackInformation.h.

Referenced by getPositionAtBoundary(), and setCrossedBoundary().

◆ startedInFineVolume_

bool TrackInformation::startedInFineVolume_
private

Definition at line 113 of file TrackInformation.h.

Referenced by setStartedInFineVolume(), and startedInFineVolume().

◆ startedInFineVolumeIsSet_

bool TrackInformation::startedInFineVolumeIsSet_
private

Definition at line 114 of file TrackInformation.h.

Referenced by setStartedInFineVolume(), and startedInFineVolumeIsSet().

◆ storeTrack_

bool TrackInformation::storeTrack_
private

Definition at line 100 of file TrackInformation.h.

Referenced by Print(), and storeTrack().