17 #include "GaudiKernel/ISvcLocator.h"
18 #include "GaudiKernel/Service.h"
25 const std::string& dirName,
26 const std::string& anaTag,
27 const std::string&
chain,
29 PlotMgr( dirName, anaTag, pParent ),
30 m_anaTag( anaTag ), m_chain(
chain ),
31 m_directory( dirName ), m_trkAnaDefSvc( nullptr ) { }
39 ATH_MSG_DEBUG(
"Initialising in directory: " << m_directory );
42 if( not m_trkAnaDefSvc ) {
43 ISvcLocator* svcLoc = Gaudi::svcLocator();
44 ATH_CHECK( svcLoc->service(
"TrkAnaDefSvc"+m_anaTag, m_trkAnaDefSvc ) );
48 if( m_trkAnaDefSvc->plotTrackParameters() ) {
49 m_plots_trkParam_vsTest = std::make_unique< TrackParametersPlots >(
50 this,
"Tracks/Parameters", m_anaTag, m_trkAnaDefSvc->testTag() );
51 m_plots_trkParam_vsRef = std::make_unique< TrackParametersPlots >(
52 this,
"Tracks/Parameters", m_anaTag, m_trkAnaDefSvc->referenceTag() );
56 if( m_trkAnaDefSvc->plotEfficiencies() ) {
57 m_plots_eff_vsTest = std::make_unique< EfficiencyPlots >(
58 this,
"Tracks/Efficiencies", m_anaTag, m_trkAnaDefSvc->testTag() );
59 m_plots_eff_vsRef = std::make_unique< EfficiencyPlots >(
60 this,
"Tracks/Efficiencies", m_anaTag, m_trkAnaDefSvc->referenceTag() );
64 if( m_trkAnaDefSvc->plotResolutions() ) {
65 m_plots_resolution = std::make_unique< ResolutionPlots >(
66 this,
"Tracks/Resolutions", m_anaTag, m_trkAnaDefSvc->referenceTag() );
70 if( m_trkAnaDefSvc->plotOfflineElectrons() ) {
71 m_plots_offEle = std::make_unique< OfflineElectronPlots >(
72 this,
"Tracks/Parameters", m_anaTag );
73 if( m_trkAnaDefSvc->plotEfficiencies() ) {
74 m_plots_eff_vsOffEle = std::make_unique< OfflineElectronPlots >(
75 this,
"Tracks/Efficiencies", m_anaTag,
true );
82 return StatusCode::SUCCESS;
93 if( m_trkAnaDefSvc->isTestTruth() ) {
104 if( m_trkAnaDefSvc->isReferenceTruth() ) {
114 return StatusCode::SUCCESS;
121 template<
typename PARTICLE >
123 const std::vector< const PARTICLE* >&
particles,
128 if( m_plots_trkParam_vsTest ) {
135 if( m_plots_eff_vsTest ) {
140 if( m_trkAnaDefSvc->isTestOffline() ) {
141 if( m_plots_offEle ) {
144 if( m_plots_eff_vsOffEle ) {
151 return StatusCode::SUCCESS;
156 const std::vector< const xAOD::TrackParticle* >&
particles,
157 const ITrackMatchingLookup& matches,
float weight );
161 const std::vector< const xAOD::TruthParticle* >&
particles,
162 const ITrackMatchingLookup& matches,
float weight );
168 template<
typename PARTICLE >
170 const std::vector< const PARTICLE* >&
particles,
175 if( m_plots_trkParam_vsRef ) {
182 if( m_plots_eff_vsRef ) {
186 if( m_plots_resolution ) {
188 if( m_trkAnaDefSvc->isTestTruth() ) {
189 ATH_CHECK( m_plots_resolution->fillPlots(
192 ATH_CHECK( m_plots_resolution->fillPlots(
199 if( m_trkAnaDefSvc->isReferenceOffline() ) {
200 if( m_plots_offEle ) {
203 if( m_plots_eff_vsOffEle ) {
210 return StatusCode::SUCCESS;
215 const std::vector< const xAOD::TrackParticle* >&
particles,
216 const ITrackMatchingLookup& matches,
float weight );
220 const std::vector< const xAOD::TruthParticle* >&
particles,
221 const ITrackMatchingLookup& matches,
float weight );