ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimOfflineTrack.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGFPGATrackSimOBJECTS_FPGATrackSimOFFLINETRACK_H
6#define TRIGFPGATrackSimOBJECTS_FPGATrackSimOFFLINETRACK_H
7
9#include <cmath>
10#include <TObject.h>
11
13public:
15 virtual ~FPGATrackSimOfflineTrack() = default;
16
17 void setQOverPt(double v) { m_qoverpt = v; }
18 void setEta(double v) { m_eta = v; }
19 void setPhi(double v) { m_phi = v; }
20 void setD0(double v) { m_d0 = v; }
21 void setZ0(double v) { m_z0 = v; }
22 void setBarcode(unsigned long v) { m_barcode = v; }
23 void setBarcodeFrac(float v) { m_barcode_frac = v; }
24
25 double getPt() const { return m_qoverpt != 0 ? std::abs(sin(2 * std::atan(std::exp(-m_eta))) / m_qoverpt) : 99999999.; }
26 double getEta() const { return m_eta; }
27 double getPhi() const { return m_phi; }
28 double getD0() const { return m_d0; }
29 double getZ0() const { return m_z0; }
30 double getQOverPt() const { return m_qoverpt / sin(2 * std::atan(std::exp(-m_eta))); }
31 unsigned long getBarcode() const { return m_barcode; }
32 double getBarcodeFrac() const { return m_barcode_frac; }
33
34 // handling hits
35 const std::vector<FPGATrackSimOfflineHit>& getOfflineHits() const { return m_hits; }
36 int nHits() const { return m_hits.size(); }
37 void addHit(const FPGATrackSimOfflineHit& s) { m_hits.push_back(s); }
38
39
40private:
41 // This is actually qoverp instead of qoverpt. (qoverpt = qoverp / sin(theta)),
42 // where theta = 2 * atan(exp(-eta)). We can fix this in the next round.
43 // The current workaround is to change the get functions.
44 double m_qoverpt;
45 double m_eta;
46 double m_phi;
47 double m_d0;
48 double m_z0;
49
50 unsigned long m_barcode; // matched geant particle barcode
51 double m_barcode_frac; // largest "matching fraction" with any "good"
52 // geant particle, corresponding to the
53 // particle with m_barcode
54
55 std::vector<FPGATrackSimOfflineHit> m_hits;
56
57
58 ClassDefNV(FPGATrackSimOfflineTrack, 5)
59};
60
61std::ostream& operator<<(std::ostream&, const FPGATrackSimOfflineTrack&);
62#endif // TRIGFPGATrackSimOBJECTS_FPGATrackSimOFFLINETRACK_H
std::ostream & operator<<(std::ostream &, const FPGATrackSimOfflineTrack &)
void addHit(const FPGATrackSimOfflineHit &s)
virtual ~FPGATrackSimOfflineTrack()=default
const std::vector< FPGATrackSimOfflineHit > & getOfflineHits() const
std::vector< FPGATrackSimOfflineHit > m_hits