183 cout << __func__ <<
' ' << slice <<
" start" << endl;
186 auto tIn = flow.GetInputTree(slice);
187 auto [fOut, tOut] = flow.GetOutput(output);
191 auto isMC = metainfo.Get<
bool>(
"flags",
"isMC");
193 auto gEv = flow.GetBranchReadOnly<GenEvent>(
"genEvent");
194 auto rEv = flow.GetBranchReadOnly<RecEvent>(
"recEvent");
196 auto recJets = flow.GetBranchReadOnly<vector<RecJet>>(
"recJets");
197 auto genJets =
isMC ? flow.GetBranchReadOnly<vector<GenJet>>(
"genJets") :
nullptr;
202 for (
DT::Looper looper(tIn); looper(); ++looper) {
206 auto MNJets = GetMNJet<RecJet>(*recJets, [](RecJet jet){
return jet.CorrPt() < 35;});
208 double recy = std::abs( MNJets->first.p4.Eta() - MNJets->second.p4.Eta() );
209 bool LowRecY = recy <
minY,
210 HighRecY = recy >=
maxY;
211 bool goodRec = (!LowRecY) && (!HighRecY)
212 && MNJets->first.p4.Eta() <
maxy && MNJets->second.p4.Eta() <
maxy
213 &&
minpt < MNJets->first.CorrPt() && MNJets->first.CorrPt() <
maxpt
214 &&
minpt < MNJets->second.CorrPt() && MNJets->second.CorrPt() <
maxpt;
217 double evweight = rEv->weights.front();
218 if (
isMC) evweight *= gEv->weights.front();
219 recHist.Fill(*recJets, evweight);
220 Obs2Jets obs2jets(MNJets->first, MNJets->second);
221 auto minijets =
GetMiniJets(*recJets, *MNJets,
function<
bool(RecJet&)>([](RecJet& jet){
return jet.CorrPt() < 20;}));
222 ObsMiniJets obsminijets(minijets);
223 recHist.Fill(obs2jets, obsminijets, evweight);
229 auto genMNJets = GetMNJet<GenJet>(*genJets, [](GenJet jet){
return jet.p4.Pt() < 35;});
231 double genY = std::abs( genMNJets->first.p4.Eta() - genMNJets->second.p4.Eta() );
232 bool LowGenY = genY <
minY,
233 HighGenY = genY >=
maxY,
234 goodGen = (!LowGenY) && (!HighGenY)
235 && genMNJets->first.p4.Eta() <
maxy && genMNJets->second.p4.Eta() <
maxy
236 &&
minpt < genMNJets->first.p4.Pt() && genMNJets->first.p4.Pt() <
maxpt
237 &&
minpt < genMNJets->second.p4.Pt() && genMNJets->second.p4.Pt() <
maxpt;
240 double evweight = gEv->weights.front();
241 genHist.Fill(*genJets, evweight);
242 Obs2Jets obs2jets(genMNJets->first, genMNJets->second);
243 auto minijets =
GetMiniJets(*genJets, *genMNJets,
function<
bool(GenJet&)>([](GenJet& jet){
return jet.p4.Pt() < 20;}));
244 ObsMiniJets obsminijets(minijets);
245 genHist.Fill(obs2jets, obsminijets, evweight);
254 metainfo.Set<
bool>(
"git",
"complete",
true);
256 cout << __func__ <<
' ' << slice <<
" end" << endl;