ATLAS Offline Software
TRTStrawEfficiency.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 // TRTStrawEfficiency.cxx
6 // author: Ryan D. Reece <ryan.reece@cern.ch>
7 // created: Nov 2009
8 
9 #ifdef CPU_PROFILER
10 #include <google/profiler.h>
11 #endif
12 
15 
18 #include "Identifier/Identifier.h"
19 #include "InDetIdentifier/TRT_ID.h"
23 #include "GaudiKernel/ITHistSvc.h"
26 #include "StoreGate/ReadHandle.h"
27 
28 #include <cmath> // for fabs
29 #include <vector>
30 #include <string>
31 
32 #include "TTree.h"
33 
34 TRTStrawEfficiency::TRTStrawEfficiency(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) {}
35 
36 
37 //____________________________________________________________________________
39 
40  // retrieve TRTTrackHoleSearchTool
41  ATH_CHECK(m_trt_hole_finder.retrieve());
42 
43  // retrieve TRT_ID
44  ATH_CHECK(detStore()->retrieve(m_TRT_ID, "TRT_ID"));
45 
47 
48  // retrieve the Trk::KalmanUpdator to calculate unbiased track states
49  ATH_CHECK(m_updator.retrieve());
50 
51  // retrieve THistSvc
52  ATH_CHECK(m_hist_svc.retrieve());
53 
54  // retrieve TrigDecisionTool
55  if (!m_required_trigger.empty()) {
56  ATH_CHECK(m_trigDec.retrieve());
57  }
58 
59  // ntuple
60  m_tree = new TTree(m_tree_name.value().c_str(), m_tree_name.value().c_str());
61  ATH_CHECK(m_hist_svc->regTree(std::string("/") + m_stream_name + std::string("/") + m_tree_name, m_tree));
62 
63  // Read handles
64  ATH_CHECK(m_tracksKey.initialize());
66  ATH_CHECK(m_vertexContainerKey.initialize());
67 
68  make_branches();
69 
70 #ifdef CPU_PROFILER
71  std::string profile_file = "cpu.prof";
72  ATH_MSG_ALWAYS( "ProfilerStart(" << profile_file << ")" );
73  ProfilerStart(profile_file.c_str());
74 #endif
75 
76  return StatusCode::SUCCESS;
77 }
78 
79 
80 //____________________________________________________________________________
82  ATH_MSG_DEBUG( "TRTStrawEfficiency::execute() event: " << m_num_events );
83 
84  // ATH_MSG_DEUBG( "getListOfTriggers: " << m_trigDec->getListOfTriggers() );
85 
86  // require trigger
87  if ( !m_required_trigger.empty() ) {
88  if ( !m_trigDec->isPassed(m_required_trigger) ) {
89  // skip event
90  ATH_MSG_DEBUG( " trigger: " << m_required_trigger << " failed. Skipping event.");
91  return StatusCode::SUCCESS;
92  } else {
93  ATH_MSG_DEBUG( " trigger: " << m_required_trigger << " passed.");
94  }
95  }
96 
97  // retrive tracks
99  if (!tracks.isValid()) {
100  ATH_MSG_FATAL( "Failed to retrieve " << m_tracksKey.key() );
101  return StatusCode::FAILURE;
102  }
103 
104  // retrieve event info
106  if (!event_info.isValid()) {
107  ATH_MSG_FATAL( "Failed to retrieve " << m_eventInfoKey.key() );
108  return StatusCode::FAILURE;
109  }
110 
111  m_event_number = event_info->eventNumber();
112  m_run_number = event_info->runNumber();
113  m_lumi_block = event_info->lumiBlock();
114 
115  ATH_MSG_DEBUG( "run_number = " << m_run_number << ", lumi_block = " << m_lumi_block << ", event_number = " << m_event_number );
116 
117  // loop over tracks
118  ATH_MSG_DEBUG( "This event has " << tracks->size() << " tracks." );
119  for (const auto *track : *tracks) {
120  m_num_tracks++;
121 
122  // clear branches
123  clear_branches();
124 
125  // get perigee
126  const Trk::Perigee* perigee = track->perigeeParameters();
127  if (perigee) {
128  m_track_pt = perigee->pT();
129  m_track_eta = perigee->eta();
130  m_track_phi = perigee->parameters()[Trk::phi0];
131  m_track_d0 = perigee->parameters()[Trk::d0];
132  m_track_z0 = perigee->parameters()[Trk::z0];
133  ATH_MSG_DEBUG( " This track has perigee parameters:\n"
134  << " pT = " << m_track_pt/CLHEP::GeV << " CLHEP::GeV" << "\n"
135  << " eta = " << m_track_eta << "\n"
136  << " phi0 = " << m_track_phi << "\n"
137  << " d0 = " << m_track_d0 << "\n"
138  << " z0 = " << m_track_z0 << "\n"
139  << " theta = " << perigee->parameters()[Trk::theta] << "\n"
140  << " qOverP = " << perigee->parameters()[Trk::qOverP] );
141  } else {
142  ATH_MSG_ERROR( " This track has null perigeeParameters." );
143  continue;
144  }
145 
146  // get TrackStateOnSurfaces
147  const Trk::TrackStates* track_states = track->trackStateOnSurfaces();
148  if (track_states) {
149  ATH_MSG_DEBUG( " This track has " << track_states->size() << " track states on surface." );
150  } else {
151  ATH_MSG_ERROR( " This track has null track states on surface." );
152  continue;
153  }
154 
155  // count hits
156  for (const auto *trackState : *track_states) {
157  if (trackState->type(Trk::TrackStateOnSurface::Measurement)) {
158  if (dynamic_cast<const InDet::TRT_DriftCircleOnTrack*> (trackState->measurementOnTrack())) m_n_trt_hits++;
159  else if (dynamic_cast<const InDet::SCT_ClusterOnTrack*> (trackState->measurementOnTrack())) m_n_sct_hits++;
160  else if (dynamic_cast<const InDet::PixelClusterOnTrack*> (trackState->measurementOnTrack())) m_n_pixel_hits++;
161  }
162  }
163 
164  ATH_MSG_DEBUG( " This track has\n"
165  << " # Pixel hits = " << m_n_pixel_hits << "\n"
166  << " # SCT hits = " << m_n_sct_hits << "\n"
167  << " # TRT hits = " << m_n_trt_hits );
168 
169  // preselect tracks
170  bool passed_track_preselection =
171  ( fabs(perigee->parameters()[Trk::d0]) < m_max_abs_d0 )&&
172  ( fabs(perigee->parameters()[Trk::z0]) < m_max_abs_z0 )&&
173  ( 1/fabs(perigee->parameters()[Trk::qOverP]) > m_min_p )&& // added by dan
174  ( perigee->pT() > m_min_pT )&&
175  ( fabs(perigee->eta()) < m_max_abs_eta )&&
179 
180  if (!passed_track_preselection) {
181  ATH_MSG_DEBUG( " This track failed preselection." );
182  continue;
183  }
184 
185  ATH_MSG_DEBUG( " This track passed preselection." );
187 
188  for (const auto *trackState : *track_states ) {
189  if (trackState->type(Trk::TrackStateOnSurface::Measurement)) {
190  fill_hit_data(*trackState);
191  }
192  }
193 
194  const Trk::TrackStates* holes = m_trt_hole_finder->getHolesOnTrack(*track);
195  if (!holes) {
196  ATH_MSG_WARNING( " TRTTrackHoleSearchTool returned null results." );
197  continue;
198  } else {
199  m_n_pixel_holes = 0;
200  m_n_sct_holes = 0;
201  m_n_trt_holes = 0;
202  for (const auto *hole : *holes) {
204  int hole_det = fill_hole_data(*hole);
205  switch (hole_det) {
206  case 1:
207  m_n_pixel_holes++;
208  break;
209  case 2:
210  m_n_sct_holes++;
211  break;
212  case 3:
213  m_n_trt_holes++;
214  break;
215  default:
216  ATH_MSG_ERROR("fill_hole_data returned an invalid det type: " << hole_det);
217  }
218  } else {
219  ATH_MSG_WARNING(" hole finder returned a TrackStateOnSurface not of type Hole.");
220  }
221  }
222  delete holes;
223  }
224 
225  //------- added by dan -------
226 
228 
229  if (!vxContainer.isValid()) {
230  ATH_MSG_ERROR(" Failed to retrieve VxContainer: " << m_vertexContainerKey.key());
231  return StatusCode::FAILURE;
232  }
233  m_n_primary_vertex = vxContainer->size() - 1;
234  //-----------------------------
235 
236 
237  m_tree->Fill();
238 
239  ATH_MSG_DEBUG( " This track has\n"
240  << " # Pixel holes = " << m_n_pixel_holes << "\n"
241  << " # SCT holes = " << m_n_sct_holes << "\n"
242  << " # TRT holes = " << m_n_trt_holes );
243 
244  } // end loop over tracks
245 
246  m_num_events++;
247  return StatusCode::SUCCESS;
248 }
249 
250 
251 //____________________________________________________________________________
253  ATH_MSG_DEBUG( "# tracks = " << m_num_tracks );
254  ATH_MSG_DEBUG( "# preselected tracks = " << m_num_preselected_tracks );
255 
256 #ifdef ANP_CPU_PROFILER
257  ATH_MSG_ALWAYS("ProfilerStop.");
258  ProfilerStop();
259 #endif
260 
261  return StatusCode::SUCCESS;
262 }
263 
264 
265 //----------------------------------------------------------------------------
266 // private methods
267 //----------------------------------------------------------------------------
268 
269 //____________________________________________________________________________
271  m_tree->Branch("event_number", &m_event_number, "event_number/i");
272  m_tree->Branch("run_number", &m_run_number, "run_number/i");
273  m_tree->Branch("lumi_block", &m_lumi_block, "lumi_block/i");
274  m_tree->Branch("track_pt", &m_track_pt, "track_pt/F");
275  m_tree->Branch("track_eta", &m_track_eta, "track_eta/F");
276  m_tree->Branch("track_phi", &m_track_phi, "track_phi/F");
277  m_tree->Branch("track_d0", &m_track_d0, "track_d0/F");
278  m_tree->Branch("track_z0", &m_track_z0, "track_z0/F");
279  m_tree->Branch("n_pixel_hits", &m_n_pixel_hits, "n_pixel_hits/I");
280  m_tree->Branch("n_sct_hits", &m_n_sct_hits, "n_sct_hits/I");
281  m_tree->Branch("n_trt_hits", &m_n_trt_hits, "n_trt_hits/I");
282  m_tree->Branch("hit_bec", &m_hit_bec);
283  m_tree->Branch("hit_phi", &m_hit_phi);
284  m_tree->Branch("hit_layer", &m_hit_layer);
285  m_tree->Branch("hit_strawlayer", &m_hit_strawlayer);
286  m_tree->Branch("hit_straw", &m_hit_straw);
287  m_tree->Branch("hit_chip", &m_hit_chip);
288  m_tree->Branch("hit_pad", &m_hit_pad);
289  m_tree->Branch("hit_x", &m_hit_x);
290  m_tree->Branch("hit_y", &m_hit_y);
291  m_tree->Branch("hit_z", &m_hit_z);
292  m_tree->Branch("hit_center_x", &m_hit_center_x);
293  m_tree->Branch("hit_center_y", &m_hit_center_y);
294  m_tree->Branch("hit_center_z", &m_hit_center_z);
295  m_tree->Branch("hit_R", &m_hit_R);
296  m_tree->Branch("hit_locR", &m_hit_locR);
297  m_tree->Branch("hit_HL", &m_hit_HL);
298  m_tree->Branch("hit_det", &m_hit_det);
299  m_tree->Branch("hit_ub_locR", &m_hit_ub_locR);
300  m_tree->Branch("hit_ub_x", &m_hit_ub_x);
301  m_tree->Branch("hit_ub_y", &m_hit_ub_y);
302  m_tree->Branch("hit_ub_z", &m_hit_ub_z);
303  m_tree->Branch("n_pixel_holes", &m_n_pixel_holes, "n_pixel_holes/I");
304  m_tree->Branch("n_sct_holes", &m_n_sct_holes, "n_sct_holes/I");
305  m_tree->Branch("n_trt_holes", &m_n_trt_holes, "n_trt_holes/I");
306  m_tree->Branch("hole_bec", &m_hole_bec);
307  m_tree->Branch("hole_phi", &m_hole_phi);
308  m_tree->Branch("hole_layer", &m_hole_layer);
309  m_tree->Branch("hole_strawlayer", &m_hole_strawlayer);
310  m_tree->Branch("hole_straw", &m_hole_straw);
311  m_tree->Branch("hole_chip", &m_hole_chip);
312  m_tree->Branch("hole_pad", &m_hole_pad);
313  m_tree->Branch("hole_x", &m_hole_x);
314  m_tree->Branch("hole_y", &m_hole_y);
315  m_tree->Branch("hole_z", &m_hole_z);
316  m_tree->Branch("hole_center_x", &m_hole_center_x);
317  m_tree->Branch("hole_center_y", &m_hole_center_y);
318  m_tree->Branch("hole_center_z", &m_hole_center_z);
319  m_tree->Branch("hole_locR", &m_hole_locR);
320  m_tree->Branch("hole_locR_error", &m_hole_locR_error);
321  m_tree->Branch("hole_det", &m_hole_det);
322 
323  // ---- branches added by dan ------
324  m_tree->Branch("n_primary_vertex", &m_n_primary_vertex, "n_primary_vertex/I");
325  m_tree->Branch("hit_tube_hit", &m_hit_tube_hit);
326  m_tree->Branch("n_tube_hits", &m_n_tube_hits, "n_tube_hits/I");
327  // -------------------------------
328 }
329 
330 
331 //____________________________________________________________________________
333  m_event_number = 0;
334  m_run_number = 0;
335  m_lumi_block = 0;
336  m_track_pt = 0.0;
337  m_track_eta = 0.0;
338  m_track_phi = 0.0;
339  m_track_d0 = 0.0;
340  m_track_z0 = 0.0;
341  m_n_pixel_hits = 0;
342  m_n_sct_hits = 0;
343  m_n_trt_hits = 0;
344  m_hit_bec.clear();
345  m_hit_phi.clear();
346  m_hit_layer.clear();
347  m_hit_strawlayer.clear();
348  m_hit_straw.clear();
349  m_hit_chip.clear();
350  m_hit_pad.clear();
351  m_hit_x.clear();
352  m_hit_y.clear();
353  m_hit_z.clear();
354  m_hit_center_x.clear();
355  m_hit_center_y.clear();
356  m_hit_center_z.clear();
357  m_hit_R.clear();
358  m_hit_locR.clear();
359  m_hit_HL.clear();
360  m_hit_det.clear();
361  m_hit_ub_locR.clear();
362  m_hit_ub_x.clear();
363  m_hit_ub_y.clear();
364  m_hit_ub_z.clear();
365  m_n_pixel_holes = 0;
366  m_n_sct_holes = 0;
367  m_n_trt_holes = 0;
368  m_hole_bec.clear();
369  m_hole_phi.clear();
370  m_hole_layer.clear();
371  m_hole_strawlayer.clear();
372  m_hole_straw.clear();
373  m_hole_chip.clear();
374  m_hole_pad.clear();
375  m_hole_x.clear();
376  m_hole_y.clear();
377  m_hole_z.clear();
378  m_hole_center_x.clear();
379  m_hole_center_y.clear();
380  m_hole_center_z.clear();
381  m_hole_locR.clear();
382  m_hole_locR_error.clear();
383  m_hole_det.clear();
384 
385  m_n_primary_vertex = 0; // added by dan
386  m_hit_tube_hit.clear(); // added by dan
387  m_n_tube_hits = 0; // added by dan
388 }
389 
390 
391 //____________________________________________________________________________
393  const Trk::TrackParameters* track_parameters = hit.trackParameters();
394  if (!track_parameters) {
395  ATH_MSG_ERROR("fill_hit_data(hit): null track_parameters");
396  return 0;
397  }
398 
399  m_hit_x.push_back( track_parameters->position().x() );
400  m_hit_y.push_back( track_parameters->position().y() );
401  m_hit_z.push_back( track_parameters->position().z() );
402 
403  m_hit_center_x.push_back( track_parameters->associatedSurface().center().x() );
404  m_hit_center_y.push_back( track_parameters->associatedSurface().center().y() );
405  m_hit_center_z.push_back( track_parameters->associatedSurface().center().z() );
406 
408 
409  int det = 0;
410  if(m_TRT_ID->is_pixel(id)) {
411  det = 1;
412  } else if(m_TRT_ID->is_sct(id)) {
413  det = 2;
414  } else if(m_TRT_ID->is_trt(id)) {
415  det = 3;
416  }
417  m_hit_det.push_back( det );
418 
419  m_hit_bec.push_back( det == 3 ? m_TRT_ID->barrel_ec(id) : 0 );
420  m_hit_phi.push_back( det == 3 ? m_TRT_ID->phi_module(id) : -1 );
421  m_hit_layer.push_back( det == 3 ? m_TRT_ID->layer_or_wheel(id) : -1 );
422  m_hit_strawlayer.push_back( det == 3 ? m_TRT_ID->straw_layer(id) : -1 );
423  m_hit_straw.push_back( det == 3 ? m_TRT_ID->straw(id) : -1 );
424 
425  int chip = -1;
426  if(det == 3) {
427  m_TRTStrawNeighbourSvc->getChip(id, chip);
428  }
429  m_hit_chip.push_back(chip);
430 
431  int pad = -1;
432  if(det == 3) {
433  m_TRTStrawNeighbourSvc->getPad(id, pad);
434  }
435  m_hit_pad.push_back(pad);
436 
437  m_hit_locR.push_back( det == 3 ? track_parameters->parameters()[Trk::locR] : -1 );
438 
439  const Trk::MeasurementBase* measurement = hit.measurementOnTrack();
440  const InDet::TRT_DriftCircleOnTrack* trtcircle = nullptr;
441  if(measurement) {
442  trtcircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*> (measurement);
443  } else {
444  ATH_MSG_ERROR("fill_hit_data(hit): null measurement");
445  }
446 
447  if(!trtcircle) {
448  ATH_MSG_DEBUG("fill_hit_data(hit): null trtcircle");
449  }
450 
451  m_hit_R.push_back( (det == 3)&&(trtcircle != nullptr) ? trtcircle->localParameters()[Trk::driftRadius] : -1 );
452  m_hit_HL.push_back( (det == 3)&&(trtcircle != nullptr) ? trtcircle->highLevel() : -1 );
453 
454  // unbiased trk parameters
455  std::unique_ptr<Trk::TrackParameters> unbiased_track_parameters =
456  m_updator->removeFromState(
457  *(hit.trackParameters()),
460 
461  m_hit_ub_locR.push_back( det == 3 && unbiased_track_parameters ? unbiased_track_parameters->parameters()[Trk::locR] : -1 );
462  m_hit_ub_x.push_back( unbiased_track_parameters ? unbiased_track_parameters->position().x() : -1 );
463  m_hit_ub_y.push_back( unbiased_track_parameters ? unbiased_track_parameters->position().y() : -1 );
464  m_hit_ub_z.push_back( unbiased_track_parameters ? unbiased_track_parameters->position().z() : -1 );
465 
466  // ------- added by dan -------
467  int is_tube_hit = -1;
468  if (measurement && (det == 3) ) {
469  is_tube_hit = ((measurement->localCovariance())(Trk::locX,Trk::locX) > 1.0)? 1 : 0;
470  if (is_tube_hit) m_n_tube_hits++;
471  }
472 
473  m_hit_tube_hit.push_back( (det == 3)&&(measurement != nullptr) ? is_tube_hit : -1);
474 
475  // ----------------------------
476 
477 
478  return det;
479 }
480 
481 
482 //____________________________________________________________________________
484  const Trk::TrackParameters* track_parameters = hole.trackParameters();
485  if (!track_parameters) {
486  ATH_MSG_ERROR("fill_hole_data(hole): null track_parameters");
487  return 0;
488  }
489 
490  m_hole_x.push_back( track_parameters->position().x() );
491  m_hole_y.push_back( track_parameters->position().y() );
492  m_hole_z.push_back( track_parameters->position().z() );
493 
494  m_hole_center_x.push_back( track_parameters->associatedSurface().center().x() );
495  m_hole_center_y.push_back( track_parameters->associatedSurface().center().y() );
496  m_hole_center_z.push_back( track_parameters->associatedSurface().center().z() );
497 
499 
500  int det = 0;
501  if(m_TRT_ID->is_pixel(id)) {
502  det = 1;
503  } else if(m_TRT_ID->is_sct(id)) {
504  det = 2;
505  } else if(m_TRT_ID->is_trt(id)) {
506  det = 3;
507  }
508  m_hole_det.push_back( det );
509 
510  m_hole_bec.push_back( det == 3 ? m_TRT_ID->barrel_ec(id) : -1 );
511  m_hole_phi.push_back( det == 3 ? m_TRT_ID->phi_module(id) : -1 );
512  m_hole_layer.push_back( det == 3 ? m_TRT_ID->layer_or_wheel(id) : -1 );
513  m_hole_strawlayer.push_back( det == 3 ? m_TRT_ID->straw_layer(id) : -1 );
514  m_hole_straw.push_back( det == 3 ? m_TRT_ID->straw(id) : -1 );
515 
516  int chip = -1;
517  if (det == 3) {
518  m_TRTStrawNeighbourSvc->getChip(id, chip);
519  }
520  m_hole_chip.push_back(chip);
521 
522  int pad = -1;
523  if (det == 3) {
524  m_TRTStrawNeighbourSvc->getPad(id, pad);
525  }
526  m_hole_pad.push_back(pad);
527 
528  float locR = track_parameters->parameters()[Trk::locR];
529  m_hole_locR.push_back( det == 3 ? locR : -1 );
530 
531  float locR_error = 0.0;
532  //const Trk::MeasuredTrackParameters* meas = dynamic_cast< const Trk::MeasuredTrackParameters* >(track_parameters);
533  //if(meas)
534  //{
535 
536  const AmgSymMatrix(5)* merr = track_parameters->covariance();
537  if(merr){
538  locR_error = Amg::error(*merr,Trk::locR);
539  } else {
540  ATH_MSG_ERROR("Track parameters have no covariance attached.");
541  }
542  m_hole_locR_error.push_back( det == 3 ? locR_error : 0.0 );
543 
544  /*
545  ATH_MSG_DEBUG("hole trk x = " << track_parameters->position().x() <<
546  ", surf x = " << track_parameters->associatedSurface()->center().x());
547  ATH_MSG_DEBUG("hole trk y = " << track_parameters->position().y() <<
548  ", surf y = " << track_parameters->associatedSurface()->center().y());
549  ATH_MSG_DEBUG("hole trk z = " << track_parameters->position().z() <<
550  ", surf z = " << track_parameters->associatedSurface()->center().z());
551  */
552 
553  return det;
554 }
555 
TRTStrawEfficiency::m_track_phi
float m_track_phi
Definition: TRTStrawEfficiency.h:95
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
SCT_ClusterOnTrack.h
TRTStrawEfficiency::m_updator
PublicToolHandle< Trk::IUpdator > m_updator
Definition: TRTStrawEfficiency.h:76
TRTStrawEfficiency::m_n_sct_hits
int m_n_sct_hits
Definition: TRTStrawEfficiency.h:99
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
TRTStrawEfficiency::m_max_abs_d0
FloatProperty m_max_abs_d0
Definition: TRTStrawEfficiency.h:56
TrackParameters.h
TRTStrawEfficiency::m_hole_pad
std::vector< int > m_hole_pad
Definition: TRTStrawEfficiency.h:131
TRTStrawEfficiency::m_hit_center_x
std::vector< float > m_hit_center_x
Definition: TRTStrawEfficiency.h:111
Trk::locX
@ locX
Definition: ParamDefs.h:37
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
TRTStrawEfficiency::m_hit_ub_z
std::vector< float > m_hit_ub_z
Definition: TRTStrawEfficiency.h:121
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
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.
TRTStrawEfficiency::m_tree_name
StringProperty m_tree_name
Definition: TRTStrawEfficiency.h:67
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
TRTStrawEfficiency::m_hit_bec
std::vector< int > m_hit_bec
Definition: TRTStrawEfficiency.h:101
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
InDetDD::holes
@ holes
Definition: InDetDD_Defs.h:17
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
TRTStrawEfficiency::m_n_pixel_holes
int m_n_pixel_holes
Definition: TRTStrawEfficiency.h:122
TRTStrawEfficiency::m_hole_z
std::vector< float > m_hole_z
Definition: TRTStrawEfficiency.h:134
EventPrimitivesHelpers.h
Trk::Surface::associatedDetectorElementIdentifier
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
TRTStrawEfficiency::m_hist_svc
ServiceHandle< ITHistSvc > m_hist_svc
Definition: TRTStrawEfficiency.h:64
TRT_ID.h
This is an Identifier helper class for the TRT subdetector. This class is a factory for creating comp...
TRTStrawEfficiency::m_hit_phi
std::vector< int > m_hit_phi
Definition: TRTStrawEfficiency.h:102
TRTStrawEfficiency::m_min_pT
FloatProperty m_min_pT
Definition: TRTStrawEfficiency.h:58
TRTStrawEfficiency::m_num_preselected_tracks
unsigned int m_num_preselected_tracks
Definition: TRTStrawEfficiency.h:87
TRTStrawEfficiency::m_hit_layer
std::vector< int > m_hit_layer
Definition: TRTStrawEfficiency.h:103
TRTStrawEfficiency::m_hit_chip
std::vector< int > m_hit_chip
Definition: TRTStrawEfficiency.h:106
TRTStrawEfficiency::m_event_number
unsigned int m_event_number
Definition: TRTStrawEfficiency.h:90
TRTStrawEfficiency::make_branches
void make_branches()
Definition: TRTStrawEfficiency.cxx:270
Trk::z0
@ z0
Definition: ParamDefs.h:64
Trk::TrackStateOnSurface::measurementOnTrack
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
InDet::TRT_DriftCircleOnTrack::highLevel
bool highLevel() const
returns true if the high level threshold was passed
Definition: TRT_DriftCircleOnTrack.h:234
TRTStrawEfficiency::initialize
StatusCode initialize()
Definition: TRTStrawEfficiency.cxx:38
Trk::locR
@ locR
Definition: ParamDefs.h:44
TRTStrawEfficiency::m_n_pixel_hits
int m_n_pixel_hits
Definition: TRTStrawEfficiency.h:98
AtlasDetectorID::is_trt
bool is_trt(Identifier id) const
Definition: AtlasDetectorID.h:782
TRTStrawEfficiency::m_track_d0
float m_track_d0
Definition: TRTStrawEfficiency.h:96
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
TRTStrawEfficiency::m_min_pixel_hits
IntegerProperty m_min_pixel_hits
Definition: TRTStrawEfficiency.h:61
TRTStrawEfficiency::m_hole_chip
std::vector< int > m_hole_chip
Definition: TRTStrawEfficiency.h:130
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
InDet::TRT_DriftCircleOnTrack
Definition: TRT_DriftCircleOnTrack.h:53
TRTStrawEfficiency::m_trigDec
PublicToolHandle< Trig::ITrigDecisionTool > m_trigDec
Definition: TRTStrawEfficiency.h:78
TRTStrawEfficiency::m_TRTStrawNeighbourSvc
ServiceHandle< ITRT_StrawNeighbourSvc > m_TRTStrawNeighbourSvc
Definition: TRTStrawEfficiency.h:66
TRTStrawEfficiency::m_TRT_ID
const TRT_ID * m_TRT_ID
Definition: TRTStrawEfficiency.h:74
TRTStrawEfficiency::m_n_trt_hits
int m_n_trt_hits
Definition: TRTStrawEfficiency.h:100
TRTStrawEfficiency::m_hole_straw
std::vector< int > m_hole_straw
Definition: TRTStrawEfficiency.h:129
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
TRTStrawEfficiency::m_hole_det
std::vector< int > m_hole_det
Definition: TRTStrawEfficiency.h:140
TRTStrawEfficiency::m_hole_locR
std::vector< float > m_hole_locR
Definition: TRTStrawEfficiency.h:138
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
TRTStrawEfficiency::execute
StatusCode execute()
Definition: TRTStrawEfficiency.cxx:81
TRTStrawEfficiency::m_hit_locR
std::vector< float > m_hit_locR
Definition: TRTStrawEfficiency.h:115
TRTStrawEfficiency::m_hit_HL
std::vector< int > m_hit_HL
Definition: TRTStrawEfficiency.h:116
TRTStrawEfficiency::m_n_primary_vertex
int m_n_primary_vertex
Definition: TRTStrawEfficiency.h:144
TRTStrawEfficiency::m_hole_center_x
std::vector< float > m_hole_center_x
Definition: TRTStrawEfficiency.h:135
TRTStrawEfficiency::m_hit_center_y
std::vector< float > m_hit_center_y
Definition: TRTStrawEfficiency.h:112
TRTStrawEfficiency::m_min_trt_hits
IntegerProperty m_min_trt_hits
Definition: TRTStrawEfficiency.h:63
TRTStrawEfficiency::m_vertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
Definition: TRTStrawEfficiency.h:83
TRTStrawEfficiency::m_hit_R
std::vector< float > m_hit_R
Definition: TRTStrawEfficiency.h:114
TRTTrackHoleSearchTool.h
TRTStrawEfficiency::m_tree
TTree * m_tree
Definition: TRTStrawEfficiency.h:73
TRTStrawEfficiency::m_hole_layer
std::vector< int > m_hole_layer
Definition: TRTStrawEfficiency.h:127
TRTStrawEfficiency::m_track_pt
float m_track_pt
Definition: TRTStrawEfficiency.h:93
TRTStrawEfficiency::m_hole_center_y
std::vector< float > m_hole_center_y
Definition: TRTStrawEfficiency.h:136
TRT_ID::straw
int straw(const Identifier &id) const
Definition: TRT_ID.h:902
TRTStrawEfficiency::m_hole_y
std::vector< float > m_hole_y
Definition: TRTStrawEfficiency.h:133
TRTStrawEfficiency::m_hit_ub_locR
std::vector< float > m_hit_ub_locR
Definition: TRTStrawEfficiency.h:118
TRTStrawEfficiency::m_stream_name
StringProperty m_stream_name
Definition: TRTStrawEfficiency.h:68
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
TRTStrawEfficiency::m_hit_pad
std::vector< int > m_hit_pad
Definition: TRTStrawEfficiency.h:107
TRTStrawEfficiency::m_trt_hole_finder
ToolHandle< Trk::ITrackHoleSearchTool > m_trt_hole_finder
Definition: TRTStrawEfficiency.h:55
TRTStrawEfficiency::m_num_tracks
unsigned int m_num_tracks
Definition: TRTStrawEfficiency.h:86
Trk::theta
@ theta
Definition: ParamDefs.h:66
TRTStrawEfficiency::m_n_sct_holes
int m_n_sct_holes
Definition: TRTStrawEfficiency.h:123
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
TRTStrawEfficiency::m_hit_center_z
std::vector< float > m_hit_center_z
Definition: TRTStrawEfficiency.h:113
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:53
TRTStrawEfficiency::m_hit_x
std::vector< float > m_hit_x
Definition: TRTStrawEfficiency.h:108
TRTStrawEfficiency::m_hole_x
std::vector< float > m_hole_x
Definition: TRTStrawEfficiency.h:132
TRTStrawEfficiency::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: TRTStrawEfficiency.h:82
TRTStrawEfficiency::m_min_p
FloatProperty m_min_p
Definition: TRTStrawEfficiency.h:59
TRTStrawEfficiency::m_hit_strawlayer
std::vector< int > m_hit_strawlayer
Definition: TRTStrawEfficiency.h:104
TRTStrawEfficiency::m_tracksKey
SG::ReadHandleKey< TrackCollection > m_tracksKey
Definition: TRTStrawEfficiency.h:81
TRTStrawEfficiency::m_max_abs_eta
FloatProperty m_max_abs_eta
Definition: TRTStrawEfficiency.h:60
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::ParametersBase
Definition: ParametersBase.h:55
TRT_DriftCircleOnTrack.h
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
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
DataVector< const Trk::TrackStateOnSurface >
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.
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TRTStrawEfficiency::fill_hit_data
int fill_hit_data(const Trk::TrackStateOnSurface &hit)
Definition: TRTStrawEfficiency.cxx:392
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
TRTStrawEfficiency::m_track_z0
float m_track_z0
Definition: TRTStrawEfficiency.h:97
Trk::MeasurementBase
Definition: MeasurementBase.h:58
TRTStrawEfficiency::m_max_abs_z0
FloatProperty m_max_abs_z0
Definition: TRTStrawEfficiency.h:57
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::d0
@ d0
Definition: ParamDefs.h:63
TRTStrawEfficiency::m_hit_tube_hit
std::vector< int > m_hit_tube_hit
Definition: TRTStrawEfficiency.h:143
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
TRTStrawEfficiency::fill_hole_data
int fill_hole_data(const Trk::TrackStateOnSurface &hole)
Definition: TRTStrawEfficiency.cxx:483
TRTStrawEfficiency::m_hole_phi
std::vector< int > m_hole_phi
Definition: TRTStrawEfficiency.h:126
TRT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: TRT_ID.h:875
TRTStrawEfficiency::m_n_tube_hits
int m_n_tube_hits
Definition: TRTStrawEfficiency.h:145
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
ITRT_StrawNeighbourSvc.h
Abstract interface to information on straws electronic grouping.
TRTStrawEfficiency::m_run_number
unsigned int m_run_number
Definition: TRTStrawEfficiency.h:91
TRTStrawEfficiency::m_hit_det
std::vector< int > m_hit_det
Definition: TRTStrawEfficiency.h:117
TRTStrawEfficiency.h
TRTStrawEfficiency::m_hit_ub_x
std::vector< float > m_hit_ub_x
Definition: TRTStrawEfficiency.h:119
InDet::PixelClusterOnTrack
Definition: PixelClusterOnTrack.h:51
TRTStrawEfficiency::m_n_trt_holes
int m_n_trt_holes
Definition: TRTStrawEfficiency.h:124
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TRTStrawEfficiency::m_required_trigger
StringProperty m_required_trigger
Definition: TRTStrawEfficiency.h:69
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
TRTStrawEfficiency::m_hit_ub_y
std::vector< float > m_hit_ub_y
Definition: TRTStrawEfficiency.h:120
TRTStrawEfficiency::m_hole_bec
std::vector< int > m_hole_bec
Definition: TRTStrawEfficiency.h:125
TRTStrawEfficiency::m_hole_center_z
std::vector< float > m_hole_center_z
Definition: TRTStrawEfficiency.h:137
TRTStrawEfficiency::m_lumi_block
unsigned int m_lumi_block
Definition: TRTStrawEfficiency.h:92
Trk::hole
@ hole
Definition: MeasurementType.h:36
TRTStrawEfficiency::m_hole_strawlayer
std::vector< int > m_hole_strawlayer
Definition: TRTStrawEfficiency.h:128
TRTStrawEfficiency::TRTStrawEfficiency
TRTStrawEfficiency(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TRTStrawEfficiency.cxx:34
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
TRTStrawEfficiency::m_num_events
unsigned int m_num_events
Definition: TRTStrawEfficiency.h:85
ReadHandle.h
Handle class for reading from StoreGate.
PixelClusterOnTrack.h
TRTStrawEfficiency::clear_branches
void clear_branches()
Definition: TRTStrawEfficiency.cxx:332
TRTStrawEfficiency::m_hole_locR_error
std::vector< float > m_hole_locR_error
Definition: TRTStrawEfficiency.h:139
TRTStrawEfficiency::m_min_sct_hits
IntegerProperty m_min_sct_hits
Definition: TRTStrawEfficiency.h:62
TRTStrawEfficiency::m_track_eta
float m_track_eta
Definition: TRTStrawEfficiency.h:94
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TRTStrawEfficiency::finalize
StatusCode finalize()
Definition: TRTStrawEfficiency.cxx:252
TRTStrawEfficiency::m_hit_z
std::vector< float > m_hit_z
Definition: TRTStrawEfficiency.h:110
Trk::phi0
@ phi0
Definition: ParamDefs.h:65
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
TrackStateOnSurface.h
TRTStrawEfficiency::m_hit_straw
std::vector< int > m_hit_straw
Definition: TRTStrawEfficiency.h:105
InDet::SCT_ClusterOnTrack
Definition: SCT_ClusterOnTrack.h:44
TRTStrawEfficiency::m_hit_y
std::vector< float > m_hit_y
Definition: TRTStrawEfficiency.h:109
Identifier
Definition: IdentifierFieldParser.cxx:14