ATLAS Offline Software
FPGATrackSimTrackStream.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_FPGATrackSimTRACKSTREAM_H
6 #define TRIGFPGATrackSimOBJECTS_FPGATrackSimTRACKSTREAM_H
7 
8 #include "FPGATrackSimTrack.h"
9 
10 #include <TClonesArray.h>
11 
12 #include <iostream>
13 #include <utility>
14 
16 
17 public:
20  virtual ~FPGATrackSimTrackStream();
22 
23  const unsigned long& runNumber() const { return m_run_number; }
24  const unsigned long& eventNumber() const { return m_event_number; }
25  void setRunNumber(const unsigned long& val) { m_run_number = val; }
26  void setEventNumber(const unsigned long& val) { m_event_number = val; }
27 
28  void addTrack(const FPGATrackSimTrack&);
29  FPGATrackSimTrack* getTrack(int) const;
30  int findTrack(int trackid, int bankid);
31  int getNTracks() const { return m_ntracks; }
32  void buildTrackMap();
33 
34  void addTrackI(const FPGATrackSimTrack&);
35  FPGATrackSimTrack* getTrackI(int) const;
36  int getNTracksI() const { return m_ntracksI; }
37 
38  int getNConn() const { return m_nconn; }
40 
41  void addNCombs(int v) { m_ncombs += v; }
42  void addNFits(int v) { m_nfits += v; }
43  void addNFitsMajority(int v) { m_nfits_maj += v; }
46  void addNFitsRecovery(int v) { m_nfits_rec += v; }
48  void addNFitsBad(int v) { m_nfits_bad += v; }
49  void addNFitsHWRejected(int v) { m_nfits_rej += v; }
52  void addNConnections(int v) { m_nconn += v; }
54 
55  int getNCombs() const { return m_ncombs; }
56  int getNFits() const { return m_nfits; }
57  int getNFitsMajority() const { return m_nfits_maj; }
58  int getNFitsMajority_pix() const { return m_nfits_maj_pix; }
59  int getNFitsMajority_SCT() const { return m_nfits_maj_SCT; }
60  int getNFitsRecovery() const { return m_nfits_rec; }
61  int getNAddFitsRecovery() const { return m_nfits_addrec; }
62  int getNFitsBad() const { return m_nfits_bad; }
63  int getNFitsHWRejected() const { return m_nfits_rej; }
64  int getNFitsBadMajority() const { return m_nfits_badmaj; }
66  int getNConnections() const { return m_nconn; }
67 
68  void addNCombsI(int v) { m_ncombsI += v; }
69  void addNFitsI(int v) { m_nfitsI += v; }
70  void addNFitsMajorityI(int v) { m_nfits_majI += v; }
73  void addNFitsRecoveryI(int v) { m_nfits_recI += v; }
75  void addNFitsBadI(int v) { m_nfits_badI += v; }
76  void addNFitsHWRejectedI(int v) { m_nfits_rejI += v; }
79 
80  int getNCombsI() const { return m_ncombsI; }
81  int getNFitsI() const { return m_nfitsI; }
82  int getNFitsMajorityI() const { return m_nfits_majI; }
83  int getNFitsMajorityI_pix() const { return m_nfits_majI_pix; }
84  int getNFitsMajorityI_SCT() const { return m_nfits_majI_SCT; }
85  int getNFitsRecoveryI() const { return m_nfits_recI; }
86  int getNAddFitsRecoveryI() const { return m_nfits_addrecI; }
87  int getNFitsBadI() const { return m_nfits_badI; }
88  int getNFitsHWRejectedI() const { return m_nfits_rejI; }
89  int getNFitsBadMajorityI() const { return m_nfits_badmajI; }
91 
92  void clear();
93 
94  int Print(int level = 0, std::ostream& out = std::cout);
95 
96 private:
97  unsigned long m_run_number; // run number
98  unsigned long m_event_number; // event number
99 
100  int m_ntracks; // number of stored tracks
101  TClonesArray* m_tracks; //-> list of stored tracks
102 
103  int m_ncombs; // number of combinations
104  int m_nfits; // number of fitted combinations
105  int m_nfits_maj; // number of fitted combinations in majority roads
106  int m_nfits_maj_SCT; // number of fitted combinations in majority roads, missing hit in SCT layer
107  int m_nfits_maj_pix; // number of fitted combinations in majority roads, missing hit in pixel layer
108  int m_nfits_rec; // number of full fits attempted to recover
109  int m_nfits_addrec; // additional fits performed because the recovery
110  int m_nfits_bad; // # fits with a bad chi^2
111  int m_nfits_rej; // # of fits rejected because the HW
112  int m_nfits_badmaj; // # fits with a bad chi^2
113  int m_nfits_rejmaj; // # of fits rejected because the HW
114  /* PS: m_ntracks, if only good tracks are saved, has to be equal
115  to m_nfits-m_nfits_bad-m_nfits_rej */
116 
117  int m_ntracksI; // number of stored tracks in the intermediate step
118 
119  TClonesArray* m_tracksI; //-> list of stored tracks in the intermedieate step
120 
121 
122  // duplicate the counters for the 2nd stage
124  int m_nfitsI;
134  int m_nconn;
136 
137  std::map< std::pair<int, int>, int > m_trackIdMap;
138  // Used to optimize the findTrack function.
139 
140  ClassDefNV(FPGATrackSimTrackStream, 2)
141 };
142 
143 
144 #endif // TRIGFPGATrackSimOBJECTS_FPGATrackSimTRACKSTREAM_H
FPGATrackSimTrackStream::m_nfits_maj_SCT
int m_nfits_maj_SCT
Definition: FPGATrackSimTrackStream.h:106
FPGATrackSimTrackStream::getTrackI
FPGATrackSimTrack * getTrackI(int) const
return a given track, identified by its position in the list
Definition: FPGATrackSimTrackStream.cxx:169
FPGATrackSimTrackStream::findTrack
int findTrack(int trackid, int bankid)
this method, passing a track ID and a bank ID, return the ID of the corresponding track.
Definition: FPGATrackSimTrackStream.cxx:147
FPGATrackSimTrackStream::addNAddFitsRecovery
void addNAddFitsRecovery(int v)
Definition: FPGATrackSimTrackStream.h:47
FPGATrackSimTrackStream::getNTracks
int getNTracks() const
Definition: FPGATrackSimTrackStream.h:31
FPGATrackSimTrackStream::getNFitsMajorityI_SCT
int getNFitsMajorityI_SCT() const
Definition: FPGATrackSimTrackStream.h:84
FPGATrackSimTrackStream::m_nfits_maj
int m_nfits_maj
Definition: FPGATrackSimTrackStream.h:105
FPGATrackSimTrackStream::getNFitsI
int getNFitsI() const
Definition: FPGATrackSimTrackStream.h:81
FPGATrackSimTrackStream::m_nfits_majI
int m_nfits_majI
Definition: FPGATrackSimTrackStream.h:125
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
FPGATrackSimTrackStream::m_nconn
int m_nconn
Definition: FPGATrackSimTrackStream.h:134
FPGATrackSimTrackStream::m_nextrapolatedTracks
int m_nextrapolatedTracks
Definition: FPGATrackSimTrackStream.h:135
FPGATrackSimTrackStream::getNFitsHWRejectedI
int getNFitsHWRejectedI() const
Definition: FPGATrackSimTrackStream.h:88
FPGATrackSimTrackStream::addNFitsBad
void addNFitsBad(int v)
Definition: FPGATrackSimTrackStream.h:48
FPGATrackSimTrackStream::m_nfits_majI_SCT
int m_nfits_majI_SCT
Definition: FPGATrackSimTrackStream.h:126
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:18
FPGATrackSimTrackStream::m_nfits_rejI
int m_nfits_rejI
Definition: FPGATrackSimTrackStream.h:131
FPGATrackSimTrackStream::getNFitsRecoveryI
int getNFitsRecoveryI() const
Definition: FPGATrackSimTrackStream.h:85
FPGATrackSimTrackStream::addNFitsMajority_pix
void addNFitsMajority_pix(int v)
Definition: FPGATrackSimTrackStream.h:44
FPGATrackSimTrackStream::getNExtrapolatedTracks
int getNExtrapolatedTracks() const
Definition: FPGATrackSimTrackStream.h:39
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
FPGATrackSimTrackStream::getNFitsMajorityI
int getNFitsMajorityI() const
Definition: FPGATrackSimTrackStream.h:82
FPGATrackSimTrackStream::getNFitsBadMajority
int getNFitsBadMajority() const
Definition: FPGATrackSimTrackStream.h:64
FPGATrackSimTrackStream::m_nfits_rejmaj
int m_nfits_rejmaj
Definition: FPGATrackSimTrackStream.h:113
FPGATrackSimTrackStream::m_ntracks
int m_ntracks
Definition: FPGATrackSimTrackStream.h:100
FPGATrackSimTrackStream::addNFitsHWRejectedMajorityI
void addNFitsHWRejectedMajorityI(int v)
Definition: FPGATrackSimTrackStream.h:78
FPGATrackSimTrackStream::addNCombsI
void addNCombsI(int v)
Definition: FPGATrackSimTrackStream.h:68
FPGATrackSimTrackStream::getNConn
int getNConn() const
Definition: FPGATrackSimTrackStream.h:38
FPGATrackSimTrackStream::getNAddFitsRecoveryI
int getNAddFitsRecoveryI() const
Definition: FPGATrackSimTrackStream.h:86
FPGATrackSimTrackStream::m_nfits_addrecI
int m_nfits_addrecI
Definition: FPGATrackSimTrackStream.h:129
FPGATrackSimTrackStream::getNFitsHWRejectedMajority
int getNFitsHWRejectedMajority() const
Definition: FPGATrackSimTrackStream.h:65
FPGATrackSimTrackStream::addNAddFitsRecoveryI
void addNAddFitsRecoveryI(int v)
Definition: FPGATrackSimTrackStream.h:74
FPGATrackSimTrackStream::addNFitsBadMajorityI
void addNFitsBadMajorityI(int v)
Definition: FPGATrackSimTrackStream.h:77
FPGATrackSimTrackStream::addNFitsRecovery
void addNFitsRecovery(int v)
Definition: FPGATrackSimTrackStream.h:46
FPGATrackSimTrackStream::getNFitsMajority
int getNFitsMajority() const
Definition: FPGATrackSimTrackStream.h:57
FPGATrackSimTrackStream::FPGATrackSimTrackStream
FPGATrackSimTrackStream()
Definition: FPGATrackSimTrackStream.cxx:11
FPGATrackSimTrackStream::m_nfits_badI
int m_nfits_badI
Definition: FPGATrackSimTrackStream.h:130
FPGATrackSimTrackStream::m_event_number
unsigned long m_event_number
Definition: FPGATrackSimTrackStream.h:98
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
FPGATrackSimTrackStream::~FPGATrackSimTrackStream
virtual ~FPGATrackSimTrackStream()
Definition: FPGATrackSimTrackStream.cxx:76
FPGATrackSimTrackStream::m_nfits_badmaj
int m_nfits_badmaj
Definition: FPGATrackSimTrackStream.h:112
FPGATrackSimTrackStream::addNFitsMajority
void addNFitsMajority(int v)
Definition: FPGATrackSimTrackStream.h:43
FPGATrackSimTrackStream::Print
int Print(int level=0, std::ostream &out=std::cout)
print a debug message summaryzing the information for the tracks found in one event for a given bank.
Definition: FPGATrackSimTrackStream.cxx:222
FPGATrackSimTrackStream::getNFitsMajorityI_pix
int getNFitsMajorityI_pix() const
Definition: FPGATrackSimTrackStream.h:83
FPGATrackSimTrackStream::getNConnections
int getNConnections() const
Definition: FPGATrackSimTrackStream.h:66
FPGATrackSimTrackStream::setRunNumber
void setRunNumber(const unsigned long &val)
Definition: FPGATrackSimTrackStream.h:25
FPGATrackSimTrackStream::m_nfits_badmajI
int m_nfits_badmajI
Definition: FPGATrackSimTrackStream.h:132
FPGATrackSimTrackStream::m_trackIdMap
std::map< std::pair< int, int >, int > m_trackIdMap
Definition: FPGATrackSimTrackStream.h:137
FPGATrackSimTrackStream::getNCombsI
int getNCombsI() const
Definition: FPGATrackSimTrackStream.h:80
FPGATrackSimTrackStream::setEventNumber
void setEventNumber(const unsigned long &val)
Definition: FPGATrackSimTrackStream.h:26
FPGATrackSimTrackStream::getNFitsMajority_SCT
int getNFitsMajority_SCT() const
Definition: FPGATrackSimTrackStream.h:59
FPGATrackSimTrackStream::m_nfitsI
int m_nfitsI
Definition: FPGATrackSimTrackStream.h:124
FPGATrackSimTrackStream::m_nfits
int m_nfits
Definition: FPGATrackSimTrackStream.h:104
FPGATrackSimTrackStream::addTrackI
void addTrackI(const FPGATrackSimTrack &)
add a track in the final list
Definition: FPGATrackSimTrackStream.cxx:161
FPGATrackSimTrackStream::addTrack
void addTrack(const FPGATrackSimTrack &)
add a track in the final list
Definition: FPGATrackSimTrackStream.cxx:130
FPGATrackSimTrackStream::addNFitsMajorityI_pix
void addNFitsMajorityI_pix(int v)
Definition: FPGATrackSimTrackStream.h:71
FPGATrackSimTrackStream::getNFitsRecovery
int getNFitsRecovery() const
Definition: FPGATrackSimTrackStream.h:60
FPGATrackSimTrackStream::m_nfits_rej
int m_nfits_rej
Definition: FPGATrackSimTrackStream.h:111
FPGATrackSimTrackStream::m_run_number
unsigned long m_run_number
Definition: FPGATrackSimTrackStream.h:97
FPGATrackSimTrackStream::getNAddFitsRecovery
int getNAddFitsRecovery() const
Definition: FPGATrackSimTrackStream.h:61
FPGATrackSimTrackStream::operator=
FPGATrackSimTrackStream & operator=(const FPGATrackSimTrackStream &s)
Definition: FPGATrackSimTrackStream.cxx:28
FPGATrackSimTrackStream::addNFitsI
void addNFitsI(int v)
Definition: FPGATrackSimTrackStream.h:69
FPGATrackSimTrackStream::m_nfits_maj_pix
int m_nfits_maj_pix
Definition: FPGATrackSimTrackStream.h:107
FPGATrackSimTrackStream::getNFitsHWRejected
int getNFitsHWRejected() const
Definition: FPGATrackSimTrackStream.h:63
FPGATrackSimTrackStream::addNExtrapolatedTracks
void addNExtrapolatedTracks(int v)
Definition: FPGATrackSimTrackStream.h:53
FPGATrackSimTrackStream::clear
void clear()
reset the list of the tracks and the statistical informatino collected for this event
Definition: FPGATrackSimTrackStream.cxx:177
FPGATrackSimTrackStream::getNFitsBad
int getNFitsBad() const
Definition: FPGATrackSimTrackStream.h:62
FPGATrackSimTrackStream::addNFitsHWRejected
void addNFitsHWRejected(int v)
Definition: FPGATrackSimTrackStream.h:49
FPGATrackSimTrackStream::m_ncombs
int m_ncombs
Definition: FPGATrackSimTrackStream.h:103
FPGATrackSimTrackStream::getNFitsHWRejectedMajorityI
int getNFitsHWRejectedMajorityI() const
Definition: FPGATrackSimTrackStream.h:90
FPGATrackSimTrackStream::addNFitsMajority_SCT
void addNFitsMajority_SCT(int v)
Definition: FPGATrackSimTrackStream.h:45
FPGATrackSimTrackStream::m_nfits_bad
int m_nfits_bad
Definition: FPGATrackSimTrackStream.h:110
FPGATrackSimTrackStream::eventNumber
const unsigned long & eventNumber() const
Definition: FPGATrackSimTrackStream.h:24
python.PyAthena.v
v
Definition: PyAthena.py:154
FPGATrackSimTrackStream::getNCombs
int getNCombs() const
Definition: FPGATrackSimTrackStream.h:55
FPGATrackSimTrackStream::addNFitsBadI
void addNFitsBadI(int v)
Definition: FPGATrackSimTrackStream.h:75
FPGATrackSimTrackStream::m_nfits_majI_pix
int m_nfits_majI_pix
Definition: FPGATrackSimTrackStream.h:127
FPGATrackSimTrackStream::getTrack
FPGATrackSimTrack * getTrack(int) const
return a given track, identified by its position in the list
Definition: FPGATrackSimTrackStream.cxx:139
FPGATrackSimTrackStream::addNFitsBadMajority
void addNFitsBadMajority(int v)
Definition: FPGATrackSimTrackStream.h:50
FPGATrackSimTrackStream::runNumber
const unsigned long & runNumber() const
Definition: FPGATrackSimTrackStream.h:23
FPGATrackSimTrackStream::m_nfits_rec
int m_nfits_rec
Definition: FPGATrackSimTrackStream.h:108
FPGATrackSimTrackStream::getNFitsMajority_pix
int getNFitsMajority_pix() const
Definition: FPGATrackSimTrackStream.h:58
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
FPGATrackSimTrackStream::buildTrackMap
void buildTrackMap()
Definition: FPGATrackSimTrackStream.cxx:237
FPGATrackSimTrackStream::m_tracks
TClonesArray * m_tracks
Definition: FPGATrackSimTrackStream.h:101
FPGATrackSimTrackStream::addNFits
void addNFits(int v)
Definition: FPGATrackSimTrackStream.h:42
FPGATrackSimTrackStream::m_ntracksI
int m_ntracksI
Definition: FPGATrackSimTrackStream.h:117
FPGATrackSimTrackStream
Definition: FPGATrackSimTrackStream.h:15
FPGATrackSimTrackStream::m_nfits_addrec
int m_nfits_addrec
Definition: FPGATrackSimTrackStream.h:109
FPGATrackSimTrackStream::addNFitsHWRejectedI
void addNFitsHWRejectedI(int v)
Definition: FPGATrackSimTrackStream.h:76
FPGATrackSimTrackStream::addNFitsMajorityI
void addNFitsMajorityI(int v)
Definition: FPGATrackSimTrackStream.h:70
FPGATrackSimTrackStream::addNFitsRecoveryI
void addNFitsRecoveryI(int v)
Definition: FPGATrackSimTrackStream.h:73
FPGATrackSimTrackStream::m_ncombsI
int m_ncombsI
Definition: FPGATrackSimTrackStream.h:123
FPGATrackSimTrackStream::addNFitsMajorityI_SCT
void addNFitsMajorityI_SCT(int v)
Definition: FPGATrackSimTrackStream.h:72
FPGATrackSimTrackStream::addNCombs
void addNCombs(int v)
Definition: FPGATrackSimTrackStream.h:41
FPGATrackSimTrackStream::getNFitsBadI
int getNFitsBadI() const
Definition: FPGATrackSimTrackStream.h:87
FPGATrackSimTrackStream::getNTracksI
int getNTracksI() const
Definition: FPGATrackSimTrackStream.h:36
FPGATrackSimTrackStream::getNFits
int getNFits() const
Definition: FPGATrackSimTrackStream.h:56
FPGATrackSimTrackStream::addNFitsHWRejectedMajority
void addNFitsHWRejectedMajority(int v)
Definition: FPGATrackSimTrackStream.h:51
FPGATrackSimTrackStream::addNConnections
void addNConnections(int v)
Definition: FPGATrackSimTrackStream.h:52
FPGATrackSimTrackStream::m_tracksI
TClonesArray * m_tracksI
Definition: FPGATrackSimTrackStream.h:119
FPGATrackSimTrack.h
FPGATrackSimTrackStream::getNFitsBadMajorityI
int getNFitsBadMajorityI() const
Definition: FPGATrackSimTrackStream.h:89
FPGATrackSimTrackStream::m_nfits_rejmajI
int m_nfits_rejmajI
Definition: FPGATrackSimTrackStream.h:133
FPGATrackSimTrackStream::m_nfits_recI
int m_nfits_recI
Definition: FPGATrackSimTrackStream.h:128