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