Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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() ) );
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  // The CSV file is for storing event data related to track overlay ML training purposes.
153  if (!m_setCSVName.empty()) {
154  m_datfile.open(m_setCSVName);
155  ATH_MSG_INFO("Accessing csv file with name " <<m_setCSVName<< "...");
156  m_datfile <<"EvtNumber,PdgID,Px,Py,Pz,E,Pt,Eta,Phi,Mass,numPU,numvtx,MatchProb"<<std::endl;
157  }
158  std::string empty_prefix;
159  IDPVM::addReadDecoratorHandleKeys(*this, m_trkParticleName, empty_prefix, required_float_track_decorations, m_floatTrkDecor);
160  IDPVM::addReadDecoratorHandleKeys(*this, m_trkParticleName, empty_prefix, required_int_truth_decorations, m_intTrkDecor);
161  if (!m_truthParticleName.key().empty()) {
162  IDPVM::addReadDecoratorHandleKeys(*this, m_truthParticleName, empty_prefix, required_float_truth_decorations, m_floatTruthDecor);
163  IDPVM::addReadDecoratorHandleKeys(*this, m_truthParticleName, empty_prefix, required_int_truth_decorations, m_intTruthDecor);
164  }
166  IDPVM::addReadDecoratorHandleKeys(*this, m_jetContainerName, empty_prefix, required_int_jet_decorations, m_intJetDecor);
167  }
168 
170 
172  return StatusCode::SUCCESS;
173 }
174 
175 
177 
178 
179  InDetRttPlotConfig rttConfig;
180  rttConfig.detailLevel = m_detailLevel;
181 
182  rttConfig.isITk = m_isITk;
183 
188 
190  rttConfig.doHitEffPlot = m_doHitLevelPlots;
191 
196 
199 
201 
206 
208 
211 
213  if (m_truthParticleName.key().empty()){
214  rttConfig.doFakePlots = false;
215  rttConfig.doMissingTruthFakePlots = false;
216  rttConfig.doHitsFakeTracksPlots = false;
217  rttConfig.doHitsUnlinkedTracksPlots = false;
218  rttConfig.doEffPlots = false;
219  rttConfig.doResolutionPlotPrim = false;
220  rttConfig.doResolutionPlotPrim_truthFromB = false;
221  rttConfig.doResolutionPlotSecd = false;
222  rttConfig.doHitsMatchedTracksPlots = false;
223  rttConfig.doVertexTruthMatchingPlots = false;
224  rttConfig.doHardScatterVertexTruthMatchingPlots = false;
225  rttConfig.doEfficienciesPerAuthor = false;
226  rttConfig.doFakesPerAuthor = false;
227  rttConfig.doResolutionsPerAuthor = false;
228  rttConfig.doNtupleTruthToReco = false;
229  rttConfig.doTrkInJetPlots_fake_bjets = false;
230  rttConfig.doTrkInJetPlots_matched_bjets = false;
231  rttConfig.doTrkInJetPlots_unlinked_bjets = false;
232  rttConfig.doTrkInJetPlots_truthFromB = false;
233  rttConfig.doResolutionPlotPrim_truthFromB = false;
234  }
235 
237  if (m_onlyFillMatched){
238  rttConfig.doTrackParameters = false;
239  rttConfig.doNTracks = false;
240  rttConfig.doHitResidualPlot = false;
241  rttConfig.doHitEffPlot = false;
242  rttConfig.doHitsRecoTracksPlots = false;
243  rttConfig.doTrtExtensionPlots = false;
244  rttConfig.doFakePlots = false;
245  rttConfig.doMissingTruthFakePlots = false;
246  rttConfig.doHitsFakeTracksPlots = false;
247  rttConfig.doHitsUnlinkedTracksPlots = false;
248  rttConfig.doVertexPlots = false;
249  rttConfig.doVerticesVsMuPlots = false;
250  rttConfig.doHardScatterVertexPlots = false;
251  rttConfig.doVertexTruthMatchingPlots = false;
252  rttConfig.doHardScatterVertexTruthMatchingPlots = false;
253  rttConfig.doTrkInJetPlots = false;
254  rttConfig.doTrkInJetPlots_bjets = false;
255  rttConfig.doTrkInJetPlots_matched = false;
256  rttConfig.doTrkInJetPlots_matched_bjets = false;
257  rttConfig.doTrkInJetPlots_fake = false;
258  rttConfig.doTrkInJetPlots_fake_bjets = false;
259  rttConfig.doTrkInJetPlots_unlinked = false;
260  rttConfig.doTrkInJetPlots_unlinked_bjets = false;
261  rttConfig.doTrkInJetPlots_truthFromB = false;
262  }
263 
264  // For IDTIDE derivation
265  // disable the vertex plots since no covariance from IDTIDE
266  if (m_doIDTIDEPlots){
267  rttConfig.doVertexPlots = false;
268  rttConfig.doVerticesVsMuPlots = false;
269  rttConfig.doHardScatterVertexPlots = false;
270  rttConfig.doVertexTruthMatchingPlots = false;
271  rttConfig.doHardScatterVertexTruthMatchingPlots = false;
272  rttConfig.doTrkInJetPlots = true;
273  rttConfig.doTrkInJetPlots_bjets = true;
274  rttConfig.doTrkInJetPlots_matched = true;
275  rttConfig.doTrkInJetPlots_matched_bjets = true;
276  rttConfig.doTrkInJetPlots_fake = true;
277  rttConfig.doTrkInJetPlots_fake_bjets = true;
278  rttConfig.doTrkInJetPlots_unlinked = true;
279  rttConfig.doTrkInJetPlots_unlinked_bjets = true;
280  rttConfig.doTrkInJetPlots_truthFromB = true;
281  }
282 
284  if (m_detailLevel < 200){
285  rttConfig.doResolutionPlotSecd = false;
286  rttConfig.doHitsMatchedTracksPlots = false;
287  rttConfig.doHitsFakeTracksPlots = false;
288  rttConfig.doHitsUnlinkedTracksPlots = false;
289  rttConfig.doVertexTruthMatchingPlots = false;
290  rttConfig.doFakesPerAuthor = false;
291  rttConfig.doTrackParametersPerAuthor = false;
292  rttConfig.doEfficienciesPerAuthor = false;
293  rttConfig.doResolutionsPerAuthor = false;
294  rttConfig.doTrkInJetPlots_matched = false;
295  rttConfig.doTrkInJetPlots_fake = false;
296  rttConfig.doTrkInJetPlots_unlinked = false;
297  rttConfig.doTrkInJetPlots_matched_bjets = false;
298  rttConfig.doTrkInJetPlots_fake_bjets = false;
299  rttConfig.doTrkInJetPlots_unlinked_bjets = false;
300  }
301 
302  return rttConfig;
303 }
304 
307  ATH_MSG_DEBUG("Filling hists " << name() << "...");
308  // function object could be used to retrieve truth: IDPVM::CachedGetAssocTruth getTruth;
309 
310  // Get the Event Context
311  const EventContext& ctx = Gaudi::Hive::currentContext();
312 
313  // retrieve trackParticle container
315  if (not trackHandle.isValid()) {
316  ATH_MSG_ERROR("Invalid trackname = " << m_trkParticleName << "!");
317  return StatusCode::FAILURE;
318  }
319  const xAOD::TrackParticleContainer* tracks = trackHandle.cptr();
320 
321  SG::ReadHandle<xAOD::TruthPileupEventContainer> truthPileupEventContainer;
322  if( not m_truthPileUpEventName.key().empty()) {
324  }
325 
327  if (not pie.isValid()){
328  ATH_MSG_WARNING("Shouldn't happen - EventInfo is buggy, setting mu to 0");
329  }
330 
331  // FIX-ME: I'm not sure if we should stop execution if EventInfo is not valid ...
332  // it is used after as if they assume it is valid
333  if (m_useGRL and pie.isValid() and !pie->eventType(xAOD::EventInfo::IS_SIMULATION)) {
334  if (!m_grlTool->passRunLB(*pie)) {
335  ATH_MSG_VERBOSE("GRL veto");
336  return StatusCode::SUCCESS;
337  }
338  }
339 
340  std::vector<const xAOD::TruthParticle*> truthParticlesVec = getTruthParticles(ctx);
341 
342  // Mark the truth particles in our vector as "selected".
343  // This is needed because we later access the truth matching via xAOD decorations, where we do not 'know' about membership to this vector.
345  const xAOD::EventInfo *eventInfo = nullptr;
346  ATH_CHECK (evtStore()->retrieve (eventInfo, "EventInfo"));
347  IDPVM::CachedGetAssocTruth getAsTruth; // only cache one way, track->truth, not truth->tracks
348 
349  unsigned int truthMu = 0;
350  float actualMu = 0.;
351  if(not m_truthPileUpEventName.key().empty() and truthPileupEventContainer.isValid()){
352  truthMu = static_cast<int>( truthPileupEventContainer->size() );
353  }
354  if(pie.isValid()) actualMu = pie->actualInteractionsPerCrossing();
355 
356  // This is questionable but kept for backward compatibility for now
357  float puEvents = truthMu>0 ? truthMu : actualMu;
358 
359  const xAOD::Vertex* primaryvertex = nullptr;
360  unsigned int nVertices = 0;
361  float beamSpotWeight = 1;
362 
363  if(not m_vertexContainerName.key().empty()){
364  ATH_MSG_DEBUG("Getting number of pu interactings per event");
365 
366  ATH_MSG_DEBUG("Filling vertex plots");
368  ATH_CHECK(vertices.isValid());
369 
370  nVertices = not vertices->empty() ? vertices->size() : 0;
371  beamSpotWeight = pie->beamSpotWeight();
372  ATH_MSG_DEBUG("beamSpotWeight is equal to " << beamSpotWeight);
373  if(m_doPRW){
374  float prwWeight = 1;
376  if(readDecorHandle.isAvailable()) prwWeight = readDecorHandle(*pie);
377  ATH_MSG_DEBUG("Applying pileup weight equal to " << prwWeight);
378  beamSpotWeight *= prwWeight;
379  }
380 
381  if (vertices.isValid() and not vertices->empty()) {
382  ATH_MSG_DEBUG("Number of vertices retrieved for this event " << vertices->size());
383  //Find the HS vertex following the user-configured strategy
384  primaryvertex = m_hardScatterSelectionTool->getHardScatter(vertices.get());
385  if (!primaryvertex){
388  ATH_MSG_DEBUG("Failed to find a hard scatter vertex in this event.");
389  }
390  //Filling plots for all reconstructed vertices and the hard-scatter
391  ATH_MSG_DEBUG("Filling vertices info monitoring plots");
392 
393  // Fill vectors of truth HS and PU vertices
394  std::pair<std::vector<const xAOD::TruthVertex*>, std::vector<const xAOD::TruthVertex*>> truthVertices = getTruthVertices(ctx);
395  std::vector<const xAOD::TruthVertex*> truthHSVertices = truthVertices.first;
396  std::vector<const xAOD::TruthVertex*> truthPUVertices = truthVertices.second;
397 
398  // Decorate vertices
400  ATH_CHECK(m_vtxValidTool->matchVertices(*vertices));
401  ATH_MSG_DEBUG("Hard scatter classification type: " << InDetVertexTruthMatchUtils::classifyHardScatter(*vertices) << ", vertex container size = " << vertices->size());
402  }
403  m_monPlots->fill(*vertices, primaryvertex, truthHSVertices, truthPUVertices, actualMu, beamSpotWeight);
404 
405  ATH_MSG_DEBUG("Filling vertex/event info monitoring plots");
406  //Filling vertexing plots for the reconstructed hard-scatter as a function of mu
407  m_monPlots->fill(*vertices, truthMu, actualMu, beamSpotWeight);
408  } else {
409  //FIXME: Does this happen for single particles?
410  ATH_MSG_WARNING("Skipping vertexing plots.");
411  }
412  }
413 
414  if( not m_truthVertexContainerName.key().empty()){
415  // get truth vertex container name - m_truthVertexContainerName
417 
418  //
419  //Get the HS vertex position from the truthVertexContainer
420  //FIXME: Add plots w.r.t truth HS positions (vertexing plots)
421  //
422  const xAOD::TruthVertex* truthVertex = nullptr;
423  if (truthVrt.isValid()) {
424  const auto& stdVertexContainer = truthVrt->stdcont();
425  //First truth particle vertex?
426  auto findVtx = std::find_if(stdVertexContainer.rbegin(), stdVertexContainer.rend(), acceptTruthVertex);
427  truthVertex = (findVtx == stdVertexContainer.rend()) ? nullptr : *findVtx;
428  } else {
429  ATH_MSG_WARNING("Cannot open " << m_truthVertexContainerName.key() << " truth vertex container");
430  }
431  if (not truthVertex) ATH_MSG_INFO ("Truth vertex did not pass cuts");
432  }
433  //
434  //Counters for cutflow
435  //
436  unsigned int nSelectedTruthTracks(0), nSelectedRecoTracks(0), nSelectedMatchedTracks(0), nAssociatedTruth(0), nMissingAssociatedTruth(0), nTruths(0);
437 
438  CutFlow tmp_truth_cutflow( m_truthSelectionTool.get() ? m_truthSelectionTool->nCuts() : 0 );
439 
440  //
441  //Loop over all reconstructed tracks
442  //
443  // If writing ntuples, use a truth-to-track(s) cache to handle truth matching.
444  // Based on the assumption that multiple tracks can (albeit rarely) share the same truth association.
445  std::map<const xAOD::TruthParticle*, std::vector<const xAOD::TrackParticle*>> cacheTruthMatching {};
446  //
447  std::vector<const xAOD::TrackParticle*> selectedTracks {};
448  selectedTracks.reserve(tracks->size());
449  unsigned int nTrackTOT = 0;
450  unsigned int nTrackCentral = 0;
451  unsigned int nTrackPt1GeV = 0;
452  for (const auto *const thisTrack: *tracks) {
453  //FIXME: Why is this w.r.t the primary vertex?
454  const asg::AcceptData& accept = m_trackSelectionTool->accept(*thisTrack, primaryvertex);
455  if (m_useTrackSelection and not accept) continue;
456  fillTrackCutFlow(accept); //?? Is this equal???
457 
458  selectedTracks.push_back(thisTrack);
459  //Number of selected reco tracks
460  nSelectedRecoTracks++;
461 
462  //Fill plots for selected reco tracks, hits / perigee / ???
463  nTrackTOT++;
464  if (thisTrack->pt() >= (1 * Gaudi::Units::GeV))
465  nTrackPt1GeV++;
466  if (std::abs(thisTrack->eta()) < 2.5)
467  nTrackCentral++;
468  m_monPlots->fill(*thisTrack, beamSpotWeight);
469  m_monPlots->fill(*thisTrack, puEvents, nVertices, beamSpotWeight); //fill mu dependent plots
470  const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack);
471  float prob = getMatchingProbability(*thisTrack);
472 
473  // This is where the Fake, and Really Fake fillers need to go. Where would the really really fakes go?
474  if (associatedTruth) {
475  nAssociatedTruth++;
476 
477  // if there is associated truth also a truth selection tool was retrieved.
479  if (m_truthSelectionTool) {
480  //FIXME: What is this for???
481  tmp_truth_cutflow.update( passed.missingCuts() );
482  }
483 
484  if ((not std::isnan(prob)) and (prob > m_lowProb) and passed and (not m_usingSpecialPileupSwitch or isSelectedByPileupSwitch(*associatedTruth)) ) {
485  nSelectedMatchedTracks++;
486  bool truthIsFromB = false;
487  if ( m_doTruthOriginPlots and m_trackTruthOriginTool->isFrom(associatedTruth, 5) ) {
488  truthIsFromB = true;
489  }
490  m_monPlots->fill(*thisTrack, *associatedTruth, truthIsFromB, puEvents, beamSpotWeight); // Make plots requiring matched truth
491  }
492  }
493 
494  const bool isAssociatedTruth = associatedTruth != nullptr;
495  const bool isFake = not std::isnan(prob) ? (prob < m_lowProb) : true;
496 
497  if(!isAssociatedTruth) nMissingAssociatedTruth++;
498  m_monPlots->fillFakeRate(*thisTrack, isFake, isAssociatedTruth, puEvents, beamSpotWeight);
499 
501  // Decorate track particle with extra flags
502  decorateTrackParticle(*thisTrack, accept);
503 
504  if (isAssociatedTruth) {
505  // Decorate truth particle with extra flags
506  decorateTruthParticle(*associatedTruth, m_truthSelectionTool->accept(associatedTruth));
507 
508  // Cache truth-to-track associations
509  auto cachedAssoc = cacheTruthMatching.find(associatedTruth);
510  // Check if truth particle already present in cache
511  if (cachedAssoc == cacheTruthMatching.end()) {
512  // If not yet present, add truth-to-track association in cache
513  cacheTruthMatching[associatedTruth] = {thisTrack};
514  }
515  else {
516  // If already present, cache additional track associations (here multiple track particle can be linked to the same truth particle)
517  cachedAssoc->second.push_back(thisTrack);
518  }
519  }
520  else if(m_fillTruthToRecoNtuple){
521  // Fill track only entries with dummy truth values
522  m_monPlots->fillNtuple(*thisTrack, primaryvertex);
523  }
524  }
525  }
527  // Now fill all truth-to-track associations
528  // Involves some double-filling of truth particles in cases where multiple tracks share the same truth association,
529  // these duplicates can be filtered in the ntuple by selecting only the 'best matched' truth-associated track particles.
530  for (auto& cachedAssoc: cacheTruthMatching) {
531  const xAOD::TruthParticle* thisTruth = cachedAssoc.first;
532 
533  // Decorate that this truth particle is being filled to prevent double counting in truth particle loop
534  m_dec_hasTruthFilled(*thisTruth) = true;
535 
536  // Sort all associated tracks by truth match probability
537  std::sort(cachedAssoc.second.begin(), cachedAssoc.second.end(),
538  [](const xAOD::TrackParticle* t1, const xAOD::TrackParticle* t2) { return getMatchingProbability(*t1) > getMatchingProbability(*t2); }
539  );
540 
542  // Fill all tracks associated to to this truth particle, also recording 'truth match ranking' as index in probability-sorted vector of matched tracks
543  for (int itrack = 0; itrack < (int) cachedAssoc.second.size(); itrack++) {
544  const xAOD::TrackParticle* thisTrack = cachedAssoc.second[itrack];
545 
546  // Fill track entries with truth association
547  m_monPlots->fillNtuple(*thisTrack, *thisTruth, primaryvertex, itrack);
548  }
549  }
550  }
551  }
552 
553  m_monPlots->fill(nTrackTOT, nTrackCentral, nTrackPt1GeV, truthMu, actualMu, nVertices, beamSpotWeight);
554 
555  //FIXME: I don't get why... this is here
556  if (m_truthSelectionTool.get()) {
557  ATH_MSG_DEBUG( CutFlow(tmp_truth_cutflow).report(m_truthSelectionTool->names()) );
558  std::lock_guard<std::mutex> lock(m_mutex);
559  m_truthCutFlow.merge(std::move(tmp_truth_cutflow));
560  }
561 
562  //
563  //TruthParticle loop to fill efficiencies
564  //
565  for (int itruth = 0; itruth < (int) truthParticlesVec.size(); itruth++) { // Outer loop over all truth particles
566  nTruths++;
567  const xAOD::TruthParticle* thisTruth = truthParticlesVec[itruth];
568 
569  // if the vector of truth particles is not empty also a truthSelectionTool was retrieved
570  const IAthSelectionTool::CutResult accept = m_truthSelectionTool->accept(thisTruth);
571  if (accept) {
572  ++nSelectedTruthTracks; // total number of truth which pass cuts per event
573  bool isEfficient(false); // weight for the trackeff histos
574  float matchingProbability{};
575  m_monPlots->fill(*thisTruth, beamSpotWeight); // This is filling truth-only plots
576 
577  if(m_doDuplicatePlots){
578  auto cachedAssoc = cacheTruthMatching.find(thisTruth);
579  // Check if truth particle already present in cache
580  if (cachedAssoc == cacheTruthMatching.end()) {
581  // If not yet present, then no track associated
582  cacheTruthMatching[thisTruth] = {};
583  }
584  m_monPlots->fillDuplicate(*thisTruth, cacheTruthMatching[thisTruth], beamSpotWeight);
585  }
586 
587  //
588  //Loop over reco tracks to find the match
589  //
590  const xAOD::TrackParticle* matchedTrack = nullptr;
591  for (const auto& thisTrack: selectedTracks) { // Inner loop over selected track particleis
592  const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack);
593  if (associatedTruth && associatedTruth == thisTruth) {
594  float prob = getMatchingProbability(*thisTrack);
595  if (not std::isnan(prob) && prob > m_lowProb) {
596  matchingProbability = prob;
597  isEfficient = true;
598  matchedTrack = thisTrack;
599  break;
600  }
601  }
602  }
603  if (!m_setCSVName.empty()) {
604  m_datfile <<eventInfo->eventNumber()<<","<<thisTruth->pdgId()<<","<<thisTruth->px()/ Gaudi::Units::GeV<<","
605  <<thisTruth->py()/ Gaudi::Units::GeV<<","<<thisTruth->pz()/ Gaudi::Units::GeV<<","
606  <<thisTruth->e()/ Gaudi::Units::GeV<<","<<thisTruth->pt()/ Gaudi::Units::GeV<<","
607  <<thisTruth->eta()<<","<<thisTruth->phi()<<","<<thisTruth->m()/ Gaudi::Units::GeV<<","
608  <<puEvents<<","<<nVertices<<","<<matchingProbability<<std::endl;
609  }
610  if (!thisTruth){
611  ATH_MSG_ERROR("An error occurred: Truth particle for tracking efficiency calculation is a nullptr");
612  }
613  else if (isEfficient && !matchedTrack){
614  ATH_MSG_ERROR("Something went wrong - we log a truth particle as reconstructed, but the reco track is a nullptr! Bailing out... ");
615  }
616  else{
617  ATH_MSG_DEBUG("Filling efficiency plots info monitoring plots");
618  m_monPlots->fillEfficiency(*thisTruth, matchedTrack, isEfficient, truthMu, actualMu, beamSpotWeight);
620  ATH_MSG_DEBUG("Filling technical efficiency plots info monitoring plots");
621  static const SG::ConstAccessor< float > nSilHitsAcc("nSilHits");
622  if (nSilHitsAcc.isAvailable(*thisTruth)) {
623  if (nSilHitsAcc(*thisTruth) >= m_minHits.value().at(getIndexByEta(*thisTruth))){
624  m_monPlots->fillTechnicalEfficiency(*thisTruth, isEfficient,
625  truthMu, actualMu, beamSpotWeight);
626  }
627  } else {
628  ATH_MSG_DEBUG("Cannot fill technical efficiency. Missing si hit information for truth particle.");
629  }
630  }
631  }
632  }
633 
635  // Skip if already filled in track loop
636  if (hasTruthFilled(*thisTruth)) continue;
637 
638  // Decorate truth particle with extra flags
639  decorateTruthParticle(*thisTruth, accept);
640 
641  // Fill truth only entries with dummy track values
642  m_monPlots->fillNtuple(*thisTruth);
643  }
644  }
645 
646  if (nSelectedRecoTracks == nMissingAssociatedTruth) {
647  if (not m_truthParticleName.key().empty()) {
648  ATH_MSG_DEBUG("NO TRACKS had associated truth.");
649  }
650  } else {
651  ATH_MSG_DEBUG(nAssociatedTruth << " tracks out of " << tracks->size() << " had associated truth.");
652  }
653 
654  m_monPlots->fillCounter(nSelectedRecoTracks, InDetPerfPlot_nTracks::SELECTEDRECO, beamSpotWeight);
655  m_monPlots->fillCounter(tracks->size(), InDetPerfPlot_nTracks::ALLRECO, beamSpotWeight);
656  m_monPlots->fillCounter(nSelectedTruthTracks, InDetPerfPlot_nTracks::SELECTEDTRUTH, beamSpotWeight);
657  m_monPlots->fillCounter(nTruths, InDetPerfPlot_nTracks::ALLTRUTH, beamSpotWeight);
658  m_monPlots->fillCounter(nAssociatedTruth, InDetPerfPlot_nTracks::ALLASSOCIATEDTRUTH, beamSpotWeight);
659  m_monPlots->fillCounter(nSelectedMatchedTracks, InDetPerfPlot_nTracks::MATCHEDRECO, beamSpotWeight);
660 
661  // Tracking In Dense Environment
662  if (m_doTrackInJetPlots) {
664  getAsTruth,
665  truthParticlesVec,
666  *tracks,
667  primaryvertex,
668  beamSpotWeight) );
669  }
670  return StatusCode::SUCCESS;
671 }
672 
674  // Decorate outcome of track selection
676 }
677 
679  // Decorate outcome of truth selection
681 
682  // Decorate if selected by pileup switch
684 }
685 
687  if (!m_acc_hasTruthFilled.isAvailable(truth)) {
688  ATH_MSG_DEBUG("Truth particle not yet filled in ntuple");
689  return false;
690  }
691  return m_acc_hasTruthFilled(truth);
692 }
693 
695  if (!m_acc_selectedByPileupSwitch.isAvailable(truth)) {
696  ATH_MSG_DEBUG("Selected by pileup switch decoration requested from a truth particle but not available");
697  return false;
698  }
699  return m_acc_selectedByPileupSwitch(truth);
700 }
701 
702 void InDetPhysValMonitoringTool::markSelectedByPileupSwitch(const std::vector<const xAOD::TruthParticle*> & truthParticles) const{
703  for (const auto& thisTruth: truthParticles) {
704  m_dec_selectedByPileupSwitch(*thisTruth) = true;
705  }
706 }
707 
710  ATH_MSG_INFO("Booking hists " << name() << "with detailed level: " << m_detailLevel);
711  m_monPlots->initialize();
712  std::vector<HistData> hists = m_monPlots->retrieveBookedHistograms();
713  for (const auto& hist : hists) {
714  ATH_CHECK(regHist(hist.first, hist.second, all)); // ??
715  }
716  // do the same for Efficiencies, but there's a twist:
717  std::vector<EfficiencyData> effs = m_monPlots->retrieveBookedEfficiencies();
718  for (auto& eff : effs) {
719  // reg**** in the monitoring baseclass doesnt have a TEff version, but TGraph *
720  // pointers just get passed through, so we use that method after an ugly cast
721  ATH_CHECK(regGraph(reinterpret_cast<TGraph*>(eff.first), eff.second, all)); // ??
722  }
723  // register trees for ntuple writing
725  std::vector<TreeData> trees = m_monPlots->retrieveBookedTrees();
726  for (auto& t : trees) {
727  ATH_CHECK(regTree(t.first, t.second, all));
728  }
729  }
730 
731  return StatusCode::SUCCESS;
732 }
733 
736  ATH_MSG_INFO("Finalising hists " << name() << "...");
737  //TODO: ADD Printouts for Truth??
738  if (m_useTrackSelection) {
739  ATH_MSG_INFO("");
740  ATH_MSG_INFO("Now Cutflow for track cuts:");
741  ATH_MSG_INFO("");
742  for (int i = 0; i < (int) m_trackCutflow.size(); ++i) {
743  ATH_MSG_INFO("number after " << m_trackCutflowNames[i] << ": " << m_trackCutflow[i]);
744  }
745  }
746 
747  ATH_MSG_INFO("");
748  ATH_MSG_INFO("Cutflow for truth tracks:");
749  if (m_truthSelectionTool.get()) {
750  ATH_MSG_INFO("Truth selection report: " << m_truthCutFlow.report( m_truthSelectionTool->names()) );
751  }
752  if (endOfRunFlag()) {
753  m_monPlots->finalize();
754  }
755  ATH_MSG_INFO("Successfully finalized hists");
756  return StatusCode::SUCCESS;
757 }
758 
759 const std::vector<const xAOD::TruthParticle*>
760 InDetPhysValMonitoringTool::getTruthParticles(const EventContext& ctx) const {
761 
762  std::vector<const xAOD::TruthParticle*> tempVec {};
763 
764  if (m_pileupSwitch == "All") {
765  if (m_truthParticleName.key().empty()) {
766  return tempVec;
767  }
769  if (not truthParticleContainer.isValid()) {
770  return tempVec;
771  }
772  tempVec.insert(tempVec.begin(), truthParticleContainer->begin(), truthParticleContainer->end());
773  } else {
774  if (m_pileupSwitch == "HardScatter") {
775  // get truthevent container to separate out pileup and hardscatter truth particles
776  if (not m_truthEventName.key().empty()) {
778  const xAOD::TruthEvent* event = (truthEventContainer.isValid()) ? truthEventContainer->at(0) : nullptr;
779  if (not event) {
780  return tempVec;
781  }
782  const auto& links = event->truthParticleLinks();
783  tempVec.reserve(event->nTruthParticles());
784  for (const auto& link : links) {
785  if (link.isValid()){
786  tempVec.push_back(*link);
787  }
788  }
789  }
790  } else if (m_pileupSwitch == "PileUp") {
791  if (not m_truthPileUpEventName.key().empty()) {
792  ATH_MSG_VERBOSE("getting TruthPileupEvents container");
793  // get truth particles from all pileup events
795  if (truthPileupEventContainer.isValid()) {
796  const unsigned int nPileup = truthPileupEventContainer->size();
797  tempVec.reserve(nPileup * 200); // quick initial guess, will still save some time
798  for (unsigned int i(0); i != nPileup; ++i) {
799  const auto *eventPileup = truthPileupEventContainer->at(i);
800  // get truth particles from each pileup event
801  int ntruth = eventPileup->nTruthParticles();
802  ATH_MSG_VERBOSE("Adding " << ntruth << " truth particles from TruthPileupEvents container");
803  const auto& links = eventPileup->truthParticleLinks();
804  for (const auto& link : links) {
805  if (link.isValid()){
806  tempVec.push_back(*link);
807  }
808  }
809  }
810  } else {
811  ATH_MSG_ERROR("no entries in TruthPileupEvents container!");
812  }
813  }
814  } else {
815  ATH_MSG_ERROR("bad value for PileUpSwitch");
816  }
817  }
818  return tempVec;
819 }
820 
821 std::pair<const std::vector<const xAOD::TruthVertex*>, const std::vector<const xAOD::TruthVertex*>>
822 InDetPhysValMonitoringTool::getTruthVertices(const EventContext& ctx) const {
823 
824  std::vector<const xAOD::TruthVertex*> truthHSVertices = {};
825  truthHSVertices.reserve(5);
826  std::vector<const xAOD::TruthVertex*> truthPUVertices = {};
827  truthPUVertices.reserve(100);
828  const xAOD::TruthVertex* truthVtx = nullptr;
829 
830  bool doHS = false;
831  bool doPU = false;
832  if (m_pileupSwitch == "All") {
833  doHS = true;
834  doPU = true;
835  }
836  else if (m_pileupSwitch == "HardScatter") {
837  doHS = true;
838  }
839  else if (m_pileupSwitch == "PileUp") {
840  doPU = true;
841  }
842  else {
843  ATH_MSG_ERROR("Bad value for PileUpSwitch: " << m_pileupSwitch);
844  }
845 
846  if (doHS) {
847  if (not m_truthEventName.key().empty()) {
848  ATH_MSG_VERBOSE("Getting HS TruthEvents container.");
850  if (truthEventContainer.isValid()) {
851  for (const auto *const evt : *truthEventContainer) {
852  truthVtx = evt->signalProcessVertex();
853  if (truthVtx) {
854  truthHSVertices.push_back(truthVtx);
855  }
856  }
857  }
858  else {
859  ATH_MSG_ERROR("No entries in TruthEvents container!");
860  }
861  }
862  }
863 
864  if (doPU) {
865  if (not m_truthPileUpEventName.key().empty()) {
866  ATH_MSG_VERBOSE("Getting PU TruthEvents container.");
868  if (truthPileupEventContainer.isValid()) {
869  for (const auto *const evt : *truthPileupEventContainer) {
870  // Get the PU vertex
871  // In all cases tested i_vtx=2 for PU
872  // but better to keep something generic
873  truthVtx = nullptr;
874  size_t i_vtx = 0; size_t n_vtx = evt->nTruthVertices();
875  while(!truthVtx && i_vtx<n_vtx){
876  truthVtx = evt->truthVertex(i_vtx);
877  i_vtx++;
878  }
879 
880  if (truthVtx) {
881  truthPUVertices.push_back(truthVtx);
882  }
883  }
884  }
885  else {
886  ATH_MSG_DEBUG("No entries in TruthPileupEvents container");
887  }
888  }
889  }
890 
891  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);
892 
893 }
894 
895 void
898 }
899 
900 void
902  std::vector<int>& cutFlow) {
903  // initialise cutflows
904  if (cutFlow.empty()) {
905  names.emplace_back("preCut");
906  cutFlow.push_back(0);
907  for (unsigned int i = 0; i != accept.getNCuts(); ++i) {
908  cutFlow.push_back(0);
909  names.push_back((std::string) accept.getCutName(i));
910  }
911  }
912  // get cutflow
913  cutFlow[0] += 1;
914  bool cutPositive = true;
915  for (unsigned int i = 0; i != (accept.getNCuts() + 1); ++i) {
916  if (!cutPositive) {
917  continue;
918  }
919  if (accept.getCutResult(i)) {
920  cutFlow[i + 1] += 1;
921  } else {
922  cutPositive = false;
923  }
924  }
925  }
926 
928  double absEta = std::abs(truth.eta());
929  if (absEta > m_etaBins.value().back() || absEta < m_etaBins.value().front()) {
930  absEta = std::clamp(absEta, m_etaBins.value().front(), m_etaBins.value().back());
931  ATH_MSG_INFO("Requesting cut value outside of configured eta range: clamping eta = "
932  << std::abs(truth.eta()) << " to eta= " << absEta);
933  } else
934  absEta = std::clamp(absEta, m_etaBins.value().front(), m_etaBins.value().back());
935  const auto pVal = std::lower_bound(m_etaBins.value().begin(), m_etaBins.value().end(), absEta);
936  const int bin = std::distance(m_etaBins.value().begin(), pVal) - 1;
937  ATH_MSG_DEBUG("Checking (abs(eta)/bin) = (" << absEta << "," << bin << ")");
938  return bin;
939 }
940 
942  IDPVM::CachedGetAssocTruth& getAsTruth,
943  const std::vector<const xAOD::TruthParticle*>& truthParticles,
944  const xAOD::TrackParticleContainer& tracks,
945  const xAOD::Vertex* primaryvertex,
946  float beamSpotWeight) {
947  // Define accessors
948  static const SG::ConstAccessor<std::vector<ElementLink<xAOD::IParticleContainer> > > ghosttruth("GhostTruth");
949  static const SG::ConstAccessor<int> btagLabel("HadronConeExclTruthLabelID");
950 
951  if (truthParticles.empty()) {
952  ATH_MSG_WARNING("No entries in TruthParticles truth particle container. Skipping jet plots.");
953  return StatusCode::SUCCESS;
954  }
955 
957  if (not jetHandle.isValid()) {
958  ATH_MSG_WARNING("Cannot open jet container " << m_jetContainerName.key() << ". Skipping jet plots.");
959  return StatusCode::SUCCESS;
960  }
961  const xAOD::JetContainer* jets = jetHandle.cptr();
962 
963  // loop on jets
964  for (const xAOD::Jet *const thisJet: *jets) {
965  // pass jet cuts
966  if (not passJetCuts(*thisJet)) continue;
967  // check if b-jet
968  bool isBjet = false;
969  if (not btagLabel.isAvailable(*thisJet)){
970  ATH_MSG_WARNING("Failed to extract b-tag truth label from jet");
971  } else {
972  isBjet = (btagLabel(*thisJet) == 5);
973  }
974 
975  // Retrieve associated ghost truth particles
976  if(not ghosttruth.isAvailable(*thisJet)) {
977  ATH_MSG_WARNING("Failed to extract ghost truth particles from jet");
978  } else {
979  for(const ElementLink<xAOD::IParticleContainer>& el : ghosttruth(*thisJet)) {
980  if (not el.isValid()) continue;
981 
982  const xAOD::TruthParticle *truth = static_cast<const xAOD::TruthParticle*>(*el);
983  // Check delta R between track and jet axis
984  if (thisJet->p4().DeltaR(truth->p4()) > m_maxTrkJetDR) {
985  continue;
986  }
987  // Apply truth selection cuts
989  if(!accept) continue;
990 
991  bool isEfficient(false);
992 
993  for (const auto *thisTrack: tracks) {
994  if (m_useTrackSelection and not (m_trackSelectionTool->accept(*thisTrack, primaryvertex))) {
995  continue;
996  }
997 
998  const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack);
999  if (associatedTruth and associatedTruth == truth) {
1000  float prob = getMatchingProbability(*thisTrack);
1001  if (not std::isnan(prob) && prob > m_lowProb) {
1002  isEfficient = true;
1003  break;
1004  }
1005  }
1006  }
1007 
1008  bool truthIsFromB = false;
1009  if ( m_doTruthOriginPlots and m_trackTruthOriginTool->isFrom(truth, 5) ) {
1010  truthIsFromB = true;
1011  }
1012  m_monPlots->fillEfficiency(*truth, *thisJet, isEfficient, isBjet, truthIsFromB, beamSpotWeight);
1013  }
1014  } // ghost truth
1015 
1016  // loop on tracks
1017  for (const xAOD::TrackParticle *thisTrack: tracks) {
1018  if (m_useTrackSelection and not (m_trackSelectionTool->accept(*thisTrack, primaryvertex))) {
1019  continue;
1020  }
1021 
1022  if (thisJet->p4().DeltaR(thisTrack->p4()) > m_maxTrkJetDR) {
1023  continue;
1024  }
1025 
1026  float prob = getMatchingProbability(*thisTrack);
1027  if(std::isnan(prob)) prob = 0.0;
1028 
1029  const xAOD::TruthParticle* associatedTruth = getAsTruth.getTruth(thisTrack);
1030  const bool unlinked = (associatedTruth==nullptr);
1031  const bool isFake = (associatedTruth && prob < m_lowProb);
1032  bool truthIsFromB = false;
1033  if ( m_doTruthOriginPlots and m_trackTruthOriginTool->isFrom(associatedTruth, 5) ) {
1034  truthIsFromB = true;
1035  }
1036  m_monPlots->fill(*thisTrack, *thisJet, isBjet, isFake, unlinked, truthIsFromB, beamSpotWeight);
1037  if (associatedTruth){
1038  m_monPlots->fillFakeRate(*thisTrack, *thisJet, isFake, isBjet, truthIsFromB, beamSpotWeight);
1039  }
1040  }
1041 
1042  } // loop on jets
1043 
1044  return StatusCode::SUCCESS;
1045 }
1046 
1047 bool
1049  const float jetPt = jet.pt();
1050  const float jetEta = std::abs(jet.eta());
1051 
1052  if (jetEta < m_jetAbsEtaMin) return false;
1053  if (jetEta > m_jetAbsEtaMax) return false;
1054  if (jetPt < m_jetPtMin) return false;
1055  if (jetPt > m_jetPtMax) return false;
1056  return true;
1057 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
InDetPhysValMonitoringTool::m_jetPtMax
FloatProperty m_jetPtMax
Definition: InDetPhysValMonitoringTool.h:202
InDetPhysValMonitoringTool::m_dec_passedTruthSelection
SG::AuxElement::Decorator< bool > m_dec_passedTruthSelection
Definition: InDetPhysValMonitoringTool.h:108
InDetPhysValMonitoringTool::decorateTrackParticle
void decorateTrackParticle(const xAOD::TrackParticle &track, const asg::AcceptData &passed) const
Definition: InDetPhysValMonitoringTool.cxx:673
InDetPhysValMonitoringTool::getIndexByEta
int getIndexByEta(const xAOD::TruthParticle &truth) const
Utility function for evaluation of technical efficiency.
Definition: InDetPhysValMonitoringTool.cxx:927
InDetPhysValMonitoringTool::m_fillTechnicalEfficiency
BooleanProperty m_fillTechnicalEfficiency
Definition: InDetPhysValMonitoringTool.h:186
InDetPhysValMonitoringTool::m_jetAbsEtaMin
FloatProperty m_jetAbsEtaMin
Definition: InDetPhysValMonitoringTool.h:199
InDetPhysValMonitoringTool::m_pileupSwitch
StringProperty m_pileupSwitch
Definition: InDetPhysValMonitoringTool.h:192
InDetPhysValMonitoringTool::m_usingSpecialPileupSwitch
bool m_usingSpecialPileupSwitch
Definition: InDetPhysValMonitoringTool.h:223
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
InDetPhysValMonitoringTool::m_grlTool
ToolHandle< IGoodRunsListSelectionTool > m_grlTool
Definition: InDetPhysValMonitoringTool.h:211
InDetPhysValMonitoringTool::m_datfile
std::ofstream m_datfile
Definition: InDetPhysValMonitoringTool.h:219
InDetPhysValMonitoringTool::m_hardScatterSelectionTool
ToolHandle< InDet::IInDetHardScatterSelectionTool > m_hardScatterSelectionTool
Definition: InDetPhysValMonitoringTool.h:210
InDetPhysValMonitoringTool::m_trackSelectionTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelectionTool
Definition: InDetPhysValMonitoringTool.h:206
InDetPhysValMonitoringTool::m_monPlots
std::unique_ptr< InDetRttPlots > m_monPlots
histograms
Definition: InDetPhysValMonitoringTool.h:170
get_generator_info.result
result
Definition: get_generator_info.py:21
NSWL1::nVertices
int nVertices(const Polygon &p)
Definition: GeoUtils.cxx:35
InDetPhysValMonitoringTool::m_minHits
IntegerArrayProperty m_minHits
Definition: InDetPhysValMonitoringTool.h:197
InDetPhysValMonitoringTool::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: InDetPhysValMonitoringTool.cxx:709
InDetRttPlotConfig::doResolutionsPerAuthor
bool doResolutionsPerAuthor
Definition: InDetRttPlots.h:105
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.
xAOD::TruthParticle_v1::pz
float pz() const
The z component of the particle's momentum.
InDetSecVtxTruthMatchUtils::isFake
bool isFake(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:60
InDetRttPlotConfig::doTrkInJetPlots_matched_bjets
bool doTrkInJetPlots_matched_bjets
Definition: InDetRttPlots.h:94
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:73
InDetRttPlotConfig::doResolutionPlotSecd
bool doResolutionPlotSecd
Definition: InDetRttPlots.h:78
IAthSelectionTool::CutResult
Definition: IAthSelectionTool.h:30
InDetPhysValMonitoringTool::m_useGRL
BooleanProperty m_useGRL
Definition: InDetPhysValMonitoringTool.h:184
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
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:1547
InDetRttPlotConfig::doHitsUnlinkedTracksPlots
bool doHitsUnlinkedTracksPlots
Definition: InDetRttPlots.h:66
InDetPhysValMonitoringTool::m_maxTrkJetDR
FloatProperty m_maxTrkJetDR
Definition: InDetPhysValMonitoringTool.h:189
InDetRttPlotConfig::doHardScatterVertexTruthMatchingPlots
bool doHardScatterVertexTruthMatchingPlots
Definition: InDetRttPlots.h:88
InDetRttPlotConfig::doHardScatterVertexPlots
bool doHardScatterVertexPlots
Definition: InDetRttPlots.h:84
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:138
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:1048
InDetRttPlotConfig::doNTracks
bool doNTracks
Definition: InDetRttPlots.h:56
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
xAOD::TruthParticle_v1::px
float px() const
The x component of the particle's momentum.
InDetRttPlotConfig::doTrtExtensionPlots
bool doTrtExtensionPlots
Definition: InDetRttPlots.h:60
bin
Definition: BinsDiffFromStripMedian.h:43
defineDB.jets
jets
Definition: JetTagCalibration/share/defineDB.py:24
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:760
InDetPhysValMonitoringTool::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: InDetPhysValMonitoringTool.cxx:306
InDetPhysValMonitoringTool::m_acc_selectedByPileupSwitch
SG::AuxElement::Accessor< bool > m_acc_selectedByPileupSwitch
Definition: InDetPhysValMonitoringTool.h:110
athena.value
value
Definition: athena.py:124
InDetPhysValMonitoringTool::m_useTrackSelection
BooleanProperty m_useTrackSelection
Properties to fine-tune the tool behaviour.
Definition: InDetPhysValMonitoringTool.h:173
InDetPhysValMonitoringTool::m_intTruthDecor
std::vector< SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > > m_intTruthDecor
Definition: InDetPhysValMonitoringTool.h:166
InDetRttPlotConfig::doTrkInJetPlots_unlinked_bjets
bool doTrkInJetPlots_unlinked_bjets
Definition: InDetRttPlots.h:98
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:1491
xAOD::TruthParticle_v1::py
float py() const
The y component of the particle's momentum.
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:150
InDetRttPlotConfig::doHitEffPlot
bool doHitEffPlot
Definition: InDetRttPlots.h:58
InDetRttPlotConfig::doTrkInJetPlots_truthFromB
bool doTrkInJetPlots_truthFromB
Definition: InDetRttPlots.h:99
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:57
InDetRttPlotConfig::doTrkInJetPlots
bool doTrkInJetPlots
Plots for tracks in jets.
Definition: InDetRttPlots.h:91
InDetPhysValMonitoringTool::m_jetAbsEtaMax
FloatProperty m_jetAbsEtaMax
Definition: InDetPhysValMonitoringTool.h:200
covarianceTool.prob
prob
Definition: covarianceTool.py:678
InDetRttPlotConfig::doTrkInJetPlots_matched
bool doTrkInJetPlots_matched
Definition: InDetRttPlots.h:93
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:167
InDetPhysValMonitoringTool::m_truthVertexContainerName
SG::ReadHandleKey< xAOD::TruthVertexContainer > m_truthVertexContainerName
Truth vertex container's name.
Definition: InDetPhysValMonitoringTool.h:146
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
xAOD::TruthVertex_v1::y
float y() const
Vertex y displacement.
InDetPhysValMonitoringTool::m_jetPtMin
FloatProperty m_jetPtMin
Definition: InDetPhysValMonitoringTool.h:201
InDetPhysValMonitoringTool::m_lowProb
FloatProperty m_lowProb
Definition: InDetPhysValMonitoringTool.h:194
CutFlow::update
void update(bool)
Definition: CutFlow.h:192
InDetRttPlotConfig::doFakesPerAuthor
bool doFakesPerAuthor
Definition: InDetRttPlots.h:103
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:159
InDetPhysValMonitoringTool::m_dec_passedTrackSelection
SG::AuxElement::Decorator< bool > m_dec_passedTrackSelection
Definition: InDetPhysValMonitoringTool.h:109
InDetPhysValMonitoringTool.h
InDetPhysValMonitoringTool::m_truthPileUpEventName
SG::ReadHandleKey< xAOD::TruthPileupEventContainer > m_truthPileUpEventName
Definition: InDetPhysValMonitoringTool.h:156
InDetPhysValMonitoringTool::isSelectedByPileupSwitch
bool isSelectedByPileupSwitch(const xAOD::TruthParticle &truth) const
Definition: InDetPhysValMonitoringTool.cxx:694
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
InDetVertexTruthMatchUtils.h
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
InDetPhysValMonitoringTool::markSelectedByPileupSwitch
void markSelectedByPileupSwitch(const std::vector< const xAOD::TruthParticle * > &truthParticles) const
Definition: InDetPhysValMonitoringTool.cxx:702
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CachedGetAssocTruth.h
xAOD::TruthParticle_v1::e
virtual double e() const override final
The total energy of the particle.
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:617
InDetRttPlotConfig::doTrkInJetPlots_bjets
bool doTrkInJetPlots_bjets
Definition: InDetRttPlots.h:92
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:221
lumiFormat.i
int i
Definition: lumiFormat.py:85
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:77
InDetRttPlots.h
InDetRttPlotConfig::doFakePlots
bool doFakePlots
Fake plots (and unlinked)
Definition: InDetRttPlots.h:63
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
InDetPhysValMonitoringTool::initialize
virtual StatusCode initialize()
Definition: InDetPhysValMonitoringTool.cxx:116
InDetPhysValMonitoringTool::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: InDetPhysValMonitoringTool.cxx:735
InDetPhysValMonitoringTool::getFilledPlotConfig
InDetRttPlotConfig getFilledPlotConfig() const
Generate an Rtt config struct based on the user-passed properties.
Definition: InDetPhysValMonitoringTool.cxx:176
TrackCollection.h
InDetPhysValMonitoringTool::m_floatTrkDecor
std::vector< SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > > m_floatTrkDecor
Definition: InDetPhysValMonitoringTool.h:163
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:208
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
hist_file_dump.f
f
Definition: hist_file_dump.py:141
InDetPhysValMonitoringTool::m_vertexContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerName
Primary vertex container's name.
Definition: InDetPhysValMonitoringTool.h:142
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:153
InDetRttPlotConfig::doTrkInJetPlots_fake_bjets
bool doTrkInJetPlots_fake_bjets
Definition: InDetRttPlots.h:96
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
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:102
inRange
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
Definition: LArSCIdVsIdTest.cxx:5
InDetRttPlotConfig::doNtupleTruthToReco
bool doNtupleTruthToReco
Ntuple functionality.
Definition: InDetRttPlots.h:108
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:71
InDetPhysValMonitoringTool::fillCutFlow
static void fillCutFlow(const asg::AcceptData &accept, std::vector< std::string > &names, std::vector< int > &cutFlow)
Definition: InDetPhysValMonitoringTool.cxx:901
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
InDetRttPlotConfig::doHitsMatchedTracksPlots
bool doHitsMatchedTracksPlots
Definition: InDetRttPlots.h:79
InDetRttPlotConfig::doResolutionPlotPrim
bool doResolutionPlotPrim
Resolution and "matched track" plots - filled if both reco and truth exist.
Definition: InDetRttPlots.h:76
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDetPhysValMonitoringTool::m_weight_pileup_key
SG::ReadDecorHandleKey< xAOD::EventInfo > m_weight_pileup_key
Definition: InDetPhysValMonitoringTool.h:213
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
InDetRttPlotConfig::doVertexTruthMatchingPlots
bool doVertexTruthMatchingPlots
Vertexing plots - truth requirement.
Definition: InDetRttPlots.h:87
InDetPhysValMonitoringTool::m_dirName
StringProperty m_dirName
Definition: InDetPhysValMonitoringTool.h:190
InDetRttPlotConfig::doMissingTruthFakePlots
bool doMissingTruthFakePlots
Definition: InDetRttPlots.h:64
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:174
InDetRttPlotConfig::doTechEffPlots
bool doTechEffPlots
Definition: InDetRttPlots.h:72
IDPVM::safelyGetEta
float safelyGetEta(const T &pTrk, const float safePtThreshold=0.1)
Safely get eta.
Definition: InDetPhysValMonitoringUtilities.h:56
InDetPhysValMonitoringTool::m_setCSVName
StringProperty m_setCSVName
Definition: InDetPhysValMonitoringTool.h:193
InDetRttPlotConfig::doVerticesVsMuPlots
bool doVerticesVsMuPlots
Definition: InDetRttPlots.h:83
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:941
InDetPhysValMonitoringTool::decorateTruthParticle
void decorateTruthParticle(const xAOD::TruthParticle &truth, const IAthSelectionTool::CutResult &passed) const
Definition: InDetPhysValMonitoringTool.cxx:678
TrackStateValidationContainer.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
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:209
TrackParticle.h
DataVector::stdcont
const PtrVector & stdcont() const
Return the underlying std::vector of the container.
InDetRttPlotConfig::doHitsRecoTracksPlots
bool doHitsRecoTracksPlots
Definition: InDetRttPlots.h:59
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:164
InDetPhysValMonitoringTool::m_dec_hasTruthFilled
SG::AuxElement::Decorator< bool > m_dec_hasTruthFilled
Definition: InDetPhysValMonitoringTool.h:107
InDetRttPlotConfig::doEffPlots
bool doEffPlots
Efficiency and duplicate plots - require truth, optionally matching reco
Definition: InDetRttPlots.h:70
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:896
InDetRttPlotConfig::doTrkInJetPlots_fake
bool doTrkInJetPlots_fake
Definition: InDetRttPlots.h:95
xAOD::TruthParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: TruthParticle_v1.cxx:181
InDetRttPlotConfig::detailLevel
int detailLevel
detail level (kept for compatibility)
Definition: InDetRttPlots.h:111
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:134
ManagedMonitorToolBase::endOfRunFlag
bool endOfRunFlag() const
Definition: ManagedMonitorToolBase.h:797
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:55
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
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:207
ManagedMonitorToolBase::all
@ all
Definition: ManagedMonitorToolBase.h:115
InDetPhysValMonitoringTool::m_etaBins
DoubleArrayProperty m_etaBins
Definition: InDetPhysValMonitoringTool.h:196
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:822
InDetPhysValMonitoringTool::m_folder
StringProperty m_folder
Definition: InDetPhysValMonitoringTool.h:191
TauGNNUtils::Variables::absEta
bool absEta(const xAOD::TauJet &tau, double &out)
Definition: TauGNNUtils.cxx:244
InDetPhysValMonitoringTool::m_doBjetPlots
BooleanProperty m_doBjetPlots
Definition: InDetPhysValMonitoringTool.h:179
InDetPhysValMonitoringTool::m_floatTruthDecor
std::vector< SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > > m_floatTruthDecor
Definition: InDetPhysValMonitoringTool.h:165
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:166
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
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
ManagedMonitorToolBase::m_detailLevel
unsigned int m_detailLevel
Definition: ManagedMonitorToolBase.h:836
InDetPhysValMonitoringTool::m_mutex
std::mutex m_mutex
Definition: InDetPhysValMonitoringTool.h:215
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
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
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
ITrackSelectorTool.h
asg::AcceptData
Definition: AcceptData.h:30
InDetPhysValMonitoringTool::hasTruthFilled
bool hasTruthFilled(const xAOD::TruthParticle &truth) const
Definition: InDetPhysValMonitoringTool.cxx:686
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.
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:220
InDetRttPlotConfig::doVertexPlots
bool doVertexPlots
Vertexing plots - no truth requirement.
Definition: InDetRttPlots.h:82
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:1346
xAOD::TruthParticle_v1::m
virtual double m() const override final
The mass of the particle.
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:65
InDetRttPlotConfig::doTrackParametersPerAuthor
bool doTrackParametersPerAuthor
Definition: InDetRttPlots.h:104
InDetPhysValMonitoringTool::m_doDuplicatePlots
BooleanProperty m_doDuplicatePlots
Definition: InDetPhysValMonitoringTool.h:175
InDetPhysValMonitoringTool::m_acc_hasTruthFilled
SG::AuxElement::Accessor< bool > m_acc_hasTruthFilled
Definition: InDetPhysValMonitoringTool.h:106
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:111
InDetPhysValMonitoringTool::m_isITk
BooleanProperty m_isITk
Definition: InDetPhysValMonitoringTool.h:204
InDetRttPlotConfig::isITk
bool isITk
Definition: InDetRttPlots.h:52
InDetRttPlotConfig::doTrkInJetPlots_unlinked
bool doTrkInJetPlots_unlinked
Definition: InDetRttPlots.h:97