ATLAS Offline Software
TrackParametersHelper.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 INDETTRACKPERFMON_TRKPARAMETERSHELPER_H
6 #define INDETTRACKPERFMON_TRKPARAMETERSHELPER_H
7 
20 
22 #include <vector>
23 #include <cmath> // std::fabs, std::copysign
24 
26 #include "VertexParametersHelper.h"
27 
28 
29 namespace IDTPM {
30 
32  template< class U >
33  inline float pT( const U& p ) { return p.pt(); }
34 
36  template< class U >
37  inline float pTsig( const U& p ) {
38  return p.charge() ? std::copysign( pT(p), p.charge() ) : 0.;
39  }
40 
42  template< class U >
43  inline float eta( const U& p ) { return p.eta(); }
44 
46  inline float getTheta( const xAOD::TrackParticle& p ) { return p.theta(); }
47  inline float getTheta( const xAOD::TruthParticle& p ) {
48  static thread_local SG::ConstAccessor<float> thetaAcc("theta");
49  return (thetaAcc.isAvailable(p)) ? thetaAcc(p) : -9999.;
50  }
51  template< class U >
52  inline float theta( const U& p ) { return getTheta( p ); }
53 
55  inline float getPhi( const xAOD::TrackParticle& p ) { return p.phi0(); }
56  inline float getPhi( const xAOD::TruthParticle& p ) {
57  static thread_local SG::ConstAccessor<float> phiAcc("phi");
58  return (phiAcc.isAvailable(p)) ? phiAcc(p) : -9999.;
59  }
60  template< class U >
61  inline float phi( const U& p ) { return getPhi( p ); }
62  //template< class U >
63  //inline float phi( const U& p ) { return p.phi(); }
64 
66  inline float getZ0( const xAOD::TrackParticle& p ) { return p.z0(); }
67  inline float getZ0( const xAOD::TruthParticle& p ) {
68  static thread_local SG::ConstAccessor<float> z0Acc("z0");
69  return (z0Acc.isAvailable(p)) ? z0Acc(p) : -9999.;
70  }
71  template< class U >
72  inline float z0( const U& p ) { return getZ0( p ); }
73 
74  template< class U >
75  inline float z0SinTheta( const U& p ) { return z0( p ) * std::sin( theta( p ) ); }
76 
78  inline float getD0( const xAOD::TrackParticle& p ) { return p.d0(); }
79  inline float getD0( const xAOD::TruthParticle& p ) {
80  static thread_local SG::ConstAccessor<float> d0Acc("d0");
81  return (d0Acc.isAvailable(p)) ? d0Acc(p) : -9999.;
82  }
83  template< class U >
84  inline float d0( const U& p ) { return getD0( p ); }
85 
87  inline float getProdR( const xAOD::TrackParticle& ) { return -9999.; }
88  inline float getProdR( const xAOD::TruthParticle& p ) {
89  static thread_local SG::ConstAccessor<float> prodRAcc("prodR");
90  return (prodRAcc.isAvailable(p)) ? prodRAcc(p) : -9999.;
91  }
92  template< class U >
93  inline float prodR( const U& p ) { return getProdR( p ); }
94 
96  inline float getProdZ( const xAOD::TrackParticle& ) { return -9999.; }
97  inline float getProdZ( const xAOD::TruthParticle& p ) {
98  static thread_local SG::ConstAccessor<float> prodZAcc("prodZ");
99  return (prodZAcc.isAvailable(p)) ? prodZAcc(p) : -9999.;
100  }
101  template< class U >
102  inline float prodZ( const U& p ) { return getProdZ( p ); }
103 
105  inline float getQoverP( const xAOD::TrackParticle& p ) { return p.qOverP(); }
106  inline float getQoverP( const xAOD::TruthParticle& p ) {
107  static thread_local SG::ConstAccessor<float> qOverPAcc("qOverP");
108  return (qOverPAcc.isAvailable(p)) ? qOverPAcc(p) : -9999.;
109  }
110  template< class U >
111  inline float qOverP( const U& p ) { return getQoverP( p ); }
112 
113  template< class U >
114  inline float qOverPT( const U& p ) { return qOverP( p ) / std::sin( theta( p ) ); }
115 
117  template< class U >
118  inline float eTot( const U& p ) { return p.e(); }
119 
121  template< class U >
122  inline float eT( const U& p ) { return p.p4().Et(); }
123 
125  inline float getChiSquared( const xAOD::TrackParticle& p ) { return p.chiSquared(); }
126  inline float getChiSquared( const xAOD::TruthParticle& ) { return -9999; }
127  template< class U >
128  inline float chiSquared( const U& p ) { return getChiSquared(p); }
129 
131  inline float getNdof( const xAOD::TrackParticle& p ) { return p.numberDoF(); }
132  inline float getNdof( const xAOD::TruthParticle& ) { return -9999; }
133  template< class U >
134  inline float ndof( const U& p ) { return getNdof(p); }
135 
137  inline std::vector< unsigned int > getAuthor( const xAOD::TrackParticle& p ) {
138  std::vector< unsigned int > authorVec;
139  std::bitset< xAOD::TrackPatternRecoInfo::NumberOfTrackRecoInfo > patternInfo = p.patternRecoInfo();
140  for( unsigned int i = 0 ; i < xAOD::TrackPatternRecoInfo::NumberOfTrackRecoInfo ; i++ ) {
141  if( patternInfo.test(i) ) authorVec.push_back(i);
142  }
143  return authorVec;
144  }
145  inline std::vector< unsigned int > getAuthor( const xAOD::TruthParticle& ) { return {}; }
146  template< class U >
147  inline std::vector< unsigned int > author( const U& p ) { return getAuthor(p); }
148 
150  inline uint8_t getHasValidTime( const xAOD::TrackParticle& p ) { return p.hasValidTime(); }
151  inline uint8_t getHasValidTime( const xAOD::TruthParticle& ) { return 0; }
152  template< class U >
153  inline uint8_t hasValidTime( const U& p ) { return getHasValidTime(p); }
154 
156  inline float getTime( const xAOD::TrackParticle& p ) { return p.time(); }
157  inline float getTime( const xAOD::TruthParticle& ) { return -9999.; }
158  template< class U >
159  inline float time( const U& p ) { return getTime(p); }
160 
162  inline float getCov( const xAOD::TrackParticle& p, Trk::ParamDefs par1, Trk::ParamDefs par2 ) {
163  return p.definingParametersCovMatrix()( par1, par2 ); }
164  inline float getCov( const xAOD::TruthParticle&, Trk::ParamDefs, Trk::ParamDefs ) { return 0.; }
165  template< class U >
166  inline float cov( const U& p, Trk::ParamDefs par1, Trk::ParamDefs par2 ) {
167  return getCov( p, par1, par2 ); }
168 
170  inline float getError( const xAOD::TrackParticle& p, Trk::ParamDefs par ) {
171  return ( cov(p, par, par) < 0 ) ? 0. : std::sqrt( cov(p, par, par) ); }
172  inline float getError( const xAOD::TruthParticle&, Trk::ParamDefs ) { return 0.; }
173  template< class U >
174  inline float error( const U& p, Trk::ParamDefs par ) { return getError( p, par ); }
175 
177  inline std::vector< float > getCovVec( const xAOD::TrackParticle& p ) {
178  return p.definingParametersCovMatrixVec(); }
179  inline std::vector< float > getCovVec( const xAOD::TruthParticle& ) { return {}; }
180  template< class U >
181  inline std::vector< float > covVec( const U& p ) { return getCovVec( p ); }
182 
184  inline float getQOverPTError( const xAOD::TrackParticle& p ) {
185  float invSinTheta = 1. / std::sin( theta(p) );
186  float cosTheta = std::cos( theta(p) );
187  float qOverPTerr2 =
188  std::pow( error(p, Trk::qOverP) * invSinTheta, 2 )
189  + std::pow( error(p, Trk::theta) * qOverP(p) * cosTheta * std::pow(invSinTheta, 2), 2 )
190  - 2 * qOverP(p) * cosTheta * cov(p, Trk::theta, Trk::qOverP) * std::pow(invSinTheta, 3);
191  return qOverPTerr2 > 0 ? std::sqrt( qOverPTerr2 ) : 0.;
192  }
193  inline float getQOverPTError( const xAOD::TruthParticle& ) { return 0.; }
194  template< class U >
195  inline float qOverPTError( const U& p ) { return getQOverPTError(p); }
196 
198  inline float getPTError( const xAOD::TrackParticle& p ) {
199  std::vector< float > covs = covVec(p);
200  if( covs.size() < 15 ) {
201  throw std::runtime_error(
202  "TrackParticle without covariance matrix for defining parameters or the covariance matrix is wrong dimensionality.");
203  return 0.;
204  }
205  if( qOverP(p) <= 0. ) return 0.;
206  float diff_qp = - pT(p) / std::fabs( qOverP(p) );
207  float diff_theta = theta(p) == 0. ? 0. : pT(p) / std::tan( theta(p) );
208  float pTerr2 = diff_qp * (diff_qp * covs[14] + diff_theta * covs[13]) + diff_theta * diff_theta * covs[9];
209  return pTerr2 > 0. ? std::sqrt( pTerr2 ) : 0.;
210  }
211  inline float getPTError( const xAOD::TruthParticle& ) { return 0.; }
212  template< class U >
213  inline float pTError( const U& p ) { return getPTError(p); }
214 
216  inline float getEtaError( const xAOD::TrackParticle& p ) {
217  float etaErr =
218  error(p, Trk::theta) / ( -2 * std::sin( theta(p) ) * std::cos( theta(p) ) );
219  return std::fabs( etaErr ); }
220  inline float getEtaError( const xAOD::TruthParticle& ) { return 0.; }
221  template< class U >
222  inline float etaError( const U& p ) { return getEtaError(p); }
223 
225  inline float getZ0SinThetaError( const xAOD::TrackParticle& p ) {
226  float z0sinErr2 =
227  std::pow( error(p, Trk::z0) * std::sin( theta(p) ), 2 )
228  + std::pow( z0(p) * error(p, Trk::theta) * std::cos( theta(p) ), 2)
229  + 2 * z0(p) * std::sin( theta(p) ) * std::cos( theta(p) ) * cov(p, Trk::z0, Trk::theta);
230  return z0sinErr2 > 0. ? std::sqrt( z0sinErr2 ) : 0.;
231  }
232  inline float getZ0SinThetaError( const xAOD::TruthParticle& ) { return 0.; }
233  template< class U >
234  inline float z0SinThetaError( const U& p ) { return getZ0SinThetaError(p); }
235 
237  template< class U1, class U2=U1 >
238  inline float deltaPhi( const U1& p1, const U2& p2 ) {
239  return p1.p4().DeltaPhi( p2.p4() );
240  }
241 
243  template< class U1, class U2=U1 >
244  inline float deltaEta( const U1& p1, const U2& p2 ) {
245  return ( eta(p1) - eta(p2) );
246  }
247 
249  template< class U1, class U2=U1 >
250  inline float deltaR( const U1& p1, const U2& p2 ) {
251  return p1.p4().DeltaR( p2.p4() );
252  }
253 
255  inline float getIsHadron( const xAOD::TrackParticle& ) { return 0; }
256  inline float getIsHadron( const xAOD::TruthParticle& p ) { return p.isHadron();}
257  template< class U >
258  inline float isHadron( const U& p ) { return getIsHadron( p ); }
259 
261  inline float getIsPion( const xAOD::TrackParticle& ) { return 0; }
262  inline float getIsPion( const xAOD::TruthParticle& p ) { return (p.pdgId() == 111 or p.pdgId() == 211);}
263  template< class U >
264  inline float isPion( const U& p ) { return getIsPion( p ); }
265 
266 
268  inline int getTruthType( const xAOD::TrackParticle& ) { return -9999; }
269  inline int getTruthType( const xAOD::TruthParticle& p ) {
270  SG::ConstAccessor<int> type( "Truth_truthType" );
271  return type.isAvailable(p) ? type(p) : -9999;
272  }
273  template< class U >
274  inline int truthType( const U& p ) { return getTruthType( p ); }
275 
277  inline int getTruthOrigin( const xAOD::TrackParticle& ) { return -9999; }
278  inline int getTruthOrigin( const xAOD::TruthParticle& p ) {
279  SG::ConstAccessor<int> origin( "Truth_truthOrigin" );
280  return origin.isAvailable(p) ? origin(p) : -9999;
281  }
282  template< class U >
283  inline int truthOrigin( const U& p ) { return getTruthOrigin( p ); }
284 
285 
288  uint8_t iInnerMostPixelHits(0);
289  return p.summaryValue( iInnerMostPixelHits, xAOD::numberOfInnermostPixelLayerHits ) ?
290  float( iInnerMostPixelHits ) : -9999.;
291  }
292  inline float getNInnerMostPixelHits( const xAOD::TruthParticle& ) { return -9999.; }
293  template< class U >
294  inline float nInnerMostPixelHits( const U& p ) { return getNInnerMostPixelHits( p ); }
295 
298  uint8_t iInnerMostPixelEndcapHits(0);
299  return p.summaryValue( iInnerMostPixelEndcapHits, xAOD::numberOfInnermostPixelLayerEndcapHits ) ?
300  float( iInnerMostPixelEndcapHits ) : -9999.;
301  }
302  inline float getNInnerMostPixelEndcapHits( const xAOD::TruthParticle& ) { return -9999.; }
303  template< class U >
304  inline float nInnerMostPixelEndcapHits( const U& p ) { return getNInnerMostPixelEndcapHits( p ); }
305 
308  uint8_t iNextToInnerMostPixelHits(0);
309  return p.summaryValue( iNextToInnerMostPixelHits, xAOD::numberOfNextToInnermostPixelLayerHits ) ?
310  float( iNextToInnerMostPixelHits ) : -9999.;
311  }
312  inline float getNNextToInnerMostPixelHits( const xAOD::TruthParticle& ) { return -9999.; }
313  template< class U >
314  inline float nNextToInnerMostPixelHits( const U& p ) { return getNNextToInnerMostPixelHits( p ); }
315 
318  uint8_t iNextToInnerMostPixelEndcapHits(0);
319  return p.summaryValue( iNextToInnerMostPixelEndcapHits, xAOD::numberOfNextToInnermostPixelLayerEndcapHits ) ?
320  float( iNextToInnerMostPixelEndcapHits ) : -9999.;
321  }
322  inline float getNNextToInnerMostPixelEndcapHits( const xAOD::TruthParticle& ) { return -9999.; }
323  template< class U >
325 
328  uint8_t iInnerMostPixelSharedHits(0);
329  return p.summaryValue( iInnerMostPixelSharedHits, xAOD::numberOfInnermostPixelLayerSharedHits ) ?
330  float( iInnerMostPixelSharedHits ) : -9999.;
331  }
332  inline float getNInnerMostPixelSharedHits( const xAOD::TruthParticle& ) { return -9999.; }
333  template< class U >
334  inline float nInnerMostPixelSharedHits( const U& p ) { return getNInnerMostPixelSharedHits( p ); }
335 
338  uint8_t iInnerMostPixelSharedEndcapHits(0);
339  return p.summaryValue( iInnerMostPixelSharedEndcapHits, xAOD::numberOfInnermostPixelLayerSharedEndcapHits ) ?
340  float( iInnerMostPixelSharedEndcapHits ) : -9999.;
341  }
342  inline float getNInnerMostPixelSharedEndcapHits( const xAOD::TruthParticle& ) { return -9999.; }
343  template< class U >
345 
347  inline float getNPixelHits( const xAOD::TrackParticle& p ) {
348  uint8_t iPixelHits(0);
349  return p.summaryValue( iPixelHits, xAOD::numberOfPixelHits ) ?
350  float( iPixelHits ) : -9999.;
351  }
352  inline float getNPixelHits( const xAOD::TruthParticle& ) { return -9999.; }
353  template< class U >
354  inline float nPixelHits( const U& p ) { return getNPixelHits( p ); }
355 
357  inline float getNPixelHoles( const xAOD::TrackParticle& p ) {
358  uint8_t iPixHoles(0);
359  return p.summaryValue( iPixHoles, xAOD::numberOfPixelHoles ) ?
360  float( iPixHoles ) : -9999.;
361  }
362  inline float getNPixelHoles( const xAOD::TruthParticle& ) { return -9999.; }
363  template< class U >
364  inline float nPixelHoles( const U& p ) { return getNPixelHoles( p ); }
365 
367  inline float getNPixelSharedHits( const xAOD::TrackParticle& p ) {
368  uint8_t iPixelShared(0);
369  return p.summaryValue( iPixelShared, xAOD::numberOfPixelSharedHits ) ?
370  float( iPixelShared ) : -9999.;
371  }
372  inline float getNPixelSharedHits( const xAOD::TruthParticle& ) { return -9999.; }
373  template< class U >
374  inline float nPixelSharedHits( const U& p ) { return getNPixelSharedHits( p ); }
375 
377  inline float getPixeldEdx( const xAOD::TrackParticle& p ) {
378  float iPixeldEdx(0);
379  return p.summaryValue( iPixeldEdx, xAOD::pixeldEdx ) ? iPixeldEdx : -9999.;
380  }
381  inline float getPixeldEdx( const xAOD::TruthParticle& ) { return -9999.; }
382  template< class U >
383  inline float pixeldEdx( const U& p ) { return getPixeldEdx( p ); }
384 
386  inline float getNSCTHits( const xAOD::TrackParticle& p ) {
387  uint8_t iSctHits(0);
388  return p.summaryValue( iSctHits, xAOD::numberOfSCTHits ) ?
389  float( iSctHits ) : -9999.;
390  }
391  inline float getNSCTHits( const xAOD::TruthParticle& ) { return -9999.; }
392  template< class U >
393  inline float nSCTHits( const U& p ) { return getNSCTHits( p ); }
394 
396  inline float getNSCTHoles( const xAOD::TrackParticle& p ) {
397  uint8_t iSctHoles(0);
398  return p.summaryValue( iSctHoles, xAOD::numberOfSCTHoles ) ?
399  float( iSctHoles ) : -9999.;
400  }
401  inline float getNSCTHoles( const xAOD::TruthParticle& ) { return -9999.; }
402  template< class U >
403  inline float nSCTHoles( const U& p ) { return getNSCTHoles( p ); }
404 
406  inline float getNSCTSharedHits( const xAOD::TrackParticle& p ) {
407  uint8_t iSCTShared(0);
408  return p.summaryValue( iSCTShared, xAOD::numberOfSCTSharedHits ) ?
409  float( iSCTShared ) : -9999.;
410  }
411  inline float getNSCTSharedHits( const xAOD::TruthParticle& ) { return -9999.; }
412  template< class U >
413  inline float nSCTSharedHits( const U& p ) { return getNSCTSharedHits( p ); }
414 
416  inline float getNSiHits( const xAOD::TrackParticle& p ) {
417  if( nPixelHits(p)<0 or nSCTHits(p)<0 ) return -9999.;
418  float pnPixelHits = ( nPixelHits(p) >= 0 ) ? nPixelHits(p) : 0.;
419  float pnSCTHits = ( nSCTHits(p) >= 0 ) ? nSCTHits(p) : 0.;
420  return ( pnPixelHits + pnSCTHits );
421  }
422  inline float getNSiHits( const xAOD::TruthParticle& p ) {
423  static thread_local SG::ConstAccessor<float> prodNSiHits( "nSilHits" );
424  return prodNSiHits.isAvailable(p) ? prodNSiHits(p) : -9999.;
425  }
426  template< class U >
427  inline float nSiHits( const U& p ) { return getNSiHits( p ); }
428 
430  template< class U >
431  inline float nSiHoles( const U& p ) {
432  if( nPixelHoles(p)<0 or nSCTHoles(p)<0 ) return -9999.;
433  float pnPixelHoles = ( nPixelHoles(p) >= 0 ) ? nPixelHoles(p) : 0.;
434  float pnSCTHoles = ( nSCTHoles(p) >= 0 ) ? nSCTHoles(p) : 0.;
435  return ( pnPixelHoles + pnSCTHoles );
436  }
437 
439  inline float getNTRTHits( const xAOD::TrackParticle& p ) {
440  uint8_t iTrtHits(0);
441  return p.summaryValue( iTrtHits, xAOD::numberOfTRTHits ) ?
442  float( iTrtHits ) : -9999.;
443  }
444  inline float getNTRTHits( const xAOD::TruthParticle& ) { return -9999.; }
445  template< class U >
446  inline float nTRTHits( const U& p ) { return getNTRTHits( p ); }
447 
449  inline float getNTRTHitsXe( const xAOD::TrackParticle& p ) {
450  uint8_t iTrtHitsXe(0);
451  return p.summaryValue( iTrtHitsXe, xAOD::numberOfTRTXenonHits ) ?
452  float( iTrtHitsXe ) : -9999.;
453  }
454  inline float getNTRTHitsXe( const xAOD::TruthParticle& ) { return -9999.; }
455  template< class U >
456  inline float nTRTHitsXe( const U& p ) { return getNTRTHitsXe( p ); }
457 
459  inline float getNTRTHitsAr( const xAOD::TrackParticle& p ) {
460  if( nTRTHits(p)<0 or nTRTHitsXe(p)<0 ) return -9999.;
461  float pnTRTHits = ( nTRTHits(p) >= 0 ) ? nTRTHits(p) : 0.;
462  float pnTRTHitsXe = ( nTRTHitsXe(p) >= 0 ) ? nTRTHitsXe(p) : 0.;
463  return ( pnTRTHits - pnTRTHitsXe );
464  }
465  inline float getNTRTHitsAr( const xAOD::TruthParticle& ) { return -9999.; }
466  template< class U >
467  inline float nTRTHitsAr( const U& p ) { return getNTRTHitsAr( p ); }
468 
471  uint8_t iTrtHighThresholdHits(0);
472  return p.summaryValue( iTrtHighThresholdHits, xAOD::numberOfTRTHighThresholdHitsTotal ) ?
473  float( iTrtHighThresholdHits ) : -9999.;
474  }
475  inline float getNTRTHighThresholdHits( const xAOD::TruthParticle& ) { return -9999.; }
476  template< class U >
477  inline float nTRTHighThresholdHits( const U& p ) { return getNTRTHighThresholdHits( p ); }
478 
481  uint8_t iTrtHighThresholdHitsXe(0);
482  return p.summaryValue( iTrtHighThresholdHitsXe, xAOD::numberOfTRTHighThresholdHits ) ?
483  float( iTrtHighThresholdHitsXe ) : -9999.;
484  }
485  inline float getNTRTHighThresholdHitsXe( const xAOD::TruthParticle& ) { return -9999.; }
486  template< class U >
487  inline float nTRTHighThresholdHitsXe( const U& p ) { return getNTRTHighThresholdHitsXe( p ); }
488 
491  if( nTRTHighThresholdHits(p)<0 or nTRTHighThresholdHitsXe(p)<0 ) return -9999.;
492  float pnTRTHighThresholdHits = ( nTRTHighThresholdHits(p) >= 0 ) ? nTRTHighThresholdHits(p) : 0.;
493  float pnTRTHighThresholdHitsXe = ( nTRTHighThresholdHitsXe(p) >= 0 ) ? nTRTHighThresholdHitsXe(p) : 0.;
494  return ( pnTRTHighThresholdHits - pnTRTHighThresholdHitsXe );
495  }
496  inline float getNTRTHighThresholdHitsAr( const xAOD::TruthParticle& ) { return -9999.; }
497  template< class U >
498  inline float nTRTHighThresholdHitsAr( const U& p ) { return getNTRTHighThresholdHitsAr( p ); }
499 
500 } // namespace IDTPM
501 
502 #endif // > ! INDETTRACKPERFMON_TRKPARAMETERSHELPER_H
xAOD::numberOfPixelHoles
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
Definition: TrackingPrimitives.h:261
IDTPM::getNSiHits
float getNSiHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nSiHits.
Definition: TrackParametersHelper.h:416
IDTPM::ndof
float ndof(const U &p)
Definition: TrackParametersHelper.h:134
IDTPM::nNextToInnerMostPixelEndcapHits
float nNextToInnerMostPixelEndcapHits(const U &p)
Definition: TrackParametersHelper.h:324
IDTPM::getNTRTHits
float getNTRTHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nTRTHits.
Definition: TrackParametersHelper.h:439
IDTPM::getAuthor
std::vector< unsigned int > getAuthor(const xAOD::TrackParticle &p)
Accessor utility function for getting the track author.
Definition: TrackParametersHelper.h:137
xAOD::numberOfSCTSharedHits
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:272
IDTPM::getNInnerMostPixelEndcapHits
float getNInnerMostPixelEndcapHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nInnerMostPixelEndcapHits.
Definition: TrackParametersHelper.h:297
IDTPM::covVec
std::vector< float > covVec(const U &p)
Definition: TrackParametersHelper.h:181
IDTPM::pixeldEdx
float pixeldEdx(const U &p)
Definition: TrackParametersHelper.h:383
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
IDTPM::getNTRTHitsAr
float getNTRTHitsAr(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nTRTHitsAr.
Definition: TrackParametersHelper.h:459
VertexParametersHelper.h
Utility methods to access reco/truth vertices parmeters in a consitent way across this package.
IDTPM::getPhi
float getPhi(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of phi.
Definition: TrackParametersHelper.h:55
xAOD::numberOfInnermostPixelLayerSharedEndcapHits
@ numberOfInnermostPixelLayerSharedEndcapHits
number of Pixel 0th layer endcap hits shared by several tracks.
Definition: TrackingPrimitives.h:244
IDTPM::z0
float z0(const U &p)
Definition: TrackParametersHelper.h:72
IDTPM::nPixelHoles
float nPixelHoles(const U &p)
Definition: TrackParametersHelper.h:364
IDTPM::getNSCTHits
float getNSCTHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nSCTHits.
Definition: TrackParametersHelper.h:386
xAOD::numberOfTRTXenonHits
@ numberOfTRTXenonHits
number of TRT hits on track in straws with xenon [unit8_t].
Definition: TrackingPrimitives.h:284
Trk::ParamDefs
ParamDefs
Definition: ParamDefs.h:32
IDTPM::isHadron
float isHadron(const U &p)
Definition: TrackParametersHelper.h:258
IDTPM::getHasValidTime
uint8_t getHasValidTime(const xAOD::TrackParticle &p)
Accessor utility function for getting the track hasValidTime.
Definition: TrackParametersHelper.h:150
IDTPM::getProdZ
float getProdZ(const xAOD::TrackParticle &)
Accessor utility function for getting the value of Z.
Definition: TrackParametersHelper.h:96
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
IDTPM::getNPixelHits
float getNPixelHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nPixelHits.
Definition: TrackParametersHelper.h:347
IDTPM::getQOverPTError
float getQOverPTError(const xAOD::TrackParticle &p)
Accessor utility function for getting the QOverPt error.
Definition: TrackParametersHelper.h:184
IDTPM::getNSCTHoles
float getNSCTHoles(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nSCTHoles.
Definition: TrackParametersHelper.h:396
IDTPM::getNInnerMostPixelSharedEndcapHits
float getNInnerMostPixelSharedEndcapHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nInnerMostPixelSharedEndcapHits.
Definition: TrackParametersHelper.h:337
IDTPM::time
float time(const U &p)
Definition: TrackParametersHelper.h:159
IDTPM::nInnerMostPixelSharedHits
float nInnerMostPixelSharedHits(const U &p)
Definition: TrackParametersHelper.h:334
IDTPM::getPixeldEdx
float getPixeldEdx(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of pixeldEdx.
Definition: TrackParametersHelper.h:377
IDTPM::getNTRTHighThresholdHitsXe
float getNTRTHighThresholdHitsXe(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nTRTHighThresholdHitsXe.
Definition: TrackParametersHelper.h:480
IDTPM::getTime
float getTime(const xAOD::TrackParticle &p)
Accessor utility function for getting the track time.
Definition: TrackParametersHelper.h:156
Trk::z0
@ z0
Definition: ParamDefs.h:64
IDTPM::nTRTHitsAr
float nTRTHitsAr(const U &p)
Definition: TrackParametersHelper.h:467
IDTPM::getNNextToInnerMostPixelHits
float getNNextToInnerMostPixelHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nNextToInnerMostPixelHits.
Definition: TrackParametersHelper.h:307
IDTPM::getNTRTHighThresholdHitsAr
float getNTRTHighThresholdHitsAr(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nTRTHighThresholdHitsAr.
Definition: TrackParametersHelper.h:490
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
IDTPM::pTsig
float pTsig(const U &p)
Accessor utility function for getting the value of signed pT.
Definition: TrackParametersHelper.h:37
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:275
SG::ConstAccessor< float >
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
IDTPM::eTot
float eTot(const U &p)
Accessor utility function for getting the value of Energy.
Definition: TrackParametersHelper.h:118
IDTPM::prodR
float prodR(const U &p)
Definition: TrackParametersHelper.h:93
IDTPM::nPixelHits
float nPixelHits(const U &p)
Definition: TrackParametersHelper.h:354
IDTPM::getCov
float getCov(const xAOD::TrackParticle &p, Trk::ParamDefs par1, Trk::ParamDefs par2)
Accessor utility function for getting the track parameters covariance.
Definition: TrackParametersHelper.h:162
IDTPM::phi
float phi(const U &p)
Definition: TrackParametersHelper.h:61
IDTPM::getQoverP
float getQoverP(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of qOverP.
Definition: TrackParametersHelper.h:105
IDTPM::truthType
int truthType(const U &p)
Definition: TrackParametersHelper.h:274
IDTPM::pTError
float pTError(const U &p)
Definition: TrackParametersHelper.h:213
IDTPM::nSiHoles
float nSiHoles(const U &p)
Accessor utility function for getting the value of nSiHoles.
Definition: TrackParametersHelper.h:431
IDTPM::nTRTHighThresholdHitsXe
float nTRTHighThresholdHitsXe(const U &p)
Definition: TrackParametersHelper.h:487
xAOD::numberOfTRTHighThresholdHits
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
Definition: TrackingPrimitives.h:278
xAOD::numberOfTRTHighThresholdHitsTotal
@ numberOfTRTHighThresholdHitsTotal
total number of TRT hits which pass the high threshold [unit8_t].
Definition: TrackingPrimitives.h:279
IDTPM::getNNextToInnerMostPixelEndcapHits
float getNNextToInnerMostPixelEndcapHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nNextToInnerMostPixelEndcapHits.
Definition: TrackParametersHelper.h:317
IDTPM::z0SinTheta
float z0SinTheta(const U &p)
Definition: TrackParametersHelper.h:75
IDTPM::nSCTSharedHits
float nSCTSharedHits(const U &p)
Definition: TrackParametersHelper.h:413
IDTPM::getError
float getError(const xAOD::TrackParticle &p, Trk::ParamDefs par)
Accessor utility function for getting the track parameters error.
Definition: TrackParametersHelper.h:170
IDTPM::truthOrigin
int truthOrigin(const U &p)
Definition: TrackParametersHelper.h:283
IDTPM::getNSCTSharedHits
float getNSCTSharedHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nSCTSharedHits.
Definition: TrackParametersHelper.h:406
IDTPM::theta
float theta(const U &p)
Definition: TrackParametersHelper.h:52
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
IDTPM::getNInnerMostPixelHits
float getNInnerMostPixelHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nInnerMostPixelHits.
Definition: TrackParametersHelper.h:287
xAOD::numberOfInnermostPixelLayerEndcapHits
@ numberOfInnermostPixelLayerEndcapHits
these are the hits in the 0th pixel layer endcap [unit8_t].
Definition: TrackingPrimitives.h:242
xAOD::numberOfPixelSharedHits
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:262
IDTPM::cov
float cov(const U &p, Trk::ParamDefs par1, Trk::ParamDefs par2)
Definition: TrackParametersHelper.h:166
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
IDTPM::getIsPion
float getIsPion(const xAOD::TrackParticle &)
Accessor utility function for getting the value of isPion.
Definition: TrackParametersHelper.h:261
IDTPM::qOverPT
float qOverPT(const U &p)
Definition: TrackParametersHelper.h:114
IDTPM::eT
float eT(const U &p)
Accessor utility function for getting the value of Tranverse energy.
Definition: TrackParametersHelper.h:122
IDTPM::eta
float eta(const U &p)
Accessor utility function for getting the value of eta.
Definition: TrackParametersHelper.h:43
lumiFormat.i
int i
Definition: lumiFormat.py:85
IDTPM::nSCTHits
float nSCTHits(const U &p)
Definition: TrackParametersHelper.h:393
IDTPM::nTRTHits
float nTRTHits(const U &p)
Definition: TrackParametersHelper.h:446
Trk::theta
@ theta
Definition: ParamDefs.h:66
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
IDTPM::nTRTHitsXe
float nTRTHitsXe(const U &p)
Definition: TrackParametersHelper.h:456
IDTPM::d0
float d0(const U &p)
Definition: TrackParametersHelper.h:84
IDTPM::getEtaError
float getEtaError(const xAOD::TrackParticle &p)
Accessor utility function for getting the Eta error.
Definition: TrackParametersHelper.h:216
IDTPM::deltaEta
float deltaEta(const U1 &p1, const U2 &p2)
Accessor utility function for getting the DeltaEta betwen two tracks.
Definition: TrackParametersHelper.h:244
IDTPM::pT
float pT(const U &p)
Accessor utility function for getting the value of pT.
Definition: TrackParametersHelper.h:33
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
IDTPM::deltaR
float deltaR(const U1 &p1, const U2 &p2)
Accessor utility function for getting the DeltaR betwen two tracks.
Definition: TrackParametersHelper.h:250
xAOD::numberOfSCTHoles
@ numberOfSCTHoles
number of SCT holes [unit8_t].
Definition: TrackingPrimitives.h:270
IDTPM::nSCTHoles
float nSCTHoles(const U &p)
Definition: TrackParametersHelper.h:403
IDTPM::deltaPhi
float deltaPhi(const U1 &p1, const U2 &p2)
Accessor utility function for getting the DeltaPhi betwen two tracks.
Definition: TrackParametersHelper.h:238
IDTPM::getZ0
float getZ0(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of z0.
Definition: TrackParametersHelper.h:66
IDTPM::isPion
float isPion(const U &p)
Definition: TrackParametersHelper.h:264
xAOD::numberOfNextToInnermostPixelLayerEndcapHits
@ numberOfNextToInnermostPixelLayerEndcapHits
these are the hits in the 0.5th and 1st pixel layer endcap rings [unit8_t].
Definition: TrackingPrimitives.h:253
IDTPM::nTRTHighThresholdHitsAr
float nTRTHighThresholdHitsAr(const U &p)
Definition: TrackParametersHelper.h:498
IDTPM::getIsHadron
float getIsHadron(const xAOD::TrackParticle &)
Accessor utility function for getting the value of isHadron.
Definition: TrackParametersHelper.h:255
IDTPM::z0SinThetaError
float z0SinThetaError(const U &p)
Definition: TrackParametersHelper.h:234
IDTPM::qOverPTError
float qOverPTError(const U &p)
Definition: TrackParametersHelper.h:195
xAOD::numberOfNextToInnermostPixelLayerHits
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
Definition: TrackingPrimitives.h:248
IDTPM::prodZ
float prodZ(const U &p)
Definition: TrackParametersHelper.h:102
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
IDTPM::nInnerMostPixelEndcapHits
float nInnerMostPixelEndcapHits(const U &p)
Definition: TrackParametersHelper.h:304
IDTPM::etaError
float etaError(const U &p)
Definition: TrackParametersHelper.h:222
IDTPM::getChiSquared
float getChiSquared(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of chi^2.
Definition: TrackParametersHelper.h:125
IDTPM::getPTError
float getPTError(const xAOD::TrackParticle &p)
Accessor utility function for getting the Pt error.
Definition: TrackParametersHelper.h:198
IDTPM::getD0
float getD0(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of d0.
Definition: TrackParametersHelper.h:78
IDTPM::nInnerMostPixelSharedEndcapHits
float nInnerMostPixelSharedEndcapHits(const U &p)
Definition: TrackParametersHelper.h:344
IDTPM::qOverP
float qOverP(const U &p)
Definition: TrackParametersHelper.h:111
IDTPM::getProdR
float getProdR(const xAOD::TrackParticle &)
Accessor utility function for getting the value of R.
Definition: TrackParametersHelper.h:87
IDTPM::getNPixelSharedHits
float getNPixelSharedHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nPixelSharedHits.
Definition: TrackParametersHelper.h:367
IDTPM::chiSquared
float chiSquared(const U &p)
Definition: TrackParametersHelper.h:128
TrackParticle.h
xAOD::pixeldEdx
@ pixeldEdx
the dE/dx estimate, calculated using the pixel clusters [?]
Definition: TrackingPrimitives.h:304
xAOD::NumberOfTrackRecoInfo
@ NumberOfTrackRecoInfo
maximum number of enums
Definition: TrackingPrimitives.h:189
IDTPM::nPixelSharedHits
float nPixelSharedHits(const U &p)
Definition: TrackParametersHelper.h:374
IDTPM::getNPixelHoles
float getNPixelHoles(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nPixelHoles.
Definition: TrackParametersHelper.h:357
IDTPM::getNTRTHitsXe
float getNTRTHitsXe(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nTRTHitsXe.
Definition: TrackParametersHelper.h:449
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IDTPM::getCovVec
std::vector< float > getCovVec(const xAOD::TrackParticle &p)
Accessor utility function for getting the track parameters covariance vector.
Definition: TrackParametersHelper.h:177
IDTPM::nInnerMostPixelHits
float nInnerMostPixelHits(const U &p)
Definition: TrackParametersHelper.h:294
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
xAOD::numberOfInnermostPixelLayerSharedHits
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
Definition: TrackingPrimitives.h:239
IDTPM::getNInnerMostPixelSharedHits
float getNInnerMostPixelSharedHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nInnerMostPixelSharedHits.
Definition: TrackParametersHelper.h:327
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
IDTPM::error
float error(const U &p, Trk::ParamDefs par)
Definition: TrackParametersHelper.h:174
IDTPM::getTruthOrigin
int getTruthOrigin(const xAOD::TrackParticle &)
Accessor utility function for getting the value of truthOrigin.
Definition: TrackParametersHelper.h:277
IDTPM::getNTRTHighThresholdHits
float getNTRTHighThresholdHits(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of nTRTHighThresholdHits.
Definition: TrackParametersHelper.h:470
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
IDTPM::hasValidTime
uint8_t hasValidTime(const U &p)
Definition: TrackParametersHelper.h:153
IDTPM::nTRTHighThresholdHits
float nTRTHighThresholdHits(const U &p)
Definition: TrackParametersHelper.h:477
IDTPM::getTruthType
int getTruthType(const xAOD::TrackParticle &)
Accessor utility function for getting the value of truthType.
Definition: TrackParametersHelper.h:268
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
IDTPM
Athena include(s).
Definition: IPlotsDefinitionSvc.h:25
TruthParticle.h
IDTPM::getZ0SinThetaError
float getZ0SinThetaError(const xAOD::TrackParticle &p)
Accessor utility function for getting the z0SinTheta error.
Definition: TrackParametersHelper.h:225
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
IDTPM::getNdof
float getNdof(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of #dof.
Definition: TrackParametersHelper.h:131
readCCLHist.float
float
Definition: readCCLHist.py:83
IDTPM::nNextToInnerMostPixelHits
float nNextToInnerMostPixelHits(const U &p)
Definition: TrackParametersHelper.h:314
IDTPM::getTheta
float getTheta(const xAOD::TrackParticle &p)
Accessor utility function for getting the value of theta.
Definition: TrackParametersHelper.h:46
IDTPM::nSiHits
float nSiHits(const U &p)
Definition: TrackParametersHelper.h:427
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:237
IDTPM::author
std::vector< unsigned int > author(const U &p)
Definition: TrackParametersHelper.h:147