13 #include <boost/algorithm/string.hpp>
14 #include <boost/algorithm/string/replace.hpp>
21 using namespace TopConfiguration;
24 TopConfig::TopConfig() :
27 m_makeAllCPTools(true),
31 m_useElectrons(false),
32 m_useFwdElectrons(false),
34 m_useSoftMuons(false),
35 m_useAntiMuons(false),
38 m_useLargeRJets(false),
39 m_useTrackJets(false),
41 m_useVarRCJets(false),
42 m_useJetGhostTrack(false),
44 m_useTruthParticles(false),
45 m_useTruthElectrons(false),
46 m_useTruthMuons(false),
47 m_useTruthPhotons(false),
48 m_useTruthJets(false),
49 m_useTruthLargeRJets(false),
56 m_jetSubstructureName(
"None"),
58 m_recomputeCPvars(true),
61 m_systematics(
"SetMe"),
63 m_nominalSystName(
"Nominal"),
74 m_isDataOverlay(false),
76 m_isTruthDxAOD(false),
78 m_derivationStream(
"SetMe"),
80 m_doFakesMMWeightsIFF(false),
82 m_FakesMMConfigIFF(
"$ROOTCOREBIN/data/TopFakes/efficiencies.xml:1T:1F[T]"),
84 m_doFakesMMIFFDebug(false),
86 m_useLooseObjectsInMETInLooseTree(false),
87 m_useLooseObjectsInMETInNominalTree(false),
89 m_writeMETBuiltWithLooseObjects(false),
91 m_doOverlapRemovalOnLooseLeptonDef(false),
94 m_doLargeJetOverlapRemoval(false),
96 m_doEleEleOverlapRemoval(false),
98 m_doTightEvents(true),
100 m_doLooseEvents(false),
102 m_doTightSysts(true),
103 m_doLooseSysts(true),
107 m_applyTightSFsInLooseTree(false),
109 m_applyElectronInJetSubtraction(false),
111 m_doTruthBlockInfo(false),
113 m_doTruthPDFInfo(false),
114 m_doTruthPDFInfoInNominalTrees(false),
116 m_doMCGeneratorWeights(false),
117 m_doMCGeneratorWeightsInNominalTrees(false),
118 m_nominalWeightNames(),
119 m_nominalWeightName(
"SetMe"),
120 m_nominalWeightIndex(-1),
121 m_forceWeightIndex(false),
123 m_doTopPartonHistory(false),
124 m_isTopPartonHistoryRegisteredInNtuple(false),
125 m_doTopPartonLevel(true),
127 m_doTopParticleLevel(false),
128 m_doParticleLevelOverlapRemovalMuJet(true),
129 m_doParticleLevelOverlapRemovalElJet(true),
130 m_doParticleLevelOverlapRemovalJetPhoton(false),
131 m_useParticleLevelOverlapRemovalWithRapidity(true),
135 m_KLFitterTransferFunctionsPath(
"SetMe"),
136 m_KLFitterOutput(
"SetMe"),
137 m_KLFitterJetSelectionMode(
"SetMe"),
138 m_KLFitterBTaggingMethod(
"SetMe"),
139 m_KLFitterLH(
"SetMe"),
140 m_KLFitterTopMassFixed(true),
141 m_KLFitterSaveAllPermutations(false),
142 m_KLFitterFailOnLessThanXJets(false),
145 m_doPseudoTop(false),
148 m_sgKeyDummy(
"SetMe"),
149 m_sgKeyEventInfo(
"EventInfo"),
150 m_sgKeyPrimaryVertices(
"PrimaryVertices"),
151 m_sgKeyPhotons(
"SetMe"),
152 m_sgKeyElectrons(
"SetMe"),
153 m_sgKeyFwdElectrons(
"SetMe"),
154 m_sgKeyMuons(
"SetMe"),
155 m_sgKeySoftMuons(
"SetMe"),
156 m_sgKeyTaus(
"SetMe"),
157 m_sgKeyJets(
"SetMe"),
158 m_sgKeyLargeRJets(
"SetMe"),
159 m_sgKeyTrackJets(
"SetMe"),
160 m_sgKeyMissingEt(
"MET"),
161 m_sgKeyMissingEtLoose(
"LooseMET"),
163 m_sgKeyTruthEvent(
"TruthEvents"),
164 m_sgKeyMCParticle(
"SetMe"),
165 m_sgKeyTruthPhotons(
"TruthPhotons"),
166 m_sgKeyTruthElectrons(
"TruthElectrons"),
167 m_sgKeyTruthMuons(
"TruthMuons"),
168 m_sgKeyTruthTaus(
"TruthTaus"),
169 m_sgKeyTruthJets(
"SetMe"),
170 m_sgKeyTruthLargeRJets(
"SetMe"),
171 m_sgKeyTruthMET(
"MET_Truth"),
172 m_sgKeyTopPartonHistory(
"TopPartonHistory"),
174 m_sgKeyTopSystematicEvents(
"TopSystematicEvents"),
175 m_sgKeyTopSystematicEventsLoose(
"TopSystematicEventsLoose"),
176 m_passEventSelectionDecoration(
"passEventSelection"),
177 m_decoKeyJetGhostTrack(
"GhostTrack"),
178 m_sgKeyInDetTrackParticles(
"InDetTrackParticles"),
179 m_sgKeyTracks(
"SetMe"),
182 m_jetResponseMatchingDeltaR(-1),
185 m_dumpBtagSystsInSystTrees(false),
187 m_storePerJetBtagSFs(false),
190 m_egammaSystematicModel(
"1NP_v1"),
191 m_electronEfficiencySystematicModel(
"TOTAL"),
192 m_electronEfficiencySystematicModelNToys(40),
193 m_electronEfficiencySystematicModelToySeed(12345),
194 m_electronEfficiencySystematicModelRecoSize(400),
195 m_electronEfficiencySystematicModelIdSize(400),
196 m_electronEfficiencySystematicModelIsoSize(400),
197 m_electronEfficiencySystematicModelEtaBinning(
""),
198 m_electronEfficiencySystematicModelEtBinning(
""),
199 m_electronID(
"SetMe"),
200 m_electronIDLoose(
"SetMe"),
201 m_electronVetoLArCrack(true),
202 m_electronPtcut(25000.),
203 m_electronIsolation(
"SetMe"),
204 m_electronIsolationLoose(
"SetMe"),
205 m_electronIsolationSF(
"SetMe"),
206 m_electronIsolationSFLoose(
"SetMe"),
207 m_electron_d0SigCut(5.0),
208 m_electron_delta_z0(0.5),
209 m_electronIDDecoration(
"SetMe"),
210 m_electronIDLooseDecoration(
"SetMe"),
211 m_useElectronChargeIDSelection(false),
212 m_useEgammaLeakageCorrection(true),
213 m_enablePromptLeptonImprovedVetoStudies(false),
214 m_elTrigEffConfig(
" "),
217 m_fwdElectronPtcut(25000.),
218 m_fwdElectronMinEtacut(2.5),
219 m_fwdElectronMaxEtacut(4.9),
220 m_fwdElectronID(
"SetMe"),
221 m_fwdElectronIDLoose(
"SetMe"),
222 m_fwdElectronBCIDCleaningMinRun(266904),
223 m_fwdElectronBCIDCleaningMaxRun(311481),
228 m_muonQuality(
"SetMe"),
229 m_muonUseMVALowPt(false),
230 m_muonUseLowPt(false),
231 m_muonUse2stationMuonsHighPt(true),
232 m_muonQualityLoose(
"SetMe"),
233 m_muonUseMVALowPtLoose(false),
234 m_muonUseLowPtLoose(false),
235 m_muonUse2stationMuonsHighPtLoose(true),
236 m_muonIsolation(
"SetMe"),
237 m_muonIsolationLoose(
"SetMe"),
238 m_muonIsolationSF(
"SetMe"),
239 m_muonIsolationSFLoose(
"SetMe"),
240 m_muon_d0SigCut(3.0),
241 m_muon_delta_z0(0.5),
242 m_muonCalibMode(
"SetMe"),
243 m_muonSmearingSystematicModel(
"SetMe"),
244 m_muonMuonDoSmearing2stationHighPt(true),
245 m_muonMuonDoExtraSmearingHighPt(false),
246 m_muonBreakDownSystematics(false),
247 m_muonSFCustomInputFolder(
" "),
248 m_muonForcePeriod(
" "),
250 m_muonForceTrigger(
" "),
253 m_softmuonPtcut(4000.),
254 m_softmuonEtacut(2.5),
255 m_softmuonQuality(
"SetMe"),
256 m_softmuonUseMVALowPt(false),
257 m_softmuonUseLowPt(false),
258 m_softmuonDRJetcut(0.4),
259 m_softmuonDRJetcutUseRapidity(false),
260 m_softmuonAdditionalTruthInfo(false),
261 m_softmuonAdditionalTruthInfoCheckPartonOrigin(false),
262 m_softmuonAdditionalTruthInfoDoVerbose(false),
267 m_jetPtGhostTracks(30000.),
268 m_jetEtaGhostTracks(2.5),
269 m_jetUncertainties_NPModel(
"AllNuisanceParameters"),
270 m_jetUncertainties_QGFracFile(
"None"),
271 m_jetUncertainties_QGHistPatterns(),
272 m_doMultipleJES(false),
273 m_jetJERSmearingModel(
"Simple"),
274 m_jetJMSOption(
"None"),
275 m_doLargeRPseudodataJER(false),
276 m_jetCalibSequence(
"GSC"),
277 m_allowSmallRJMSforAFII(false),
278 m_jetStoreTruthLabels(
"True"),
279 m_doJVTInMETCalculation(true),
280 m_saveFailJVTJets(false),
281 m_JVTWP(
"FixedEffPt"),
282 m_doForwardJVTInMETCalculation(false),
283 m_saveFailForwardJVTJets(false),
287 m_METUncertaintiesConfigDir(
"SetMe"),
289 m_METSignifSoftTermParam(
"Random"),
290 m_METJetSelectionWP(
"Tight"),
293 m_ghostTrackspT(500.),
294 m_ghostTracksVertexAssociation(
"nominal"),
295 m_ghostTracksQuality(
"TightPrimary"),
297 m_largeRJetPtcut(25000.),
298 m_largeRJetMasscut(0.),
299 m_largeRJetEtacut(2.5),
300 m_largeRJetUncertainties_NPModel(
"CategoryJES_FullJER_FullJMS"),
301 m_largeRJetUncertainties_JMR_NPModel(
"FullJMR"),
302 m_largeRJetUncertaintiesConfigDir(
"SetMe"),
303 m_largeRJESJMSConfig(
"SetMe"),
305 m_trackJetPtcut(7000.0),
306 m_trackJetEtacut(2.5),
308 m_RCJetPtcut(100000.),
310 m_RCInputJetPtMin(0.),
311 m_RCInputJetEtaMax(999.),
312 m_RCJetTrimcut(0.05),
314 m_useRCJetSubstructure(false),
315 m_useRCJetAdditionalSubstructure(false),
317 m_VarRCJetPtcut(100000.),
318 m_VarRCJetEtacut(2.0),
319 m_VarRCJetTrimcut(0.05),
320 m_VarRCJetMaxRadius(1.0),
322 m_VarRCJetMassScale(
"m_w,m_z,m_h,m_t"),
323 m_useVarRCJetSubstructure(false),
324 m_useVarRCJetAdditionalSubstructure(false),
326 m_trackQuality(
"SetMe"),
342 m_truth_electron{25000., 2.5,
true,
false},
343 m_truth_muon{25000., 2.5,
true,
false},
344 m_truth_softmuon{4000., 2.5},
345 m_truth_photon{25000., 2.5,
"SET_ME",
"SET_ME"},
346 m_truth_jet{25000., 2.5},
350 m_allSelectionNames(
nullptr),
352 m_allTriggers_Tight(
nullptr),
353 m_electronTriggers_Tight(
nullptr),
354 m_muonTriggers_Tight(
nullptr),
355 m_tauTriggers_Tight(
nullptr),
356 m_photonTriggers_Tight(
nullptr),
357 m_allTriggers_Loose(
nullptr),
358 m_electronTriggers_Loose(
nullptr),
359 m_muonTriggers_Loose(
nullptr),
360 m_tauTriggers_Loose(
nullptr),
361 m_photonTriggers_Loose(
nullptr),
362 m_trigMatchElemRelink(
false),
366 m_sumOfEventWeightsMetaData(
"CutBookkeepersAux.sumOfEventWeights"),
369 m_objectSelectionName(
"SetMe"),
371 m_outputFormat(
"SetMe"),
373 m_outputEvents(
"SetMe"),
374 m_saveOnlySelectedEvents(
true),
375 m_outputFileSetAutoFlushZero(
false),
376 m_outputFileNEventAutoFlush(1000),
377 m_outputFileBasketSizePrimitive(4096),
378 m_outputFileBasketSizeVector(40960),
380 m_numberOfEventsToRun(0),
383 m_numberOfEventsToSkip(0),
386 m_nominalHashValue(0),
388 m_systHashPhotons(
nullptr),
389 m_systHashElectrons(
nullptr),
390 m_systHashFwdElectrons(
nullptr),
391 m_systHashMuons(
nullptr),
392 m_systHashSoftMuons(
nullptr),
393 m_systHashTaus(
nullptr),
394 m_systHashJets(
nullptr),
395 m_systHashLargeRJets(
nullptr),
396 m_systHashTrackJets(
nullptr),
397 m_systHashTracks(
nullptr),
398 m_systHashMET(
nullptr),
400 m_systHashAll(
nullptr),
401 m_list_systHashAll(
nullptr),
402 m_systHash_electronInJetSubtraction(
nullptr),
403 m_list_systHash_electronInJetSubtraction(
nullptr),
406 m_systMapPhotons(
nullptr),
407 m_systMapElectrons(
nullptr),
408 m_systMapFwdElectrons(
nullptr),
409 m_systMapMuons(
nullptr),
410 m_systMapSoftMuons(
nullptr),
411 m_systMapTaus(
nullptr),
412 m_systMapJets(
nullptr),
413 m_systMapLargeRJets(
nullptr),
414 m_systMapTrackJets(
nullptr),
415 m_systMapTracks(
nullptr),
416 m_systMapMET(
nullptr),
418 m_systSgKeyMapPhotons(
nullptr),
419 m_systSgKeyMapElectrons(
nullptr),
420 m_systSgKeyMapFwdElectrons(
nullptr),
421 m_systSgKeyMapMuons(
nullptr),
422 m_systSgKeyMapSoftMuons(
nullptr),
423 m_systSgKeyMapTaus(
nullptr),
424 m_systSgKeyMapJets(
nullptr),
425 m_systSgKeyMapJets_electronInJetSubtraction(
nullptr),
426 m_systSgKeyMapJetsLoose_electronInJetSubtraction(
nullptr),
427 m_systSgKeyMapLargeRJets(
nullptr),
428 m_systSgKeyMapTrackJets(
nullptr),
429 m_systSgKeyMapTracks(
nullptr),
430 m_systSgKeyMapMET(
nullptr),
432 m_systAllSgKeyMapPhotons(
nullptr),
433 m_systAllSgKeyMapElectrons(
nullptr),
434 m_systAllSgKeyMapFwdElectrons(
nullptr),
435 m_systAllSgKeyMapMuons(
nullptr),
436 m_systAllSgKeyMapSoftMuons(
nullptr),
437 m_systAllSgKeyMapTaus(
nullptr),
438 m_systAllSgKeyMapJets(
nullptr),
439 m_systAllSgKeyMapLargeRJets(
nullptr),
440 m_systAllSgKeyMapTrackJets(
nullptr),
441 m_systAllSgKeyMapTracks(
nullptr),
442 m_systAllSgKeyMapElectrons_electronInJetSubtraction(
nullptr),
443 m_systAllSgKeyMapJets_electronInJetSubtraction(
nullptr),
444 m_systAllSgKeyMapJetsLoose_electronInJetSubtraction(
nullptr),
446 m_systAllSgKeyMapPhotonsTDS(
nullptr),
447 m_systAllSgKeyMapPhotonsTDSAux(
nullptr),
448 m_systAllSgKeyMapElectronsTDS(
nullptr),
449 m_systAllSgKeyMapElectronsTDSAux(
nullptr),
450 m_systAllSgKeyMapFwdElectronsTDS(
nullptr),
451 m_systAllSgKeyMapFwdElectronsTDSAux(
nullptr),
452 m_systAllSgKeyMapMuonsTDS(
nullptr),
453 m_systAllSgKeyMapMuonsTDSAux(
nullptr),
454 m_systAllSgKeyMapSoftMuonsTDS(
nullptr),
455 m_systAllSgKeyMapSoftMuonsTDSAux(
nullptr),
456 m_systAllSgKeyMapTausTDS(
nullptr),
457 m_systAllSgKeyMapTausTDSAux(
nullptr),
458 m_systAllSgKeyMapJetsTDS(
nullptr),
459 m_systAllSgKeyMapJetsTDSAux(
nullptr),
460 m_systAllSgKeyMapLargeRJetsTDS(
nullptr),
461 m_systAllSgKeyMapLargeRJetsTDSAux(
nullptr),
462 m_systAllSgKeyMapTrackJetsTDS(
nullptr),
463 m_systAllSgKeyMapTrackJetsTDSAux(
nullptr),
464 m_systAllSgKeyMapTracksTDS(
nullptr),
465 m_systAllSgKeyMapTracksTDSAux(
nullptr),
466 m_systAllSgKeyMapElectrons_electronInJetSubtractionTDS(
nullptr),
467 m_systAllSgKeyMapElectrons_electronInJetSubtractionTDSAux(
nullptr),
468 m_systAllSgKeyMapJets_electronInJetSubtractionTDS(
nullptr),
469 m_systAllSgKeyMapJets_electronInJetSubtractionTDSAux(
nullptr),
470 m_systAllSgKeyMapJetsLoose_electronInJetSubtractionTDS(
nullptr),
471 m_systAllSgKeyMapJetsLoose_electronInJetSubtractionTDSAux(
nullptr),
473 m_systSgKeyMapMissingET(
nullptr),
474 m_systSgKeyMapMissingETLoose(
nullptr),
476 m_sgKeyKLFitter(
"KLFitterResults"),
477 m_systSgKeyMapKLFitter(
nullptr),
478 m_systSgKeyMapKLFitterLoose(
nullptr),
480 m_sgKeyPseudoTop(
"PseudoTopResult"),
481 m_systSgKeyMapPseudoTop(
nullptr),
482 m_systSgKeyMapPseudoTopLoose(
nullptr),
483 m_systMapJetGhostTrack(
nullptr),
484 m_systDecoKeyMapJetGhostTrack(
nullptr),
486 m_systAllTTreeNames(
nullptr),
487 m_systPersistantAllTTreeNames(
nullptr),
488 m_systAllTTreeIndex(
nullptr),
489 m_systAllTTreeLooseIndex(
nullptr),
490 m_saveBootstrapWeights(
false),
491 m_BootstrapReplicas(100),
492 m_useBadBatmanCleaning(
true),
493 m_badBatmanCleaningMin(276262),
494 m_badBatmanCleaningMax(311481),
495 m_useEventLevelJetCleaningTool(
false),
498 m_allSelectionNames = std::shared_ptr<std::vector<std::string> > (
new std::vector<std::string> );
500 m_systHashPhotons = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
501 m_systHashElectrons = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
502 m_systHashFwdElectrons = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
503 m_systHashMuons = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
504 m_systHashSoftMuons = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
505 m_systHashTaus = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
506 m_systHashJets = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
507 m_systHashLargeRJets = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
508 m_systHashTrackJets = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
509 m_systHashTracks = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
510 m_systHashMET = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
512 m_systHashAll = std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
513 m_list_systHashAll = std::shared_ptr<std::list<std::size_t> > (
new std::list<std::size_t> );
514 m_systHash_electronInJetSubtraction =
515 std::shared_ptr<std::unordered_set<std::size_t> > (
new std::unordered_set<std::size_t> );
516 m_list_systHash_electronInJetSubtraction = std::shared_ptr<std::list<std::size_t> > (
new std::list<std::size_t> );
519 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
522 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
524 m_systMapFwdElectrons = std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
525 new std::unordered_map<std::size_t, CP::SystematicSet> );
527 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
530 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
533 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
536 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
538 m_systMapLargeRJets =
539 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
542 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
545 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
551 std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
new std::unordered_map<std::size_t,
554 m_systSgKeyMapPhotons =
555 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
557 m_systSgKeyMapElectrons =
558 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
560 m_systSgKeyMapFwdElectrons =
561 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
563 m_systSgKeyMapMuons =
564 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
566 m_systSgKeyMapSoftMuons =
567 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
570 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
573 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
575 m_systSgKeyMapJets_electronInJetSubtraction = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
576 new std::unordered_map<std::size_t, std::string> );
577 m_systSgKeyMapJetsLoose_electronInJetSubtraction = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
578 new std::unordered_map<std::size_t, std::string> );
579 m_systSgKeyMapLargeRJets =
580 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
582 m_systSgKeyMapTrackJets =
583 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
586 m_systSgKeyMapTracks =
587 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
592 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
595 m_systAllSgKeyMapPhotons =
596 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
598 m_systAllSgKeyMapElectrons =
599 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
601 m_systAllSgKeyMapFwdElectrons = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
602 new std::unordered_map<std::size_t, std::string> );
603 m_systAllSgKeyMapMuons =
604 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
606 m_systAllSgKeyMapSoftMuons =
607 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
609 m_systAllSgKeyMapTaus =
610 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
612 m_systAllSgKeyMapJets =
613 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
615 m_systAllSgKeyMapLargeRJets = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
616 new std::unordered_map<std::size_t, std::string> );
617 m_systAllSgKeyMapTrackJets =
618 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
620 m_systAllSgKeyMapTracks =
621 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
624 m_systAllSgKeyMapElectrons_electronInJetSubtraction
625 = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
627 m_systAllSgKeyMapJets_electronInJetSubtraction
628 = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
630 m_systAllSgKeyMapJetsLoose_electronInJetSubtraction
631 = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
634 m_systAllSgKeyMapPhotonsTDS = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
635 new std::unordered_map<std::size_t, std::string> );
636 m_systAllSgKeyMapPhotonsTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
637 new std::unordered_map<std::size_t, std::string> );
638 m_systAllSgKeyMapElectronsTDS = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
639 new std::unordered_map<std::size_t, std::string> );
640 m_systAllSgKeyMapElectronsTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
641 new std::unordered_map<std::size_t, std::string> );
642 m_systAllSgKeyMapFwdElectronsTDS = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
643 new std::unordered_map<std::size_t, std::string> );
644 m_systAllSgKeyMapFwdElectronsTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
645 new std::unordered_map<std::size_t, std::string> );
646 m_systAllSgKeyMapMuonsTDS =
647 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
649 m_systAllSgKeyMapMuonsTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
650 new std::unordered_map<std::size_t, std::string> );
651 m_systAllSgKeyMapSoftMuonsTDS = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
652 new std::unordered_map<std::size_t, std::string> );
653 m_systAllSgKeyMapSoftMuonsTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
654 new std::unordered_map<std::size_t, std::string> );
655 m_systAllSgKeyMapTausTDS =
656 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
658 m_systAllSgKeyMapTausTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
659 new std::unordered_map<std::size_t, std::string> );
660 m_systAllSgKeyMapJetsTDS =
661 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
663 m_systAllSgKeyMapJetsTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
664 new std::unordered_map<std::size_t, std::string> );
665 m_systAllSgKeyMapLargeRJetsTDS = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
666 new std::unordered_map<std::size_t, std::string> );
667 m_systAllSgKeyMapLargeRJetsTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
668 new std::unordered_map<std::size_t, std::string> );
669 m_systAllSgKeyMapTrackJetsTDS = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
670 new std::unordered_map<std::size_t, std::string> );
671 m_systAllSgKeyMapTrackJetsTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
672 new std::unordered_map<std::size_t, std::string> );
673 m_systAllSgKeyMapTracksTDS = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
674 new std::unordered_map<std::size_t, std::string> );
675 m_systAllSgKeyMapTracksTDSAux = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
676 new std::unordered_map<std::size_t, std::string> );
678 m_systAllSgKeyMapElectrons_electronInJetSubtractionTDS =
679 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
681 m_systAllSgKeyMapElectrons_electronInJetSubtractionTDSAux =
682 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
684 m_systAllSgKeyMapJets_electronInJetSubtractionTDS = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
685 new std::unordered_map<std::size_t, std::string> );
686 m_systAllSgKeyMapJets_electronInJetSubtractionTDSAux =
687 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
689 m_systAllSgKeyMapJetsLoose_electronInJetSubtractionTDS =
690 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
692 m_systAllSgKeyMapJetsLoose_electronInJetSubtractionTDSAux =
693 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
697 m_systSgKeyMapMissingET =
698 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
700 m_systSgKeyMapMissingETLoose = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
701 new std::unordered_map<std::size_t, std::string> );
703 m_systSgKeyMapKLFitter =
704 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
706 m_systSgKeyMapKLFitterLoose = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
707 new std::unordered_map<std::size_t, std::string> );
709 m_systSgKeyMapPseudoTop =
710 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
712 m_systSgKeyMapPseudoTopLoose = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
713 new std::unordered_map<std::size_t, std::string> );
715 m_systMapJetGhostTrack = std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> > (
716 new std::unordered_map<std::size_t, CP::SystematicSet> );
717 m_systDecoKeyMapJetGhostTrack = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
718 new std::unordered_map<std::size_t, std::string> );
721 m_systAllTTreeNames =
722 std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
new std::unordered_map<std::size_t,
724 m_systPersistantAllTTreeNames = std::shared_ptr<std::unordered_map<std::size_t, std::string> > (
725 new std::unordered_map<std::size_t, std::string> );
726 m_systAllTTreeIndex =
727 std::shared_ptr<std::unordered_map<std::size_t, unsigned int> > (
new std::unordered_map<std::size_t,
729 m_systAllTTreeLooseIndex =
730 std::shared_ptr<std::unordered_map<std::size_t, unsigned int> > (
new std::unordered_map<std::size_t,
735 m_nominalHashValue =
nominal.hash();
737 m_treeFilter = std::make_shared<TreeFilter>();
742 const std::vector<top::SelectionConfigurationData> allSelections = settings->
selections();
744 for (
auto sel : allSelections) {
764 if (settings->
value(
"UseSoftMuons") ==
"True") this->
sgKeySoftMuons(
"Soft" + settings->
value(
"MuonCollectionName"));
794 if (settings->
value(
"PDFInfo") ==
"True") {
796 }
else if (settings->
value(
"PDFInfo") ==
"Nominal") {
803 if (settings->
value(
"MCGeneratorWeights") ==
"True") {
805 }
else if (settings->
value(
"MCGeneratorWeights") ==
"Nominal") {
812 const std::string&
tmp = settings->
value(
"NominalWeightNames");
816 std::string trimmedName =
"";
817 bool deleteSpaces =
true;
819 for(
unsigned int i = 0;
i <
tmp.size(); ++
i) {
823 deleteSpaces =
false;
831 trimmedName +=
tmp[
i];
834 trimmedName +=
tmp[
i];
840 iname.erase(
std::remove(iname.begin(), iname.end(),
'"'), iname.end());
843 boost::replace_all(iname,
"\\n",
"\n");
848 }
catch (std::invalid_argument &
e) {
849 ATH_MSG_ERROR(
"Failed to parse NominalWeightFallbackIndex value: " << settings->
value(
"NominalWeightFallbackIndex"));
859 bool topPartonLevel=
true;
860 settings->
retrieve(
"TopPartonLevel",topPartonLevel);
864 bool topParticleLevel=
true;
865 settings->
retrieve(
"TopParticleLevel",topParticleLevel);
869 if (settings->
value(
"DoParticleLevelOverlapRemoval") ==
"True") {
874 }
else if (settings->
value(
"DoParticleLevelOverlapRemoval") ==
"False") {
881 std::vector<std::string>
tokens;
884 const auto& token =
tokens.back();
886 if (token ==
"MuonJet") {
888 }
else if (token ==
"ElectronJet") {
890 }
else if (token ==
"JetPhoton") {
893 throw std::runtime_error {
894 "TopConfig: Option DoParticleLevelOverlapRemoval: Invalid Token"
904 if(settings->
value(
"OverlapRemovalParticleLevelUseRapidity") ==
"True"){
914 if (settings->
value(
"FilterBranches") !=
" ") {
919 ATH_MSG_WARNING(
"You provided \"FilterBranches\" option but you did not provide any meaningful values. Ignoring");
925 if (settings->
value(
"FilterPartonLevelBranches") !=
" ") {
930 ATH_MSG_WARNING(
"You provided \"FilterPartonLevelBranches\" option but you did not provide any meaningful values. Ignoring");
936 if (settings->
value(
"FilterParticleLevelBranches") !=
" ") {
941 ATH_MSG_WARNING(
"You provided \"FilterParticleLevelBranches\" option but you did not provide any meaningful values. Ignoring");
947 if (settings->
value(
"FilterNominalLooseBranches") !=
" ") {
952 ATH_MSG_WARNING(
"You provided \"FilterNominalLooseBranches\" option but you did not provide any meaningful values. Ignoring");
958 if (settings->
value(
"FilterNominalBranches") !=
" ") {
963 ATH_MSG_WARNING(
"You provided \"FilterNominalBranches\" option but you did not provide any meaningful values. Ignoring");
972 if (settings->
value(
"SaveBootstrapWeights") ==
"True") {
991 if (settings->
value(
"FakesMMWeightsIFF") ==
"True") {
993 std::string configIFF = settings->
value(
"FakesMMConfigIFF");
994 if (configIFF !=
"") {
997 if (settings->
value(
"FakesMMIFFDebug") ==
"True") {
1006 if (settings->
value(
"UseBadBatmanCleaning") ==
"False") {
1008 }
else if (settings->
value(
"UseBadBatmanCleaning") ==
"True") {
1011 throw std::invalid_argument {
1012 "TopConfig: Option UseBadBatmanCleaning unknown value, only True or False (default) is allowed"
1018 std::vector<std::string>
tokens;
1020 if (
tokens.size() != 2) {
1021 throw std::runtime_error {
1022 "TopConfig: Option BadBatmanCleaningRange should be of the form \'RunNumber1:RunNumber2\'"
1025 unsigned int minRunNumber = 999999;
1026 unsigned int maxRunNumber = 0;
1028 minRunNumber = std::stoul(
tokens.at(0));
1029 maxRunNumber = std::stoul(
tokens.at(1));
1031 throw std::invalid_argument {
1032 "TopConfig: Option BadBatmanCleaningRange cannot convert the RunNumbers into unsigned int"
1037 if (maxRunNumber < minRunNumber) {
1038 throw std::invalid_argument {
1039 "TopConfig: Option BadBatmanCleaningRange: the first RunNumber cannot be larger than the second!"
1044 static const unsigned int data17_begin = 325713;
1045 static const unsigned int data17_end = 348835;
1047 if (
std::max(minRunNumber, data17_begin) <=
std::min(maxRunNumber, data17_end)) {
1048 throw std::invalid_argument {
1049 "TopConfig: Option BadBatmanCleaningRange cannot include RunNumbers from 2017 data taking (325713-348835)"
1058 if (settings->
value(
"UseEventLevelJetCleaningTool") ==
"True") {
1070 if (settings->
value(
"OutputFileSetAutoFlushZero") !=
"False") {
1071 ATH_MSG_WARNING(
"OutputFileSetAutoFlushZero is deprecated in favour of more custom memory options");
1074 if (settings->
value(
"OutputFileNEventAutoFlush") !=
"") {
1077 if (settings->
value(
"OutputFileBasketSizePrimitive") !=
"") {
1080 if (settings->
value(
"OutputFileBasketSizeVector") !=
"") {
1103 std::string
const& cut_wp = settings->
value(
"ElectronIsolation");
1104 std::string
const& sf_wp = settings->
value(
"ElectronIsolationSF");
1108 const std::string &isoWPs_str = settings->
value(
"ElectronIsolationWPs");
1110 if (cut_wp !=
"None")
1114 std::string
const& cut_wp = settings->
value(
"ElectronIsolationLoose");
1115 std::string
const& sf_wp = settings->
value(
"ElectronIsolationSFLoose");
1118 if (cut_wp !=
"None")
1130 const std::string elTrigConfig = settings->
value(
"ElectronTriggerEfficiencyConfig");
1131 if (elTrigConfig ==
" ") {
1132 throw std::invalid_argument{
"TopConfig: ElectronTriggerEfficiencyConfig not set in the config!"};
1143 double fwdElPtCut = 99999999.;
1145 fwdElPtCut = std::stof(settings->
value(
"FwdElectronPt"));
1148 throw std::invalid_argument {
1149 "TopConfig: cannot convert Option FwdElectronPt into float"
1153 double fwdElMinEtaCut = 2.5;
1155 fwdElMinEtaCut = std::stof(settings->
value(
"FwdElectronMinEta"));
1158 throw std::invalid_argument {
1159 "TopConfig: cannot convert Option FwdElectronMinEta into float"
1163 double fwdElMaxEtaCut = 2.5;
1165 fwdElMaxEtaCut = std::stof(settings->
value(
"FwdElectronMaxEta"));
1168 throw std::invalid_argument {
1169 "TopConfig: cannot convert Option FwdElectronMaxEta into float"
1176 std::vector<std::string> fwd_bcid_tokens;
1177 tokenize(settings->
value(
"FwdElectronBCIDCleaningRunRange"), fwd_bcid_tokens,
":");
1178 if (fwd_bcid_tokens.size() != 2) {
1179 throw std::invalid_argument(
1180 "TopConfig: Option FwdElectronBCIDCleaningRunRange requires values in the form of \'XXX:YYY\'. The number of values needs to be exactly 2.");
1187 throw std::invalid_argument(
1188 "TopConfig: Cannot convert the strings into integers for the run numbers in Option FwdElectronBCIDCleaningRunRange");
1206 const std::string &isoWPs_str = settings->
value(
"PhotonIsolationWPs");
1223 std::string
const& cut_wp = settings->
value(
"MuonIsolation");
1224 std::string
const& sf_wp = settings->
value(
"MuonIsolationSF");
1228 const std::string &isoWPs_str = settings->
value(
"MuonIsolationWPs");
1230 if (cut_wp !=
"None")
1233 bool muonUse2stationHighPt =
true;
1234 settings->
retrieve(
"MuonUse2stationHighPt", muonUse2stationHighPt);
1235 if (settings->
value(
"MuonQuality") !=
"HighPt") muonUse2stationHighPt =
false;
1241 ATH_MSG_WARNING(
"Could not set MuonUseMVALowPt True without using the LowPt muon WP. MuonUseMVALowPt is now setted to the default value (False)");
1245 bool muonUse2stationHighPtLoose =
true;
1246 settings->
retrieve(
"MuonUse2stationHighPtLoose", muonUse2stationHighPtLoose);
1247 if (settings->
value(
"MuonQualityLoose") !=
"HighPt") muonUse2stationHighPtLoose =
false;
1253 ATH_MSG_WARNING(
"Could not set MuonUseMVALowPtLoose True without using the LowPt muon WP. MuonUseMVALowPtLoose is now setted to the default value (False)");
1259 std::string
const& cut_wp = settings->
value(
"MuonIsolationLoose");
1260 std::string
const& sf_wp = settings->
value(
"MuonIsolationSFLoose");
1263 if (cut_wp !=
"None")
1269 bool muonDoSmearing2stationHighPt =
false;
1270 settings->
retrieve(
"MuonDoSmearing2stationHighPt", muonDoSmearing2stationHighPt);
1271 if (settings->
value(
"MuonQuality") !=
"HighPt" ) muonDoSmearing2stationHighPt =
false;
1272 else if ( !muonUse2stationHighPt && muonDoSmearing2stationHighPt ) {
1273 ATH_MSG_WARNING(
"Could not set MuonDoSmearing2stationHighPt True without MuonUse2stationHighPt. MuonDoSmearing2stationHighPt is now setted to False");
1274 muonDoSmearing2stationHighPt =
false;
1277 bool muonDoExtraSmearingHighPt =
false;
1278 settings->
retrieve(
"MuonDoExtraSmearingHighPt", muonDoExtraSmearingHighPt);
1279 if ( settings->
value(
"MuonQuality") ==
"HighPt" && muonDoExtraSmearingHighPt ) {
1280 ATH_MSG_WARNING(
"Could not set MuonDoExtraSmearingHighPt True when using the HighPt muon WP, HighPt muons are not affected by this setting. MuonDoExtraSmearingHighPt is now setted to the default value (False)");
1281 muonDoExtraSmearingHighPt =
false;
1289 std::string
const& customMuonSF = settings->
value(
"MuonSFCustomInputFolder");
1293 std::string
const& customMuonSFTrigger = settings->
value(
"MuonSFCustomInputFolderTrigger");
1297 int customMuonForceYear = std::stoi(settings->
value(
"MuonForceYear"));
1301 std::string
const& customMuonForcePeriod = settings->
value(
"MuonForcePeriod");
1305 std::string
const& customMuonForceTrigger = settings->
value(
"MuonForceTrigger");
1310 std::string
const& customElTrigEffConfig = settings->
value(
"ElectronTriggerEfficiencyConfig");
1319 bool softmuonUseMVALowPtSoftMuon =
false;
1320 settings->
retrieve(
"SoftMuonUseMVALowPt", softmuonUseMVALowPtSoftMuon);
1321 if (settings->
value(
"SoftMuonQuality") !=
"LowPt" && softmuonUseMVALowPtSoftMuon) {
1322 ATH_MSG_WARNING(
"Could not set SoftMuonUseMVALowPt True without using the LowPt softmuon WP. SoftMuonUseMVALowPt is now setted to the default value (False)");
1323 softmuonUseMVALowPtSoftMuon =
false;
1343 if (settings->
value(
"ApplyTauMVATES") !=
"True")
throw std::runtime_error {
1344 "TopConfig: ApplyTauMVATES must be True"
1351 if (
m_jetPtcut <= std::stof(settings->
value(
"JetPtGhostTracks"))+5000){
1360 if (settings->
value(
"DoLargeRPseudodataJER") ==
"False") {
1362 }
else if (settings->
value(
"DoLargeRPseudodataJER") ==
"True") {
1373 if (settings->
value(
"ForwardJVTWP") ==
"Medium" && settings->
retrieve(
"ForwardJVTinMETCalculation")){
1374 ATH_MSG_WARNING(
"TopConfig::setConfigSettings: fJVT WP set to Medium and fJVT in MET requested, MET working point will be changed to Tenacious to maintain compatibility with fJVT!!!");
1384 std::string strSubstructure = settings->
value(
"LargeRJetSubstructureVariables");
1386 std::vector<std::string> helpvecStr;
1387 tokenize(strSubstructure, helpvecStr,
",");
1389 std::vector<std::string> vecSubstructure;
1391 for (
const std::string&
x : helpvecStr) {
1392 std::istringstream istrSubstructure(
x);
1393 std::copy(std::istream_iterator<std::string>(istrSubstructure),
1394 std::istream_iterator<std::string>(), std::back_inserter(vecSubstructure));
1397 for (
const std::string&
key: vecSubstructure) {
1398 std::vector<std::string>
pairs;
1402 else throw std::runtime_error {
1403 "TopConfig: Options in LargeRJetSubstructureVariables should be of the form \'x:y\' or \'y\'."
1431 if (settings->
value(
"UseRCJets") ==
"True" || settings->
value(
"UseRCJets") ==
"true") this->
m_useRCJets =
true;
1432 if (settings->
value(
"UseRCJetSubstructure") ==
"True" ||
1436 if (settings->
value(
"UseRCJetAdditionalSubstructure") ==
"True" ||
1446 if (settings->
value(
"UseVarRCJets") ==
"True" ||
1448 if (settings->
value(
"UseVarRCJetSubstructure") ==
"True" ||
1451 if (settings->
value(
"UseVarRCJetAdditionalSubstructure") ==
"True" ||
1452 settings->
value(
"UseVarRCJetAdditionalSubstructure") ==
1456 if (settings->
value(
"StoreJetTruthLabels") ==
"False") {
1458 }
else if (settings->
value(
"StoreJetTruthLabels") ==
"True") {
1461 ATH_MSG_WARNING(
"TopConfig::setConfigSettings: Unrecognized option for \"StoreJetTruthLabels\", assuming True");
1489 if (settings->
value(
"LargeJetOverlapRemoval") ==
"True") {
1494 if (settings->
value(
"EleEleOverlapRemoval") ==
"True"){
1521 float truth_softmu_ptcut=4000.;
1523 truth_softmu_ptcut=std::stof(settings->
value(
"TruthSoftMuonPt"));
1526 throw std::runtime_error {
1527 "TopConfig: can't convert provided TruthSoftMuonPt into float"
1531 float truth_softmu_etacut=2.5;
1533 truth_softmu_etacut=std::stof(settings->
value(
"TruthSoftMuonEta"));
1536 throw std::runtime_error {
1537 "TopConfig: can't convert provided TruthSoftMuonEta into float"
1563 std::istringstream lha_pdf_ss(settings->
value(
"LHAPDFSets"));
1564 std::copy(std::istream_iterator<std::string>(lha_pdf_ss),
1565 std::istream_iterator<std::string>(),
1569 const std::string LHAPDFBase = settings->
value(
"LHAPDFBaseSet");
1570 if (LHAPDFBase.find_first_not_of(
' ') != std::string::npos) {
1572 if (LHAPDFBase.find(
' ') != std::string::npos)
1573 ATH_MSG_WARNING(
"LHAPDFBaseSet: " << LHAPDFBase <<
" -- only one PDF set allowed for recomputing XF1,XF2 !!!");
1585 if (
m_lhapdf_options.pdf_set_names.size() && this->isMC() && settings->
value(
"LHAPDFEventWeights") ==
"True") {
1588 settings->
value(
"LHAPDFEventWeights") ==
"Nominal") {
1594 std::string str_boostedJetTagger = settings->
value(
"BoostedJetTagging");
1595 std::vector<std::string> helpvec_str;
1596 tokenize(str_boostedJetTagger, helpvec_str,
",");
1598 std::vector<std::string> vec_boostedJetTaggers;
1600 for (
const std::string&
x : helpvec_str) {
1601 std::istringstream istr_boostedJetTaggers(
x);
1602 std::copy(std::istream_iterator<std::string>(istr_boostedJetTaggers),
1603 std::istream_iterator<std::string>(), std::back_inserter(vec_boostedJetTaggers));
1606 for (
const std::string& tagger : vec_boostedJetTaggers) {
1607 std::vector<std::string> helpvec;
1609 if (helpvec.size() != 2)
throw std::runtime_error {
1610 "TopConfig: Options in BoostedJetTagging should be of the form \'x:y\' where x is tagging type and y is shortened tagger name."
1636 auto print_btag_WPs = [](
const std::vector<std::string> &WPlist) {
1637 for (
const std::string &
WP : WPlist)
1642 ATH_MSG_INFO(
"Out of those, the calibration SFs will be computed for following WPs:");
1647 ATH_MSG_INFO(
"Out of those, the calibration SFs will be computed for following WPs:");
1660 if (settings->
value(
"RedefineMCMCMap") !=
" ") {
1661 std::vector<std::string>
tmp;
1663 for (
const std::string& dictionaries :
tmp) {
1667 throw std::invalid_argument{
"Wrong input argument for RedefineMCMCMap. Expected format is: \"shower1:shower2,shower3:shower4\""};
1683 std::istringstream pileup_config_ss(settings->
value(
"PRWConfigFiles"));
1684 std::copy(std::istream_iterator<std::string>(pileup_config_ss),
1685 std::istream_iterator<std::string>(),
1688 std::istringstream pileup_lumi_ss(settings->
value(
"PRWLumiCalcFiles"));
1689 std::copy(std::istream_iterator<std::string>(pileup_lumi_ss),
1690 std::istream_iterator<std::string>(),
1693 std::istringstream pileup_config_FS_ss(settings->
value(
"PRWConfigFiles_FS"));
1694 std::copy(std::istream_iterator<std::string>(pileup_config_FS_ss),
1695 std::istream_iterator<std::string>(),
1698 std::istringstream pileup_config_AF_ss(settings->
value(
"PRWConfigFiles_AF"));
1699 std::copy(std::istream_iterator<std::string>(pileup_config_AF_ss),
1700 std::istream_iterator<std::string>(),
1703 std::istringstream actual_mu_FS_ss(settings->
value(
"PRWActualMu_FS"));
1704 std::copy(std::istream_iterator<std::string>(actual_mu_FS_ss),
1705 std::istream_iterator<std::string>(),
1708 std::istringstream actual_mu_AF_ss(settings->
value(
"PRWActualMu_AF"));
1709 std::copy(std::istream_iterator<std::string>(actual_mu_AF_ss),
1710 std::istream_iterator<std::string>(),
1729 std::vector<std::string> SFs_tokens;
1730 tokenize(settings->
value(
"PRWCustomScaleFactor"), SFs_tokens,
":");
1731 if (SFs_tokens.size() != 3)
throw std::runtime_error {
1732 "TopConfig: Option PRWCustomScaleFactor should be of the form \'nominal:up:down\'"
1735 std::vector<std::string> nomSF_tokens;
1736 tokenize(SFs_tokens[0], nomSF_tokens,
"/");
1737 if (nomSF_tokens.size() == 1)
m_pileup_reweighting.custom_SF.push_back(std::stof(nomSF_tokens[0]));
1740 std::stof(nomSF_tokens[1]));
1741 else throw std::runtime_error {
1742 "TopConfig: issue in division"
1745 throw std::runtime_error {
1746 "TopConfig: can't convert provided PRW nominal Data SF into float"
1750 std::vector<std::string> upSF_tokens;
1751 tokenize(SFs_tokens[1], upSF_tokens,
"/");
1752 if (upSF_tokens.size() == 1)
m_pileup_reweighting.custom_SF.push_back(std::stof(upSF_tokens[0]));
1755 std::stof(upSF_tokens[1]));
1756 else throw std::runtime_error {
1757 "TopConfig: issue in division"
1760 throw std::runtime_error {
1761 "TopConfig: can't convert provided PRW up Data SF into float"
1765 std::vector<std::string> downSF_tokens;
1766 tokenize(SFs_tokens[2], downSF_tokens,
"/");
1767 if (downSF_tokens.size() == 1)
m_pileup_reweighting.custom_SF.push_back(std::stof(downSF_tokens[0]));
1770 std::stof(downSF_tokens[1]));
1771 else throw std::runtime_error {
1772 "TopConfig: issue in division"
1775 throw std::runtime_error {
1776 "TopConfig: can't convert provided PRW down Data SF into float"
1780 " up:" << SFs_tokens[1] <<
"=" <<
m_pileup_reweighting.custom_SF[1] <<
" down:" << SFs_tokens[2] <<
"=" <<
1785 std::vector<std::string> period_tokens;
1786 tokenize(settings->
value(
"PRWPeriodAssignments"), period_tokens,
":");
1787 if (period_tokens.size() % 3 != 0) {
1788 throw std::invalid_argument(
1789 "TopConfig: Option PRWPeriodAssignments requires values in the form of \'value:value:value\'. The number of values needs to be divisible by 3.");
1792 for (
const std::string& per : period_tokens) {
1796 throw std::invalid_argument(
1797 "TopConfig: Cannot convert the strings into integers for the run numbers in Option PRWPeriodAssignments");
1808 const std::string randomRunNumberSetting = settings->
value(
"ForceRandomRunNumber");
1809 if (randomRunNumberSetting !=
" ") {
1810 unsigned int randomRunNumber(0);
1812 randomRunNumber = std::stoul(randomRunNumberSetting);
1814 throw std::invalid_argument{
"ForceRandomRunNumber cannot be converted to an integer"};
1817 if (randomRunNumber < 1 || randomRunNumber > 999999) {
1818 throw std::invalid_argument{
"ForceRandomRunNumber cannot be smaller than 0 or larger than 999999"};
1825 const std::string
isRun3 = settings->
value(
"IsRun3");
1830 if (settings->
value(
"DemandPrimaryVertex") ==
"False")
1848 if (settings->
value(
"UseGlobalLeptonTriggerSF") ==
"True") {
1849 auto parseTriggerString =
1850 [settings](std::unordered_map<std::string, std::vector<std::pair<std::string, int> > >& triggersByPeriod,
1851 std::string
const&
key) {
1853 std::unordered_map<std::string, std::vector<std::pair<std::string, int> > >
result;
1854 std::vector<std::string>
pairs;
1856 for (std::string
const& pair :
pairs) {
1857 if (pair.empty() || pair ==
"None")
continue;
1858 auto i = pair.find(
'@');
1859 if (!(
i != std::string::npos &&
1860 pair.find(
'@',
i + 1) == std::string::npos))
throw std::invalid_argument(
1861 std::string() +
"Malformed trigger list in configuration item `" +
key +
"'");
1862 auto&&
period = pair.substr(0,
i), triggerstr = pair.substr(
i + 1);
1864 if (!
triggers.empty())
throw std::invalid_argument(
1865 std::string() +
"Period `" +
period +
"' appears multiple times in configuration item `" +
key +
1869 std::vector<std::string>
tmp;
1871 tmp.push_back(
i.first);
1875 std::vector<std::pair<std::string, int> >
modified;
1876 for (
const auto&
i :
tmp) {
1884 for (
auto&& kv :
result) {
1885 auto&&
src = kv.second;
1886 auto&& dst = triggersByPeriod[kv.first];
1887 for (std::pair<std::string, int>
const&
trigger :
src) {
1889 trigger) != dst.end())
throw std::invalid_argument(
1890 std::string() +
"Trigger `" +
trigger.first +
"' was specified multiple times");
1906 float invalue = 99999999.;
1909 invalue = std::stof(settings->
value(instring));
1912 throw std::invalid_argument {
1913 "TopConfig: cannot convert Option " + instring +
"into float"
1929 std::istringstream grl_files_ss(
s);
1930 std::vector<std::string> temp_grls = {};
1931 std::copy(std::istream_iterator<std::string>(grl_files_ss),
1932 std::istream_iterator<std::string>(),
1933 std::back_inserter(temp_grls));
1935 for (std::string
grl : temp_grls) {
1936 grl.erase(remove_if(
grl.begin(),
grl.end(), isspace),
grl.end());
1966 std::vector<std::string> outVector;
1967 if (
s.find(
" ") != std::string::npos) {
1968 throw std::runtime_error {
1969 "TopConfig: jetUncertainties_QGHistPatterns string can't contain white spaces"
1974 if (outVector.size() != 1)
1975 for (
const auto&
s : outVector) {
1977 if (i < 300000 || i >= 1000000)
throw std::runtime_error {
1978 "TopConfig: jetUncertainties_QGHistPatterns string doesn't look like a list of DISDs! You can either specify a single string pattern or a list of DSIDs separated by commas."
2177 std::unordered_map<std::string,
2179 std::unordered_map<std::string,
2183 std::unordered_map<std::string,
2187 base_names[
WP] = btagging_SF_names;
2189 named_systs[
WP] = { };
2193 eigen_light[
WP] = 0;
2195 for (
const auto& SF_name : base_names.at(
WP)) {
2196 if (SF_name.find(
"_Eigen_B_") != std::string::npos) eigen_B.at(
WP)++;
2197 else if (SF_name.find(
"_Eigen_C_") != std::string::npos) eigen_C.at(
WP)++;
2198 else if (SF_name.find(
"_Eigen_Light_") != std::string::npos) eigen_light.at(
WP)++;
2199 else named_systs[
WP].insert(SF_name);
2217 std::vector<std::pair<std::string, std::string>>& btagAlgoWPlist,
2218 std::vector<std::string>& btagWPlist) {
2219 std::istringstream str_btagging_WP(btagWPsettingString);
2220 std::vector<std::string> all_btagging_WP;
2221 std::copy(std::istream_iterator<std::string>(str_btagging_WP),
2222 std::istream_iterator<std::string>(),
2223 std::back_inserter(all_btagging_WP));
2225 for (
const auto& AlgTag : all_btagging_WP) {
2226 std::vector<std::string> btagAlg_btagWP;
2227 tokenize(AlgTag, btagAlg_btagWP,
":");
2229 std::string
alg =
"DL1r";
2230 std::string
tag =
"";
2232 if (btagAlg_btagWP.size() == 2) {
2233 alg = btagAlg_btagWP.at(0);
2234 tag = btagAlg_btagWP.at(1);
2236 ATH_MSG_ERROR(
"Cannot parse b-tagging ALGORITHM_NAME:WP. Incorrect format.");
2240 std::pair<std::string, std::string> alg_tag = std::make_pair(
alg,
tag);
2241 btagAlgoWPlist.push_back(alg_tag);
2242 btagWPlist.push_back(
alg +
"_" +
tag);
2249 std::vector<float> sum_of_weights) {
2274 if (syststr.find(
" ") != std::string::npos) {
2275 ATH_MSG_ERROR(
"getSystematicsList: systematic string can't contain white spaces");
2279 std::string separator =
",";
2280 std::string::size_type
start = 0,
end = 0;
2281 while ((
end = syststr.find(separator,
start)) != std::string::npos) {
2283 if (token.size()) systList.insert(token);
2286 std::string lasttoken = syststr.substr(
start);
2287 if (lasttoken.size()) systList.insert(lasttoken);
2293 return systList.find(
name) != systList.end();
2299 for (
auto s : syst) {
2312 for (
auto s : syst) {
2328 for (
const auto&
s : syst) {
2341 for (
auto s : syst) {
2367 for (
auto s : syst) {
2380 for (
auto s : syst) {
2396 for (
auto s : syst) {
2409 for (
auto s : syst) {
2422 for (
auto s : syst) {
2440 for (
auto s : syst) {
2441 (*m_systMapJetGhostTrack)[
s.hash()] =
s;
2464 for (
auto s : syst) {
2501 std::string nominalPhotons(
"SetMe");
2502 std::string nominalElectrons(
"SetMe");
2503 std::string nominalFwdElectrons(
"SetMe");
2504 std::string nominalMuons(
"SetMe");
2505 std::string nominalSoftMuons(
"SetMe");
2506 std::string nominalTaus(
"SetMe");
2507 std::string nominalJets(
"SetMe");
2508 std::string nominalLargeRJets(
"SetMe");
2509 std::string nominalTrackJets(
"SetMe");
2510 std::string nominalTracks(
"SetMe");
2511 std::string
nominal(
"nominal");
2512 std::string tds(
"TDS");
2513 std::string tdsAux(
"TDSAux.");
2518 nominalPhotons = (*ph).second;
2523 nominalElectrons = (*el).second;
2529 nominalFwdElectrons = (*fwdel).second;
2534 nominalMuons = (*mu).second;
2540 nominalSoftMuons = (*softmu).second;
2545 nominalTaus = (*tau).second;
2550 nominalJets = (*jet).second;
2556 nominalLargeRJets = (*largeRJet).second;
2562 nominalTrackJets = (*trackJet).second;
2566 nominalTracks = (*tracks).second;
2611 std::unordered_map<std::size_t, std::string>::const_iterator tau =
m_systSgKeyMapTaus->find(*
i);
2643 std::unordered_map<std::size_t, std::string>::const_iterator tracks =
m_systSgKeyMapTracks->find(*
i);
2657 std::string electronInJetSubtraction_Electrons(
"electronInJetSubtraction_Electrons_USING_");
2658 std::string electronInJetSubtraction_Jets(
"electronInJetSubtraction_Jets_USING_");
2659 std::string electronInJetSubtraction_JetsLoose(
"electronInJetSubtraction_JetsLoose_USING_");
2660 std::string electronInJetSubtraction_nominalElectrons = electronInJetSubtraction_Electrons + nominalElectrons +
2661 "_AND_" + nominalJets;
2662 std::string electronInJetSubtraction_nominalJets = electronInJetSubtraction_Jets + nominalElectrons +
"_AND_" +
2664 std::string electronInJetSubtraction_nominalJetsLoose = electronInJetSubtraction_JetsLoose + nominalElectrons +
2665 "_AND_" + nominalJets;
2673 electronInJetSubtraction_Electrons
2674 + (*el).second +
"_AND_" +
2677 electronInJetSubtraction_Jets +
2678 (*el).second +
"_AND_" + nominalJets));
2680 electronInJetSubtraction_Jets +
2681 (*el).second +
"_AND_" + nominalJets));
2684 electronInJetSubtraction_JetsLoose
2685 + (*el).second +
"_AND_" +
2688 electronInJetSubtraction_JetsLoose +
2689 (*el).second +
"_AND_" +
2694 electronInJetSubtraction_Electrons
2695 + nominalElectrons +
"_AND_" +
2698 electronInJetSubtraction_Jets +
2699 nominalElectrons +
"_AND_" +
2702 electronInJetSubtraction_Jets +
2703 nominalElectrons +
"_AND_" +
2707 electronInJetSubtraction_JetsLoose
2708 + nominalElectrons +
"_AND_" +
2711 electronInJetSubtraction_JetsLoose +
2712 nominalElectrons +
"_AND_" +
2717 electronInJetSubtraction_nominalElectrons));
2719 electronInJetSubtraction_nominalJets));
2721 electronInJetSubtraction_nominalJetsLoose));
2728 typedef std::unordered_map<std::size_t, std::string>::const_iterator Itr2;
2773 (*i).second + tdsAux));
2796 (*i).second + tdsAux));
2802 typedef std::unordered_map<std::size_t, CP::SystematicSet>::const_iterator Itr;
2890 unsigned int TTreeIndex(0);
2918 return (*key).second;
2926 return (*key).second;
2934 return (*key).second;
2943 return (*key).second;
2948 std::unordered_map<std::size_t,
2952 return (*key).second;
2963 return (*key).second;
2968 std::unordered_map<std::size_t,
2969 std::string>::const_iterator
key =
2972 return (*key).second;
2983 return (*key).second;
2988 std::unordered_map<std::size_t,
2989 std::string>::const_iterator
key =
2992 return (*key).second;
3002 return (*key).second;
3010 return (*key).second;
3019 return (*key).second;
3028 return (*key).second;
3037 return (*key).second;
3045 return (*key).second;
3053 return (*key).second;
3061 return (*key).second;
3069 return (*key).second;
3077 return (*key).second;
3085 return (*key).second;
3093 return (*key).second;
3101 return (*key).second;
3109 return (*key).second;
3118 return (*key).second;
3123 if (!useLooseLeptonJets) {
3124 std::unordered_map<std::size_t,
3125 std::string>::const_iterator
key =
3128 return (*key).second;
3131 if (useLooseLeptonJets) {
3132 std::unordered_map<std::size_t,
3136 return (*key).second;
3148 return (*key).second;
3153 if (!useLooseLeptonJets) {
3154 std::unordered_map<std::size_t,
3158 return (*key).second;
3161 if (useLooseLeptonJets) {
3162 std::unordered_map<std::size_t,
3163 std::string>::const_iterator
key =
3166 return (*key).second;
3178 return (*key).second;
3183 if (!useLooseLeptonJets) {
3184 std::unordered_map<std::size_t,
3185 std::string>::const_iterator
key =
3188 return (*key).second;
3191 if (useLooseLeptonJets) {
3192 std::unordered_map<std::size_t,
3193 std::string>::const_iterator
key =
3196 return (*key).second;
3207 return (*key).second;
3215 return (*key).second;
3223 return (*key).second;
3231 return (*key).second;
3239 return (*key).second;
3247 return (*key).second;
3255 return (*key).second;
3263 return (*key).second;
3271 return (*key).second;
3279 return (*key).second;
3287 return (*key).second;
3295 return (*key).second;
3303 return (*key).second;
3311 return (*key).second;
3319 return (*key).second;
3327 return (*key).second;
3341 "TopConfig: Failed to retrieve decoKeyJetGhostTrack.");
3350 return (*key).second;
3356 const bool useLooseLeptonJets)
const {
3358 if (useLooseLeptonJets) {
3368 unsigned int index(99999);
3372 index = (*Itr).second;
3374 if (
index == 99999) {
3375 ATH_MSG_WARNING(
"ttreeIndex is crazy, something has gone wrong with the hash value = " <<
hash);
3381 unsigned int index(99999);
3385 index = (*Itr).second;
3387 if (
index == 99999) {
3388 ATH_MSG_WARNING(
"ttreeIndex is crazy, something has gone wrong with the hash value = " <<
hash);
3394 std::unordered_map<std::string,
3397 return (*key).second;
3406 return (*key).second;
3412 std::unordered_map<std::string, std::vector<std::pair<std::string, int> > >::const_iterator
key =
m_muonTriggers_Tight->find(
3415 return (*key).second;
3421 std::unordered_map<std::string,
3424 return (*key).second;
3430 std::unordered_map<std::string,
3433 return (*key).second;
3439 std::unordered_map<std::string,
3442 return (*key).second;
3451 return (*key).second;
3457 std::unordered_map<std::string, std::vector<std::pair<std::string, int> > >::const_iterator
key =
m_muonTriggers_Loose->find(
3460 return (*key).second;
3466 std::unordered_map<std::string,
3469 return (*key).second;
3475 std::unordered_map<std::string,
3478 return (*key).second;
3533 typedef std::unordered_map<std::size_t, std::string>::const_iterator Itr;
3536 out->m_chosen_btaggingWP_caloJet.emplace_back(btagWP);
3538 out->m_chosen_btaggingWP_trkJet.emplace_back(btagWP);
3541 out->m_systSgKeyMapPhotons.insert(std::make_pair((*i).first, (*i).second));
3544 out->m_systSgKeyMapElectrons.insert(std::make_pair((*i).first, (*i).second));
3547 out->m_systSgKeyMapFwdElectrons.insert(std::make_pair(
i.first,
i.second));
3550 out->m_systSgKeyMapMuons.insert(std::make_pair((*i).first, (*i).second));
3553 out->m_systSgKeyMapSoftMuons.insert(std::make_pair((*i).first, (*i).second));
3556 out->m_systSgKeyMapTaus.insert(std::make_pair((*i).first, (*i).second));
3559 out->m_systSgKeyMapJets.insert(std::make_pair((*i).first, (*i).second));
3563 out->m_systSgKeyMapJets_electronInJetSubtraction.insert(std::make_pair((*i).first, (*i).second));
3567 out->m_systSgKeyMapJetsLoose_electronInJetSubtraction.insert(std::make_pair((*i).first, (*i).second));
3570 out->m_systSgKeyMapLargeRJets.insert(std::make_pair((*i).first, (*i).second));
3573 out->m_systSgKeyMapTrackJets.insert(std::make_pair((*i).first, (*i).second));
3576 out->m_systSgKeyMapTracks.insert(std::make_pair((*i).first, (*i).second));
3579 out->m_systSgKeyMapMissingET.insert(std::make_pair((*i).first, (*i).second));
3582 out->m_systSgKeyMapMissingETLoose.insert(std::make_pair((*i).first, (*i).second));
3585 out->m_systSgKeyMapKLFitter.insert(std::make_pair((*i).first, (*i).second));
3588 out->m_systSgKeyMapKLFitterLoose.insert(std::make_pair((*i).first, (*i).second));
3591 out->m_systSgKeyMapPseudoTop.insert(std::make_pair((*i).first, (*i).second));
3594 out->m_systSgKeyMapPseudoTopLoose.insert(std::make_pair((*i).first, (*i).second));
3597 out->m_systDecoKeyMapJetGhostTrack.insert(std::make_pair((*i).first, (*i).second));
3600 out->m_systPersistantAllTTreeNames.insert(std::make_pair((*i).first, (*i).second));
3603 out->m_list_systHashAll.push_back(*
i);
3607 out->m_list_systHash_electronInJetSubtraction.push_back(*
i);
3611 out->m_allSelectionNames.push_back(*
i);
3614 out->m_allTriggers_Tight.insert(
i);
3617 out->m_electronTriggers_Tight.insert(
i);
3620 out->m_muonTriggers_Tight.insert(
i);
3623 out->m_tauTriggers_Tight.insert(
i);
3626 out->m_photonTriggers_Tight.insert(
i);
3630 out->m_allTriggers_Loose.insert(
i);
3633 out->m_electronTriggers_Loose.insert(
i);
3636 out->m_muonTriggers_Loose.insert(
i);
3639 out->m_tauTriggers_Loose.insert(
i);
3642 out->m_photonTriggers_Loose.insert(
i);
3695 typedef std::map<std::size_t, std::string>::const_iterator Itr;
3775 m_allTriggers_Tight = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3776 m_electronTriggers_Tight = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3777 m_muonTriggers_Tight = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3778 m_tauTriggers_Tight = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3779 m_photonTriggers_Tight = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3781 m_allTriggers_Loose = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3782 m_electronTriggers_Loose = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3783 m_muonTriggers_Loose = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3784 m_tauTriggers_Loose = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3785 m_photonTriggers_Loose = std::make_shared<std::unordered_map<std::string, std::vector<std::pair<std::string, int> > > >();
3825 else if (settings->
value(
"IsAFII") ==
"False") this->
setIsAFII(
false);
3826 else if (settings->
value(
"IsAFII") !=
" ")
throw std::runtime_error(
3827 "TopConfig: option IsAFII must be either True or False");
3828 else if (this->
isMC())
throw std::runtime_error(
"TopConfig: option IsAFII not set");
3835 else if (settings->
value(
"IsDataOverlay") !=
" ")
throw std::runtime_error(
3836 "TopConfig: option IsDataOverlay must be either True or False");
3842 std::string release_series =
"";
3843 const char* rel_temp =
std::getenv(
"ROOTCORE_RELEASE_SERIES");
3845 release_series = std::string(rel_temp);
3847 release_series =
"";
3850 if (release_series ==
"23") {
3852 }
else if (release_series ==
"24") {
3854 }
else if (release_series ==
"25") {
3902 if (
m_year ==
"UNKNOWN")
return;
3904 std::string year2(
"");
3905 if (
isMC &&
m_year ==
"2015") year2 =
"2016";
3906 if (
isMC &&
m_year ==
"2016") year2 =
"2015";
3908 auto removeYears = [](std::unordered_map<std::string,std::vector<std::pair<std::string, int> > >& trig,
const std::string& year1,
const std::string& year2) {
3909 auto itr = trig.begin();
3910 while (itr != trig.end()) {
3911 if ((*itr).first != year1 && (*itr).first != year2) {
3912 itr = trig.erase(itr);
3924 std::vector<std::string> muon_trigger_systematics,
3925 std::vector<std::string> photon_trigger_systematics,
3926 std::vector<std::string> electron_tool_names,
3927 std::vector<std::string> muon_tool_names,
3928 std::vector<std::string> photon_tool_names
3943 typedef std::shared_ptr<std::unordered_map<std::size_t, CP::SystematicSet> >
map_t;
3944 typedef std::unordered_map<std::size_t, CP::SystematicSet>::const_iterator Itr;
3946 if (
config.useJetGhostTrack()) {
3947 for (
const auto&
item :
config.systematicsJetGhostTrack()) {
3948 os <<
" Jet Ghost Track Systematic\t\t :: " <<
item <<
" \n";
3953 os <<
"top::TopConfig has identified the following analysis release series : " <<
config.getReleaseSeries() <<
"\n";
3954 os <<
"top::TopConfig will evaluate the following systematics (saved as TTrees in your ntuple) \n";
3955 os <<
"A blank systematic means \"Nominal\" in xAOD. All Nominal calibrations go into the Nominal TTree. \n";
3957 if (
config.usePhotons()) {
3959 for (Itr
i = syst->begin();
i != syst->end(); ++
i) {
3960 os <<
" Photon systematic\t :: " << (*i).second.name() <<
" \n";
3964 if (
config.useElectrons()) {
3966 for (Itr
i = syst->begin();
i != syst->end(); ++
i) {
3967 os <<
" Electron systematic\t :: " << (*i).second.name() <<
" \n";
3971 if (
config.useFwdElectrons()) {
3973 for (Itr
i = syst->begin();
i != syst->end(); ++
i) {
3974 os <<
" Fwd Electron systematic\t :: " << (*i).second.name() <<
" \n";
3980 for (Itr
i = syst->begin();
i != syst->end(); ++
i) {
3981 os <<
" Muon systematic\t :: " << (*i).second.name() <<
" \n";
3985 if (
config.useSoftMuons()) {
3987 for (Itr
i = syst->begin();
i != syst->end(); ++
i) {
3988 os <<
" Soft Muon systematic\t :: " << (*i).second.name() <<
" \n";
3994 for (Itr
i = syst->begin();
i != syst->end(); ++
i) {
3995 os <<
" Tau systematic\t :: " << (*i).second.name() <<
" \n";
4001 for (Itr
i = syst->begin();
i != syst->end(); ++
i) {
4002 os <<
" Jet systematic\t\t :: " << (*i).second.name() <<
" \n";
4006 if (
config.useLargeRJets()) {
4008 for (Itr
i = syst->begin();
i != syst->end(); ++
i) {
4009 os <<
" Large-R Jet systematic\t\t :: " << (*i).second.name() <<
" \n";