ATLAS Offline Software
Loading...
Searching...
No Matches
RecoMuonPlotOrganizer.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7namespace Muon{
8
9 RecoMuonPlotOrganizer::RecoMuonPlotOrganizer(PlotBase* pParent, const std::string& sDir, std::vector<int> selPlots):
10 PlotBase(pParent, sDir) {
11
12 if (selPlots.empty()) {
13 for (unsigned int i=0; i<MAX_RECOPLOTCLASS; i++) m_selPlots.push_back(i);
14 }
15 else m_selPlots = std::move(selPlots);
16
17 for (int p: m_selPlots) {
18 switch (p) {
19 case MUON_TRKPARAM:
20 m_oTrkParamPlots = std::make_unique<Trk::ParamPlots>(this, "/kinematics/", "RecoMuon");
21 break;
22 case MUON_PARAM:
23 m_oMuonParamPlots = std::make_unique<Muon::MuonParamPlots>(this,"/parameters/");
24 break;
25 case MUON_RECOINFO:
26 m_oMuRecoInfoPlots = std::make_unique<Muon::RecoInfoPlots>(this, "/parameters/");
27 break;
28 case MUON_TRKIMPACT:
29 m_oImpactPlots = std::make_unique<Trk::ImpactPlots>(this, "/parameters/");
30 break;
31 case MUON_MOMPULLS:
32 m_oMomentumPullPlots = std::make_unique<Muon::MomentumPullPlots>(this, "/momentumPulls/");
33 break;
34 case MUON_HITS:
35 m_oMuonHitSummaryPlots = std::make_unique<Muon::MuonHitSummaryPlots>(this,"/hits/");
36 break;
37 case MUON_IDHITS:
38 m_oIDHitPlots = std::make_unique<Muon::IDHitSummaryPlots>(this,"/hits/");
39 break;
40 case MUON_ISO:
41 m_oMuonIsolationPlots = std::make_unique<Muon::MuonIsolationPlots>(this,"/isolation/");
42 break;
44 m_oChargeParamPlotsLowPt = std::make_unique<Muon::ChargeDepParamPlots>(this, "/kinematics/", "lowPt");
45 m_oChargeParamPlotsHighPt = std::make_unique<Muon::ChargeDepParamPlots>(this, "/kinematics/", "highPt");
46 break;
47 }
48 }
49}
50
52
53void RecoMuonPlotOrganizer::fill(const xAOD::Muon& mu, float weight) {
54 if (m_oIDHitPlots && (mu.inDetTrackParticleLink().isValid())) m_oIDHitPlots->fill(*mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle), weight);
55 if (m_oTrkParamPlots) m_oTrkParamPlots->fill(mu,weight);
56 if (m_oMuonParamPlots) m_oMuonParamPlots->fill(mu,weight);
57 if (m_oMuRecoInfoPlots) m_oMuRecoInfoPlots->fill(mu,weight);
58 if (m_oMomentumPullPlots) m_oMomentumPullPlots->fill(mu,weight);
60 if (m_oMuonIsolationPlots) m_oMuonIsolationPlots->fill(mu,weight);
62 if (mu.pt()<8000) m_oChargeParamPlotsLowPt->fill(mu,weight);
63 else m_oChargeParamPlotsHighPt->fill(mu,weight);
64 }
65
66 // tracking related plots
67 const xAOD::TrackParticle* primaryTrk = mu.trackParticle(xAOD::Muon::Primary);
68 if (!primaryTrk) return;
69 if (m_oImpactPlots) m_oImpactPlots->fill(*primaryTrk,weight);
70}
71
72}
std::unique_ptr< Muon::MuonIsolationPlots > m_oMuonIsolationPlots
RecoMuonPlotOrganizer(PlotBase *pParent, const std::string &sDir, std::vector< int > selPlots={})
std::unique_ptr< Muon::MomentumPullPlots > m_oMomentumPullPlots
std::unique_ptr< Muon::ChargeDepParamPlots > m_oChargeParamPlotsHighPt
std::unique_ptr< Trk::ImpactPlots > m_oImpactPlots
std::unique_ptr< Muon::MuonParamPlots > m_oMuonParamPlots
std::unique_ptr< Muon::RecoInfoPlots > m_oMuRecoInfoPlots
std::unique_ptr< Trk::ParamPlots > m_oTrkParamPlots
std::unique_ptr< Muon::MuonHitSummaryPlots > m_oMuonHitSummaryPlots
void fill(const xAOD::Muon &mu, float weight=1.0)
std::unique_ptr< Muon::ChargeDepParamPlots > m_oChargeParamPlotsLowPt
std::unique_ptr< Muon::IDHitSummaryPlots > m_oIDHitPlots
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version: