ATLAS Offline Software
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 
7 namespace 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;
43  case MUON_CHARGEPARAM:
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 
54  if (m_oIDHitPlots && (mu.inDetTrackParticleLink().isValid())) m_oIDHitPlots->fill(*mu.trackParticle(xAOD::Muon::InnerDetectorTrackParticle), weight);
62  if (mu.pt()<8000) m_oChargeParamPlotsLowPt->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 }
Muon::RecoMuonPlotOrganizer::m_oMuonParamPlots
std::unique_ptr< Muon::MuonParamPlots > m_oMuonParamPlots
Definition: RecoMuonPlotOrganizer.h:40
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
PlotBase
Definition: PlotBase.h:33
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
Muon::RecoMuonPlotOrganizer::m_oTrkParamPlots
std::unique_ptr< Trk::ParamPlots > m_oTrkParamPlots
Definition: RecoMuonPlotOrganizer.h:38
Muon::RecoMuonPlotOrganizer::m_oIDHitPlots
std::unique_ptr< Muon::IDHitSummaryPlots > m_oIDHitPlots
Definition: RecoMuonPlotOrganizer.h:37
Muon::RecoMuonPlotOrganizer::m_oMuonHitSummaryPlots
std::unique_ptr< Muon::MuonHitSummaryPlots > m_oMuonHitSummaryPlots
Definition: RecoMuonPlotOrganizer.h:43
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
Muon::RecoMuonPlotOrganizer::~RecoMuonPlotOrganizer
~RecoMuonPlotOrganizer()
Muon::MUON_TRKIMPACT
@ MUON_TRKIMPACT
Definition: RecoMuonPlotOrganizer.h:25
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
Muon::MUON_PARAM
@ MUON_PARAM
Definition: RecoMuonPlotOrganizer.h:25
RecoMuonPlotOrganizer.h
InDet::ExclusiveOrigin::Primary
@ Primary
Definition: InDetTrackTruthOriginDefs.h:163
Muon::RecoMuonPlotOrganizer::m_oMuRecoInfoPlots
std::unique_ptr< Muon::RecoInfoPlots > m_oMuRecoInfoPlots
Definition: RecoMuonPlotOrganizer.h:41
Muon::RecoMuonPlotOrganizer::m_oMomentumPullPlots
std::unique_ptr< Muon::MomentumPullPlots > m_oMomentumPullPlots
Definition: RecoMuonPlotOrganizer.h:42
Muon::RecoMuonPlotOrganizer::m_oChargeParamPlotsLowPt
std::unique_ptr< Muon::ChargeDepParamPlots > m_oChargeParamPlotsLowPt
Definition: RecoMuonPlotOrganizer.h:45
lumiFormat.i
int i
Definition: lumiFormat.py:92
Muon::RecoMuonPlotOrganizer::m_oMuonIsolationPlots
std::unique_ptr< Muon::MuonIsolationPlots > m_oMuonIsolationPlots
Definition: RecoMuonPlotOrganizer.h:44
Muon::RecoMuonPlotOrganizer::m_oChargeParamPlotsHighPt
std::unique_ptr< Muon::ChargeDepParamPlots > m_oChargeParamPlotsHighPt
Definition: RecoMuonPlotOrganizer.h:46
Muon::MUON_HITS
@ MUON_HITS
Definition: RecoMuonPlotOrganizer.h:25
Muon::MUON_IDHITS
@ MUON_IDHITS
Definition: RecoMuonPlotOrganizer.h:25
Muon::MUON_ISO
@ MUON_ISO
Definition: RecoMuonPlotOrganizer.h:25
Muon::MUON_TRKPARAM
@ MUON_TRKPARAM
Definition: RecoMuonPlotOrganizer.h:25
Muon::MUON_MOMPULLS
@ MUON_MOMPULLS
Definition: RecoMuonPlotOrganizer.h:25
Muon::RecoMuonPlotOrganizer::m_oImpactPlots
std::unique_ptr< Trk::ImpactPlots > m_oImpactPlots
Definition: RecoMuonPlotOrganizer.h:39
Muon::RecoMuonPlotOrganizer::m_selPlots
std::vector< int > m_selPlots
Definition: RecoMuonPlotOrganizer.h:32
Muon::MUON_RECOINFO
@ MUON_RECOINFO
Definition: RecoMuonPlotOrganizer.h:25
Muon::RecoMuonPlotOrganizer::fill
void fill(const xAOD::Muon &mu, float weight=1.0)
Definition: RecoMuonPlotOrganizer.cxx:53
Muon::MUON_CHARGEPARAM
@ MUON_CHARGEPARAM
Definition: RecoMuonPlotOrganizer.h:25
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Muon::MAX_RECOPLOTCLASS
@ MAX_RECOPLOTCLASS
Definition: RecoMuonPlotOrganizer.h:25
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
Muon::RecoMuonPlotOrganizer::RecoMuonPlotOrganizer
RecoMuonPlotOrganizer(PlotBase *pParent, const std::string &sDir, std::vector< int > selPlots={})
Definition: RecoMuonPlotOrganizer.cxx:9