ATLAS Offline Software
InDetTrackSelectionTool.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 
7 #include "AsgMessaging/Check.h"
9 #include "InDetAccessor.h"
10 
11 #ifndef XAOD_ANALYSIS
13 #include "TrkTrack/Track.h"
14 #include "VxVertex/Vertex.h"
17 #endif
18 
19 #include <memory>
20 #include <array>
21 
22 using namespace InDetAccessor;
23 
24 namespace {
25  template <unsigned int n_summary_types>
26  std::array<xAOD::SummaryType, n_summary_types> summaryArray( std::array<xAOD::SummaryType, n_summary_types> summary_types) {return summary_types; }
27 
28  template <class Trk_Helper, unsigned int n_summary_types>
29  class MinTRTHitsCut {
30  public:
31  MinTRTHitsCut( double maxTrtEtaAcceptance,
32  double maxEtaForTrtHitCuts,
33  int min_n_hits,
34  std::array<xAOD::SummaryType, n_summary_types> summary_types)
35  : m_maxTrtEtaAcceptance(maxTrtEtaAcceptance),
36  m_maxEtaForTrtHitCuts(maxEtaForTrtHitCuts),
37  m_minNHits(min_n_hits),
38  m_summaryTypes(summary_types)
39  {}
40 
41  uint8_t nHits(Trk_Helper helper, const asg::AsgMessaging &msgHelper) const {
42  return getSummarySum(helper,msgHelper,m_summaryTypes);
43  }
44  bool operator()(Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
45  double absEta = std::abs( helper.eta( msgHelper) );
46  return (absEta <= m_maxTrtEtaAcceptance || absEta > m_maxEtaForTrtHitCuts) || nHits(helper,msgHelper) >=m_minNHits;
47  }
48  private:
49  double m_maxTrtEtaAcceptance;
50  double m_maxEtaForTrtHitCuts;
51  int m_minNHits;
52  std::array<xAOD::SummaryType, n_summary_types> m_summaryTypes;
53  };
54 
55  // return the first bin whose value is lower or equal than the given value
56  // the bins have to be in ascending order;
57  template <typename T>
58  unsigned int findBin(const std::vector<T> &bins, T value) {
59  if (bins.empty() || bins[0]>value) return bins.size();
60  unsigned int bin_i=bins.size();
61  while ( value < bins[--bin_i]) {};
62  return bin_i;
63  }
64  // return true if the given bins are in ascending order
65  template <typename T>
66  bool checkOrder(const std::vector<T> &bins) {
67  if (bins.empty()) return true;
68  for (unsigned int bin_i=1; bin_i<bins.size(); ++bin_i) {
69  if (bins[bin_i-1]>=bins[bin_i]) return false;
70  }
71  return true;
72  }
73 }
74 
75 InDet::InDetTrackSelectionTool::InDetTrackSelectionTool(const std::string& name, const std::string& cutLevel)
76  : asg::AsgTool(name)
77  , m_acceptInfo( "InDetTrackSelection" )
78  , m_cutLevel(cutLevel)
79 #ifndef XAOD_ANALYSIS
80  , m_trackSumTool("Trk::TrackSummaryTool/TrackSummaryTool", this)
81  , m_extrapolator("Trk::Extrapolator/Extrapolator", this)
82 #endif // XAOD_ANALYSIS
83 {
84 
85  // set the cut selection: default is "no cut"
86  setCutLevelPrivate(InDet::CutLevel::NoCut);
87 
88 #ifndef XAOD_STANDALONE
89  declareInterface<IInDetTrackSelectionTool>(this);
90 #endif
91 
92  declareProperty("CutLevel", m_cutLevel);
93 
94  declareProperty("minPt", m_minPt, "Minimum transverse momentum");
95  declareProperty("minP", m_minP, "Minimum momentum");
96  declareProperty("maxAbsEta", m_maxAbsEta, "Maximum magnitude of pseudorapidity");
97  declareProperty("maxD0", m_maxD0, "Maximum transverse separation");
98  declareProperty("maxZ0", m_maxZ0, "Maximum longitudinal separation");
99  declareProperty("maxZ0SinTheta", m_maxZ0SinTheta, "Maximum |z0|*sin(theta)");
100  declareProperty("maxSigmaD0", m_maxSigmaD0, "Maximum error on d0");
101  declareProperty("maxSigmaZ0", m_maxSigmaZ0, "Maximum error on z0");
102  declareProperty("maxSigmaZ0SinTheta", m_maxSigmaZ0SinTheta, "Maximum error on z0*sin(theta)");
103  declareProperty("maxD0overSigmaD0", m_maxD0overSigmaD0, "Significance cut on |d0|");
104  declareProperty("maxZ0overSigmaZ0", m_maxZ0overSigmaZ0, "Significance cut on |z0|");
105  declareProperty("maxZ0SinThetaoverSigmaZ0SinTheta",
106  m_maxZ0SinThetaoverSigmaZ0SinTheta,
107  "Significance cut on |z0*sin(theta)|");
108  declareProperty("minNInnermostLayerHits", m_minNInnermostLayerHits,
109  "Required hits on the innermost pixel layer");
110  declareProperty("minNNextToInnermostLayerHits", m_minNNextToInnermostLayerHits,
111  "Required hits on the next to innermost pixel layer");
112  declareProperty("minNBothInnermostLayersHits", m_minNBothInnermostLayersHits,
113  "Required hits on two innermost pixel layers");
114  declareProperty("maxNInnermostLayerSharedHits", m_maxNInnermostLayerSharedHits,
115  "Maximum shared hits in innermost pixel layer");
116  declareProperty("useMinBiasInnermostLayersCut", m_useMinBiasInnermostLayersCut,
117  "IBL hit if expected, otherwise next layer hit if expected");
118  declareProperty("minNSiHits", m_minNSiHits, "Minimum silicon (pixel + SCT) hits");
119  declareProperty("maxNSiSharedHits", m_maxNSiSharedHits,
120  "Maximum silicon (pixel + SCT) sensors shared with other track");
121  declareProperty("minNSiHitsIfSiSharedHits", m_minNSiHitsIfSiSharedHits,
122  "Minimum number of silicon hits if there are any shared silicon hits");
123  declareProperty("maxNSiHoles", m_maxNSiHoles, "Maximum silicon (pixel + SCT) holes");
124  declareProperty("minNPixelHits", m_minNPixelHits, "Required pixel hits");
125  declareProperty("maxNPixelSharedHits", m_maxNPixelSharedHits,
126  "Maximum pixels shared with other tracks");
127  declareProperty("maxNPixelHoles", m_maxNPixelHoles,
128  "Maximum number of missed layers in pixel");
129  declareProperty("minEtaForStrictNSiHitsCut", m_minEtaForStrictNSiHitsCut,
130  "Eta cutoff for strict silicon hits cut");
131  declareProperty("minNSiHitsAboveEtaCutoff", m_minNSiHitsAboveEtaCutoff,
132  "Minimum silicon hits at large pseudorapidity");
133  declareProperty("maxOneSharedModule", m_maxOneSharedModule,
134  "Allow only 1 shared pixel hit or 2 shared SCT hits, not both");
135  declareProperty("useEtaDependentMaxChiSq", m_useEtaDependentMaxChiSq,
136  "Whether or not to use the eta-dependent chi squared per degree of freedom cut");
137  declareProperty("minNSiHitsPhysical", m_minNSiHitsPhysical,
138  "Minimum physical silicon hits (i.e. dead sensors do not count)");
139  declareProperty("minNPixelHitsPhysical", m_minNPixelHitsPhysical,
140  "Minimum physical pixel hits");
141  declareProperty("minNSctHitsPhysical", m_minNSctHitsPhysical,
142  "Minimum physical SCT hits");
143  declareProperty("minNSctHits", m_minNSctHits, "Minimum SCT hits");
144  declareProperty("maxNSctSharedHits", m_maxNSctSharedHits, "Maximum SCT hits shared with other track");
145  declareProperty("maxNSctHoles", m_maxNSctHoles, "Maximum SCT holes");
146  declareProperty("maxNSctDoubleHoles", m_maxNSctDoubleHoles, "Maximum SCT double holes");
147  declareProperty("maxTrtEtaAcceptance", m_maxTrtEtaAcceptance,
148  "Maximum eta that ignores TRT hit cuts");
149  declareProperty("maxEtaForTrtHitCuts", m_maxEtaForTrtHitCuts, "Eta above which TRT hit cuts are not applied.");
150  declareProperty("minNTrtHits", m_minNTrtHits, "Minimum TRT hits");
151  declareProperty("minNTrtHitsPlusOutliers", m_minNTrtHitsPlusOutliers,
152  "Minimum TRT hits including outliers");
153  declareProperty("minNTrtHighThresholdHits", m_minNTrtHighThresholdHits,
154  "Minimum high E TRT hits");
155  declareProperty("minNTrtHighThresholdHitsPlusOutliers",
156  m_minNTrtHighThresholdHitsPlusOutliers,
157  "Minimum high E TRT hits including outliers");
158  declareProperty("maxTrtHighEFraction", m_maxTrtHighEFraction,
159  "Maximum TRT hits that are above high energy threshold");
160  declareProperty("maxTrtHighEFractionWithOutliers", m_maxTrtHighEFractionWithOutliers,
161  "Maximum TRT hits that are above high energy threshold including outliers");
162  declareProperty("maxTrtOutlierFraction", m_maxTrtOutlierFraction,
163  "Maximum fraction of TRT outliers over TRT hits plus outliers");
164  declareProperty("maxChiSq", m_maxChiSq, "Maximum chi squared");
165  declareProperty("minProb", m_minProb, "Minimum p(chi^2, Ndof)");
166  declareProperty("maxChiSqperNdf", m_maxChiSqperNdf,
167  "Maximum chi squared per degree of freedom");
168  declareProperty("minPtForProbCut", m_minPtForProbCut,
169  "Minimum pt for chi-sq probability cut");
170  declareProperty("minProbAbovePtCutoff", m_minProbAbovePtCutoff,
171  "Minimum chi-sq probability above a pt cutoff");
172  declareProperty("minNUsedHitsdEdx", m_minNUsedHitsdEdx,
173  "Minimum hits used for dEdx");
174  declareProperty("minNOverflowHitsdEdx", m_minNOverflowHitsdEdx,
175  "Minimum overflow hits in IBL for dEdx");
176  declareProperty("minEProbabilityHT", m_minEProbabilityHT,
177  "Minimum High Threshold electron probability");
178  declareProperty("eProbHTonlyForXe", m_eProbHTonlyForXe,
179  "Flag whether to apply the eProbabilityHT cut only when all TRT hits are Xenon");
180 
181  declareProperty("vecEtaCutoffsForSiHitsCut", m_vecEtaCutoffsForSiHitsCut,
182  "Minimum eta cutoffs for each Silicon hit cut");
183  declareProperty("vecMinNSiHitsAboveEta", m_vecMinNSiHitsAboveEta, "Minimum Silicon hits above each eta cutoff");
184  declareProperty("vecEtaCutoffsForPtCut", m_vecEtaCutoffsForPtCut,
185  "Minimum eta cutoffs for each pT cut");
186  declareProperty("vecMinPtAboveEta", m_vecMinPtAboveEta, "Minimum transverse momentum above each eta cutoff");
187 
188  declareProperty("vecPtCutoffsForSctHitsCut", m_vecPtCutoffsForSctHitsCut,
189  "Minimum pt cutoffs for each SCT hits");
190  declareProperty("vecMinNSctHitsAbovePt", m_vecMinNSctHitsAbovePt, "Minimum SCT hits above each pt cutoff");
191 
192  declareProperty("vecEtaCutoffsForZ0SinThetaCut", m_vecEtaCutoffsForZ0SinThetaCut,
193  "Minimum eta cutoffs for each Z0SinTheta value");
194  declareProperty("vecPtCutoffsForZ0SinThetaCut", m_vecPtCutoffsForZ0SinThetaCut,
195  "Minimum pt cutoffs for each Z0SinTheta value");
196  declareProperty("vecvecMaxZ0SinThetaAboveEtaPt", m_vecvecMaxZ0SinThetaAboveEtaPt, "Maximum Z0SinTheta value above each eta and pT cutoff");
197 
198  declareProperty("vecEtaCutoffsForD0Cut", m_vecEtaCutoffsForD0Cut,
199  "Minimum eta cutoffs for each D0 value");
200  declareProperty("vecPtCutoffsForD0Cut", m_vecPtCutoffsForD0Cut,
201  "Minimum pt cutoffs for each D0 value");
202  declareProperty("vecvecMaxD0AboveEtaPt", m_vecvecMaxD0AboveEtaPt, "Maximum D0 value above each eta and pT cutoff");
203 
204  declareProperty("vecEtaCutoffsForSctHolesCut", m_vecEtaCutoffsForSctHolesCut,
205  "Minimum eta cutoffs for each SctHoles value");
206  declareProperty("vecPtCutoffsForSctHolesCut", m_vecPtCutoffsForSctHolesCut,
207  "Minimum pt cutoffs for each SctHoles value");
208  declareProperty("vecvecMaxSctHolesAboveEtaPt", m_vecvecMaxSctHolesAboveEtaPt, "Maximum SctHoles value above each eta and pT cutoff");
209 
210  declareProperty("vecEtaCutoffsForSctHitsPlusDeadCut", m_vecEtaCutoffsForSctHitsPlusDeadCut,
211  "Minimum eta cutoffs for each SctHitsPlusDead value");
212  declareProperty("vecPtCutoffsForSctHitsPlusDeadCut", m_vecPtCutoffsForSctHitsPlusDeadCut,
213  "Minimum pt cutoffs for each SctHitsPlusDead value");
214  declareProperty("vecvecMinSctHitsPlusDeadAboveEtaPt", m_vecvecMinSctHitsPlusDeadAboveEtaPt, "Minimum SctHitsPlusDead value above each eta and pT cutoff");
215 
216  declareProperty("useExperimentalInnermostLayersCut", m_useExperimentalInnermostLayersCut, "Use the experimental cut on pixel holes");
217 #ifndef XAOD_ANALYSIS
218  declareProperty("minNSiHitsMod", m_minNSiHitsMod);
219  declareProperty("minNSiHitsModTop", m_minNSiHitsModTop);
220  declareProperty("minNSiHitsModBottom", m_minNSiHitsModBottom);
221 
222  declareProperty("UseTrkTrackTools", m_initTrkTools);
223  declareProperty("TrackSummaryTool", m_trackSumTool);
224  declareProperty("Extrapolator", m_extrapolator);
225 #endif
226 
227 }
228 
229 // we must define the destructor in order to use forward-declaration with unique_ptr
230 InDet::InDetTrackSelectionTool::~InDetTrackSelectionTool() = default;
231 
242  // Make sure we haven't already been initialized - this would be a sign of improper usage.
243  if (m_isInitialized) {
244  ATH_MSG_ERROR( "Tool has already been initialized. This is illegitimate." );
245  ATH_MSG_ERROR( "This call to initialize() will do nothing." );
246  return StatusCode::SUCCESS;
247  }
248 
249  // Greet the user:
251 
252  // if the CutLevel string is set to something recognizable,
253  // then do a soft set on the cuts (i.e. not overwriting those already set)
254  if (!m_cutLevel.empty()) {
255  std::unordered_map<std::string, InDet::CutLevel>::const_iterator it_mapCutLevel = s_mapCutLevel.find(m_cutLevel);
256  if ( it_mapCutLevel == s_mapCutLevel.end() ) {
257  ATH_MSG_ERROR( "The string \"" << m_cutLevel << "\" is not recognized as a cut level. No cuts will be changed." );
258  ATH_MSG_ERROR( "Cut level options are:" );
259  for (const auto& opt : s_mapCutLevel) {
260  ATH_MSG_ERROR( "\t" << opt.first );
261  }
262  } else {
263  ATH_MSG_DEBUG( "Cut level set to \"" << it_mapCutLevel->first << "\"." );
264  ATH_MSG_DEBUG( "This will not overwrite other cuts that have been set.");
265  setCutLevelPrivate( it_mapCutLevel->second, false );
266  }
267  }
268 
269 #ifndef XAOD_ANALYSIS
270  if (m_initTrkTools) {
271  m_trackSumToolAvailable = false;
272  if (!m_trackSumTool.empty()) {
273  ATH_CHECK( m_trackSumTool.retrieve() );
274  ATH_MSG_DEBUG( "Track summary tool retrieved." );
276  }
277  ATH_CHECK( m_extrapolator.retrieve() );
278  ATH_MSG_DEBUG( "Retrieved tool " << m_extrapolator );
279  } else {
280  m_extrapolator.disable();
281  m_trackSumTool.disable();
282  }
283 #endif // XAOD_ANALYSIS
284 
285  // Need messaging helper for cut functions
286  m_msgHelper = std::make_unique<asg::AsgMessaging>(this) ;
287 
288 
289 #ifndef XAOD_ANALYSIS
290  // setup cut functions for Trk::Tracks
291  ATH_CHECK( setupCuts<0>(m_trkTrackCuts) );
292  ATH_CHECK( setupCuts<0>(m_trackParticleCuts) );
293 #else
294  ATH_CHECK( setupCuts<1>(m_trackParticleCuts) );
295 #endif
296  // setup cut functions for xAOD::TrackParticles
297  for (const auto& cutFamily : m_trackParticleCuts) {
298  const std::string& cutFamilyName = cutFamily.first;
299  // lock(m_mutex) is not needed because this is inside of non-const initialize method.
300  m_numTracksPassedCuts.push_back(0);
301  if (m_acceptInfo.addCut( cutFamilyName, "Selection of tracks according to " + cutFamilyName ) < 0) {
302  ATH_MSG_ERROR( "Failed to add cut family " << cutFamilyName << " because the TAccept object is full." );
303  return StatusCode::FAILURE;
304  }
305  ATH_MSG_VERBOSE("Adding cut family " << cutFamilyName);
306  }
307 
308  m_isInitialized = true;
309 
310  return StatusCode::SUCCESS;
311 }
312 
313 namespace {
314  template <typename T>
315  inline T sqr(T a) { return a *a;}
316 }
317 template <int VERBOSE, class Trk_Helper>
318 StatusCode InDet::InDetTrackSelectionTool::setupCuts(std::map< std::string, std::vector< std::function<bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > &trackCuts) {
319  // track parameter cuts
320  if (m_minPt > 0.) {
321  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum Pt: " << m_minPt << " MeV" );
322  trackCuts["Pt"].push_back( [minPt = m_minPt](Trk_Helper helper, const asg::AsgMessaging &msgHelper) -> bool { return helper.pt(msgHelper) >= minPt; } );
323  }
325  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum |Eta|: " << m_maxAbsEta );
326  trackCuts["Eta"].push_back( [maxAbsEta = m_maxAbsEta](Trk_Helper helper, const asg::AsgMessaging &msgHelper) { return std::abs(helper.eta(msgHelper)) <= maxAbsEta; } );
327  }
328  if (m_minP > 0.) {
329  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum P: " << m_minP << " MeV" );
330  trackCuts["P"].push_back( [maxInvP = 1./m_minP](Trk_Helper helper, const asg::AsgMessaging &msgHelper) { return std::abs(helper.qOverP(msgHelper)) <= maxInvP; } );
331  }
332  if (maxDoubleIsSet(m_maxD0)) {
333  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum d0: " << m_maxD0 << " mm" );
334  trackCuts["D0"].push_back( [maxD0 = m_maxD0](Trk_Helper helper, const asg::AsgMessaging &msgHelper) { return std::abs(helper.d0(msgHelper)) <= maxD0; } );
335  }
336  if (maxDoubleIsSet(m_maxZ0)) {
337  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum z0: " << m_maxZ0 << " mm");
338  trackCuts["Z0"].push_back( [maxZ0 = m_maxZ0](Trk_Helper helper, const asg::AsgMessaging &msgHelper) { return std::abs(helper.z0(msgHelper)) <= maxZ0; } );
339  }
341  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum z0*sin(theta): " << m_maxZ0SinTheta << " mm" );
342  trackCuts["Z0SinTheta"].push_back([maxZ0SinTheta = m_maxZ0SinTheta](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
343  return std::abs( helper.z0(msgHelper) * std::sin(helper.theta(msgHelper))) <= maxZ0SinTheta;
344  });
345  }
347  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum uncertainty on d0: " << m_maxSigmaD0 << " mm" );
348  trackCuts["D0"].push_back([maxSigmaD0Squared = sqr(m_maxSigmaD0)](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
349  return getDefiningParametersCov(helper,msgHelper, InDetAccessor::d0,InDetAccessor::d0) <= maxSigmaD0Squared;
350  });
351  }
353  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum uncertainty on z0: " << m_maxSigmaZ0 << " mm" );
354  trackCuts["Z0"].push_back([maxSigmaZ0Squared = sqr(m_maxSigmaZ0)](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
355  return getDefiningParametersCov(helper,msgHelper, InDetAccessor::z0,InDetAccessor::z0) <= maxSigmaZ0Squared;
356  });
357  }
359  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum uncertainty on z0*sin(theta): "
360  << m_maxSigmaZ0SinTheta << " mm" );
361  trackCuts["Z0SinTheta"].push_back([maxSigmaZ0SinThetaSquared = sqr(m_maxSigmaZ0SinTheta)](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
362  double theta = helper.theta(msgHelper);
363  double sinTheta = std::sin(theta);
364  double cosTheta = std::cos(theta);
365  double z0 = helper.z0(msgHelper);
366 
368  + 2*z0 *sinTheta*cosTheta * getDefiningParametersCov(helper,msgHelper, InDetAccessor::theta,InDetAccessor::z0)
369  + sqr(sinTheta) * getDefiningParametersCov(helper,msgHelper, InDetAccessor::z0, InDetAccessor::z0) ) <= maxSigmaZ0SinThetaSquared;
370  });
371  }
373  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum significance on d0: " << m_maxD0overSigmaD0 );
374  trackCuts["D0"].push_back([maxD0overSigmaD0Squared = sqr(m_maxD0overSigmaD0)](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
375  return sqr(helper.d0(msgHelper)) <= maxD0overSigmaD0Squared * getDefiningParametersCov(helper,msgHelper, InDetAccessor::d0,InDetAccessor::d0);
376  });
377  }
379  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum significance on z0: " << m_maxZ0overSigmaZ0 );
380  trackCuts["Z0"].push_back([maxZ0overSigmaZ0Squared = sqr(m_maxZ0overSigmaZ0)](Trk_Helper helper, const asg::AsgMessaging &msgHelper) -> bool {
381  return sqr(helper.z0(msgHelper)) <= maxZ0overSigmaZ0Squared * getDefiningParametersCov(helper,msgHelper, InDetAccessor::z0,InDetAccessor::z0);
382  });
383  }
385  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum significance on z0*sin(theta): "
387  trackCuts["Z0SinTheta"].push_back([maxZ0SinThetaoverSigmaZ0SinThetaSquared = sqr(m_maxZ0SinThetaoverSigmaZ0SinTheta)](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
388 
389  double theta = helper.theta(msgHelper);
390  double sinTheta = std::sin(theta);
391  double cosTheta = std::cos(theta);
392  double z0 = helper.z0(msgHelper);
393 
394  return sqr(z0*sinTheta) <=
395  maxZ0SinThetaoverSigmaZ0SinThetaSquared * ( sqr(z0)*sqr(cosTheta) * getDefiningParametersCov(helper,msgHelper, InDetAccessor::theta,InDetAccessor::theta)
396  + 2*z0 *sinTheta*cosTheta * getDefiningParametersCov(helper,msgHelper, InDetAccessor::theta,InDetAccessor::z0)
398  });
399  }
400 
401  // hit cuts
402  if (m_minNInnermostLayerHits > 0) {
403  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum hits from innermost pixel layer: " << m_minNInnermostLayerHits );
404  if constexpr(VERBOSE>0) ATH_MSG_INFO( " (Track will pass if no hit is expected.)" );
405  trackCuts["InnermostLayersHits"].push_back([minNInnermostLayerHits = m_minNInnermostLayerHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
406  return ( getSummary(helper, msgHelper, xAOD::numberOfInnermostPixelLayerHits) >= minNInnermostLayerHits
408  });
409  }
411  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum hits from next to innermost pixel layer: " << m_minNNextToInnermostLayerHits );
412  if constexpr(VERBOSE>0) ATH_MSG_INFO( " (Track will pass if no hit is expected.)" );
413  trackCuts["InnermostLayersHits"].push_back([minNNextToInnermostLayerHits = m_minNNextToInnermostLayerHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
414  return ( getSummary(helper, msgHelper, xAOD::numberOfNextToInnermostPixelLayerHits) >= minNNextToInnermostLayerHits
416  });
417  }
419  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum hits from both innermost pixel layers: " << m_minNBothInnermostLayersHits );
420  if constexpr(VERBOSE>0) ATH_MSG_INFO( " (If a layer has no hits but one is not expected, the" );
421  if constexpr(VERBOSE>0) ATH_MSG_INFO( " number of hits in that layer will be taken to be 1.)" );
423  ATH_MSG_WARNING( "A value of minNBothInnermostLayersHits above 2 does not make sense." );
424  ATH_MSG_WARNING( " Use 1 for \"or\" or 2 for \"and\"." );
425  }
426  trackCuts["InnermostLayersHits"].push_back([minNBothInnermostLayersHits = m_minNBothInnermostLayersHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
428  static_cast<uint8_t>( !getSummary(helper, msgHelper, xAOD::expectInnermostPixelLayerHit) ))
431  >= minNBothInnermostLayersHits);
432  });
433  }
434  if (m_useMinBiasInnermostLayersCut > 0 ) { // less than zero indicates this cut is manually turned off
435  if constexpr(VERBOSE>0) ATH_MSG_INFO( " An innermost layer hit is required if expected, otherwise" );
436  if constexpr(VERBOSE>0) ATH_MSG_INFO( " a next-to-innermost layer hit is required if it is expected." );
437  trackCuts["InnermostLayersHits"].push_back([](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
438  uint8_t expected_innermost_pixel_layer_hit = getSummary(helper, msgHelper, xAOD::expectInnermostPixelLayerHit);
439  return (expected_innermost_pixel_layer_hit > 0 && getSummary(helper, msgHelper, xAOD::numberOfInnermostPixelLayerHits)>=1)
440  || (expected_innermost_pixel_layer_hit == 0 && ( getSummary(helper, msgHelper, xAOD::expectNextToInnermostPixelLayerHit)==0
442  });
443  }
445  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum shared hits in innermost pixel layer: " << m_maxNInnermostLayerSharedHits );
446  trackCuts["InnermostLayersHits"].push_back([maxNInnermostLayerSharedHits = m_maxNInnermostLayerSharedHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
447  return getSummary(helper, msgHelper, xAOD::numberOfInnermostPixelLayerSharedHits) <= maxNInnermostLayerSharedHits;
448  });
449  }
450  if (m_minNPixelHits > 0) {
451  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum pixel hits: " << m_minNPixelHits );
452  trackCuts["PixelHits"].push_back( [minNPixelHits = m_minNPixelHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
453  return getSummarySum<2,Trk_Helper>(helper, msgHelper, {xAOD::numberOfPixelHits,xAOD::numberOfPixelDeadSensors}) >= minNPixelHits;
454  });
455  }
456  if (m_minNPixelHitsPhysical > 0) {
457  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum physical pixel hits (i.e. dead sensors do not count): "
459  trackCuts["PixelHits"].push_back([minNPixelHitsPhysical = m_minNPixelHitsPhysical](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
460  return getSummary(helper, msgHelper, xAOD::numberOfPixelHits) >= minNPixelHitsPhysical;
461  });
462  }
464  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum pixel holes: " << m_maxNPixelHoles );
465  trackCuts["PixelHits"].push_back([maxNPixelHoles = m_maxNPixelHoles](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
466  return getSummary(helper, msgHelper, xAOD::numberOfPixelHoles) <= maxNPixelHoles;
467  });
468  }
470  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum pixel shared hits: " << m_maxNPixelSharedHits );
471  trackCuts["PixelHits"].push_back([maxNPixelSharedHits = m_maxNPixelSharedHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
472  return getSummary(helper, msgHelper, xAOD::numberOfPixelSharedHits) <= maxNPixelSharedHits;
473  });
474  }
475  if (m_minNSctHits > 0) {
476  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum SCT hits: " << m_minNSctHits );
477  trackCuts["SctHits"].push_back( [minNSctHits = m_minNSctHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
478  return getSummarySum<2,Trk_Helper>(helper, msgHelper, {xAOD::numberOfSCTHits, xAOD::numberOfSCTDeadSensors}) >= minNSctHits;
479  });
480  }
481  if (m_minNSctHitsPhysical > 0) {
482  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum physical SCT hits (i.e. dead sensors do not count): "
484  trackCuts["SctHits"].push_back([minNSctHitsPhysical = m_minNSctHitsPhysical](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
485  return getSummary(helper, msgHelper, xAOD::numberOfSCTHits) >= minNSctHitsPhysical;
486  });
487  }
489  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum SCT holes: " << m_maxNSctHoles );
490  trackCuts["SctHits"].push_back([maxNSctHoles = m_maxNSctHoles](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
491  return getSummary(helper, msgHelper, xAOD::numberOfSCTHoles) <= maxNSctHoles;
492  });
493  }
495  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum SCT shared hits: " << m_maxNSctSharedHits );
496  trackCuts["SctHits"].push_back([maxNSctSharedHits = m_maxNSctSharedHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
497  return getSummary(helper, msgHelper, xAOD::numberOfSCTSharedHits) <= maxNSctSharedHits;
498  });
499  }
501  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum SCT double holes: " << m_maxNSctDoubleHoles );
502  trackCuts["SctHits"].push_back([maxNSctDoubleHoles = m_maxNSctDoubleHoles](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
503  return getSummary(helper, msgHelper, xAOD::numberOfSCTDoubleHoles) <= maxNSctDoubleHoles ;
504  });
505  }
506  if (m_minNSiHits > 0) {
507  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum silicon (pixel + SCT) hits: " << m_minNSiHits );
508  trackCuts["SiHits"].push_back([minNSiHits = m_minNSiHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
509  return getSummarySum<4,Trk_Helper>(helper, msgHelper, {xAOD::numberOfPixelHits,
512  xAOD::numberOfSCTDeadSensors} ) >= minNSiHits ;
513  });
514  }
515  if (m_minNSiHitsPhysical > 0) {
516  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum physical silicon hits (i.e. dead sensors do not count): "
518  trackCuts["SiHits"].push_back([minNSiHitsPhysical = m_minNSiHitsPhysical](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
519  return getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHits, xAOD::numberOfSCTHits} ) >= minNSiHitsPhysical ;
520  });
521  }
522  if (maxIntIsSet(m_maxNSiHoles)) {
523  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum silicon holes: " << m_maxNSiHoles );
524  trackCuts["SiHits"].push_back([maxNSiHoles = m_maxNSiHoles](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
525  return getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHoles, xAOD::numberOfSCTHoles} ) <= maxNSiHoles ;
526  });
527  }
529  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum silicon shared hits: " << m_maxNSiSharedHits );
530  trackCuts["SiHits"].push_back([maxNSiSharedHits = m_maxNSiSharedHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
531  return getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelSharedHits, xAOD::numberOfSCTSharedHits} ) <= maxNSiSharedHits ;
532  });
533  }
534  if (m_maxOneSharedModule) {
535  if constexpr(VERBOSE>0) ATH_MSG_INFO( " No more than one shared module:" );
536  if constexpr(VERBOSE>0) ATH_MSG_INFO( " i.e. max 1 shared pixel hit or" );
537  if constexpr(VERBOSE>0) ATH_MSG_INFO( " 2 shared SCT hits, and not both." );
538  trackCuts["SiHits"].push_back([](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
540  + getSummary(helper, msgHelper,xAOD::numberOfSCTSharedHits )/2 <= 1 ;
541  });
542  }
543  if (m_minNSiHitsIfSiSharedHits > 0) {
544  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum silicon hits if the track has shared hits: "
546  trackCuts["SiHits"].push_back([minNSiHitsIfSiSharedHits = m_minNSiHitsIfSiSharedHits](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
547  return getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelSharedHits, xAOD::numberOfSCTSharedHits} ) == 0
548  || getSummarySum<4,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHits,
551  xAOD::numberOfSCTDeadSensors}) >=minNSiHitsIfSiSharedHits;
552  });
553  }
556  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Require " << m_minNSiHitsAboveEtaCutoff
557  << " silicon hits above eta = " << m_minEtaForStrictNSiHitsCut );
558  trackCuts["SiHits"].push_back([minEtaForStrictNSiHitsCut = m_minEtaForStrictNSiHitsCut,
559  minNSiHitsAboveEtaCutoff = m_minNSiHitsAboveEtaCutoff](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
560  return std::abs(helper.eta(msgHelper)) <= minEtaForStrictNSiHitsCut
561  || getSummarySum<4,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHits,
564  xAOD::numberOfSCTDeadSensors}) >= minNSiHitsAboveEtaCutoff;
565  });
566  }
568  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Zero pixel holes allowed, except one pix hole is allowed if there is a physical IBL hit and a BLayer hit is expected but there is no BLayer hit." );
569  trackCuts["PixHits"].push_back([](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
570  uint8_t pixel_holes = getSummary(helper, msgHelper,xAOD::numberOfPixelHoles);
571  return pixel_holes == 0 || ( pixel_holes<=1 && getSummary(helper, msgHelper,xAOD::numberOfInnermostPixelLayerHits) >= 1
574  });
575  }
576 #ifndef XAOD_ANALYSIS
577  if (m_minNSiHitsMod > 0) {
578  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum modified Si hits (2*pix + sct) (does not include dead sensors)= "
579  << m_minNSiHitsMod );
580  trackCuts["SiHits"].push_back([minNSiHitsMod = m_minNSiHitsMod](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
581  return getSummarySum<3,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHits,
582  xAOD::numberOfPixelHits, // pixel hits count twice in this definition
583  xAOD::numberOfSCTHits}) >= minNSiHitsMod;
584  });
585  }
586  if (m_minNSiHitsModTop > 0 || m_minNSiHitsModBottom > 0) {
587  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum modified Si hits in top half = "
588  << m_minNSiHitsModTop );
589  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum modified Si hits in bottom half = "
591  trackCuts["SiHits"].push_back([minNSiHitsModTop = m_minNSiHitsModTop,
592  minNSiHitsModBottom = m_minNSiHitsModBottom](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
593  auto [top,bottom] = getSiHitsTopBottom(helper, msgHelper);
594  return top >= minNSiHitsModTop && bottom >= minNSiHitsModBottom;
595  });
596  }
597 #endif
599  if constexpr(VERBOSE>0) ATH_MSG_INFO( " -- TRT hit cuts applied above eta = " << m_maxTrtEtaAcceptance
600  << " and below eta = " << m_maxEtaForTrtHitCuts << " --" );
601  if (m_minNTrtHits > 0) {
602  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum TRT hits outside eta acceptance: " << m_minNTrtHits );
603  trackCuts["TrtHits"].push_back( MinTRTHitsCut<Trk_Helper,1>( m_maxTrtEtaAcceptance, m_maxEtaForTrtHitCuts, m_minNTrtHits,
605  }
606  if (m_minNTrtHitsPlusOutliers > 0) {
607  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum TRT hits outside eta acceptance including outliers: " << m_minNTrtHitsPlusOutliers );
608  trackCuts["TrtHits"].push_back( MinTRTHitsCut<Trk_Helper,2>( m_maxTrtEtaAcceptance,m_maxEtaForTrtHitCuts, m_minNTrtHitsPlusOutliers,
610  }
611  if (m_minNTrtHighThresholdHits > 0) {
612  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum TRT hits outside eta acceptance above high energy threshold: "
614  trackCuts["TrtHits"].push_back( MinTRTHitsCut<Trk_Helper,1>( m_maxTrtEtaAcceptance,m_maxEtaForTrtHitCuts, m_minNTrtHighThresholdHits,
616  }
618  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum TRT hits outside eta acceptance above high energy threshold including outliers: "
620  trackCuts["TrtHits"].push_back( MinTRTHitsCut<Trk_Helper,2>( m_maxTrtEtaAcceptance,m_maxEtaForTrtHitCuts, m_minNTrtHighThresholdHitsPlusOutliers,
622  }
623  if (maxDoubleIsSet(m_maxTrtHighEFraction)) { // I think this condition could be instead that it is between 0 and 1
624  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum ratio of high threshold to regular TRT hits outside eta acceptance: "
626  trackCuts["TrtHits"].push_back([maxTrtEtaAcceptance = m_maxTrtEtaAcceptance,
627  maxEtaForTrtHitCuts = m_maxEtaForTrtHitCuts,
628  maxTrtHighEFraction = m_maxTrtHighEFraction](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
629  double absEta = std::abs( helper.eta( msgHelper) );
630  return (absEta <= maxTrtEtaAcceptance || absEta > maxEtaForTrtHitCuts)
632  <= maxTrtHighEFraction * getSummary(helper, msgHelper,xAOD::numberOfTRTHits );
633  });
634  }
636  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum ratio of high threshold to regular TRT hits above eta acceptance including outliers: "
638  trackCuts["TrtHits"].push_back([maxTrtEtaAcceptance = m_maxTrtEtaAcceptance,
639  maxEtaForTrtHitCuts = m_maxEtaForTrtHitCuts,
640  maxTrtHighEFractionWithOutliers = m_maxTrtHighEFractionWithOutliers](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
641  double absEta = std::abs( helper.eta( msgHelper) );
642  return (absEta <= maxTrtEtaAcceptance || absEta > maxEtaForTrtHitCuts)
643  || ( getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfTRTHighThresholdHits, xAOD::numberOfTRTHighThresholdOutliers} ))
644  <= maxTrtHighEFractionWithOutliers * ( getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfTRTHits, xAOD::numberOfTRTOutliers} ));
645  });
646  }
647  if (m_maxTrtOutlierFraction < 1. && m_maxTrtOutlierFraction >= 0.) {
648  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum fraction of TRT hits that are outliers: " << m_maxTrtOutlierFraction );
649  trackCuts["TrtHits"].push_back([maxTrtEtaAcceptance = m_maxTrtEtaAcceptance,
650  maxEtaForTrtHitCuts = m_maxEtaForTrtHitCuts,
651  maxTrtOutlierFraction = m_maxTrtOutlierFraction](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
652  double absEta = std::abs( helper.eta( msgHelper) );
653  uint8_t trt_outliers = getSummary(helper, msgHelper,xAOD::numberOfTRTOutliers );
654  return ( absEta <= maxTrtEtaAcceptance || absEta > maxEtaForTrtHitCuts)
655  || trt_outliers <= maxTrtOutlierFraction * ( trt_outliers + getSummary(helper, msgHelper,xAOD::numberOfTRTHits) );
656  });
657  }
658  }
659 
660  // fit quality cuts
662  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Using pre-defined eta-dependent maximum chi squared (no longer recommended)." );
663  trackCuts["FitQuality"].push_back([](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
664  double eta = helper.eta(msgHelper);
665  double fit_chi_square = getFitChiSquare(helper,msgHelper);
666  double fit_ndof = getFitNDoF(helper,msgHelper);
667  if (std::abs( eta) < 1.9) {
668  return fit_chi_square <= fit_ndof * ( 4.4 + 0.32*sqr(eta) );
669  }
670  else {
671  return fit_chi_square <= fit_ndof * ( 26.9 - 19.6978*std::abs(eta) + 4.4534*sqr(eta) );
672  }
673  });
674  }
675  if (maxDoubleIsSet(m_maxChiSq)) {
676  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum chi squared: " << m_maxChiSq );
677  trackCuts["FitQuality"].push_back([maxChiSq = m_maxChiSq](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
678  return getFitChiSquare(helper,msgHelper) <= maxChiSq;
679  });
680  }
682  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Maximum chi squared per degree of freedom: " << m_maxChiSqperNdf );
683  trackCuts["FitQuality"].push_back([maxChiSqperNdf = m_maxChiSqperNdf](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
684  return getFitChiSquare(helper,msgHelper) <= maxChiSqperNdf * getFitNDoF(helper,msgHelper);
685  });
686  }
687  if (m_minProb > 0.) {
688  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum chi squared probability: " << m_minProb );
689  trackCuts["FitQuality"].push_back([minProb = m_minProb](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
690  return TMath::Prob( getFitChiSquare(helper,msgHelper),getFitNDoF(helper,msgHelper)) >= minProb;
691  });
692  }
694  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum chi-sq probability of " << m_minProbAbovePtCutoff
695  << " above pt of " << m_minPtForProbCut*1e-3 << " GeV." );
696  trackCuts["FitQuality"].push_back([minPtForProbCut = m_minPtForProbCut,
697  minProbAbovePtCutoff = m_minProbAbovePtCutoff](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
698  return helper.pt(msgHelper) <= minPtForProbCut
699  || TMath::Prob( getFitChiSquare(helper,msgHelper),getFitNDoF(helper,msgHelper)) >= minProbAbovePtCutoff;
700  });
701  }
702 
703  // dE/dx cuts
704  if (m_minNUsedHitsdEdx > 0) {
705  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum used hits for dEdx: " << m_minNUsedHitsdEdx );
706  trackCuts["dEdxHits"].push_back([minNUsedHitsdEdx = m_minNUsedHitsdEdx](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
707  return getNumberOfUsedHitsdEdx(helper,msgHelper) >= minNUsedHitsdEdx;
708  });
709  }
710  if (m_minNOverflowHitsdEdx > 0) {
711  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum IBL overflow hits for dEdx: " << m_minNOverflowHitsdEdx );
712  trackCuts["dEdxHits"].push_back([minNOverflowHitsdEdx = m_minNOverflowHitsdEdx](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
713  return getNumberOfIBLOverflowsdEdx(helper,msgHelper) >= minNOverflowHitsdEdx;
714  });
715  }
716  if (m_minEProbabilityHT > 0) {
717  if constexpr(VERBOSE>0) ATH_MSG_INFO( " Minimum high threshold electron probability: " << m_minEProbabilityHT );
718  if (m_eProbHTonlyForXe) {
719  if constexpr(VERBOSE>0) ATH_MSG_INFO( " (only applied on tracks where all TRT hits are Xenon)" );
720  trackCuts["eProbHT"].push_back([minEProbabilityHT = m_minEProbabilityHT](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
721  return getSummarySum<2,Trk_Helper>(helper, msgHelper, {xAOD::numberOfTRTHits, xAOD::numberOfTRTOutliers})
723  || getEProbabilityHT(helper,msgHelper) >= minEProbabilityHT;
724  });
725  } else {
726  trackCuts["eProbHT"].push_back([minEProbabilityHT = m_minEProbabilityHT](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
727  return getEProbabilityHT(helper,msgHelper) >= minEProbabilityHT;
728  });
729  }
730  }
731 
732  if (!m_vecEtaCutoffsForSiHitsCut.empty() || !m_vecMinNSiHitsAboveEta.empty()) {
733  auto cutSize = m_vecEtaCutoffsForSiHitsCut.size();
734  if (cutSize != m_vecMinNSiHitsAboveEta.size()) {
735  ATH_MSG_ERROR( "Eta cutoffs and Silicon hit cuts must be vectors of the same length." );
736  return StatusCode::FAILURE;
737  }
738  if constexpr(VERBOSE>0) {
739  for (size_t i_cut=0; i_cut<cutSize-1; ++i_cut) {
740  ATH_MSG_INFO( " for " << m_vecEtaCutoffsForSiHitsCut.at(i_cut)
741  << " < eta < " << m_vecEtaCutoffsForSiHitsCut.at(i_cut+1)
742  << " ,Silicon hits >= " << m_vecMinNSiHitsAboveEta.at(i_cut) );
743  }
744  }
746  ATH_MSG_ERROR( "Eta values not in ascending order." );
747  return StatusCode::FAILURE;
748  }
749  if constexpr(VERBOSE>0) ATH_MSG_INFO( " for eta > " << m_vecEtaCutoffsForSiHitsCut.at(cutSize-1)
750  << " ,Silicon hits >= " << m_vecMinNSiHitsAboveEta.at(cutSize-1) );
751 
752  trackCuts["SiHits"].push_back([p_vecEtaCutoffsForSiHitsCut = &std::as_const(m_vecEtaCutoffsForSiHitsCut),
753  p_vecMinNSiHitsAboveEta = &std::as_const(m_vecMinNSiHitsAboveEta)](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
754  double abs_eta = std::abs(helper.eta(msgHelper));
755  unsigned int bin_i = findBin(*p_vecEtaCutoffsForSiHitsCut, abs_eta);
756  return bin_i >= p_vecMinNSiHitsAboveEta->size()
757  || abs_eta>5.0
758  || getSummarySum<4,Trk_Helper>(helper, msgHelper,{xAOD::numberOfPixelHits,
761  xAOD::numberOfSCTDeadSensors}) >= (*p_vecMinNSiHitsAboveEta)[bin_i];
762  });
763  }
764 
765  if (!m_vecEtaCutoffsForPtCut.empty() || !m_vecMinPtAboveEta.empty()) {
766  auto cutSize = m_vecEtaCutoffsForPtCut.size();
767  if (cutSize != m_vecMinPtAboveEta.size()) {
768  ATH_MSG_ERROR( "Eta cutoffs and pT cuts must be vectors of the same length." );
769  return StatusCode::FAILURE;
770  }
771  if constexpr(VERBOSE>0) {
772  for (size_t i_cut=0; i_cut<cutSize-1; ++i_cut) {
773  ATH_MSG_INFO( " for " << m_vecEtaCutoffsForPtCut.at(i_cut)
774  << " < eta < " << m_vecEtaCutoffsForPtCut.at(i_cut+1)
775  << " ,transverse momentum >= " << m_vecMinPtAboveEta.at(i_cut) );
776  }
777  }
779  ATH_MSG_ERROR( "Eta values not in ascending order." );
780  return StatusCode::FAILURE;
781  }
782  if constexpr(VERBOSE>0) ATH_MSG_INFO( " for eta > " << m_vecEtaCutoffsForPtCut.at(cutSize-1)
783  << " ,transverse momentum >= " << m_vecMinPtAboveEta.at(cutSize-1) );
784  trackCuts["Pt"].push_back([p_vecEtaCutoffsForPtCut = &std::as_const(m_vecEtaCutoffsForPtCut),
785  p_vecMinPtAboveEta = &std::as_const(m_vecMinPtAboveEta)](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
786  double abs_eta = std::abs(helper.eta(msgHelper));
787  unsigned int bin_i = findBin(*p_vecEtaCutoffsForPtCut, abs_eta);
788  return bin_i >= p_vecMinPtAboveEta->size() || abs_eta > 5.0 || helper.pt(msgHelper) >= (*p_vecMinPtAboveEta)[bin_i];
789  });
790  }
791 
792  if (!m_vecPtCutoffsForSctHitsCut.empty() || !m_vecMinNSctHitsAbovePt.empty()) {
793  auto cutSize = m_vecPtCutoffsForSctHitsCut.size();
794  if (cutSize != m_vecMinNSctHitsAbovePt.size()) {
795  ATH_MSG_ERROR( "Pt cutoffs and SCT hit cuts must be vectors of the same length." );
796  return StatusCode::FAILURE;
797  }
798  if constexpr(VERBOSE>0) {
799  for (size_t i_cut=0; i_cut<cutSize-1; ++i_cut) {
800  ATH_MSG_INFO( " for " << m_vecPtCutoffsForSctHitsCut.at(i_cut)
801  << " < pt < " << m_vecPtCutoffsForSctHitsCut.at(i_cut+1)
802  << " MeV,\tSCT hits >= " << m_vecMinNSctHitsAbovePt.at(i_cut) );
803  }
804  }
806  ATH_MSG_ERROR( "Pt values not in ascending order." );
807  return StatusCode::FAILURE;
808  }
809  if constexpr(VERBOSE>0) ATH_MSG_INFO( " for pt > " << m_vecPtCutoffsForSctHitsCut.at(cutSize-1)
810  << " MeV,\t\tSCT hits >= " << m_vecMinNSctHitsAbovePt.at(cutSize-1) );
811  trackCuts["SctHits"].push_back([p_vecPtCutoffsForSctHitsCut = &std::as_const(m_vecPtCutoffsForSctHitsCut),
812  p_vecMinNSctHitsAbovePt = &std::as_const(m_vecMinNSctHitsAbovePt)](Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
813  double pt = helper.pt(msgHelper);
814  unsigned int bin_i = findBin(*p_vecPtCutoffsForSctHitsCut, pt);
815  return bin_i >= p_vecPtCutoffsForSctHitsCut->size()
816  || getSummarySum<2,Trk_Helper>(helper, msgHelper,{xAOD::numberOfSCTHits,
817  xAOD::numberOfSCTDeadSensors}) >= (*p_vecMinNSctHitsAbovePt)[bin_i];
818  });
819  }
820 
821  if (!m_vecPtCutoffsForZ0SinThetaCut.empty() ||
824  auto etaSize = m_vecEtaCutoffsForZ0SinThetaCut.size();
825  auto ptSize = m_vecPtCutoffsForZ0SinThetaCut.size();
826  if (etaSize != m_vecvecMaxZ0SinThetaAboveEtaPt.size()) {
827  ATH_MSG_ERROR( "Eta cutoffs and Z0SinTheta cuts must be vectors of the same length." );
828  return StatusCode::FAILURE;
829  }
830  for (size_t i_size=0; i_size<etaSize-1; ++i_size) {
831  if (ptSize != m_vecvecMaxZ0SinThetaAboveEtaPt.at(i_size).size()) {
832  ATH_MSG_ERROR( "Pt cutoffs and Z0SinTheta cuts must be vectors of the same length." );
833  return StatusCode::FAILURE;
834  }
835  }
836 
837  std::stringstream pTRangeBuffer;
838  std::copy(m_vecPtCutoffsForZ0SinThetaCut.begin(), m_vecPtCutoffsForZ0SinThetaCut.end(), std::ostream_iterator<Double_t>(pTRangeBuffer, ", "));
839  std::string pTString=pTRangeBuffer.str();
840  if constexpr(VERBOSE>0) ATH_MSG_INFO("Z0SinTheta cuts (<=) for pT above "<<pTString.substr(0, pTString.size()-2)<<"MeV, respectively:");
841  for (size_t i_cut_eta=0; i_cut_eta<etaSize; ++i_cut_eta)
842  {
843  std::stringstream etaRangeBuffer;
844  etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForZ0SinThetaCut.at(i_cut_eta) << " < |#eta| < ";
845  if(i_cut_eta!=etaSize-1) etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForZ0SinThetaCut.at(i_cut_eta+1);
846  else etaRangeBuffer << std::setprecision(2) << std::fixed <<m_maxAbsEta;
847 
848  std::stringstream cutBuffer;
849  std::copy(m_vecvecMaxZ0SinThetaAboveEtaPt.at(i_cut_eta).begin(), m_vecvecMaxZ0SinThetaAboveEtaPt.at(i_cut_eta).end(), std::ostream_iterator<Double_t>(cutBuffer, ", "));
850  std::string cutString=cutBuffer.str();
851 
852  if constexpr(VERBOSE>0) ATH_MSG_INFO(" for "<<etaRangeBuffer.str()<<": "<<cutString.substr(0, cutString.size()-2));
853  }
854 
856  ATH_MSG_ERROR( "Eta values not in ascending order." );
857  return StatusCode::FAILURE;
858  }
860  ATH_MSG_ERROR( "Pt values not in ascending order." );
861  return StatusCode::FAILURE;
862  }
863 
864  trackCuts["Z0SinTheta"].push_back([p_vecEtaCutoffsForZ0SinThetaCut = &std::as_const(m_vecEtaCutoffsForZ0SinThetaCut),
865  p_vecPtCutoffsForZ0SinThetaCut = &std::as_const(m_vecPtCutoffsForZ0SinThetaCut),
866  p_vecvecMaxZ0SinThetaAboveEtaPt = &std::as_const(m_vecvecMaxZ0SinThetaAboveEtaPt)] (Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
867  double eta = helper.eta(msgHelper);
868  unsigned int bin_eta = findBin(*p_vecEtaCutoffsForZ0SinThetaCut, std::fabs(eta));
869  double pt = helper.pt(msgHelper);
870  unsigned int bin_pt = findBin(*p_vecPtCutoffsForZ0SinThetaCut, pt);
871  return bin_eta >= p_vecEtaCutoffsForZ0SinThetaCut->size()
872  || bin_pt >= p_vecPtCutoffsForZ0SinThetaCut->size()
873  || std::fabs(helper.z0(msgHelper) * std::sin(helper.theta(msgHelper))) <= (*p_vecvecMaxZ0SinThetaAboveEtaPt)[bin_eta][bin_pt];
874  });
875  }
876 
877  if (!m_vecPtCutoffsForD0Cut.empty() ||
878  !m_vecEtaCutoffsForD0Cut.empty() ||
879  !m_vecvecMaxD0AboveEtaPt.empty()) {
880  auto etaSize = m_vecEtaCutoffsForD0Cut.size();
881  auto ptSize = m_vecPtCutoffsForD0Cut.size();
882  if (etaSize != m_vecvecMaxD0AboveEtaPt.size()) {
883  ATH_MSG_ERROR( "Eta cutoffs and D0 cuts must be vectors of the same length." );
884  return StatusCode::FAILURE;
885  }
886  for (size_t i_size=0; i_size<etaSize-1; ++i_size) {
887  if (ptSize != m_vecvecMaxD0AboveEtaPt.at(i_size).size()) {
888  ATH_MSG_ERROR( "Pt cutoffs and D0 cuts must be vectors of the same length." );
889  return StatusCode::FAILURE;
890  }
891  }
892 
893  std::stringstream pTRangeBuffer;
894  std::copy(m_vecPtCutoffsForD0Cut.begin(), m_vecPtCutoffsForD0Cut.end(), std::ostream_iterator<Double_t>(pTRangeBuffer, ", "));
895  std::string pTString=pTRangeBuffer.str();
896  if constexpr(VERBOSE>0) ATH_MSG_INFO("D0 cuts (<=) for pT above "<<pTString.substr(0, pTString.size()-2)<<"MeV, respectively:");
897  for (size_t i_cut_eta=0; i_cut_eta<etaSize; ++i_cut_eta)
898  {
899  std::stringstream etaRangeBuffer;
900  etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForD0Cut.at(i_cut_eta) << " < |#eta| < ";
901  if(i_cut_eta!=etaSize-1) etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForD0Cut.at(i_cut_eta+1);
902  else etaRangeBuffer << std::setprecision(2) << std::fixed <<m_maxAbsEta;
903 
904  std::stringstream cutBuffer;
905  std::copy(m_vecvecMaxD0AboveEtaPt.at(i_cut_eta).begin(), m_vecvecMaxD0AboveEtaPt.at(i_cut_eta).end(), std::ostream_iterator<Double_t>(cutBuffer, ", "));
906  std::string cutString=cutBuffer.str();
907 
908  if constexpr(VERBOSE>0) ATH_MSG_INFO(" for "<<etaRangeBuffer.str()<<": "<<cutString.substr(0, cutString.size()-2));
909  }
910 
912  ATH_MSG_ERROR( "Eta values not in ascending order." );
913  return StatusCode::FAILURE;
914  }
916  ATH_MSG_ERROR( "Pt values not in ascending order." );
917  return StatusCode::FAILURE;
918  }
919 
920  trackCuts["D0"].push_back([p_vecEtaCutoffsForD0Cut = &std::as_const(m_vecEtaCutoffsForD0Cut),
921  p_vecPtCutoffsForD0Cut = &std::as_const(m_vecPtCutoffsForD0Cut),
922  p_vecvecMaxD0AboveEtaPt = &std::as_const(m_vecvecMaxD0AboveEtaPt)] (Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
923  double eta = helper.eta(msgHelper);
924  unsigned int bin_eta = findBin(*p_vecEtaCutoffsForD0Cut, std::fabs(eta));
925  double pt = helper.pt(msgHelper);
926  unsigned int bin_pt = findBin(*p_vecPtCutoffsForD0Cut, pt);
927  return bin_eta >= p_vecEtaCutoffsForD0Cut->size()
928  || bin_pt >= p_vecPtCutoffsForD0Cut->size()
929  || std::fabs(helper.d0(msgHelper)) <= (*p_vecvecMaxD0AboveEtaPt)[bin_eta][bin_pt];
930  });
931  }
932 
933  if (!m_vecPtCutoffsForSctHolesCut.empty() ||
936  auto etaSize = m_vecEtaCutoffsForSctHolesCut.size();
937  auto ptSize = m_vecPtCutoffsForSctHolesCut.size();
938  if (etaSize != m_vecvecMaxSctHolesAboveEtaPt.size()) {
939  ATH_MSG_ERROR( "Eta cutoffs and SctHoles cuts must be vectors of the same length." );
940  return StatusCode::FAILURE;
941  }
942  for (size_t i_size=0; i_size<etaSize-1; ++i_size) {
943  if (ptSize != m_vecvecMaxSctHolesAboveEtaPt.at(i_size).size()) {
944  ATH_MSG_ERROR( "Pt cutoffs and SctHoles cuts must be vectors of the same length." );
945  return StatusCode::FAILURE;
946  }
947  }
948 
949  std::stringstream pTRangeBuffer;
950  std::copy(m_vecPtCutoffsForSctHolesCut.begin(), m_vecPtCutoffsForSctHolesCut.end(), std::ostream_iterator<Double_t>(pTRangeBuffer, ", "));
951  std::string pTString=pTRangeBuffer.str();
952  if constexpr(VERBOSE>0) ATH_MSG_INFO("SctHoles cuts (<=) for pT above "<<pTString.substr(0, pTString.size()-2)<<"MeV, respectively:");
953  for (size_t i_cut_eta=0; i_cut_eta<etaSize; ++i_cut_eta)
954  {
955  std::stringstream etaRangeBuffer;
956  etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForSctHolesCut.at(i_cut_eta) << " < |#eta| < ";
957  if(i_cut_eta!=etaSize-1) etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForSctHolesCut.at(i_cut_eta+1);
958  else etaRangeBuffer << std::setprecision(2) << std::fixed <<m_maxAbsEta;
959 
960  std::stringstream cutBuffer;
961  std::copy(m_vecvecMaxSctHolesAboveEtaPt.at(i_cut_eta).begin(), m_vecvecMaxSctHolesAboveEtaPt.at(i_cut_eta).end(), std::ostream_iterator<Double_t>(cutBuffer, ", "));
962  std::string cutString=cutBuffer.str();
963 
964  if constexpr(VERBOSE>0) ATH_MSG_INFO(" for "<<etaRangeBuffer.str()<<": "<<cutString.substr(0, cutString.size()-2));
965  }
966 
968  ATH_MSG_ERROR( "Eta values not in ascending order." );
969  return StatusCode::FAILURE;
970  }
972  ATH_MSG_ERROR( "Pt values not in ascending order." );
973  return StatusCode::FAILURE;
974  }
975 
976  trackCuts["SctHits"].push_back([p_vecEtaCutoffsForSctHolesCut = &std::as_const(m_vecEtaCutoffsForSctHolesCut),
977  p_vecPtCutoffsForSctHolesCut = &std::as_const(m_vecPtCutoffsForSctHolesCut),
978  p_vecvecMaxSctHolesAboveEtaPt = &std::as_const(m_vecvecMaxSctHolesAboveEtaPt)] (Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
979  double eta = helper.eta(msgHelper);
980  unsigned int bin_eta = findBin(*p_vecEtaCutoffsForSctHolesCut, std::fabs(eta));
981  double pt = helper.pt(msgHelper);
982  unsigned int bin_pt = findBin(*p_vecPtCutoffsForSctHolesCut, pt);
983  return bin_eta >= p_vecEtaCutoffsForSctHolesCut->size()
984  || bin_pt >= p_vecPtCutoffsForSctHolesCut->size()
985  || getSummary(helper, msgHelper, xAOD::numberOfSCTHoles) <= (*p_vecvecMaxSctHolesAboveEtaPt)[bin_eta][bin_pt];
986  });
987  }
988 
992  auto etaSize = m_vecEtaCutoffsForSctHitsPlusDeadCut.size();
993  auto ptSize = m_vecPtCutoffsForSctHitsPlusDeadCut.size();
994  if (etaSize != m_vecvecMinSctHitsPlusDeadAboveEtaPt.size()) {
995  ATH_MSG_ERROR( "Eta cutoffs and SctHitsPlusDead cuts must be vectors of the same length." );
996  return StatusCode::FAILURE;
997  }
998  for (size_t i_size=0; i_size<etaSize-1; ++i_size) {
999  if (ptSize != m_vecvecMinSctHitsPlusDeadAboveEtaPt.at(i_size).size()) {
1000  ATH_MSG_ERROR( "Pt cutoffs and SctHitsPlusDead cuts must be vectors of the same length." );
1001  return StatusCode::FAILURE;
1002  }
1003  }
1004 
1005  std::stringstream pTRangeBuffer;
1006  std::copy(m_vecPtCutoffsForSctHitsPlusDeadCut.begin(), m_vecPtCutoffsForSctHitsPlusDeadCut.end(), std::ostream_iterator<Double_t>(pTRangeBuffer, ", "));
1007  std::string pTString=pTRangeBuffer.str();
1008  if constexpr(VERBOSE>0) ATH_MSG_INFO("SctHitsPlusDead cuts (>=) for pT above "<<pTString.substr(0, pTString.size()-2)<<"MeV, respectively:");
1009  for (size_t i_cut_eta=0; i_cut_eta<etaSize; ++i_cut_eta)
1010  {
1011  std::stringstream etaRangeBuffer;
1012  etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForSctHitsPlusDeadCut.at(i_cut_eta) << " < |#eta| < ";
1013  if(i_cut_eta!=etaSize-1) etaRangeBuffer << std::setprecision(2) << std::fixed << m_vecEtaCutoffsForSctHitsPlusDeadCut.at(i_cut_eta+1);
1014  else etaRangeBuffer << std::setprecision(2) << std::fixed <<m_maxAbsEta;
1015 
1016  std::stringstream cutBuffer;
1017  std::copy(m_vecvecMinSctHitsPlusDeadAboveEtaPt.at(i_cut_eta).begin(), m_vecvecMinSctHitsPlusDeadAboveEtaPt.at(i_cut_eta).end(), std::ostream_iterator<Double_t>(cutBuffer, ", "));
1018  std::string cutString=cutBuffer.str();
1019 
1020  if constexpr(VERBOSE>0) ATH_MSG_INFO(" for "<<etaRangeBuffer.str()<<": "<<cutString.substr(0, cutString.size()-2));
1021  }
1022 
1024  ATH_MSG_ERROR( "Eta values not in ascending order." );
1025  return StatusCode::FAILURE;
1026  }
1028  ATH_MSG_ERROR( "Pt values not in ascending order." );
1029  return StatusCode::FAILURE;
1030  }
1031 
1032  trackCuts["SctHits"].push_back([p_vecEtaCutoffsForSctHitsPlusDeadCut = &std::as_const(m_vecEtaCutoffsForSctHitsPlusDeadCut),
1033  p_vecPtCutoffsForSctHitsPlusDeadCut = &std::as_const(m_vecPtCutoffsForSctHitsPlusDeadCut),
1034  p_vecvecMinSctHitsPlusDeadAboveEtaPt = &std::as_const(m_vecvecMinSctHitsPlusDeadAboveEtaPt)] (Trk_Helper helper, const asg::AsgMessaging &msgHelper) {
1035  double eta = helper.eta(msgHelper);
1036  unsigned int bin_eta = findBin(*p_vecEtaCutoffsForSctHitsPlusDeadCut, std::fabs(eta));
1037  double pt = helper.pt(msgHelper);
1038  unsigned int bin_pt = findBin(*p_vecPtCutoffsForSctHitsPlusDeadCut, pt);
1039  return bin_eta >= p_vecEtaCutoffsForSctHitsPlusDeadCut->size()
1040  || bin_pt >= p_vecPtCutoffsForSctHitsPlusDeadCut->size()
1041  || getSummarySum<2,Trk_Helper>(helper, msgHelper, {xAOD::numberOfSCTHits, xAOD::numberOfSCTDeadSensors}) >= (*p_vecvecMinSctHitsPlusDeadAboveEtaPt)[bin_eta][bin_pt];
1042  });
1043  }
1044 
1045  return StatusCode::SUCCESS;
1046 }
1047 
1048 
1049 template <class Trk_Helper>
1051  const std::map< std::string, std::vector< std::function<bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > &trackCuts) const {
1052  if (!m_isInitialized) {
1053  if (!m_warnInit) {
1054  ATH_MSG_WARNING( "Tool is not initialized! Calling accept() will not be very helpful." );
1055  m_warnInit = true;
1056  }
1057  }
1058 
1059  asg::AcceptData acceptData(&m_acceptInfo);
1060  bool passAll = true;
1061 
1062  // loop over all cuts
1063  UShort_t cutFamilyIndex = 0;
1064  for ( const auto& cutFamily : trackCuts ) {
1065  bool pass = true;
1066 
1067  for ( const auto& cut : cutFamily.second ) {
1068  if (! cut(helper, *m_msgHelper) ) {
1069  pass = false;
1070  break;
1071  }
1072  }
1073 
1074  // @TODO really always run through all cuts even if passed is false ?
1075  passAll &= pass;
1076  acceptData.setCutResult( cutFamilyIndex, pass );
1077  cutFamilyIndex++;
1078  }
1079 
1080  {
1081  // lock access to m_numTracksPassedCuts
1082  std::lock_guard<std::mutex> lock(m_mutex);
1083  for (unsigned int idx=0; idx < trackCuts.size(); ++idx) {
1084  assert(idx<m_numTracksPassedCuts.size());
1085  m_numTracksPassedCuts[idx] += acceptData.getCutResult(idx);
1086  }
1087  }
1088  if (passAll) m_numTracksPassed++;
1090 
1091  return acceptData;
1092 
1093 }
1094 
1095 
1097 {
1098  if (!m_isInitialized) {
1099  ATH_MSG_ERROR( "You are attempting to finalize a tool that has not been initialized()." );
1100  }
1101 
1102 #ifdef XAOD_ANALYSIS
1103  if (m_numTracksProcessed == 0) {
1104  ATH_MSG_INFO( "No tracks processed in selection tool." );
1105  return StatusCode::SUCCESS;
1106  }
1107 
1108  // Only printed out for analysis
1110  << m_numTracksPassed*100./m_numTracksProcessed << "% passed all cuts." );
1111  for (const auto& cutFamily : m_trackParticleCuts) {
1112  // lock(m_mutex) is not needed because this is inside of non-const finalize method.
1113  ULong64_t numPassed = m_numTracksPassedCuts.at(m_acceptInfo.getCutPosition(cutFamily.first));
1114  ATH_MSG_INFO( numPassed << " = " << numPassed*100./m_numTracksProcessed << "% passed "
1115  << cutFamily.first << " cut." );
1116  }
1117 #endif
1118 
1119  return StatusCode::SUCCESS;
1120 }
1121 
1122 
1128 {
1129  return m_acceptInfo;
1130 }
1131 
1132 
1145 {
1146 
1147  asg::AcceptData acceptData(&m_acceptInfo);
1148  // Check if this is a track:
1149  if( p->type() != xAOD::Type::TrackParticle ) {
1150  ATH_MSG_ERROR( "accept(...) Function received a non-track" );
1151  return acceptData;
1152  }
1153 
1154  // Cast it to a track (we have already checked its type so we do not have to dynamic_cast):
1155  const xAOD::TrackParticle* trk = static_cast< const xAOD::TrackParticle* >( p );
1156 
1157  // Let the specific function do the work:
1158  return accept( *trk, nullptr );
1159 }
1160 
1161 
1188  const xAOD::Vertex* vtx ) const
1189 {
1190  asg::AcceptData acceptData(&m_acceptInfo);
1191  if (m_trackParticleCuts.empty()) {
1194  return acceptData;
1195  }
1196 
1197  InDetAccessor::TrackParticleHelper track_helper(trk,vtx);
1198  return accept( track_helper, m_trackParticleCuts);
1199 }
1200 
1201 #ifndef XAOD_ANALYSIS
1211  const Trk::Vertex* vertex ) const
1212 {
1213  if (!m_isInitialized) ATH_MSG_WARNING( "Tool is not initialized! Calling accept() will not be very helpful." );
1214 
1215  asg::AcceptData acceptData(&m_acceptInfo);
1216  if (m_trkTrackCuts.empty()) {
1219  return acceptData;
1220  }
1221 
1222  const Trk::TrackParameters* perigee = track.perigeeParameters();
1223 
1224  if ( perigee == nullptr || !perigee->covariance() ) {
1225  ATH_MSG_WARNING( "Track preselection: Zero pointer to parameterbase* received (most likely a track without perigee). This track will not pass any cuts." );
1226  return acceptData;
1227  }
1228 
1229  std::unique_ptr<const Trk::TrackParameters> paramsAtVertex;
1230  if (vertex) {
1231  Trk::PerigeeSurface perigeeSurface(vertex->position());
1232  paramsAtVertex =
1233  m_extrapolator->extrapolate(Gaudi::Hive::currentContext(),
1234  *perigee,
1235  perigeeSurface,
1237  true,
1238  track.info().particleHypothesis());
1239  perigee = paramsAtVertex.get();
1240  }
1241 
1242  if ( perigee == nullptr || !perigee->covariance() ) {
1243  ATH_MSG_INFO( "Track preselection: cannot make a measured perigee. This track will not pass any cuts." );
1244  if (!m_initTrkTools)
1245  ATH_MSG_INFO( "The user should set \"UseTrkTrackTools\" to true if they want the extrapolation tool to try to get a perigee." );
1246  return acceptData;
1247  }
1248 
1249 
1250  std::unique_ptr<Trk::TrackSummary> cleanup_summary;
1251  const Trk::TrackSummary* summary = track.trackSummary();
1252  if (summary == nullptr && m_trackSumToolAvailable) {
1253  cleanup_summary = m_trackSumTool->summary(Gaudi::Hive::currentContext(),track);
1254  summary = cleanup_summary.get();
1255  }
1256  if (summary == nullptr) {
1257  ATH_MSG_INFO( "Track preselection: cannot get a track summary. This track will not pass any cuts." );
1258  if (!m_initTrkTools)
1259  ATH_MSG_INFO( "The Trk::Track tools were not set to be initialized. The user should set the property \"UseTrkTrackTools\" to true if they wish to use the summary tool." );
1260  return acceptData;
1261  }
1262 
1263  InDetAccessor::TrkTrackHelper track_helper(track,*summary, perigee);
1264  acceptData = accept( track_helper, m_trkTrackCuts);
1265  return acceptData;
1266 }
1267 
1268 #endif // XAOD_ANALYSIS
1269 
1285 #ifdef __GNUC__
1286 #pragma GCC diagnostic push
1287 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1288 #endif
1290 {
1291 #ifndef XAOD_STANDALONE
1292  ATH_MSG_WARNING( "InDetTrackSelectionTool::setCutLevel() is not designed to be called manually in Athena." );
1293  ATH_MSG_WARNING( "It may not behave as intended. Instead, configure it in the job options through the CutLevel property." );
1294 #endif // XAOD_STANDALONE
1295  if (!m_cutLevel.empty()) {
1296  ATH_MSG_WARNING( "Cut level already set to " << m_cutLevel << ". Calling setCutLevel() is not expected." );
1297  }
1298  setCutLevelPrivate(level, overwrite);
1299 }
1300 #ifdef __GNUC__
1301 #pragma GCC diagnostic pop
1302 #endif
1303 
1305 {
1306  switch (level) {
1307  case CutLevel::NoCut :
1308  if (m_isInitialized) {
1309  // this check is in here so that it only happens once per call to setCutLevel,
1310  // but will still warn if only the private version is called somehow.
1311  ATH_MSG_WARNING( "Trying to set cut level while the tool is already initialized." );
1312  ATH_MSG_WARNING( "This will almost certainly not exhibit intended behavior." );
1313  }
1314  if (overwrite) {
1315  // minimum cuts will default to -1, so if a user wishes to remove a cut
1316  // from a preset level they can do so by setting the minimum to zero.
1317  // maximum cuts can be removed from a preset level by setting them negative.
1318  m_minPt = -1.; // in MeV
1319  m_minP = -1.;
1321  m_maxZ0SinTheta = LOCAL_MAX_DOUBLE; // in mm
1335  m_minNPixelHits = -1;
1339  m_minNSctHits = -1;
1340  m_minNSctHitsPhysical = -1;
1344  m_minNSiHits = -1;
1345  m_minNSiHitsPhysical = -1;
1351  m_maxOneSharedModule = false;
1353  m_maxEtaForTrtHitCuts = -1.; // this is really a minimum eta above which cuts are not applied
1354  m_minNTrtHits = -1;
1362  m_minProb = -1.;
1365  m_minProbAbovePtCutoff = -1.;
1366  m_useEtaDependentMaxChiSq = false;
1367  m_minNUsedHitsdEdx = -1;
1369  m_minEProbabilityHT = -1.;
1370  m_eProbHTonlyForXe = false;
1371 #ifndef XAOD_ANALYSIS
1372  m_minNSiHitsMod = -1;
1373  m_minNSiHitsModTop = -1;
1374  m_minNSiHitsModBottom = -1;
1375 #endif
1377  m_vecMinNSiHitsAboveEta.clear();
1378  m_vecEtaCutoffsForPtCut.clear();
1379  m_vecMinPtAboveEta.clear();
1381  m_vecMinNSctHitsAbovePt.clear();
1385  m_vecEtaCutoffsForD0Cut.clear();
1386  m_vecPtCutoffsForD0Cut.clear();
1387  m_vecvecMaxD0AboveEtaPt.clear();
1394  }
1395  break;
1396  case CutLevel::Loose :
1397  setCutLevelPrivate(CutLevel::NoCut, overwrite); // if hard overwrite, reset all cuts first. will do nothing if !overwrite
1398  // change the cuts if a hard overwrite is asked for or if the cuts are unset
1399  if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1400  if (overwrite || m_minNSiHits < 0) m_minNSiHits = 8;
1401  m_maxOneSharedModule = true;
1402  if (overwrite || m_maxNSiHoles >= LOCAL_MAX_INT) m_maxNSiHoles = 2;
1403  if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 1;
1404  break;
1405  case CutLevel::LoosePrimary :
1406  setCutLevelPrivate(CutLevel::NoCut, overwrite); // implement loose cuts first
1407  if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1408  if (overwrite || m_minNSiHits < 0) m_minNSiHits = 8;
1409  m_maxOneSharedModule = true;
1410  if (overwrite || m_maxNSiHoles >= LOCAL_MAX_INT) m_maxNSiHoles = 2;
1411  if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 1;
1412  if (overwrite || m_minNSiHitsIfSiSharedHits < 0) m_minNSiHitsIfSiSharedHits = 10;
1413  break;
1414  case CutLevel::TightPrimary :
1415  setCutLevelPrivate(CutLevel::NoCut, overwrite);
1416  if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1417  if (overwrite || m_minNSiHits < 0) m_minNSiHits = 9;
1418  m_maxOneSharedModule = true;
1419  if (overwrite || m_maxNSiHoles >= LOCAL_MAX_INT) m_maxNSiHoles = 2;
1420  if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 0;
1422  if (overwrite || m_minNSiHitsAboveEtaCutoff < 0) m_minNSiHitsAboveEtaCutoff = 11;
1424  break;
1425  case CutLevel::LooseMuon :
1426  setCutLevelPrivate(CutLevel::NoCut, overwrite); // reset cuts unless we are doing a soft set
1427  if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 1;
1428  if (overwrite || m_minNSctHits < 0) m_minNSctHits = 5;
1429  if (overwrite || m_maxNSiHoles >= LOCAL_MAX_INT) m_maxNSiHoles = 2;
1430  if (overwrite || m_maxTrtEtaAcceptance >= LOCAL_MAX_DOUBLE ) m_maxTrtEtaAcceptance = 0.1;
1431  if (overwrite || m_maxEtaForTrtHitCuts < 0.) m_maxEtaForTrtHitCuts = 1.9;
1432  if (overwrite || m_minNTrtHitsPlusOutliers < 0) m_minNTrtHitsPlusOutliers = 6;
1434  break;
1435  case CutLevel::LooseElectron :
1436  setCutLevelPrivate(CutLevel::NoCut, overwrite);
1437  if (overwrite || m_minNSiHits < 0) m_minNSiHits = 7;
1438  if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 1;
1439  break;
1440  case CutLevel::LooseTau :
1441  setCutLevelPrivate(CutLevel::NoCut, overwrite);
1442  if (overwrite || m_minPt < 0.0) m_minPt = 1000.0;
1443  if (overwrite || m_minNSiHits < 0) m_minNSiHits = 7;
1444  if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 2;
1445  if (overwrite || m_maxD0 >= LOCAL_MAX_DOUBLE) m_maxD0 = 1.0;
1446  if (overwrite || m_maxZ0 >= LOCAL_MAX_DOUBLE) m_maxZ0 = 1.5;
1447  break;
1448  case CutLevel::MinBias :
1449  setCutLevelPrivate(CutLevel::NoCut, overwrite);
1450  if (overwrite || m_useMinBiasInnermostLayersCut >= 0) m_useMinBiasInnermostLayersCut = 1; // if this is less than 0, it is turned off
1451  if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 1;
1452  if (overwrite || m_minNSctHits < 0) m_minNSctHits = 6;
1453  if (overwrite || m_minProbAbovePtCutoff < 0.) {
1454  m_minPtForProbCut = 10000.;
1455  m_minProbAbovePtCutoff = .01;
1456  }
1457  if (overwrite || m_maxD0 >= LOCAL_MAX_DOUBLE) m_maxD0 = 1.5;
1458  if (overwrite || m_maxZ0SinTheta >= LOCAL_MAX_DOUBLE) m_maxZ0SinTheta = 1.5;
1459  if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1460  if (overwrite || m_minPt < 0.) m_minPt = 500.0;
1461  break;
1462  case CutLevel::HILoose:
1463  // HILoose is similar to MinBias, but not identical
1464  setCutLevelPrivate(CutLevel::NoCut, overwrite);
1465  if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1467  if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 1;
1468  if (overwrite || (m_vecPtCutoffsForSctHitsCut.empty()
1469  && m_vecMinNSctHitsAbovePt.empty())) {
1470  m_vecPtCutoffsForSctHitsCut = {0.0, 300.0, 400.0};
1471  m_vecMinNSctHitsAbovePt = {2, 4, 6};
1472  }
1473  if (overwrite || m_maxD0 >= LOCAL_MAX_DOUBLE) m_maxD0 = 1.5;
1474  if (overwrite || m_maxZ0SinTheta >= LOCAL_MAX_DOUBLE) m_maxZ0SinTheta = 1.5;
1475  break;
1476  case CutLevel::HITight:
1477  setCutLevelPrivate(CutLevel::NoCut, overwrite);
1478  // HITight is like HILoose but we require 8 SCT hits and 2 pixel hits
1479  setCutLevelPrivate(CutLevel::NoCut, overwrite);
1480  if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1482  if (overwrite || m_minNPixelHits < 0) m_minNPixelHits = 2;
1483  if (overwrite || (m_vecPtCutoffsForSctHitsCut.empty()
1484  && m_vecMinNSctHitsAbovePt.empty())) {
1485  m_vecPtCutoffsForSctHitsCut = {0.0, 300.0, 400.0};
1486  m_vecMinNSctHitsAbovePt = {4, 6, 8};
1487  }
1488  if (overwrite || m_maxD0 >= LOCAL_MAX_DOUBLE) m_maxD0 = 1.0;
1489  if (overwrite || m_maxZ0SinTheta >= LOCAL_MAX_DOUBLE) m_maxZ0SinTheta = 1.0;
1490  if (overwrite || m_maxChiSqperNdf >= LOCAL_MAX_DOUBLE) m_maxChiSqperNdf = 6.0;
1491  break;
1492  case CutLevel::HILooseOptimized:
1493  setCutLevelPrivate(CutLevel::NoCut, overwrite);
1494  if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1495  if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 0;
1497  if (overwrite || (m_vecEtaCutoffsForZ0SinThetaCut.empty() &&
1500  m_vecEtaCutoffsForZ0SinThetaCut = {0.0, 1.1, 1.6, 2.0};
1501  m_vecPtCutoffsForZ0SinThetaCut = {500, 600, 700, 800, 900, 1000, 1500,
1502  2000, 2500, 3000, 5000, 8000, 12000};
1503  m_vecvecMaxZ0SinThetaAboveEtaPt = {{2.10, 2.15, 6.00, 5.00, 3.10, 2.00, 1.75, 1.60, 1.43, 1.40, 1.05, 0.65, 0.60},
1504  {1.44, 1.47, 1.50, 1.55, 1.62, 1.45, 1.45, 1.78, 1.73, 1.50, 1.20, 0.97, 0.53},
1505  {1.40, 1.45, 1.50, 1.46, 1.41, 1.37, 1.25, 1.50, 1.50, 1.36, 1.10, 0.85, 0.52},
1506  {1.51, 1.70, 1.70, 1.71, 1.71, 1.53, 1.54, 1.49, 1.36, 1.20, 0.95, 0.60, 0.55}};
1507  }
1508  if (overwrite || (m_vecEtaCutoffsForD0Cut.empty() &&
1509  m_vecPtCutoffsForD0Cut.empty() &&
1510  m_vecvecMaxD0AboveEtaPt.empty())){
1511  m_vecEtaCutoffsForD0Cut = {0.0, 1.1, 1.6, 2.0};
1512  m_vecPtCutoffsForD0Cut = {500, 600, 700, 800, 900, 1000, 1500,
1513  2000, 2500, 3000, 5000, 8000, 12000};
1514  m_vecvecMaxD0AboveEtaPt = {{0.81, 0.90, 0.94, 0.92, 0.90, 0.75, 0.65, 0.63, 0.62, 0.60, 0.63, 0.50, 0.55},
1515  {1.00, 0.98, 0.98, 0.92, 0.90, 0.69, 0.67, 0.86, 0.88, 0.88, 0.88, 0.87, 1.06},
1516  {1.19, 1.15, 1.10, 1.08, 1.03, 0.94, 0.85, 0.97, 0.97, 0.96, 0.95, 0.92, 1.04},
1517  {1.33, 1.23, 1.21, 1.15, 1.15, 1.07, 0.94, 0.97, 0.97, 0.97, 0.98, 1.10, 1.10}};
1518  }
1519  break;
1520  case CutLevel::HITightOptimized:
1521  setCutLevelPrivate(CutLevel::NoCut, overwrite);
1522  if (overwrite || m_maxAbsEta >= LOCAL_MAX_DOUBLE) m_maxAbsEta = 2.5;
1523  if (overwrite || m_maxNPixelHoles >= LOCAL_MAX_INT) m_maxNPixelHoles = 0;
1525  if (overwrite || (m_vecEtaCutoffsForZ0SinThetaCut.empty() &&
1528  m_vecEtaCutoffsForZ0SinThetaCut = {0.0, 1.1, 1.6, 2.0};
1529  m_vecPtCutoffsForZ0SinThetaCut = {500, 600, 700, 800, 900, 1000, 1500,
1530  2000, 2500, 3000, 5000, 8000, 12000};
1531  m_vecvecMaxZ0SinThetaAboveEtaPt = {{0.62, 0.70, 0.82, 0.87, 0.74, 0.61, 0.50, 0.48, 0.46, 0.45, 0.30, 0.24, 0.23},
1532  {0.51, 0.53, 0.53, 0.53, 0.52, 0.43, 0.28, 0.27, 0.28, 0.30, 0.24, 0.22, 0.13},
1533  {0.91, 0.89, 0.87, 0.55, 0.59, 0.37, 0.39, 0.31, 0.34, 0.35, 0.30, 0.30, 0.20},
1534  {0.76, 0.71, 0.69, 0.48, 0.48, 0.47, 0.46, 0.42, 0.38, 0.32, 0.28, 0.20, 0.15}};
1535  }
1536  if (overwrite || (m_vecEtaCutoffsForD0Cut.empty() &&
1537  m_vecPtCutoffsForD0Cut.empty() &&
1538  m_vecvecMaxD0AboveEtaPt.empty())){
1539  m_vecEtaCutoffsForD0Cut = {0.0, 1.1, 1.6, 2.0};
1540  m_vecPtCutoffsForD0Cut = {500, 600, 700, 800, 900, 1000, 1500,
1541  2000, 2500, 3000, 5000, 8000, 12000};
1542  m_vecvecMaxD0AboveEtaPt = {{0.34, 0.39, 0.47, 0.49, 0.55, 0.47, 0.44, 0.21, 0.19, 0.17, 0.12, 0.14, 0.15},
1543  {0.32, 0.32, 0.33, 0.33, 0.33, 0.27, 0.16, 0.15, 0.13, 0.15, 0.13, 0.16, 0.20},
1544  {0.95, 0.91, 0.88, 0.35, 0.37, 0.24, 0.26, 0.22, 0.23, 0.24, 0.19, 0.19, 0.23},
1545  {0.68, 0.67, 0.65, 0.42, 0.42, 0.36, 0.35, 0.31, 0.27, 0.26, 0.27, 0.28, 0.30}};
1546  }
1547  if (overwrite || (m_vecEtaCutoffsForSctHolesCut.empty() &&
1548  m_vecPtCutoffsForSctHolesCut.empty() &&
1550  m_vecEtaCutoffsForSctHolesCut = {0.0, 1.1, 1.6, 2.0};
1551  m_vecPtCutoffsForSctHolesCut = {500, 600, 700, 800, 900, 1000, 1500,
1552  2000, 2500, 3000, 5000, 8000, 12000};
1553  m_vecvecMaxSctHolesAboveEtaPt = {{0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1},
1554  {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1},
1555  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
1556  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}};
1557  }
1558  if (overwrite || (m_vecEtaCutoffsForSctHitsPlusDeadCut.empty() &&
1561  m_vecEtaCutoffsForSctHitsPlusDeadCut = {0.0, 1.1, 1.6, 2.0};
1562  m_vecPtCutoffsForSctHitsPlusDeadCut = {500, 600, 700, 800, 900, 1000, 1500,
1563  2000, 2500, 3000, 5000, 8000, 12000};
1564  m_vecvecMinSctHitsPlusDeadAboveEtaPt = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
1565  {0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 0, 0, 0},
1566  {8, 8, 8, 7, 7, 6, 6, 6, 6, 6, 0, 0, 0},
1567  {7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
1568  }
1569  break;
1570  default:
1571  ATH_MSG_ERROR("CutLevel not recognized. Cut selection will remain unchanged.");
1572  break;
1573  }
1574 }
1575 
1576 // initialize the map from strings to cut levels
1577 const std::unordered_map<std::string, InDet::CutLevel>
1579  {
1580  {"NoCut", InDet::CutLevel::NoCut},
1581  {"Loose", InDet::CutLevel::Loose},
1582  {"LoosePrimary", InDet::CutLevel::LoosePrimary},
1583  {"TightPrimary", InDet::CutLevel::TightPrimary},
1584  {"LooseMuon", InDet::CutLevel::LooseMuon},
1585  {"LooseElectron", InDet::CutLevel::LooseElectron},
1586  {"LooseTau", InDet::CutLevel::LooseTau},
1587  {"MinBias", InDet::CutLevel::MinBias},
1588  {"HILoose", InDet::CutLevel::HILoose},
1589  {"HITight", InDet::CutLevel::HITight},
1590  {"HILooseOptimized", InDet::CutLevel::HILooseOptimized},
1591  {"HITightOptimized", InDet::CutLevel::HITightOptimized}
1592  };
checkCorrelInHIST.getSummary
def getSummary(histos, correls, fractionNonZero)
Definition: checkCorrelInHIST.py:243
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
xAOD::numberOfPixelHoles
@ numberOfPixelHoles
number of pixel layers on track with absence of hits [unit8_t].
Definition: TrackingPrimitives.h:261
LikeEnum::Loose
@ Loose
Definition: LikelihoodEnums.h:12
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
InDetAccessor
Definition: InDetTrackSelectionTool.h:32
python.ConfigText_unitTest.checkOrder
checkOrder
Definition: ConfigText_unitTest.py:303
InDet::InDetTrackSelectionTool::m_trackSumToolAvailable
Bool_t m_trackSumToolAvailable
Whether the summary tool is available
Definition: InDetTrackSelectionTool.h:235
InDet::InDetTrackSelectionTool::m_minNSctHits
Int_t m_minNSctHits
Minimum number of SCT hits (plus dead sensors)
Definition: InDetTrackSelectionTool.h:171
InDet::InDetTrackSelectionTool::m_trackSumTool
ToolHandle< Trk::ITrackSummaryTool > m_trackSumTool
Track summary tool.
Definition: InDetTrackSelectionTool.h:236
InDet::InDetTrackSelectionTool::m_vecvecMaxZ0SinThetaAboveEtaPt
std::vector< std::vector< Double_t > > m_vecvecMaxZ0SinThetaAboveEtaPt
Maximum values of z0*sin(theta) above each eta-pT level.
Definition: InDetTrackSelectionTool.h:209
InDet::InDetTrackSelectionTool::m_minNInnermostLayerHits
Int_t m_minNInnermostLayerHits
Minimum number of innermost pixel layer hits.
Definition: InDetTrackSelectionTool.h:151
InDet::InDetTrackSelectionTool::m_maxNInnermostLayerSharedHits
Int_t m_maxNInnermostLayerSharedHits
Maximum number of shared innermost pixel layer hits.
Definition: InDetTrackSelectionTool.h:154
InDet::InDetTrackSelectionTool::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Get an object describing the "selection steps" of the tool.
Definition: InDetTrackSelectionTool.cxx:1127
InDetAccessor::z0
@ z0
Definition: InDetAccessor.h:32
Check.h
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
InDet::InDetTrackSelectionTool::m_warnInit
std::atomic_bool m_warnInit
Definition: InDetTrackSelectionTool.h:108
xAOD::numberOfSCTSharedHits
@ numberOfSCTSharedHits
number of SCT hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:272
InDet::InDetTrackSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *) const override
Get the decision using a generic IParticle pointer.
Definition: InDetTrackSelectionTool.cxx:1144
InDet::InDetTrackSelectionTool::m_cutLevel
std::string m_cutLevel
The string version of the cut level so that it can be set via jobOptions.
Definition: InDetTrackSelectionTool.h:228
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
InDet::InDetTrackSelectionTool::maxDoubleIsSet
static bool maxDoubleIsSet(Double_t cutValue)
Definition: InDetTrackSelectionTool.h:135
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::InDetTrackSelectionTool::m_trkTrackCuts
std::map< std::string, std::vector< std::function< bool(InDetAccessor::TrkTrackHelper helper, const asg::AsgMessaging &msgHelper)> > > m_trkTrackCuts
First element is the name of the cut family, second element is the set of cuts.
Definition: InDetTrackSelectionTool.h:127
InDet::InDetTrackSelectionTool::m_useMinBiasInnermostLayersCut
Int_t m_useMinBiasInnermostLayersCut
Use the Minimum-Bias definition of the IBL/BL cut.
Definition: InDetTrackSelectionTool.h:155
InDet::InDetTrackSelectionTool::m_minNSiHitsPhysical
Int_t m_minNSiHitsPhysical
Minimum number of physical (pixel + SCT) hits (no dead sensors)
Definition: InDetTrackSelectionTool.h:168
python.App.bins
bins
Definition: App.py:410
InDet::InDetTrackSelectionTool::m_minPt
Double_t m_minPt
Minimum p_T of tracks.
Definition: InDetTrackSelectionTool.h:140
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
InDet::InDetTrackSelectionTool::m_maxTrtEtaAcceptance
Double_t m_maxTrtEtaAcceptance
Pseudorapidity below which TRT hit cuts will not be applied.
Definition: InDetTrackSelectionTool.h:175
InDet::InDetTrackSelectionTool::m_maxNPixelHoles
Int_t m_maxNPixelHoles
Maximum number of pixel layers without a hit.
Definition: InDetTrackSelectionTool.h:162
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDet::InDetTrackSelectionTool::m_maxNSctHoles
Int_t m_maxNSctHoles
Maximum number of holes in SCT.
Definition: InDetTrackSelectionTool.h:173
InDet::InDetTrackSelectionTool::m_maxZ0SinTheta
Double_t m_maxZ0SinTheta
Maximum |z0*sin(theta)| of tracks.
Definition: InDetTrackSelectionTool.h:142
xAOD::numberOfTRTXenonHits
@ numberOfTRTXenonHits
number of TRT hits on track in straws with xenon [unit8_t].
Definition: TrackingPrimitives.h:284
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
InDet::InDetTrackSelectionTool::m_minNTrtHitsPlusOutliers
Int_t m_minNTrtHitsPlusOutliers
Minimum number of TRT hits plus outliers.
Definition: InDetTrackSelectionTool.h:178
InDetAccessor::getSummarySum
uint8_t getSummarySum(const T_TrkHelper helper, const asg::AsgMessaging &msgHelper, std::array< xAOD::SummaryType, n_summary_types > sumTypes)
Definition: InDetAccessor.h:145
InDet::InDetTrackSelectionTool::m_minNSiHitsIfSiSharedHits
Int_t m_minNSiHitsIfSiSharedHits
Minimum number of silicon hits if the track has shared hits.
Definition: InDetTrackSelectionTool.h:158
InDet::InDetTrackSelectionTool::m_vecPtCutoffsForSctHitsCut
std::vector< Double_t > m_vecPtCutoffsForSctHitsCut
Above each of these pT levels a new SCT hits + dead sensors will be applied.
Definition: InDetTrackSelectionTool.h:204
asg
Definition: DataHandleTestTool.h:28
test_pyathena.pt
pt
Definition: test_pyathena.py:11
InDet::InDetTrackSelectionTool::initialize
virtual StatusCode initialize() override
Function initialising the tool.
Definition: InDetTrackSelectionTool.cxx:241
InDetAccessor::TrackParticleHelper
Definition: InDetAccessor.h:50
InDetAccessor::getSiHitsTopBottom
std::tuple< uint8_t, uint8_t > getSiHitsTopBottom(const Trk::Track &track, const asg::AsgMessaging &msgHelper)
Definition: InDetAccessor.cxx:11
athena.value
value
Definition: athena.py:122
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
asg::AcceptInfo::getCutPosition
unsigned int getCutPosition(const std::string &cutName) const
Get the bit position of a cut.
Definition: AcceptInfo.h:73
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
InDet::InDetTrackSelectionTool::m_minProbAbovePtCutoff
Double_t m_minProbAbovePtCutoff
Minimum probability above Pt cutoff.
Definition: InDetTrackSelectionTool.h:188
InDet::InDetTrackSelectionTool::m_minPtForProbCut
Double_t m_minPtForProbCut
Pt above which a Prob(chiSq, ndf) cut is applied.
Definition: InDetTrackSelectionTool.h:187
InDet::InDetTrackSelectionTool::m_minNSiHitsModBottom
Int_t m_minNSiHitsModBottom
Min number of Si hits on bottom half (pixel counting twice)
Definition: InDetTrackSelectionTool.h:197
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
InDet::InDetTrackSelectionTool::s_mapCutLevel
static const std::unordered_map< std::string, CutLevel > s_mapCutLevel
Definition: InDetTrackSelectionTool.h:231
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
InDet::InDetTrackSelectionTool::setupCuts
StatusCode setupCuts(std::map< std::string, std::vector< std::function< bool(Trk_Helper helper, const asg::AsgMessaging &msgHelper)> > > &trackCuts)
Definition: InDetTrackSelectionTool.cxx:318
InDet::InDetTrackSelectionTool::m_maxChiSq
Double_t m_maxChiSq
Maximum fit chi squared.
Definition: InDetTrackSelectionTool.h:184
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
InDet::InDetTrackSelectionTool::m_mutex
std::mutex m_mutex
Definition: InDetTrackSelectionTool.h:133
InDet::InDetTrackSelectionTool::m_maxNSiSharedHits
Int_t m_maxNSiSharedHits
Maximum number of silicon sensors shared with other track.
Definition: InDetTrackSelectionTool.h:157
InDet::InDetTrackSelectionTool::m_minNPixelHitsPhysical
Int_t m_minNPixelHitsPhysical
Minimum number of physical pixel hits (no dead sensors)
Definition: InDetTrackSelectionTool.h:169
ParamDefs.h
InDet::InDetTrackSelectionTool::m_maxD0
Double_t m_maxD0
Maximum |d0| of tracks.
Definition: InDetTrackSelectionTool.h:144
InDet::InDetTrackSelectionTool::m_maxTrtHighEFraction
Double_t m_maxTrtHighEFraction
Maximum fraction of TRT hits that are high threshold.
Definition: InDetTrackSelectionTool.h:181
xAOD::numberOfTRTHighThresholdHits
@ numberOfTRTHighThresholdHits
number of TRT hits which pass the high threshold (only xenon counted) [unit8_t].
Definition: TrackingPrimitives.h:278
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
InDet::InDetTrackSelectionTool::m_minNOverflowHitsdEdx
Int_t m_minNOverflowHitsdEdx
Minimum number of IBL overflow hits for dEdx.
Definition: InDetTrackSelectionTool.h:190
InDet::InDetTrackSelectionTool::maxIntIsSet
static bool maxIntIsSet(Int_t cutValue)
Definition: InDetTrackSelectionTool.h:136
InDetAccessor::d0
@ d0
Definition: InDetAccessor.h:31
Track.h
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForZ0SinThetaCut
std::vector< Double_t > m_vecEtaCutoffsForZ0SinThetaCut
Above each of these eta levels a new z0*sin(theta) cut will be applied.
Definition: InDetTrackSelectionTool.h:207
InDet::InDetTrackSelectionTool::m_minEtaForStrictNSiHitsCut
Double_t m_minEtaForStrictNSiHitsCut
Eta cutoff above which a tighter cut on NSiHits applies.
Definition: InDetTrackSelectionTool.h:163
InDetAccessor.h
InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForPtCut
std::vector< Double_t > m_vecEtaCutoffsForPtCut
Above each of these eta levels a new pT cut will be applied
Definition: InDetTrackSelectionTool.h:201
InDet::InDetTrackSelectionTool::m_minProb
Double_t m_minProb
Minimum fit probability.
Definition: InDetTrackSelectionTool.h:186
xAOD::numberOfTRTHighThresholdOutliers
@ numberOfTRTHighThresholdOutliers
number of TRT high threshold outliers (only xenon counted) [unit8_t].
Definition: TrackingPrimitives.h:281
InDetAccessor::getEProbabilityHT
float getEProbabilityHT(const Trk_Helper &helper, const asg::AsgMessaging &msgHelper)
InDet::InDetTrackSelectionTool::m_maxTrtOutlierFraction
Double_t m_maxTrtOutlierFraction
Maximum fraction of TRT outliers over TRT hits + outliers.
Definition: InDetTrackSelectionTool.h:183
InDet::InDetTrackSelectionTool::setCutLevelPrivate
void setCutLevelPrivate(InDet::CutLevel level, Bool_t overwrite=true)
Definition: InDetTrackSelectionTool.cxx:1304
xAOD::numberOfPixelSharedHits
@ numberOfPixelSharedHits
number of Pixel all-layer hits shared by several tracks [unit8_t].
Definition: TrackingPrimitives.h:262
InDet::InDetTrackSelectionTool::m_initTrkTools
Bool_t m_initTrkTools
Whether to initialize the Trk::Track tools.
Definition: InDetTrackSelectionTool.h:234
InDet::InDetTrackSelectionTool::m_minNTrtHighThresholdHits
Int_t m_minNTrtHighThresholdHits
Minimum number of high E TRT hits.
Definition: InDetTrackSelectionTool.h:179
InDet::InDetTrackSelectionTool::m_minNBothInnermostLayersHits
Int_t m_minNBothInnermostLayersHits
Minimum number of two innermost pixel layer hits.
Definition: InDetTrackSelectionTool.h:153
InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForSctHitsPlusDeadCut
std::vector< Double_t > m_vecEtaCutoffsForSctHitsPlusDeadCut
Above each of these eta levels a new SCT hits cut will be applied.
Definition: InDetTrackSelectionTool.h:219
InDet::InDetTrackSelectionTool::m_minP
Double_t m_minP
Minimum p = p_T/cos(theta)
Definition: InDetTrackSelectionTool.h:167
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::expectNextToInnermostPixelLayerHit
@ expectNextToInnermostPixelLayerHit
Do we expect a 1st-layer barrel hit for this track?
Definition: TrackingPrimitives.h:247
InDetAccessor::getFitChiSquare
double getFitChiSquare(const Trk_Helper &helper, const asg::AsgMessaging &msgHelper)
asg::AcceptInfo
Definition: AcceptInfo.h:28
InDet::InDetTrackSelectionTool::m_maxNSctSharedHits
Int_t m_maxNSctSharedHits
Maximum number of SCT sensors shared with another track.
Definition: InDetTrackSelectionTool.h:172
InDet::InDetTrackSelectionTool::m_vecMinPtAboveEta
std::vector< Double_t > m_vecMinPtAboveEta
the minimum transverse momentum above each eta level
Definition: InDetTrackSelectionTool.h:202
sqr
#define sqr(t)
Definition: PolygonTriangulator.cxx:110
InDet::InDetTrackSelectionTool::m_minNSiHitsModTop
Int_t m_minNSiHitsModTop
Min number of Si hits on top half (pixel counting twice)
Definition: InDetTrackSelectionTool.h:196
InDet::InDetTrackSelectionTool::m_maxSigmaZ0
Double_t m_maxSigmaZ0
Maximum sigma of z0.
Definition: InDetTrackSelectionTool.h:146
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
InDet::InDetTrackSelectionTool::LOCAL_MAX_DOUBLE
constexpr static Double_t LOCAL_MAX_DOUBLE
Definition: InDetTrackSelectionTool.h:137
InDet::InDetTrackSelectionTool::m_maxEtaForTrtHitCuts
Double_t m_maxEtaForTrtHitCuts
Pseudorapidity above which TRT hit cuts will not be applied.
Definition: InDetTrackSelectionTool.h:176
InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForD0Cut
std::vector< Double_t > m_vecEtaCutoffsForD0Cut
Above each of these eta levels a new d0 cut will be applied.
Definition: InDetTrackSelectionTool.h:211
InDet::InDetTrackSelectionTool::m_vecPtCutoffsForSctHitsPlusDeadCut
std::vector< Double_t > m_vecPtCutoffsForSctHitsPlusDeadCut
Above each of these pT levels a new SCT hits cut will be applied.
Definition: InDetTrackSelectionTool.h:220
BindingsTest.cut
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
Definition: BindingsTest.py:13
InDetTrackSelectionTool.h
InDet::InDetTrackSelectionTool::m_maxNSiHoles
Int_t m_maxNSiHoles
Maximum number of silicon sensors without a hit.
Definition: InDetTrackSelectionTool.h:159
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDet::InDetTrackSelectionTool::m_numTracksProcessed
std::atomic< ULong64_t > m_numTracksProcessed
a counter of the number of tracks proccessed
Definition: InDetTrackSelectionTool.h:130
InDet::InDetTrackSelectionTool::m_vecPtCutoffsForSctHolesCut
std::vector< Double_t > m_vecPtCutoffsForSctHolesCut
Above each of these pT levels a new SCT holes cut will be applied.
Definition: InDetTrackSelectionTool.h:216
TrackSummary.h
InDet::InDetTrackSelectionTool::m_maxZ0SinThetaoverSigmaZ0SinTheta
Double_t m_maxZ0SinThetaoverSigmaZ0SinTheta
Maximum |z0*sin(theta)|/sigma_z0sinTheta.
Definition: InDetTrackSelectionTool.h:150
Trk::ParametersBase
Definition: ParametersBase.h:55
InDet::InDetTrackSelectionTool::m_maxNSctDoubleHoles
Int_t m_maxNSctDoubleHoles
Maximum number of double holes in SCT.
Definition: InDetTrackSelectionTool.h:174
InDet::InDetTrackSelectionTool::m_minNSiHitsAboveEtaCutoff
Int_t m_minNSiHitsAboveEtaCutoff
Tighter cut on NSiHits above a certain eta.
Definition: InDetTrackSelectionTool.h:164
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
InDet::InDetTrackSelectionTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Extrapolator tool.
Definition: InDetTrackSelectionTool.h:237
xAOD::numberOfSCTHoles
@ numberOfSCTHoles
number of SCT holes [unit8_t].
Definition: TrackingPrimitives.h:270
InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForSiHitsCut
std::vector< Double_t > m_vecEtaCutoffsForSiHitsCut
Above each of these eta levels a new SCT hits + pix hits will be applied.
Definition: InDetTrackSelectionTool.h:199
InDet::InDetTrackSelectionTool::m_numTracksPassed
std::atomic< ULong64_t > m_numTracksPassed
a counter of the number of tracks that passed all cuts
Definition: InDetTrackSelectionTool.h:131
InDet::InDetTrackSelectionTool::m_useExperimentalInnermostLayersCut
Int_t m_useExperimentalInnermostLayersCut
use (NPixHoles == 0) but allow 1 hole if a BLayer hit is expected but not present
Definition: InDetTrackSelectionTool.h:193
InDetAccessor::getNumberOfUsedHitsdEdx
Int_t getNumberOfUsedHitsdEdx(Trk_Helper &helper, const asg::AsgMessaging &msgHelper)
InDet::InDetTrackSelectionTool::m_minNSiHitsMod
Int_t m_minNSiHitsMod
Minimum number of Si hits, with pixel hits counting twice.
Definition: InDetTrackSelectionTool.h:195
InDet::InDetTrackSelectionTool::m_isInitialized
bool m_isInitialized
Definition: InDetTrackSelectionTool.h:107
InDet::InDetTrackSelectionTool::setCutLevel
virtual void setCutLevel(InDet::CutLevel level, Bool_t overwrite=true) override __attribute__((deprecated("For consistency with the athena interface
Function to set the cut level within standalone ROOT.
Definition: InDetTrackSelectionTool.cxx:1289
InDet::InDetTrackSelectionTool::m_maxChiSqperNdf
Double_t m_maxChiSqperNdf
Maximum chi squared per degree of freedom.
Definition: InDetTrackSelectionTool.h:185
InDet::InDetTrackSelectionTool::m_vecvecMinSctHitsPlusDeadAboveEtaPt
std::vector< std::vector< Double_t > > m_vecvecMinSctHitsPlusDeadAboveEtaPt
Minimum numbers of SCT hits plus dead sensors above each eta-pT level.
Definition: InDetTrackSelectionTool.h:221
InDet::InDetTrackSelectionTool::m_maxTrtHighEFractionWithOutliers
Double_t m_maxTrtHighEFractionWithOutliers
Maximum fraction of TRT hits that are high threshold, including outliers.
Definition: InDetTrackSelectionTool.h:182
xAOD::numberOfNextToInnermostPixelLayerHits
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
Definition: TrackingPrimitives.h:248
InDetAccessor::getFitNDoF
double getFitNDoF(const TrkHelper &helper, const asg::AsgMessaging &msgHelper)
InDet::InDetTrackSelectionTool::finalize
virtual StatusCode finalize() override
Function finalizing the tool.
Definition: InDetTrackSelectionTool.cxx:1096
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
InDet::InDetTrackSelectionTool::LOCAL_MAX_INT
constexpr static Int_t LOCAL_MAX_INT
Definition: InDetTrackSelectionTool.h:138
InDetAccessor::getNumberOfIBLOverflowsdEdx
Int_t getNumberOfIBLOverflowsdEdx(Trk_Helper &helper, const asg::AsgMessaging &msgHelper)
pmontree.opt
opt
Definition: pmontree.py:16
InDet::InDetTrackSelectionTool::m_maxZ0overSigmaZ0
Double_t m_maxZ0overSigmaZ0
Maximum |z0|/sigma_z0 of tracks.
Definition: InDetTrackSelectionTool.h:149
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
Ringer::NoCut
@ NoCut
Definition: RingerSelectorToolsEnums.h:121
InDet::InDetTrackSelectionTool::m_maxSigmaZ0SinTheta
Double_t m_maxSigmaZ0SinTheta
Maximum sigma of z0*sin(theta)
Definition: InDetTrackSelectionTool.h:147
Vertex.h
InDetAccessor::getDefiningParametersCov
double getDefiningParametersCov(Trk_Helper &helper, [[maybe_unused]] const asg::AsgMessaging &msgHelper, unsigned int index_i, unsigned int index_j)
InDet::InDetTrackSelectionTool::m_useEtaDependentMaxChiSq
Bool_t m_useEtaDependentMaxChiSq
Flag whether we use the eta-dependent chi^2/dof cut.
Definition: InDetTrackSelectionTool.h:166
InDetAccessor::theta
@ theta
Definition: InDetAccessor.h:34
xAOD::numberOfTRTOutliers
@ numberOfTRTOutliers
number of TRT outliers [unit8_t].
Definition: TrackingPrimitives.h:276
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
asg::AcceptData::setCutResult
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
Definition: AcceptData.h:134
InDet::InDetTrackSelectionTool::m_minNSiHits
Int_t m_minNSiHits
Minimum number of silicon hits (pixel + SCT)
Definition: InDetTrackSelectionTool.h:156
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
InDet::InDetTrackSelectionTool::m_minNPixelHits
Int_t m_minNPixelHits
Minimum number of pixel hits.
Definition: InDetTrackSelectionTool.h:160
InDet::InDetTrackSelectionTool::m_msgHelper
std::unique_ptr< asg::AsgMessaging > m_msgHelper
Definition: InDetTrackSelectionTool.h:122
InDet::InDetTrackSelectionTool::m_minNTrtHighThresholdHitsPlusOutliers
Int_t m_minNTrtHighThresholdHitsPlusOutliers
Minimum number of high E TRT hits including outliers.
Definition: InDetTrackSelectionTool.h:180
InDetAccessor::TrkTrackHelper
Definition: InDetAccessor.h:71
InDet::InDetTrackSelectionTool::m_maxNPixelSharedHits
Int_t m_maxNPixelSharedHits
Maximum number of pixels shared with other track.
Definition: InDetTrackSelectionTool.h:161
asg::AcceptData::getCutResult
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
Definition: AcceptData.h:98
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
InDet::InDetTrackSelectionTool::m_vecvecMaxD0AboveEtaPt
std::vector< std::vector< Double_t > > m_vecvecMaxD0AboveEtaPt
Maximum values of d0 above each eta-pT level.
Definition: InDetTrackSelectionTool.h:213
InDet::InDetTrackSelectionTool::m_vecMinNSctHitsAbovePt
std::vector< Int_t > m_vecMinNSctHitsAbovePt
the minimum SCT hits above each pt level
Definition: InDetTrackSelectionTool.h:205
InDet::InDetTrackSelectionTool::m_minNSctHitsPhysical
Int_t m_minNSctHitsPhysical
Minimum number of physical SCT hits (no dead sensors)
Definition: InDetTrackSelectionTool.h:170
InDet::InDetTrackSelectionTool::m_acceptInfo
asg::AcceptInfo m_acceptInfo
Object used to store the last decision.
Definition: InDetTrackSelectionTool.h:224
InDet::InDetTrackSelectionTool::m_vecPtCutoffsForD0Cut
std::vector< Double_t > m_vecPtCutoffsForD0Cut
Above each of these pT levels a new d0 cut will be applied.
Definition: InDetTrackSelectionTool.h:212
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
TauGNNUtils::Variables::absEta
bool absEta(const xAOD::TauJet &tau, double &out)
Definition: TauGNNUtils.cxx:232
xAOD::numberOfInnermostPixelLayerSharedHits
@ numberOfInnermostPixelLayerSharedHits
number of Pixel 0th layer barrel hits shared by several tracks.
Definition: TrackingPrimitives.h:239
InDet::InDetTrackSelectionTool::m_vecEtaCutoffsForSctHolesCut
std::vector< Double_t > m_vecEtaCutoffsForSctHolesCut
Above each of these eta levels a new SCT holes cut will be applied.
Definition: InDetTrackSelectionTool.h:215
InDet::InDetTrackSelectionTool::m_maxD0overSigmaD0
Double_t m_maxD0overSigmaD0
Maximum |d0|/sigma_d0 of tracks.
Definition: InDetTrackSelectionTool.h:148
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
PhysDESDM_SmpMs.cutString
string cutString
Definition: PhysDESDM_SmpMs.py:51
xAOD::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of dead pixel sensors crossed [unit8_t].
Definition: TrackingPrimitives.h:266
top
@ top
Definition: TruthClasses.h:64
InDet::InDetTrackSelectionTool::m_vecvecMaxSctHolesAboveEtaPt
std::vector< std::vector< Double_t > > m_vecvecMaxSctHolesAboveEtaPt
Maximum numbers of SCT holes above each eta-pT level.
Definition: InDetTrackSelectionTool.h:217
InDet::InDetTrackSelectionTool::m_maxOneSharedModule
Bool_t m_maxOneSharedModule
Flag whether to reject if more than one of 1 shared pixel hit or 2 shared SCT hits.
Definition: InDetTrackSelectionTool.h:165
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
calibdata.copy
bool copy
Definition: calibdata.py:27
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
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
FitQuality.h
InDet::InDetTrackSelectionTool::m_vecPtCutoffsForZ0SinThetaCut
std::vector< Double_t > m_vecPtCutoffsForZ0SinThetaCut
Above each of these pT levels a new z0*sin(theta) cut will be applied.
Definition: InDetTrackSelectionTool.h:208
InDet::InDetTrackSelectionTool::m_maxAbsEta
Double_t m_maxAbsEta
Maximum magnitude of pseudorapidity.
Definition: InDetTrackSelectionTool.h:141
InDet::InDetTrackSelectionTool::m_eProbHTonlyForXe
Bool_t m_eProbHTonlyForXe
Flag whether to only check eProbabilityHT if all TRT hits are Xenon hits.
Definition: InDetTrackSelectionTool.h:191
asg::AcceptData
Definition: AcceptData.h:30
InDet::InDetTrackSelectionTool::m_maxSigmaD0
Double_t m_maxSigmaD0
Maximum sigma of d0.
Definition: InDetTrackSelectionTool.h:145
InDet::InDetTrackSelectionTool::m_minNUsedHitsdEdx
Int_t m_minNUsedHitsdEdx
Minimum number of dEdx hits used.
Definition: InDetTrackSelectionTool.h:189
asg::AsgTool::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: AsgTool.h:133
TrackingPrimitives.h
InDet::InDetTrackSelectionTool::m_trackParticleCuts
std::map< std::string, std::vector< std::function< bool(InDetAccessor::TrackParticleHelper helper, const asg::AsgMessaging &msgHelper)> > > m_trackParticleCuts
First element is the name of the cut family, second element is the set of cuts.
Definition: InDetTrackSelectionTool.h:124
InDet::InDetTrackSelectionTool::m_maxZ0
Double_t m_maxZ0
Maximum |z0| of tracks.
Definition: InDetTrackSelectionTool.h:143
InDet::InDetTrackSelectionTool::m_minEProbabilityHT
Double_t m_minEProbabilityHT
Minimum eProbabiltyHT.
Definition: InDetTrackSelectionTool.h:192
InDet::InDetTrackSelectionTool::m_minNNextToInnermostLayerHits
Int_t m_minNNextToInnermostLayerHits
Minimum number of next to innermost pixel layer hits.
Definition: InDetTrackSelectionTool.h:152
xAOD::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
Definition: TrackingPrimitives.h:237
InDet::CutLevel
CutLevel
Definition: IInDetTrackSelectionTool.h:40
asg::AcceptInfo::addCut
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.
Definition: AcceptInfo.h:53
InDet::InDetTrackSelectionTool::m_minNTrtHits
Int_t m_minNTrtHits
Minimum number of TRT hits.
Definition: InDetTrackSelectionTool.h:177
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65
InDet::InDetTrackSelectionTool::m_vecMinNSiHitsAboveEta
std::vector< Int_t > m_vecMinNSiHitsAboveEta
the minimum Si hits above each eta level
Definition: InDetTrackSelectionTool.h:200