ATLAS Offline Software
AlignTrk.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETALIGNTRKINFO_ALIGNTRK_H
6 #define INDETALIGNTRKINFO_ALIGNTRK_H
7 // AlignTrk.h - transient copy of information in InDetAlignNt ntuple
8 // Richard Hawkings, started 13/4/04
9 // Ntuple contents are documented on ID alignment webpage
10 // http://rhawking.home.cern.ch/rhawking/atlas/aligntrk/welcome.html
11 
12 #include <vector>
15 
16 class AlignTrk {
17 
18 public:
19  // default constructor
20  AlignTrk();
21  // access methods
22  int nhits() const;
23  int noverlapPIX() const;
24  int noverlapSCT() const;
25  int nscat() const;
26  int irun() const;
27  int ievent() const;
28  int itrack() const;
29  int nholes() const;
30  int nshared() const;
31  float trkpar(int) const;
32  float trkcov(int) const;
33  int ikine() const;
34  float truetrkpar(int) const;
35  int ivtx() const;
36  float trpvtx(int) const;
37  float beampos(int) const;
38  float beamsigma(int) const;
39  float beamtilt(int) const;
40  float trtpt() const;
41  float trtpterr() const;
42  int ntrthits() const;
43 
44 
45  // set methods
46  void set_noverlapPIX(const int);
47  void set_noverlapSCT(const int);
48  void set_nscat(const int);
49  void set_irun(const int);
50  void set_ievent(const int);
51  void set_itrack(const int);
52  void set_nholes(const int);
53  void set_nshared(const int);
54  void set_trkpar(const float,const int);
55  void set_trkcov(const float,const int);
56  void set_ikine(const int);
57  void set_truetrkpar(const float,const int);
58  void set_ivtx(const int);
59  void set_trpvtx(const float,const int);
60  void set_beampos(const float, const int);
61  void set_beamsigma(const float, const int);
62  void set_beamtilt(const float, const int);
63  void set_trtcons(const float, const float);
66  std::vector<AlignSiHit>::const_iterator hitlist_cbegin() const;
67  std::vector<AlignSiHit>::const_iterator hitlist_cend() const;
68 
69  void add_hit(AlignSiHit&);
70 
71  void print() const;
72  void add_trthit(AlignTRTHit&);
75  std::vector<AlignTRTHit>::const_iterator trthitlist_cbegin() const;
76  std::vector<AlignTRTHit>::const_iterator trthitlist_cend() const;
77 
78  /* void add_overlaphit(AlignSiHit&); // in progress */
79 /* std::vector<AlignSiHit>::iterator overlaphitlist_begin(); */
80 /* std::vector<AlignSiHit>::iterator overlaphitlist_end(); */
81 /* std::vector<AlignSiHit>::const_iterator overlaphitlist_cbegin() const; */
82 /* std::vector<AlignSiHit>::const_iterator overlaphitlist_cend() const; */
83 
84 
85 private:
86  int m_nscat;
87  int m_irun;
88  int m_ievent;
89  int m_itrack;
90  int m_nholes;
91  int m_nshared;
94  float m_trkpar[5]{};
95  float m_trkcov[15]{};
96  int m_ikine;
97  float m_truetrkpar[5]{};
98  int m_ivtx;
99  float m_trpvtx[3]{};
100  float m_beampos[3]{};
101  float m_beamsigma[3]{};
102  float m_beamtilt[2]{};
103  float m_trtpt = 0.0F;
104  float m_trtpterr = 0.0F;
105  std::vector<AlignSiHit> m_hits;
106  std::vector<AlignTRTHit> m_trthits;
107  std::vector<AlignSiHit> m_overlaphits;
108 };
109 
110 inline int AlignTrk::nhits() const { return m_hits.size(); }
111 
112 inline int AlignTrk::noverlapPIX() const { return m_noverlapPIX; }
113 inline int AlignTrk::noverlapSCT() const { return m_noverlapSCT; }
114 
115 inline int AlignTrk::nscat() const { return m_nscat; }
116 inline int AlignTrk::irun() const { return m_irun; }
117 inline int AlignTrk::ievent() const { return m_ievent; }
118 inline int AlignTrk::itrack() const { return m_itrack; }
119 inline int AlignTrk::nholes() const { return m_nholes; }
120 inline int AlignTrk::nshared() const { return m_nshared; }
121 inline float AlignTrk::trkpar(int i) const { return m_trkpar[i-1]; }
122 inline float AlignTrk::trkcov(int i) const { return m_trkcov[i-1]; }
123 inline int AlignTrk::ikine() const { return m_ikine; }
124 inline float AlignTrk::truetrkpar(int i) const { return m_truetrkpar[i-1]; }
125 inline int AlignTrk::ivtx() const { return m_ivtx; }
126 inline float AlignTrk::trpvtx(int i) const { return m_trpvtx[i-1]; }
127 inline float AlignTrk::beampos(int i) const { return m_beampos[i-1]; }
128 inline float AlignTrk::beamsigma(int i) const { return m_beamsigma[i-1]; }
129 inline float AlignTrk::beamtilt(int i) const { return m_beamtilt[i-1]; }
130 inline float AlignTrk::trtpt() const { return m_trtpt; }
131 inline float AlignTrk::trtpterr() const { return m_trtpterr; }
132 inline int AlignTrk::ntrthits() const { return m_trthits.size(); }
133 
134 
135 inline void AlignTrk::set_noverlapPIX(const int i) { m_noverlapPIX=i; }
136 inline void AlignTrk::set_noverlapSCT(const int i) { m_noverlapSCT=i; }
137 
138 inline void AlignTrk::set_nscat(const int i) { m_nscat=i; }
139 inline void AlignTrk::set_irun(const int i) { m_irun=i; }
140 inline void AlignTrk::set_ievent(const int i) { m_ievent=i; }
141 inline void AlignTrk::set_itrack(const int i) { m_itrack=i; }
142 inline void AlignTrk::set_nholes(const int i) { m_nholes=i; }
143 inline void AlignTrk::set_nshared(const int i) { m_nshared=i; }
144 inline void AlignTrk::set_trkpar(const float f,const int i) { m_trkpar[i-1]=f;}
145 inline void AlignTrk::set_trkcov(const float f,const int i) { m_trkcov[i-1]=f;}
146 inline void AlignTrk::set_ikine(const int i) { m_ikine=i; }
147 inline void AlignTrk::set_truetrkpar(const float f,const int i)
148  { m_truetrkpar[i-1]=f; }
149 inline void AlignTrk::set_ivtx(const int i) { m_ivtx=i; }
150 inline void AlignTrk::set_trpvtx(const float f,const int i) { m_trpvtx[i-1]=f;}
151 inline void AlignTrk::set_beampos(const float f, const int i)
152  { m_beampos[i-1]=f;}
153 inline void AlignTrk::set_beamsigma(const float f, const int i)
154  { m_beamsigma[i-1]=f;}
155 inline void AlignTrk::set_beamtilt(const float f, const int i)
156  { m_beamtilt[i-1]=f;}
157 inline void AlignTrk::set_trtcons(const float pt, const float pterr)
158 { m_trtpt=pt; m_trtpterr=pterr; }
159 
160 
162 { return m_hits.begin(); }
164 { return m_hits.end(); }
165 inline std::vector<AlignSiHit>::const_iterator AlignTrk::hitlist_cbegin()
166 const { return m_hits.begin(); }
167 inline std::vector<AlignSiHit>::const_iterator AlignTrk::hitlist_cend()
168 const { return m_hits.end(); }
169 
171 { return m_trthits.begin(); }
173 { return m_trthits.end(); }
174 inline std::vector<AlignTRTHit>::const_iterator AlignTrk::trthitlist_cbegin()
175  const { return m_trthits.begin(); }
176 inline std::vector<AlignTRTHit>::const_iterator AlignTrk::trthitlist_cend()
177  const { return m_trthits.end(); }
178 
179 
180 /* inline std::vector<AlignSiHit>::iterator AlignTrk::overlaphitlist_begin() */
181 /* { return m_overlaphits.begin(); } */
182 /* inline std::vector<AlignSiHit>::iterator AlignTrk::overlaphitlist_end() */
183 /* { return m_overlaphits.end(); } */
184 
185 /* inline std::vector<AlignSiHit>::const_iterator AlignTrk::overlaphitlist_cbegin() */
186 /* const { return m_overlaphits.begin(); } */
187 /* inline std::vector<AlignSiHit>::const_iterator AlignTrk::overlaphitlist_cend() */
188 /* const { return m_overlaphits.end(); } */
189 
190 
191 inline void AlignTrk::add_hit(AlignSiHit& hit) { m_hits.push_back(hit); }
192 inline void AlignTrk::add_trthit(AlignTRTHit& hit) {m_trthits.push_back(hit);}
193 //inline void AlignTrk::add_overlaphit(AlignSiHit& hit) {m_overlaphits.push_back(hit);} //in progress
194 
195 #endif // INDETALIGNTRKINFO_ALIGNTRK_H
196 
197 
198 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AlignTrk::set_ikine
void set_ikine(const int)
Definition: AlignTrk.h:146
AlignTrk::set_noverlapSCT
void set_noverlapSCT(const int)
Definition: AlignTrk.h:136
AlignTrk::set_truetrkpar
void set_truetrkpar(const float, const int)
Definition: AlignTrk.h:147
AlignTrk::trpvtx
float trpvtx(int) const
Definition: AlignTrk.h:126
AlignTrk::set_trtcons
void set_trtcons(const float, const float)
Definition: AlignTrk.h:157
AlignTrk::trtpt
float trtpt() const
Definition: AlignTrk.h:130
AlignTrk::m_itrack
int m_itrack
Definition: AlignTrk.h:89
AlignTrk::set_nscat
void set_nscat(const int)
Definition: AlignTrk.h:138
AlignTrk::nholes
int nholes() const
Definition: AlignTrk.h:119
AlignTrk::m_trtpterr
float m_trtpterr
Definition: AlignTrk.h:104
AlignTrk::trthitlist_begin
std::vector< AlignTRTHit >::iterator trthitlist_begin()
Definition: AlignTrk.h:170
AlignTrk::m_nscat
int m_nscat
Definition: AlignTrk.h:86
AlignTrk::noverlapPIX
int noverlapPIX() const
Definition: AlignTrk.h:112
AlignTrk::nscat
int nscat() const
Definition: AlignTrk.h:115
AlignTrk::m_beamsigma
float m_beamsigma[3]
Definition: AlignTrk.h:101
AlignTrk::nhits
int nhits() const
Definition: AlignTrk.h:110
AlignTRTHit
Definition: AlignTRTHit.h:12
AlignTrk::set_beamsigma
void set_beamsigma(const float, const int)
Definition: AlignTrk.h:153
AlignTrk::set_ievent
void set_ievent(const int)
Definition: AlignTrk.h:140
AlignTrk::m_beamtilt
float m_beamtilt[2]
Definition: AlignTrk.h:102
test_pyathena.pt
pt
Definition: test_pyathena.py:11
AlignTrk::add_trthit
void add_trthit(AlignTRTHit &)
Definition: AlignTrk.h:192
AlignTrk::hitlist_cend
std::vector< AlignSiHit >::const_iterator hitlist_cend() const
Definition: AlignTrk.h:167
AlignTrk::m_trkpar
float m_trkpar[5]
Definition: AlignTrk.h:94
AlignTrk::ivtx
int ivtx() const
Definition: AlignTrk.h:125
AlignTrk::trthitlist_cbegin
std::vector< AlignTRTHit >::const_iterator trthitlist_cbegin() const
Definition: AlignTrk.h:174
AlignTRTHit.h
AlignTrk::m_irun
int m_irun
Definition: AlignTrk.h:87
AlignSiHit
Definition: AlignSiHit.h:10
AlignTrk::m_nholes
int m_nholes
Definition: AlignTrk.h:90
AlignTrk::beamsigma
float beamsigma(int) const
Definition: AlignTrk.h:128
AlignTrk::trkpar
float trkpar(int) const
Definition: AlignTrk.h:121
AlignTrk::trthitlist_cend
std::vector< AlignTRTHit >::const_iterator trthitlist_cend() const
Definition: AlignTrk.h:176
AlignTrk::nshared
int nshared() const
Definition: AlignTrk.h:120
AlignTrk::set_trkcov
void set_trkcov(const float, const int)
Definition: AlignTrk.h:145
AlignTrk::m_ikine
int m_ikine
Definition: AlignTrk.h:96
AlignTrk::irun
int irun() const
Definition: AlignTrk.h:116
AlignTrk::m_hits
std::vector< AlignSiHit > m_hits
Definition: AlignTrk.h:105
lumiFormat.i
int i
Definition: lumiFormat.py:85
AlignTrk::m_overlaphits
std::vector< AlignSiHit > m_overlaphits
Definition: AlignTrk.h:107
AlignTrk::add_hit
void add_hit(AlignSiHit &)
Definition: AlignTrk.h:191
AlignTrk::hitlist_end
std::vector< AlignSiHit >::iterator hitlist_end()
Definition: AlignTrk.h:163
AlignTrk::m_trpvtx
float m_trpvtx[3]
Definition: AlignTrk.h:99
AlignTrk::m_truetrkpar
float m_truetrkpar[5]
Definition: AlignTrk.h:97
AlignTrk::hitlist_begin
std::vector< AlignSiHit >::iterator hitlist_begin()
Definition: AlignTrk.h:161
hist_file_dump.f
f
Definition: hist_file_dump.py:135
AlignTrk::truetrkpar
float truetrkpar(int) const
Definition: AlignTrk.h:124
AlignTrk::m_ivtx
int m_ivtx
Definition: AlignTrk.h:98
AlignTrk::m_trkcov
float m_trkcov[15]
Definition: AlignTrk.h:95
AlignTrk::print
void print() const
Definition: AlignTrk.cxx:33
AlignSiHit.h
AlignTrk::trthitlist_end
std::vector< AlignTRTHit >::iterator trthitlist_end()
Definition: AlignTrk.h:172
AlignTrk::m_ievent
int m_ievent
Definition: AlignTrk.h:88
AlignTrk::m_trthits
std::vector< AlignTRTHit > m_trthits
Definition: AlignTrk.h:106
AlignTrk::m_nshared
int m_nshared
Definition: AlignTrk.h:91
AlignTrk::itrack
int itrack() const
Definition: AlignTrk.h:118
AlignTrk::beamtilt
float beamtilt(int) const
Definition: AlignTrk.h:129
AlignTrk::set_noverlapPIX
void set_noverlapPIX(const int)
Definition: AlignTrk.h:135
AlignTrk
Definition: AlignTrk.h:16
AlignTrk::m_noverlapSCT
int m_noverlapSCT
Definition: AlignTrk.h:93
AlignTrk::set_irun
void set_irun(const int)
Definition: AlignTrk.h:139
AlignTrk::set_itrack
void set_itrack(const int)
Definition: AlignTrk.h:141
AlignTrk::trtpterr
float trtpterr() const
Definition: AlignTrk.h:131
AlignTrk::set_beampos
void set_beampos(const float, const int)
Definition: AlignTrk.h:151
AlignTrk::set_beamtilt
void set_beamtilt(const float, const int)
Definition: AlignTrk.h:155
AlignTrk::m_noverlapPIX
int m_noverlapPIX
Definition: AlignTrk.h:92
AlignTrk::set_trpvtx
void set_trpvtx(const float, const int)
Definition: AlignTrk.h:150
AlignTrk::set_nholes
void set_nholes(const int)
Definition: AlignTrk.h:142
AlignTrk::hitlist_cbegin
std::vector< AlignSiHit >::const_iterator hitlist_cbegin() const
Definition: AlignTrk.h:165
AlignTrk::set_trkpar
void set_trkpar(const float, const int)
Definition: AlignTrk.h:144
AlignTrk::AlignTrk
AlignTrk()
Definition: AlignTrk.cxx:11
AlignTrk::set_nshared
void set_nshared(const int)
Definition: AlignTrk.h:143
AlignTrk::noverlapSCT
int noverlapSCT() const
Definition: AlignTrk.h:113
AlignTrk::ntrthits
int ntrthits() const
Definition: AlignTrk.h:132
AlignTrk::set_ivtx
void set_ivtx(const int)
Definition: AlignTrk.h:149
AlignTrk::m_beampos
float m_beampos[3]
Definition: AlignTrk.h:100
AlignTrk::beampos
float beampos(int) const
Definition: AlignTrk.h:127
AlignTrk::ievent
int ievent() const
Definition: AlignTrk.h:117
AlignTrk::trkcov
float trkcov(int) const
Definition: AlignTrk.h:122
AlignTrk::m_trtpt
float m_trtpt
Definition: AlignTrk.h:103
AlignTrk::ikine
int ikine() const
Definition: AlignTrk.h:123