ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
CSCSimHit Class Referencefinal

#include <CSCSimHit.h>

Collaboration diagram for CSCSimHit:

Public Member Functions

 CSCSimHit ()
 
 ~CSCSimHit ()
 
 CSCSimHit (int id, double time, double energy, const Amg::Vector3D &HitStart, const Amg::Vector3D &HitEnd, int particleID)
 
 CSCSimHit (int id, double time, double energy, const Amg::Vector3D &HitStart, const Amg::Vector3D &HitEnd, int particleID, const int truthBarcode)
 
 CSCSimHit (int id, double time, double energy, const Amg::Vector3D &HitStart, const Amg::Vector3D &HitEnd, int particleID, const int truthBarcode, double kineticEnergy)
 
 CSCSimHit (int id, double time, double energy, const Amg::Vector3D &HitStart, const Amg::Vector3D &HitEnd, int particleID, const HepMcParticleLink &hmpl, double kineticEnergy)
 
double globalTime () const
 
double energyDeposit () const
 
const Amg::Vector3DgetHitStart () const
 
const Amg::Vector3DgetHitEnd () const
 
int particleID () const
 
int CSCid () const
 
std::string print () const
 
bool operator< (const CSCSimHit &rhs) const
 
double meanTime () const
 
int truthBarcode () const
 
int truthID () const
 
double kineticEnergy () const
 
const HepMcParticleLinkparticleLink () const
 
void setGlobalTime (const double time)
 

Private Attributes

int m_CSCid
 
float m_globalTime
 
float m_energyDeposit
 
Amg::Vector3D m_hitStart
 
Amg::Vector3D m_hitEnd
 
int m_particleID
 
HepMcParticleLink m_partLink
 
float m_kineticEnergy
 

Detailed Description

Definition at line 18 of file CSCSimHit.h.

Constructor & Destructor Documentation

◆ CSCSimHit() [1/5]

CSCSimHit::CSCSimHit ( )

Definition at line 13 of file CSCSimHit.cxx.

13  :
14  m_CSCid(0xffff),
15  m_globalTime(0.),
16  m_energyDeposit(0),
17  m_particleID(0),
18  m_partLink(),
19  m_kineticEnergy(-1.)
20 {
21 }

◆ ~CSCSimHit()

CSCSimHit::~CSCSimHit ( )
default

◆ CSCSimHit() [2/5]

CSCSimHit::CSCSimHit ( int  id,
double  time,
double  energy,
const Amg::Vector3D HitStart,
const Amg::Vector3D HitEnd,
int  particleID 
)

Definition at line 26 of file CSCSimHit.cxx.

32  : m_CSCid(id), m_globalTime(time)
34  , m_hitStart(HitStart)
35  , m_hitEnd(HitEnd)
37  , m_kineticEnergy(-1.)
38 {
39 
40 }

◆ CSCSimHit() [3/5]

CSCSimHit::CSCSimHit ( int  id,
double  time,
double  energy,
const Amg::Vector3D HitStart,
const Amg::Vector3D HitEnd,
int  particleID,
const int  truthBarcode 
)

Definition at line 42 of file CSCSimHit.cxx.

49  : m_CSCid(id), m_globalTime(time)
51  , m_hitStart(HitStart)
52  , m_hitEnd(HitEnd)
55  , m_kineticEnergy(-1.)
56 {
57 
58 }

◆ CSCSimHit() [4/5]

CSCSimHit::CSCSimHit ( int  id,
double  time,
double  energy,
const Amg::Vector3D HitStart,
const Amg::Vector3D HitEnd,
int  particleID,
const int  truthBarcode,
double  kineticEnergy 
)

Definition at line 60 of file CSCSimHit.cxx.

68  : m_CSCid(id), m_globalTime(time)
70  , m_hitStart(HitStart)
71  , m_hitEnd(HitEnd)
74  , m_kineticEnergy(static_cast<float>(kineticEnergy))
75 {
76 
77 }

◆ CSCSimHit() [5/5]

CSCSimHit::CSCSimHit ( int  id,
double  time,
double  energy,
const Amg::Vector3D HitStart,
const Amg::Vector3D HitEnd,
int  particleID,
const HepMcParticleLink hmpl,
double  kineticEnergy 
)

Definition at line 79 of file CSCSimHit.cxx.

87  : m_CSCid(id), m_globalTime(time)
89  , m_hitStart(HitStart)
90  , m_hitEnd(HitEnd)
92  , m_partLink(hmpl)
93  , m_kineticEnergy(static_cast<float>(kineticEnergy))
94 {
95 
96 }

Member Function Documentation

◆ CSCid()

int CSCSimHit::CSCid ( ) const
inline

Definition at line 54 of file CSCSimHit.h.

54 { return m_CSCid; }

◆ energyDeposit()

double CSCSimHit::energyDeposit ( ) const
inline

Definition at line 50 of file CSCSimHit.h.

50 { return (double) m_energyDeposit; }

◆ getHitEnd()

const Amg::Vector3D& CSCSimHit::getHitEnd ( ) const
inline

Definition at line 52 of file CSCSimHit.h.

52 { return m_hitEnd; }

◆ getHitStart()

const Amg::Vector3D& CSCSimHit::getHitStart ( ) const
inline

Definition at line 51 of file CSCSimHit.h.

51 { return m_hitStart; }

◆ globalTime()

double CSCSimHit::globalTime ( ) const
inline

Definition at line 49 of file CSCSimHit.h.

49 { return (double) m_globalTime; }

◆ kineticEnergy()

double CSCSimHit::kineticEnergy ( ) const
inline

Definition at line 64 of file CSCSimHit.h.

64 { return static_cast<double>(m_kineticEnergy); }

◆ meanTime()

double CSCSimHit::meanTime ( ) const
inline

Definition at line 90 of file CSCSimHit.h.

91  { return (double) m_globalTime; }

◆ operator<()

bool CSCSimHit::operator< ( const CSCSimHit rhs) const
inline

Definition at line 56 of file CSCSimHit.h.

57  { return m_CSCid < rhs.m_CSCid; }

◆ particleID()

int CSCSimHit::particleID ( ) const
inline

Definition at line 53 of file CSCSimHit.h.

53 { return m_particleID; }

◆ particleLink()

const HepMcParticleLink & CSCSimHit::particleLink ( ) const
inline

Definition at line 93 of file CSCSimHit.h.

94  { return m_partLink; }

◆ print()

std::string CSCSimHit::print ( ) const

Definition at line 101 of file CSCSimHit.cxx.

101  {
102 
103  std::string str;
104  std::stringstream ss;
105 
106  ss << "CSCSimHit:";
107  ss << " identifier: " << m_CSCid;
108  ss << " t: " << m_globalTime;
109  ss << " E: " << m_energyDeposit;
110  ss << " kinE: " << m_kineticEnergy;
111  ss << " Hit start position: (" << m_hitStart.x()
112  << "," << m_hitStart.y()
113  << "," << m_hitStart.z()
114  << ")";
115  ss << " Hit end position: (" << m_hitEnd.x()
116  << "," << m_hitEnd.y()
117  << "," << m_hitEnd.z()
118  << ")";
119 
120  float distance = pow( m_hitEnd.x()-m_hitStart.x() , 2);
121  distance += pow( m_hitEnd.y()-m_hitStart.y() , 2);
122  distance += pow( m_hitEnd.z()-m_hitStart.z() , 2);
123  distance = std::sqrt(distance);
124 
125  ss << " Distance: " << distance;
126  ss << " Particle ID: " << m_particleID;
127  ss << " genTrackNumber: " << m_partLink.barcode();
128 
129  str = ss.str();
130 
131  return str;
132 
133 }

◆ setGlobalTime()

void CSCSimHit::setGlobalTime ( const double  time)
inline

Definition at line 70 of file CSCSimHit.h.

70 { m_globalTime = time; }

◆ truthBarcode()

int CSCSimHit::truthBarcode ( ) const

Definition at line 135 of file CSCSimHit.cxx.

136  { return m_partLink.barcode(); }

◆ truthID()

int CSCSimHit::truthID ( ) const

Definition at line 138 of file CSCSimHit.cxx.

139 { return m_partLink.id(); }

Member Data Documentation

◆ m_CSCid

int CSCSimHit::m_CSCid
private

Definition at line 76 of file CSCSimHit.h.

◆ m_energyDeposit

float CSCSimHit::m_energyDeposit
private

Definition at line 78 of file CSCSimHit.h.

◆ m_globalTime

float CSCSimHit::m_globalTime
private

Definition at line 77 of file CSCSimHit.h.

◆ m_hitEnd

Amg::Vector3D CSCSimHit::m_hitEnd
private

Definition at line 80 of file CSCSimHit.h.

◆ m_hitStart

Amg::Vector3D CSCSimHit::m_hitStart
private

Definition at line 79 of file CSCSimHit.h.

◆ m_kineticEnergy

float CSCSimHit::m_kineticEnergy
private

Definition at line 83 of file CSCSimHit.h.

◆ m_particleID

int CSCSimHit::m_particleID
private

Definition at line 81 of file CSCSimHit.h.

◆ m_partLink

HepMcParticleLink CSCSimHit::m_partLink
private

Definition at line 82 of file CSCSimHit.h.


The documentation for this class was generated from the following files:
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
CSCSimHit::kineticEnergy
double kineticEnergy() const
Definition: CSCSimHit.h:64
CSCSimHit::m_energyDeposit
float m_energyDeposit
Definition: CSCSimHit.h:78
CSCSimHit::m_hitEnd
Amg::Vector3D m_hitEnd
Definition: CSCSimHit.h:80
CSCSimHit::m_partLink
HepMcParticleLink m_partLink
Definition: CSCSimHit.h:82
CSCSimHit::truthBarcode
int truthBarcode() const
Definition: CSCSimHit.cxx:135
CSCSimHit::particleID
int particleID() const
Definition: CSCSimHit.h:53
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
CSCSimHit::m_particleID
int m_particleID
Definition: CSCSimHit.h:81
CSCSimHit::m_globalTime
float m_globalTime
Definition: CSCSimHit.h:77
CSCSimHit::m_kineticEnergy
float m_kineticEnergy
Definition: CSCSimHit.h:83
CSCSimHit::m_CSCid
int m_CSCid
Definition: CSCSimHit.h:76
CSCSimHit::m_hitStart
Amg::Vector3D m_hitStart
Definition: CSCSimHit.h:79
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
str
Definition: BTagTrackIpAccessor.cxx:11
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54