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