16 std::vector<unsigned int> authors,
bool isData,
bool doBinnedResolutionPlots,
17 bool doSeparateSAFMuons,
bool doMuonTree) :
19 m_selectedWPs(std::move(wps)),
20 m_selectedAuthors(std::move(authors)),
21 m_truthSelections(2,
""),
22 m_oTruthRelatedMuonPlots(nullptr),
24 m_doSeparateSAFMuons(doSeparateSAFMuons),
39 std::vector<int> allPlotCategories(0);
40 std::vector<int> selectedPlotCategories(0);
42 allPlotCategories.emplace_back(
i);
51 std::string sQuality = Muon::EnumDefs::toString((xAOD::Muon::Quality)
m_selectedWPs[
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;
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);