CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( )
inlineoverride

Definition at line 14 of file TrackInformation.h.

14 {}
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

bool TrackInformation::caloIDChecked ( ) const
inline

Definition at line 53 of file TrackInformation.h.

References caloIDChecked_.

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

53 { return caloIDChecked_; }
double TrackInformation::caloSurfaceParticleP ( ) const
inline

Definition at line 57 of file TrackInformation.h.

References caloSurfaceParticleP_.

Referenced by NewTrackAction::addUserInfoToSecondary().

57 { return caloSurfaceParticleP_; }
int TrackInformation::caloSurfaceParticlePID ( ) const
inline

Definition at line 55 of file TrackInformation.h.

References caloSurfaceParticlePID_.

Referenced by NewTrackAction::addUserInfoToSecondary().

55 { return caloSurfaceParticlePID_; }
bool TrackInformation::crossedBoundary ( ) const
inline
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_; }
int TrackInformation::genParticlePID ( ) const
inline
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_; }
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_; }
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_; }
int TrackInformation::getIDonCaloSurface ( ) const
inline
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_
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_
bool TrackInformation::hasCastorHit ( ) const
inline
bool TrackInformation::hasHits ( ) const
inline

Definition at line 30 of file TrackInformation.h.

References hasHits_.

30 { return hasHits_; }
void TrackInformation::hasHits ( bool  v)
inline

Definition at line 31 of file TrackInformation.h.

References hasHits_, and findQualityFiles::v.

bool TrackInformation::isAncestor ( ) const
inline

Definition at line 39 of file TrackInformation.h.

References flagAncestor_.

39 { return flagAncestor_; }
bool TrackInformation::isGeneratedSecondary ( ) const
inline

Definition at line 33 of file TrackInformation.h.

References isGeneratedSecondary_.

33 { return isGeneratedSecondary_; }
void TrackInformation::isGeneratedSecondary ( bool  v)
inline
bool TrackInformation::isInHistory ( ) const
inline

Definition at line 36 of file TrackInformation.h.

References isInHistory_.

36 { return isInHistory_; }
bool TrackInformation::isPrimary ( ) const
inline
void TrackInformation::isPrimary ( bool  v)
inline

Definition at line 28 of file TrackInformation.h.

References isPrimary_, and findQualityFiles::v.

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
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
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 }
int getIDonCaloSurface() const
bool caloIDChecked() const
#define LogDebug(id)
void TrackInformation::putInHistory ( )
inline
void TrackInformation::setAncestor ( )
inline

Definition at line 40 of file TrackInformation.h.

References flagAncestor_.

40 { flagAncestor_ = true; }
void TrackInformation::setCaloIDChecked ( bool  f)
inline

Definition at line 54 of file TrackInformation.h.

References caloIDChecked_, and validate-o2o-wbm::f.

Referenced by CaloTrkProcessing::update().

void TrackInformation::setCaloSurfaceParticleP ( double  p)
inline
void TrackInformation::setCaloSurfaceParticlePID ( int  id)
inline

Definition at line 56 of file TrackInformation.h.

References caloSurfaceParticlePID_, and gpuClustering::id.

uint16_t *__restrict__ id
void TrackInformation::setCastorHitPID ( const int  pid)
inline
void TrackInformation::setCrossedBoundary ( const G4Track *  track)
inline

Definition at line 61 of file TrackInformation.h.

References crossedBoundary_, momentumAtBoundary_, and positionAtBoundary_.

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
void TrackInformation::setGenParticleP ( double  p)
inline
void TrackInformation::setGenParticlePID ( int  id)
inline
void TrackInformation::setIDonCaloSurface ( int  id,
int  ical,
int  last,
int  pdgID,
double  p 
)
inline
void TrackInformation::setStartedInFineVolume ( bool  flag = true)
inline

Definition at line 76 of file TrackInformation.h.

References startedInFineVolume_, and startedInFineVolumeIsSet_.

Referenced by CaloTrkProcessing::update().

76  {
77  startedInFineVolume_ = flag;
79  }
bool TrackInformation::startedInFineVolume ( ) const
inline

Definition at line 75 of file TrackInformation.h.

References startedInFineVolume_.

Referenced by CaloTrkProcessing::update().

75 { return startedInFineVolume_; }
bool TrackInformation::startedInFineVolumeIsSet ( )
inline

Definition at line 80 of file TrackInformation.h.

References startedInFineVolumeIsSet_.

Referenced by CaloTrkProcessing::update().

80 { return startedInFineVolumeIsSet_; }
bool TrackInformation::storeTrack ( ) const
inline
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

friend class NewTrackAction
friend

Definition at line 144 of file TrackInformation.h.

Member Data Documentation

bool TrackInformation::caloIDChecked_
private

Definition at line 109 of file TrackInformation.h.

Referenced by caloIDChecked(), and setCaloIDChecked().

double TrackInformation::caloSurfaceParticleP_
private
int TrackInformation::caloSurfaceParticlePID_
private
int TrackInformation::castorHitPID_
private

Definition at line 120 of file TrackInformation.h.

Referenced by getCastorHitPID(), and setCastorHitPID().

bool TrackInformation::crossedBoundary_
private

Definition at line 110 of file TrackInformation.h.

Referenced by crossedBoundary(), and setCrossedBoundary().

bool TrackInformation::flagAncestor_
private

Definition at line 105 of file TrackInformation.h.

Referenced by isAncestor(), and setAncestor().

double TrackInformation::genParticleP_
private

Definition at line 117 of file TrackInformation.h.

Referenced by genParticleP(), and setGenParticleP().

int TrackInformation::genParticlePID_
private

Definition at line 116 of file TrackInformation.h.

Referenced by genParticlePID(), and setGenParticlePID().

bool TrackInformation::hasCastorHit_
private

Definition at line 119 of file TrackInformation.h.

Referenced by hasCastorHit(), and setCastorHitPID().

bool TrackInformation::hasHits_
private

Definition at line 102 of file TrackInformation.h.

Referenced by hasHits(), and Print().

int TrackInformation::idCaloVolume_
private

Definition at line 107 of file TrackInformation.h.

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

int TrackInformation::idLastVolume_
private

Definition at line 108 of file TrackInformation.h.

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

int TrackInformation::idOnCaloSurface_
private

Definition at line 106 of file TrackInformation.h.

Referenced by getIDonCaloSurface(), and setIDonCaloSurface().

bool TrackInformation::isGeneratedSecondary_
private

Definition at line 103 of file TrackInformation.h.

Referenced by isGeneratedSecondary(), and Print().

bool TrackInformation::isInHistory_
private

Definition at line 104 of file TrackInformation.h.

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

bool TrackInformation::isPrimary_
private

Definition at line 101 of file TrackInformation.h.

Referenced by isPrimary(), and Print().

math::XYZTLorentzVectorF TrackInformation::momentumAtBoundary_
private

Definition at line 112 of file TrackInformation.h.

Referenced by getMomentumAtBoundary(), and setCrossedBoundary().

math::XYZTLorentzVectorF TrackInformation::positionAtBoundary_
private

Definition at line 111 of file TrackInformation.h.

Referenced by getPositionAtBoundary(), and setCrossedBoundary().

bool TrackInformation::startedInFineVolume_
private

Definition at line 113 of file TrackInformation.h.

Referenced by setStartedInFineVolume(), and startedInFineVolume().

bool TrackInformation::startedInFineVolumeIsSet_
private

Definition at line 114 of file TrackInformation.h.

Referenced by setStartedInFineVolume(), and startedInFineVolumeIsSet().

bool TrackInformation::storeTrack_
private

Definition at line 100 of file TrackInformation.h.

Referenced by Print(), and storeTrack().