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"
32 
34 #include <string>
35 #include <memory>
36 #include <vector>
37 
38 
39 namespace IDTPM {
40 
42  class TrackAnalysisCollections;
43  class ITrackMatchingLookup;
44 
45  class TrackAnalysisPlotsMgr : public PlotMgr {
46 
47  public :
48 
50  TrackAnalysisPlotsMgr( const std::string& dirName,
51  const std::string& anaTag,
52  const std::string& chain,
53  PlotMgr* pParent = nullptr );
54 
56  virtual ~TrackAnalysisPlotsMgr() = default;
57 
60 
62  const std::string& anaTag() const { return m_anaTag; }
63  const std::string& chain() const { return m_chain; }
64  const std::string& directory() const { return m_directory; }
65 
67  StatusCode fill( TrackAnalysisCollections& trkAnaColls, float weight=1.0 );
68 
72  template< typename PARTICLE, typename VERTEX >
74  const std::vector< const PARTICLE* >& particles,
75  const ITrackMatchingLookup& matches,
76  const std::vector< const VERTEX* >& vertices,
77  float truthMu=0., float actualMu=0., float weight=1.0 );
78 
82  template< typename PARTICLE, typename VERTEX >
84  const std::vector< const PARTICLE* >& particles,
85  const ITrackMatchingLookup& matches,
86  const std::vector< const VERTEX* >& vertices,
87  float truthMu=0., float actualMu=0., float weight=1.0 );
88 
91  const std::vector< const xAOD::TrackParticle* >& testTracks,
92  const std::vector< const xAOD::TrackParticle* >& refTracks,
93  const std::vector< const xAOD::TruthParticle* >& truths,
94  const ITrackMatchingLookup& matches,
95  float truthMu=0., float actualMu=0., float weight=1.0 );
96 
97  private :
98 
99  std::string m_anaTag;
100  std::string m_chain;
101  std::string m_directory;
102 
104  SmartIF< ITrackAnalysisDefinitionSvc > m_trkAnaDefSvc;
105 
108  std::unique_ptr< TrackParametersPlots > m_plots_trkParam_vsTest;
109  std::unique_ptr< EfficiencyPlots > m_plots_eff_vsTest;
110  std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsTest;
111  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnTrk_vsTest;
112  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnMatchedTrk;
113  std::unique_ptr< NtracksPlots > m_plots_nTracks_vsTest;
115  std::unique_ptr< TrackParametersPlots > m_plots_trkParam_vsRef;
116  std::unique_ptr< EfficiencyPlots > m_plots_eff_vsRef;
117  std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsRef;
118  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnTrk_vsRef;
119  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnMatchedTrk_vsRef;
120  std::unique_ptr< NtracksPlots > m_plots_nTracks_vsRef;
122  std::unique_ptr< EfficiencyPlots > m_plots_eff_vsTruth;
123  std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsTruth;
125  std::unique_ptr< ResolutionPlots > m_plots_resolution;
127  std::unique_ptr< FakeRatePlots > m_plots_fakeRate;
128  std::unique_ptr< FakeRatePlots > m_plots_missingTruth;
129  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnFakeTrk;
130  std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnUnlinkedTrk;
132  std::unique_ptr< DuplicateRatePlots > m_plots_duplRate;
134  std::unique_ptr< OfflineElectronPlots > m_plots_offEle;
135  std::unique_ptr< OfflineElectronPlots > m_plots_eff_vsOffEle;
137  std::unique_ptr< VertexParametersPlots > m_plots_vtxParam_vsTest;
138  std::unique_ptr< VertexParametersPlots > m_plots_nVtxParam_vsTest;
140  std::unique_ptr< VertexParametersPlots > m_plots_vtxParam_vsRef;
141  std::unique_ptr< VertexParametersPlots > m_plots_nVtxParam_vsRef;
142 
143  }; // class TrackAnalysisPlotsMgr
144 
145 } // namespace IDTPM
146 
147 #endif // > !INDETTRACKPERFMON_TRACKANALYSISPLOTSMGR_H
IDTPM::TrackAnalysisPlotsMgr::chain
const std::string & chain() const
Definition: TrackAnalysisPlotsMgr.h:63
IDTPM::TrackAnalysisPlotsMgr::m_plots_tech_eff_vsTruth
std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsTruth
Definition: TrackAnalysisPlotsMgr.h:123
IDTPM::TrackAnalysisPlotsMgr::m_plots_vtxParam_vsRef
std::unique_ptr< VertexParametersPlots > m_plots_vtxParam_vsRef
plots w.r.t. reference vertices parameters
Definition: TrackAnalysisPlotsMgr.h:140
ITrackAnalysisDefinitionSvc.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_nTracks_vsRef
std::unique_ptr< NtracksPlots > m_plots_nTracks_vsRef
Definition: TrackAnalysisPlotsMgr.h:120
IDTPM::TrackAnalysisPlotsMgr::m_plots_trkParam_vsTest
std::unique_ptr< TrackParametersPlots > m_plots_trkParam_vsTest
Plot categories plots w.r.t.
Definition: TrackAnalysisPlotsMgr.h:108
IDTPM::TrackAnalysisCollections
Definition: TrackAnalysisCollections.h:46
ResolutionPlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnTrk_vsTest
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnTrk_vsTest
Definition: TrackAnalysisPlotsMgr.h:111
FakeRatePlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnUnlinkedTrk
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnUnlinkedTrk
Definition: TrackAnalysisPlotsMgr.h:130
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnMatchedTrk
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnMatchedTrk
Definition: TrackAnalysisPlotsMgr.h:112
IDTPM::TrackAnalysisPlotsMgr::m_chain
std::string m_chain
Definition: TrackAnalysisPlotsMgr.h:100
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:580
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:122
IDTPM::TrackAnalysisPlotsMgr::m_plots_fakeRate
std::unique_ptr< FakeRatePlots > m_plots_fakeRate
fake rate plots (only when reference=truth)
Definition: TrackAnalysisPlotsMgr.h:127
IDTPM::TrackAnalysisPlotsMgr::m_plots_resolution
std::unique_ptr< ResolutionPlots > m_plots_resolution
resolution plots
Definition: TrackAnalysisPlotsMgr.h:125
IDTPM::TrackAnalysisPlotsMgr::m_anaTag
std::string m_anaTag
Definition: TrackAnalysisPlotsMgr.h:99
TrackParametersPlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_nVtxParam_vsTest
std::unique_ptr< VertexParametersPlots > m_plots_nVtxParam_vsTest
Definition: TrackAnalysisPlotsMgr.h:138
IDTPM::TrackAnalysisPlotsMgr::m_plots_tech_eff_vsRef
std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsRef
Definition: TrackAnalysisPlotsMgr.h:117
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
IDTPM::TrackAnalysisPlotsMgr::fillPlotsTest
StatusCode fillPlotsTest(const std::vector< const PARTICLE * > &particles, const ITrackMatchingLookup &matches, const std::vector< const VERTEX * > &vertices, float truthMu=0., float actualMu=0., float weight=1.0)
Fill all plots w.r.t.
Definition: TrackAnalysisPlotsMgr.cxx:274
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:116
IDTPM::TrackAnalysisPlotsMgr::fillPlotsReference
StatusCode fillPlotsReference(const std::vector< const PARTICLE * > &particles, const ITrackMatchingLookup &matches, const std::vector< const VERTEX * > &vertices, float truthMu=0., float actualMu=0., float weight=1.0)
Fill all plots w.r.t.
Definition: TrackAnalysisPlotsMgr.cxx:443
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:128
IDTPM::TrackAnalysisPlotsMgr::m_plots_duplRate
std::unique_ptr< DuplicateRatePlots > m_plots_duplRate
duplicate rate plots
Definition: TrackAnalysisPlotsMgr.h:132
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnFakeTrk
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnFakeTrk
Definition: TrackAnalysisPlotsMgr.h:129
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:115
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:135
IDTPM::TrackAnalysisPlotsMgr::m_directory
std::string m_directory
Definition: TrackAnalysisPlotsMgr.h:101
DuplicateRatePlots.h
OfflineElectronPlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_vtxParam_vsTest
std::unique_ptr< VertexParametersPlots > m_plots_vtxParam_vsTest
plots w.r.t. test vertices parameters
Definition: TrackAnalysisPlotsMgr.h:137
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnTrk_vsRef
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnTrk_vsRef
Definition: TrackAnalysisPlotsMgr.h:118
IDTPM::TrackAnalysisPlotsMgr::m_plots_hitsOnMatchedTrk_vsRef
std::unique_ptr< HitsOnTracksPlots > m_plots_hitsOnMatchedTrk_vsRef
Definition: TrackAnalysisPlotsMgr.h:119
IDTPM::TrackAnalysisPlotsMgr::m_plots_tech_eff_vsTest
std::unique_ptr< EfficiencyPlots > m_plots_tech_eff_vsTest
Definition: TrackAnalysisPlotsMgr.h:110
TrackParticle.h
IDTPM::TrackAnalysisPlotsMgr
Definition: TrackAnalysisPlotsMgr.h:45
IDTPM::TrackAnalysisPlotsMgr::m_plots_nVtxParam_vsRef
std::unique_ptr< VertexParametersPlots > m_plots_nVtxParam_vsRef
Definition: TrackAnalysisPlotsMgr.h:141
IDTPM::TrackAnalysisPlotsMgr::TrackAnalysisPlotsMgr
TrackAnalysisPlotsMgr(const std::string &dirName, const std::string &anaTag, const std::string &chain, PlotMgr *pParent=nullptr)
Constructor.
Definition: TrackAnalysisPlotsMgr.cxx:26
IDTPM::TrackAnalysisPlotsMgr::fill
StatusCode fill(TrackAnalysisCollections &trkAnaColls, float weight=1.0)
General fill method.
Definition: TrackAnalysisPlotsMgr.cxx:199
IDTPM::TrackAnalysisPlotsMgr::m_trkAnaDefSvc
SmartIF< ITrackAnalysisDefinitionSvc > m_trkAnaDefSvc
TrackAnalysis definition service to "hold" the histograms configurations/flags.
Definition: TrackAnalysisPlotsMgr.h:104
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
IDTPM::TrackAnalysisPlotsMgr::initialize
StatusCode initialize()
initialize
Definition: TrackAnalysisPlotsMgr.cxx:39
IDTPM::ITrackMatchingLookup
Definition: ITrackMatchingLookup.h:30
IDTPM::TrackAnalysisPlotsMgr::directory
const std::string & directory() const
Definition: TrackAnalysisPlotsMgr.h:64
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:134
IDTPM::TrackAnalysisPlotsMgr::anaTag
const std::string & anaTag() const
return members
Definition: TrackAnalysisPlotsMgr.h:62
VertexParametersPlots.h
IDTPM::TrackAnalysisPlotsMgr::m_plots_nTracks_vsTest
std::unique_ptr< NtracksPlots > m_plots_nTracks_vsTest
Definition: TrackAnalysisPlotsMgr.h:113
IDTPM::TrackAnalysisPlotsMgr::m_plots_eff_vsTest
std::unique_ptr< EfficiencyPlots > m_plots_eff_vsTest
Definition: TrackAnalysisPlotsMgr.h:109