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
 

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

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

Member Function Documentation

◆ caloIDChecked()

bool TrackInformation::caloIDChecked ( ) const
inline

Definition at line 51 of file TrackInformation.h.

References caloIDChecked_.

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

51 { return caloIDChecked_; }

◆ caloSurfaceParticleP()

double TrackInformation::caloSurfaceParticleP ( ) const
inline

Definition at line 55 of file TrackInformation.h.

References caloSurfaceParticleP_.

Referenced by NewTrackAction::addUserInfoToSecondary().

55 { return caloSurfaceParticleP_; }

◆ caloSurfaceParticlePID()

int TrackInformation::caloSurfaceParticlePID ( ) const
inline

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

References genParticleP_.

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

83 { return genParticleP_; }

◆ genParticlePID()

int TrackInformation::genParticlePID ( ) const
inline

◆ getCastorHitPID()

int TrackInformation::getCastorHitPID ( ) const
inline

Definition at line 93 of file TrackInformation.h.

References castorHitPID_.

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

93 { return castorHitPID_; }

◆ getIDCaloVolume()

int TrackInformation::getIDCaloVolume ( ) const
inline

Definition at line 49 of file TrackInformation.h.

References idCaloVolume_.

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

49 { return idCaloVolume_; }

◆ getIDLastVolume()

int TrackInformation::getIDLastVolume ( ) const
inline

Definition at line 50 of file TrackInformation.h.

References idLastVolume_.

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

50 { return idLastVolume_; }

◆ getIDonCaloSurface()

int TrackInformation::getIDonCaloSurface ( ) const
inline

◆ getMomentumAtBoundary()

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

Definition at line 72 of file TrackInformation.h.

References momentumAtBoundary_.

Referenced by TrackingAction::PostUserTrackingAction().

72 { return momentumAtBoundary_; }
math::XYZTLorentzVectorF momentumAtBoundary_

◆ getPositionAtBoundary()

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

Definition at line 71 of file TrackInformation.h.

References positionAtBoundary_.

Referenced by TrackingAction::PostUserTrackingAction().

71 { return positionAtBoundary_; }
math::XYZTLorentzVectorF positionAtBoundary_

◆ hasCastorHit()

bool TrackInformation::hasCastorHit ( ) const
inline

◆ hasHits()

bool TrackInformation::hasHits ( ) const
inline

Definition at line 28 of file TrackInformation.h.

References hasHits_.

28 { return hasHits_; }

◆ isAncestor()

bool TrackInformation::isAncestor ( ) const
inline

Definition at line 37 of file TrackInformation.h.

References flagAncestor_.

Referenced by TrackingAction::PostUserTrackingAction().

37 { return flagAncestor_; }

◆ isGeneratedSecondary()

bool TrackInformation::isGeneratedSecondary ( ) const
inline

Definition at line 31 of file TrackInformation.h.

References isGeneratedSecondary_.

31 { return isGeneratedSecondary_; }

◆ isInHistory()

bool TrackInformation::isInHistory ( ) const
inline

Definition at line 34 of file TrackInformation.h.

References isInHistory_.

Referenced by TrackingAction::PostUserTrackingAction().

34 { return isInHistory_; }

◆ isPrimary()

bool TrackInformation::isPrimary ( ) const
inline

◆ operator delete()

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

Definition at line 153 of file TrackInformation.h.

References fpTrackInformationAllocator.

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

◆ operator new()

void * TrackInformation::operator new ( size_t  )
inline

Definition at line 147 of file TrackInformation.h.

References fpTrackInformationAllocator.

147  {
149  fpTrackInformationAllocator = new G4Allocator<TrackInformation>;
150  return (void *)fpTrackInformationAllocator->MallocSingle();
151 }
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 38 of file TrackInformation.h.

References flagAncestor_.

38 { flagAncestor_ = true; }

◆ setCaloIDChecked()

void TrackInformation::setCaloIDChecked ( bool  f)
inline

Definition at line 52 of file TrackInformation.h.

References caloIDChecked_, and f.

Referenced by CaloTrkProcessing::update().

52 { 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 59 of file TrackInformation.h.

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

Referenced by CaloTrkProcessing::update().

59  {
60  crossedBoundary_ = true;
61  positionAtBoundary_ = math::XYZTLorentzVectorF(track->GetPosition().x() / CLHEP::cm,
62  track->GetPosition().y() / CLHEP::cm,
63  track->GetPosition().z() / CLHEP::cm,
64  track->GetGlobalTime());
65  momentumAtBoundary_ = math::XYZTLorentzVectorF(track->GetMomentum().x() / CLHEP::GeV,
66  track->GetMomentum().y() / CLHEP::GeV,
67  track->GetMomentum().z() / CLHEP::GeV,
68  track->GetTotalEnergy() / CLHEP::GeV);
69  }
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

◆ 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 29 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 20 of file TrackInformation.h.

References isInHistory_, and storeTrack_.

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

20  {
21  storeTrack_ = true;
22  isInHistory_ = true;
23  }

◆ startedInFineVolume()

bool TrackInformation::startedInFineVolume ( ) const
inline

Definition at line 73 of file TrackInformation.h.

References startedInFineVolume_.

Referenced by CaloTrkProcessing::update().

73 { return startedInFineVolume_; }

◆ startedInFineVolumeIsSet()

bool TrackInformation::startedInFineVolumeIsSet ( )
inline

Definition at line 78 of file TrackInformation.h.

References startedInFineVolumeIsSet_.

Referenced by CaloTrkProcessing::update().

78 { return startedInFineVolumeIsSet_; }

◆ storeTrack()

bool TrackInformation::storeTrack ( ) const
inline

Definition at line 18 of file TrackInformation.h.

References storeTrack_.

Referenced by TrackingAction::PostUserTrackingAction(), and DBremWatcher::update().

18 { return storeTrack_; }

Friends And Related Function Documentation

◆ NewTrackAction

friend class NewTrackAction
friend

Definition at line 142 of file TrackInformation.h.

Member Data Documentation

◆ caloIDChecked_

bool TrackInformation::caloIDChecked_
private

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

Referenced by getCastorHitPID(), and setCastorHitPID().

◆ crossedBoundary_

bool TrackInformation::crossedBoundary_
private

Definition at line 108 of file TrackInformation.h.

Referenced by crossedBoundary(), and setCrossedBoundary().

◆ flagAncestor_

bool TrackInformation::flagAncestor_
private

Definition at line 103 of file TrackInformation.h.

Referenced by isAncestor(), and setAncestor().

◆ genParticleP_

double TrackInformation::genParticleP_
private

Definition at line 115 of file TrackInformation.h.

Referenced by genParticleP(), and setGenParticleP().

◆ genParticlePID_

int TrackInformation::genParticlePID_
private

Definition at line 114 of file TrackInformation.h.

Referenced by genParticlePID(), and setGenParticlePID().

◆ hasCastorHit_

bool TrackInformation::hasCastorHit_
private

Definition at line 117 of file TrackInformation.h.

Referenced by hasCastorHit(), and setCastorHitPID().

◆ hasHits_

bool TrackInformation::hasHits_
private

Definition at line 100 of file TrackInformation.h.

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

◆ idCaloVolume_

int TrackInformation::idCaloVolume_
private

Definition at line 105 of file TrackInformation.h.

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

◆ idLastVolume_

int TrackInformation::idLastVolume_
private

Definition at line 106 of file TrackInformation.h.

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

◆ idOnCaloSurface_

int TrackInformation::idOnCaloSurface_
private

Definition at line 104 of file TrackInformation.h.

Referenced by getIDonCaloSurface(), and setIDonCaloSurface().

◆ isGeneratedSecondary_

bool TrackInformation::isGeneratedSecondary_
private

Definition at line 101 of file TrackInformation.h.

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

◆ isInHistory_

bool TrackInformation::isInHistory_
private

Definition at line 102 of file TrackInformation.h.

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

◆ isPrimary_

bool TrackInformation::isPrimary_
private

Definition at line 99 of file TrackInformation.h.

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

◆ momentumAtBoundary_

math::XYZTLorentzVectorF TrackInformation::momentumAtBoundary_
private

Definition at line 110 of file TrackInformation.h.

Referenced by getMomentumAtBoundary(), and setCrossedBoundary().

◆ positionAtBoundary_

math::XYZTLorentzVectorF TrackInformation::positionAtBoundary_
private

Definition at line 109 of file TrackInformation.h.

Referenced by getPositionAtBoundary(), and setCrossedBoundary().

◆ startedInFineVolume_

bool TrackInformation::startedInFineVolume_
private

Definition at line 111 of file TrackInformation.h.

Referenced by setStartedInFineVolume(), and startedInFineVolume().

◆ startedInFineVolumeIsSet_

bool TrackInformation::startedInFineVolumeIsSet_
private

Definition at line 112 of file TrackInformation.h.

Referenced by setStartedInFineVolume(), and startedInFineVolumeIsSet().

◆ storeTrack_

bool TrackInformation::storeTrack_
private

Definition at line 98 of file TrackInformation.h.

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