ATLAS Offline Software
FPGATrackSimTruthTrack.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 TRIGFPGATrackSimOBJECTS_FPGATrackSimTRUTHTRACK_H
6 #define TRIGFPGATrackSimOBJECTS_FPGATrackSimTRUTHTRACK_H
7 
8 #include <TObject.h>
9 #include <TMath.h>
10 
13 
15 public:
17  virtual ~FPGATrackSimTruthTrack() = default;
18 
19  void setD0(double v) { m_d0 = v; }
20  void setZ0(double v) { m_z0 = v; }
21 
22  void setVtxX(double v) { m_vtx_x = v; }
23  void setVtxY(double v) { m_vtx_y = v; }
24  void setVtxZ(double v) { m_vtx_z = v; }
25  void setPX(double v) { m_px = v; }
26  void setPY(double v) { m_py = v; }
27  void setPZ(double v) { m_pz = v; }
28 
29  void setQ(int v) { m_q = v; }
30 
31  void setPDGCode(int v) { m_pdgcode = v; }
32  void setStatus(int v) { m_status = v; }
35  void setEventIndex(int v) { m_evtindex = v; }
37 
38 
39  double getPt() const { return TMath::Sqrt(m_px * m_px + m_py * m_py); }
40  double getEta() const { return TMath::ASinH(m_pz / TMath::Sqrt(m_px * m_px + m_py * m_py)); }
41  double getPhi() const { return TMath::ATan2(m_py, m_px); }
42  double getD0() const { return m_d0; }
43  double getZ0() const { return m_z0; }
44 
45  double getVtxX() const { return m_vtx_x; }
46  double getVtxY() const { return m_vtx_y; }
47  double getVtxZ() const { return m_vtx_z; }
48  double getIP() const { return TMath::Sqrt(m_vtx_x * m_vtx_x + m_vtx_y * m_vtx_y); }
49  double getPX() const { return m_px; }
50  double getPY() const { return m_py; }
51  double getPZ() const { return m_pz; }
52 
53  int getQ() const { return m_q; }
54  double getHalfInvPt() const { return static_cast<double>(m_q) / (2 * getPt()); }
55  double getQOverPt() const { return static_cast<double>(m_q) / getPt(); }
56 
57  int getPDGCode() const { return m_pdgcode; }
58  int getStatus() const { return m_status; }
59  int status() const { return m_status; }
63 
64  int getEventIndex() const { return m_evtindex; }
65  double getBarcodeFracOffline() const { return m_barcode_frac_offline; }
66 
67 
70  pars.qOverPt = getQ() / getPt();
71  pars.eta = getEta();
72  pars.phi = getPhi();
73  pars.d0 = getD0();
74  pars.z0 = getZ0();
75 
76  return pars;
77  }
78 
79 
80 private:
81  double m_d0;
82  double m_z0;
83 
84  double m_vtx_x;
85  double m_vtx_y;
86  double m_vtx_z;
87  double m_px; // MeV
88  double m_py;
89  double m_pz;
90 
91  int m_q;
92 
93  int m_pdgcode;
94  int m_status;
98  double m_barcode_frac_offline; // largest "matching fraction" with any "good"
99  // xAOD::TruthParticle, corresponding to the
100  // particle with m_barcode
101 
102 
103  ClassDefNV(FPGATrackSimTruthTrack, 5)
104 };
105 
106 #endif // TRIGFPGATrackSimOBJECTS_FPGATrackSimTRUTHTRACK_H
FPGATrackSimTruthTrack::m_px
double m_px
Definition: FPGATrackSimTruthTrack.h:87
FPGATrackSimTruthTrack::m_py
double m_py
Definition: FPGATrackSimTruthTrack.h:88
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
FPGATrackSimTruthTrack::m_vtx_z
double m_vtx_z
Definition: FPGATrackSimTruthTrack.h:86
FPGATrackSimTruthTrack::getPZ
double getPZ() const
Definition: FPGATrackSimTruthTrack.h:51
FPGATrackSimTruthTrack::getPt
double getPt() const
Definition: FPGATrackSimTruthTrack.h:39
FPGATrackSimTruthTrack::getQ
int getQ() const
Definition: FPGATrackSimTruthTrack.h:53
FPGATrackSimTruthTrack::getVtxY
double getVtxY() const
Definition: FPGATrackSimTruthTrack.h:46
FPGATrackSimTrackPars
Definition: FPGATrackSimTrackPars.h:22
FPGATrackSimTruthTrack::getVtxX
double getVtxX() const
Definition: FPGATrackSimTruthTrack.h:45
FPGATrackSimTruthTrack
Definition: FPGATrackSimTruthTrack.h:14
FPGATrackSimTruthTrack::setPX
void setPX(double v)
Definition: FPGATrackSimTruthTrack.h:25
FPGATrackSimTruthTrack::getPX
double getPX() const
Definition: FPGATrackSimTruthTrack.h:49
FPGATrackSimTruthTrack::getZ0
double getZ0() const
Definition: FPGATrackSimTruthTrack.h:43
FPGATrackSimTruthTrack::setPZ
void setPZ(double v)
Definition: FPGATrackSimTruthTrack.h:27
FPGATrackSimTruthTrack::setBarcodeFracOffline
void setBarcodeFracOffline(double v)
Definition: FPGATrackSimTruthTrack.h:36
FPGATrackSimTruthTrack::getPY
double getPY() const
Definition: FPGATrackSimTruthTrack.h:50
FPGATrackSimTruthTrack::setVtxZ
void setVtxZ(double v)
Definition: FPGATrackSimTruthTrack.h:24
FPGATrackSimTruthTrack::getUniqueID
HepMcParticleLink::barcode_type getUniqueID() const
Definition: FPGATrackSimTruthTrack.h:61
FPGATrackSimTruthTrack::m_vtx_y
double m_vtx_y
Definition: FPGATrackSimTruthTrack.h:85
FPGATrackSimTruthTrack::getIP
double getIP() const
Definition: FPGATrackSimTruthTrack.h:48
FPGATrackSimTruthTrack::getVtxZ
double getVtxZ() const
Definition: FPGATrackSimTruthTrack.h:47
FPGATrackSimTruthTrack::m_vtx_x
double m_vtx_x
Definition: FPGATrackSimTruthTrack.h:84
FPGATrackSimTruthTrack::FPGATrackSimTruthTrack
FPGATrackSimTruthTrack()
Definition: FPGATrackSimTruthTrack.cxx:7
FPGATrackSimTruthTrack::m_pz
double m_pz
Definition: FPGATrackSimTruthTrack.h:89
FPGATrackSimTruthTrack::m_pdgcode
int m_pdgcode
Definition: FPGATrackSimTruthTrack.h:93
FPGATrackSimTruthTrack::setD0
void setD0(double v)
Definition: FPGATrackSimTruthTrack.h:19
FPGATrackSimTruthTrack::setEventIndex
void setEventIndex(int v)
Definition: FPGATrackSimTruthTrack.h:35
FPGATrackSimTruthTrack::getBarcodeFracOffline
double getBarcodeFracOffline() const
Definition: FPGATrackSimTruthTrack.h:65
FPGATrackSimTruthTrack::getStatus
int getStatus() const
Definition: FPGATrackSimTruthTrack.h:58
FPGATrackSimTruthTrack::m_evtindex
int m_evtindex
Definition: FPGATrackSimTruthTrack.h:97
FPGATrackSimTruthTrack::getD0
double getD0() const
Definition: FPGATrackSimTruthTrack.h:42
FPGATrackSimTruthTrack::m_barcode_frac_offline
double m_barcode_frac_offline
Definition: FPGATrackSimTruthTrack.h:98
FPGATrackSimTruthTrack::getPDGCode
int getPDGCode() const
Definition: FPGATrackSimTruthTrack.h:57
FPGATrackSimTruthTrack::barcode
HepMcParticleLink::barcode_type barcode() const
Definition: FPGATrackSimTruthTrack.h:62
FPGATrackSimTruthTrack::status
int status() const
Definition: FPGATrackSimTruthTrack.h:59
FPGATrackSimTruthTrack::setZ0
void setZ0(double v)
Definition: FPGATrackSimTruthTrack.h:20
FPGATrackSimTruthTrack::setUniqueID
void setUniqueID(const HepMcParticleLink::barcode_type &v)
Definition: FPGATrackSimTruthTrack.h:34
FPGATrackSimTruthTrack::m_q
int m_q
Definition: FPGATrackSimTruthTrack.h:91
FPGATrackSimTruthTrack::setPY
void setPY(double v)
Definition: FPGATrackSimTruthTrack.h:26
python.PyAthena.v
v
Definition: PyAthena.py:154
FPGATrackSimTruthTrack::m_barcode
HepMcParticleLink::barcode_type m_barcode
Definition: FPGATrackSimTruthTrack.h:95
FPGATrackSimTruthTrack::getEventIndex
int getEventIndex() const
Definition: FPGATrackSimTruthTrack.h:64
FPGATrackSimTruthTrack::getEta
double getEta() const
Definition: FPGATrackSimTruthTrack.h:40
FPGATrackSimTruthTrack::m_status
int m_status
Definition: FPGATrackSimTruthTrack.h:94
FPGATrackSimTruthTrack::setVtxY
void setVtxY(double v)
Definition: FPGATrackSimTruthTrack.h:23
FPGATrackSimTruthTrack::getHalfInvPt
double getHalfInvPt() const
Definition: FPGATrackSimTruthTrack.h:54
FPGATrackSimTruthTrack::m_uniqueID
HepMcParticleLink::barcode_type m_uniqueID
Definition: FPGATrackSimTruthTrack.h:96
FPGATrackSimTruthTrack::~FPGATrackSimTruthTrack
virtual ~FPGATrackSimTruthTrack()=default
FPGATrackSimTruthTrack::setPDGCode
void setPDGCode(int v)
Definition: FPGATrackSimTruthTrack.h:31
FPGATrackSimTruthTrack::getPhi
double getPhi() const
Definition: FPGATrackSimTruthTrack.h:41
FPGATrackSimTruthTrack::setStatus
void setStatus(int v)
Definition: FPGATrackSimTruthTrack.h:32
FPGATrackSimTruthTrack::getQOverPt
double getQOverPt() const
Definition: FPGATrackSimTruthTrack.h:55
FPGATrackSimTruthTrack::getBarcode
HepMcParticleLink::barcode_type getBarcode() const
Definition: FPGATrackSimTruthTrack.h:60
FPGATrackSimTruthTrack::m_z0
double m_z0
Definition: FPGATrackSimTruthTrack.h:82
FPGATrackSimTruthTrack::setBarcode
void setBarcode(const HepMcParticleLink::barcode_type &v)
Definition: FPGATrackSimTruthTrack.h:33
FPGATrackSimTruthTrack::setQ
void setQ(int v)
Definition: FPGATrackSimTruthTrack.h:29
FPGATrackSimTruthTrack::m_d0
double m_d0
Definition: FPGATrackSimTruthTrack.h:81
FPGATrackSimTruthTrack::getPars
FPGATrackSimTrackPars getPars() const
Definition: FPGATrackSimTruthTrack.h:68
FPGATrackSimTrackPars.h
Structs that store the 5 track parameters.
FPGATrackSimTruthTrack::setVtxX
void setVtxX(double v)
Definition: FPGATrackSimTruthTrack.h:22
LArGeo::ATan2
GeoGenfun::FunctionNoop ATan2(GeoGenfun::GENFUNCTION y, GeoGenfun::GENFUNCTION x)
Definition: BarrelAuxFunctions.cxx:50