186 cout << __func__ <<
' ' << slice <<
" start" << endl;
189 auto tIn = flow.GetInputTree(slice);
190 auto [fOut, tOut] = flow.GetOutput(output);
194 auto isMC = metainfo.Get<
bool>(
"flags",
"isMC");
196 auto gEv = flow.GetBranchReadOnly<GenEvent>(
"genEvent");
197 auto rEv = flow.GetBranchReadOnly<RecEvent>(
"recEvent");
199 auto recJets = flow.GetBranchReadOnly<vector<RecJet>>(
"recJets");
200 auto genJets =
isMC ? flow.GetBranchReadOnly<vector<GenJet>>(
"genJets") :
nullptr;
205 for (
DT::Looper looper(tIn); looper(); ++looper) {
209 auto MNJets = GetMNJet<RecJet>(*recJets, [](RecJet jet){
return jet.CorrPt() < 35;});
211 double recy = std::abs( MNJets->first.p4.Eta() - MNJets->second.p4.Eta() );
212 bool LowRecY = recy <
minY,
213 HighRecY = recy >=
maxY;
214 bool goodRec = (!LowRecY) && (!HighRecY)
215 && MNJets->first.p4.Eta() <
maxy && MNJets->second.p4.Eta() <
maxy
216 &&
minpt < MNJets->first.CorrPt() && MNJets->first.CorrPt() <
maxpt
217 &&
minpt < MNJets->second.CorrPt() && MNJets->second.CorrPt() <
maxpt;
220 double evweight = rEv->weights.front();
221 if (
isMC) evweight *= gEv->weights.front();
222 recHist.Fill(*recJets, evweight);
223 Obs2Jets obs2jets(MNJets->first, MNJets->second);
224 auto minijets =
GetMiniJets(*recJets, *MNJets,
function<
bool(RecJet&)>([](RecJet& jet){
return jet.CorrPt() < 20;}));
225 ObsMiniJets obsminijets(minijets);
226 recHist.Fill(obs2jets, obsminijets, evweight);
232 auto genMNJets = GetMNJet<GenJet>(*genJets, [](GenJet jet){
return jet.p4.Pt() < 35;});
234 double genY = std::abs( genMNJets->first.p4.Eta() - genMNJets->second.p4.Eta() );
235 bool LowGenY = genY <
minY,
236 HighGenY = genY >=
maxY,
237 goodGen = (!LowGenY) && (!HighGenY)
238 && genMNJets->first.p4.Eta() <
maxy && genMNJets->second.p4.Eta() <
maxy
239 &&
minpt < genMNJets->first.p4.Pt() && genMNJets->first.p4.Pt() <
maxpt
240 &&
minpt < genMNJets->second.p4.Pt() && genMNJets->second.p4.Pt() <
maxpt;
243 double evweight = gEv->weights.front();
244 genHist.Fill(*genJets, evweight);
245 Obs2Jets obs2jets(genMNJets->first, genMNJets->second);
246 auto minijets =
GetMiniJets(*genJets, *genMNJets,
function<
bool(GenJet&)>([](GenJet& jet){
return jet.p4.Pt() < 20;}));
247 ObsMiniJets obsminijets(minijets);
248 genHist.Fill(obs2jets, obsminijets, evweight);
257 metainfo.Set<
bool>(
"git",
"complete",
true);
259 cout << __func__ <<
' ' << slice <<
" end" << endl;