ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TrackRecord Class Reference

#include <TrackRecord.h>

Collaboration diagram for TrackRecord:

Public Member Functions

 TrackRecord ()=default
 Default constructor. More...
 
virtual ~TrackRecord ()=default
 Default destructor. More...
 
 TrackRecord (int pdg, int status, double energy, const CLHEP::Hep3Vector &momentum, const CLHEP::Hep3Vector &postition, double time, int barcode, int id, const std::string &volumeName)
 Constructor. More...
 
 TrackRecord (const TrackRecord &trc)
 Constructor. More...
 
TrackRecordoperator= (const TrackRecord &trc)
 Assignement Operator. More...
 
double GetEnergy () const
 Energy. More...
 
void SetEnergy (double e)
 Set energy. More...
 
CLHEP::Hep3Vector GetPosition () const
 Position. More...
 
void SetPosition (CLHEP::Hep3Vector p)
 Set position. More...
 
CLHEP::Hep3Vector GetMomentum () const
 Momentum. More...
 
void SetMomentum (CLHEP::Hep3Vector e)
 Set momentum. More...
 
int GetPDGCode () const
 PDG Code. More...
 
void SetPDGCode (int pcode)
 Set PDG code. More...
 
double GetTime () const
 Time. More...
 
void SetTime (double time)
 Set time. More...
 
const std::string & GetVolName () const
 Volume name. More...
 
void SetVolName (const std::string &theName)
 Set Volume name. More...
 
int status () const
 status. More...
 
void SetStatus (int status)
 Set status. More...
 
int id () const
 unique ID - fall back to HepMcParticeLink if m_id has not been set directly More...
 
void SetID (int uniqueID)
 Set uniqueID. More...
 
int barcode () const
 bar code. More...
 
void SetBarcode (int barcode)
 Set barcode. More...
 

Private Attributes

int m_pdgCode {0}
 
int m_status {0}
 
double m_energy {0}
 
CLHEP::Hep3Vector m_momentum {0,0,0}
 
CLHEP::Hep3Vector m_position {0,0,0}
 
double m_time {0.}
 
int m_barcode {HepMC::UNDEFINED_ID}
 
int m_id {HepMC::UNDEFINED_ID}
 
std::string m_volName {""}
 
std::unique_ptr< HepMcParticleLinkm_partLink {}
 

Detailed Description

Definition at line 12 of file TrackRecord.h.

Constructor & Destructor Documentation

◆ TrackRecord() [1/3]

TrackRecord::TrackRecord ( )
default

Default constructor.

◆ ~TrackRecord()

virtual TrackRecord::~TrackRecord ( )
virtualdefault

Default destructor.

◆ TrackRecord() [2/3]

TrackRecord::TrackRecord ( int  pdg,
int  status,
double  energy,
const CLHEP::Hep3Vector &  momentum,
const CLHEP::Hep3Vector &  postition,
double  time,
int  barcode,
int  id,
const std::string &  volumeName 
)
inline

Constructor.

Definition at line 21 of file TrackRecord.h.

31  : m_pdgCode(pdg)
32  , m_status(status)
33  , m_energy(energy)
35  , m_position(postition)
36  , m_time(time)
38  , m_id(id)
39  , m_volName(volumeName)
40  {
42  m_partLink = std::make_unique<HepMcParticleLink>(m_barcode, 0, HepMcParticleLink::IS_POSITION, HepMcParticleLink::IS_BARCODE); // FIXME is barcode-based
43  }
44  }

◆ TrackRecord() [3/3]

TrackRecord::TrackRecord ( const TrackRecord trc)
inline

Constructor.

Definition at line 47 of file TrackRecord.h.

48  : m_pdgCode(trc.m_pdgCode)
49  , m_status(trc.m_status)
50  , m_energy(trc.m_energy)
51  , m_momentum(trc.m_momentum)
52  , m_position(trc.m_position)
53  , m_time(trc.m_time)
54  , m_barcode(trc.m_barcode)
55  , m_id(trc.m_id)
56  , m_volName(trc.m_volName){
58  m_id = trc.id(); // Try a look-up via HepMcParticleLink
59  }
60 }

Member Function Documentation

◆ barcode()

int TrackRecord::barcode ( ) const
inline

bar code.

Alias function.

Definition at line 135 of file TrackRecord.h.

135 {return m_barcode;}

◆ GetEnergy()

double TrackRecord::GetEnergy ( ) const
inline

Energy.

Definition at line 82 of file TrackRecord.h.

82 {return m_energy;}

◆ GetMomentum()

CLHEP::Hep3Vector TrackRecord::GetMomentum ( ) const
inline

Momentum.

Definition at line 94 of file TrackRecord.h.

94 {return m_momentum;}

◆ GetPDGCode()

int TrackRecord::GetPDGCode ( ) const
inline

PDG Code.

Definition at line 100 of file TrackRecord.h.

100 {return m_pdgCode;}

◆ GetPosition()

CLHEP::Hep3Vector TrackRecord::GetPosition ( ) const
inline

Position.

Definition at line 88 of file TrackRecord.h.

88 {return m_position;}

◆ GetTime()

double TrackRecord::GetTime ( ) const
inline

Time.

Definition at line 106 of file TrackRecord.h.

106 {return m_time;}

◆ GetVolName()

const std::string& TrackRecord::GetVolName ( ) const
inline

Volume name.

Definition at line 112 of file TrackRecord.h.

112 {return m_volName;}

◆ id()

int TrackRecord::id ( ) const
inline

unique ID - fall back to HepMcParticeLink if m_id has not been set directly

Definition at line 124 of file TrackRecord.h.

124 {if (m_id == HepMC::INVALID_PARTICLE_ID && m_partLink) { return m_partLink->id(); } else { return m_id; } }

◆ operator=()

TrackRecord& TrackRecord::operator= ( const TrackRecord trc)
inline

Assignement Operator.

Definition at line 63 of file TrackRecord.h.

63  {
64  if (this != &trc) {
65  m_pdgCode = trc.m_pdgCode;
66  m_status = trc.m_status;
67  m_energy = trc.m_energy;
68  m_momentum = trc.m_momentum;
69  m_position = trc.m_position;
70  m_time = trc.m_time;
71  m_barcode = trc.m_barcode;
72  m_id = trc.m_id;
74  m_id = trc.id(); // Try a look-up via HepMcParticleLink
75  }
76  m_volName = trc.m_volName;
77  }
78  return *this;
79  }

◆ SetBarcode()

void TrackRecord::SetBarcode ( int  barcode)
inline

Set barcode.

Definition at line 138 of file TrackRecord.h.

138  {
139  m_barcode = barcode;
141  m_partLink = std::make_unique<HepMcParticleLink>(m_barcode, 0, HepMcParticleLink::IS_POSITION, HepMcParticleLink::IS_BARCODE); // FIXME is barcode-based
142  }
143  }

◆ SetEnergy()

void TrackRecord::SetEnergy ( double  e)
inline

Set energy.

Definition at line 85 of file TrackRecord.h.

85 {m_energy = e;}

◆ SetID()

void TrackRecord::SetID ( int  uniqueID)
inline

Set uniqueID.

Definition at line 127 of file TrackRecord.h.

127  {
128  m_id = uniqueID;
130  m_partLink = std::make_unique<HepMcParticleLink>(m_barcode, 0, HepMcParticleLink::IS_POSITION, HepMcParticleLink::IS_BARCODE); // FIXME is barcode-based
131  }
132  }

◆ SetMomentum()

void TrackRecord::SetMomentum ( CLHEP::Hep3Vector  e)
inline

Set momentum.

Definition at line 97 of file TrackRecord.h.

97 {m_momentum = e;}

◆ SetPDGCode()

void TrackRecord::SetPDGCode ( int  pcode)
inline

Set PDG code.

Definition at line 103 of file TrackRecord.h.

103 {m_pdgCode = pcode;}

◆ SetPosition()

void TrackRecord::SetPosition ( CLHEP::Hep3Vector  p)
inline

Set position.

Definition at line 91 of file TrackRecord.h.

91 {m_position = p;}

◆ SetStatus()

void TrackRecord::SetStatus ( int  status)
inline

Set status.

Definition at line 121 of file TrackRecord.h.

121 {m_status = status;}

◆ SetTime()

void TrackRecord::SetTime ( double  time)
inline

Set time.

Definition at line 109 of file TrackRecord.h.

109 {m_time = time;}

◆ SetVolName()

void TrackRecord::SetVolName ( const std::string &  theName)
inline

Set Volume name.

Definition at line 115 of file TrackRecord.h.

115 {m_volName = theName;}

◆ status()

int TrackRecord::status ( ) const
inline

status.

Definition at line 118 of file TrackRecord.h.

118 {return m_status;}

Member Data Documentation

◆ m_barcode

int TrackRecord::m_barcode {HepMC::UNDEFINED_ID}
private

Definition at line 152 of file TrackRecord.h.

◆ m_energy

double TrackRecord::m_energy {0}
private

Definition at line 148 of file TrackRecord.h.

◆ m_id

int TrackRecord::m_id {HepMC::UNDEFINED_ID}
private

Definition at line 153 of file TrackRecord.h.

◆ m_momentum

CLHEP::Hep3Vector TrackRecord::m_momentum {0,0,0}
private

Definition at line 149 of file TrackRecord.h.

◆ m_partLink

std::unique_ptr<HepMcParticleLink> TrackRecord::m_partLink {}
private

Definition at line 155 of file TrackRecord.h.

◆ m_pdgCode

int TrackRecord::m_pdgCode {0}
private

Definition at line 146 of file TrackRecord.h.

◆ m_position

CLHEP::Hep3Vector TrackRecord::m_position {0,0,0}
private

Definition at line 150 of file TrackRecord.h.

◆ m_status

int TrackRecord::m_status {0}
private

Definition at line 147 of file TrackRecord.h.

◆ m_time

double TrackRecord::m_time {0.}
private

Definition at line 151 of file TrackRecord.h.

◆ m_volName

std::string TrackRecord::m_volName {""}
private

Definition at line 154 of file TrackRecord.h.


The documentation for this class was generated from the following file:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TrackRecord::m_time
double m_time
Definition: TrackRecord.h:151
TrackRecord::id
int id() const
unique ID - fall back to HepMcParticeLink if m_id has not been set directly
Definition: TrackRecord.h:124
HepMC::INVALID_PARTICLE_ID
constexpr int INVALID_PARTICLE_ID
Definition: MagicNumbers.h:56
TrackRecord::m_position
CLHEP::Hep3Vector m_position
Definition: TrackRecord.h:150
TrackRecord::status
int status() const
status.
Definition: TrackRecord.h:118
TrackRecord::m_barcode
int m_barcode
Definition: TrackRecord.h:152
TrackRecord::m_partLink
std::unique_ptr< HepMcParticleLink > m_partLink
Definition: TrackRecord.h:155
TrackRecord::m_status
int m_status
Definition: TrackRecord.h:147
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
TrackRecord::m_momentum
CLHEP::Hep3Vector m_momentum
Definition: TrackRecord.h:149
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:109
TrackRecord::m_volName
std::string m_volName
Definition: TrackRecord.h:154
TrackRecord::m_id
int m_id
Definition: TrackRecord.h:153
TrackRecord::barcode
int barcode() const
bar code.
Definition: TrackRecord.h:135
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
TrackRecord::m_energy
double m_energy
Definition: TrackRecord.h:148
TrackRecord::m_pdgCode
int m_pdgCode
Definition: TrackRecord.h:146