ATLAS Offline Software
Loading...
Searching...
No Matches
RecoMuonTrackPlotOrganizer.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
10 PlotBase* pParent, const std::string& sDir, std::vector<int> selPlots)
11 : PlotBase(pParent, sDir) {
12
13 if (selPlots.empty()) {
14 m_selPlots.clear();
15 for (unsigned int i = 0; i < MAX_RECOTRKPLOTCLASS; i++) {
16 m_selPlots.push_back(i);
17 }
18 } else {
19 m_selPlots = std::move(selPlots);
20 }
21
22 for (int p : m_selPlots) {
23 switch (p) {
24 case TRK_PARAM:
25 m_oTrkParamPlots = std::make_unique<Trk::ParamPlots>(
26 this, "/kinematics/", "RecoMuon");
27 break;
28 case TRK_RECOINFO:
29 m_oTrkRecoInfoPlots = std::make_unique<Trk::RecoInfoPlots>(
30 this, "/parameters/", "RecoMuon");
31 break;
32 case TRK_IMPACT:
33 m_oImpactPlots =
34 std::make_unique<Trk::ImpactPlots>(this, "/parameters/");
35 break;
36 case TRK_MSHITS:
37 m_oMSHitPlots =
38 std::make_unique<Trk::MSHitPlots>(this, "/hits/");
39 break;
40 case TRK_IDHITS:
41 m_oIDHitPlots =
42 std::make_unique<Muon::IDHitSummaryPlots>(this, "/hits/");
43 break;
44 }
45 }
46}
47
48RecoMuonTrackPlotOrganizer::~RecoMuonTrackPlotOrganizer() = default;
49
51 float weight) {
52 if (m_oTrkParamPlots) {
53 m_oTrkParamPlots->fill(tp, weight);
54 }
56 m_oTrkRecoInfoPlots->fill(tp, weight);
57 }
58 if (m_oImpactPlots) {
59 m_oImpactPlots->fill(tp, weight);
60 }
61 if (m_oMSHitPlots) {
62 m_oMSHitPlots->fill(tp, weight);
63 }
64 if (m_oIDHitPlots) {
65 m_oIDHitPlots->fill(tp, weight);
66 }
67}
68
69} // namespace Muon
std::unique_ptr< Trk::MSHitPlots > m_oMSHitPlots
std::unique_ptr< Trk::RecoInfoPlots > m_oTrkRecoInfoPlots
std::unique_ptr< Trk::ImpactPlots > m_oImpactPlots
std::unique_ptr< Muon::IDHitSummaryPlots > m_oIDHitPlots
void fill(const xAOD::TrackParticle &tp, float weight=1.0)
std::unique_ptr< Trk::ParamPlots > m_oTrkParamPlots
RecoMuonTrackPlotOrganizer(PlotBase *pParent, const std::string &sDir, std::vector< int > selPlots={})
PlotBase(PlotBase *parent, std::string_view 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: