ATLAS Offline Software
FillAlignTRTHits.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /********************************************************************
6 
7 NAME:
8 PACKAGE:
9 
10 AUTHORS:
11 CREATED:
12 
13 PURPOSE: Tool
14 
15 
16 ********************************************************************/
17 
18 // INCLUDES:
21 #include "FillAlignTRTHits.h"
23 #include "TrkTrack/Track.h"
31 #include "InDetIdentifier/TRT_ID.h"
34 
36 
38 
39 
40 FillAlignTRTHits::FillAlignTRTHits(const std::string& type, const std::string& name, const IInterface* parent) :
42  m_DetID(nullptr), m_TRTID(nullptr),
43  // m_trtcaldbTool("ITRT_CalDbTool", this),
44  // m_neighbourSvc("ITRT_StrawNeighbourSvc", name),
45  // m_TRTStrawSummaryTool("InDetTRTStrawStatusSummaryTool",this),
46  m_updator(nullptr),
47  m_maxDistance(2.8),
48  m_maxTimeResidual(150),
49  m_minTimebinsOverThreshold(2),
50  m_maxTrackChisquarePerDof(10),
51  m_numOfHitsTotal(0),
52  m_numOfHitsAccepted(0),
53  m_numOfProcessedTracks(0),
54  m_DoMCCosmicTimeShift(0),
55  m_f(nullptr), m_ntuple(nullptr)
56 {
57  declareInterface<IFillAlignTrkInfo>(this);
58  // declareProperty("TRTCalDbTool",m_trtcaldbTool);
59  // declareProperty("NeighbourSvc",m_neighbourSvc);
60  declareProperty("maxDistance",m_maxDistance) ;
61  declareProperty("maxTimeResidual",m_maxTimeResidual) ;
62  declareProperty("minTimebinsOverThreshold",m_minTimebinsOverThreshold) ;
63  declareProperty("maxTrackChisquarePerDof",m_maxTrackChisquarePerDof) ;
64  declareProperty("DoMCCosmicTimeShift",m_DoMCCosmicTimeShift);
65  // declareProperty("TRTStrawSummaryTool", m_TRTStrawSummaryTool);
66 }
67 
69  msg(MSG::INFO) << "initialize() " << endmsg;
70  if ((detStore()->retrieve(m_DetID,"AtlasID")).isFailure()) {
71  msg(MSG::FATAL) << "Problem retrieving ATLASDetectorID helper" << endmsg;
72  return StatusCode::FAILURE;
73  }
74  if ((detStore()->retrieve(m_TRTID)).isFailure()) {
75  msg(MSG::FATAL) << "Problem retrieving TRTID helper" << endmsg;
76  return StatusCode::FAILURE;
77  }
78 
79  std::cout<< m_trtcaldbTool<< std::endl;
80  if(m_trtcaldbTool.retrieve().isFailure()) {
81  msg(MSG::FATAL) << "Could not get TRT_CalDbTool !" << endmsg;
82  return StatusCode::FAILURE;
83  }
84  if(StatusCode::SUCCESS!=m_neighbourSvc.retrieve() ) {
85  msg(MSG::FATAL) <<"Could not get TRTStrawNeighbourSvc !"<<endmsg;
86  return StatusCode::FAILURE;
87  }
88 
89  // To extract ToT Corrections:
90  // Get DriftFunction tool service
91  //
92  if ( m_driftFunctionTool.retrieve().isFailure() ) {
93  msg(MSG::FATAL) << m_driftFunctionTool.propertyName() << ": Failed to retrieve tool " << m_driftFunctionTool.type() << endmsg;
94  return StatusCode::FAILURE;
95  } else {
96  msg(MSG::INFO) << m_driftFunctionTool.propertyName() << ": Retrieved tool " << m_driftFunctionTool.type() << endmsg;
97  }
98 
99  // use updator to get unbiased states
100  if ( ! m_updatorHandle.empty() ) {
101  StatusCode sc = m_updatorHandle.retrieve();
102  if (sc.isFailure()) {
103  msg(MSG::FATAL) << "Could not retrieve measurement updator tool: "<< m_updatorHandle << endmsg;
104  return sc;
105  }
106  m_updator = &(*m_updatorHandle);
107  } else {
108  ATH_MSG_DEBUG ("No Updator for unbiased track states given, use normal states!");
109  m_updator = nullptr;
110  }
111 
112  // The tool to get the argon status:
113  if (m_TRTStrawSummaryTool.retrieve().isFailure() ) {
114  ATH_MSG_ERROR ("Failed to retrieve StrawStatus Summary " << m_TRTStrawSummaryTool);
115  ATH_MSG_ERROR ("configure as 'None' to avoid its loading.");
116  return StatusCode::FAILURE;
117  } else {
118  msg(MSG::INFO) << "Retrieved tool " << m_TRTStrawSummaryTool << endmsg;
119  }
120 
121  m_f = new TFile(m_ntupleName.value().c_str(),"RECREATE");
122  m_ntuple = new TNtuple("ntuple","TRT calibration ntuple","run:evt:lbn:nvx:trk:det:lay:mod:stl:stw:brd:chp:sid:locx:locy:locz:x:y:z:r:dr:t:rtrack:drrtrack:rtrackunbias:drrtrackunbias:ttrack:ttrackunbias:t0:ephase:phi:theta:pt:qoverp:d0:ToT:HT:ToTCorrection:HTCorrection:isArgonStraw");
123  return StatusCode::SUCCESS;
124 }
125 
126 
128  m_f->Write();
129  m_f->Close();
130  std::cout << "CALIBSTAT TRKS: " << m_numOfProcessedTracks << std::endl;
131  std::cout << "CALIBSTAT HTOT: " << m_numOfHitsTotal << std::endl;
132  std::cout << "CALIBSTAT HACC: " << m_numOfHitsAccepted << std::endl;
133  return StatusCode::SUCCESS;
134 }
135 
136 
138  const xAOD::VertexContainer& vertices) {
139 
141  float rtrackunbias = 0;
142  float drrtrackunbias = 0;
143  float drrtrack = 0;
144  float ttrackunbias = 0;
145  (*output)[TRT::Track::numberOfPixelHits] = 0;
146  (*output)[TRT::Track::numberOfSCTHits] = 0;
147  (*output)[TRT::Track::numberOfTRTHits] = 0;
148  // loop over the TrackStateonSurfaces
149 
150  const Trk::TrackParameters *unbiasedTrkParameters(nullptr);
151  const Trk::TrackStateOnSurface* HitOnTrackToRemove(nullptr);
152 
153  double timecor = 0.;
154  const Trk::Track* pTrack = aTrack ;
155  const Trk::Perigee* mesp = pTrack->perigeeParameters();
156  float lbn = -1;
157  float nvrt_rec = -1;
158  double phi = 10;
159  double theta = 100;
160  double pt = 0;
161  double qoverp = 0;
162  double d0 = 0;
163 
164  if(mesp){
165  phi = mesp->parameters()[Trk::phi0];
166  theta = mesp->parameters()[Trk::theta];
167  if(fabs(theta)==0) theta=1e-24;
168  float ptinv = std::abs(mesp->parameters()[Trk::qOverP]) / sin(theta);
169  qoverp = mesp->parameters()[Trk::qOverP];
170  if (ptinv != 0) {
171  pt = 1. / ptinv;
172  } else {
173  pt = 1e24;
174  }
175  d0 = mesp->parameters()[Trk::d0];
176  }
177 
178  timecor = m_DoMCCosmicTimeShift ;
179 
180  lbn = (float)eventInfo.lumiBlock();
181  //Number of Prim vertex:
182  nvrt_rec = 0;
183  int countVertices(0);
184  for (const xAOD::Vertex* vx : vertices) {
185  if (vx->vertexType() == xAOD::VxType::PriVtx) {
186  if ( vx-> nTrackParticles() >= 3) countVertices++;
187  }
188  }
189  nvrt_rec = countVertices;
190 
191  auto tsos = aTrack->trackStateOnSurfaces()->begin();
192  auto tsosEnd = aTrack->trackStateOnSurfaces()->end();
193 
194  const Trk::MeasurementBase* mesb = nullptr;
195  const Trk::RIO_OnTrack* rotp = nullptr;
196  const InDet::TRT_DriftCircle* dcp = nullptr;
197  const Trk::TrackParameters* tparp = nullptr;
198  const Trk::TrackParameters* mparp = nullptr;
199  const InDet::TRT_DriftCircleOnTrack* trtcirc = nullptr;
200  const TRTCond::RtRelation* rtrelation = nullptr;
201 
202 
203  for (; tsos != tsosEnd; ++tsos) {
204  mesb = (*tsos)->measurementOnTrack();
205  rotp = dynamic_cast<const Trk::RIO_OnTrack*>(mesb);
206  if(rotp != nullptr) {
207  Identifier ident = rotp->identify();
208  if (m_DetID->is_sct(ident)) {
209  (*output)[TRT::Track::numberOfSCTHits]++;
210  } else if (m_DetID->is_trt(ident)) {
211  (*output)[TRT::Track::numberOfTRTHits]++;
213  trtcirc = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(rotp);
214  if (trtcirc != nullptr) {
215  dcp = trtcirc->prepRawData();
216  tparp = ((*tsos)->trackParameters());
217  mparp = (tparp);
218 
219  if (tparp == nullptr) {
220  if (msgLvl(MSG::DEBUG)) msg() << "strange: trk parameters not available" << endmsg;
221  }
222  if (dcp == nullptr) {
223  msg(MSG::ERROR) << "strange: prepRawData not available" << endmsg;
224  }
225 
226  if (mparp && dcp) {
227  TRT::HitInfo* newhit = new TRT::HitInfo();
228  output->push_back(newhit); // do we make sure this one is deleted properly
229 
230  (*newhit)[TRT::Hit::ident] = ident.get_identifier32().get_compact();
231  (*newhit)[TRT::Hit::detector] = m_TRTID->barrel_ec(ident);
235  (*newhit)[TRT::Hit::straw] = m_TRTID->straw(ident);
236  (*newhit)[TRT::Hit::side] = static_cast<int>(trtcirc->side());
237 
238  // Local wire specific
240  float errsq=Amg::error(rotp->localCovariance(),Trk::driftRadius);
241  if(errsq<0) errsq=1.0;
242  (*newhit)[TRT::Hit::errorSignedDriftRadius] = sqrt(errsq) ;
243  bool isvalid = false;
244 
245 
246  (*newhit)[TRT::Hit::driftTime] = dcp->driftTime(isvalid) - timecor;
247  (*newhit)[TRT::Hit::driftTimeStatus] = isvalid ;
248  // this is the integer drift time, but multiplied by the scale.
249  // to calculate the residual in the drift time, I need to have the t0 as well.
250  // I'd also like to store the drift velocity
251  if (!isvalid) (*newhit)[TRT::Hit::driftTime] = -1.0;
252 
253  (*newhit)[TRT::Hit::t0] = m_trtcaldbTool->getT0(ident) ;
254 
255  (*newhit)[TRT::Hit::TimeoverThreshold] = dcp->timeOverThreshold() ;
256  //CORRECT FOR TUBEHITS!!!:
257  rtrelation = m_trtcaldbTool->getRtRelation(ident) ;
258  // added High Level Threshold information
259  (*newhit)[TRT::Hit::HTLevel] = dcp->highLevel();
260  // Extract the correction in the db for the ToT:
261  float tot = (*newhit)[TRT::Hit::TimeoverThreshold];
262  float ToTCorrection = m_driftFunctionTool->driftTimeToTCorrection(tot, ident);
263 
264  // Extract the correction for HT:
265  float HTCorrection = 0;
266  if ((*newhit)[TRT::Hit::HTLevel]){
267  HTCorrection = m_driftFunctionTool->driftTimeHTCorrection(ident);
268  }
269 
270  (*newhit)[TRT::Hit::positionOnWire] = tparp->parameters()[Trk::locZ];
271 
272  (*newhit)[TRT::Hit::trackDriftRadius] = tparp->parameters()[Trk::driftRadius];
273  errsq=Amg::error(*(mparp->covariance()),Trk::locZ);
274  if(errsq<0) errsq=1.0;
275  (*newhit)[TRT::Hit::errorPositionOnWire] = sqrt(errsq);
276  errsq=Amg::error(*(mparp->covariance()),Trk::driftRadius);
277  if(errsq<0) errsq=1.0;
278  (*newhit)[TRT::Hit::errorTrackDriftRadius] = sqrt(errsq);
279  // calculate the 'trktime' and the 'trkdriftvelocity'
280  if( rtrelation ) {
281  (*newhit)[TRT::Hit::trackDriftTime] = rtrelation->drifttime(std::abs( (*newhit)[TRT::Hit::trackDriftRadius] )) ;
282  (*newhit)[TRT::Hit::driftVelocity] = rtrelation->drdt( (*newhit)[TRT::Hit::trackDriftTime] ) ;
283  }
284 
285  (*newhit)[TRT::Hit::trackT0]= timecor ;
286 
287  int chip = 0;
288  int board = -1;
289  m_neighbourSvc->getChip(ident,chip);
290  if(abs(m_TRTID->barrel_ec(ident))<2){
291  board = m_neighbourSvc->chipToBoardBarrel(chip, m_TRTID->layer_or_wheel(ident));
292  } else if (chip<12) {
293  board = 0;
294  } else {
295  chip = chip-20;
296  board = 1;
297  }
298 
299  // Prepare for Xe-Ar mixed conditions:
300  int isArgonStraw = 0;
301  if (!m_TRTStrawSummaryTool.empty()) {
303  isArgonStraw = 1;
304  }
305  }
306 
307 
308  float h_trkDistance = (*newhit)[TRT::Hit::trackDriftRadius];
309 
310  float h_driftTime = (*newhit)[TRT::Hit::driftTime] - (*newhit)[TRT::Hit::t0];
311  float h_trkDriftTime = (*newhit)[TRT::Hit::trackDriftTime];
312  float h_timeResidual = h_driftTime - h_trkDriftTime;
313 
314  float h_trkVariance = (*newhit)[TRT::Hit::errorTrackDriftRadius] * (*newhit)[TRT::Hit::errorTrackDriftRadius];
315 
316  bool h_hasValidDriftTime = (*newhit)[TRT::Hit::driftTimeStatus] ;
317 
318  float h_timeOverThreshold = (*newhit)[TRT::Hit::TimeoverThreshold] ;
319 
320  float h_residual = (*newhit)[TRT::Hit::signedDriftRadius] - (*newhit)[TRT::Hit::trackDriftRadius] ;
321  float h_residualVariance = h_trkVariance + ((*newhit)[TRT::Hit::errorSignedDriftRadius] * (*newhit)[TRT::Hit::errorSignedDriftRadius]);
322  float d = h_residualVariance;
323  if(d==0) d=1.0e-24;
324  float h_chiSquare = h_residual*h_residual/d ;
325  int dof = (*output)[TRT::Track::degreesOfFreedom]-1;
326  if(dof<1) dof=1;
327  bool hitsel=false;
328  if( std::abs( h_trkDistance ) < m_maxDistance &&
329  std::abs( h_timeResidual ) < m_maxTimeResidual &&
330  h_trkVariance > 0 &&
331  h_hasValidDriftTime &&
332  h_timeOverThreshold/3.125 >= m_minTimebinsOverThreshold &&
333  ((*output)[TRT::Track::chiSquare] - h_chiSquare) / (float)dof < m_maxTrackChisquarePerDof ){
334  hitsel = true;
335  }
336 
338  rtrackunbias = 0;
339  drrtrackunbias = 0;
340  errsq = Amg::error(*(mparp->covariance()),Trk::driftRadius);
341  drrtrack = sqrt(errsq);
342  ttrackunbias = 0;
343 
344  if (m_updator){
345  tparp = ((*tsos)->trackParameters());
346  HitOnTrackToRemove = *tsos;
347 
348  if(HitOnTrackToRemove){
349  unbiasedTrkParameters = m_updator->removeFromState(*(HitOnTrackToRemove->trackParameters()),
350  HitOnTrackToRemove->measurementOnTrack()->localParameters(),
351  HitOnTrackToRemove->measurementOnTrack()->localCovariance()).release();
352  ATH_MSG_DEBUG ("TrackParameters 1: " << *(HitOnTrackToRemove->trackParameters()));
353  }
354  else if (msgLvl(MSG::DEBUG)) {
355  msg() << "TrackParameters 1: nullptr" << endmsg;
356  }
357 
358  if(unbiasedTrkParameters){
359  const Trk::TrackParameters *unmparp = (unbiasedTrkParameters);
360  rtrackunbias = unbiasedTrkParameters->parameters()[Trk::driftRadius];
361  errsq=Amg::error(*(unmparp->covariance()),Trk::driftRadius);
362  if(errsq<0) errsq=1.;
363  drrtrackunbias = sqrt(errsq);
364 
365  if( rtrelation ) ttrackunbias = rtrelation->drifttime(std::abs( rtrackunbias ));
366  ATH_MSG_DEBUG("Unbiased TrackParameters 2: " << *unbiasedTrkParameters );
367  ATH_MSG_DEBUG("Radius : " << (*newhit)[TRT::Hit::trackDriftRadius] );
368  ATH_MSG_DEBUG("Radius 2: " << rtrackunbias );
369  }
370 
371  }
373  float const ntvar[40]={
376  lbn,
377  nvrt_rec,
379 
380  (float)(*newhit)[TRT::Hit::detector],
381  (float)(*newhit)[TRT::Hit::layer],
382  (float)(*newhit)[TRT::Hit::phiModule],
383  (float)(*newhit)[TRT::Hit::strawLayer],
384  (float)(*newhit)[TRT::Hit::straw],
385  (float)board,
386  (float)chip,
388  (*newhit)[TRT::Hit::phiModule],
389  (*newhit)[TRT::Hit::layer],
390  (*newhit)[TRT::Hit::strawLayer],
391  (*newhit)[TRT::Hit::straw]).get_identifier32().get_compact() ,
392  (float)tparp->position().x(),
393  (float)tparp->position().y(),
394  (float)tparp->position().z(),
395  (float)(rotp->detectorElement()->center(ident)).x(),
396  (float)(rotp->detectorElement()->center(ident)).y(),
397  (float)(rotp->detectorElement()->center(ident)).z(),
398 
399  (*newhit)[TRT::Hit::signedDriftRadius],
401  (*newhit)[TRT::Hit::driftTime],
402  (*newhit)[TRT::Hit::trackDriftRadius],
403  drrtrack,
404  rtrackunbias,
405  drrtrackunbias,
406  (*newhit)[TRT::Hit::trackDriftTime],
407  ttrackunbias,
408  m_trtcaldbTool->getT0(ident),
409  (float)timecor,
410  (float)phi ,
411  (float)theta,
412  (float)pt ,
413  (float)qoverp ,
414  (float)d0 ,
415  (*newhit)[TRT::Hit::TimeoverThreshold],
416  (*newhit)[TRT::Hit::HTLevel],
417  ToTCorrection,
418  HTCorrection,
419  (float)isArgonStraw
420  };
421 
422  if (hitsel) {
424  m_ntuple->Fill(ntvar);
425  }
426 
427  }
428  } else {
429  msg(MSG::ERROR) << "TRT drift RIO cast failed - no hit stored" << endmsg;
430  }
431 
432 
433  } // identified TRT hit
434  else if (m_DetID->is_pixel(ident)) (*output)[TRT::Track::numberOfPixelHits]++;
435  } // non-zero ROTpointer
436  } // end loop on Surfaces
437  if (msgLvl(MSG::VERBOSE)) msg() << "Track has " << (*output)[TRT::Track::numberOfTRTHits] << " TRT hits --> of which "
438  << output->size() << " hits had FULL info available" << endmsg;
439 
440 
441 
442  delete unbiasedTrkParameters;
443 
444 
445  return true;
446 }
InDet::TRT_DriftCircleOnTrack::side
Trk::DriftCircleSide side() const
returns the side on which the drift radius is.
Definition: TRT_DriftCircleOnTrack.cxx:147
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
Trk::TrackStateOnSurface::trackParameters
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
FillAlignTRTHits::m_ntuple
TNtuple * m_ntuple
Definition: FillAlignTRTHits.h:89
FillAlignTRTHits::m_f
TFile * m_f
Definition: FillAlignTRTHits.h:88
TRT::Hit::straw
@ straw
Definition: HitInfo.h:82
InDet::TRT_DriftCircleOnTrack::prepRawData
virtual const TRT_DriftCircle * prepRawData() const override final
returns the PrepRawData - is a TRT_DriftCircle in this scope
Definition: TRT_DriftCircleOnTrack.h:202
FillAlignTRTHits::m_DoMCCosmicTimeShift
float m_DoMCCosmicTimeShift
Definition: FillAlignTRTHits.h:86
TrackParameters.h
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
TRT::Hit::trackT0
@ trackT0
Definition: HitInfo.h:52
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
TRT::Hit::positionOnWire
@ positionOnWire
Definition: HitInfo.h:46
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
TRT::Hit::driftTimeStatus
@ driftTimeStatus
Definition: HitInfo.h:84
TRT::Track::chiSquare
@ chiSquare
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:67
TRT::Track::numberOfSCTHits
@ numberOfSCTHits
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:77
FillAlignTRTHits::m_numOfProcessedTracks
unsigned int m_numOfProcessedTracks
Definition: FillAlignTRTHits.h:85
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
hist_file_dump.d
d
Definition: hist_file_dump.py:137
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
RtRelation.h
abstract base class for rt-relations
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
InDet::TRT_DriftCircle::timeOverThreshold
double timeOverThreshold() const
returns Time over threshold in ns
EventPrimitivesHelpers.h
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
TRT::Track::event
@ event
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:74
TRT::Hit::strawLayer
@ strawLayer
Definition: HitInfo.h:81
TRT::Hit::signedDriftRadius
@ signedDriftRadius
Definition: HitInfo.h:40
TRT_ID.h
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
test_pyathena.pt
pt
Definition: test_pyathena.py:11
FillAlignTRTHits::m_numOfHitsAccepted
unsigned int m_numOfHitsAccepted
Definition: FillAlignTRTHits.h:84
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::TrackStateOnSurface::measurementOnTrack
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
FillAlignTRTHits::m_updator
Trk::IUpdator * m_updator
updator for unbiased states
Definition: FillAlignTRTHits.h:75
FillAlignTRTHits.h
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
FillAlignTRTHits::m_DetID
const AtlasDetectorID * m_DetID
Definition: FillAlignTRTHits.h:66
AtlasDetectorID::is_trt
bool is_trt(Identifier id) const
Definition: AtlasDetectorID.h:782
FillAlignTRTHits::m_trtcaldbTool
ToolHandle< ITRT_CalDbTool > m_trtcaldbTool
Definition: FillAlignTRTHits.h:71
FillAlignTRTHits::m_neighbourSvc
ServiceHandle< ITRT_StrawNeighbourSvc > m_neighbourSvc
Definition: FillAlignTRTHits.h:72
InDet::TRT_DriftCircleOnTrack
Definition: TRT_DriftCircleOnTrack.h:53
x
#define x
FillAlignTRTHits::fill
virtual bool fill(const Trk::Track *aTrack, TRT::TrackInfo *output, const xAOD::EventInfo &eventInfo, const xAOD::VertexContainer &vertices)
Definition: FillAlignTRTHits.cxx:137
TRT::TrackInfo
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:83
TRT::Track::run
@ run
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:73
FillAlignTRTHits::FillAlignTRTHits
FillAlignTRTHits(const std::string &type, const std::string &name, const IInterface *parent)
Definition: FillAlignTRTHits.cxx:40
PrepRawData.h
InDet::TRT_DriftCircle
Definition: TRT_DriftCircle.h:32
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
FillAlignTRTHits::m_driftFunctionTool
ToolHandle< ITRT_DriftFunctionTool > m_driftFunctionTool
Definition: FillAlignTRTHits.h:69
IUpdator.h
FillAlignTRTHits::m_TRTID
const TRT_ID * m_TRTID
Definition: FillAlignTRTHits.h:67
TRT::Hit::detector
@ detector
Definition: HitInfo.h:78
TRT::Hit::side
@ side
Definition: HitInfo.h:83
Track.h
TRT::Hit::TimeoverThreshold
@ TimeoverThreshold
Definition: HitInfo.h:44
TRTCond::RtRelation
Definition: RtRelation.h:27
TRT::Hit::driftVelocity
@ driftVelocity
Definition: HitInfo.h:50
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
TRT_ID::straw
int straw(const Identifier &id) const
Definition: TRT_ID.h:902
FillAlignTRTHits::m_maxTrackChisquarePerDof
float m_maxTrackChisquarePerDof
Definition: FillAlignTRTHits.h:82
TrackInfo.h
InDet::TRT_DriftCircle::driftTime
double driftTime(bool &valid) const
returns the raw driftTime, the passed boolean indicates if the drift time is valid or not.
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TRT::Hit::driftTime
@ driftTime
Definition: HitInfo.h:43
Trk::IUpdator::removeFromState
virtual std::unique_ptr< TrackParameters > removeFromState(const TrackParameters &, const Amg::Vector2D &, const Amg::MatrixX &) const =0
the reverse updating or inverse KalmanFilter removes a measurement from the track state,...
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:48
FillAlignTRTHits::finalize
virtual StatusCode finalize()
Definition: FillAlignTRTHits.cxx:127
z
#define z
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
TRTCond::RtRelation::drifttime
virtual float drifttime(float radius) const =0
drifttime for given radius
Trk::theta
@ theta
Definition: ParamDefs.h:72
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:59
FillAlignTRTHits::m_TRTStrawSummaryTool
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
Definition: FillAlignTRTHits.h:73
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
TRT::Hit::HTLevel
@ HTLevel
Definition: HitInfo.h:45
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
TRT::Hit::trackDriftRadius
@ trackDriftRadius
Definition: HitInfo.h:48
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::ParametersBase
Definition: ParametersBase.h:55
TRT_DriftCircleOnTrack.h
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
TRT_ID::straw_layer
int straw_layer(const Identifier &id) const
Definition: TRT_ID.h:893
FillAlignTRTHits::initialize
virtual StatusCode initialize()
Definition: FillAlignTRTHits.cxx:68
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
TRT_ID::layer_or_wheel
int layer_or_wheel(const Identifier &id) const
Definition: TRT_ID.h:884
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
LB_AnalMapSplitter.tot
tot
Definition: LB_AnalMapSplitter.py:46
TRT_DriftCircle.h
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
TRTCond::StrawStatus::Good
@ Good
Definition: StrawStatus.h:18
merge.output
output
Definition: merge.py:17
FillAlignTRTHits::m_numOfHitsTotal
unsigned int m_numOfHitsTotal
Definition: FillAlignTRTHits.h:83
Trk::MeasurementBase
Definition: MeasurementBase.h:58
EventPrimitives.h
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
ITRT_DriftFunctionTool.h
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
FillAlignTRTHits::m_maxDistance
float m_maxDistance
Definition: FillAlignTRTHits.h:79
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::d0
@ d0
Definition: ParamDefs.h:69
TRT::Track::degreesOfFreedom
@ degreesOfFreedom
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:79
RIO_OnTrack.h
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
TRT::Hit::errorPositionOnWire
@ errorPositionOnWire
Definition: HitInfo.h:47
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
TRT::HitInfo
Definition: HitInfo.h:100
TRT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: TRT_ID.h:875
LocalParameters.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
TRT::Hit::errorTrackDriftRadius
@ errorTrackDriftRadius
Definition: HitInfo.h:49
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
FillAlignTRTHits::m_ntupleName
Gaudi::Property< std::string > m_ntupleName
Definition: FillAlignTRTHits.h:77
TRT::Track::numberOfTRTHits
@ numberOfTRTHits
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:78
VertexContainer.h
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
y
#define y
TRT::Hit::phiModule
@ phiModule
Definition: HitInfo.h:80
Identifier::get_compact
value_type get_compact(void) const
Get the compact id.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
InDet::TRT_DriftCircle::highLevel
bool highLevel() const
returns true if the high level threshold was passed
TRT::Hit::t0
@ t0
Definition: HitInfo.h:42
FillAlignTRTHits::m_maxTimeResidual
float m_maxTimeResidual
Definition: FillAlignTRTHits.h:80
TRT::Track::trackNumber
@ trackNumber
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:75
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
TRT::Hit::trackDriftTime
@ trackDriftTime
Definition: HitInfo.h:51
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:73
Trk::RIO_OnTrack::identify
virtual Identifier identify() const final
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:155
TRT::Track::numberOfPixelHits
@ numberOfPixelHits
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:76
TRTCond::RtRelation::drdt
virtual float drdt(float driftime) const =0
driftvelocity for given drifttime
FillAlignTRTHits::m_minTimebinsOverThreshold
int m_minTimebinsOverThreshold
Definition: FillAlignTRTHits.h:81
Trk::RIO_OnTrack::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
returns the detector element, assoicated with the PRD of this class
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
FillAlignTRTHits::m_updatorHandle
ToolHandle< Trk::IUpdator > m_updatorHandle
Definition: FillAlignTRTHits.h:70
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
AthAlgTool
Definition: AthAlgTool.h:26
TRT::Hit::errorSignedDriftRadius
@ errorSignedDriftRadius
Definition: HitInfo.h:41
Trk::TrkDetElementBase::center
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
readCCLHist.float
float
Definition: readCCLHist.py:83
Trk::phi0
@ phi0
Definition: ParamDefs.h:71
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
TRT_ID::straw_id
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw:
Definition: TRT_ID.h:581
LB_AnalMapSplitter.lbn
lbn
Definition: LB_AnalMapSplitter.py:28