ATLAS Offline Software
InDetDetailedTrackSelectorTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // forward declares
9 #include "VxVertex/Vertex.h"
10 #include "VxVertex/RecVertex.h"
12 #include "TrkTrack/Track.h"
15 
17 #include "xAODTracking/Vertex.h"
18 
19 
20 // normal includes
21 #include "CLHEP/GenericFunctions/CumulativeChiSquare.hh"
25 #include <cmath>
26 
27 
28 namespace InDet
29 {
30 
31  // ---------------------------------------------------------------------
32  InDetDetailedTrackSelectorTool::InDetDetailedTrackSelectorTool(const std::string& t, const std::string& n, const IInterface* p)
33  : AthAlgTool(t,n,p)
34  {
35  declareInterface<ITrackSelectorTool>(this);
36  }
37 
39  {
40  if(m_useEventInfoBs){
42  if (evt.isValid()) {
43  InDet::BeamSpotData temp(evt->beamStatus(), evt->beamPosX(), evt->beamPosY(), evt->beamPosZ(),
44  evt->beamPosSigmaX(), evt->beamPosSigmaY(), evt->beamPosSigmaZ(),
45  evt->beamTiltXZ(), evt->beamTiltYZ(), evt->beamPosSigmaXY());
46  return new Trk::RecVertex(temp.beamVtx());
47  } else {
48  ATH_MSG_WARNING( " Cannot get beamSpot center from xAOD::EventInfo. Using (0,0,0)... " );
49  return new Trk::Vertex(Amg::Vector3D(0,0,0));
50  }
51  }else{
53  if (beamSpotHandle.isValid()) {
54  return new Trk::RecVertex(beamSpotHandle->beamVtx());
55  } else {
56  ATH_MSG_WARNING( " Cannot get beamSpot center from BeamSpotData. Using (0,0,0)... " );
57  return new Trk::Vertex(Amg::Vector3D(0,0,0));
58  }
59  }
60  }
61 
62  // ---------------------------------------------------------------------
64  = default;
65 
66  // ---------------------------------------------------------------------
67  StatusCode
69  if(m_trackSumTool.empty()){
70  ATH_MSG_DEBUG("No TrackSummaryTool set. OK if running on AOD.");
71  }
73  ATH_CHECK(m_trackSumTool.retrieve(DisableTool{!m_trackSumToolAvailable}));
74 
76  ATH_MSG_DEBUG("No TrackParticleCreatorTool set but shared hit selection used. OK if running on AOD.");
77  }
79  ATH_CHECK(m_particleCreator.retrieve(DisableTool{!m_partCreatorToolAvailable}));
80 
81  ATH_CHECK( m_extrapolator.retrieve() );
85  if(m_trtDCTool.empty()) {
86  ATH_MSG_ERROR(" Eta dependent cut on number of TRT hits requested but TrtDCCutTool not specified. ");
87  return StatusCode::FAILURE;
88  } else if(m_trtDCTool.retrieve().isFailure()) {
89  ATH_MSG_ERROR(" Unable to retrieve tool "<<m_trtDCTool);
90  return StatusCode::FAILURE;
91  }
92  ATH_MSG_DEBUG("Retrieved tool "<<m_trtDCTool);
94  ATH_MSG_DEBUG("Using eta dependent cut on number of TRT hits.");
95  }
97  ATH_MSG_DEBUG("Using eta dependent cut on number of TRT hits + outliers.");
98  }
99  }else{
100  m_trtDCTool.disable();
101  }
102 
103  // Read handle for AtlasFieldCacheCondObj
105 
106  ATH_MSG_DEBUG("Using cuts on the number of Silicon hits");
108  //checking whether sizes of cuts and pt interval expressed in vectors match
109  if( m_ptBenchmarks.size() != m_nSCTValues.size()){
110  ATH_MSG_ERROR( "Number of cuts DOES NOT match the number of intervals to apply. Please check jobOptions. ");
111  return StatusCode::FAILURE;
112  } else if (m_ptBenchmarks.empty()){
113  ATH_MSG_ERROR( "Zero vectors for number of cuts and pt intervals. Please check jobOptions. ");
114  return StatusCode::FAILURE;
115  }//end of vector size protection block
116  }//end of memory protection
117  return StatusCode::SUCCESS;
118  }
119 
120  // ---------------------------------------------------------------------
122  {
123  ATH_MSG_DEBUG( "Finalize successful" );
124  return StatusCode::SUCCESS;
125  }
126 
127  // ---------------------------------------------------------------------
128  bool
130  int nHitTrt = m_nHitTrt;
131  int nHitTrtPlusOutliers = m_nHitTrtPlusOutliers;
132  const Trk::Perigee* perigeeBeforeExtrapolation=dynamic_cast<const Trk::Perigee*>(track.perigeeParameters());
133  if (perigeeBeforeExtrapolation && m_usePreselectionCuts){
134  bool preselectionDecision=preselectionBeforeExtrapolation(*perigeeBeforeExtrapolation);
135  if (!preselectionDecision) {
136  ATH_MSG_DEBUG("Track rejected because of preselection decision!");
137  return false;
138  }
139  } else if (m_usePreselectionCuts){
140  ATH_MSG_DEBUG( " Preselection was requested but cannot be made since no Perigee in Track is available. This is not an error." );
141  }
142  const Trk::Vertex* myVertex=vertex;
143  //in case no Vertex is provided by the user, beam position will be used if available
144  if (myVertex==nullptr) {
145  myVertex = getBeamSpot(Gaudi::Hive::currentContext());
146  }
147  Trk::PerigeeSurface perigeeSurface(myVertex->position());
148  const Trk::TrackParameters *firstmeaspar=nullptr;
149  for (const auto *i : *track.trackParameters()){
150  if ( i->covariance() && !dynamic_cast<const Trk::Perigee*>(i)) {
151  firstmeaspar=i;
152  break;
153  }
154  }
155  if (!firstmeaspar) {
156  //assumes perigeeParameters exist...
157  //no track selection if firstmeas + perigee does not exist !
158  firstmeaspar=track.perigeeParameters();
159  if (!firstmeaspar){
160  ATH_MSG_WARNING( " First measurment on track is missing. Using perigee Parameters, but they are missing: 0 pointer! Track selection failed " );
161  //clean up vertex
162  if (myVertex!=vertex) {
163  delete myVertex;
164  myVertex=nullptr;
165  }
166  return false;
167  }
168  }
169  const Trk::TrackParameters* extrapolatedParameters= m_extrapolator->extrapolate(Gaudi::Hive::currentContext(),
170  *firstmeaspar,
171  perigeeSurface,
173  true,
174  track.info().particleHypothesis() ).release();
175  const Trk::Perigee* extrapolatedPerigee = extrapolatedParameters ? dynamic_cast<const Trk::Perigee*>(extrapolatedParameters) : nullptr;
176  if (!extrapolatedPerigee || !extrapolatedPerigee->covariance() ) {
177  ATH_MSG_WARNING( "Track Selector failed to extrapolate track to the vertex: " << myVertex->position() );
178  if (extrapolatedParameters) {
179  ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" );
180  delete extrapolatedParameters;
181  extrapolatedParameters=nullptr;
182  }
183  }
184 
185  //decision based on the track parameters
186  const Trk::RecVertex* recVertex = dynamic_cast<const Trk::RecVertex*>(myVertex);
187  bool dec = decision(extrapolatedPerigee, recVertex ? &recVertex->covariancePosition() : nullptr );
188  if (myVertex!=vertex) {
189  delete myVertex;
190  myVertex=nullptr;
191  }
192  bool isInTrtAcceptance=true;
193  if (!extrapolatedPerigee || std::fabs(extrapolatedPerigee->momentum().eta())>m_TrtMaxEtaAcceptance) {
194  isInTrtAcceptance=false;
195  }
196  if (extrapolatedPerigee!=track.perigeeParameters()) {
197  delete extrapolatedPerigee;
198  extrapolatedPerigee=nullptr;
199  }
200  if(!dec) {
201  ATH_MSG_DEBUG("Track rejected because of perigee parameters!");
202  return false;
203  }
204  if (m_useTrackQualityInfo) {
205  const Trk::FitQuality* TrkQuality=track.fitQuality();
206  if (TrkQuality==nullptr) {
207  ATH_MSG_WARNING( "Requested cut on track quality was not possible. Track has no FitQuality object attached. Selection failed." );
208  return false;
209  }
210  if (!decision(TrkQuality)) {
211  return false;
212  }
213  }
214  if (m_useTrackSummaryInfo) {
215  //number of hits, silicon hits, b-layer
216  // first ask track for summary
217  std::unique_ptr<Trk::TrackSummary> summaryUniquePtr;
218  const Trk::TrackSummary* summary = track.trackSummary();
219  if (m_trackSumToolAvailable && summary == nullptr) {
220  summaryUniquePtr = m_trackSumTool->summary(Gaudi::Hive::currentContext(), track);
221  summary = summaryUniquePtr.get();
222  }
223  if (nullptr==summary ) {
224  ATH_MSG_FATAL( "Track preselection: cannot create a track summary (but useTrackSummary is true). Selection failed." );
225  return false;
226  }
227 
228  // Create xAOD::TrackParticle to retrieve shared hit info
229  const xAOD::TrackParticle* tp = m_partCreatorToolAvailable ? m_particleCreator->createParticle(track) : nullptr;
230  if(m_useSharedHitInfo && tp==nullptr){
231  ATH_MSG_FATAL( "Track preselection: cannot create a track particle (but useSharedHitInfo is true). Selection failed." );
232  return false;
233  }
234 
235  // get the minimum nimber of TRT hits based on eta of the track
237  nHitTrt = m_trtDCTool->minNumberDCs( (*track.trackParameters())[0] );
238  if(m_addToMinHitTrt!=0){
239  nHitTrt += m_addToMinHitTrt;
240  }else{
241  nHitTrt = (int)((double)nHitTrt*m_scaleMinHitTrt);
242  }
243  }
244 
245  // get the minimum nimber of TRT hits + outliers based on eta of the track
247  nHitTrtPlusOutliers = m_trtDCTool->minNumberDCs( (*track.trackParameters())[0] );
249  nHitTrtPlusOutliers += m_addToMinHitTrtWithOutliers;
250  }else{
251  nHitTrtPlusOutliers = (int)((double)nHitTrtPlusOutliers*m_scaleMinHitTrtWithOutliers);
252  }
253  }
254 
255  if (!decision(summary, tp, m_useSharedHitInfo,isInTrtAcceptance, perigeeBeforeExtrapolation,
256  nHitTrt, nHitTrtPlusOutliers)) {
257  return false;
258  }
259  }
260  return true;
261  }
262 
263  // ---------------------------------------------------------------------
264  bool
266  int nHitTrt = m_nHitTrt;
267  int nHitTrtPlusOutliers = m_nHitTrtPlusOutliers;
268  const Trk::TrackParameters* definintParameters=&(track.definingParameters());
269  const Trk::Perigee* perigeeBeforeExtrapolation=dynamic_cast<const Trk::Perigee*>(definintParameters);
270  if (perigeeBeforeExtrapolation && m_usePreselectionCuts) {
271  bool preselectionDecision=preselectionBeforeExtrapolation(*perigeeBeforeExtrapolation);
272  if (!preselectionDecision) {
273  ATH_MSG_DEBUG("Track rejected because of preselection decision!");
274  return false;
275  }
276  } else if (m_usePreselectionCuts) {
277  ATH_MSG_WARNING( " Preselection was requested but cannot be made since the Perigee is not the defining Parameter of the TrackParticle. This is not an error." );
278  }
279  bool isInTrtAcceptance=true;
280  if (!perigeeBeforeExtrapolation || std::fabs(perigeeBeforeExtrapolation->momentum().eta())>m_TrtMaxEtaAcceptance) {
281  isInTrtAcceptance=false;
282  }
283  if (m_useTrackQualityInfo) {
284  const Trk::FitQuality* TrkQuality=track.fitQuality();
285  if (TrkQuality==nullptr) {
286  ATH_MSG_WARNING( "Requested cut on track quality was not possible. TrackParticleBase has no FitQuality object attached. Selection failed." );
287  return false;
288  }
289  if (!decision(TrkQuality)) {
290  return false;
291  }
292  }
293  if (m_useTrackSummaryInfo) {
294  //number of hits, silicon hits, b-layer
295  const Trk::TrackSummary* summary = track.trackSummary();
296  if (nullptr==summary ) {
297  ATH_MSG_WARNING( "Track preselection: cannot create a track summary (but useTrackSummary is true). Selection failed." );
298  return false;
299  }
300 
301 
302  if (m_useSharedHitInfo) {
303  ATH_MSG_ERROR( "Use of InDetDetailedTrackSelectorTool with Trk::TrackParticleBase and useSharedHitInfo is not supported");
304  return false;
305  }
306  const xAOD::TrackParticle* tp = nullptr;
307 
309  nHitTrt = m_trtDCTool->minNumberDCs( (track.trackParameters())[0] );
310  if(m_addToMinHitTrt!=0){
311  nHitTrt += m_addToMinHitTrt;
312  }else{
313  nHitTrt = (int)((double)nHitTrt*m_scaleMinHitTrt);
314  }
315  }
316 
318  nHitTrtPlusOutliers = m_trtDCTool->minNumberDCs( (track.trackParameters())[0] );
320  nHitTrtPlusOutliers += m_addToMinHitTrtWithOutliers;
321  }else{
322  nHitTrtPlusOutliers = (int)((double)nHitTrtPlusOutliers*m_scaleMinHitTrtWithOutliers);
323  }
324  }
325 
326  if ((!perigeeBeforeExtrapolation) or
327  (!decision(summary, tp, m_useSharedHitInfo, isInTrtAcceptance, perigeeBeforeExtrapolation,
328  nHitTrt, nHitTrtPlusOutliers))) {
329  return false;
330  }
331  }
332  const Trk::Perigee* extrapolatedPerigee=dynamic_cast<const Trk::Perigee*>(definintParameters);
333  const Trk::Vertex* myVertex=vertex;
334  if (vertex==nullptr) {
335  myVertex = getBeamSpot(Gaudi::Hive::currentContext());
336  }
337  Trk::PerigeeSurface perigeeSurface(myVertex->position());
338  const Trk::TrackParameters *firstmeaspar=nullptr;
339  for (const auto *i : track.trackParameters()) {
340  if (i->covariance() &&
341  !dynamic_cast<const Trk::Perigee*>(i)) {
342  firstmeaspar=i;
343  break;
344  }
345  }
346  if (!firstmeaspar) {
347  if (!extrapolatedPerigee || !extrapolatedPerigee->covariance() ) {
348  ATH_MSG_DEBUG( " Track Paraemters at first measurement not found. Perigee not found. Cannot do TrackSelection..." );
349  if (myVertex!=vertex) {
350  delete myVertex;
351  myVertex=nullptr;
352  }
353  return false;
354  }
355  //using perigee instead of firstmeasurement, since first measurement was not found...
356  firstmeaspar=&(track.definingParameters());
357  }
358 
359  ATH_MSG_VERBOSE ("Input to extrapolation: " << *firstmeaspar);
360  ATH_MSG_VERBOSE ("Extrapolating to position: " << myVertex->position()[0] << " , " <<
361  myVertex->position()[1] << " , " << myVertex->position()[2]);
362  const Trk::TrackParameters* extrapolatedParameters= firstmeaspar ?
363  m_extrapolator->extrapolate(Gaudi::Hive::currentContext(),
364  *firstmeaspar,
365  perigeeSurface,
367  true,Trk::pion ).release() : nullptr;
368  extrapolatedPerigee = extrapolatedParameters ? dynamic_cast<const Trk::Perigee*>(extrapolatedParameters) : nullptr;
369  if (extrapolatedPerigee==nullptr || !extrapolatedPerigee->covariance()) {
370  ATH_MSG_WARNING( "Track Selector failed to extrapolate track to the vertex: " << myVertex->position() );
371  if (extrapolatedParameters) {
372  ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" );
373  delete extrapolatedParameters;
374  extrapolatedParameters = nullptr;
375  }
376  }
377  if (extrapolatedParameters) ATH_MSG_VERBOSE ("Result: " << *extrapolatedParameters);
378  const Trk::RecVertex* recVertex = dynamic_cast<const Trk::RecVertex*>(myVertex);
379  bool dec = decision(extrapolatedPerigee, recVertex ? &recVertex->covariancePosition() : nullptr );
380  if (myVertex!=vertex) {
381  delete myVertex;
382  myVertex=nullptr;
383  }
384  if (extrapolatedPerigee!=&(track.definingParameters())) {
385  delete extrapolatedPerigee;
386  extrapolatedPerigee=nullptr;
387  }
388  if(!dec) {
389  ATH_MSG_DEBUG("Track rejected because of perigee parameters!");
390  return false;
391  }
392  return true;
393  }
394 
396  {
397  if(vertex) return vertex->position();
398  if(m_useEventInfoBs){
400  if (evt.isValid()) {
401  InDet::BeamSpotData temp(evt->beamStatus(), evt->beamPosX(), evt->beamPosY(), evt->beamPosZ(),
402  evt->beamPosSigmaX(), evt->beamPosSigmaY(), evt->beamPosSigmaZ(),
403  evt->beamTiltXZ(), evt->beamTiltYZ(), evt->beamPosSigmaXY());
404  return temp.beamVtx().position();
405  } else {
406  ATH_MSG_WARNING( " Cannot get beamSpot center from xAOD::EventInfo. Using (0,0,0)... " );
407  return Amg::Vector3D(0,0,0);
408  }
409  }else{
411  if (beamSpotHandle.isValid()) {
412  return beamSpotHandle->beamVtx().position();
413  } else {
414  ATH_MSG_WARNING( " Cannot get beamSpot center from BeamSpotData. Using (0,0,0)... " );
415  return Amg::Vector3D(0,0,0);
416  }
417  }
418  }
419 
420  // ---------------------------------------------------------------------
421  bool
423  {
424  int nHitTrt = m_nHitTrt;
425  int nHitTrtPlusOutliers = m_nHitTrtPlusOutliers;
426 
427  const Trk::Perigee& perigee=tp.perigeeParameters();
429  ATH_MSG_DEBUG("Track rejected because of preselection decision!");
430  return false;
431  }
432 
433  if (m_useTrackQualityInfo && !decision(tp.chiSquared(),tp.numberDoF())) {
434  ATH_MSG_DEBUG("Track rejected because of bad fit quality!");
435  return false;
436  }
437 
438  if (m_useTrackSummaryInfo) {
439  //number of hits, silicon hits, b-layer
440 
442  nHitTrt = m_trtDCTool->minNumberDCs( &perigee );
443  if(m_addToMinHitTrt!=0){
444  nHitTrt += m_addToMinHitTrt;
445  }else{
446  nHitTrt = (int)((double)nHitTrt*m_scaleMinHitTrt);
447  }
448  }
450  nHitTrtPlusOutliers = m_trtDCTool->minNumberDCs( &perigee );
452  nHitTrtPlusOutliers += m_addToMinHitTrtWithOutliers;
453  }else{
454  nHitTrtPlusOutliers = (int)((double)nHitTrtPlusOutliers*m_scaleMinHitTrtWithOutliers);
455  }
456  }
462  int nhs = getCount(tp,xAOD::numberOfSCTHoles );
465 
466  //**-----------------------------------------------------------------------
468  double pt = tp.pt();
469  unsigned int it = 0;
470  for(; it< m_ptBenchmarks.size()-1; ++it ) {
471  if(pt>m_ptBenchmarks[it] && pt <=m_ptBenchmarks[it+1] && ns < m_nSCTValues[it]) {
472  ATH_MSG_DEBUG("Track rejected because of Pt-Dependent SCT Hit cut (CAREFUL! Excludes dead modules)") ;
473  return false;
474  }
475  }//end of pt intervals loop
476 
477  //now cutting all the rest by the last value in the vector
478  if(pt>m_ptBenchmarks[it+1] && ns < m_nSCTValues[it+1]) {
479  ATH_MSG_DEBUG("Track rejected because of Pt-Dependent SCT Hit cut (CAREFUL! Excludes dead modules)") ;
480  return false;
481  }
482  }
483 
484  //*--------------------------------------------------------------------------------
485 
486  //normal cuts in all their variety
487 
488  if(nb == 0 && nb < m_nHitBLayer) {
489  ATH_MSG_DEBUG("Track rejected because of nHitBLayer "<<nb<<" < "<<m_nHitBLayer);
490  if (eiph) {
491  ATH_MSG_DEBUG("and track rejected because at least one hit is expected in the innermost pixel layer") ;
492  return false;
493  }else ATH_MSG_DEBUG("recovered track as no b-layer expected") ;
494  }//end of checking the b-layer
495 
496  if(np+npd < m_nHitPix) {
497  ATH_MSG_DEBUG("Track rejected because of nHitPix "<<np+npd<<" < "<<m_nHitPix);
498  return false;
499  }
500 
501  if(np < m_nHitPixPhysical) {
502  ATH_MSG_DEBUG("Track rejected because of nHitPixPhysical "<<np<<" < "<<m_nHitPixPhysical);
503  return false;
504  }
505 
507  if(ns+nsd < m_nHitSct) {
508  ATH_MSG_DEBUG("Track rejected because of nHitSct "<<ns+nsd<<" < "<<m_nHitSct);
509  return false;
510  }
511 
512  if(np+ns+npd+nsd < m_nHitSi) {
513  ATH_MSG_DEBUG("Track rejected because of nHitSi "<<np+npd+ns+nsd<<" < "<<m_nHitSi);
514  return false;
515  }
516 
517  if(np+ns < m_nHitSiPhysical) {
518  ATH_MSG_DEBUG("Track rejected because of nHitSiPhysical "<<np+ns<<" < "<<m_nHitSiPhysical);
519  return false;
520  }
521 
522  // Cuts on number of Holes
523  if (nhp+nhs > m_nHoles){
524  ATH_MSG_DEBUG("Track rejected because of nHolesPixPlusSCT "<<nhp+nhs<<" > "<<m_nHoles);
525  return false;
526  }
527 
528  if(ndhs > m_nDoubleHoles){
529  ATH_MSG_DEBUG("Track rejected because of nDoubleHolesSCT "<<ndhs<<" > "<<m_nDoubleHoles);
530  return false;
531  }
532 
533  if(nhp > m_nHolesPix){
534  ATH_MSG_DEBUG("Track rejected because of nHolesPix "<<nhp<<" > "<<m_nHolesPix);
535  return false;
536  }
537 
538  if (nhs > m_nHolesSct){
539  ATH_MSG_DEBUG("Track rejected because of nHolesSct "<<nhs<<" > "<<m_nHolesSct);
540  return false;
541  }
542 
543  if (std::fabs(tp.eta())>m_TrtMaxEtaAcceptance) {
545  if(nh < nHitTrt) {
546  ATH_MSG_DEBUG("Track rejected because of nHitTrt "<<nh<<" < "<<nHitTrt);
547  return false;
548  }
549 
551  if (nhh<nHitTrtPlusOutliers) {
552  ATH_MSG_DEBUG("Track rejected because of nHitTrtPlusOutliers "<<nhh<<" < "<<nHitTrtPlusOutliers);
553  return false;
554  }
555 
557  if (nhthits<m_nHitTrtHighE) {
558  ATH_MSG_DEBUG("Track rejected because of nHitTrtHighE "<<nhthits<<" < "<<m_nHitTrtHighE);
559  return false;
560  }
561 
563  if (nhthitsWithOutliers<m_nHitTrtPlusOutliersHighE) {
564  ATH_MSG_DEBUG("Track rejected because of nHitTrtPlusOutliersHighE "<<nhthitsWithOutliers<<" < "<<m_nHitTrtPlusOutliersHighE);
565  return false;
566  }
567 
568  if ( getCount(tp, xAOD::numberOfTRTHits )>0) {
571  if(nhe > m_nHitTrtHighEFraction ) {
572  ATH_MSG_DEBUG("Track rejected because of nHitTrtHighEFraction "<<nhe<<" < "<<m_nHitTrtHighEFraction);
573  return false;
574  }
575  }
576 
580  if(nheh<0.) nheh=0.;
581  if (nheh>1.) nheh=1.;
583  ATH_MSG_DEBUG("Track rejected because of nHitTrtHighEFractionWithOutliers "<<nheh<<" < "<<m_nHitTrtHighEFractionWithOutliers);
584  return false;
585  }
586  }
587  }
588  if (m_useSharedHitInfo) {
590  if (nbs>1) nbs=1;
591  if(nbs>m_nSharedBLayer) {
592  ATH_MSG_DEBUG("Track rejected because of nSharedBLayer "<<nbs<<" < "<<m_nSharedBLayer);
593  return false;
594  }
595 
597  if(nps>m_nSharedPix) {
598  ATH_MSG_DEBUG("Track rejected because of nSharedPix "<<nps<<" < "<<m_nSharedPix);
599  return false;
600  }
601 
603  if(nss > m_nSharedSct) {
604  ATH_MSG_DEBUG("Track rejected because of nSharedSct "<<nss<<" < "<<m_nSharedSct);
605  return false;
606  }
607 
608  int nst = nps + nss;
609  if(nst>m_nSharedSi) {
610  ATH_MSG_DEBUG("Track rejected because of nSharedSi "<<nst<<" < "<<m_nSharedSi);
611  return false;
612  }
613  }
614  }
615  Trk::PerigeeSurface perigeeSurface( getPosOrBeamSpot(vertex) );
616 
617  const Trk::TrackParameters* extrapolatedParameters= m_extrapolator->extrapolate(
618  Gaudi::Hive::currentContext(),
619  perigee,perigeeSurface,
620  Trk::anyDirection,true,Trk::pion).release();
621  const Trk::Perigee* extrapolatedPerigee = extrapolatedParameters ? dynamic_cast<const Trk::Perigee*>(extrapolatedParameters) : nullptr;
622  if (extrapolatedPerigee==nullptr) {
623  ATH_MSG_WARNING( "Extrapolation to the vertex failed: " << perigeeSurface << std::endl << perigee );
624  if (extrapolatedParameters!=nullptr) {
625  ATH_MSG_WARNING( "The return object of the extrapolator was not a perigee even if a perigeeSurface was used!" );
626  delete extrapolatedParameters;
627  extrapolatedParameters=nullptr;
628  }
629  return false;
630  }
631  bool dec = false;
632  if( vertex ){
633  // for now copy the position error
634  AmgSymMatrix(3) vertexError = vertex->covariancePosition();
635  dec = decision(extrapolatedPerigee,&vertexError);
636  }else{
637  dec = decision(extrapolatedPerigee,nullptr);
638  }
639 
640  delete extrapolatedPerigee;
641 
642  if(!dec) {
643  ATH_MSG_DEBUG("Track rejected because of perigee parameters!");
644  return false;
645  }
646 
647  return true;
648  }
649 
650 
651  // ---------------------------------------------------------------------
652  bool InDetDetailedTrackSelectorTool::decision(const Trk::Perigee* track,const AmgSymMatrix(3)* covariancePosition) const {
653 
654  // checking pointer first
655  if(nullptr==track || !track->covariance()) {
656  ATH_MSG_WARNING( "Decision on measured perigee: Zero pointer to measured perigee passed. Selection failed." );
657  return false;
658  }
659 
660  const AmgVector(5)& perigeeParms = track->parameters();
661 
662  // only check pt if mag. field is on
663  const EventContext& ctx = Gaudi::Hive::currentContext();
665  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
666  if (fieldCondObj == nullptr) {
667  ATH_MSG_ERROR("execute: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key());
668  return false;
669  }
670  MagField::AtlasFieldCache fieldCache;
671  fieldCondObj->getInitializedCache (fieldCache);
672 
673  if (fieldCache.solenoidOn()){//B field
674  if (perigeeParms[Trk::qOverP] == 0.) {
675  ATH_MSG_DEBUG("Track rejected because of qOverP == 0.");
676  return false;
677  }
678  double p = std::fabs(1./perigeeParms[Trk::qOverP]);
679  if (p<m_pMin) {
680  ATH_MSG_DEBUG("Track rejected because of p " << p << " < " << m_pMin);
681  return false;
682  }
683  double pt = p*std::sin(perigeeParms[Trk::theta]);
684  if (pt<m_pTMin) {
685  ATH_MSG_DEBUG("Track rejected because of pt " << pt << " < " << m_pTMin);
686  return false;
687  }
688  }
689 
690  if (std::fabs(perigeeParms[Trk::d0]) > m_IPd0Max) {
691  ATH_MSG_DEBUG("Track rejected because of fabs(d0) " << std::fabs(perigeeParms[Trk::d0]) << " > " << m_IPd0Max);
692  return false;
693  }
694 
695  if (std::fabs(perigeeParms[Trk::z0]*std::sin(perigeeParms[Trk::theta])) > m_IPz0Max) {
696  ATH_MSG_DEBUG("Track rejected because of fabs(z0*sin(theta)) " << std::fabs(perigeeParms[Trk::z0]*std::sin(perigeeParms[Trk::theta])) << " > " << m_IPz0Max);
697  return false;
698  }
699 
700  if (std::fabs(perigeeParms[Trk::z0]) > m_z0Max) {
701  ATH_MSG_DEBUG("Track rejected because of fabs(z0) " << std::fabs(perigeeParms[Trk::z0]) << " > " << m_z0Max);
702  return false;
703  }
704 
705  if (sqrt( (*track->covariance())(Trk::z0,Trk::z0) )*std::sin(perigeeParms[Trk::theta])>m_sigIPz0Max) {
706  ATH_MSG_DEBUG("Track rejected because of err(z0)*sin(theta) " << sqrt( (*track->covariance())(Trk::z0,Trk::z0) )*std::sin(perigeeParms[Trk::theta]) << " > " << m_sigIPz0Max);
707  return false;
708  }
709 
710  if (sqrt( (*track->covariance())(Trk::d0,Trk::d0) )>m_sigIPd0Max) {
711  ATH_MSG_DEBUG("Track rejected because of err(d0) " << sqrt( (*track->covariance())(Trk::d0,Trk::d0) ) << " > " << m_sigIPd0Max);
712  return false;
713  }
714 
716 
717  double sinTheta = std::sin(perigeeParms[Trk::theta]);
718  double cosTheta = std::cos(perigeeParms[Trk::theta]);
719  double d0wrtPriVtx = perigeeParms[Trk::d0];
720  double deltaZ = perigeeParms[Trk::z0];
721  double z0wrtPriVtx = deltaZ*sinTheta;
722  double testtrackSigD0 = sqrt( (*track->covariance())(Trk::d0,Trk::d0) );
723  double testtrackSigZ0 = sqrt( (*track->covariance())(Trk::z0,Trk::z0) );
724  double testtrackSigTh = sqrt( (*track->covariance())(Trk::theta,Trk::theta) );
725  // error on IP:
726  double trackPhi = perigeeParms[Trk::phi];
727  double dIPdx = std::sin(trackPhi);
728  double dIPdy = -std::cos(trackPhi);
729  double DD0 = testtrackSigD0*testtrackSigD0;
730  double newD0Err=0;
731  if (covariancePosition) {
732  double DXX = dIPdx*dIPdx* (*covariancePosition)(0,0);
733  double DYY = dIPdy*dIPdy* (*covariancePosition)(1,1);
734  double DXY = 2.*dIPdx*dIPdy* (*covariancePosition)(0,1);
735  newD0Err = DD0 + DXX + DYY + DXY;
736  } else {
737  newD0Err = DD0;
738  }
739 
740  double d0ErrwrtPriVtx = (newD0Err>0 ? sqrt(newD0Err) : -10e-9);
741 
742  if (d0ErrwrtPriVtx<0) {
743  ATH_MSG_WARNING( " error on d0 is negative: numeric error... (not expected. please report!)" );
744  }
745 
746  if (m_d0significanceMax>0) {
747  if (std::fabs(d0wrtPriVtx/d0ErrwrtPriVtx)>m_d0significanceMax) {
748  ATH_MSG_DEBUG("Track rejected because of fabs(d0wrtPriVtx/d0ErrwrtPriVtx) " << std::fabs(d0wrtPriVtx/d0ErrwrtPriVtx) << " > " << m_d0significanceMax);
749  return false;
750  }
751  }
752 
753  if (m_z0significanceMax>0) {
754 
755  // error on zIP:
756  double dZIPdTheta = deltaZ*cosTheta;
757  double dZIPdz0 = sinTheta;
758  double dZIPdzV = -sinTheta;
759  double DTheta2 = dZIPdTheta*dZIPdTheta*testtrackSigTh*testtrackSigTh;
760  double DZ02 = dZIPdz0*dZIPdz0*testtrackSigZ0*testtrackSigZ0;
761  double DThetaZ0 = 2.*dZIPdTheta*dZIPdz0*(*track->covariance())(Trk::theta,Trk::z0);
762  double newZ0Err(0);
763  if (covariancePosition) {
764  double DZV2 = dZIPdzV*dZIPdzV* (*covariancePosition)(2,2);
765  newZ0Err = DTheta2 + DZ02 + DZV2 + DThetaZ0;
766  } else {
767  newZ0Err = DTheta2 + DZ02 + DThetaZ0;
768  }
769 
770  double z0ErrwrtPriVtx = (newZ0Err>0 ? sqrt(newZ0Err) : -10e-9);
771 
772  if (z0ErrwrtPriVtx<0) {
773  ATH_MSG_WARNING( " error on z0 is negative: numeric error... (not expected. please report!)" );
774  }
775 
776  if (std::fabs(z0wrtPriVtx/z0ErrwrtPriVtx)>m_z0significanceMax) {
777  ATH_MSG_DEBUG("Track rejected because of fabs(z0wrtPriVtx/z0ErrwrtPriVtx) " << std::fabs(z0wrtPriVtx/z0ErrwrtPriVtx) << " > " << m_z0significanceMax);
778  return false;
779  }
780  }
781 
782  }
783 
784  if (std::fabs(track->momentum().eta())>m_etaMax) {
785  ATH_MSG_DEBUG("Track rejected because of fabs(eta) " << std::fabs(track->momentum().eta()) << " > " << m_etaMax);
786  return false;
787  }
788 
789  return true;
790  }
791 
792  // ---------------------------------------------------------------------
794  {
795  if(nullptr == trkQuality) {
796  ATH_MSG_WARNING( "Null FitQuality pointer passed. No track Quality cut possible. Selection failed." );
797  return false;
798  }
799  return decision(trkQuality->chiSquared(),trkQuality->numberDoF());
800  }
801 
803 
804  double proba = 1.;
805 
806  if(ndf>0 && chi2>=0.) {
807  Genfun::CumulativeChiSquare myCumulativeChiSquare(ndf);
808  proba = 1.-myCumulativeChiSquare(chi2);
809  }
810 
811  if(chi2>m_fitChi2) {
812  ATH_MSG_DEBUG("Track rejected because of chi2 "<<chi2<<" > "<<m_fitChi2);
813  return false;
814  }
815 
816  if(proba<m_fitProb) {
817  ATH_MSG_DEBUG("Track rejected because of fit probability "<<proba<<" > "<<m_fitProb);
818  return false;
819  }
820  if(!ndf) {
821  ATH_MSG_DEBUG("Track rejected because of ndof = "<<ndf);
822  return false;
823  }
824  if(chi2/double(ndf)>m_fitChi2OnNdfMax) {
825  ATH_MSG_DEBUG("Track rejected because of chi2/ndof "<<chi2/double(ndf)<<" > "<<m_fitChi2OnNdfMax);
826  return false;
827  }
828 
829  return true;
830  }
831 
832 
833  // ---------------------------------------------------------------------
835  const xAOD::TrackParticle* tp,
836  bool useSharedHitInfo,
837  bool useTrtHitInfo,
838  const Trk::Perigee * track,
839  const int nHitTrt,
840  const int nHitTrtPlusOutliers) const
841  {
842  if (summary==nullptr) {
843  ATH_MSG_WARNING( "Null TrackSummary pointer passed. Selection failed." );
844  return false;
845  }
846 
848 
849  if(nb<0) nb=0;
850 
851  int np = summary->get(Trk::numberOfPixelHits);
852  if(np<0) np=0;
853 
854  int npd = summary->get(Trk::numberOfPixelDeadSensors);
855  if(npd<0) npd=0;
856 
857  int ns = summary->get(Trk::numberOfSCTHits);
858  if(ns<0) ns=0;
859 
860  int nhp = summary->get(Trk::numberOfPixelHoles);
861  if (nhp < 0) nhp = 0;
862 
863  int nhs = summary->get(Trk::numberOfSCTHoles);
864  if (nhs < 0) nhs = 0;
865 
866  int ndhs = summary->get(Trk::numberOfSCTDoubleHoles);
867  if (ndhs < 0) ndhs = 0;
868 
869  //**-----------------------------------------------------------------------
870 
872  if (!track) {
873  return false;
874  }
875  const AmgVector(5)& perigeeParms = track->parameters();
876  double p = std::fabs(1./perigeeParms[Trk::qOverP]);
877  double pt = p*std::sin(perigeeParms[Trk::theta]);
878 
879  unsigned int it = 0;
880  for(; it< m_ptBenchmarks.size()-1; ++it ) {
881  if(pt>m_ptBenchmarks[it] && pt <=m_ptBenchmarks[it+1] && ns < m_nSCTValues[it]) {
882  ATH_MSG_DEBUG("Track rejected because of Pt-Dependent SCT Hit cut (CAREFUL! Excludes dead modules)") ;
883  return false;
884  }
885  }//end of pt intervals loop
886 
887  //now cutting all the rest by the last value in the vector
888  if(pt>m_ptBenchmarks[it+1] && ns < m_nSCTValues[it+1]) {
889  ATH_MSG_DEBUG("Track rejected because of Pt-Dependent SCT Hit cut (CAREFUL! Excludes dead modules)") ;
890  return false;
891  }
892 
893  }
894 
895  //*--------------------------------------------------------------------------------
896 
897  //normal cuts in all their variety
898 
899  if(nb == 0 && nb < m_nHitBLayer) {
900  ATH_MSG_DEBUG("Track rejected because of nHitBLayer "<<nb<<" < "<<m_nHitBLayer);
901  if(m_inDetTestPixelLayerTool.empty()) {
902  ATH_MSG_DEBUG("and no blayer tool configured, so will not try to recover track");
903  return false;
904  } else if (m_inDetTestPixelLayerTool->expectHitInInnermostPixelLayer(track)) {
905  ATH_MSG_DEBUG("and track rejected because at least one hit is expected in the innermost pixel layer") ;
906  return false;
907  }else ATH_MSG_DEBUG("recovered track as no b-layer expected") ;
908  }//end of checking the b-layer
909 
910  if(np+npd < m_nHitPix) {
911  ATH_MSG_DEBUG("Track rejected because of nHitPix "<<np+npd<<" < "<<m_nHitPix);
912  return false;
913  }
914 
915  if(np < m_nHitPixPhysical) {
916  ATH_MSG_DEBUG("Track rejected because of nHitPixPhysical "<<np<<" < "<<m_nHitPixPhysical);
917  return false;
918  }
919 
920  int nsd = summary->get(Trk::numberOfSCTDeadSensors);
921  if(nsd<0)
922  nsd=0;
923 
924  if(ns+nsd < m_nHitSct)
925  {
926  ATH_MSG_DEBUG("Track rejected because of nHitSct "<<ns+nsd<<" < "<<m_nHitSct);
927  return false;
928  }
929 
930  if((np+ns+npd+nsd) < m_nHitSi)
931  {
932  ATH_MSG_DEBUG("Track rejected because of nHitSi "<<np+npd+ns+nsd<<" < "<<m_nHitSi);
933  return false;
934  }
935 
936  if((np+ns) < m_nHitSiPhysical)
937  {
938  ATH_MSG_DEBUG("Track rejected because of nHitSiPhysical "<<np+ns<<" < "<<m_nHitSiPhysical);
939  return false;
940  }
941 
942  // Cuts on number of Holes
943 
944  if ((nhp+nhs) > m_nHoles)
945  {
946  ATH_MSG_DEBUG("Track rejected because of nHolesPixPlusSCT "<<nhp+nhs<<" > "<<m_nHoles);
947  return false;
948  }
949 
950  if (ndhs > m_nDoubleHoles)
951  {
952  ATH_MSG_DEBUG("Track rejected because of nDoubleHolesSCT "<<ndhs<<" > "<<m_nDoubleHoles);
953  return false;
954  }
955 
956  if (nhp > m_nHolesPix)
957  {
958  ATH_MSG_DEBUG("Track rejected because of nHolesPix "<<nhp<<" > "<<m_nHolesPix);
959  return false;
960  }
961 
962  if (nhs > m_nHolesSct)
963  {
964  ATH_MSG_DEBUG("Track rejected because of nHolesSct "<<nhs<<" > "<<m_nHolesSct);
965  return false;
966  }
967 
968  if (useTrtHitInfo) {
969 
970  int nh = summary->get(Trk::numberOfTRTHits);
971  if(nh<0) nh=0;
972  if(nh < nHitTrt) {
973  ATH_MSG_DEBUG("Track rejected because of nHitTrt "<<nh<<" < "<<nHitTrt);
974  return false;
975  }
976 
977  int nhh = summary->get( Trk::numberOfTRTHits ) + summary->get( Trk::numberOfTRTOutliers );
978  if (nhh<0) nhh=0;
979  if (nhh<nHitTrtPlusOutliers) {
980  ATH_MSG_DEBUG("Track rejected because of nHitTrtPlusOutliers "<<nhh<<" < "<<nHitTrtPlusOutliers);
981  return false;
982  }
983 
984  int nhthits=summary->get(Trk::numberOfTRTHighThresholdHits);
985  if (nhthits<0) nhthits=0;
986  if (nhthits<m_nHitTrtHighE) {
987  ATH_MSG_DEBUG("Track rejected because of nHitTrtHighE "<<nhthits<<" < "<<m_nHitTrtHighE);
988  return false;
989  }
990 
992  if (nhthitsWithOutliers<0) nhthitsWithOutliers=0;
993  if (nhthitsWithOutliers<m_nHitTrtPlusOutliersHighE) {
994  ATH_MSG_DEBUG("Track rejected because of nHitTrtPlusOutliersHighE "<<nhthitsWithOutliers<<" < "<<m_nHitTrtPlusOutliersHighE);
995  return false;
996  }
997 
998  if (summary->get( Trk :: numberOfTRTHits )>0) {
1000  if(nhe<0.) nhe=0.;
1001  if(nhe > m_nHitTrtHighEFraction ) {
1002  ATH_MSG_DEBUG("Track rejected because of nHitTrtHighEFraction "<<nhe<<" < "<<m_nHitTrtHighEFraction);
1003  return false;
1004  }
1005  }
1006 
1007  if ( summary->get( Trk :: numberOfTRTHits ) + summary->get( Trk :: numberOfTRTOutliers ) > 0 ) {
1009  (double)(summary->get( Trk::numberOfTRTHits) + summary->get( Trk :: numberOfTRTOutliers ) );
1010  if(nheh<0.) nheh=0.;
1011  if (nheh>1.) nheh=1.;
1013  ATH_MSG_DEBUG("Track rejected because of nHitTrtHighEFractionWithOutliers "<<nheh<<" < "<<m_nHitTrtHighEFractionWithOutliers);
1014  return false;
1015  }
1016  }
1017  }
1018 
1019  if (useSharedHitInfo) {
1020  if(!tp){
1021  ATH_MSG_DEBUG("Track rejected because xAOD::TrackParticle not available");
1022  return false;
1023  }
1024 
1026  if(nbs < 0) nbs = 0;
1027  if (nbs>1) nbs=1;
1028  if(nbs>m_nSharedBLayer) {
1029  ATH_MSG_DEBUG("Track rejected because of nSharedBLayer "<<nbs<<" < "<<m_nSharedBLayer);
1030  return false;
1031  }
1032 
1034  if(nps < 0) nps = 0;
1035  if(nps>m_nSharedPix) {
1036  ATH_MSG_DEBUG("Track rejected because of nSharedPix "<<nps<<" < "<<m_nSharedPix);
1037  return false;
1038  }
1039 
1041  if(nss < 0) nss = 0;
1042  if(nss > m_nSharedSct) {
1043  ATH_MSG_DEBUG("Track rejected because of nSharedSct "<<nss<<" < "<<m_nSharedSct);
1044  return false;
1045  }
1046 
1047  int nst = nps + nss;
1048  if(nst>m_nSharedSi) {
1049  ATH_MSG_DEBUG("Track rejected because of nSharedSi "<<nst<<" < "<<m_nSharedSi);
1050  return false;
1051  }
1052  }
1053 
1054  return true;
1055 
1056  }
1057 
1058  // ---------------------------------------------------------------------
1060  {
1061  const AmgVector(5)& perigeeParms = myPerigee.parameters();
1062 
1063  // only check pt if mag. field is on
1064  const EventContext& ctx = Gaudi::Hive::currentContext();
1066  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
1067  if (fieldCondObj == nullptr) {
1068  ATH_MSG_ERROR("execute: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key());
1069  return false;
1070  }
1071  MagField::AtlasFieldCache fieldCache;
1072  fieldCondObj->getInitializedCache (fieldCache);
1073 
1074  if (fieldCache.solenoidOn()){//B field
1075  if (perigeeParms[Trk::qOverP] == 0.) {
1076  ATH_MSG_DEBUG("Track rejected because of perigee qOverP == 0.");
1077  return false;
1078  }
1079  double p = std::fabs(1./perigeeParms[Trk::qOverP]);
1080  if (p<m_pMin) {
1081  ATH_MSG_DEBUG("Track rejected because of p " << p << " < " << m_pMin);
1082  return false;
1083  }
1084  double pt = p*std::sin(perigeeParms[Trk::theta]);
1085  if (pt<m_pTMin) {
1086  ATH_MSG_DEBUG("Track rejected because of pt " << pt << " < " << m_pTMin);
1087  return false;
1088  }
1089  }
1090 
1091  if (std::fabs(perigeeParms[Trk::d0]) > m_d0MaxPreselection) {
1092  ATH_MSG_DEBUG("Track rejected because of fabs(d0) "<<std::fabs(perigeeParms[Trk::d0])<<" < "<<m_d0MaxPreselection);
1093  return false;
1094  }
1095 
1096  return true;
1097  }
1098 
1099 } //end of namespace definitions
InDet::InDetDetailedTrackSelectorTool::m_trackSumTool
ToolHandle< Trk::ITrackSummaryTool > m_trackSumTool
Definition: InDetDetailedTrackSelectorTool.h:196
covarianceTool.ndf
ndf
Definition: covarianceTool.py:678
Trk::numberOfPixelHits
@ numberOfPixelHits
number of pixel layers on track with absence of hits
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:57
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
RecVertex.h
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
xAOD::numberOfPixelHoles
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
Definition: TrackingPrimitives.h:261
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
ITrackSummaryTool.h
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::numberOfTRTHighThresholdHits
@ numberOfTRTHighThresholdHits
total number of TRT hits which pass the high threshold
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:87
InDet::InDetDetailedTrackSelectorTool::m_nHitTrtHighEFractionWithOutliers
DoubleProperty m_nHitTrtHighEFractionWithOutliers
Definition: InDetDetailedTrackSelectorTool.h:141
InDet::InDetDetailedTrackSelectorTool::m_nDoubleHoles
IntegerProperty m_nDoubleHoles
Definition: InDetDetailedTrackSelectorTool.h:162
Trk::numberOfTRTHighThresholdOutliers
@ numberOfTRTHighThresholdOutliers
number of dead TRT straws crossed
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:93
Trk::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 1st pixel layer
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:53
xAOD::numberOfSCTSharedHits
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:272
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
PerigeeSurface.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
AtlasFieldCacheCondObj
Definition: AtlasFieldCacheCondObj.h:19
InDetDetailedTrackSelectorTool.h
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
InDet::InDetDetailedTrackSelectorTool::preselectionBeforeExtrapolation
bool preselectionBeforeExtrapolation(const Trk::Perigee &myPerigee) const
Definition: InDetDetailedTrackSelectorTool.cxx:1059
Trk::numberOfSCTDeadSensors
@ numberOfSCTDeadSensors
number of TRT hits
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:76
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetDetailedTrackSelectorTool::m_nHitTrt
IntegerProperty m_nHitTrt
Definition: InDetDetailedTrackSelectorTool.h:126
InDet::InDetDetailedTrackSelectorTool::~InDetDetailedTrackSelectorTool
~InDetDetailedTrackSelectorTool()
InDet::InDetDetailedTrackSelectorTool::m_sigIPd0Max
DoubleProperty m_sigIPd0Max
Definition: InDetDetailedTrackSelectorTool.h:106
InDet::InDetDetailedTrackSelectorTool::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: InDetDetailedTrackSelectorTool.h:212
InDet::InDetDetailedTrackSelectorTool::m_pTMin
DoubleProperty m_pTMin
Definition: InDetDetailedTrackSelectorTool.h:101
InDet::InDetDetailedTrackSelectorTool::m_nHolesSct
IntegerProperty m_nHolesSct
Definition: InDetDetailedTrackSelectorTool.h:166
InDet::InDetDetailedTrackSelectorTool::m_nHitSct
IntegerProperty m_nHitSct
Definition: InDetDetailedTrackSelectorTool.h:120
skel.it
it
Definition: skel.GENtoEVGEN.py:396
InDet::InDetDetailedTrackSelectorTool::decision
bool decision(const Trk::Track &track, const Trk::Vertex *vertex) const
Definition: InDetDetailedTrackSelectorTool.cxx:129
InDet::InDetDetailedTrackSelectorTool::m_useEtaDepententMinHitTrt
BooleanProperty m_useEtaDepententMinHitTrt
Definition: InDetDetailedTrackSelectorTool.h:191
test_pyathena.pt
pt
Definition: test_pyathena.py:11
InDet::InDetDetailedTrackSelectorTool::m_nHitPixPhysical
IntegerProperty m_nHitPixPhysical
Definition: InDetDetailedTrackSelectorTool.h:123
InDet::InDetDetailedTrackSelectorTool::getCount
int getCount(const xAOD::TrackParticle &tp, xAOD::SummaryType type) const
Definition: InDetDetailedTrackSelectorTool.h:82
ITrtDriftCircleCutTool.h
ParticleTest.tp
tp
Definition: ParticleTest.py:25
Trk::z0
@ z0
Definition: ParamDefs.h:64
InDet::InDetDetailedTrackSelectorTool::m_inDetTestPixelLayerTool
ToolHandle< InDet::IInDetTestPixelLayerTool > m_inDetTestPixelLayerTool
Definition: InDetDetailedTrackSelectorTool.h:208
IExtrapolator.h
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
InDet::InDetDetailedTrackSelectorTool::m_ptBenchmarks
FloatArrayProperty m_ptBenchmarks
Definition: InDetDetailedTrackSelectorTool.h:221
xAOD::expectInnermostPixelLayerHit
@ expectInnermostPixelLayerHit
Do we expect a 0th-layer barrel hit for this track?
Definition: TrackingPrimitives.h:236
xAOD::numberOfTRTHits
@ numberOfTRTHits
number of TRT hits [unit8_t].
Definition: TrackingPrimitives.h:275
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
InDet::BeamSpotData::beamVtx
const Trk::RecVertex & beamVtx() const noexcept
Definition: BeamSpotData.h:79
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InDet::InDetDetailedTrackSelectorTool::m_trackSumToolAvailable
bool m_trackSumToolAvailable
Definition: InDetDetailedTrackSelectorTool.h:215
PlotPulseshapeFromCool.np
np
Definition: PlotPulseshapeFromCool.py:64
InDet::InDetDetailedTrackSelectorTool::m_pMin
DoubleProperty m_pMin
Definition: InDetDetailedTrackSelectorTool.h:102
InDet::InDetDetailedTrackSelectorTool::m_partCreatorToolAvailable
bool m_partCreatorToolAvailable
Definition: InDetDetailedTrackSelectorTool.h:216
Trk::numberOfSCTHoles
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:73
InDet::InDetDetailedTrackSelectorTool::initialize
StatusCode initialize()
Definition: InDetDetailedTrackSelectorTool.cxx:68
InDet::InDetDetailedTrackSelectorTool::m_nHitBLayer
IntegerProperty m_nHitBLayer
Definition: InDetDetailedTrackSelectorTool.h:118
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
InDet::InDetDetailedTrackSelectorTool::InDetDetailedTrackSelectorTool
InDetDetailedTrackSelectorTool(const std::string &t, const std::string &n, const IInterface *p)
Definition: InDetDetailedTrackSelectorTool.cxx:32
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
xAOD::numberOfTRTHighThresholdHits
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
Definition: TrackingPrimitives.h:278
InDet::InDetDetailedTrackSelectorTool::m_usePtDependentCuts
BooleanProperty m_usePtDependentCuts
Definition: InDetDetailedTrackSelectorTool.h:219
Track.h
InDet::InDetDetailedTrackSelectorTool::m_z0significanceMax
DoubleProperty m_z0significanceMax
Definition: InDetDetailedTrackSelectorTool.h:112
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
InDet::InDetDetailedTrackSelectorTool::getBeamSpot
Trk::Vertex * getBeamSpot(const EventContext &) const
Definition: InDetDetailedTrackSelectorTool.cxx:38
GeoPrimitives.h
xAOD::numberOfTRTHighThresholdOutliers
@ numberOfTRTHighThresholdOutliers
number of TRT high threshold outliers (only xenon counted) [unit8_t].
Definition: TrackingPrimitives.h:281
xAOD::numberOfPixelSharedHits
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:262
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
InDet::InDetDetailedTrackSelectorTool::m_particleCreator
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreator
Definition: InDetDetailedTrackSelectorTool.h:198
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
InDet::InDetDetailedTrackSelectorTool::getPosOrBeamSpot
Amg::Vector3D getPosOrBeamSpot(const xAOD::Vertex *) const
Definition: InDetDetailedTrackSelectorTool.cxx:395
InDet::InDetDetailedTrackSelectorTool::m_IPz0Max
DoubleProperty m_IPz0Max
Definition: InDetDetailedTrackSelectorTool.h:104
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::numberOfTRTOutliers
@ numberOfTRTOutliers
number of TRT holes
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:81
beamspotman.n
n
Definition: beamspotman.py:731
Trk::theta
@ theta
Definition: ParamDefs.h:66
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::numberOfSCTHits
@ numberOfSCTHits
number of SCT holes
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:71
InDet::InDetDetailedTrackSelectorTool::m_z0Max
DoubleProperty m_z0Max
Definition: InDetDetailedTrackSelectorTool.h:105
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
Trk::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of pixel hits with broad errors (width/sqrt(12))
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:65
InDet::InDetDetailedTrackSelectorTool::m_useEtaDepententMinHitTrtWithOutliers
BooleanProperty m_useEtaDepententMinHitTrtWithOutliers
Definition: InDetDetailedTrackSelectorTool.h:193
Trk::pion
@ pion
Definition: ParticleHypothesis.h:29
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDet::InDetDetailedTrackSelectorTool::m_fitProb
DoubleProperty m_fitProb
Definition: InDetDetailedTrackSelectorTool.h:171
InDet::InDetDetailedTrackSelectorTool::m_nHitTrtPlusOutliers
IntegerProperty m_nHitTrtPlusOutliers
Definition: InDetDetailedTrackSelectorTool.h:128
InDet::InDetDetailedTrackSelectorTool::m_nHolesPix
IntegerProperty m_nHolesPix
Definition: InDetDetailedTrackSelectorTool.h:164
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
TrackSummary.h
InDet::InDetDetailedTrackSelectorTool::m_IPd0Max
DoubleProperty m_IPd0Max
Definition: InDetDetailedTrackSelectorTool.h:103
Trk::ParametersBase
Definition: ParametersBase.h:55
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
Trk::Vertex::position
const Amg::Vector3D & position() const
return position of vertex
Definition: Vertex.cxx:72
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
InDet::InDetDetailedTrackSelectorTool::m_nSharedSi
IntegerProperty m_nSharedSi
Definition: InDetDetailedTrackSelectorTool.h:157
xAOD::numberOfSCTHoles
@ numberOfSCTHoles
number of SCT holes [unit8_t].
Definition: TrackingPrimitives.h:270
InDet::InDetDetailedTrackSelectorTool::m_useSharedHitInfo
BooleanProperty m_useSharedHitInfo
Definition: InDetDetailedTrackSelectorTool.h:149
Vertex.h
InDet::InDetDetailedTrackSelectorTool::m_TrtMaxEtaAcceptance
DoubleProperty m_TrtMaxEtaAcceptance
Definition: InDetDetailedTrackSelectorTool.h:145
InDet::InDetDetailedTrackSelectorTool::m_nHitTrtHighE
IntegerProperty m_nHitTrtHighE
Definition: InDetDetailedTrackSelectorTool.h:133
MagField::AtlasFieldCache::solenoidOn
bool solenoidOn() const
status of the magnets
InDet::InDetDetailedTrackSelectorTool::m_d0MaxPreselection
DoubleProperty m_d0MaxPreselection
Definition: InDetDetailedTrackSelectorTool.h:188
InDet::InDetDetailedTrackSelectorTool::m_nSCTValues
IntegerArrayProperty m_nSCTValues
Definition: InDetDetailedTrackSelectorTool.h:223
Trk::numberOfPixelHoles
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:59
InDet::InDetDetailedTrackSelectorTool::m_eventInfo_key
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo_key
Definition: InDetDetailedTrackSelectorTool.h:226
EventPrimitives.h
Trk::numberOfTRTHits
@ numberOfTRTHits
number of TRT outliers
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:79
InDet::InDetDetailedTrackSelectorTool::m_addToMinHitTrt
IntegerProperty m_addToMinHitTrt
Definition: InDetDetailedTrackSelectorTool.h:178
InDet::InDetDetailedTrackSelectorTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: InDetDetailedTrackSelectorTool.h:202
InDet::InDetDetailedTrackSelectorTool::m_scaleMinHitTrt
DoubleProperty m_scaleMinHitTrt
Definition: InDetDetailedTrackSelectorTool.h:175
InDet::InDetDetailedTrackSelectorTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: InDetDetailedTrackSelectorTool.h:200
InDet::InDetDetailedTrackSelectorTool::m_useTrackSummaryInfo
BooleanProperty m_useTrackSummaryInfo
Definition: InDetDetailedTrackSelectorTool.h:116
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
Trk::d0
@ d0
Definition: ParamDefs.h:63
InDet::InDetDetailedTrackSelectorTool::m_nHitTrtPlusOutliersHighE
IntegerProperty m_nHitTrtPlusOutliersHighE
Definition: InDetDetailedTrackSelectorTool.h:135
InDet::InDetDetailedTrackSelectorTool::m_sigIPz0Max
DoubleProperty m_sigIPz0Max
Definition: InDetDetailedTrackSelectorTool.h:108
Vertex.h
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::InDetDetailedTrackSelectorTool::m_usePreselectionCuts
BooleanProperty m_usePreselectionCuts
Definition: InDetDetailedTrackSelectorTool.h:187
xAOD::numberOfTRTOutliers
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
Definition: TrackingPrimitives.h:276
TrackParticle.h
InDet::InDetDetailedTrackSelectorTool::m_nHitSi
IntegerProperty m_nHitSi
Definition: InDetDetailedTrackSelectorTool.h:121
InDet::InDetDetailedTrackSelectorTool::m_nSharedBLayer
IntegerProperty m_nSharedBLayer
Definition: InDetDetailedTrackSelectorTool.h:151
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
InDet::BeamSpotData
Definition: BeamSpotData.h:21
InDet::InDetDetailedTrackSelectorTool::m_useTrackQualityInfo
BooleanProperty m_useTrackQualityInfo
Definition: InDetDetailedTrackSelectorTool.h:169
InDet::InDetDetailedTrackSelectorTool::finalize
StatusCode finalize()
Definition: InDetDetailedTrackSelectorTool.cxx:121
InDet::InDetDetailedTrackSelectorTool::m_nSharedPix
IntegerProperty m_nSharedPix
Definition: InDetDetailedTrackSelectorTool.h:153
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::numberOfSCTDeadSensors
@ numberOfSCTDeadSensors
number of dead SCT sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:273
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
InDet::InDetDetailedTrackSelectorTool::m_nHoles
IntegerProperty m_nHoles
Definition: InDetDetailedTrackSelectorTool.h:160
InDet::InDetDetailedTrackSelectorTool::m_scaleMinHitTrtWithOutliers
DoubleProperty m_scaleMinHitTrtWithOutliers
Definition: InDetDetailedTrackSelectorTool.h:181
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
InDet::InDetDetailedTrackSelectorTool::m_trtDCTool
ToolHandle< ITrtDriftCircleCutTool > m_trtDCTool
Definition: InDetDetailedTrackSelectorTool.h:204
xAOD::numberOfInnermostPixelLayerSharedHits
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
Definition: TrackingPrimitives.h:239
InDet::InDetDetailedTrackSelectorTool::m_fitChi2OnNdfMax
DoubleProperty m_fitChi2OnNdfMax
Definition: InDetDetailedTrackSelectorTool.h:172
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
TauGNNUtils::Variables::Track::trackPhi
bool trackPhi(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:482
Trk::phi
@ phi
Definition: ParamDefs.h:75
Trk::FitQuality::numberDoF
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition: FitQuality.h:60
InDet::InDetDetailedTrackSelectorTool::m_etaMax
DoubleProperty m_etaMax
Definition: InDetDetailedTrackSelectorTool.h:113
xAOD::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:266
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
xAOD::numberOfSCTDoubleHoles
@ numberOfSCTDoubleHoles
number of Holes in both sides of a SCT module [unit8_t].
Definition: TrackingPrimitives.h:271
AthAlgTool
Definition: AthAlgTool.h:26
InDet::InDetDetailedTrackSelectorTool::m_fitChi2
DoubleProperty m_fitChi2
Definition: InDetDetailedTrackSelectorTool.h:170
makeComparison.deltaZ
int deltaZ
Definition: makeComparison.py:46
FitQuality.h
hotSpotInTAG.nb
nb
Definition: hotSpotInTAG.py:164
Trk::numberOfSCTDoubleHoles
@ numberOfSCTDoubleHoles
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:75
InDet::InDetDetailedTrackSelectorTool::m_nHitSiPhysical
IntegerProperty m_nHitSiPhysical
Definition: InDetDetailedTrackSelectorTool.h:125
InDet::InDetDetailedTrackSelectorTool::m_nSharedSct
IntegerProperty m_nSharedSct
Definition: InDetDetailedTrackSelectorTool.h:155
InDet::InDetDetailedTrackSelectorTool::m_nHitPix
IntegerProperty m_nHitPix
Definition: InDetDetailedTrackSelectorTool.h:119
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:237
InDet::InDetDetailedTrackSelectorTool::m_addToMinHitTrtWithOutliers
IntegerProperty m_addToMinHitTrtWithOutliers
Definition: InDetDetailedTrackSelectorTool.h:184
InDet::InDetDetailedTrackSelectorTool::m_useEventInfoBs
BooleanProperty m_useEventInfoBs
Definition: InDetDetailedTrackSelectorTool.h:228
InDet::InDetDetailedTrackSelectorTool::m_nHitTrtHighEFraction
DoubleProperty m_nHitTrtHighEFraction
Definition: InDetDetailedTrackSelectorTool.h:139
InDet::InDetDetailedTrackSelectorTool::m_d0significanceMax
DoubleProperty m_d0significanceMax
Definition: InDetDetailedTrackSelectorTool.h:110
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65