ATLAS Offline Software
TrackAnalysisPlotsMgr.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETTRACKPERFMON_TRACKANALYSISPLOTSMGR_H
6 #define INDETTRACKPERFMON_TRACKANALYSISPLOTSMGR_H
7 
19 
22 #include "PlotMgr.h"
24 #include "plots/EfficiencyPlots.h"
26 #include "plots/ResolutionPlots.h"
27 #include "plots/FakeRatePlots.h"
30 #include "plots/NtracksPlots.h"
31 
33 #include <string>
34 #include <memory>
35 #include <vector>
36 
37 
38 namespace IDTPM {
39 
41  class TrackAnalysisCollections;
42  class ITrackMatchingLookup;
43 
44  class TrackAnalysisPlotsMgr : public PlotMgr {
45 
46  public :
47 
49  TrackAnalysisPlotsMgr( const std::string& dirName,
50  const std::string& anaTag,
51  const std::string& chain,
52  PlotMgr* pParent = nullptr );
53 
55  virtual ~TrackAnalysisPlotsMgr() = default;
56 
59 
61  const std::string& anaTag() const { return m_anaTag; }
62  const std::string& chain() const { return m_chain; }
63  const std::string& directory() const { return m_directory; }
64 
66  StatusCode fill( TrackAnalysisCollections& trkAnaColls, float weight=1.0 );
67 
70  template< typename PARTICLE >
72  const std::vector< const PARTICLE* >& particles,
73  const ITrackMatchingLookup& matches,
74  float truthMu=0., float actualMu=0., float weight=1.0 );
75 
78  template< typename PARTICLE >
80  const std::vector< const PARTICLE* >& particles,
81  const ITrackMatchingLookup& matches,
82  float truthMu=0., float actualMu=0., float weight=1.0 );
83 
86  const std::vector< const xAOD::TrackParticle* >& testTracks,
87  const std::vector< const xAOD::TrackParticle* >& refTracks,
88  const std::vector< const xAOD::TruthParticle* >& truths,
89  const ITrackMatchingLookup& matches,
90  float truthMu=0., float actualMu=0., float weight=1.0 );
91 
92  private :
93 
94  std::string m_anaTag;
95  std::string m_chain;
96  std::string m_directory;
97 
99  SmartIF<ITrackAnalysisDefinitionSvc> m_trkAnaDefSvc;
100 
103  std::unique_ptr< TrackParametersPlots > m_plots_trkParam_vsTest;
104  std::unique_ptr< EfficiencyPlots > m_plots_eff_vsTest;
105  std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsTest;
106  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnTrk_vsTest;
107  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnMatchedTrk;
108  std::unique_ptr< NtracksPlots > m_plots_nTracks_test;
110  std::unique_ptr< TrackParametersPlots > m_plots_trkParam_vsRef;
111  std::unique_ptr< EfficiencyPlots > m_plots_eff_vsRef;
112  std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsRef;
113  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnTrk_vsRef;
114  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnMatchedTrk_vsRef;
115  std::unique_ptr< NtracksPlots > m_plots_nTracks_ref;
117  std::unique_ptr< EfficiencyPlots > m_plots_eff_vsTruth;
118  std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsTruth;
120  std::unique_ptr< ResolutionPlots > m_plots_resolution;
122  std::unique_ptr< FakeRatePlots > m_plots_fakeRate;
123  std::unique_ptr< FakeRatePlots > m_plots_missingTruth;
124  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnFakeTrk;
125  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnUnlinkedTrk;
127  std::unique_ptr< DuplicateRatePlots > m_plots_duplRate;
129  std::unique_ptr< OfflineElectronPlots > m_plots_offEle;
130  std::unique_ptr< OfflineElectronPlots > m_plots_eff_vsOffEle;
131 
132  }; // class TrackAnalysisPlotsMgr
133 
134 } // namespace IDTPM
135 
136 #endif // > !INDETTRACKPERFMON_TRACKANALYSISPLOTSMGR_H
IDTPM::TrackAnalysisPlotsMgr::chain
const std::string & chain() const
Definition: TrackAnalysisPlotsMgr.h:62
IDTPM::TrackAnalysisPlotsMgr::m_plots_tech_eff_vsTruth
std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsTruth
Definition: TrackAnalysisPlotsMgr.h:118
ITrackAnalysisDefinitionSvc.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_trkParam_vsTest
std::unique_ptr< TrackParametersPlots > m_plots_trkParam_vsTest
Plot categories plots w.r.t.
Definition: TrackAnalysisPlotsMgr.h:103
IDTPM::TrackAnalysisCollections
Definition: TrackAnalysisCollections.h:44
ResolutionPlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnTrk_vsTest
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnTrk_vsTest
Definition: TrackAnalysisPlotsMgr.h:106
FakeRatePlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnUnlinkedTrk
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnUnlinkedTrk
Definition: TrackAnalysisPlotsMgr.h:125
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnMatchedTrk
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnMatchedTrk
Definition: TrackAnalysisPlotsMgr.h:107
IDTPM::TrackAnalysisPlotsMgr::m_chain
std::string m_chain
Definition: TrackAnalysisPlotsMgr.h:95
IDTPM::TrackAnalysisPlotsMgr::fillPlotsTruth
StatusCode fillPlotsTruth(const std::vector< const xAOD::TrackParticle * > &testTracks, const std::vector< const xAOD::TrackParticle * > &refTracks, const std::vector< const xAOD::TruthParticle * > &truths, const ITrackMatchingLookup &matches, float truthMu=0., float actualMu=0., float weight=1.0)
Fill efficiency plots w.r.t. truth (for EFTruthMatch only)
Definition: TrackAnalysisPlotsMgr.cxx:469
IDTPM::TrackAnalysisPlotsMgr::m_plots_eff_vsTruth
std::unique_ptr< EfficiencyPlots > m_plots_eff_vsTruth
plots w.r.t. efficiency plots w.r.t. truth (for EFTruthMatch only)
Definition: TrackAnalysisPlotsMgr.h:117
IDTPM::TrackAnalysisPlotsMgr::m_plots_fakeRate
std::unique_ptr< FakeRatePlots > m_plots_fakeRate
fake rate plots (only when reference=truth)
Definition: TrackAnalysisPlotsMgr.h:122
IDTPM::TrackAnalysisPlotsMgr::m_plots_resolution
std::unique_ptr< ResolutionPlots > m_plots_resolution
resolution plots
Definition: TrackAnalysisPlotsMgr.h:120
IDTPM::TrackAnalysisPlotsMgr::m_plots_nTracks_ref
std::unique_ptr< NtracksPlots > m_plots_nTracks_ref
Definition: TrackAnalysisPlotsMgr.h:115
IDTPM::TrackAnalysisPlotsMgr::m_anaTag
std::string m_anaTag
Definition: TrackAnalysisPlotsMgr.h:94
TrackParametersPlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_nTracks_test
std::unique_ptr< NtracksPlots > m_plots_nTracks_test
Definition: TrackAnalysisPlotsMgr.h:108
IDTPM::TrackAnalysisPlotsMgr::m_plots_tech_eff_vsRef
std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsRef
Definition: TrackAnalysisPlotsMgr.h:112
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
NtracksPlots.h
IDTPM::TrackAnalysisPlotsMgr::~TrackAnalysisPlotsMgr
virtual ~TrackAnalysisPlotsMgr()=default
Destructor.
IDTPM::PlotMgr
Definition: PlotMgr.h:33
IDTPM::TrackAnalysisPlotsMgr::m_plots_eff_vsRef
std::unique_ptr< EfficiencyPlots > m_plots_eff_vsRef
Definition: TrackAnalysisPlotsMgr.h:111
IDTPM::TrackAnalysisPlotsMgr::m_trkAnaDefSvc
SmartIF< ITrackAnalysisDefinitionSvc > m_trkAnaDefSvc
TrackAnalysis definition service to "hold" the histograms configurations/flags.
Definition: TrackAnalysisPlotsMgr.h:99
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PlotMgr.h
Derived class to give extra capabilities to TrkValHistUtils/PlotBase.h such as ATH_MSG and an easier ...
HitsOnTracksPlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_missingTruth
std::unique_ptr< FakeRatePlots > m_plots_missingTruth
Definition: TrackAnalysisPlotsMgr.h:123
IDTPM::TrackAnalysisPlotsMgr::m_plots_duplRate
std::unique_ptr< DuplicateRatePlots > m_plots_duplRate
duplicate rate plots
Definition: TrackAnalysisPlotsMgr.h:127
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnFakeTrk
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnFakeTrk
Definition: TrackAnalysisPlotsMgr.h:124
IDTPM::TrackAnalysisPlotsMgr::fillPlotsTest
StatusCode fillPlotsTest(const std::vector< const PARTICLE * > &particles, const ITrackMatchingLookup &matches, float truthMu=0., float actualMu=0., float weight=1.0)
Fill all plots w.r.t.
Definition: TrackAnalysisPlotsMgr.cxx:244
EfficiencyPlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_trkParam_vsRef
std::unique_ptr< TrackParametersPlots > m_plots_trkParam_vsRef
plots w.r.t. reference tracks parameters
Definition: TrackAnalysisPlotsMgr.h:110
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
IDTPM::TrackAnalysisPlotsMgr::m_plots_eff_vsOffEle
std::unique_ptr< OfflineElectronPlots > m_plots_eff_vsOffEle
Definition: TrackAnalysisPlotsMgr.h:130
IDTPM::TrackAnalysisPlotsMgr::m_directory
std::string m_directory
Definition: TrackAnalysisPlotsMgr.h:96
DuplicateRatePlots.h
OfflineElectronPlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnTrk_vsRef
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnTrk_vsRef
Definition: TrackAnalysisPlotsMgr.h:113
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnMatchedTrk_vsRef
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnMatchedTrk_vsRef
Definition: TrackAnalysisPlotsMgr.h:114
IDTPM::TrackAnalysisPlotsMgr::m_plots_tech_eff_vsTest
std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsTest
Definition: TrackAnalysisPlotsMgr.h:105
TrackParticle.h
IDTPM::TrackAnalysisPlotsMgr
Definition: TrackAnalysisPlotsMgr.h:44
IDTPM::TrackAnalysisPlotsMgr::TrackAnalysisPlotsMgr
TrackAnalysisPlotsMgr(const std::string &dirName, const std::string &anaTag, const std::string &chain, PlotMgr *pParent=nullptr)
Constructor.
Definition: TrackAnalysisPlotsMgr.cxx:25
IDTPM::TrackAnalysisPlotsMgr::fill
StatusCode fill(TrackAnalysisCollections &trkAnaColls, float weight=1.0)
General fill method.
Definition: TrackAnalysisPlotsMgr.cxx:165
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
IDTPM::TrackAnalysisPlotsMgr::initialize
StatusCode initialize()
initialize
Definition: TrackAnalysisPlotsMgr.cxx:38
IDTPM::ITrackMatchingLookup
Definition: ITrackMatchingLookup.h:30
IDTPM::TrackAnalysisPlotsMgr::directory
const std::string & directory() const
Definition: TrackAnalysisPlotsMgr.h:63
IDTPM
Athena include(s).
Definition: IPlotsDefinitionSvc.h:25
TruthParticle.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_offEle
std::unique_ptr< OfflineElectronPlots > m_plots_offEle
plots w.r.t. reference offline electron
Definition: TrackAnalysisPlotsMgr.h:129
IDTPM::TrackAnalysisPlotsMgr::anaTag
const std::string & anaTag() const
return members
Definition: TrackAnalysisPlotsMgr.h:61
IDTPM::TrackAnalysisPlotsMgr::fillPlotsReference
StatusCode fillPlotsReference(const std::vector< const PARTICLE * > &particles, const ITrackMatchingLookup &matches, float truthMu=0., float actualMu=0., float weight=1.0)
Fill all plots w.r.t.
Definition: TrackAnalysisPlotsMgr.cxx:368
IDTPM::TrackAnalysisPlotsMgr::m_plots_eff_vsTest
std::unique_ptr< EfficiencyPlots > m_plots_eff_vsTest
Definition: TrackAnalysisPlotsMgr.h:104