28 ATH_MSG_DEBUG(
"Filling muon truth monitoring histograms for " <<
name() <<
"...");
35 return StatusCode::FAILURE;
58 bool passed_EF =
false;
59 bool passed_L1 =
false;
63 std::size_t index_i =
chain.find(
"mu")+2;
64 std::size_t index_f =
chain.find(
"_", index_i+1);
65 if (index_f <
chain.length()) {
66 pT_cut = std::stod(
chain.substr(index_i, index_f - index_i));
69 pT_cut = std::stod(
chain.substr(index_i,
chain.length()-1));
71 pT_cut = pT_cut + 1.0;
73 for (
const auto truthMu : *truthMuons) {
78 if(std::abs(
eta) > 2.5)
continue;
82 if(std::abs(
eta) < 1.05){
83 truthBarrelPt = truthMu->pt()/1
e3;
87 truthEndcapPt = truthMu->pt()/1
e3;
98 std::string msonly =
"msonly";
100 if(
chain.find(msonly) != std::string::npos){
108 if(efmuon && passed_EF){
109 MatchedEFCBtruthPt = truthMu->pt()/1
e3;
111 if(std::abs(
eta) < 1.05){
112 MatchedEFCBtruthBarrelPt = truthMu->pt()/1
e3;
116 MatchedEFCBtruthEndcapPt = truthMu->pt()/1
e3;
120 MatchedEFCBtruthEta = truthMu->eta();
121 MatchedEFCBtruthPhi = truthMu->phi();
123 fill(
m_group+
"_"+
chain, MatchedEFCBtruthEta, MatchedEFCBtruthPhi, MatchedEFCBtruthIntPerBC);
127 if(l1muon && passed_L1){
128 MatchedL1truthPt = truthMu->pt()/1
e3;
130 if(std::abs(
eta) < 1.05){
131 MatchedL1truthBarrelPt = truthMu->pt()/1
e3;
135 MatchedL1truthEndcapPt = truthMu->pt()/1
e3;
139 MatchedL1truthEta = truthMu->eta();
140 MatchedL1truthPhi = truthMu->phi();
142 fill(
m_group+
"_"+
chain, MatchedL1truthEta, MatchedL1truthPhi, MatchedL1truthIntPerBC);
146 if((l1muon && passed_L1) && !(passed_EF && efmuon)){
150 if(!(passed_L1 && l1muon) && (passed_EF && efmuon)){
159 return StatusCode::SUCCESS;