ATLAS Offline Software
Loading...
Searching...
No Matches
TGCSimHit.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONSIMEVENT_TGCSimHit_H
6#define MUONSIMEVENT_TGCSimHit_H 1
7
10
11#include <string>
12
13//---------------------
14// back to the situation of tag MuonSimEvent-00-00-25 to avoid
15// uncompatibility between 8.0.2 and 8.2.0 ----->
16// redundant time methods are present (globalTime() and meanTime() return the
17// same time) --->NOT TO BE FIXED!!<----
18
20
21public:
22 //
23 // construction/destruction
24 //
25 // needed by athenaRoot
26 TGCSimHit();
27
28 // Destructor:
30 TGCSimHit(const int id, const double time, const Amg::Vector3D& position, const Amg::Vector3D& direcos);
31 TGCSimHit(const int id, const double time, const Amg::Vector3D& position, const Amg::Vector3D& direcos,
32 const int truthBarcode, const double energyDeposit, const double stepLength,
33 const int particleEncoding=0, const double kineticEnergy=-9999.);
34 TGCSimHit(const int id, const double time, const Amg::Vector3D& position, const Amg::Vector3D& direcos,
35 const HepMcParticleLink& hmpl, const double energyDeposit, const double stepLength,
36 const int particleEncoding=0, const double kineticEnergy=-9999.);
37
38
39 //
40 // member functions
41 //
42 double globalTime() const { return static_cast<double>(m_globalTime); }
43 const Amg::Vector3D& localPosition() const { return m_localPosition; }
44 const Amg::Vector3D& localDireCos() const { return m_localDireCos; }
45 int TGCid() const { return m_TGCid; }
46 double energyDeposit() const { return static_cast<double>(m_energyDeposit); }
47 double stepLength() const { return static_cast<double>(m_stepLength); }
48 int particleEncoding() const { return m_particleEncoding; }
49 double kineticEnergy() const { return static_cast<double>(m_kineticEnergy); }
50
51 std::string print() const;
52 bool operator< (const TGCSimHit& rhs) const
53 { return m_TGCid < rhs.m_TGCid; }
54 double meanTime() const;
55
56 // truth barcode of the track which released this energy:
57 int truthBarcode() const;
58
59 // GenParticle::id of the track which released this energy:
60 int truthID() const;
61
62// link to the particle generating the hit
63 const HepMcParticleLink& particleLink() const;
64
65 void setGlobalTime( const double time ) { m_globalTime = time; }
66
67private:
68 //
69 // member data
70 //
78 int m_particleEncoding; // PDG id
79 float m_kineticEnergy; // kinetic energy of the particle
80
81};
82//inline methods
83
84inline double TGCSimHit::meanTime() const
85 { return (double) m_globalTime; }
86
88 { return m_partLink; }
89
90
91// open functions
92
93inline float hitTime(const TGCSimHit& hit)
94 { return (float) hit.meanTime(); }
95
96
97#endif
float hitTime(const TGCSimHit &hit)
Definition TGCSimHit.h:93
double kineticEnergy() const
Definition TGCSimHit.h:49
void setGlobalTime(const double time)
Definition TGCSimHit.h:65
Amg::Vector3D m_localDireCos
Definition TGCSimHit.h:74
double globalTime() const
Definition TGCSimHit.h:42
int particleEncoding() const
Definition TGCSimHit.h:48
float m_stepLength
Definition TGCSimHit.h:77
int TGCid() const
Definition TGCSimHit.h:45
float m_kineticEnergy
Definition TGCSimHit.h:79
double energyDeposit() const
Definition TGCSimHit.h:46
float m_energyDeposit
Definition TGCSimHit.h:76
int truthBarcode() const
Amg::Vector3D m_localPosition
Definition TGCSimHit.h:73
float m_globalTime
Definition TGCSimHit.h:72
HepMcParticleLink m_partLink
Definition TGCSimHit.h:75
int m_particleEncoding
Definition TGCSimHit.h:78
int m_TGCid
Definition TGCSimHit.h:71
double stepLength() const
Definition TGCSimHit.h:47
const Amg::Vector3D & localDireCos() const
Definition TGCSimHit.h:44
std::string print() const
Definition TGCSimHit.cxx:90
double meanTime() const
Definition TGCSimHit.h:84
int truthID() const
bool operator<(const TGCSimHit &rhs) const
Definition TGCSimHit.h:52
const Amg::Vector3D & localPosition() const
Definition TGCSimHit.h:43
const HepMcParticleLink & particleLink() const
Definition TGCSimHit.h:87
Eigen::Matrix< double, 3, 1 > Vector3D