#include <BF.h>
◆ BFFiller()
Constructor.
47 ,
rEv(reader,
"recEvent")
◆ fillMC()
See Filler::fillMC
- Todo:
- no weight for gen photons?
Reimplemented from Filler.
118 BOOST_THROW_EXCEPTION( runtime_error(__func__ +
" should only be called for MC"s) );
120 auto rEvW =
rEv ->Weight(v),
121 gEvW = (*gEv)->Weight(v);
123 optional<int> igenbin;
124 optional<double> genZW;
128 float mass = dimuon.CorrP4(v).M();
129 genZW = dimuon.Weight(v);
131 if (goodMass(mass)) {
133 if (*igenbin == 0)
cerr <<
red << mass <<
'\n' <<
def;
135 else if (mass >= 40 &&
genPhotons->GetSize() > 0) {
141 for (
size_t i = 0; i <
genPhotons->GetSize(); ++i) {
143 if (!
p.zAncestor)
continue;
144 if (
p.p4.Pt() < 20)
continue;
145 if (abs(
p.p4.Eta()) >= 2.5)
continue;
152 if (found && goodMass(mass)) {
154 if (*igenbin == 0)
cerr <<
red << mass <<
'\n' <<
def;
160 if (igenbin) v.gen->Fill(*igenbin, gEvW * *genZW);
164 v.RM ->Fill(*igenbin, *
irecbin, gEvW * *genZW * rEvW * *
recZW);
165 v.missOut->Fill(*igenbin, gEvW * *genZW * (1 - rEvW * *
recZW));
166 }
else if (igenbin && !
irecbin)
168 v.missOut->Fill(*igenbin, gEvW * *genZW );
◆ fillRec()
See Filler::fillRec
Reimplemented from Filler.
57 if (!dimuon)
return {};
59 double evW =
rEv->Weight(v);
60 if (
obs.
isMC) evW *= (*gEv)->Weight(v);
62 float mass = dimuon.CorrP4(v).M();
63 recZW = dimuon.Weight(v);
81 for (
size_t i = 0; i <
recPhotons.GetSize(); ++i) {
84 if (
p.CorrPt(v) < 20)
continue;
85 if (abs(
p.p4.Eta()) > 2.5)
continue;
87 bool tooClose =
false;
88 for (
size_t j = 0; j <
recMuons.GetSize(); ++j) {
90 using ROOT::Math::VectorUtil::DeltaR;
91 tooClose |= DeltaR(
p.p4,m.
p4) < 0.1;
93 if (tooClose)
continue;
101 if (found && goodMass(mass)) {
◆ match()
◆ genMuons
std::optional<TTreeReaderArray<GenMuon> > genMuons |
◆ genPhotons
std::optional<TTreeReaderArray<GenPhoton> > genPhotons |
◆ gEv
std::optional<TTreeReaderValue<GenEvent> > gEv |
◆ irecbin
std::optional<int> irecbin |
|
private |
◆ obs
Backreference to the observable.
◆ recMuons
◆ recPhotons
◆ recZW
std::optional<float> recZW |
|
private |
◆ rEv
The documentation for this struct was generated from the following files:
- /builds/cms-analysis/general/DasAnalysisSystem/Core/Installer/Core/Unfolding/interface/BF.h
- /builds/cms-analysis/general/DasAnalysisSystem/Core/Installer/Core/Unfolding/src/BF.cc