ATLAS Offline Software
InDetPhysValMonitoringTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 #include "GaudiKernel/SystemOfUnits.h"
11 
14 #include "InDetRttPlots.h"
15 #include "InDetPerfPlot_nTracks.h"
16 #include "AthTruthSelectionTool.h"
17 #include "CachedGetAssocTruth.h"
18 
19 #include "safeDecorator.h"
20 // #include "TrackTruthLookup.h"
21 //
28 #include "xAODTruth/TruthVertex.h"
32 
34 //
35 #include <algorithm>
36 #include <limits>
37 #include <cmath> // to get std::isnan(), std::abs etc.
38 // #include <functional> // to get std::plus
39 #include <utility>
40 #include <cstdlib> // to getenv
41 #include <vector>
42 
44 
45 namespace { // utility functions used here
46 
47  // get truth/track matching probability
48  float
49  getMatchingProbability(const xAOD::TrackParticle& trackParticle) {
50  float result(std::numeric_limits<float>::quiet_NaN());
51 
52  static const SG::ConstAccessor<float> truthMatchProbabilityAcc("truthMatchProbability");
53  if (truthMatchProbabilityAcc.isAvailable(trackParticle)) {
54  result = truthMatchProbabilityAcc(trackParticle);
55  }
56  return result;
57  }
58 
59  template <class T>
60  inline float
61  safelyGetEta(const T& pTrk, const float safePtThreshold = 0.1) {
62  return (pTrk->pt() > safePtThreshold) ? (pTrk->eta()) : std::nan("");
63  }
64 
65  // general utility function to check value is in range
66  template <class T>
67  inline bool
68  inRange(const T& value, const T& minVal, const T& maxVal) {
69  return not ((value < minVal)or(value > maxVal));
70  }
71 
72  template<class T>
73  inline bool
74  inRange(const T& value, const T& absoluteMax) {
75  return not (std::abs(value) > absoluteMax);
76  }
77 
78  // Cuts on various objects
79 
80  // general utility function to return bin index given a value and the upper endpoints of each bin
81  template <class T>
82  unsigned int
83  binIndex(const T& val, const std::vector<T>& partitions) {// signature should allow other containers
84  unsigned int i(0);
85  bool nf = true;
86 
87  while (nf and i != partitions.size()) {
88  nf = (val > partitions[i++]);
89  }
90  return nf ? i : i - 1;
91  }
92 
93  bool
94  acceptTruthVertex(const xAOD::TruthVertex* vtx) {
95  const float x(vtx->x()), y(vtx->y()), z(vtx->z());
96  const float vrtR2 = (x * x + y * y); // radial distance squared
97 
98  return inRange(z, 500.f) and not (vrtR2 > 1); // units?
99  }
100 
101  const std::vector<float> ETA_PARTITIONS = {
102  2.7, 3.5, std::numeric_limits<float>::infinity()
103  };
104 
105 }// namespace
106 
108 InDetPhysValMonitoringTool::InDetPhysValMonitoringTool(const std::string& type, const std::string& name,
109  const IInterface* parent) :
111 }
112 
114 
118  // Get the track selector tool only if m_useTrackSelection is true;
119  // first check for consistency i.e. that there is a trackSelectionTool if you ask
120  // for trackSelection
121  ATH_CHECK(m_trackSelectionTool.retrieve(EnableTool {m_useTrackSelection} ));
122  ATH_CHECK(m_truthSelectionTool.retrieve(EnableTool {not m_truthParticleName.key().empty()} ));
123  ATH_CHECK(m_vtxValidTool.retrieve(EnableTool {m_useVertexTruthMatchTool}));
124  ATH_CHECK(m_trackTruthOriginTool.retrieve( EnableTool {m_doTruthOriginPlots} ));
126  ATH_CHECK(m_grlTool.retrieve(EnableTool{m_useGRL}));
127 
128  ATH_MSG_DEBUG("m_useVertexTruthMatchTool ====== " <<m_useVertexTruthMatchTool);
129  if (m_truthSelectionTool.get() ) {
130  m_truthCutFlow = CutFlow(m_truthSelectionTool->nCuts());
131  }
132 
133  m_monPlots = std::make_unique<InDetRttPlots>
134  (nullptr, static_cast<std::string>(m_dirName) + static_cast<std::string>(m_folder),
135  getFilledPlotConfig()); // m_detailLevel := DEBUG, enable expert histograms
136 
138  ATH_CHECK( m_truthParticleName.initialize( (m_pileupSwitch == "HardScatter" or m_pileupSwitch == "All") and not m_truthParticleName.key().empty() ) );
139  ATH_CHECK( m_vertexContainerName.initialize( not m_vertexContainerName.empty() ) );
140  ATH_CHECK( m_truthVertexContainerName.initialize( not m_truthVertexContainerName.key().empty() ) );
142 
143  ATH_CHECK( m_truthEventName.initialize( (m_pileupSwitch == "HardScatter" or m_pileupSwitch == "All") and not m_truthEventName.key().empty() ) );
144  ATH_CHECK( m_truthPileUpEventName.initialize( (m_pileupSwitch == "PileUp" or m_pileupSwitch == "All") and not m_truthPileUpEventName.key().empty() ) );
145  ATH_CHECK( m_jetContainerName.initialize( m_doTrackInJetPlots and not m_jetContainerName.key().empty()) );
146 
147  std::vector<std::string> required_float_track_decorations {"d0","hitResiduals_residualLocX","d0err"};
148  std::vector<std::string> required_int_track_decorations {};
149  std::vector<std::string> required_float_truth_decorations {"d0"};
150  std::vector<std::string> required_int_truth_decorations {};
151  std::vector<std::string> required_int_jet_decorations {"HadronConeExclTruthLabelID"};
152 
153  std::string empty_prefix;
154  IDPVM::addReadDecoratorHandleKeys(*this, m_trkParticleName, empty_prefix, required_float_track_decorations, m_floatTrkDecor);
155  IDPVM::addReadDecoratorHandleKeys(*this, m_trkParticleName, empty_prefix, required_int_truth_decorations, m_intTrkDecor);
156  if (!m_truthParticleName.key().empty()) {
157  IDPVM::addReadDecoratorHandleKeys(*this, m_truthParticleName, empty_prefix, required_float_truth_decorations, m_floatTruthDecor);
158  IDPVM::addReadDecoratorHandleKeys(*this, m_truthParticleName, empty_prefix, required_int_truth_decorations, m_intTruthDecor);
159  }
161  IDPVM::addReadDecoratorHandleKeys(*this, m_jetContainerName, empty_prefix, required_int_jet_decorations, m_intJetDecor);
162  }
163 
165 
167  return StatusCode::SUCCESS;
168 }
169 
170 
172 
173 
174  InDetRttPlotConfig rttConfig;
175  rttConfig.detailLevel = m_detailLevel;
176 
181 
183  rttConfig.doHitEffPlot = m_doHitLevelPlots;
184 
189 
192 
194 
199 
201 
203 
205  if (m_truthParticleName.key().empty()){
206  rttConfig.doFakePlots = false;
207  rttConfig.doMissingTruthFakePlots = false;
208  rttConfig.doHitsFakeTracksPlots = false;
209  rttConfig.doHitsUnlinkedTracksPlots = false;
210  rttConfig.doEffPlots = false;
211  rttConfig.doResolutionPlotPrim = false;
212  rttConfig.doResolutionPlotPrim_truthFromB = false;
213  rttConfig.doResolutionPlotSecd = false;
214  rttConfig.doHitsMatchedTracksPlots = false;
215  rttConfig.doVertexTruthMatchingPlots = false;
216  rttConfig.doHardScatterVertexTruthMatchingPlots = false;
217  rttConfig.doEfficienciesPerAuthor = false;
218  rttConfig.doFakesPerAuthor = false;
219  rttConfig.doResolutionsPerAuthor = false;
220  rttConfig.doNtupleTruthToReco = false;
221  rttConfig.doTrkInJetPlots_fake_bjets = false;
222  rttConfig.doTrkInJetPlots_matched_bjets = false;
223  rttConfig.doTrkInJetPlots_unlinked_bjets = false;
224  rttConfig.doTrkInJetPlots_truthFromB = false;
225  rttConfig.doResolutionPlotPrim_truthFromB = false;
226  }
227 
229  if (m_onlyFillMatched){
230  rttConfig.doTrackParameters = false;
231  rttConfig.doNTracks = false;
232  rttConfig.doHitResidualPlot = false;
233  rttConfig.doHitEffPlot = false;
234  rttConfig.doHitsRecoTracksPlots = false;
235  rttConfig.doTrtExtensionPlots = false;
236  rttConfig.doFakePlots = false;
237  rttConfig.doMissingTruthFakePlots = false;
238  rttConfig.doHitsFakeTracksPlots = false;
239  rttConfig.doHitsUnlinkedTracksPlots = false;
240  rttConfig.doVertexPlots = false;
241  rttConfig.doVerticesVsMuPlots = false;
242  rttConfig.doHardScatterVertexPlots = false;
243  rttConfig.doVertexTruthMatchingPlots = false;
244  rttConfig.doHardScatterVertexTruthMatchingPlots = false;
245  rttConfig.doTrkInJetPlots = false;
246  rttConfig.doTrkInJetPlots_bjets = false;
247  rttConfig.doTrkInJetPlots_matched = false;
248  rttConfig.doTrkInJetPlots_matched_bjets = false;
249  rttConfig.doTrkInJetPlots_fake = false;
250  rttConfig.doTrkInJetPlots_fake_bjets = false;
251  rttConfig.doTrkInJetPlots_unlinked = false;
252  rttConfig.doTrkInJetPlots_unlinked_bjets = false;
253  rttConfig.doTrkInJetPlots_truthFromB = false;
254  }
255 
256  // For IDTIDE derivation
257  // disable the vertex plots since no covariance from IDTIDE
258  if (m_doIDTIDEPlots){
259  rttConfig.doVertexPlots = false;
260  rttConfig.doVerticesVsMuPlots = false;
261  rttConfig.doHardScatterVertexPlots = false;
262  rttConfig.doVertexTruthMatchingPlots = false;
263  rttConfig.doHardScatterVertexTruthMatchingPlots = false;
264  rttConfig.doTrkInJetPlots = true;
265  rttConfig.doTrkInJetPlots_bjets = true;
266  rttConfig.doTrkInJetPlots_matched = true;
267  rttConfig.doTrkInJetPlots_matched_bjets = true;
268  rttConfig.doTrkInJetPlots_fake = true;
269  rttConfig.doTrkInJetPlots_fake_bjets = true;
270  rttConfig.doTrkInJetPlots_unlinked = true;
271  rttConfig.doTrkInJetPlots_unlinked_bjets = true;
272  rttConfig.doTrkInJetPlots_truthFromB = true;
273  }
274 
276  if (m_detailLevel < 200){
277  rttConfig.doResolutionPlotSecd = false;
278  rttConfig.doHitsMatchedTracksPlots = false;
279  rttConfig.doHitsFakeTracksPlots = false;
280  rttConfig.doHitsUnlinkedTracksPlots = false;
281  rttConfig.doVertexTruthMatchingPlots = false;
282  rttConfig.doFakesPerAuthor = false;
283  rttConfig.doTrackParametersPerAuthor = false;
284  rttConfig.doEfficienciesPerAuthor = false;
285  rttConfig.doResolutionsPerAuthor = false;
286  rttConfig.doTrkInJetPlots_matched = false;
287  rttConfig.doTrkInJetPlots_fake = false;
288  rttConfig.doTrkInJetPlots_unlinked = false;
289  rttConfig.doTrkInJetPlots_matched_bjets = false;
290  rttConfig.doTrkInJetPlots_fake_bjets = false;
291  rttConfig.doTrkInJetPlots_unlinked_bjets = false;
292  }
293 
294  return rttConfig;
295 }
296 
299  ATH_MSG_DEBUG("Filling hists " << name() << "...");
300  // function object could be used to retrieve truth: IDPVM::CachedGetAssocTruth getTruth;
301 
302  // Get the Event Context
303  const EventContext& ctx = Gaudi::Hive::currentContext();
304 
305  // retrieve trackParticle container
307  if (not trackHandle.isValid()) {
308  ATH_MSG_ERROR("Invalid trackname = " << m_trkParticleName << "!");
309  return StatusCode::FAILURE;
310  }
311  const xAOD::TrackParticleContainer* tracks = trackHandle.cptr();
312 
313  SG::ReadHandle<xAOD::TruthPileupEventContainer> truthPileupEventContainer;
314  if( not m_truthPileUpEventName.key().empty()) {
316  }
317 
319  if (not pie.isValid()){
320  ATH_MSG_WARNING("Shouldn't happen - EventInfo is buggy, setting mu to 0");
321  }
322 
323  // FIX-ME: I'm not sure if we should stop execution if EventInfo is not valid ...
324  // it is used after as if they assume it is valid
325  if (m_useGRL and pie.isValid() and !pie->eventType(xAOD::EventInfo::IS_SIMULATION)) {
326  if (!m_grlTool->passRunLB(*pie)) {
327  ATH_MSG_VERBOSE("GRL veto");
328  return StatusCode::SUCCESS;
329  }
330  }
331 
332  std::vector<const xAOD::TruthParticle*> truthParticlesVec = getTruthParticles(ctx);
333 
334  // Mark the truth particles in our vector as "selected".
335  // This is needed because we later access the truth matching via xAOD decorations, where we do not 'know' about membership to this vector.
337 
338  IDPVM::CachedGetAssocTruth getAsTruth; // only cache one way, track->truth, not truth->tracks
339 
340  unsigned int truthMu = 0;
341  float actualMu = 0.;
342  if(not m_truthPileUpEventName.key().empty() and truthPileupEventContainer.isValid()){
343  truthMu = static_cast<int>( truthPileupEventContainer->size() );
344  }
345  if(pie.isValid()) actualMu = pie->actualInteractionsPerCrossing();
346 
347  // This is questionable but kept for backward compatibility for now
348  float puEvents = truthMu>0 ? truthMu : actualMu;
349 
350  const xAOD::Vertex* primaryvertex = nullptr;
351  unsigned int nVertices = 0;
352  float beamSpotWeight = 1;
353 
354  if(not m_vertexContainerName.key().empty()){
355  ATH_MSG_DEBUG("Getting number of pu interactings per event");
356 
357  ATH_MSG_DEBUG("Filling vertex plots");
359  ATH_CHECK(vertices.isValid());
360 
361  nVertices = not vertices->empty() ? vertices->size() : 0;
362  beamSpotWeight = pie->beamSpotWeight();
363  ATH_MSG_DEBUG("beamSpotWeight is equal to " << beamSpotWeight);
364  if(m_doPRW){
365  float prwWeight = 1;
367  if(readDecorHandle.isAvailable()) prwWeight = readDecorHandle(*pie);
368  ATH_MSG_DEBUG("Applying pileup weight equal to " << prwWeight);
369  beamSpotWeight *= prwWeight;
370  }
371 
372  if (vertices.isValid() and not vertices->empty()) {
373  ATH_MSG_DEBUG("Number of vertices retrieved for this event " << vertices->size());
374  //Find the HS vertex following the user-configured strategy
375  primaryvertex = m_hardScatterSelectionTool->getHardScatter(vertices.get());
376  if (!primaryvertex){
379  ATH_MSG_DEBUG("Failed to find a hard scatter vertex in this event.");
380  }
381  //Filling plots for all reconstructed vertices and the hard-scatter
382  ATH_MSG_DEBUG("Filling vertices info monitoring plots");
383 
384  // Fill vectors of truth HS and PU vertices
385  std::pair<std::vector<const xAOD::TruthVertex*>, std::vector<const xAOD::TruthVertex*>> truthVertices = getTruthVertices(ctx);
386  std::vector<const xAOD::TruthVertex*> truthHSVertices = truthVertices.first;
387  std::vector<const xAOD::TruthVertex*> truthPUVertices = truthVertices.second;
388 
389  // Decorate vertices
391  ATH_CHECK(m_vtxValidTool->matchVertices(*vertices));
392  ATH_MSG_DEBUG("Hard scatter classification type: " << InDetVertexTruthMatchUtils::classifyHardScatter(*vertices) << ", vertex container size = " << vertices->size());
393  }
394  m_monPlots->fill(*vertices, primaryvertex, truthHSVertices, truthPUVertices, beamSpotWeight);
395 
396  ATH_MSG_DEBUG("Filling vertex/event info monitoring plots");
397  //Filling vertexing plots for the reconstructed hard-scatter as a function of mu
398  m_monPlots->fill(*vertices, truthMu, actualMu, beamSpotWeight);
399  } else {
400  //FIXME: Does this happen for single particles?
401  ATH_MSG_WARNING("Skipping vertexing plots.");
402  }
403  }
404 
405 
406  if( not m_truthVertexContainerName.key().empty()){
407  // get truth vertex container name - m_truthVertexContainerName
409 
410  //
411  //Get the HS vertex position from the truthVertexContainer
412  //FIXME: Add plots w.r.t truth HS positions (vertexing plots)
413  //
414  const xAOD::TruthVertex* truthVertex = nullptr;
415  if (truthVrt.isValid()) {
416  const auto& stdVertexContainer = truthVrt->stdcont();
417  //First truth particle vertex?
418  auto findVtx = std::find_if(stdVertexContainer.rbegin(), stdVertexContainer.rend(), acceptTruthVertex);
419  truthVertex = (findVtx == stdVertexContainer.rend()) ? nullptr : *findVtx;
420  } else {
421  ATH_MSG_WARNING("Cannot open " << m_truthVertexContainerName.key() << " truth vertex container");
422  }
423  if (not truthVertex) ATH_MSG_INFO ("Truth vertex did not pass cuts");
424  }
425  //
426  //Counters for cutflow
427  //
428  unsigned int nSelectedTruthTracks(0), nSelectedRecoTracks(0), nSelectedMatchedTracks(0), nAssociatedTruth(0), nMissingAssociatedTruth(0), nTruths(0);
429 
430  CutFlow tmp_truth_cutflow( m_truthSelectionTool.get() ? m_truthSelectionTool->nCuts() : 0 );
431 
432  //
433  //Loop over all reconstructed tracks
434  //
435  // If writing ntuples, use a truth-to-track(s) cache to handle truth matching.
436  // Based on the assumption that multiple tracks can (albeit rarely) share the same truth association.
437  std::map<const xAOD::TruthParticle*, std::vector<const xAOD::TrackParticle*>> cacheTruthMatching {};
438  //
439  std::vector<const xAOD::TrackParticle*> selectedTracks {};
440  selectedTracks.reserve(tracks->size());
441  unsigned int nTrackTOT = 0;
442  for (const auto *const thisTrack: *tracks) {
443  //FIXME: Why is this w.r.t the primary vertex?
444  const asg::AcceptData& accept = m_trackSelectionTool->accept(*thisTrack, primaryvertex);
445  if (m_useTrackSelection and not accept) continue;
446  fillTrackCutFlow(accept); //?? Is this equal???
447 
448  selectedTracks.push_back(thisTrack);
449  //Number of selected reco tracks
450  nSelectedRecoTracks++;
451 
452  //Fill plots for selected reco tracks, hits / perigee / ???
453  nTrackTOT++;
454  m_monPlots->fill(*thisTrack, beamSpotWeight);
455  m_monPlots->fill(*thisTrack, puEvents, nVertices, beamSpotWeight); //fill mu dependent plots
456  const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack);
457  float prob = getMatchingProbability(*thisTrack);
458 
459  // This is where the Fake, and Really Fake fillers need to go. Where would the really really fakes go?
460  if (associatedTruth) {
461  nAssociatedTruth++;
462 
463  // if there is associated truth also a truth selection tool was retrieved.
465  if (m_truthSelectionTool) {
466  //FIXME: What is this for???
467  tmp_truth_cutflow.update( passed.missingCuts() );
468  }
469 
470  if ((not std::isnan(prob)) and (prob > m_lowProb) and passed and (not m_usingSpecialPileupSwitch or isSelectedByPileupSwitch(*associatedTruth)) ) {
471  nSelectedMatchedTracks++;
472  bool truthIsFromB = false;
473  if ( m_doTruthOriginPlots and m_trackTruthOriginTool->isFrom(associatedTruth, 5) ) {
474  truthIsFromB = true;
475  }
476  m_monPlots->fill(*thisTrack, *associatedTruth, truthIsFromB, puEvents, beamSpotWeight); // Make plots requiring matched truth
477  }
478  }
479 
480  const bool isAssociatedTruth = associatedTruth != nullptr;
481  const bool isFake = not std::isnan(prob) ? (prob < m_lowProb) : true;
482 
483  if(!isAssociatedTruth) nMissingAssociatedTruth++;
484  m_monPlots->fillFakeRate(*thisTrack, isFake, isAssociatedTruth, puEvents, beamSpotWeight);
485 
487  // Decorate track particle with extra flags
488  decorateTrackParticle(*thisTrack, accept);
489 
490  if (isAssociatedTruth) {
491  // Decorate truth particle with extra flags
492  decorateTruthParticle(*associatedTruth, m_truthSelectionTool->accept(associatedTruth));
493 
494  // Cache truth-to-track associations
495  auto cachedAssoc = cacheTruthMatching.find(associatedTruth);
496  // Check if truth particle already present in cache
497  if (cachedAssoc == cacheTruthMatching.end()) {
498  // If not yet present, add truth-to-track association in cache
499  cacheTruthMatching[associatedTruth] = {thisTrack};
500  }
501  else {
502  // If already present, cache additional track associations (here multiple track particle can be linked to the same truth particle)
503  cachedAssoc->second.push_back(thisTrack);
504  }
505  }
506  else if(m_fillTruthToRecoNtuple){
507  // Fill track only entries with dummy truth values
508  m_monPlots->fillNtuple(*thisTrack, primaryvertex);
509  }
510  }
511  }
513  // Now fill all truth-to-track associations
514  // Involves some double-filling of truth particles in cases where multiple tracks share the same truth association,
515  // these duplicates can be filtered in the ntuple by selecting only the 'best matched' truth-associated track particles.
516  for (auto& cachedAssoc: cacheTruthMatching) {
517  const xAOD::TruthParticle* thisTruth = cachedAssoc.first;
518 
519  // Decorate that this truth particle is being filled to prevent double counting in truth particle loop
520  m_dec_hasTruthFilled(*thisTruth) = true;
521 
522  // Sort all associated tracks by truth match probability
523  std::sort(cachedAssoc.second.begin(), cachedAssoc.second.end(),
524  [](const xAOD::TrackParticle* t1, const xAOD::TrackParticle* t2) { return getMatchingProbability(*t1) > getMatchingProbability(*t2); }
525  );
526 
528  // Fill all tracks associated to to this truth particle, also recording 'truth match ranking' as index in probability-sorted vector of matched tracks
529  for (int itrack = 0; itrack < (int) cachedAssoc.second.size(); itrack++) {
530  const xAOD::TrackParticle* thisTrack = cachedAssoc.second[itrack];
531 
532  // Fill track entries with truth association
533  m_monPlots->fillNtuple(*thisTrack, *thisTruth, primaryvertex, itrack);
534  }
535  }
536  }
537  }
538 
539  m_monPlots->fill(nTrackTOT, truthMu, actualMu, nVertices, beamSpotWeight);
540 
541  //FIXME: I don't get why... this is here
542  if (m_truthSelectionTool.get()) {
543  ATH_MSG_DEBUG( CutFlow(tmp_truth_cutflow).report(m_truthSelectionTool->names()) );
544  std::lock_guard<std::mutex> lock(m_mutex);
545  m_truthCutFlow.merge(std::move(tmp_truth_cutflow));
546  }
547 
548  //
549  //TruthParticle loop to fill efficiencies
550  //
551  for (int itruth = 0; itruth < (int) truthParticlesVec.size(); itruth++) { // Outer loop over all truth particles
552  nTruths++;
553  const xAOD::TruthParticle* thisTruth = truthParticlesVec[itruth];
554 
555  // if the vector of truth particles is not empty also a truthSelectionTool was retrieved
556  const IAthSelectionTool::CutResult accept = m_truthSelectionTool->accept(thisTruth);
557  if (accept) {
558  ++nSelectedTruthTracks; // total number of truth which pass cuts per event
559  bool isEfficient(false); // weight for the trackeff histos
560  m_monPlots->fill(*thisTruth, beamSpotWeight); // This is filling truth-only plots
561 
562  if(m_doDuplicatePlots){
563  auto cachedAssoc = cacheTruthMatching.find(thisTruth);
564  // Check if truth particle already present in cache
565  if (cachedAssoc == cacheTruthMatching.end()) {
566  // If not yet present, then no track associated
567  cacheTruthMatching[thisTruth] = {};
568  }
569  m_monPlots->fillDuplicate(*thisTruth, cacheTruthMatching[thisTruth], beamSpotWeight);
570  }
571 
572  //
573  //Loop over reco tracks to find the match
574  //
575  const xAOD::TrackParticle* matchedTrack = nullptr;
576  for (const auto& thisTrack: selectedTracks) { // Inner loop over selected track particleis
577  const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack);
578  if (associatedTruth && associatedTruth == thisTruth) {
579  float prob = getMatchingProbability(*thisTrack);
580  if (not std::isnan(prob) && prob > m_lowProb) {
581  isEfficient = true;
582  matchedTrack = thisTrack;
583  break;
584  }
585  }
586  }
587  if (!thisTruth){
588  ATH_MSG_ERROR("An error occurred: Truth particle for tracking efficiency calculation is a nullptr");
589  }
590  else if (isEfficient && !matchedTrack){
591  ATH_MSG_ERROR("Something went wrong - we log a truth particle as reconstructed, but the reco track is a nullptr! Bailing out... ");
592  }
593  else{
594  ATH_MSG_DEBUG("Filling efficiency plots info monitoring plots");
595  m_monPlots->fillEfficiency(*thisTruth, matchedTrack, isEfficient, truthMu, actualMu, beamSpotWeight);
597  ATH_MSG_DEBUG("Filling technical efficiency plots info monitoring plots");
598  static const SG::ConstAccessor< float > nSilHitsAcc("nSilHits");
599  if (nSilHitsAcc.isAvailable(*thisTruth)) {
600  if (nSilHitsAcc(*thisTruth) >= m_minHits.value().at(getIndexByEta(*thisTruth))){
601  m_monPlots->fillTechnicalEfficiency(*thisTruth, isEfficient,
602  truthMu, actualMu, beamSpotWeight);
603  }
604  } else {
605  ATH_MSG_DEBUG("Cannot fill technical efficiency. Missing si hit information for truth particle.");
606  }
607  }
608  }
609  }
610 
612  // Skip if already filled in track loop
613  if (hasTruthFilled(*thisTruth)) continue;
614 
615  // Decorate truth particle with extra flags
616  decorateTruthParticle(*thisTruth, accept);
617 
618  // Fill truth only entries with dummy track values
619  m_monPlots->fillNtuple(*thisTruth);
620  }
621  }
622 
623  if (nSelectedRecoTracks == nMissingAssociatedTruth) {
624  if (not m_truthParticleName.key().empty()) {
625  ATH_MSG_DEBUG("NO TRACKS had associated truth.");
626  }
627  } else {
628  ATH_MSG_DEBUG(nAssociatedTruth << " tracks out of " << tracks->size() << " had associated truth.");
629  }
630 
631  m_monPlots->fillCounter(nSelectedRecoTracks, InDetPerfPlot_nTracks::SELECTEDRECO, beamSpotWeight);
632  m_monPlots->fillCounter(tracks->size(), InDetPerfPlot_nTracks::ALLRECO, beamSpotWeight);
633  m_monPlots->fillCounter(nSelectedTruthTracks, InDetPerfPlot_nTracks::SELECTEDTRUTH, beamSpotWeight);
634  m_monPlots->fillCounter(nTruths, InDetPerfPlot_nTracks::ALLTRUTH, beamSpotWeight);
635  m_monPlots->fillCounter(nAssociatedTruth, InDetPerfPlot_nTracks::ALLASSOCIATEDTRUTH, beamSpotWeight);
636  m_monPlots->fillCounter(nSelectedMatchedTracks, InDetPerfPlot_nTracks::MATCHEDRECO, beamSpotWeight);
637 
638  // Tracking In Dense Environment
639  if (m_doTrackInJetPlots) {
641  getAsTruth,
642  truthParticlesVec,
643  *tracks,
644  primaryvertex,
645  beamSpotWeight) );
646  }
647  return StatusCode::SUCCESS;
648 }
649 
651  // Decorate outcome of track selection
653 }
654 
656  // Decorate outcome of truth selection
658 
659  // Decorate if selected by pileup switch
661 }
662 
664  if (!m_acc_hasTruthFilled.isAvailable(truth)) {
665  ATH_MSG_DEBUG("Truth particle not yet filled in ntuple");
666  return false;
667  }
668  return m_acc_hasTruthFilled(truth);
669 }
670 
672  if (!m_acc_selectedByPileupSwitch.isAvailable(truth)) {
673  ATH_MSG_DEBUG("Selected by pileup switch decoration requested from a truth particle but not available");
674  return false;
675  }
676  return m_acc_selectedByPileupSwitch(truth);
677 }
678 
679 void InDetPhysValMonitoringTool::markSelectedByPileupSwitch(const std::vector<const xAOD::TruthParticle*> & truthParticles) const{
680  for (const auto& thisTruth: truthParticles) {
681  m_dec_selectedByPileupSwitch(*thisTruth) = true;
682  }
683 }
684 
687  ATH_MSG_INFO("Booking hists " << name() << "with detailed level: " << m_detailLevel);
688  m_monPlots->initialize();
689  std::vector<HistData> hists = m_monPlots->retrieveBookedHistograms();
690  for (const auto& hist : hists) {
691  ATH_CHECK(regHist(hist.first, hist.second, all)); // ??
692  }
693  // do the same for Efficiencies, but there's a twist:
694  std::vector<EfficiencyData> effs = m_monPlots->retrieveBookedEfficiencies();
695  for (auto& eff : effs) {
696  // reg**** in the monitoring baseclass doesnt have a TEff version, but TGraph *
697  // pointers just get passed through, so we use that method after an ugly cast
698  ATH_CHECK(regGraph(reinterpret_cast<TGraph*>(eff.first), eff.second, all)); // ??
699  }
700  // register trees for ntuple writing
702  std::vector<TreeData> trees = m_monPlots->retrieveBookedTrees();
703  for (auto& t : trees) {
704  ATH_CHECK(regTree(t.first, t.second, all));
705  }
706  }
707 
708  return StatusCode::SUCCESS;
709 }
710 
713  ATH_MSG_INFO("Finalising hists " << name() << "...");
714  //TODO: ADD Printouts for Truth??
715  if (m_useTrackSelection) {
716  ATH_MSG_INFO("");
717  ATH_MSG_INFO("Now Cutflow for track cuts:");
718  ATH_MSG_INFO("");
719  for (int i = 0; i < (int) m_trackCutflow.size(); ++i) {
720  ATH_MSG_INFO("number after " << m_trackCutflowNames[i] << ": " << m_trackCutflow[i]);
721  }
722  }
723 
724  ATH_MSG_INFO("");
725  ATH_MSG_INFO("Cutflow for truth tracks:");
726  if (m_truthSelectionTool.get()) {
727  ATH_MSG_INFO("Truth selection report: " << m_truthCutFlow.report( m_truthSelectionTool->names()) );
728  }
729  if (endOfRunFlag()) {
730  m_monPlots->finalize();
731  }
732  ATH_MSG_INFO("Successfully finalized hists");
733  return StatusCode::SUCCESS;
734 }
735 
736 const std::vector<const xAOD::TruthParticle*>
737 InDetPhysValMonitoringTool::getTruthParticles(const EventContext& ctx) const {
738  // truthParticles.clear();
739  std::vector<const xAOD::TruthParticle*> tempVec {};
740  if (m_pileupSwitch == "All") {
741 
742  if (m_truthParticleName.key().empty()) {
743  return tempVec;
744  }
746  if (not truthParticleContainer.isValid()) {
747  return tempVec;
748  }
749  tempVec.insert(tempVec.begin(), truthParticleContainer->begin(), truthParticleContainer->end());
750  } else {
751  if (m_pileupSwitch == "HardScatter") {
752  // get truthevent container to separate out pileup and hardscatter truth particles
753  if (not m_truthEventName.key().empty()) {
755  const xAOD::TruthEvent* event = (truthEventContainer.isValid()) ? truthEventContainer->at(0) : nullptr;
756  if (not event) {
757  return tempVec;
758  }
759  const auto& links = event->truthParticleLinks();
760  tempVec.reserve(event->nTruthParticles());
761  for (const auto& link : links) {
762  if (link.isValid()){
763  tempVec.push_back(*link);
764  }
765  }
766  }
767  } else if (m_pileupSwitch == "PileUp") {
768  if (not m_truthPileUpEventName.key().empty()) {
769  ATH_MSG_VERBOSE("getting TruthPileupEvents container");
770  // get truth particles from all pileup events
772  if (truthPileupEventContainer.isValid()) {
773  const unsigned int nPileup = truthPileupEventContainer->size();
774  tempVec.reserve(nPileup * 200); // quick initial guess, will still save some time
775  for (unsigned int i(0); i != nPileup; ++i) {
776  const auto *eventPileup = truthPileupEventContainer->at(i);
777  // get truth particles from each pileup event
778  int ntruth = eventPileup->nTruthParticles();
779  ATH_MSG_VERBOSE("Adding " << ntruth << " truth particles from TruthPileupEvents container");
780  const auto& links = eventPileup->truthParticleLinks();
781  for (const auto& link : links) {
782  if (link.isValid()){
783  tempVec.push_back(*link);
784  }
785  }
786  }
787  } else {
788  ATH_MSG_ERROR("no entries in TruthPileupEvents container!");
789  }
790  }
791  } else {
792  ATH_MSG_ERROR("bad value for PileUpSwitch");
793  }
794  }
795  return tempVec;
796 }
797 
798 std::pair<const std::vector<const xAOD::TruthVertex*>, const std::vector<const xAOD::TruthVertex*>>
799 InDetPhysValMonitoringTool::getTruthVertices(const EventContext& ctx) const {
800 
801  std::vector<const xAOD::TruthVertex*> truthHSVertices = {};
802  truthHSVertices.reserve(5);
803  std::vector<const xAOD::TruthVertex*> truthPUVertices = {};
804  truthPUVertices.reserve(100);
805  const xAOD::TruthVertex* truthVtx = nullptr;
806 
807  bool doHS = false;
808  bool doPU = false;
809  if (m_pileupSwitch == "All") {
810  doHS = true;
811  doPU = true;
812  }
813  else if (m_pileupSwitch == "HardScatter") {
814  doHS = true;
815  }
816  else if (m_pileupSwitch == "PileUp") {
817  doPU = true;
818  }
819  else {
820  ATH_MSG_ERROR("Bad value for PileUpSwitch: " << m_pileupSwitch);
821  }
822 
823  if (doHS) {
824  if (not m_truthEventName.key().empty()) {
825  ATH_MSG_VERBOSE("Getting HS TruthEvents container.");
827  if (truthEventContainer.isValid()) {
828  for (const auto *const evt : *truthEventContainer) {
829  truthVtx = evt->signalProcessVertex();
830  if (truthVtx) {
831  truthHSVertices.push_back(truthVtx);
832  }
833  }
834  }
835  else {
836  ATH_MSG_ERROR("No entries in TruthEvents container!");
837  }
838  }
839  }
840 
841  if (doPU) {
842  if (not m_truthPileUpEventName.key().empty()) {
843  ATH_MSG_VERBOSE("Getting PU TruthEvents container.");
845  if (truthPileupEventContainer.isValid()) {
846  for (const auto *const evt : *truthPileupEventContainer) {
847  // Get the PU vertex
848  // In all cases tested i_vtx=2 for PU
849  // but better to keep something generic
850  truthVtx = nullptr;
851  size_t i_vtx = 0; size_t n_vtx = evt->nTruthVertices();
852  while(!truthVtx && i_vtx<n_vtx){
853  truthVtx = evt->truthVertex(i_vtx);
854  i_vtx++;
855  }
856 
857  if (truthVtx) {
858  truthPUVertices.push_back(truthVtx);
859  }
860  }
861  }
862  else {
863  ATH_MSG_ERROR("No entries in TruthPileupEvents container!");
864  }
865  }
866  }
867 
868  return std::make_pair<const std::vector<const xAOD::TruthVertex*>, const std::vector<const xAOD::TruthVertex*>>((const std::vector<const xAOD::TruthVertex*>)truthHSVertices, (const std::vector<const xAOD::TruthVertex*>)truthPUVertices);
869 
870 }
871 
872 void
875 }
876 
877 void
879  std::vector<int>& cutFlow) {
880  // initialise cutflows
881  if (cutFlow.empty()) {
882  names.emplace_back("preCut");
883  cutFlow.push_back(0);
884  for (unsigned int i = 0; i != accept.getNCuts(); ++i) {
885  cutFlow.push_back(0);
886  names.push_back((std::string) accept.getCutName(i));
887  }
888  }
889  // get cutflow
890  cutFlow[0] += 1;
891  bool cutPositive = true;
892  for (unsigned int i = 0; i != (accept.getNCuts() + 1); ++i) {
893  if (!cutPositive) {
894  continue;
895  }
896  if (accept.getCutResult(i)) {
897  cutFlow[i + 1] += 1;
898  } else {
899  cutPositive = false;
900  }
901  }
902  }
903 
905  double absEta = std::abs(truth.eta());
906  if (absEta > m_etaBins.value().back() || absEta < m_etaBins.value().front()) {
907  absEta = std::clamp(absEta, m_etaBins.value().front(), m_etaBins.value().back());
908  ATH_MSG_INFO("Requesting cut value outside of configured eta range: clamping eta = "
909  << std::abs(truth.eta()) << " to eta= " << absEta);
910  } else
911  absEta = std::clamp(absEta, m_etaBins.value().front(), m_etaBins.value().back());
912  const auto pVal = std::lower_bound(m_etaBins.value().begin(), m_etaBins.value().end(), absEta);
913  const int bin = std::distance(m_etaBins.value().begin(), pVal) - 1;
914  ATH_MSG_DEBUG("Checking (abs(eta)/bin) = (" << absEta << "," << bin << ")");
915  return bin;
916 }
917 
919  IDPVM::CachedGetAssocTruth& getAsTruth,
920  const std::vector<const xAOD::TruthParticle*>& truthParticles,
921  const xAOD::TrackParticleContainer& tracks,
922  const xAOD::Vertex* primaryvertex,
923  float beamSpotWeight) {
924  // Define accessors
925  static const SG::ConstAccessor<std::vector<ElementLink<xAOD::IParticleContainer> > > ghosttruth("GhostTruth");
926  static const SG::ConstAccessor<int> btagLabel("HadronConeExclTruthLabelID");
927 
928  if (truthParticles.empty()) {
929  ATH_MSG_WARNING("No entries in TruthParticles truth particle container. Skipping jet plots.");
930  return StatusCode::SUCCESS;
931  }
932 
934  if (not jetHandle.isValid()) {
935  ATH_MSG_WARNING("Cannot open jet container " << m_jetContainerName.key() << ". Skipping jet plots.");
936  return StatusCode::SUCCESS;
937  }
938  const xAOD::JetContainer* jets = jetHandle.cptr();
939 
940  // loop on jets
941  for (const xAOD::Jet *const thisJet: *jets) {
942  // pass jet cuts
943  if (not passJetCuts(*thisJet)) continue;
944  // check if b-jet
945  bool isBjet = false;
946  if (not btagLabel.isAvailable(*thisJet)){
947  ATH_MSG_WARNING("Failed to extract b-tag truth label from jet");
948  } else {
949  isBjet = (btagLabel(*thisJet) == 5);
950  }
951 
952  // Retrieve associated ghost truth particles
953  if(not ghosttruth.isAvailable(*thisJet)) {
954  ATH_MSG_WARNING("Failed to extract ghost truth particles from jet");
955  } else {
956  for(const ElementLink<xAOD::IParticleContainer>& el : ghosttruth(*thisJet)) {
957  if (not el.isValid()) continue;
958 
959  const xAOD::TruthParticle *truth = static_cast<const xAOD::TruthParticle*>(*el);
960  // Check delta R between track and jet axis
961  if (thisJet->p4().DeltaR(truth->p4()) > m_maxTrkJetDR) {
962  continue;
963  }
964  // Apply truth selection cuts
966  if(!accept) continue;
967 
968  bool isEfficient(false);
969 
970  for (const auto *thisTrack: tracks) {
971  if (m_useTrackSelection and not (m_trackSelectionTool->accept(*thisTrack, primaryvertex))) {
972  continue;
973  }
974 
975  const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack);
976  if (associatedTruth and associatedTruth == truth) {
977  float prob = getMatchingProbability(*thisTrack);
978  if (not std::isnan(prob) && prob > m_lowProb) {
979  isEfficient = true;
980  break;
981  }
982  }
983  }
984 
985  bool truthIsFromB = false;
986  if ( m_doTruthOriginPlots and m_trackTruthOriginTool->isFrom(truth, 5) ) {
987  truthIsFromB = true;
988  }
989  m_monPlots->fillEfficiency(*truth, *thisJet, isEfficient, isBjet, truthIsFromB, beamSpotWeight);
990  }
991  } // ghost truth
992 
993  // loop on tracks
994  for (const xAOD::TrackParticle *thisTrack: tracks) {
995  if (m_useTrackSelection and not (m_trackSelectionTool->accept(*thisTrack, primaryvertex))) {
996  continue;
997  }
998 
999  if (thisJet->p4().DeltaR(thisTrack->p4()) > m_maxTrkJetDR) {
1000  continue;
1001  }
1002 
1003  float prob = getMatchingProbability(*thisTrack);
1004  if(std::isnan(prob)) prob = 0.0;
1005 
1006  const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack);
1007  const bool unlinked = (associatedTruth==nullptr);
1008  const bool isFake = (associatedTruth && prob < m_lowProb);
1009  bool truthIsFromB = false;
1010  if ( m_doTruthOriginPlots and m_trackTruthOriginTool->isFrom(associatedTruth, 5) ) {
1011  truthIsFromB = true;
1012  }
1013  m_monPlots->fill(*thisTrack, *thisJet, isBjet, isFake, unlinked, truthIsFromB, beamSpotWeight);
1014  if (associatedTruth){
1015  m_monPlots->fillFakeRate(*thisTrack, *thisJet, isFake, isBjet, truthIsFromB, beamSpotWeight);
1016  }
1017  }
1018 
1019  } // loop on jets
1020 
1021  return StatusCode::SUCCESS;
1022 }
1023 
1024 bool
1026  const float jetPt = jet.pt() / Gaudi::Units::GeV;
1027  const float jetEta = std::abs(jet.eta());
1028 
1029  if (jetEta < m_jetAbsEtaMin) return false;
1030  if (jetEta > m_jetAbsEtaMax) return false;
1031  if (jetPt < m_jetPtMin) return false;
1032  if (jetPt > m_jetPtMax) return false;
1033  return true;
1034 }
InDetPhysValMonitoringTool::m_dec_passedTruthSelection
SG::AuxElement::Decorator< bool > m_dec_passedTruthSelection
Definition: InDetPhysValMonitoringTool.h:107
InDetPhysValMonitoringTool::decorateTrackParticle
void decorateTrackParticle(const xAOD::TrackParticle &track, const asg::AcceptData &passed) const
Definition: InDetPhysValMonitoringTool.cxx:650
InDetPhysValMonitoringTool::getIndexByEta
int getIndexByEta(const xAOD::TruthParticle &truth) const
Utility function for evaluation of technical efficiency.
Definition: InDetPhysValMonitoringTool.cxx:904
InDetPhysValMonitoringTool::m_fillTechnicalEfficiency
BooleanProperty m_fillTechnicalEfficiency
Definition: InDetPhysValMonitoringTool.h:186
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
InDetPhysValMonitoringTool::m_pileupSwitch
StringProperty m_pileupSwitch
Definition: InDetPhysValMonitoringTool.h:192
InDetPhysValMonitoringTool::m_usingSpecialPileupSwitch
bool m_usingSpecialPileupSwitch
Definition: InDetPhysValMonitoringTool.h:229
InDetPhysValMonitoringTool::m_grlTool
ToolHandle< IGoodRunsListSelectionTool > m_grlTool
Definition: InDetPhysValMonitoringTool.h:217
InDetPhysValMonitoringTool::m_hardScatterSelectionTool
ToolHandle< InDet::IInDetHardScatterSelectionTool > m_hardScatterSelectionTool
Definition: InDetPhysValMonitoringTool.h:216
InDetPhysValMonitoringTool::m_trackSelectionTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelectionTool
Definition: InDetPhysValMonitoringTool.h:212
InDetPhysValMonitoringTool::m_monPlots
std::unique_ptr< InDetRttPlots > m_monPlots
histograms
Definition: InDetPhysValMonitoringTool.h:169
get_generator_info.result
result
Definition: get_generator_info.py:21
NSWL1::nVertices
int nVertices(const Polygon &p)
Definition: GeoUtils.cxx:35
InDetPhysValMonitoringTool::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: InDetPhysValMonitoringTool.cxx:686
InDetRttPlotConfig::doResolutionsPerAuthor
bool doResolutionsPerAuthor
Definition: InDetRttPlots.h:102
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
InDetSecVtxTruthMatchUtils::isFake
bool isFake(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:60
InDetRttPlotConfig::doTrkInJetPlots_matched_bjets
bool doTrkInJetPlots_matched_bjets
Definition: InDetRttPlots.h:91
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
InDetRttPlotConfig::doResolutionPlotSecd
bool doResolutionPlotSecd
Definition: InDetRttPlots.h:75
IAthSelectionTool::CutResult
Definition: IAthSelectionTool.h:30
InDetPhysValMonitoringTool::m_useGRL
BooleanProperty m_useGRL
Definition: InDetPhysValMonitoringTool.h:184
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
InDetPhysValMonitoringTool::m_doPRW
BooleanProperty m_doPRW
Definition: InDetPhysValMonitoringTool.h:187
ManagedMonitorToolBase::regTree
virtual StatusCode regTree(TTree *t, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TTree to be included in the output stream using logical parameters that describe it.
Definition: ManagedMonitorToolBase.cxx:1749
InDetRttPlotConfig::doHitsUnlinkedTracksPlots
bool doHitsUnlinkedTracksPlots
Definition: InDetRttPlots.h:64
InDetPhysValMonitoringTool::m_maxTrkJetDR
FloatProperty m_maxTrkJetDR
Definition: InDetPhysValMonitoringTool.h:189
InDetRttPlotConfig::doHardScatterVertexTruthMatchingPlots
bool doHardScatterVertexTruthMatchingPlots
Definition: InDetRttPlots.h:85
InDetRttPlotConfig::doHardScatterVertexPlots
bool doHardScatterVertexPlots
Definition: InDetRttPlots.h:81
plotmaker.hist
hist
Definition: plotmaker.py:148
IDPVM::CachedGetAssocTruth
Definition: CachedGetAssocTruth.h:21
InDetPhysValMonitoringTool::m_truthParticleName
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleName
TruthParticle container's name.
Definition: InDetPhysValMonitoringTool.h:137
CutsMETMaker::accept
StatusCode accept(const xAOD::Muon *mu)
Definition: CutsMETMaker.cxx:18
RTTAlgmain.trees
list trees
Definition: RTTAlgmain.py:40
InDetPhysValMonitoringTool::passJetCuts
bool passJetCuts(const xAOD::Jet &jet) const
Definition: InDetPhysValMonitoringTool.cxx:1025
InDetRttPlotConfig::doNTracks
bool doNTracks
Definition: InDetRttPlots.h:54
ALFA_EventTPCnv_Dict::t1
std::vector< ALFA_RawDataCollection_p1 > t1
Definition: ALFA_EventTPCnvDict.h:43
TruthPileupEvent.h
InDetVertexTruthMatchUtils::classifyHardScatter
HardScatterType classifyHardScatter(const xAOD::VertexContainer &vxContainer)
Definition: InDetVertexTruthMatchUtils.cxx:70
InDetRttPlotConfig::doTrtExtensionPlots
bool doTrtExtensionPlots
Definition: InDetRttPlots.h:58
bin
Definition: BinsDiffFromStripMedian.h:43
checkTP.report
report
Definition: checkTP.py:127
safeDecorator.h
InDetPhysValMonitoringTool::getTruthParticles
const std::vector< const xAOD::TruthParticle * > getTruthParticles(const EventContext &ctx) const
Definition: InDetPhysValMonitoringTool.cxx:737
InDetPhysValMonitoringTool::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: InDetPhysValMonitoringTool.cxx:298
InDetPhysValMonitoringTool::m_acc_selectedByPileupSwitch
SG::AuxElement::Accessor< bool > m_acc_selectedByPileupSwitch
Definition: InDetPhysValMonitoringTool.h:109
athena.value
value
Definition: athena.py:122
InDetPhysValMonitoringTool::m_useTrackSelection
BooleanProperty m_useTrackSelection
Properties to fine-tune the tool behaviour.
Definition: InDetPhysValMonitoringTool.h:173
IOVDbNamespace::inRange
bool inRange(const NumericType &val, const std::pair< NumericType, NumericType > &range)
Function to check whether a number is in the inclusive range, given as a pair.
Definition: IOVDbCoolFunctions.h:42
InDetPhysValMonitoringTool::m_intTruthDecor
std::vector< SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > > m_intTruthDecor
Definition: InDetPhysValMonitoringTool.h:165
InDetRttPlotConfig::doTrkInJetPlots_unlinked_bjets
bool doTrkInJetPlots_unlinked_bjets
Definition: InDetRttPlots.h:95
ManagedMonitorToolBase::regGraph
virtual StatusCode regGraph(TGraph *g, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TGraph to be included in the output stream using logical parameters that describe the gra...
Definition: ManagedMonitorToolBase.cxx:1693
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
SG::ConstAccessor< float >
InDetPhysValMonitoringTool::m_eventInfoContainerName
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoContainerName
EventInfo container name.
Definition: InDetPhysValMonitoringTool.h:149
InDetRttPlotConfig::doHitEffPlot
bool doHitEffPlot
Definition: InDetRttPlots.h:56
InDetPhysValMonitoringTool::m_jetPtMax
Gaudi::Property< float > m_jetPtMax
Definition: InDetPhysValMonitoringTool.h:208
InDetRttPlotConfig::doTrkInJetPlots_truthFromB
bool doTrkInJetPlots_truthFromB
Definition: InDetRttPlots.h:96
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InDetPerfPlot_nTracks::ALLASSOCIATEDTRUTH
@ ALLASSOCIATEDTRUTH
Definition: InDetPerfPlot_nTracks.h:25
InDetRttPlotConfig::doHitResidualPlot
bool doHitResidualPlot
Definition: InDetRttPlots.h:55
InDetRttPlotConfig::doTrkInJetPlots
bool doTrkInJetPlots
Plots for tracks in jets.
Definition: InDetRttPlots.h:88
covarianceTool.prob
prob
Definition: covarianceTool.py:678
InDetRttPlotConfig::doTrkInJetPlots_matched
bool doTrkInJetPlots_matched
Definition: InDetRttPlots.h:90
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
x
#define x
TrackStateValidation.h
InDetPhysValMonitoringTool::m_intJetDecor
std::vector< SG::ReadDecorHandleKey< xAOD::JetContainer > > m_intJetDecor
Definition: InDetPhysValMonitoringTool.h:166
InDetPhysValMonitoringTool::m_jetPtMin
Gaudi::Property< float > m_jetPtMin
Definition: InDetPhysValMonitoringTool.h:205
InDetPhysValMonitoringTool::m_truthVertexContainerName
SG::ReadHandleKey< xAOD::TruthVertexContainer > m_truthVertexContainerName
Truth vertex container's name.
Definition: InDetPhysValMonitoringTool.h:145
xAOD::TruthVertex_v1::y
float y() const
Vertex y displacement.
InDetPhysValMonitoringTool::m_lowProb
FloatProperty m_lowProb
Definition: InDetPhysValMonitoringTool.h:193
CutFlow::update
void update(bool)
Definition: CutFlow.h:192
InDetRttPlotConfig::doFakesPerAuthor
bool doFakesPerAuthor
Definition: InDetRttPlots.h:100
IDPVM::addReadDecoratorHandleKeys
void addReadDecoratorHandleKeys(T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< SG::ReadDecorHandleKey< T_Cont > > &decor_out)
Definition: safeDecorator.h:145
InDetPhysValMonitoringTool::m_jetContainerName
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainerName
Definition: InDetPhysValMonitoringTool.h:158
InDetPhysValMonitoringTool::m_dec_passedTrackSelection
SG::AuxElement::Decorator< bool > m_dec_passedTrackSelection
Definition: InDetPhysValMonitoringTool.h:108
InDetPhysValMonitoringTool.h
InDetPhysValMonitoringTool::m_truthPileUpEventName
SG::ReadHandleKey< xAOD::TruthPileupEventContainer > m_truthPileUpEventName
Definition: InDetPhysValMonitoringTool.h:155
InDetPhysValMonitoringTool::isSelectedByPileupSwitch
bool isSelectedByPileupSwitch(const xAOD::TruthParticle &truth) const
Definition: InDetPhysValMonitoringTool.cxx:671
InDetVertexTruthMatchUtils.h
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
InDetPhysValMonitoringTool::markSelectedByPileupSwitch
void markSelectedByPileupSwitch(const std::vector< const xAOD::TruthParticle * > &truthParticles) const
Definition: InDetPhysValMonitoringTool.cxx:679
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CachedGetAssocTruth.h
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
InDetPhysValMonitoringTool::m_doTruthOriginPlots
BooleanProperty m_doTruthOriginPlots
Definition: InDetPhysValMonitoringTool.h:174
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:669
InDetRttPlotConfig::doTrkInJetPlots_bjets
bool doTrkInJetPlots_bjets
Definition: InDetRttPlots.h:89
MuonPhysValMonitoring::getMatchingProbability
float getMatchingProbability(const xAOD::TrackParticle &trackParticle)
Definition: MuonPhysValMonitoringTool.cxx:57
InDetPhysValMonitoringTool::m_doTrackInJetPlots
BooleanProperty m_doTrackInJetPlots
Definition: InDetPhysValMonitoringTool.h:177
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
InDetPhysValMonitoringTool::m_trackCutflow
std::vector< int > m_trackCutflow
Definition: InDetPhysValMonitoringTool.h:227
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::ReadHandle::get
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
DMTest::links
links
Definition: CLinks_v1.cxx:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
python.subdetectors.mmg.names
names
Definition: mmg.py:8
InDetRttPlotConfig
helper struct - steer the configuration from the parent tool's side
Definition: InDetRttPlots.h:51
InDetRttPlotConfig::doResolutionPlotPrim_truthFromB
bool doResolutionPlotPrim_truthFromB
Definition: InDetRttPlots.h:74
InDetRttPlots.h
InDetRttPlotConfig::doFakePlots
bool doFakePlots
Fake plots (and unlinked)
Definition: InDetRttPlots.h:61
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
InDetPhysValMonitoringTool::initialize
virtual StatusCode initialize()
Definition: InDetPhysValMonitoringTool.cxx:116
InDetPhysValMonitoringTool::m_jetAbsEtaMin
Gaudi::Property< float > m_jetAbsEtaMin
Definition: InDetPhysValMonitoringTool.h:199
InDetPhysValMonitoringTool::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: InDetPhysValMonitoringTool.cxx:712
InDetPhysValMonitoringTool::getFilledPlotConfig
InDetRttPlotConfig getFilledPlotConfig() const
Generate an Rtt config struct based on the user-passed properties.
Definition: InDetPhysValMonitoringTool.cxx:171
TrackCollection.h
InDetPhysValMonitoringTool::m_floatTrkDecor
std::vector< SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > > m_floatTrkDecor
Definition: InDetPhysValMonitoringTool.h:162
CutFlow
Definition: CutFlow.h:166
test_pyathena.parent
parent
Definition: test_pyathena.py:15
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAOD::TruthEvent_v1
Class describing a signal truth event in the MC record.
Definition: TruthEvent_v1.h:35
InDetPhysValMonitoringTool::m_onlyFillMatched
BooleanProperty m_onlyFillMatched
Definition: InDetPhysValMonitoringTool.h:182
IDPVM::CachedGetAssocTruth::getTruth
const xAOD::TruthParticle * getTruth(const xAOD::TrackParticle *const trackParticle)
Definition: CachedGetAssocTruth.cxx:22
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDetPhysValMonitoringTool::m_truthSelectionTool
ToolHandle< IAthSelectionTool > m_truthSelectionTool
Definition: InDetPhysValMonitoringTool.h:214
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
InDetPhysValMonitoringTool::m_vertexContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerName
Primary vertex container's name.
Definition: InDetPhysValMonitoringTool.h:141
AthTruthSelectionTool.h
IDPVM::binIndex
unsigned int binIndex(const T &val, const std::vector< T > &partitions)
general utility function to return bin index given a value and the upper endpoints of each bin
Definition: InDetPhysValMonitoringUtilities.h:43
InDetPhysValMonitoringTool::m_useVertexTruthMatchTool
BooleanProperty m_useVertexTruthMatchTool
Definition: InDetPhysValMonitoringTool.h:181
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
InDetPhysValMonitoringTool::m_truthEventName
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventName
Definition: InDetPhysValMonitoringTool.h:152
InDetRttPlotConfig::doTrkInJetPlots_fake_bjets
bool doTrkInJetPlots_fake_bjets
Definition: InDetRttPlots.h:93
DataVector< xAOD::TrackParticle_v1 >
DeMoScan.partitions
dictionary partitions
Definition: DeMoScan.py:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
InDetRttPlotConfig::doEfficienciesPerAuthor
bool doEfficienciesPerAuthor
per author plots
Definition: InDetRttPlots.h:99
InDetRttPlotConfig::doNtupleTruthToReco
bool doNtupleTruthToReco
Ntuple functionality.
Definition: InDetRttPlots.h:105
InDetPhysValMonitoringTool::~InDetPhysValMonitoringTool
virtual ~InDetPhysValMonitoringTool()
Destructor.
InDetPhysValMonitoringTool::InDetPhysValMonitoringTool
InDetPhysValMonitoringTool()
prevent default construction
TruthVertex.h
InDetPhysValMonitoringTool::m_fillTruthToRecoNtuple
BooleanProperty m_fillTruthToRecoNtuple
Definition: InDetPhysValMonitoringTool.h:180
InDetRttPlotConfig::doDuplicatePlots
bool doDuplicatePlots
Definition: InDetRttPlots.h:69
InDetPhysValMonitoringTool::fillCutFlow
static void fillCutFlow(const asg::AcceptData &accept, std::vector< std::string > &names, std::vector< int > &cutFlow)
Definition: InDetPhysValMonitoringTool.cxx:878
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:41
InDetRttPlotConfig::doHitsMatchedTracksPlots
bool doHitsMatchedTracksPlots
Definition: InDetRttPlots.h:76
InDetRttPlotConfig::doResolutionPlotPrim
bool doResolutionPlotPrim
Resolution and "matched track" plots - filled if both reco and truth exist.
Definition: InDetRttPlots.h:73
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
InDetPhysValMonitoringTool::m_weight_pileup_key
SG::ReadDecorHandleKey< xAOD::EventInfo > m_weight_pileup_key
Definition: InDetPhysValMonitoringTool.h:219
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
InDetRttPlotConfig::doVertexTruthMatchingPlots
bool doVertexTruthMatchingPlots
Vertexing plots - truth requirement.
Definition: InDetRttPlots.h:84
InDetPhysValMonitoringTool::m_dirName
StringProperty m_dirName
Definition: InDetPhysValMonitoringTool.h:190
InDetRttPlotConfig::doMissingTruthFakePlots
bool doMissingTruthFakePlots
Definition: InDetRttPlots.h:62
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:174
IDPVM::safelyGetEta
float safelyGetEta(const T &pTrk, const float safePtThreshold=0.1)
Safely get eta.
Definition: InDetPhysValMonitoringUtilities.h:56
InDetRttPlotConfig::doVerticesVsMuPlots
bool doVerticesVsMuPlots
Definition: InDetRttPlots.h:80
InDetPhysValMonitoringTool::fillHistogramsTrackingInDenseEnvironment
StatusCode fillHistogramsTrackingInDenseEnvironment(const EventContext &ctx, IDPVM::CachedGetAssocTruth &getAsTruth, const std::vector< const xAOD::TruthParticle * > &truthParticles, const xAOD::TrackParticleContainer &tracks, const xAOD::Vertex *primaryvertex, float beamSpotWeight)
Definition: InDetPhysValMonitoringTool.cxx:918
InDetPhysValMonitoringTool::decorateTruthParticle
void decorateTruthParticle(const xAOD::TruthParticle &truth, const IAthSelectionTool::CutResult &passed) const
Definition: InDetPhysValMonitoringTool.cxx:655
TrackStateValidationContainer.h
xAOD::TruthVertex_v1::x
float x() const
Vertex x displacement.
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
InDetPhysValMonitoringTool::m_trackTruthOriginTool
ToolHandle< InDet::IInDetTrackTruthOriginTool > m_trackTruthOriginTool
Definition: InDetPhysValMonitoringTool.h:215
TrackParticle.h
DataVector::stdcont
const PtrVector & stdcont() const
Return the underlying std::vector of the container.
InDetRttPlotConfig::doHitsRecoTracksPlots
bool doHitsRecoTracksPlots
Definition: InDetRttPlots.h:57
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
ALFA_EventTPCnv_Dict::t2
std::vector< ALFA_RawDataContainer_p1 > t2
Definition: ALFA_EventTPCnvDict.h:44
InDetPhysValMonitoringTool::m_intTrkDecor
std::vector< SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > > m_intTrkDecor
Definition: InDetPhysValMonitoringTool.h:163
InDetPhysValMonitoringTool::m_dec_hasTruthFilled
SG::AuxElement::Decorator< bool > m_dec_hasTruthFilled
Definition: InDetPhysValMonitoringTool.h:106
compileRPVLLRates.nf
nf
Definition: compileRPVLLRates.py:89
InDetPhysValMonitoringTool::m_jetAbsEtaMax
Gaudi::Property< float > m_jetAbsEtaMax
Definition: InDetPhysValMonitoringTool.h:202
InDetRttPlotConfig::doEffPlots
bool doEffPlots
Efficiency and duplicate plots - require truth, optionally matching reco
Definition: InDetRttPlots.h:68
y
#define y
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
InDetPerfPlot_nTracks::MATCHEDRECO
@ MATCHEDRECO
Definition: InDetPerfPlot_nTracks.h:25
InDetPhysValMonitoringTool::fillTrackCutFlow
void fillTrackCutFlow(const asg::AcceptData &accept)
Definition: InDetPhysValMonitoringTool.cxx:873
InDetRttPlotConfig::doTrkInJetPlots_fake
bool doTrkInJetPlots_fake
Definition: InDetRttPlots.h:92
InDetRttPlotConfig::detailLevel
int detailLevel
detail level (kept for compatibility)
Definition: InDetRttPlots.h:108
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDetPhysValMonitoringTool::m_trkParticleName
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trkParticleName
TrackParticle container's name.
Definition: InDetPhysValMonitoringTool.h:133
ManagedMonitorToolBase::endOfRunFlag
bool endOfRunFlag() const
Definition: ManagedMonitorToolBase.h:859
InDetPhysValMonitoringTool::m_doHitLevelPlots
BooleanProperty m_doHitLevelPlots
Definition: InDetPhysValMonitoringTool.h:178
InDetRttPlotConfig::doTrackParameters
bool doTrackParameters
Plots for (selected) tracks, not necessarily truth matched.
Definition: InDetRttPlots.h:53
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
InDetPhysValMonitoringTool::m_etaBins
Gaudi::Property< std::vector< double > > m_etaBins
Definition: InDetPhysValMonitoringTool.h:195
xAOD::TruthVertex_v1::z
float z() const
Vertex longitudinal distance along the beam line form the origin.
InDetPhysValMonitoringTool::m_vtxValidTool
ToolHandle< IInDetVertexTruthMatchTool > m_vtxValidTool
Definition: InDetPhysValMonitoringTool.h:213
ManagedMonitorToolBase::all
@ all
Definition: ManagedMonitorToolBase.h:116
InDetPhysHitDecoratorAlg.h
InDetPhysValMonitoringTool::getTruthVertices
std::pair< const std::vector< const xAOD::TruthVertex * >, const std::vector< const xAOD::TruthVertex * > > getTruthVertices(const EventContext &ctx) const
Definition: InDetPhysValMonitoringTool.cxx:799
InDetPhysValMonitoringTool::m_folder
StringProperty m_folder
Definition: InDetPhysValMonitoringTool.h:191
TauGNNUtils::Variables::absEta
bool absEta(const xAOD::TauJet &tau, double &out)
Definition: TauGNNUtils.cxx:232
InDetPhysValMonitoringTool::m_doBjetPlots
BooleanProperty m_doBjetPlots
Definition: InDetPhysValMonitoringTool.h:179
InDetPhysValMonitoringTool::m_floatTruthDecor
std::vector< SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > > m_floatTruthDecor
Definition: InDetPhysValMonitoringTool.h:164
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
InDetPhysValMonitoringTool::m_doTRTExtensionPlots
BooleanProperty m_doTRTExtensionPlots
Definition: InDetPhysValMonitoringTool.h:183
TruthPileupEventAuxContainer.h
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
InDetPhysValMonitoringTool::m_minHits
Gaudi::Property< std::vector< int > > m_minHits
Definition: InDetPhysValMonitoringTool.h:196
ManagedMonitorToolBase::m_detailLevel
unsigned int m_detailLevel
Definition: ManagedMonitorToolBase.h:899
InDetPhysValMonitoringTool::m_mutex
std::mutex m_mutex
Definition: InDetPhysValMonitoringTool.h:221
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
InDetPerfPlot_nTracks.h
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
xAOD::TruthParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TruthParticle_v1.cxx:196
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
InDetPerfPlot_nTracks::SELECTEDRECO
@ SELECTEDRECO
Definition: InDetPerfPlot_nTracks.h:25
TruthParticle.h
ITrackSelectorTool.h
asg::AcceptData
Definition: AcceptData.h:30
InDetPhysValMonitoringTool::hasTruthFilled
bool hasTruthFilled(const xAOD::TruthParticle &truth) const
Definition: InDetPhysValMonitoringTool.cxx:663
InDetPhysValMonitoringTool::m_doIDTIDEPlots
BooleanProperty m_doIDTIDEPlots
Definition: InDetPhysValMonitoringTool.h:185
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
SG::ReadDecorHandle::isAvailable
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
InDetPhysValMonitoringTool::m_trackCutflowNames
std::vector< std::string > m_trackCutflowNames
Definition: InDetPhysValMonitoringTool.h:226
InDetRttPlotConfig::doVertexPlots
bool doVertexPlots
Vertexing plots - no truth requirement.
Definition: InDetRttPlots.h:79
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition: EventInfo_v1.cxx:970
ManagedMonitorToolBase::regHist
virtual StatusCode regHist(TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:1454
InDetPerfPlot_nTracks::ALLRECO
@ ALLRECO
Definition: InDetPerfPlot_nTracks.h:25
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
InDetPhysValMonitoringTool::m_doPerAuthorPlots
BooleanProperty m_doPerAuthorPlots
Definition: InDetPhysValMonitoringTool.h:176
TrackParticleContainer.h
InDetRttPlotConfig::doHitsFakeTracksPlots
bool doHitsFakeTracksPlots
Definition: InDetRttPlots.h:63
InDetRttPlotConfig::doTrackParametersPerAuthor
bool doTrackParametersPerAuthor
Definition: InDetRttPlots.h:101
InDetPhysValMonitoringTool::m_doDuplicatePlots
BooleanProperty m_doDuplicatePlots
Definition: InDetPhysValMonitoringTool.h:175
InDetPhysValMonitoringTool::m_acc_hasTruthFilled
SG::AuxElement::Accessor< bool > m_acc_hasTruthFilled
Definition: InDetPhysValMonitoringTool.h:105
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
InDetPerfPlot_nTracks::ALLTRUTH
@ ALLTRUTH
Definition: InDetPerfPlot_nTracks.h:25
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
InDetPerfPlot_nTracks::SELECTEDTRUTH
@ SELECTEDTRUTH
Definition: InDetPerfPlot_nTracks.h:25
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
xAOD::EventInfo_v1::actualInteractionsPerCrossing
float actualInteractionsPerCrossing() const
Average interactions per crossing for the current BCID - for in-time pile-up.
Definition: EventInfo_v1.cxx:380
InDetPhysValMonitoringTool::m_dec_selectedByPileupSwitch
SG::AuxElement::Decorator< bool > m_dec_selectedByPileupSwitch
Definition: InDetPhysValMonitoringTool.h:110
InDetRttPlotConfig::doTrkInJetPlots_unlinked
bool doTrkInJetPlots_unlinked
Definition: InDetRttPlots.h:94