56 BOOST_THROW_EXCEPTION( runtime_error(__func__ +
" should only be called for MC"s) );
58 double rEvW =
rEv->Weight(v),
59 gEvW = (*gEv)->Weight(v);
61 for (
const auto& [rec_it,gen_it]:
matching->match_its) {
63 double genpt = gen_it->CorrPt(v),
64 geny = gen_it->AbsRap();
67 auto igenbin =
obs.
genBinning->GetGlobalBinNumber(genpt,geny);
69 double gJetW = gen_it->Weight(v);
71 if (goodGen) v.gen->Fill(igenbin, gEvW * gJetW);
73 double recpt = rec_it->CorrPt(v),
74 recy = rec_it->AbsRap();
77 auto irecbin =
obs.
recBinning->GetGlobalBinNumber(recpt,recy);
79 double rJetW = rec_it->Weight(v);
81 if ( goodRec && goodGen) { v.RM ->Fill(igenbin, irecbin, gEvW * gJetW * rEvW * rJetW );
82 v.missNoMatch->Fill(igenbin, gEvW * gJetW * (1 - rEvW * rJetW)); }
83 else if (!goodRec && goodGen) v.missOut ->Fill(igenbin, gEvW * gJetW );
84 else if ( goodRec && !goodGen) v.fakeOut ->Fill( irecbin, gEvW * gJetW * rEvW * rJetW );
87 for (
const auto& gen_it:
matching->miss_its) {
89 double pt = gen_it->CorrPt(v),
93 double gJetW = gen_it->Weight(v);
96 v.missNoMatch->Fill(igenbin, gEvW * gJetW);
97 v.gen ->Fill(igenbin, gEvW * gJetW);
100 for (
const auto& rec_it:
matching->fake_its) {
102 double pt = rec_it->CorrPt(v),
103 y = rec_it->AbsRap();
106 double rJetW = rec_it->Weight(v);
109 v.fakeNoMatch->Fill(irecbin, gEvW * rEvW * rJetW);