ATLAS Offline Software
Loading...
Searching...
No Matches
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
15public:
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; }
64
65 int getEventIndex() const { return m_evtindex; }
67
68
71 pars.qOverPt = getQ() / getPt();
72 pars.eta = getEta();
73 pars.phi = getPhi();
74 pars.d0 = getD0();
75 pars.z0 = getZ0();
76
77 return pars;
78 }
79
80
81private:
82 double m_d0;
83 double m_z0;
84
85 double m_vtx_x;
86 double m_vtx_y;
87 double m_vtx_z;
88 double m_px; // MeV
89 double m_py;
90 double m_pz;
91
92 int m_q;
93
99 double m_barcode_frac_offline; // largest "matching fraction" with any "good"
100 // xAOD::TruthParticle, corresponding to the
101 // particle with m_barcode
102
103
104 ClassDefNV(FPGATrackSimTruthTrack, 5)
105};
106
107#endif // TRIGFPGATrackSimOBJECTS_FPGATrackSimTRUTHTRACK_H
Structs that store the 5 track parameters.
HepMcParticleLink::barcode_type m_uniqueID
HepMcParticleLink::barcode_type getBarcode() const
void setUniqueID(const HepMcParticleLink::barcode_type &v)
HepMcParticleLink::barcode_type m_barcode
virtual ~FPGATrackSimTruthTrack()=default
HepMcParticleLink::barcode_type id() const
void setBarcode(const HepMcParticleLink::barcode_type &v)
HepMcParticleLink::barcode_type barcode() const
HepMcParticleLink::barcode_type getUniqueID() const
FPGATrackSimTrackPars getPars() const