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 getIDAtBoundary () 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)
 
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_
 
bool idAtBoundary_
 
int idCaloVolume_
 
int idLastVolume_
 
int idOnCaloSurface_
 
bool isGeneratedSecondary_
 
bool isInHistory_
 
bool isPrimary_
 
math::XYZTLorentzVectorF momentumAtBoundary_
 
math::XYZTLorentzVectorF positionAtBoundary_
 
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 118 of file TrackInformation.h.

119  : G4VUserTrackInformation(),
120  storeTrack_(false),
121  isPrimary_(false),
122  hasHits_(false),
123  isGeneratedSecondary_(false),
124  isInHistory_(false),
125  flagAncestor_(false),
126  idOnCaloSurface_(0),
127  idCaloVolume_(-1),
128  idLastVolume_(-1),
129  caloIDChecked_(false),
130  crossedBoundary_(false),
131  genParticlePID_(-1),
133  genParticleP_(0),
135  hasCastorHit_(false),
136  castorHitPID_(0) {}

Member Function Documentation

◆ caloIDChecked()

bool TrackInformation::caloIDChecked ( ) const
inline

Definition at line 53 of file TrackInformation.h.

53 { return caloIDChecked_; }

References caloIDChecked_.

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

◆ caloSurfaceParticleP()

double TrackInformation::caloSurfaceParticleP ( ) const
inline

Definition at line 57 of file TrackInformation.h.

57 { return caloSurfaceParticleP_; }

References caloSurfaceParticleP_.

Referenced by NewTrackAction::addUserInfoToSecondary().

◆ caloSurfaceParticlePID()

int TrackInformation::caloSurfaceParticlePID ( ) const
inline

Definition at line 55 of file TrackInformation.h.

55 { return caloSurfaceParticlePID_; }

References caloSurfaceParticlePID_.

Referenced by NewTrackAction::addUserInfoToSecondary().

◆ crossedBoundary()

bool TrackInformation::crossedBoundary ( ) const
inline

Definition at line 73 of file TrackInformation.h.

73 { return crossedBoundary_; }

References crossedBoundary_.

Referenced by CaloSD::hitBookkeepingFineCalo(), and TrackingAction::PostUserTrackingAction().

◆ genParticleP()

double TrackInformation::genParticleP ( ) const
inline

Definition at line 81 of file TrackInformation.h.

81 { return genParticleP_; }

References genParticleP_.

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

◆ genParticlePID()

int TrackInformation::genParticlePID ( ) const
inline

◆ getCastorHitPID()

int TrackInformation::getCastorHitPID ( ) const
inline

Definition at line 91 of file TrackInformation.h.

91 { return castorHitPID_; }

References castorHitPID_.

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

◆ getIDAtBoundary()

int TrackInformation::getIDAtBoundary ( ) const
inline

Definition at line 76 of file TrackInformation.h.

76 { return idAtBoundary_; }

References idAtBoundary_.

◆ getIDCaloVolume()

int TrackInformation::getIDCaloVolume ( ) const
inline

Definition at line 51 of file TrackInformation.h.

51 { return idCaloVolume_; }

References idCaloVolume_.

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

◆ getIDLastVolume()

int TrackInformation::getIDLastVolume ( ) const
inline

Definition at line 52 of file TrackInformation.h.

52 { return idLastVolume_; }

References idLastVolume_.

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

◆ getIDonCaloSurface()

int TrackInformation::getIDonCaloSurface ( ) const
inline

◆ getMomentumAtBoundary()

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

Definition at line 75 of file TrackInformation.h.

75 { return momentumAtBoundary_; }

References momentumAtBoundary_.

Referenced by TrackingAction::PostUserTrackingAction().

◆ getPositionAtBoundary()

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

Definition at line 74 of file TrackInformation.h.

74 { return positionAtBoundary_; }

References positionAtBoundary_.

Referenced by TrackingAction::PostUserTrackingAction().

◆ hasCastorHit()

bool TrackInformation::hasCastorHit ( ) const
inline

◆ hasHits() [1/2]

bool TrackInformation::hasHits ( ) const
inline

Definition at line 30 of file TrackInformation.h.

30 { return hasHits_; }

References hasHits_.

◆ hasHits() [2/2]

void TrackInformation::hasHits ( bool  v)
inline

Definition at line 31 of file TrackInformation.h.

31 { hasHits_ = v; }

References hasHits_, and findQualityFiles::v.

◆ isAncestor()

bool TrackInformation::isAncestor ( ) const
inline

Definition at line 39 of file TrackInformation.h.

39 { return flagAncestor_; }

References flagAncestor_.

◆ isGeneratedSecondary() [1/2]

bool TrackInformation::isGeneratedSecondary ( ) const
inline

Definition at line 33 of file TrackInformation.h.

33 { return isGeneratedSecondary_; }

References isGeneratedSecondary_.

◆ isGeneratedSecondary() [2/2]

void TrackInformation::isGeneratedSecondary ( bool  v)
inline

Definition at line 34 of file TrackInformation.h.

References isGeneratedSecondary_, and findQualityFiles::v.

◆ isInHistory()

bool TrackInformation::isInHistory ( ) const
inline

Definition at line 36 of file TrackInformation.h.

36 { return isInHistory_; }

References 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.

28 { isPrimary_ = v; }

References isPrimary_, and findQualityFiles::v.

◆ operator delete()

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

Definition at line 148 of file TrackInformation.h.

148  {
149  fpTrackInformationAllocator->FreeSingle((TrackInformation *)trkInfo);
150 }

References fpTrackInformationAllocator.

◆ operator new()

void * TrackInformation::operator new ( size_t  )
inline

Definition at line 142 of file TrackInformation.h.

142  {
144  fpTrackInformationAllocator = new G4Allocator<TrackInformation>;
145  return (void *)fpTrackInformationAllocator->MallocSingle();
146 }

References fpTrackInformationAllocator.

◆ Print()

void TrackInformation::Print ( void  ) const
override

Definition at line 8 of file TrackInformation.cc.

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 }

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

◆ putInHistory()

void TrackInformation::putInHistory ( )
inline

◆ setAncestor()

void TrackInformation::setAncestor ( )
inline

Definition at line 40 of file TrackInformation.h.

40 { flagAncestor_ = true; }

References flagAncestor_.

◆ setCaloIDChecked()

void TrackInformation::setCaloIDChecked ( bool  f)
inline

Definition at line 54 of file TrackInformation.h.

54 { caloIDChecked_ = f; }

References caloIDChecked_, and f.

Referenced by CaloTrkProcessing::update().

◆ setCaloSurfaceParticleP()

void TrackInformation::setCaloSurfaceParticleP ( double  p)
inline

Definition at line 58 of file TrackInformation.h.

References caloSurfaceParticleP_, and AlCaHLTBitMon_ParallelJobs::p.

◆ setCaloSurfaceParticlePID()

void TrackInformation::setCaloSurfaceParticlePID ( int  id)
inline

Definition at line 56 of file TrackInformation.h.

References caloSurfaceParticlePID_, and triggerObjects_cff::id.

◆ setCastorHitPID()

void TrackInformation::setCastorHitPID ( const int  pid)
inline

Definition at line 87 of file TrackInformation.h.

87  {
88  hasCastorHit_ = true;
89  castorHitPID_ = pid;
90  }

References castorHitPID_, and hasCastorHit_.

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

◆ setCrossedBoundary()

void TrackInformation::setCrossedBoundary ( const G4Track *  track)
inline

Definition at line 61 of file TrackInformation.h.

61  {
62  crossedBoundary_ = true;
63  idAtBoundary_ = track->GetTrackID();
64  positionAtBoundary_ = math::XYZTLorentzVectorF(track->GetPosition().x() / CLHEP::cm,
65  track->GetPosition().y() / CLHEP::cm,
66  track->GetPosition().z() / CLHEP::cm,
67  track->GetGlobalTime());
69  track->GetMomentum().y() / CLHEP::GeV,
70  track->GetMomentum().z() / CLHEP::GeV,
71  track->GetKineticEnergy() / CLHEP::GeV);
72  }

References crossedBoundary_, GeV, idAtBoundary_, momentumAtBoundary_, positionAtBoundary_, and HLT_FULL_cff::track.

Referenced by CaloTrkProcessing::update().

◆ 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

◆ 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.

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

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

Friends And Related Function Documentation

◆ NewTrackAction

friend class NewTrackAction
friend

Definition at line 137 of file TrackInformation.h.

Member Data Documentation

◆ caloIDChecked_

bool TrackInformation::caloIDChecked_
private

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

Referenced by getCastorHitPID(), and setCastorHitPID().

◆ crossedBoundary_

bool TrackInformation::crossedBoundary_
private

Definition at line 106 of file TrackInformation.h.

Referenced by crossedBoundary(), and setCrossedBoundary().

◆ flagAncestor_

bool TrackInformation::flagAncestor_
private

Definition at line 101 of file TrackInformation.h.

Referenced by isAncestor(), and setAncestor().

◆ genParticleP_

double TrackInformation::genParticleP_
private

Definition at line 112 of file TrackInformation.h.

Referenced by genParticleP(), and setGenParticleP().

◆ genParticlePID_

int TrackInformation::genParticlePID_
private

Definition at line 111 of file TrackInformation.h.

Referenced by genParticlePID(), and setGenParticlePID().

◆ hasCastorHit_

bool TrackInformation::hasCastorHit_
private

Definition at line 114 of file TrackInformation.h.

Referenced by hasCastorHit(), and setCastorHitPID().

◆ hasHits_

bool TrackInformation::hasHits_
private

Definition at line 98 of file TrackInformation.h.

Referenced by hasHits(), and Print().

◆ idAtBoundary_

bool TrackInformation::idAtBoundary_
private

Definition at line 107 of file TrackInformation.h.

Referenced by getIDAtBoundary(), and setCrossedBoundary().

◆ idCaloVolume_

int TrackInformation::idCaloVolume_
private

Definition at line 103 of file TrackInformation.h.

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

◆ idLastVolume_

int TrackInformation::idLastVolume_
private

Definition at line 104 of file TrackInformation.h.

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

◆ idOnCaloSurface_

int TrackInformation::idOnCaloSurface_
private

Definition at line 102 of file TrackInformation.h.

Referenced by getIDonCaloSurface(), and setIDonCaloSurface().

◆ isGeneratedSecondary_

bool TrackInformation::isGeneratedSecondary_
private

Definition at line 99 of file TrackInformation.h.

Referenced by isGeneratedSecondary(), and Print().

◆ isInHistory_

bool TrackInformation::isInHistory_
private

Definition at line 100 of file TrackInformation.h.

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

◆ isPrimary_

bool TrackInformation::isPrimary_
private

Definition at line 97 of file TrackInformation.h.

Referenced by isPrimary(), and Print().

◆ momentumAtBoundary_

math::XYZTLorentzVectorF TrackInformation::momentumAtBoundary_
private

Definition at line 109 of file TrackInformation.h.

Referenced by getMomentumAtBoundary(), and setCrossedBoundary().

◆ positionAtBoundary_

math::XYZTLorentzVectorF TrackInformation::positionAtBoundary_
private

Definition at line 108 of file TrackInformation.h.

Referenced by getPositionAtBoundary(), and setCrossedBoundary().

◆ storeTrack_

bool TrackInformation::storeTrack_
private

Definition at line 96 of file TrackInformation.h.

Referenced by Print(), and storeTrack().

TrackInformation::castorHitPID_
int castorHitPID_
Definition: TrackInformation.h:115
TrackInformation::positionAtBoundary_
math::XYZTLorentzVectorF positionAtBoundary_
Definition: TrackInformation.h:108
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
TrackInformation::getIDonCaloSurface
int getIDonCaloSurface() const
Definition: TrackInformation.h:43
TrackInformation::hasCastorHit_
bool hasCastorHit_
Definition: TrackInformation.h:114
TrackInformation::caloSurfaceParticleP_
double caloSurfaceParticleP_
Definition: TrackInformation.h:112
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
TrackInformation::flagAncestor_
bool flagAncestor_
Definition: TrackInformation.h:101
math::XYZTLorentzVectorF
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:22
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TrackInformation::idCaloVolume_
int idCaloVolume_
Definition: TrackInformation.h:103
TrackInformation::putInHistory
void putInHistory()
Definition: TrackInformation.h:37
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TrackInformation::idOnCaloSurface_
int idOnCaloSurface_
Definition: TrackInformation.h:102
TrackInformation::genParticleP_
double genParticleP_
Definition: TrackInformation.h:112
TrackInformation::storeTrack_
bool storeTrack_
Definition: TrackInformation.h:96
TrackInformation::idAtBoundary_
bool idAtBoundary_
Definition: TrackInformation.h:107
dqmdumpme.last
last
Definition: dqmdumpme.py:56
TrackInformation::idLastVolume_
int idLastVolume_
Definition: TrackInformation.h:104
fpTrackInformationAllocator
G4ThreadLocal G4Allocator< TrackInformation > * fpTrackInformationAllocator
Definition: TrackInformation.cc:6
TrackInformation::caloSurfaceParticlePID_
int caloSurfaceParticlePID_
Definition: TrackInformation.h:111
TrackInformation::hasHits_
bool hasHits_
Definition: TrackInformation.h:98
TrackInformation::isGeneratedSecondary_
bool isGeneratedSecondary_
Definition: TrackInformation.h:99
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
GeV
const double GeV
Definition: MathUtil.h:16
TrackInformation::isPrimary_
bool isPrimary_
Definition: TrackInformation.h:97
TrackInformation
Definition: TrackInformation.h:12
TrackInformation::isInHistory_
bool isInHistory_
Definition: TrackInformation.h:100
TrackInformation::momentumAtBoundary_
math::XYZTLorentzVectorF momentumAtBoundary_
Definition: TrackInformation.h:109
TrackInformation::genParticlePID_
int genParticlePID_
Definition: TrackInformation.h:111
TrackInformation::crossedBoundary_
bool crossedBoundary_
Definition: TrackInformation.h:106
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
TrackInformation::caloIDChecked
bool caloIDChecked() const
Definition: TrackInformation.h:53
TrackInformation::caloIDChecked_
bool caloIDChecked_
Definition: TrackInformation.h:105