16 std::vector<unsigned int> authors,
bool isData,
bool doBinnedResolutionPlots,
17 bool doSeparateSAFMuons,
bool doMuonTree) :
39 std::vector<int> allPlotCategories(0);
40 std::vector<int> selectedPlotCategories(0);
42 allPlotCategories.emplace_back(i);
53 this,
"reco/" + sQuality, (sQuality ==
"Medium" || sQuality ==
"Tight") ? allPlotCategories : selectedPlotCategories));
56 bool doBinnedPlots =
false;
57 if (sQuality ==
"Medium") doBinnedPlots =
true;
66 if (sAuthor ==
"CaloTag") sAuthor =
"CaloTagTight";
101 xAOD::Muon::Quality muqual = mu.quality();
110 if (mu.parameter(ipar, xAOD::Muon::CaloMuonIDTag)) { ; }
111 if (ipar < 11)
continue;
115 if (mu.muonType() != (xAOD::Muon::MuonType)xAOD::Muon::SiliconAssociatedForwardMuon || !
m_doSeparateSAFMuons)
121 if (mu.muonType() == (xAOD::Muon::MuonType)xAOD::Muon::SiliconAssociatedForwardMuon)
147 if ((mu) && (truthMu)) {
157 xAOD::Muon::Quality muqual = mu->quality();
168 if (mu->parameter(ipar, xAOD::Muon::CaloMuonIDTag)) { ; }
169 if (ipar < 11)
continue;
197 if (mu)
m_MuonTree->fillRecoMuonBranches(*mu);
205 m_MuonTree->fillEventBranches(eventInfo, isData);
211 static const std::array<std::string,6> hitTypes{
"innerSmallHits",
"innerLargeHits",
"middleSmallHits",
212 "middleLargeHits",
"outerSmallHits",
"outerLargeHits"};
216 bool hasEnoughPrecHits =
false;
218 for (
const auto& hitTypeItr : hitTypes) {
220 nPrecHits += acc.withDefault (truthMu, 0);
221 if (nPrecHits >= minPrecHits) {
222 hasEnoughPrecHits =
true;
226 return (hasEnoughPrecHits);
ElementLink< xAOD::MuonContainer > MuonLink
Helper class to provide constant type-safe access to aux data.
ElementLink< xAOD::TrackParticleContainer > TrackLink
ElementLink implementation for ROOT usage.
bool isGoodTruthTrack(const xAOD::TruthParticle &truthMu)
void fill(const xAOD::Muon &mu, float weight=1.0)
std::unique_ptr< Muon::MuonTree > m_MuonTree
std::unique_ptr< Muon::RecoMuonPlotOrganizer > m_oRecoMuonPlots
void fillTreeBranches(const xAOD::Muon &mu)
std::vector< int > m_selectedWPs
std::vector< std::unique_ptr< Muon::TruthMuonPlotOrganizer > > m_oTruthMuonPlots
void fillRecoMuonPlots(const xAOD::Muon &mu, float weight=1.0)
std::unique_ptr< Muon::TruthRelatedMuonPlotOrganizer > m_oTruthRelatedMuonPlots
void fillTree(const xAOD::EventInfo *eventInfo, bool isData)
std::vector< std::unique_ptr< Muon::RecoMuonPlotOrganizer > > m_oRecoMuonPlots_perAuthor
std::vector< std::string > m_truthSelections
std::vector< std::unique_ptr< Muon::TruthRelatedMuonPlotOrganizer > > m_oTruthRelatedMuonPlots_perAuthor
virtual ~MuonValidationPlots()
bool m_doSeparateSAFMuons
std::vector< std::unique_ptr< Muon::TruthRelatedMuonPlotOrganizer > > m_oTruthRelatedMuonPlots_perQuality
Muon::MuonTree * getMuonTree()
std::vector< unsigned int > m_selectedAuthors
std::vector< std::unique_ptr< Muon::RecoMuonPlotOrganizer > > m_oRecoMuonPlots_SiAssocFwrdMu
std::vector< std::unique_ptr< Muon::RecoMuonPlotOrganizer > > m_oRecoMuonPlots_perQuality
void fillTruthMuonPlots(const xAOD::TruthParticle &truthMu, float weight=1.0)
MuonValidationPlots(PlotBase *pParent, const std::string &sDir, std::vector< int > wps, std::vector< unsigned int > authors, bool isData, bool doBinnedResolutionPlots, bool doSplitSAFMuons, bool doMuonTree=false)
std::vector< std::unique_ptr< Muon::TruthRelatedMuonPlotOrganizer > > m_oTruthRelatedMuonPlots_SiAssocFwrdMu
PlotBase(PlotBase *parent, const std::string &sDir)
Helper class to provide constant type-safe access to aux data.
static const char * toString(Muon::EnumDefs::DetRegion reg)
EventInfo_v1 EventInfo
Definition of the latest event info version.
TruthParticle_v1 TruthParticle
Typedef to implementation.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Muon_v1 Muon
Reference the current persistent version: