ATLAS Offline Software
Loading...
Searching...
No Matches
SUSYObjDef_xAOD.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Local include(s):
7
8// For making the systematics list and looping through it
11
12#ifndef XAOD_STANDALONE // For now metadata is Athena-only
14#endif
15
16// Need path resolver for initialize()
18
20
21
22// Including all the abstract interfaces - for systematics functions
25
31
43
49
55
57//disable #include "IsolationSelection/IIsolationLowPtPLVTool.h"
60
64
69// Required to use some functions (see header explanation)
71
78
80
81// For reading metadata
83
84// For configuration -- TEnv uses THashList
85#include "THashList.h"
86
87// system includes
88#include <fstream>
89#include <regex>
90
91namespace ST {
92
93using namespace std;
94
95using namespace Trig;
96using namespace TrigConf;
97using namespace xAOD;
98
99
103 m_jetInputType(xAOD::JetInput::Uncategorized),
104 m_force_noElId(false),
105 m_force_noMuId(false),
106 m_doTTVAsf(true),
109 m_useBtagging(false),
111 m_debug(false),
112 m_strictConfigCheck(false),
113 m_badJetCut(""),
115 m_fatJetUncVars(""),
116 m_WDecorName(""),
117 m_ZDecorName(""),
118 m_TopDecorName(""),
119 m_WtagConfig(""),
120 m_ZtagConfig(""),
121 m_ToptagConfig(""),
124 m_WTagUncConfig(""),
125 m_ZTagUncConfig(""),
128 m_tool_init(false),
129 m_subtool_init(false),
130 // set dummies for configuration
131 m_eleTerm(""),
132 m_gammaTerm(""),
133 m_tauTerm(""),
134 m_jetTerm(""),
135 m_muonTerm(""),
137 m_outMETTerm(""),
141 m_metUseGhostMuons(false),
142 m_metDoMuonEloss(false),
143 m_metGreedyPhotons(false),
146 m_trkMETsyst(true),
147 m_caloMETsyst(false),
148 m_softTermParam(-99),
149 m_treatPUJets(true),
150 m_doPhiReso(true),
151 m_autoconfigPRW(false),
157 m_mcCampaign(""),
158 m_mcChannel(-99),
159 m_useCommonPRWFiles(false),
168 m_prwDataSF(-99.),
169 m_prwDataSF_UP(-99.),
170 m_prwDataSF_DW(-99.),
173 m_eleId(""),
174 m_eleIdBaseline(""),
175 m_eleConfig(""),
178 m_eleIdExpert(false),
179 m_muId(static_cast<int>(xAOD::Muon::Quality(xAOD::Muon::VeryLoose))),
180 m_muIdBaseline(static_cast<int>(xAOD::Muon::Quality(xAOD::Muon::VeryLoose))),
181 m_photonId(""),
183 m_tauId(""),
184 m_tauIdBaseline(""),
185 m_eleIso_WP(""),
188 m_eleChID_WP(""),
189 m_eleLRT_strat(-99),
190 m_eleChIso(true),
191 m_eleChID_signal(false),
192 m_runECIS(false),
194 m_photonIso_WP(""),
197 m_muIso_WP(""),
201 m_muEffCorrForce1D(false),
202 m_BtagWP(""),
203 m_BtagTagger(""),
204 m_BtagMinPt(-99.),
210 m_BtagWP_trkJet(""),
212 m_BtagMinPt_trkJet(-99.),
213 //configurable cuts here
214 m_eleBaselinePt(-99.),
215 m_eleBaselineEta(-99.),
217 m_elePt(-99.),
218 m_eleEta(-99.),
219 m_eleCrackVeto(false),
220 m_eled0sig(-99.),
221 m_elez0(-99.),
222 m_elebaselined0sig(-99.),
223 m_elebaselinez0(-99),
226 //
227 m_muBaselinePt(-99.),
228 m_muBaselineEta(-99.),
229 m_muPt(-99.),
230 m_muEta(-99.),
231 m_mud0sig(-99.),
232 m_muz0(-99.),
233 m_mubaselined0sig(-99.),
234 m_mubaselinez0(-99.),
236 m_muCosmicz0(-99.),
237 m_muCosmicd0(-99.),
238 m_badmuQoverP(-99.),
240 //
241 m_photonBaselinePt(-99.),
243 m_photonEta(-99.),
244 m_photonPt(-99.),
246 m_photonCrackVeto(true),
247 m_photonAllowLate(false),
248 //
249 m_tauPrePtCut(-99.),
250 m_tauPt(-99.),
251 m_tauEta(-99.),
252 m_tauConfigPath(""),
254 m_tauDoTTM(false),
259 //
260 m_jetPt(-99.),
261 m_jetEta(-99.),
262 m_jetJvt(-99.),
263 m_JvtWP(""),
264 m_JvtPtMax(-99.),
265 m_JvtConfigRun2(""),
266 m_JvtConfigRun3(""),
267 m_trkJetPt(-99.),
268 m_trkJetEta(-99.),
269 m_doFwdJVT(false),
270 m_fJvtWP(""),
271 m_fJvtPtMax(-99.),
272 m_fJvtEtaMin(-99.),
275 m_JMScalib(false),
276 //
277 m_orDoTau(false),
278 m_orDoPhoton(false),
279 m_orDoEleJet(true),
280 m_orDoElEl(false),
281 m_orDoElMu(false),
282 m_orDoMuonJet(true),
283 m_orDoBjet(false),
284 m_orDoElBjet(true),
285 m_orDoMuBjet(true),
286 m_orDoTauBjet(true),
288 m_orBoostedElectronC1(-999.), // set to positive value to activate
289 m_orBoostedElectronC2(-999.), // set to positive value to activate
290 m_orBoostedElectronMaxConeSize(-999.), // set to positive value to activate
291 m_orDoBoostedMuon(true),
292 m_orBoostedMuonC1(-999.), // set to positive value to activate
293 m_orBoostedMuonC2(-999.), // set to positive value to activate
294 m_orBoostedMuonMaxConeSize(-999.), // set to positive value to activate
295 m_orApplyRelPt(false),
296 m_orMuJetPtRatio(-999.),
297 m_orMuJetTrkPtRatio(-999.),
298 m_orMuJetInnerDR(-999),
301 m_orBtagWP(""),
302 m_orInputLabel(""),
303 m_orPhotonFavoured(false),
306 m_orDoFatjets(false),
307 m_EleFatJetDR(-999.),
308 m_JetFatJetDR(-999.),
309 m_doIsoSignal(true),
310 m_doElIsoSignal(true),
311 m_doPhIsoSignal(true),
312 m_doMuIsoSignal(true),
313
316
317 m_useTRUTH3(true),
318
319 m_slices(std::map<std::string,bool>()),
320 m_isRun3(false),
321 m_isPHYSLITE(false),
322
324 m_fatJets(""),
325 //
328 m_EG_corrModel(""),
329 m_EG_corrFNList(""),
330 m_applyJVTCut(true),
331 //
332 // set toolhandles empty by default
333 m_jetCalibTool(""),
348 //
349 m_WTaggerTool(""),
350 m_ZTaggerTool(""),
351 m_TopTaggerTool(""),
356 //
360 m_muonCalibTool(""),
367 //
374 //
378 m_photonSelIsEM(""),
386 //
387 m_tauSelTool(""),
390 m_tauTruthMatch(""),
391 m_tauEffTool(""),
392 //
393 m_btagEffTool(""),
394 m_btagSelTool(""),
398 //
399 m_metMaker(""),
400 m_metSystTool(""),
401 m_metSignif(""),
402 //
431 m_trigConfTool(""),
432 m_trigDecTool(""),
436 //
437 m_isoCorrTool(""),
438 m_isoTool(""),
439 //disable m_isoToolLowPtPLV(""),
441 m_isoHighPtTool(""),
442 //
443 m_prwTool(""),
444 //
445 m_LRTuncTool(""),
446 //
447 m_orToolbox("ORToolbox",this),
448 //
451 //
452 m_acc_eleIdBaseline("DFCommonElectronsLHLooseBL"),
453 m_acc_eleId("DFCommonElectronsLHTight"),
454 m_acc_photonIdBaseline("DFCommonPhotonsIsEMTight"),
455 m_acc_photonId("DFCommonPhotonsIsEMTight"),
456 //
457 m_acc_jetClean("DFCommonJets_jetClean_LooseBad")
458{
459 //General settings
460 declareProperty( "DataSource", m_dataSource = Undefined );
461 declareProperty( "DebugMode", m_debug );
462 declareProperty( "ConfigFile", m_configFile = "SUSYTools/SUSYTools_Default.conf" );
463 //Overlap Removal
464 declareProperty( "DoTauOR", m_orDoTau );
465 declareProperty( "DoPhotonOR", m_orDoPhoton );
466 declareProperty( "DoEleJetOR", m_orDoEleJet );
467 declareProperty( "DoElElOR", m_orDoElEl );
468 declareProperty( "DoElMuOR", m_orDoElMu );
469 declareProperty( "DoMuonJetOR", m_orDoMuonJet );
470 declareProperty( "DoBjetOR", m_orDoBjet );
471 declareProperty( "DoElBjetOR", m_orDoElBjet );
472 declareProperty( "DoMuBjetOR", m_orDoMuBjet );
473 declareProperty( "DoTauBjetOR", m_orDoTauBjet );
474 declareProperty( "UseBtagging", m_useBtagging );
475 declareProperty( "UseBtaggingTrkJet", m_useBtagging_trkJet );
476 declareProperty( "DoBoostedElectronOR", m_orDoBoostedElectron );
477 declareProperty( "BoostedElectronORC1", m_orBoostedElectronC1 );
478 declareProperty( "BoostedElectronORC2", m_orBoostedElectronC2 );
479 declareProperty( "BoostedElectronORMaxConeSize", m_orBoostedElectronMaxConeSize );
480 declareProperty( "DoBoostedMuonOR", m_orDoBoostedMuon );
481 declareProperty( "BoostedMuonORC1", m_orBoostedMuonC1 );
482 declareProperty( "BoostedMuonORC2", m_orBoostedMuonC2 );
483 declareProperty( "BoostedMuonORMaxConeSize", m_orBoostedMuonMaxConeSize );
484 declareProperty( "ORDoMuonJetGhostAssociation", m_orDoMuonJetGhostAssociation );
485 declareProperty( "ORRemoveCaloMuons", m_orRemoveCaloMuons );
486 declareProperty( "ORMuJetApplyRelPt", m_orApplyRelPt);
487 declareProperty( "ORMuJetPtRatio", m_orMuJetPtRatio);
488 declareProperty( "ORMuJetInnerDR", m_orMuJetInnerDR );
489 declareProperty( "ORJetTrkPtRatio", m_orMuJetTrkPtRatio);
490 declareProperty( "ORInputLabel", m_orInputLabel);
491 declareProperty( "ORPhotonFavoured", m_orPhotonFavoured);
492 declareProperty( "ORBJetPtUpperThres", m_orBJetPtUpperThres);
493 declareProperty( "ORLinkOverlapObjects", m_orLinkOverlapObjects);
494
495 declareProperty( "DoFatJetOR", m_orDoFatjets);
496 declareProperty( "OREleFatJetDR", m_EleFatJetDR);
497 declareProperty( "ORJetFatJetDR", m_JetFatJetDR);
498 declareProperty( "TriggerUpstreamMatching", m_upstreamTriggerMatching, "Use alternative trigger matching tool based on upstream (in-derivation) matching");
499 declareProperty( "TriggerMatchingPrefix", m_trigMatchingPrefix, "Prefix for trigger matching containers (Analysis for PHSYLITE derivations");
500
501 //--- Object definitions
502 //MET
503 declareProperty( "METEleTerm", m_eleTerm );
504 declareProperty( "METGammaTerm", m_gammaTerm );
505 declareProperty( "METTauTerm", m_tauTerm );
506 declareProperty( "METJetTerm", m_jetTerm );
507 declareProperty( "METMuonTerm", m_muonTerm );
508 declareProperty( "METInputSuffix", m_inputMETSuffix );
509 declareProperty( "METOutputTerm", m_outMETTerm );
510 declareProperty( "METDoTrkSyst", m_trkMETsyst );
511 declareProperty( "METDoCaloSyst", m_caloMETsyst );
512 declareProperty( "METDoTrkJetSyst", m_trkJetsyst );
513 declareProperty( "METJetSelection", m_metJetSelection );
514 declareProperty( "METSysConfigPrefix", m_metsysConfigPrefix );
515
516 declareProperty( "METRemoveORCaloTaggedMuons", m_metRemoveOverlappingCaloTaggedMuons);
517 declareProperty( "METDoSetMuonJetEMScale", m_metDoSetMuonJetEMScale);
518 declareProperty( "METDoRemoveMuonJets", m_metDoRemoveMuonJets );
519 declareProperty( "METUseGhostMuons", m_metUseGhostMuons );
520 declareProperty( "METDoMuonEloss", m_metDoMuonEloss );
521 declareProperty( "METDoGreedyPhotons", m_metGreedyPhotons );
522 declareProperty( "METDoVeryGreedyPhotons", m_metVeryGreedyPhotons );
523
524
525 declareProperty( "SoftTermParam", m_softTermParam);
526 declareProperty( "TreatPUJets", m_treatPUJets);
527 declareProperty( "DoPhiReso", m_doPhiReso);
528
529 //JETS
530 declareProperty( "JetInputType", m_jetInputType );
531
532 declareProperty( "FwdJetDoJVT", m_doFwdJVT );
533
534 declareProperty( "JetJMSCalib", m_JMScalib );
535 declareProperty( "JetLargeRcollection", m_fatJets );
536
537 //BTAGGING
538 declareProperty( "BtagTagger", m_BtagTagger);
539 declareProperty( "BtagWPOR", m_orBtagWP); //the one used in the Overlap Removal
540 declareProperty( "BtagWP", m_BtagWP); //the one used in FillJet() afterwards
541 declareProperty( "BtagMinPt", m_BtagMinPt); // minimum jetPt cut (MR31061) >=20 GeV EM jets & >=10 GeV TrackJets (not calibrated below)
542 declareProperty( "BtagKeyOverride", m_BtagKeyOverride);
544 declareProperty( "BtagTaggerTrkJet", m_BtagTagger_trkJet);
545 declareProperty( "BtagMinPtTrkJet", m_BtagMinPt_trkJet); // minimum jetPt cut (MR31061) >=20 GeV EM jets & >=10 GeV TrackJets (not calibrated below)
546 declareProperty( "BtagWPTrkJet", m_BtagWP_trkJet); //the one used in FillTrackJet() afterwards
547 //ELECTRONS
548 declareProperty( "EleBaselinePt", m_eleBaselinePt);
549 declareProperty( "ElePt", m_elePt);
550 declareProperty( "EleBaselineEta", m_eleBaselineEta);
551 declareProperty( "EleEta", m_eleEta);
552 declareProperty( "EleBaselineId", m_eleIdBaseline);
553 declareProperty( "EleBaselineConfig", m_eleConfigBaseline);
554 declareProperty( "EleBaselineCrackVeto", m_eleBaselineCrackVeto);
555 declareProperty( "EleId", m_eleId);
556 declareProperty( "EleConfig", m_eleConfig);
557 declareProperty( "EleIso", m_eleIso_WP);
558 declareProperty( "EleIsoHighPt", m_eleIsoHighPt_WP);
559 declareProperty( "EleIsoHighPtThresh", m_eleIsoHighPtThresh);
560 declareProperty( "EleCFT", m_eleChID_WP);
561 declareProperty( "EleCFTIso", m_eleChIso);
562 declareProperty( "EleCFTSignal", m_eleChID_signal);
563 declareProperty( "EleD0sig", m_eled0sig);
564 declareProperty( "EleZ0", m_elez0);
565 declareProperty( "EleBaselineD0sig", m_elebaselined0sig);
566 declareProperty( "EleBaselineZ0", m_elebaselinez0);
567 declareProperty( "EleCrackVeto", m_eleCrackVeto);
568 declareProperty( "EleForceNoId", m_force_noElId );
569 declareProperty( "EleEffMapFilePath", m_eleEffMapFilePath);
570 declareProperty( "EleAllowRun3TrigSFFallback", m_eleAllowRun3TrigSFFallback);
571 declareProperty( "EleForceFullSimCalib", m_eleForceFullSimCalib);
572
573 //MUONS
574 declareProperty( "MuonBaselinePt", m_muBaselinePt);
575 declareProperty( "MuonPt", m_muPt);
576 declareProperty( "MuonBaselineEta", m_muBaselineEta);
577 declareProperty( "MuonEta", m_muEta);
578 declareProperty( "MuonBaselineId", m_muIdBaseline);
579 declareProperty( "MuonId", m_muId);
580 declareProperty( "MuonIso", m_muIso_WP);
581 declareProperty( "MuonIsoHighPt", m_muIsoHighPt_WP);
582 declareProperty( "MuonIsoHighPtThresh", m_muIsoHighPtThresh);
583 declareProperty( "MuonHighPtExtraSmear", m_muHighPtExtraSmear);
584 declareProperty( "MuonEffCorrForce1D", m_muEffCorrForce1D);
585 declareProperty( "MuonD0sig", m_mud0sig);
586 declareProperty( "MuonZ0", m_muz0);
587 declareProperty( "MuonBaselineD0sig", m_mubaselined0sig);
588 declareProperty( "MuonBaselineZ0", m_mubaselinez0);
589 declareProperty( "MuonRequireHighPtCuts", m_murequirepassedHighPtCuts);
590 declareProperty( "MuonForceNoId", m_force_noMuId );
591 declareProperty( "MuonTTVASF", m_doTTVAsf );
592 declareProperty( "MuonCalibrationMode", m_muCalibrationMode);
593 //MUONS TRIGGER SCALE FACTOR
594 declareProperty( "MuonTriggerSFCalibRelease", m_muTriggerSFCalibRelease );
595 declareProperty( "MuonTriggerSFCalibFilename", m_muTriggerSFCalibFilename );
596 //PHOTONS
597 declareProperty( "PhotonBaselinePt", m_photonBaselinePt);
598 declareProperty( "PhotonPt", m_photonPt);
599 declareProperty( "PhotonBaselineEta", m_photonBaselineEta);
600 declareProperty( "PhotonEta", m_photonEta);
601 declareProperty( "PhotonBaselineId", m_photonIdBaseline);
602 declareProperty( "PhotonId", m_photonId);
603 declareProperty( "PhotonIso", m_photonIso_WP);
604 declareProperty( "PhotonTriggerName", m_photonTriggerName);
605 declareProperty( "PhotonBaselineCrackVeto", m_photonBaselineCrackVeto);
606 declareProperty( "PhotonCrackVeto", m_photonCrackVeto);
607 declareProperty( "PhotonAllowLate", m_photonAllowLate);
608
609 //TAUS
610 declareProperty( "TauBaselineId", m_tauIdBaseline);
611 declareProperty( "TauId", m_tauId);
612 declareProperty( "TauIdConfigPathBaseline", m_tauConfigPathBaseline);
613 declareProperty( "TauIdConfigPath", m_tauConfigPath);
614 declareProperty( "TauDoTruthMatching", m_tauDoTTM);
615 declareProperty( "TauSmearingToolRecommendationTag", m_tauSmearingToolRecommendationTag);
616 declareProperty( "TauSmearingToolGenerator", m_tauSmearingToolGenerator);
617 declareProperty( "TauEffToolRecommendationTag", m_tauEffToolRecommendationTag);
618 declareProperty( "TauMVATESQualityCheck", m_ApplyMVATESQualityCheck);
619
620 //Leptons
621 declareProperty( "SigLepRequireIso", m_doIsoSignal ); //leave here for back-compatibility
622 declareProperty( "SigElRequireIso", m_doElIsoSignal );
623 declareProperty( "SigMuRequireIso", m_doMuIsoSignal );
624 declareProperty( "SigPhRequireIso", m_doPhIsoSignal );
625
626 //Isolation correction for leptons and photons
627 declareProperty( "UseSigLepForIsoCloseByOR", m_useSigLepForIsoCloseByOR );
628 declareProperty( "IsoCloseByORpassLabel", m_IsoCloseByORpassLabel );
629
630 //Truth
631 declareProperty( "UseTRUTH3", m_useTRUTH3 ); // true if using TRUTH3 type containers
632
633 //--- Tools configuration
634 //PRW
635 declareProperty( "AutoconfigurePRWTool", m_autoconfigPRW );
636 declareProperty( "AutoconfigurePRWToolPath", m_autoconfigPRWPath ); // e.g. dev/PileupReweighting/share/
637 declareProperty( "AutoconfigurePRWToolFile", m_autoconfigPRWFile ); // e.g. DSID407xxx/pileup_mc16a_dsid407352_FS.root
638 declareProperty( "AutoconfigurePRWToolCombinedmode", m_autoconfigPRWCombinedmode );
639 declareProperty( "AutoconfigurePRWToolRPVmode", m_autoconfigPRWRPVmode );
640 declareProperty( "AutoconfigurePRWToolRtags", m_autoconfigPRWRtags );
641 declareProperty( "mcCampaign", m_mcCampaign );
642 declareProperty( "mcChannel", m_mcChannel );
643 declareProperty( "PRWConfigFiles", m_prwConfFiles );
644 declareProperty( "PRWLumiCalcFiles", m_prwLcalcFiles );
645 declareProperty( "PRWActualMu2017File", m_prwActualMu2017File );
646 declareProperty( "PRWActualMu2018File", m_prwActualMu2018File );
647 declareProperty( "PRWActualMu2022File", m_prwActualMu2022File );
648 declareProperty( "PRWActualMu2023File", m_prwActualMu2023File );
649 declareProperty( "PRWActualMu2024File", m_prwActualMu2024File );
650 declareProperty( "PRWDataScaleFactor", m_prwDataSF);
651 declareProperty( "PRWDataScaleFactorUP", m_prwDataSF_UP);
652 declareProperty( "PRWDataScaleFactorDOWN", m_prwDataSF_DW);
653 declareProperty( "PRWUseRunDependentPrescaleWeight", m_runDepPrescaleWeightPRW);
654 declareProperty( "PRWUseCommonMCFiles", m_useCommonPRWFiles);
655 declareProperty( "PRWCommonFileMC20a", m_commonPRWFileMC20a);
656 declareProperty( "PRWCommonFileMC20d", m_commonPRWFileMC20d);
657 declareProperty( "PRWCommonFileMC20e", m_commonPRWFileMC20e);
658 declareProperty( "PRWCommonFileMC21a", m_commonPRWFileMC21a);
659 declareProperty( "PRWCommonFileMC23a", m_commonPRWFileMC23a);
660 declareProperty( "PRWCommonFileMC23c", m_commonPRWFileMC23c);
661 declareProperty( "PRWCommonFileMC23d", m_commonPRWFileMC23d);
662 declareProperty( "PRWCommonFileMC23e", m_commonPRWFileMC23e);
663 //LargeR uncertainties config, as from https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/JetUncertainties2016PrerecLargeR#Understanding_which_configuratio
664 declareProperty( "JetLargeRuncConfig", m_fatJetUncConfig );
665 declareProperty( "JetLargeRuncVars", m_fatJetUncVars );
666 declareProperty( "JetWtaggerConfig", m_WtagConfig );
667 declareProperty( "JetZtaggerConfig", m_ZtagConfig );
668 declareProperty( "JetWZTaggerCalibArea", m_WZTaggerCalibArea );
669 declareProperty( "JetToptaggerConfig", m_ToptagConfig );
670 declareProperty( "JetTruthLabelName", m_JetTruthLabelName );
671 declareProperty( "JetTopTaggerCalibArea", m_TopTaggerCalibArea );
672 declareProperty( "JetWTaguncConfig", m_WTagUncConfig );
673 declareProperty( "JetZTaguncConfig", m_ZTagUncConfig );
674 declareProperty( "JetTopTaguncConfig", m_TopTagUncConfig );
675 //Btagging MCtoMC SFs
676 declareProperty( "ShowerType", m_showerType = 0 );
677 //Egamma NP correlation model
678 declareProperty( "EleEffNPcorrModel", m_EG_corrModel );
679 //Egamma correction file list override
680 declareProperty( "EleEffCorrFNList", m_EG_corrFNList );
681 declareProperty( "IsRun3", m_isRun3 );
682 declareProperty( "IsPHYSLITE", m_isPHYSLITE );
683
684 //For electron trigger SF tools
685 declareProperty( "ElectronTriggerSFStringSingle", m_electronTriggerSFStringSingle);
686
687 //--- Tool pointers /MT : we may want to improve the descriptions :)
688 m_jetCalibTool.declarePropertyFor( this, "JetCalibTool", "The JetCalibTool" );
689 m_jetFatCalibTool.declarePropertyFor( this, "FatJetCalibTool", "The JetCalibTool for large-R jets" );
690 m_jetUncertaintiesTool.declarePropertyFor( this, "JetUncertaintiesTool", "The JetUncertaintiesTool" );
691 m_jetUncertaintiesPDSmearTool.declarePropertyFor( this, "JetPDSmearUncertaintiesTool", "The JetPDSmearUncertaintiesTool" );
692 m_fatjetUncertaintiesTool.declarePropertyFor( this, "FatJetUncertaintiesTool", "The JetUncertaintiesTool for large-R jets" );
693 m_fatjetUncertaintiesPDSmearTool.declarePropertyFor( this, "FatJetPDSmearUncertaintiesTool", "The FatJetPDSmearUncertaintiesTool" );
694 m_fatjetFFSmearingTool.declarePropertyFor( this, "FatJetFFSmearingTool", "The FFSmearingTool for large-R jets" );
695 m_WTagjetUncertaintiesTool.declarePropertyFor( this, "WJetUncertaintiesTool", "The JetUncertaintiesTool for large-R W-tagged jets" );
696 m_ZTagjetUncertaintiesTool.declarePropertyFor( this, "ZJetUncertaintiesTool", "The JetUncertaintiesTool for large-R Z-tagged jets" );
697 m_TopTagjetUncertaintiesTool.declarePropertyFor( this, "TopJetUncertaintiesTool", "The JetUncertaintiesTool for large-R Top-tagged jets" );
698 m_jetCleaningTool.declarePropertyFor( this, "JetCleaningTool", "The JetCleaningTool" );
699 m_jetPileupLabelingTool.declarePropertyFor( this, "JetPileupLabelingTool", "The JetPileupLabelingTool" );
700 m_jetJvtMomentTool.declarePropertyFor( this, "JetJvtMomentTool", "The JetJvtMomentTool" );
701 m_jetNNJvtMomentTool.declarePropertyFor( this, "JetNNJvtMomentTool", "The JetNNJvtMomentTool" );
702 m_jetNNJvtSelectionTool.declarePropertyFor( this, "JetNNJvtSelectionTool", "The JetNNJvtSelectionTool" );
703 m_jetNNJvtEfficiencyTool.declarePropertyFor( this, "JetNNJvtEfficiencyTool", "The JetNNJvtEfficiencyTool" );
704 m_jetfJvtSelectionTool.declarePropertyFor( this, "JetfJvtSelectionTool", "The JetfJvtSelectionTool" );
705 m_jetfJvtEfficiencyTool.declarePropertyFor( this, "JetfJvtEfficiencyTool", "The JetfJvtEfficiencyTool" );
706 //
707 m_WTaggerTool.declarePropertyFor( this, "WTaggerTool", "The SmoothedWZTaggerTool" );
708 m_ZTaggerTool.declarePropertyFor( this, "ZTaggerTool", "The SmoothedWZTaggerTool" );
709 m_TopTaggerTool.declarePropertyFor( this, "TopTaggerTool", "The DNNTopTaggerTool" );
710 m_jetTruthLabelingTool.declarePropertyFor( this, "JetTruthLabelingTool", "The JetTruthLabelingTool" );
711 //
712 m_muonSelectionTool.declarePropertyFor( this, "MuonSelectionTool", "The MuonSelectionTool for signal muons" );
713 m_muonSelectionHighPtTool.declarePropertyFor( this, "MuonSelectionHighPtTool", "The MuonSelectionTool for signal muons (HighPt WP)" );
714 m_muonSelectionToolBaseline.declarePropertyFor( this, "MuonSelectionToolBaseline", "The MuonSelectionTool for baseline muons" );
715 m_muonCalibTool.declarePropertyFor( this, "MuonCalibTool", "The MuonCalibTool" );
716 m_muonEfficiencySFTool.declarePropertyFor( this, "MuonEfficiencyScaleFactorsTool", "The MuonEfficiencySFTool" );
717 m_muonEfficiencyBMHighPtSFTool.declarePropertyFor( this, "MuonBadMuonHighPtScaleFactorsTool", "The MuonBadMuonHighPtSFTool" );
718 m_muonTTVAEfficiencySFTool.declarePropertyFor( this, "MuonTTVAEfficiencyScaleFactorsTool", "The MuonTTVAEfficiencySFTool" );
719 m_muonIsolationSFTool.declarePropertyFor( this, "MuonIsolationScaleFactorsTool", "The MuonIsolationSFTool" );
720 m_muonHighPtIsolationSFTool.declarePropertyFor( this, "MuonHighPtIsolationScaleFactorsTool", "The MuonIsolationSFTool" );
721 m_muonTriggerSFTool.declarePropertyFor( this, "MuonTriggerScaleFactorsTool", "The MuonTriggerSFTool" );
722 m_muonLRTORTool.declarePropertyFor( this, "MuonLRTOverlapRemovalTool", "Prompt/LRT muon OR Tool" );
723 //
724 m_elecEfficiencySFTool_reco.declarePropertyFor( this, "ElectronEfficiencyCorrectionTool_reco", "The ElectronEfficiencyCorrectionTool for reconstruction SFs" );
725 m_elecEfficiencySFTool_trig_singleLep.declarePropertyFor( this, "ElectronEfficiencyCorrectionTool_trig_singleLep", "The ElectronEfficiencyCorrectionTool for single-e triggers" );
726 m_elecEfficiencySFTool_id.declarePropertyFor( this, "ElectronEfficiencyCorrectionTool_id", "The ElectronEfficiencyCorrectionTool for ID SFs" );
727 m_elecEfficiencySFTool_iso.declarePropertyFor( this, "ElectronEfficiencyCorrectionTool_iso" , "The ElectronEfficiencyCorrectionTool for iso SFs" );
728 m_elecEfficiencySFTool_isoHighPt.declarePropertyFor( this, "ElectronEfficiencyCorrectionTool_isoHigPt" , "The ElectronEfficiencyCorrectionTool for iso high-pt SFs" );
729 m_elecSelLikelihood.declarePropertyFor( this, "ElectronLikelihoodTool" , "The ElectronSelLikelihoodTool for signal electrons" );
730 m_elecSelLikelihoodBaseline.declarePropertyFor( this, "ElectronLikelihoodToolBaseline" , "The ElectronSelLikelihoodTool for baseline electrons" );
731 m_egammaAmbiguityTool.declarePropertyFor( this, "EgammaAmbiguityTool", "The EgammaAmbiguityTool" );
732 m_elecChargeIDSelectorTool.declarePropertyFor( this, "ElectronChargeIDSelectorTool", "The ElectronChargeIDSelectorTool" );
733 m_elecChargeEffCorrTool.declarePropertyFor( this, "ElectronChargeEffCorrectionTool", "The ElectronChargeEffCorrectionTool" );
734 m_elecLRTORTool.declarePropertyFor( this, "ElectronLRTOverlapRemovalTool", "Prompt/LRT electron OR Tool" );
735 //
736 m_photonSelIsEM.declarePropertyFor( this, "PhotonIsEMSelector" , "The PhotonIsEMSelectorTool for signal photons" );
737 m_photonSelIsEMBaseline.declarePropertyFor( this, "PhotonIsEMSelectorBaseline" , "The PhotonIsEMSelectorTool for baseline photons" );
738 m_photonEfficiencySFTool.declarePropertyFor( this, "PhotonEfficiencyCorrectionTool", "The PhotonEfficiencyCorrectionTool for reco SFs" );
739 m_photonIsolationSFTool.declarePropertyFor( this, "PhotonIsolationCorrectionTool", "The PhotonEfficiencyCorrectionTool for iso SFs" );
740 m_photonTriggerSFTool.declarePropertyFor( this, "PhotonTriggerEfficiencyCorrectionTool", "The PhotonEfficiencyCorrectionTool for trigger SFs" );
741 //
742 m_egammaCalibTool.declarePropertyFor( this, "EgammaCalibrationAndSmearingTool", "The EgammaCalibrationAndSmearingTool");
743 //
744 m_tauSelTool.declarePropertyFor( this, "TauSelectionTool", "The TauSelectionTool for signal taus" );
745 m_tauSelToolBaseline.declarePropertyFor( this, "TauSelectionToolBaseline", "The TauSelectionTool for baseline taus" );
746 m_tauSmearingTool.declarePropertyFor( this, "TauSmearingTool", "The TauSmearingTool" );
747 m_tauTruthMatch.declarePropertyFor( this, "TauTruthMatch", "The TTMT" );
748 m_tauEffTool.declarePropertyFor( this, "TauEfficiencyCorrectionsTool", "The TauEfficiencyCorrectionsTool" );
749 //
750 m_btagEffTool.declarePropertyFor( this, "BTaggingEfficiencyTool", "The BTaggingEfficiencyTool" );
751 m_btagSelTool.declarePropertyFor( this, "BTaggingSelectionTool", "The main BTaggingSelectionTool" );
752 m_btagSelTool_OR.declarePropertyFor( this, "BTaggingSelectionTool_OR", "The BTaggingSelectionTool used to select b-jets for overlap removal" );
753 m_btagEffTool_trkJet.declarePropertyFor( this, "BTaggingEfficiencyTool_trkJet", "The BTaggingEfficiencyTool for track jets" );
754 m_btagSelTool_trkJet.declarePropertyFor( this, "BTaggingSelectionTool_trkJet", "The main BTaggingSelectionTool for track jets" );
755 //
756 m_metMaker.declarePropertyFor( this, "METMaker", "The METMaker instance");
757 m_metSystTool.declarePropertyFor( this, "METSystTool", "The METSystematicsTool");
758 m_metSignif.declarePropertyFor( this, "METSignificance", "The METSignifiance instance");
759 //
760 m_trigGlobalEffCorrTool_diLep.declarePropertyFor( this, "TrigGlobalEfficiencyCorrection_diLep", "The TrigGlobalEfficiencyCorrection tool for dilepton" );
761 m_trigGlobalEffCorrTool_multiLep.declarePropertyFor( this, "TrigGlobalEfficiencyCorrection_multiLep", "The TrigGlobalEfficiencyCorrection tool for trilepton" );
762 m_trigGlobalEffCorrTool_diPhoton.declarePropertyFor( this, "TrigGlobalEfficiencyCorrection_diPhoton", "The TrigGlobalEfficiencyCorrection tool for asymmetric diphoton" );
763 m_trigConfTool.declarePropertyFor( this, "TrigConfigTool", "The TrigConfigTool" );
764 m_trigDecTool.declarePropertyFor( this, "TrigDecisionTool", "The TrigDecisionTool" );
765 m_trigMatchingTool.declarePropertyFor( this, "TrigMatchTool", "The TrigMatchingTool" );
766 m_trigMatchScoringTool.declarePropertyFor( this, "TrigMatchScoringTool", "The TrigMatchScoringTool" );
767 m_trigDRScoringTool.declarePropertyFor( this, "TrigDRScoringTool", "The TrigDRScoringTool" );
768 //
769 m_isoCorrTool.declarePropertyFor( this, "IsolationCorrectionTool", "The IsolationCorrectionTool" );
770 m_isoTool.declarePropertyFor( this, "IsolationSelectionTool", "The IsolationSelectionTool");
771 //disable m_isoToolLowPtPLV.declarePropertyFor( this, "IsolationLowPtPLVTool", "The IsolationLowPtPLVTool");
772 m_isoBaselineTool.declarePropertyFor( this, "IsolationSelectionTool_Baseline", "The IsolationSelectionTool for baseline objects");
773 m_isoHighPtTool.declarePropertyFor( this, "IsolationSelectionTool_HighPt", "The IsolationSelectionTool for High Pt");
774 m_isoCloseByTool.declarePropertyFor( this, "IsolationCloseByCorrectionTool", "The IsolationCloseByCorrectionTool");
775 //
776 m_prwTool.declarePropertyFor( this, "PileupReweightingTool", "The PRW tool" );
777 //
778 m_LRTuncTool.declarePropertyFor( this, "InclusiveTrackFilterTool", "The LRT uncertainty tool");
779 //
780 m_pmgSHnjetWeighter.declarePropertyFor( this, "PMGSHVjetReweightTool", "The PMGSHVjetReweightTool (AntiKt4TruthJets)" );
781 m_pmgSHnjetWeighterWZ.declarePropertyFor( this, "PMGSHVjetReweightWZTool", "The PMGSHVjetReweightTool (AntiKt4TruthWZJets)" );
782 //
783 m_tauJetORtool.declarePropertyFor( this, "TauJetOverlapTool", "The TauJetOverlapTool");
784 //disable m_orToolbox.declarePropertyFor( this, "OverlapRemovalTool", "The overlap removal tool");
785
786 //load supported WPs (by tightness order)
787 m_el_id_support.push_back("VeryLooseNoPix"); // WPs for LRT Electron
788 m_el_id_support.push_back("VeryLooseLLH");
789 m_el_id_support.push_back("LooseNoPix"); // WPs for LRT Electron
790 m_el_id_support.push_back("LooseLLH");
791 m_el_id_support.push_back("LooseAndBLayerLLH");
792 m_el_id_support.push_back("LooseDNNnoCF");
793 m_el_id_support.push_back("LooseDNN");
794 m_el_id_support.push_back("MediumNoPix"); // WPs for LRT Electron
795 m_el_id_support.push_back("MediumLLH");
796 m_el_id_support.push_back("MediumDNNnoCF");
797 m_el_id_support.push_back("MediumDNN");
798 m_el_id_support.push_back("TightNoPix"); // WPs for LRT Electron
799 m_el_id_support.push_back("TightLLH");
800 m_el_id_support.push_back("TightDNNnoCF");
801 m_el_id_support.push_back("TightDNN");
802
803 m_ph_id_support.push_back("Loose");
804 m_ph_id_support.push_back("Medium");
805 m_ph_id_support.push_back("Tight");
806 m_ph_id_support.push_back("TightPtIncl"); // Should not be mixed with Tight
807
808 m_mu_id_support = 4; //maximum value supported
809
810 // Tau ID WPs
811 m_tau_id_support.push_back("rnn001");
812 m_tau_id_support.push_back("VeryLoose");
813 m_tau_id_support.push_back("Loose");
814 m_tau_id_support.push_back("Medium");
815 m_tau_id_support.push_back("Tight");
816
817 // Iso WPs
818 // -- see https://twiki.cern.ch/twiki/bin/view/AtlasProtected/RecommendedIsolationWPs#Current_official_working_points
819 // -- the el iso points are those which have (or will have) SFs available
821 "FCLoose", "FCTight", // current WPs
822 "FCHighPtCaloOnly", // current HighPtCaloOnly WPs
823 "Gradient", //
824 "HighPtCaloOnly", //
825 "TightTrackOnly_VarRad","TightTrackOnly_FixedRad",//
826 "Tight_VarRad","Loose_VarRad", //
827 "PLVLoose", "PLVTight", // PLV recommended WPs, fallback support below b/o SFs and & egamma map file
828 "PLImprovedTight", "PLImprovedVeryTight" // New PLIV WPs, fallback support below b/o SFs & egamma map file
829 };
830 // -- the muon iso points are those which have SFs available
831 // -- more details https://indico.cern.ch/event/878781/contributions/3721998/attachments/1976194/3289315/20200127_IFFshort_2.pdf
833 "PflowLoose_FixedRad", "PflowLoose_VarRad", "PflowTight_FixedRad", "PflowTight_VarRad", // PFlow (new naming) recommended WPs
834 "TightTrackOnly_FixedRad", "TightTrackOnly_VarRad", "HighPtTrackOnly", // TrackOnly (new naming) recommended WPs
835 "PLVLoose", "PLVTight", // PLV recommended WPs
836 "Loose_VarRad", "Loose_FixedRad", "Tight_VarRad", "Tight_FixedRad", // Other WPs (new naming)
837 "PLImprovedTight", "PLImprovedVeryTight" // New PLIV WPs, fallback support below b/o SFs
838 };
839
840 // Construct electron fallback WPs for SFs
841 for (const auto& x : m_el_iso_support) { m_el_iso_fallback[x] = x; } // all current WPs
842 m_el_iso_fallback["PLVTight"] = "FCTight"; // plus actual fallback
843 m_el_iso_fallback["PLVLoose"] = "FCLoose";
844 m_el_iso_fallback["PLImprovedTight"] = "FCTight";
845 m_el_iso_fallback["PLImprovedVeryTight"] = "FCTight";
846 m_el_iso_fallback["HighPtCaloOnly"] = "FCHighPtCaloOnly";
847 m_el_iso_fallback["TightTrackOnly_VarRad"] = "FCTight";
848 m_el_iso_fallback["TightTrackOnly_FixedRad"] = "FCTight";
849 m_el_iso_fallback["Tight_VarRad"] = "FCTight";
850 m_el_iso_fallback["Loose_VarRad"] = "FCLoose";
851
852 // Construct muon fallback WPs for SFs
854 m_mu_iso_fallback["PLImprovedTight"] = "PLVTight";
855 m_mu_iso_fallback["PLImprovedVeryTight"] = "PLVTight";
856}
857
858#define CHECK_TOOL_RETRIEVE( TOOLHANDLE ) \
859 ATH_MSG_VERBOSE("Try to retrieve " << #TOOLHANDLE); \
860 if( TOOLHANDLE.retrieve().isFailure()) { \
861 ATH_MSG_ERROR("Failed to retrieve tool " << #TOOLHANDLE); \
862 return StatusCode::FAILURE; \
863 }
864
865#define CHECK_TOOL_RETRIEVE_NONEMPTY( TOOLHANDLE ) \
866 CHECK_TOOL_RETRIEVE_CONDITIONAL( TOOLHANDLE, !TOOLHANDLE.empty())
867
868#define CHECK_TOOL_RETRIEVE_CONDITIONAL( TOOLHANDLE, CONDITION ) \
869 if( CONDITION) { \
870 ATH_MSG_VERBOSE("Try to retrieve " << #TOOLHANDLE); \
871 if(TOOLHANDLE.retrieve().isFailure()) { \
872 ATH_MSG_ERROR("Failed to retrieve tool " << #TOOLHANDLE); \
873 return StatusCode::FAILURE; \
874 } \
875 }
876
877//--- override AsgTools behaviour for HyperBool properties
878StatusCode SUSYObjDef_xAOD::setBoolProperty(const std::string& name, const bool& property){
879 m_bool_prop_set.insert(name);
880 return this->setProperty(name, property);
881}
882//---
883
885
886 if (m_tool_init) {
887 ATH_MSG_ERROR("Initialising for a second time -- something is wrong!");
888 return StatusCode::FAILURE;
889 }
890
891 // Greet the user:
892 ATH_MSG_INFO( "Initialising... " );
893
894 bool autoconf(false);
895#ifndef XAOD_STANDALONE // For now metadata is Athena-only
896 if ( m_dataSource < 0 ) {
897 autoconf = true;
898 ATH_MSG_INFO("Autoconfiguring: dataSource, mcCampaign, isPHYSLITE");
899 std::string projectName = "";
900 ATH_CHECK( AthAnalysisHelper::retrieveMetadata("/TagInfo", "project_name", projectName, inputMetaStore() ) );
901 if ( projectName == "IS_SIMULATION" ) {
902 std::string simFlavour = "";
903 ATH_CHECK( AthAnalysisHelper::retrieveMetadata("/Simulation/Parameters", "SimulationFlavour", simFlavour, inputMetaStore() ) );
904 TString s(simFlavour); s.ToUpper();
905 m_dataSource = s.Contains("ATLFAST") ? AtlfastII : FullSim;
906 } else if (projectName.compare(0, 4, "data") == 0 ) {
908 } else {
909 ATH_MSG_ERROR("Failed to autoconfigure -- project_name matches neither IS_SIMULATION nor data!");
910 return StatusCode::FAILURE;
911 }
912
913 }
914#endif
915
917
918 //Read configuration from file (stored as Property)
920
921 if (m_dataSource < 0) {
922 ATH_MSG_FATAL( "Data source incorrectly configured!!" );
923 ATH_MSG_FATAL("You must set the DataSource property to Data, FullSim or AtlfastII !!");
924 if (autoconf) ATH_MSG_FATAL("Autoconfiguration seems to have failed!");
925 // if(m_useLeptonTrigger<0) ATH_MSG_ERROR( "UseLeptonTrigger not set");
926 ATH_MSG_FATAL( "Exiting... " );
927 return StatusCode::FAILURE;
928 }
929 ATH_MSG_DEBUG( "Configured: IsData: " << isData() );
930 ATH_MSG_DEBUG( "Configured: IsAtlfast: " << isAtlfast() );
931
932 switch (m_jetInputType) {
936 break;
937 default:
939 return StatusCode::FAILURE;
940 }
941
942 if (m_inputMETSuffix.empty()){
944 }
946 ATH_MSG_INFO( "Configured for jet collection: " << m_defaultJets );
947
948 m_defaultTruthJets = "AntiKt4TruthJets";
949 const xAOD::FileMetaData* fmd = nullptr;
950 std::string dataType;
951 if ( inputMetaStore()->contains<xAOD::FileMetaData>("FileMetaData") && inputMetaStore()->retrieve(fmd,"FileMetaData").isSuccess() )
952 fmd->value(xAOD::FileMetaData::dataType, dataType);
953 if ( dataType.compare("StreamDAOD_PHYS")==0 || dataType.compare("StreamDAOD_PHYSLITE")==0 ) m_defaultTruthJets = "AntiKt4TruthDressedWZJets";
954 if ( dataType.compare("StreamDAOD_PHYSLITE")==0) m_isPHYSLITE = true;
955
956 ATH_MSG_INFO( "Configured for truth jet collection: " << m_defaultTruthJets );
957
958 m_inputMETCore = m_isPHYSLITE? "MET_Core_AnalysisMET":"MET_Core_" + m_inputMETSuffix;
959 m_inputMETMap = m_isPHYSLITE? "METAssoc_AnalysisMET":"METAssoc_" + m_inputMETSuffix;
960
961 ATH_MSG_DEBUG ( "Build MET Core: " << m_inputMETCore);
962 ATH_MSG_DEBUG ( "Build MET with map: " << m_inputMETMap);
963
964 m_jetCleanDFName = TString::Format("DFCommonJets_jetClean_%s", m_badJetCut.c_str());
966
967 // the decorations are named like DFCommonElectronsLHTight, DFCommonElectronsDNNTight or DFCommonElectronsDNNTightNoCF
968 m_eleIdBaselineDFName = m_eleIdBaseline.find("DNN") == std::string::npos ? "DFCommonElectronsLH" : "DFCommonElectronsDNN";
969 m_eleIdBaselineDFName += TString(m_eleIdBaseline).ReplaceAll("LooseAndBLayer","LooseBL").ReplaceAll("LLH","").ReplaceAll("DNNnoCF","").ReplaceAll("DNN","").Data();
970 if (m_eleIdBaseline.find("noCF") != std::string::npos)
971 m_eleIdBaselineDFName += "NoCF";
973
974 m_eleIdDFName = m_eleId.find("DNN") == std::string::npos ? "DFCommonElectronsLH" : "DFCommonElectronsDNN";
975 m_eleIdDFName += TString(m_eleId).ReplaceAll("LooseAndBLayer","LooseBL").ReplaceAll("LLH","").ReplaceAll("DNNnoCF","").ReplaceAll("DNN","").Data();
976 if (m_eleId.find("noCF") != std::string::npos)
977 m_eleIdDFName += "NoCF";
979
980 m_photonIdBaselineDFName = "DFCommonPhotonsIsEM";
983
984 m_photonIdDFName = "DFCommonPhotonsIsEM";
985 m_photonIdDFName += TString(m_photonId).Data();
987
988 // autoconfigure PRW tool if m_autoconfigPRW==true
989 if (m_autoconfigPRWPath == "dev/PileupReweighting/share/")
991 else
992 // need to set a full path if you don't use the one in CVMFS
994
995 // Read Handles
996 ATH_CHECK( m_LRTCollectionName.initialize() );
997 ATH_CHECK( m_GSFLRTCollectionName.initialize() );
998
999 // Write Handles
1000 ATH_CHECK( m_outElectronLocation.initialize() );
1001 ATH_CHECK( m_outMuonLocation.initialize() );
1002
1003 ATH_CHECK( this->SUSYToolsInit() );
1004
1005 ATH_MSG_VERBOSE("Done with tool retrieval");
1006
1007 m_tool_init = true;
1008
1009 // Return gracefully:
1010 return StatusCode::SUCCESS;
1011}
1012
1013StatusCode SUSYObjDef_xAOD::autoconfigurePileupRWTool(const std::string& PRWfilesDir, const std::string& PRWfileName, bool usePathResolver, bool RPVLLmode, bool Combinedmode, const std::string& /* HFFilter */ ) {
1014
1015 // this will contain the path of the PRW file on /cvmfs which needs to be reverse engineered from the DSID and MC campaign
1016 // the path(s) will be added to m_prwConfFiles which is later used in the configuration of the CP PRW tool
1017 std::string prwConfigFile("");
1018
1019 if ( !isData() && m_autoconfigPRW ) {
1020
1021 prwConfigFile = PRWfilesDir;
1022
1023 float dsid = -999;
1024 std::string amiTag("");
1025 std::string mcCampaignMD("");
1026 std::string simFlavour("");
1027 std::string simType("");
1028 const xAOD::FileMetaData* fmd = nullptr;
1029
1030 // configure PRW rtag options from m_autoconfigPRWRtags string
1031 // e.g. "mc20a:r13167_r14859,mc20d:r13144_r14860,mc20e:r13145_r14861,mc21a:r13752_r13829,mc23a:r14622_r14932_r15540,mc23c:r14799_r14908,mc23d:r15224_r15530,mc23e:r16083"
1032 std::map<std::string,std::vector<std::string>> PRWRtags = {};
1033 std::string allcampaigns = "mc20a.mc20d.mc20e.mc21a.mc23a.mc23c.mc23d.mc23e";
1034 bool standard_like = true;
1035 for ( const auto& campaign_rtags : split( m_autoconfigPRWRtags, "," ) ) { // split string by ","
1036 std::string icampaign = campaign_rtags.substr(0, campaign_rtags.find(":")); // first field = campaign, split by ":"
1037 std::vector<std::string> irtags = split( campaign_rtags.substr(campaign_rtags.find(":")+1), "_" ); // remaining fields = rtags, split by "_"
1038 PRWRtags[icampaign] = irtags;
1039 ATH_MSG_DEBUG( "PRW autoconfigure considering rtags " << campaign_rtags.substr(campaign_rtags.find("_")+1) << " for campaign " << icampaign );
1040 }
1041 for ( const auto& x : PRWRtags ) {
1042 if ( allcampaigns.find(x.first)==string::npos ) {
1043 ATH_MSG_ERROR("m_autoconfigPRWRtags contains invalid campaign: " << x.first << " (" << m_autoconfigPRWRtags << ")");
1044 ATH_MSG_ERROR("use any of " << allcampaigns);
1045 return StatusCode::FAILURE;
1046 }
1047 }
1048
1049 // let's use MetaData to extract sample information
1050 if ( inputMetaStore()->contains<xAOD::FileMetaData>("FileMetaData") && inputMetaStore()->retrieve(fmd,"FileMetaData").isSuccess() ) {
1052 fmd->value(xAOD::FileMetaData::amiTag, amiTag);
1053 fmd->value(xAOD::FileMetaData::simFlavour, simFlavour);
1054
1055 if(simFlavour.starts_with("ATLFASTII")) simType = "AFII";
1056 else if(simFlavour.starts_with("ATLFAST3")) simType = "AF3";
1057 else simType = "FS";
1058
1059 bool found = false;
1060 while ( mcCampaignMD.empty() ) {
1061 for ( const auto& campaign_rtags : PRWRtags ) { // consider all campaigns
1062 for ( const auto& rtag: campaign_rtags.second ) { // consider all rtags
1063 if (found) continue;
1064 if (amiTag.find(rtag)!=string::npos) { // find matching tag
1065 mcCampaignMD = campaign_rtags.first.substr(0,5); // save campaign
1066 standard_like = (campaign_rtags.first.find("ns")?true:false); // track non-standard r-tags
1067 found = true; // break if found
1068 }
1069 }
1070 }
1071 // in case not found
1072 if (!found) {
1073 ATH_MSG_ERROR( "autoconfigurePileupRWTool(): unrecognized xAOD::FileMetaData::amiTag, \'" << amiTag << "'. Please check your input sample.");
1074 return StatusCode::FAILURE;
1075 }
1076 //
1077 ATH_MSG_INFO( "Setting up autoconfigurePileupRWTool for mc campaign " << mcCampaignMD << " (from amiTag " << amiTag << ") (standard-like = " << (standard_like?"true":"false") << ")." );
1078 if ( (!standard_like) && (!RPVLLmode) )
1079 ATH_MSG_WARNING("Non-standard r-tag found (" << amiTag.data() << "), but RPVLLmode not set. Perhaps you want to set \"PRW.autoconfigPRWRPVmode: 1\" in the config?");
1080 }
1081 } else {
1082#ifndef XAOD_STANDALONE
1083 ATH_MSG_ERROR( "autoconfigurePileupRWTool(): access to FileMetaData failed, can't get mc channel number.");
1084 return StatusCode::FAILURE;
1085#else
1086
1087 if ( m_mcCampaign == "mc20a" || m_mcCampaign == "mc20d" || m_mcCampaign == "mc20e" || m_mcCampaign == "mc21a" || m_mcCampaign == "mc23a" || m_mcCampaign == "mc23c" || m_mcCampaign == "mc23d" || m_mcCampaign == "mc23e") {
1088 // First see if the user set the mcCampaign/run number by property (hopefully temporary workaround)
1089 if ( m_mcChannel > 0) {
1090 ATH_MSG_WARNING( "autoconfigurePileupRWTool(): access to FileMetaData failed -> getting the mc channel number (DSID) and campaign from configuration." );
1091 std::string NoMetadataButPropertyOK("");
1092 NoMetadataButPropertyOK += "autoconfigurePileupRWTool(): 'mcCampaign' is used and passed to SUSYTools as '";
1093 NoMetadataButPropertyOK += m_mcCampaign;
1094 NoMetadataButPropertyOK += "'. 'mcChannel' is used and passed to SUSYTools as '";
1095 NoMetadataButPropertyOK += std::to_string(m_mcChannel);
1096 NoMetadataButPropertyOK += "'. Autocongiguring PRW accordingly.";
1097 ATH_MSG_WARNING( NoMetadataButPropertyOK );
1098 mcCampaignMD = m_mcCampaign;
1099 dsid = m_mcChannel;
1100 } else {
1101 // OK, this is a fall-back option without using MetaData but one has to manually set 'mcCampaign' property
1102 ATH_MSG_WARNING( "autoconfigurePileupRWTool(): access to FileMetaData failed -> getting the mc channel number (DSID) from the event store." );
1103 const xAOD::EventInfo* evtInfo = GetEventInfo();
1104 dsid = evtInfo->mcChannelNumber();
1105
1106 std::string NoMetadataButPropertyOK("");
1107 NoMetadataButPropertyOK += "autoconfigurePileupRWTool(): 'mcCampaign' is used and passed to SUSYTools as '";
1108 NoMetadataButPropertyOK += m_mcCampaign;
1109 NoMetadataButPropertyOK += "'. Autoconfiguring PRW accordingly.";
1110 ATH_MSG_WARNING( NoMetadataButPropertyOK );
1111 mcCampaignMD = m_mcCampaign;
1112 }
1113 } else {
1114 ATH_MSG_ERROR( "autoconfigurePileupRWTool(): `mcCampaign' is not set properly.");
1115 return StatusCode::FAILURE;
1116 }
1117#endif
1118 }
1119
1120 // If requested set the PRW file to common PRW file of the processed MC campaign
1121 if (m_useCommonPRWFiles) {
1122 ATH_MSG_INFO( "autoconfigurePileupRWTool(): retrieving the common PRW file for MC campaign: " << mcCampaignMD );
1123 if (mcCampaignMD == "mc20a") {prwConfigFile = PathResolverFindCalibFile(m_commonPRWFileMC20a);}
1124 else if (mcCampaignMD == "mc20d") {prwConfigFile = PathResolverFindCalibFile(m_commonPRWFileMC20d);}
1125 else if (mcCampaignMD == "mc20e") {prwConfigFile = PathResolverFindCalibFile(m_commonPRWFileMC20e);}
1126 else if (mcCampaignMD == "mc21a") {prwConfigFile = PathResolverFindCalibFile(m_commonPRWFileMC21a);}
1127 else if (mcCampaignMD == "mc23a") {prwConfigFile = PathResolverFindCalibFile(m_commonPRWFileMC23a);}
1128 else if (mcCampaignMD == "mc23c") {prwConfigFile = PathResolverFindCalibFile(m_commonPRWFileMC23c);}
1129 else if (mcCampaignMD == "mc23d") {prwConfigFile = PathResolverFindCalibFile(m_commonPRWFileMC23d);}
1130 else if (mcCampaignMD == "mc23e") {prwConfigFile = PathResolverFindCalibFile(m_commonPRWFileMC23e);}
1131 else {
1132 ATH_MSG_ERROR( "autoconfigurePileupRWTool(): no common PRW file known for MC campaign: " << mcCampaignMD);
1133 return StatusCode::FAILURE;
1134 }
1135 }
1136 // Otherwise try finding the dedicated PRW file on /cvmfs
1137 else {
1138 // Retrieve the input file
1139 int DSID_INT = static_cast<int>(dsid);
1140 prwConfigFile += "DSID" + std::to_string(DSID_INT/1000) + "xxx/pileup_" + mcCampaignMD + "_dsid" + std::to_string(DSID_INT) + "_" + simType + ".root";
1141
1142 if (RPVLLmode) prwConfigFile = TString(prwConfigFile).ReplaceAll(".root","_rpvll.root").Data();
1143
1144 // PRW file specified by user
1145 // e.g. DSID700xxx/pileup_mc20a_dsid700015_FS.root
1146 if (!PRWfileName.empty()) {
1147 prwConfigFile = PRWfilesDir + PRWfileName;
1148 ATH_MSG_INFO( "autoconfigurePileupRWTool(): PRW file was specifed by user: " << prwConfigFile.data() );
1149 }
1150 }
1151
1152 m_prwConfFiles.clear();
1153
1154 // Combined mode can be only used when running with full data with the same MC samples
1155 if (Combinedmode) {
1156 if (mcCampaignMD.find("mc20") == std::string::npos) {
1157 ATH_MSG_ERROR( "autoconfigurePileupRWTool(): combined mode currently onlys supported for mc20! Impossible to autoconfigure PRW. Aborting." );
1158 return StatusCode::FAILURE;
1159 }
1160 // When using the common PRW files we can directly add them
1161 if (m_useCommonPRWFiles) {
1165 }
1166 // Otherwise we have to replace the mc campaign in the name accordingly
1167 else {
1168 m_prwConfFiles.emplace_back( TString(prwConfigFile).ReplaceAll(mcCampaignMD, "mc20a").Data() );
1169 m_prwConfFiles.emplace_back( TString(prwConfigFile).ReplaceAll(mcCampaignMD, "mc20d").Data() );
1170 m_prwConfFiles.emplace_back( TString(prwConfigFile).ReplaceAll(mcCampaignMD, "mc20e").Data() );
1171 }
1174 } else {
1175 m_prwConfFiles.push_back( prwConfigFile );
1176 if ( mcCampaignMD == "mc20d") {
1178 } else if (mcCampaignMD == "mc20e") {
1180 } else if (mcCampaignMD == "mc21a" || mcCampaignMD == "mc23a") {
1182 } else if (mcCampaignMD == "mc23c" || mcCampaignMD == "mc23d") {
1184 } else if (mcCampaignMD == "mc23e") {
1186 }
1187
1188 }
1189 prwConfigFile = usePathResolver ? PathResolverFindCalibFile(prwConfigFile) : prwConfigFile;
1190
1191 // Test if file exists (i.e. was requested already to /cvmfs if the DSID-specific PRW files are used) and is usable
1192 TFile testF(prwConfigFile.data(),"read");
1193 if (testF.IsZombie()) {
1194 ATH_MSG_ERROR( "autoconfigurePileupRWTool(): file not found -> " << prwConfigFile.data() << " ! Impossible to autoconfigure PRW. Aborting." );
1195 if ( (!standard_like) && (!RPVLLmode) )
1196 ATH_MSG_WARNING("Running with non-standard r-tag (" << amiTag.data() << "), but RPVLLmode not set. Perhaps you want to set \"PRW.autoconfigPRWRPVmode: 1\" in the config?");
1197 return StatusCode::FAILURE;
1198 }
1199
1200 ATH_MSG_INFO( "autoconfigurePileupRWTool(): configuring PRW tool using " << prwConfigFile.data() );
1201 }
1202 // Return gracefully
1203 return StatusCode::SUCCESS;
1204}
1205
1207 if (source == 0) m_dataSource = Data;
1208 else if (source == 1) m_dataSource = FullSim;
1209 else if (source == 2) m_dataSource = AtlfastII;
1210 else ATH_MSG_ERROR("Trying to set data source to unknown type (" << source << ")");
1211}
1212
1213
1214bool SUSYObjDef_xAOD::check_isOption(const std::string& wp, const std::vector<std::string>& list) const {
1215 //check if the selected WP is supported
1216 return (std::find(list.begin(), list.end(),wp) != list.end());
1217}
1218
1219bool SUSYObjDef_xAOD::check_isTighter(const std::string& wp1, const std::string& wp2, const std::vector<std::string>& list) const {
1220 //check if WP1 is tighter than WP2
1221 //it is assumed that both WPs are supported
1222 return (std::find(list.begin(),list.end(),wp1) > std::find(list.begin(), list.end(),wp2));
1223}
1224
1225
1226std::string SUSYObjDef_xAOD::EG_WP(const std::string& wp) const {
1227 //translate our electron wps to EGamma internal jargon
1228 //@ElectronPhotonSelectorTools/EGSelectorConfigurationMapping.h
1229 TString copy = TString(wp).Copy().ReplaceAll("AndBLayer","BL").ReplaceAll("LLH","LHElectron");
1230 // the DNN WPs are labeled in the map as e.g. TightDNNnoCFElectron or TightDNNElectron
1231 if (wp.find("DNNnoCF") != std::string::npos)
1232 copy.ReplaceAll("DNNnoCF", "DNNnoCFElectron");
1233 else if (wp.find("DNN") != std::string::npos)
1234 copy.ReplaceAll("DNN", "DNNElectron");
1235 return copy.Data();
1236}
1237
1238std::vector<std::string> SUSYObjDef_xAOD::getElSFkeys(const std::string& mapFile) const {
1239
1240 if( mapFile.empty() )
1241 return {};
1242
1243 std::vector<std::string> theKeys;
1244
1245 std::string filename = PathResolverFindCalibFile(mapFile);
1246 std::ifstream input( filename );
1247 for( std::string line; getline( input, line ); ){
1248 std::vector<std::string> tokens = split((const std::string)line,"=");
1249 if(tokens.size()){
1250 theKeys.push_back(tokens.at(0));
1251 }
1252 }
1253
1254 return theKeys;
1255}
1256
1257void SUSYObjDef_xAOD::configFromFile(bool& property, const std::string& propname, TEnv& rEnv,
1258 bool defaultValue)
1259{
1260 if(m_bool_prop_set.find(m_conf_to_prop[propname])!=m_bool_prop_set.end()){
1261 ATH_MSG_INFO( "configFromFile(): property \"" << propname << "\" already set with value " << property << ". Ignoring change request." );
1262 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject(propname.c_str() ) );
1263 return;
1264 }
1265 property = rEnv.GetValue(propname.c_str(), static_cast<int>(defaultValue));
1266 ATH_MSG_INFO( "configFromFile(): Loaded property \"" << propname << "\" with value " << property );
1267 // Remove the item from the table
1268 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject(propname.c_str() ) );
1269}
1270
1271
1272void SUSYObjDef_xAOD::configFromFile(double& property, const std::string& propname, TEnv& rEnv,
1273 double defaultValue)
1274{
1275 // ignore if already configured
1276 if (property > -90.) {
1277 ATH_MSG_INFO( "configFromFile(): property \"" << propname << "\" already set with value " << property << ". Ignoring change request." );
1278 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject(propname.c_str() ) );
1279 return;
1280 }
1281 property = rEnv.GetValue(propname.c_str(), defaultValue);
1282 ATH_MSG_INFO( "configFromFile(): Loaded property \"" << propname << "\" with value " << property );
1283 // Remove the item from the table
1284 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject(propname.c_str() ) );
1285}
1286
1287
1288void SUSYObjDef_xAOD::configFromFile(int& property, const std::string& propname, TEnv& rEnv,
1289 int defaultValue)
1290{
1291 // ignore if already configured
1292 if (property > -90){
1293 ATH_MSG_INFO( "configFromFile(): property \"" << propname << "\" already set with value " << property << ". Ignoring change request." );
1294 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject(propname.c_str() ) );
1295 return;
1296 }
1297 property = rEnv.GetValue(propname.c_str(), defaultValue);
1298 ATH_MSG_INFO( "configFromFile(): Loaded property \"" << propname << "\" with value " << property );
1299 // Remove the item from the table
1300 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject(propname.c_str() ) );
1301}
1302
1303
1304void SUSYObjDef_xAOD::configFromFile(std::string& property, const std::string& propname, TEnv& rEnv,
1305 const std::string& defaultValue, bool allowEmpty)
1306{
1307 // ignore if already configured
1308 if (!property.empty()){
1309 ATH_MSG_INFO( "configFromFile(): property \"" << propname << "\" already set with value " << property << ". Ignoring change request." );
1310 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject(propname.c_str() ) );
1311 return;
1312 }
1313 property = rEnv.GetValue(propname.c_str(), defaultValue.c_str());
1314 if (property.empty() && !allowEmpty) {
1315 ATH_MSG_FATAL("Read empty string property from text file (property name: " << propname << ")");
1316 }
1317
1318 // post-processing to get rid of leading/trailing spaces and comments
1319 std::string tmp_prop = property.substr(0, property.find('#', 0));
1320 property = TString(tmp_prop).ReplaceAll(" ","").Data();
1321
1322 // Interpret None as an empty string
1323 if (property=="None" || property=="NONE" || property=="none") {
1324 ATH_MSG_VERBOSE( "Property \"" << propname << "\" being set to empty string due to specification of \"" << property << "\"" );
1325 property = "";
1326 }
1327
1328 ATH_MSG_INFO( "configFromFile(): Loaded property \"" << propname << "\" with value " << property );
1329 // Remove the item from the table
1330 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject(propname.c_str() ) );
1331}
1332
1333
1335{
1336 ATH_MSG_INFO( "***** ***** ***** *****" );
1337 ATH_MSG_INFO( "Configuring from file " << m_configFile );
1338
1339 TEnv rEnv;
1340 int success = -1;
1341 success = rEnv.ReadFile(m_configFile.c_str(), kEnvAll);
1342 if (success != 0) return StatusCode::FAILURE;
1343
1344 ATH_MSG_INFO( "Config file opened" );
1345
1347 m_jetInputType = xAOD::JetInput::Type(rEnv.GetValue("Jet.InputType", 9));
1348 ATH_MSG_INFO( "readConfig(): Loaded property Jet.InputType with value " << static_cast<int>(m_jetInputType));
1349 }
1350 // Remove the item from the table
1351 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject("Jet.InputType") );
1352
1353 if (m_muId == static_cast<int>(xAOD::Muon::Quality(xAOD::Muon::VeryLoose))) {
1354 int muIdTmp = rEnv.GetValue("Muon.Id", 1);
1355 m_muId = (muIdTmp<4 ? static_cast<int>(xAOD::Muon::Quality(muIdTmp)) : muIdTmp);
1356 ATH_MSG_INFO( "readConfig(): Loaded property Muon.Id with value " << m_muId);
1357 // Remove the item from the table
1358 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject("Muon.Id") );
1359 }
1360 if (m_muIdBaseline == static_cast<int>(xAOD::Muon::Quality(xAOD::Muon::VeryLoose))) {
1361 int muIdTmp = rEnv.GetValue("MuonBaseline.Id", 1);
1362 m_muIdBaseline = (muIdTmp<4 ? static_cast<int>(xAOD::Muon::Quality(muIdTmp)) : muIdTmp);
1363 ATH_MSG_INFO( "readConfig(): Loaded property MuonBaseline.Id with value " << m_muIdBaseline);
1364 // Remove the item from the table
1365 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject("MuonBaseline.Id") );
1366 }
1367
1368 // Deprecation warning
1369 std::string prop = rEnv.GetValue("Jet.JVT_WP", "");
1370 if ( !prop.empty() ) {
1371 ATH_MSG_WARNING("readConfig(): Found deprecated property name Jet.JVT_WP. Please move to using Jet.JvtWP. Propagating for now.");
1372 rEnv.SetValue("Jet.JvtWP", prop.c_str());
1373 rEnv.GetTable()->Remove( rEnv.GetTable()->FindObject("Jet.JVT_WP") );
1374 }
1375
1376 //load config file to Properties map (only booleans for now)
1377 m_conf_to_prop["IsRun3"] = "IsRun3";
1378 m_conf_to_prop["StrictConfigCheck"] = "StrictConfigCheck";
1379 m_conf_to_prop["Btag.enable"] = "UseBtagging";
1380 m_conf_to_prop["BtagTrkJet.enable"] = "UseBtaggingTrkJet";
1381 m_conf_to_prop["Ele.CrackVeto"] = "EleCrackVeto";
1382 m_conf_to_prop["EleBaseline.CrackVeto"] = "EleBaselineCrackVeto";
1383 m_conf_to_prop["Ele.ForceNoId"] = "EleForceNoId";
1384 m_conf_to_prop["Ele.AllowRun3TrigSFFallback"] = "EleAllowRun3TrigSFFallback";
1385 m_conf_to_prop["Muon.ForceNoId"] = "MuonForceNoId";
1386 m_conf_to_prop["Muon.TTVASF"] = "MuonTTVASF";
1387 m_conf_to_prop["Muon.passedHighPt"] = "MuonRequireHighPtCuts";
1388 m_conf_to_prop["PhotonBaseline.CrackVeto"] = "PhotonBaselineCrackVeto";
1389 m_conf_to_prop["Photon.CrackVeto"] = "PhotonCrackVeto";
1390 m_conf_to_prop["Photon.AllowLate"] = "PhotonAllowLate";
1391
1392 m_conf_to_prop["FwdJet.doJVT"] = "FwdJetDoJVT";
1393
1394 m_conf_to_prop["OR.DoBoostedElectron"] = "DoBoostedElectronOR";
1395 m_conf_to_prop["OR.DoBoostedMuon"] = "DoBoostedMuonOR";
1396 m_conf_to_prop["OR.DoMuonJetGhostAssociation"] = "ORDoMuonJetGhostAssociation";
1397 m_conf_to_prop["OR.DoTau"] = "DoTauOR";
1398 m_conf_to_prop["OR.DoPhoton"] = "DoPhotonOR";
1399 m_conf_to_prop["OR.DoEleJet"] = "DoEleJetOR";
1400 m_conf_to_prop["OR.DoElEl"] = "DoElElOR";
1401 m_conf_to_prop["OR.DoElMu"] = "DoElMuOR";
1402 m_conf_to_prop["OR.DoMuonJet"] = "DoMuonJetOR";
1403 m_conf_to_prop["OR.Bjet"] = "DoBjetOR";
1404 m_conf_to_prop["OR.ElBjet"] = "DoElBjetOR";
1405 m_conf_to_prop["OR.MuBjet"] = "DoMuBjetOR";
1406 m_conf_to_prop["OR.TauBjet"] = "DoTauBjetOR";
1407 m_conf_to_prop["OR.DoFatJets"] = "DoFatJetOR";
1408 m_conf_to_prop["OR.RemoveCaloMuons"] = "ORRemoveCaloMuons";
1409 m_conf_to_prop["OR.MuJetApplyRelPt"] = "ORMuJetApplyRelPt";
1410 m_conf_to_prop["OR.InputLabel"] = "ORInputLabel";
1411 m_conf_to_prop["Trigger.UpstreamMatching"] = "TriggerUpstreamMatching";
1412
1413 m_conf_to_prop["SigLep.RequireIso"] = "SigLepRequireIso";
1414 m_conf_to_prop["SigEl.RequireIso"] = "SigElRequireIso";
1415 m_conf_to_prop["SigMu.RequireIso"] = "SigMuRequireIso";
1416 m_conf_to_prop["SigPh.RequireIso"] = "SigPhRequireIso";
1417 m_conf_to_prop["SigLepPh.IsoCloseByOR"] = "SigLepPhIsoCloseByOR";
1418 m_conf_to_prop["MET.RemoveOverlappingCaloTaggedMuons"] = "METRemoveORCaloTaggedMuons";
1419 m_conf_to_prop["MET.DoSetMuonJetEMScale"] = "METDoSetMuonJetEMScale";
1420 m_conf_to_prop["MET.DoRemoveMuonJets"] = "METDoRemoveMuonJets";
1421 m_conf_to_prop["MET.DoUseGhostMuons"] = "METUseGhostMuons";
1422 m_conf_to_prop["MET.DoMuonEloss"] = "METDoMuonEloss";
1423
1424 m_conf_to_prop["MET.DoTrkSyst"] = "METDoTrkSyst";
1425 m_conf_to_prop["MET.DoCaloSyst"] = "METDoCaloSyst";
1426
1427 m_conf_to_prop["Tau.DoTruthMatching"] = "TauDoTruthMatching";
1428 //
1429
1430 configFromFile(m_slices["ele"], "Slices.Ele", rEnv, true);
1431 configFromFile(m_slices["pho"], "Slices.Pho", rEnv, true);
1432 configFromFile(m_slices["mu"], "Slices.Mu", rEnv, true);
1433 configFromFile(m_slices["tau"], "Slices.Tau", rEnv, true);
1434 configFromFile(m_slices["jet"], "Slices.Jet", rEnv, true);
1435 configFromFile(m_slices["bjet"], "Slices.BJet", rEnv, true);
1436 configFromFile(m_slices["fjet"], "Slices.FJet", rEnv, true);
1437 configFromFile(m_slices["tjet"], "Slices.TJet", rEnv, true);
1438 configFromFile(m_slices["met"], "Slices.MET", rEnv, true);
1439 //
1440 configFromFile(m_isRun3, "IsRun3", rEnv, false);
1441 //
1442 configFromFile(m_eleBaselinePt, "EleBaseline.Pt", rEnv, 10000.);
1443 configFromFile(m_eleBaselineEta, "EleBaseline.Eta", rEnv, 2.47);
1444 configFromFile(m_eleIdBaseline, "EleBaseline.Id", rEnv, "LooseAndBLayerLLH");
1445 configFromFile(m_eleBaselineIso_WP, "EleBaseline.Iso", rEnv, "None");
1446 configFromFile(m_eleConfigBaseline, "EleBaseline.Config", rEnv, "None");
1447 configFromFile(m_eleBaselineCrackVeto, "EleBaseline.CrackVeto", rEnv, false);
1448 configFromFile(m_force_noElId, "Ele.ForceNoId", rEnv, false);
1449
1450 //
1451 configFromFile(m_elePt, "Ele.Et", rEnv, 25000.);
1452 configFromFile(m_eleEta, "Ele.Eta", rEnv, 2.47);
1453 configFromFile(m_eleCrackVeto, "Ele.CrackVeto", rEnv, false);
1454 configFromFile(m_eleIso_WP, "Ele.Iso", rEnv, "Loose_VarRad");
1455 configFromFile(m_eleIsoHighPt_WP, "Ele.IsoHighPt", rEnv, "HighPtCaloOnly");
1456 configFromFile(m_eleIsoHighPtThresh, "Ele.IsoHighPtThresh", rEnv, 200e3);
1457 configFromFile(m_eleChID_WP, "Ele.CFT", rEnv, "None"); // Loose is the only one supported for the moment, and not many clients yet.
1458 configFromFile(m_eleChIso, "Ele.CFTIso", rEnv, true); // use charge ID SFs without iso applied
1459 configFromFile(m_eleChID_signal, "Ele.CFTSignal", rEnv, !m_eleChID_WP.empty()); // Require ECID as part of the signal lepton definition
1460 configFromFile(m_eleId, "Ele.Id", rEnv, "TightLLH");
1461 configFromFile(m_eleLRT, "Ele.LRTOR", rEnv, false);
1462 configFromFile(m_eleLRT_strat, "Ele.LRTORStrat", rEnv, 0);
1463 configFromFile(m_eleConfig, "Ele.Config", rEnv, "None");
1464 configFromFile(m_eled0sig, "Ele.d0sig", rEnv, 5.);
1465 configFromFile(m_elez0, "Ele.z0", rEnv, 0.5);
1466 configFromFile(m_elebaselined0sig, "EleBaseline.d0sig", rEnv, -99.);
1467 configFromFile(m_elebaselinez0, "EleBaseline.z0", rEnv, 0.5);
1468 configFromFile(m_eleIdExpert, "Ele.IdExpert", rEnv, false);
1469 configFromFile(m_EG_corrModel, "Ele.EffNPcorrModel", rEnv, "TOTAL");
1470 configFromFile(m_EG_corrFNList, "Ele.EffCorrFNList", rEnv, "None");
1471 configFromFile(m_electronTriggerSFStringSingle, "Ele.TriggerSFStringSingle", rEnv, "SINGLE_E_2015_e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose_2016_2018_e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0");
1472 configFromFile(m_eleEffMapFilePath, "Ele.EffMapFilePath", rEnv, "ElectronEfficiencyCorrection/2015_2025/rel22.2/2025_Run3_Consolidated_Recommendation_v4/map2.txt");
1473 configFromFile(m_eleAllowRun3TrigSFFallback, "Ele.AllowRun3TrigSFFallback", rEnv, false);
1474 configFromFile(m_eleForceFullSimCalib, "Ele.ForceFullSimCalib", rEnv, false);
1475
1476 configFromFile(m_trig2015combination_singleLep, "Trig.Singlelep2015", rEnv, "e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose || mu20_iloose_L1MU15_OR_mu40");
1477 configFromFile(m_trig2016combination_singleLep, "Trig.Singlelep2016", rEnv, "e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0 || mu26_ivarmedium_OR_mu50");
1478 configFromFile(m_trig2017combination_singleLep, "Trig.Singlelep2017", rEnv, "e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0 || mu26_ivarmedium_OR_mu50");
1479 configFromFile(m_trig2018combination_singleLep, "Trig.Singlelep2018", rEnv, "e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0 || mu26_ivarmedium_OR_mu50");
1480 configFromFile(m_trig2022combination_singleLep, "Trig.Singlelep2022", rEnv, "e26_lhtight_ivarloose_L1EM22VHI_OR_e60_lhmedium_L1EM22VHI_OR_e140_lhloose_L1EM22VHI || HLT_mu24_ivarmedium_L1MU14FCH_OR_HLT_mu50_L1MU14FCH");
1481 configFromFile(m_trig2023combination_singleLep, "Trig.Singlelep2023", rEnv, "e26_lhtight_ivarloose_L1eEM26M_OR_e60_lhmedium_L1eEM26M_OR_e140_lhloose_L1eEM26M || HLT_mu24_ivarmedium_L1MU14FCH_OR_HLT_mu50_L1MU14FCH");
1482 configFromFile(m_trig2024combination_singleLep, "Trig.Singlelep2024", rEnv, "e26_lhtight_ivarloose_L1eEM26M_OR_e60_lhmedium_L1eEM26M_OR_e140_lhloose_L1eEM26M || HLT_mu24_ivarmedium_L1MU14FCH_OR_HLT_mu50_L1MU14FCH");
1483 configFromFile(m_trigNToys_diLep, "Trig.DilepNToys", rEnv, 250); // 0 means calculate from formula instead - needs to be supported for the trigger combination
1484 configFromFile(m_trig2015combination_diLep, "Trig.Dilep2015", rEnv, "e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose || mu20_iloose_L1MU15_OR_mu40 || 2e12_lhloose_L12EM10VH || e17_lhloose_mu14 || e7_lhmedium_mu24 || mu18_mu8noL1 || 2mu10");
1485 configFromFile(m_trig2016combination_diLep, "Trig.Dilep2016", rEnv, "e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0 || mu26_ivarmedium_OR_mu50 || 2e17_lhvloose_nod0 || e17_lhloose_nod0_mu14 || e7_lhmedium_nod0_mu24 || e26_lhmedium_nod0_L1EM22VHI_mu8noL1 || mu22_mu8noL1 || 2mu14");
1486 configFromFile(m_trig2017combination_diLep, "Trig.Dilep2017", rEnv, "e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0 || mu26_ivarmedium_OR_mu50 || 2e24_lhvloose_nod0 || e17_lhloose_nod0_mu14 || e7_lhmedium_nod0_mu24 || e26_lhmedium_nod0_mu8noL1 || mu22_mu8noL1 || 2mu14");
1487 configFromFile(m_trig2018combination_diLep, "Trig.Dilep2018", rEnv, "e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0 || mu26_ivarmedium_OR_mu50 || 2e24_lhvloose_nod0 || e17_lhloose_nod0_mu14 || e7_lhmedium_nod0_mu24 || e26_lhmedium_nod0_mu8noL1 || mu22_mu8noL1 || 2mu14");
1488 // configFromFile(m_trig2022combination_diLep, "Trig.Dilep2022", rEnv, "");
1489 configFromFile(m_trigNToys_multiLep, "Trig.MultiNToys", rEnv, 250); // 0 means calculate from formula instead - needs to be supported for the trigger combination
1490 configFromFile(m_trig2015combination_multiLep, "Trig.Multi2015", rEnv, "e24_lhmedium_L1EM20VH_OR_e60_lhmedium_OR_e120_lhloose || mu20_iloose_L1MU15_OR_mu40 || 2e12_lhloose_L12EM10VH || e17_lhloose_2e9_lhloose || 2e12_lhloose_mu10 || e12_lhloose_2mu10 || e17_lhloose_mu14 || e7_lhmedium_mu24 || mu18_mu8noL1 || 2mu10 || 3mu6");
1491 configFromFile(m_trig2016combination_multiLep, "Trig.Multi2016", rEnv, "e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0 || mu26_ivarmedium_OR_mu50 || 2e17_lhvloose_nod0 || e17_lhloose_nod0_mu14 || e7_lhmedium_nod0_mu24 || e26_lhmedium_nod0_L1EM22VHI_mu8noL1 || e17_lhloose_nod0_2e9_lhloose_nod0 || e12_lhloose_nod0_2mu10 || 2e12_lhloose_nod0_mu10 || mu22_mu8noL1 || 2mu14 || 3mu6");
1492 configFromFile(m_trig2017combination_multiLep, "Trig.Multi2017", rEnv, "e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0 || mu26_ivarmedium_OR_mu50 || 2e24_lhvloose_nod0 || e17_lhloose_nod0_mu14 || e7_lhmedium_nod0_mu24 || e26_lhmedium_nod0_mu8noL1 || e24_lhvloose_nod0_2e12_lhvloose_nod0_L1EM20VH_3EM10VH || e12_lhloose_nod0_2mu10 || 2e12_lhloose_nod0_mu10 || mu22_mu8noL1 || 2mu14 || 3mu6");
1493 configFromFile(m_trig2018combination_multiLep, "Trig.Multi2018", rEnv, "e26_lhtight_nod0_ivarloose_OR_e60_lhmedium_nod0_OR_e140_lhloose_nod0 || mu26_ivarmedium_OR_mu50 || 2e24_lhvloose_nod0 || e17_lhloose_nod0_mu14 || e7_lhmedium_nod0_mu24 || e26_lhmedium_nod0_mu8noL1 || e24_lhvloose_nod0_2e12_lhvloose_nod0_L1EM20VH_3EM10VH || e12_lhloose_nod0_2mu10 || 2e12_lhloose_nod0_mu10 || mu22_mu8noL1 || 2mu14 || 3mu6");
1494 // configFromFile(m_trig2022combination_multiLep, "Trig.Multi2022", rEnv, "");
1495 configFromFile(m_trigNToys_diPhoton, "Trig.DiphotonNToys", rEnv, 250); // 0 means calculate from formula instead - needs to be supported for the trigger combination
1496 configFromFile(m_trig2015combination_diPhoton, "Trig.Diphoton2015", rEnv, "g35_loose_g25_loose");
1497 configFromFile(m_trig2016combination_diPhoton, "Trig.Diphotonp2016", rEnv, "g35_loose_g25_loose");
1498 configFromFile(m_trig2017combination_diPhoton, "Trig.Diphotonp2017", rEnv, "g35_medium_g25_medium_L12EM20VH");
1499 configFromFile(m_trig2018combination_diPhoton, "Trig.Diphotonp2018", rEnv, "g35_medium_g25_medium_L12EM20VH");
1500 // configFromFile(m_trig2018combination_diPhoton, "Trig.Diphotonp2022", rEnv, "");
1501 //
1502 configFromFile(m_muBaselinePt, "MuonBaseline.Pt", rEnv, 10000.);
1503 configFromFile(m_muBaselineEta, "MuonBaseline.Eta", rEnv, 2.7);
1504 configFromFile(m_force_noMuId, "Muon.ForceNoId", rEnv, false);
1505 configFromFile(m_muBaselineIso_WP, "MuonBaseline.Iso", rEnv, "None");
1506 configFromFile(m_doTTVAsf, "Muon.TTVASF", rEnv, true);
1507 //
1508 configFromFile(m_muPt, "Muon.Pt", rEnv, 25000.);
1509 configFromFile(m_muEta, "Muon.Eta", rEnv, 2.7);
1510 configFromFile(m_muIso_WP, "Muon.Iso", rEnv, "Loose_VarRad");
1511 configFromFile(m_muIsoHighPt_WP, "Muon.IsoHighPt", rEnv, "Loose_VarRad");
1512 configFromFile(m_muIsoHighPtThresh, "Muon.IsoHighPtThresh", rEnv, 200e3);
1513 configFromFile(m_mud0sig, "Muon.d0sig", rEnv, 3.);
1514 configFromFile(m_muz0, "Muon.z0", rEnv, 0.5);
1515 configFromFile(m_mubaselined0sig, "MuonBaseline.d0sig", rEnv, -99.);
1516 configFromFile(m_mubaselinez0, "MuonBaseline.z0", rEnv, 0.5);
1517 configFromFile(m_murequirepassedHighPtCuts, "Muon.passedHighPt", rEnv, false);
1518 configFromFile(m_muHighPtExtraSmear, "Muon.HighPtExtraSmear", rEnv, false);
1519 configFromFile(m_muEffCorrForce1D, "Muon.EffCorrForce1D", rEnv, false);
1520 //
1521 configFromFile(m_muTriggerSFCalibRelease, "Muon.TriggerSFCalibRelease" ,rEnv, "None");
1522 configFromFile(m_muTriggerSFCalibFilename, "Muon.TriggerSFCalibFilename",rEnv, "None");
1523 //
1524 configFromFile(m_muCosmicz0, "MuonCosmic.z0", rEnv, 1.);
1525 configFromFile(m_muCosmicd0, "MuonCosmic.d0", rEnv, 0.2);
1526 //
1527 // LRT muons
1528 configFromFile(m_muLRT, "Muon.LRTOR", rEnv, false);
1529 //
1530 configFromFile(m_badmuQoverP, "BadMuon.qoverp", rEnv, 0.4);
1531 //
1532 configFromFile(m_muCalibrationMode, "Muon.CalibrationMode", rEnv, 0); // 0: correctData_CB
1533 //
1534 configFromFile(m_photonBaselinePt, "PhotonBaseline.Pt", rEnv, 25000.);
1535 configFromFile(m_photonBaselineEta, "PhotonBaseline.Eta", rEnv, 2.37);
1536 configFromFile(m_photonIdBaseline, "PhotonBaseline.Id", rEnv, "Tight");
1537 configFromFile(m_photonBaselineCrackVeto, "PhotonBaseline.CrackVeto", rEnv, true);
1538 configFromFile(m_photonBaselineIso_WP, "PhotonBaseline.Iso", rEnv, "None");
1539 //
1540 configFromFile(m_photonPt, "Photon.Pt", rEnv, 130000.);
1541 configFromFile(m_photonEta, "Photon.Eta", rEnv, 2.37);
1542 configFromFile(m_photonId, "Photon.Id", rEnv, "Tight");
1543 configFromFile(m_photonIso_WP, "Photon.Iso", rEnv, "FixedCutTight");
1544 configFromFile(m_photonTriggerName, "Photon.TriggerName", rEnv, "DI_PH_2015_2016_g20_tight_2016_g22_tight_2017_2018_g20_tight_icalovloose_L1EM15VHI"); // for symmetric diphoton triggers
1545 configFromFile(m_photonCrackVeto, "Photon.CrackVeto", rEnv, true);
1546 configFromFile(m_photonAllowLate, "Photon.AllowLate", rEnv, false);
1547 //
1548 configFromFile(m_tauPrePtCut, "Tau.PrePtCut", rEnv, 0.);
1549 configFromFile(m_tauPt, "Tau.Pt", rEnv, 20000.);
1550 configFromFile(m_tauEta, "Tau.Eta", rEnv, 2.5);
1551 configFromFile(m_tauId, "Tau.Id", rEnv, "Medium");
1552 configFromFile(m_tauConfigPath, "Tau.ConfigPath", rEnv, "default");
1553 configFromFile(m_tauIdBaseline, "TauBaseline.Id", rEnv, "Medium");
1554 configFromFile(m_tauConfigPathBaseline, "TauBaseline.ConfigPath", rEnv, "default");
1555 configFromFile(m_tauDoTTM, "Tau.DoTruthMatching", rEnv, false);
1556 //
1557 configFromFile(m_tauSmearingToolRecommendationTag,"Tau.SmearingToolRecommendationTag", rEnv, "2025-prerec");
1558 configFromFile(m_tauSmearingToolGenerator,"Tau.SmearingToolGenerator", rEnv, "PoPy");
1559 configFromFile(m_tauEffToolRecommendationTag,"Tau.EffToolRecommendationTag", rEnv, "2025-prerec");
1560 configFromFile(m_ApplyMVATESQualityCheck, "Tau.MVATESQualityCheck", rEnv, true);
1561 //
1562 configFromFile(m_jetPt, "Jet.Pt", rEnv, 20000.);
1563 configFromFile(m_jetEta, "Jet.Eta", rEnv, 2.8);
1564 configFromFile(m_JvtWP, "Jet.JvtWP", rEnv, "FixedEffPt"); // https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/PileupJetRecommendations
1565 configFromFile(m_JvtPtMax, "Jet.JvtPtMax", rEnv, 60.0e3);
1566 configFromFile(m_JvtConfigRun2, "Jet.JvtConfigRun2", rEnv, "JetJvtEfficiency/May2024/NNJvtSFFile_Run2_EMPFlow.root", true); // empty string means dummy SF
1567 configFromFile(m_JvtConfigRun3, "Jet.JvtConfigRun3", rEnv, "JetJvtEfficiency/May2024/NNJvtSFFile_Run3_EMPFlow.root", true); // empty string means dummy SF
1568 configFromFile(m_jetUncertaintiesConfig, "Jet.UncertConfig", rEnv, getDefaultJetUncConfig() ); // https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JetUncertaintiesRel22/
1569 configFromFile(m_jetUncertaintiesAnalysisFile, "Jet.AnalysisFile", rEnv, "default"); // https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JetUncertaintiesRel21Summer2018SmallR
1570 configFromFile(m_jetUncertaintiesCalibArea, "Jet.UncertCalibArea", rEnv, "default"); // Defaults to default area set by tool
1571 configFromFile(m_jetUncertaintiesMCType, "Jet.UncertMCType", rEnv, "", true); // empty string means the MCType is guessed
1572 configFromFile(m_jetUncertaintiesPDsmearing, "Jet.UncertPDsmearing", rEnv, true); // for non "SimpleJER" config, run the PDSmear systematics. This are labelled with an __2 if they are being used, but otherwise will have the same tree name as the JET_JER systematic trees.
1573 configFromFile(m_fatJets, "Jet.LargeRcollection", rEnv, "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"); // set to "None" to turn off large jets
1574 configFromFile(m_fatJetUncConfig, "Jet.LargeRuncConfig", rEnv, "rel22/Spring2025_PreRec/R10_CategoryJES_FullJER_FullJMS.config");
1575 configFromFile(m_fatJetUncertaintiesPDsmearing, "Jet.LargeRUncertPDsmearing", rEnv, true); // for non "SimpleJER" config, run the PDSmear systematics. This are labelled with an __2 if they are being used, but otherwise will have the same tree name as the JET_JER systematic trees.
1576 configFromFile(m_fatJetUncVars, "Jet.LargeRuncVars", rEnv, "default"); // do all if not specified
1577 configFromFile(m_WtagConfig, "Jet.WtaggerConfig", rEnv, "SmoothedContainedWTagger_AntiKt10UFOCSSKSoftDrop_FixedSignalEfficiency80_20220221.dat");
1578 configFromFile(m_ZtagConfig, "Jet.ZtaggerConfig", rEnv, "SmoothedContainedZTagger_AntiKt10UFOCSSKSoftDrop_FixedSignalEfficiency80_20220221.dat");
1579 configFromFile(m_WZTaggerCalibArea, "Jet.WZTaggerCalibArea", rEnv, "Winter2024_R22_PreRecs/SmoothedWZTaggers/");
1580 configFromFile(m_ToptagConfig, "Jet.ToptaggerConfig", rEnv, "DNNTagger_AntiKt10UFOSD_TopInclusive80_Oct30.dat");
1581 configFromFile(m_JetTruthLabelName, "Jet.JetTruthLabelName", rEnv, "R10TruthLabel_R21Precision_2022v1");
1582 configFromFile(m_TopTaggerCalibArea, "Jet.TopTaggerCalibArea", rEnv, "Winter2024_R22_PreRecs/JSSWTopTaggerDNN/");
1583 configFromFile(m_jesConfig, "Jet.JESConfig", rEnv, m_isRun3 ? "AntiKt4EMPFlow_MC23a_PreRecR22_Phase2_CalibConfig_ResPU_EtaJES_GSC_241208_InSitu.config" : "PreRec_R22_PFlow_ResPU_EtaJES_GSC_February23_230215.config"); //https://twiki.cern.ch/twiki/bin/view/AtlasProtected/ApplyJetCalibrationR22
1584 configFromFile(m_jesConfigAFII, "Jet.JESConfigAFII", rEnv, m_isRun3 ? "AntiKt4EMPFlow_MC23a_PreRecR22_Phase2_CalibConfig_ResPU_EtaJES_GSC_241208_InSitu.config" : "PreRec_R22_PFlow_ResPU_EtaJES_GSC_February23_230215.config");
1585 configFromFile(m_jesConfigJMS, "Jet.JESConfigJMS", rEnv, "JES_JMS_MC16Recommendation_Consolidated_MC_only_EMTopo_July2019_Rel21.config");
1586 configFromFile(m_jesConfigJMSData, "Jet.JESConfigJMSData", rEnv, "JES_JMS_MC16Recommendation_Consolidated_data_only_EMTopo_Sep2019_Rel21.config");
1587 configFromFile(m_jesConfigFat, "Jet.JESConfigFat", rEnv, "JES_MC20PreRecommendation_R10_UFO_CSSK_SoftDrop_JMS_R21Insitu_26Nov2024.config");
1588 configFromFile(m_jesConfigFatData, "Jet.JESConfigFatData", rEnv, "JES_MC20PreRecommendation_R10_UFO_CSSK_SoftDrop_JMS_R21Insitu_26Nov2024.config");
1589 configFromFile(m_jesCalibSeq, "Jet.CalibSeq", rEnv, "JetArea_Residual_EtaJES_GSC_Insitu");
1590 configFromFile(m_jesCalibSeqJMS, "Jet.CalibSeqJMS", rEnv, "JetArea_Residual_EtaJES_GSC");
1591 configFromFile(m_jesCalibSeqFat, "Jet.CalibSeqFat", rEnv, "EtaJES_JMS");
1592 configFromFile(m_jesCalibArea, "Jet.CalibArea", rEnv, m_isRun3 ? "00-04-83" : "00-04-82");
1593 //
1594 configFromFile(m_defaultTrackJets, "TrackJet.Coll", rEnv, "AntiKtVR30Rmax4Rmin02TrackJets");
1595 configFromFile(m_trkJetPt, "TrackJet.Pt", rEnv, 20000.);
1596 configFromFile(m_trkJetEta, "TrackJet.Eta", rEnv, 2.8);
1597 //
1598 configFromFile(m_badJetCut, "BadJet.Cut", rEnv, "LooseBad");
1599 //
1600 configFromFile(m_doFwdJVT, "FwdJet.doJVT", rEnv, false); // https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/PileupJetRecommendations
1601 configFromFile(m_fJvtWP, "FwdJet.JvtWP", rEnv, "Loose");
1602 configFromFile(m_fJvtPtMax, "FwdJet.JvtPtMax", rEnv, 60e3);
1603 configFromFile(m_fJvtEtaMin, "FwdJet.JvtEtaMin", rEnv, 2.5);
1604 configFromFile(m_fJvtConfigRun2, "FwdJet.JvtConfigRun2", rEnv, "JetJvtEfficiency/May2024/fJvtSFFile_Run2_EMPFlow.root", true); // empty string means dummy SF
1605 configFromFile(m_fJvtConfigRun3, "FwdJet.JvtConfigRun3", rEnv, "JetJvtEfficiency/May2024/fJvtSFFile_Run2_EMPFlow.root", true); // empty string means dummy SF
1606 configFromFile(m_JMScalib, "Jet.JMSCalib", rEnv, false);
1607 //
1608 configFromFile(m_useBtagging, "Btag.enable", rEnv, true);
1609 configFromFile(m_BtagTagger, "Btag.Tagger", rEnv, "GN2v01");
1610 configFromFile(m_BtagWP, "Btag.WP", rEnv, "Continuous");
1611 configFromFile(m_BtagMinPt, "Btag.MinPt", rEnv, -1.); // Not calibrated below 20
1612
1613 configFromFile(m_bTaggingCalibrationFilePath, "Btag.CalibPath", rEnv, m_isRun3 ? "xAODBTaggingEfficiency/13p6TeV/MC23_2025-06-17_GN2v01_v4.root": "xAODBTaggingEfficiency/13TeV/MC20_2025-06-17_GN2v01_v4.root");
1614 configFromFile(m_BtagSystStrategy, "Btag.SystStrategy", rEnv, "SFEigen");
1615 configFromFile(m_EigenvectorReductionB, "Btag.EigenvectorReductionB", rEnv, "Loose");
1616 configFromFile(m_EigenvectorReductionC, "Btag.EigenvectorReductionC", rEnv, "Loose");
1617 configFromFile(m_EigenvectorReductionLight, "Btag.EigenvectorReductionLight", rEnv, "Loose");
1618
1619 configFromFile(m_useBtagging_trkJet, "BtagTrkJet.enable", rEnv, true);
1620 configFromFile(m_BtagTagger_trkJet, "BtagTrkJet.Tagger", rEnv, "DL1r");
1621 configFromFile(m_BtagWP_trkJet, "BtagTrkJet.WP", rEnv, "FixedCutBEff_77");
1622 configFromFile(m_BtagMinPt_trkJet, "BtagTrkJet.MinPt", rEnv, -1.); // Not calibrated below 10
1623 configFromFile(m_BtagKeyOverride, "Btag.KeyOverride", rEnv, "", true);
1624 //
1625 configFromFile(m_orDoBoostedElectron, "OR.DoBoostedElectron", rEnv, true);
1626 configFromFile(m_orBoostedElectronC1, "OR.BoostedElectronC1", rEnv, -999.); // set to positive number to override default
1627 configFromFile(m_orBoostedElectronC2, "OR.BoostedElectronC2", rEnv, -999.); // set to positive number to override default - specify in MeV (i.e. "10*GeV" will nor work in the config file)
1628 configFromFile(m_orBoostedElectronMaxConeSize, "OR.BoostedElectronMaxConeSize", rEnv, -999.); // set to positive number to override default
1629 configFromFile(m_orDoBoostedMuon, "OR.DoBoostedMuon", rEnv, true);
1630 configFromFile(m_orBoostedMuonC1, "OR.BoostedMuonC1", rEnv, -999.); // set to positive number to override default
1631 configFromFile(m_orBoostedMuonC2, "OR.BoostedMuonC2", rEnv, -999.); // set to positive number to override default - specify in MeV (i.e. "10*GeV" will nor work in the config file)
1632 configFromFile(m_orBoostedMuonMaxConeSize, "OR.BoostedMuonMaxConeSize", rEnv, -999.); // set to positive number to override default
1633 configFromFile(m_orDoMuonJetGhostAssociation, "OR.DoMuonJetGhostAssociation", rEnv, true);
1634 configFromFile(m_orDoTau, "OR.DoTau", rEnv, false);
1635 configFromFile(m_orDoPhoton, "OR.DoPhoton", rEnv, false);
1636 configFromFile(m_orDoEleJet, "OR.EleJet", rEnv, true);
1637 configFromFile(m_orDoElEl, "OR.ElEl", rEnv, false);
1638 configFromFile(m_orDoElMu, "OR.ElMu", rEnv, false);
1639 configFromFile(m_orDoMuonJet, "OR.MuonJet", rEnv, true);
1640 configFromFile(m_orDoBjet, "OR.Bjet", rEnv, false);
1641 configFromFile(m_orDoElBjet, "OR.ElBjet", rEnv, false);
1642 configFromFile(m_orDoMuBjet, "OR.MuBjet", rEnv, false);
1643 configFromFile(m_orDoTauBjet, "OR.TauBjet", rEnv, false);
1644 configFromFile(m_orApplyRelPt, "OR.MuJetApplyRelPt", rEnv, false);
1645 configFromFile(m_orMuJetPtRatio, "OR.MuJetPtRatio", rEnv, -999.);
1646 configFromFile(m_orMuJetTrkPtRatio, "OR.MuJetTrkPtRatio", rEnv, -999.);
1647 configFromFile(m_orRemoveCaloMuons, "OR.RemoveCaloMuons", rEnv, true);
1648 configFromFile(m_orMuJetInnerDR, "OR.MuJetInnerDR", rEnv, -999.);
1649 configFromFile(m_orBtagWP, "OR.BtagWP", rEnv, "FixedCutBEff_85");
1650 configFromFile(m_orInputLabel, "OR.InputLabel", rEnv, "selected"); //"baseline"
1651 configFromFile(m_orPhotonFavoured, "OR.PhotonFavoured", rEnv, false);
1652 configFromFile(m_orBJetPtUpperThres, "OR.BJetPtUpperThres", rEnv, -1.); // upper pt threshold of b-jet in OR in unit of MeV, -1 means no pt threshold
1653 configFromFile(m_orLinkOverlapObjects, "OR.LinkOverlapObjects", rEnv, false);
1654 //
1655 configFromFile(m_orDoFatjets, "OR.DoFatJets", rEnv, false);
1656 configFromFile(m_EleFatJetDR, "OR.EleFatJetDR", rEnv, -999.);
1657 configFromFile(m_JetFatJetDR, "OR.JetFatJetDR", rEnv, -999.);
1658 //
1659 configFromFile(m_useTRUTH3, "Truth.UseTRUTH3", rEnv, true);
1661 configFromFile(m_upstreamTriggerMatching, "Trigger.UpstreamMatching", rEnv, false);
1662 configFromFile(m_trigMatchingPrefix, "Trigger.MatchingPrefix", rEnv, "", true);
1663 //
1664 configFromFile(m_doIsoSignal, "SigLep.RequireIso", rEnv, true);
1665 configFromFile(m_doElIsoSignal, "SigEl.RequireIso", rEnv, m_doIsoSignal);
1666 configFromFile(m_doMuIsoSignal, "SigMu.RequireIso", rEnv, m_doIsoSignal);
1667 configFromFile(m_doPhIsoSignal, "SigPh.RequireIso", rEnv, m_doIsoSignal);
1668 configFromFile(m_useSigLepForIsoCloseByOR, "SigLepPh.UseSigLepForIsoCloseByOR", rEnv, false);
1669 configFromFile(m_IsoCloseByORpassLabel, "SigLepPh.IsoCloseByORpassLabel", rEnv, "None");
1670
1671 //
1672 configFromFile(m_eleTerm, "MET.EleTerm", rEnv, "RefEle");
1673 configFromFile(m_gammaTerm, "MET.GammaTerm", rEnv, "RefGamma");
1674 configFromFile(m_tauTerm, "MET.TauTerm", rEnv, "RefTau");
1675 configFromFile(m_jetTerm, "MET.JetTerm", rEnv, "RefJet");
1676 configFromFile(m_muonTerm, "MET.MuonTerm", rEnv, "Muons");
1677 configFromFile(m_inputMETSuffix, "MET.InputSuffix", rEnv, "", true); // May be empty
1678 configFromFile(m_outMETTerm, "MET.OutputTerm", rEnv, "Final");
1679 configFromFile(m_metRemoveOverlappingCaloTaggedMuons, "MET.RemoveOverlappingCaloTaggedMuons", rEnv, true);
1680 configFromFile(m_metDoSetMuonJetEMScale, "Met.DoSetMuonJetEMScale", rEnv, true);
1681 configFromFile(m_metDoRemoveMuonJets, "MET.DoRemoveMuonJets", rEnv, true);
1682 configFromFile(m_metUseGhostMuons, "MET.UseGhostMuons", rEnv, false);
1683 configFromFile(m_metDoMuonEloss, "MET.DoMuonEloss", rEnv, false);
1684 configFromFile(m_metGreedyPhotons, "MET.DoGreedyPhotons", rEnv, false);
1685 configFromFile(m_metVeryGreedyPhotons, "MET.DoVeryGreedyPhotons", rEnv, false);
1686
1687 configFromFile(m_trkMETsyst, "MET.DoTrkSyst", rEnv, true);
1688 configFromFile(m_caloMETsyst, "MET.DoCaloSyst", rEnv, false);
1689 configFromFile(m_trkJetsyst, "MET.DoTrkJetSyst", rEnv, false);
1690 configFromFile(m_metsysConfigPrefix, "METSys.ConfigPrefix", rEnv, "METUtilities/R22_PreRecs");
1691 configFromFile(m_metJetSelection, "MET.JetSelection", rEnv, "Tight"); // Loose, Tight (default), Tighter, Tenacious
1692 configFromFile(m_softTermParam, "METSig.SoftTermParam", rEnv, met::Random);
1693 configFromFile(m_treatPUJets, "METSig.TreatPUJets", rEnv, true);
1694 configFromFile(m_doPhiReso, "METSig.DoPhiReso", rEnv, false);
1695 //
1696 configFromFile(m_prwActualMu2017File, "PRW.ActualMu2017File", rEnv, "GoodRunsLists/data17_13TeV/20180619/physics_25ns_Triggerno17e33prim.actualMu.OflLumi-13TeV-010.root");
1697 configFromFile(m_prwActualMu2018File, "PRW.ActualMu2018File", rEnv, "GoodRunsLists/data18_13TeV/20190318/physics_25ns_Triggerno17e33prim.actualMu.OflLumi-13TeV-010.root");
1698 configFromFile(m_prwActualMu2022File, "PRW.ActualMu2022File", rEnv, "GoodRunsLists/data22_13p6TeV/20250321/purw.actualMu.root");
1699 configFromFile(m_prwActualMu2023File, "PRW.ActualMu2023File", rEnv, "GoodRunsLists/data23_13p6TeV/20250321/purw.actualMu.root");
1700 configFromFile(m_prwActualMu2024File, "PRW.ActualMu2024File", rEnv, "GoodRunsLists/data24_13p6TeV/20241118/purw.actualMu.root");
1701 configFromFile(m_prwDataSF, "PRW.DataSF", rEnv, 1./1.03); // default for mc16, see: https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/ExtendedPileupReweighting#Tool_Properties
1702 configFromFile(m_prwDataSF_UP, "PRW.DataSF_UP", rEnv, 1./0.99); // mc16 uncertainty? defaulting to the value in PRWtool
1703 configFromFile(m_prwDataSF_DW, "PRW.DataSF_DW", rEnv, 1./1.07); // mc16 uncertainty? defaulting to the value in PRWtool
1704 configFromFile(m_runDepPrescaleWeightPRW, "PRW.UseRunDependentPrescaleWeight", rEnv, false); // If set to true, the prescale weight is the luminosity-average prescale over the lumiblocks in the unprescaled lumicalc file in the PRW tool.
1705 configFromFile(m_autoconfigPRWPath, "PRW.autoconfigPRWPath", rEnv, "dev/PileupReweighting/share/");
1706 configFromFile(m_autoconfigPRWFile, "PRW.autoconfigPRWFile", rEnv, "None");
1707 configFromFile(m_autoconfigPRWCombinedmode, "PRW.autoconfigPRWCombinedmode", rEnv, false);
1708 configFromFile(m_autoconfigPRWRPVmode, "PRW.autoconfigPRWRPVmode", rEnv, false);
1709 configFromFile(m_autoconfigPRWRtags, "PRW.autoconfigPRWRtags", rEnv, "mc20a:r13167_r14859,mc20d:r13144_r14860,mc20e:r13145_r14861,mc21a:r13752_r13829,mc23a:r14622_r14932_r15540,mc23c:r14799_r14908,mc23d:r15224_r15530,mc23e:r16083"); // Tag details here: https://twiki.cern.ch/twiki/bin/view/AtlasProtected/AtlasProductionGroup
1710 configFromFile(m_commonPRWFileMC20a, "PRW.commonPRWFileMC20a", rEnv, "PileupReweighting/mc20_common/mc20a.284500.physlite.prw.v1.root");
1711 configFromFile(m_commonPRWFileMC20d, "PRW.commonPRWFileMC20d", rEnv, "PileupReweighting/mc20_common/mc20d.300000.physlite.prw.v1.root");
1712 configFromFile(m_commonPRWFileMC20e, "PRW.commonPRWFileMC20e", rEnv, "PileupReweighting/mc20_common/mc20e.310000.physlite.prw.v1.root");
1713 configFromFile(m_commonPRWFileMC21a, "PRW.commonPRWFileMC21a", rEnv, "PileupReweighting/mc21_common/mc21a.410000.physlite.prw.v1.root");
1714 configFromFile(m_commonPRWFileMC23a, "PRW.commonPRWFileMC23a", rEnv, "PileupReweighting/mc23_common/mc23a.410000.physlite.prw.v2.root");
1715 configFromFile(m_commonPRWFileMC23c, "PRW.commonPRWFileMC23c", rEnv, "PileupReweighting/mc23_common/mc23c.450000.physlite.prw.v1.root");
1716 configFromFile(m_commonPRWFileMC23d, "PRW.commonPRWFileMC23d", rEnv, "PileupReweighting/mc23_common/mc23d.450000.physlite.prw.v1.root");
1717 configFromFile(m_commonPRWFileMC23e, "PRW.commonPRWFileMC23e", rEnv, "PileupReweighting/mc23_common/mc23e.470000.physlite.prw.v1.root");
1718 //
1719 configFromFile(m_strictConfigCheck, "StrictConfigCheck", rEnv, false);
1720
1721 // By now rEnv should be empty!
1722 if (rEnv.GetTable() && rEnv.GetTable()->GetSize()>0){
1723 ATH_MSG_ERROR("Found " << rEnv.GetTable()->GetSize() << " unparsed environment options:");
1724 rEnv.Print();
1725 ATH_MSG_ERROR("Please fix your configuration!");
1726 return StatusCode::FAILURE;
1727 }
1728
1729 // Set up the correct configuration files for the large-R jet tagging corresponding to the input tagger config
1730 if (!m_WtagConfig.empty()) {
1731 if (m_WtagConfig.find("Efficiency50") != std::string::npos){
1732 m_WTagUncConfig = "R10_SF_LCTopo_WTag_SigEff50.config";
1733 }
1734 else if (m_WtagConfig.find("Efficiency80") != std::string::npos){
1735 m_WTagUncConfig = "R10_SF_LCTopo_WTag_SigEff80.config";
1736 }
1737 else {
1738 ATH_MSG_ERROR("You have specified a large-R W-tag config without a matching uncertainties file. Please fix this. Currently the 50% and 80% WPs are supported");
1739 }
1740 }
1741 if (!m_ZtagConfig.empty()) {
1742 if (m_ZtagConfig.find("Efficiency50") != std::string::npos){
1743 m_ZTagUncConfig = "R10_SF_LCTopo_ZTag_SigEff50.config";
1744 }
1745 else if (m_ZtagConfig.find("Efficiency80") != std::string::npos){
1746 m_ZTagUncConfig = "R10_SF_LCTopo_ZTag_SigEff80.config";
1747 }
1748 else {
1749 ATH_MSG_ERROR("You have specified a large-R Z-tag config without a matching uncertainties file. Please fix this. Currently the 50% and 80% WPs are supported");
1750 }
1751 }
1752 std::string TopTagEff = "";
1753 std::string TopTagType = "";
1754 if (!m_ToptagConfig.empty()) {
1755 if (m_ToptagConfig.find("50") != std::string::npos){
1756 TopTagEff = "50";
1757 }
1758 else if (m_ToptagConfig.find("80") != std::string::npos){
1759 TopTagEff = "80";
1760 }
1761 else {
1762 ATH_MSG_ERROR("You have specified a large-R Top-tag config without a matching uncertainties file. Please fix this. Currently the 50% and 80% WPs are supported");
1763 }
1764 //
1765 if (m_ToptagConfig.find("Inclusive") != std::string::npos){
1766 TopTagType = "Inclusive";
1767 }
1768 else if (m_ToptagConfig.find("Contained") != std::string::npos){
1769 TopTagType = "Contained";
1770 }
1771 else {
1772 ATH_MSG_ERROR("You have specified a large-R Top-tag config without a matching uncertainties file. Please fix this. Currently the contained and inclusive WPs are supported");
1773 }
1774 m_TopTagUncConfig = "R10_SF_LCTopo_TopTag"+TopTagType+"_SigEff"+TopTagEff+".config";
1775 }
1776
1777 //** validate configuration
1779
1780 //** cache trigger chains for electron matching
1782
1783 //** cache trigger chains for matching (both electrons and muons)
1785
1793
1799
1805
1806 return StatusCode::SUCCESS;
1807}
1808
1809
1810const std::vector<std::string> SUSYObjDef_xAOD::split(const std::string& s, const std::string& delim) const {
1811 assert(delim.length() == 1);
1812 std::vector<std::string> retval;
1813 retval.reserve(std::count(s.begin(), s.end(), delim[0]) + 1);
1814 // if only 1
1815 if (s.find(delim)==std::string::npos) {
1816 retval.emplace_back(s);
1817 return retval;
1818 }
1819 // if need to split
1820 size_t last = 0;
1821 size_t next = 0;
1822 bool gothere=false;
1823 while ((next = s.find(delim, last)) != std::string::npos) {
1824 retval.emplace_back(s.substr(last, next - last));
1825 last = next + delim.length();
1826 gothere=true;
1827 }
1828 if(gothere)
1829 retval.emplace_back(s.substr(last));
1830
1831 return retval;
1832}
1833
1835 if (m_isRun3)
1836 return isAtlfast() ? "rel22/Spring2025_PreRec/R4_CategoryReduction_FullJER_MC23.config" : "rel22/Spring2025_PreRec/R4_CategoryReduction_FullJER_MC23.config";
1837 else
1838 return isAtlfast() ? "rel22/Spring2025_PreRec/R4_CategoryReduction_FullJER_MC20_MC21.config" : "rel22/Spring2025_PreRec/R4_CategoryReduction_FullJER_MC20_MC21.config";
1839}
1840
1841void SUSYObjDef_xAOD::getTauConfig(const std::string& tauConfigPath, std::vector<float>& pT_window, std::vector<float>& eta_window, bool &eleOLR, bool &muVeto, bool &muOLR) const {
1842
1843 if(tauConfigPath.empty()) return;
1844
1845 TEnv rEnv;
1846 auto filename = PathResolverFindCalibFile(tauConfigPath);
1847 rEnv.ReadFile(filename.c_str(), kEnvAll);
1848
1849 std::vector<std::string> cuts;
1850 if (rEnv.Defined("SelectionCuts")) {
1851 cuts = split(rEnv.GetValue("SelectionCuts", " "), " ");
1852 } else {
1853 auto *l = rEnv.GetTable();
1854 for( Int_t i = 0; i < l->GetEntries(); ++i ) {
1855 cuts.push_back( l->At(i)->GetName() );
1856 }
1857 }
1858
1859 //default OR settings
1860 eleOLR=false;
1861 muOLR=false;
1862 muVeto=false;
1863
1864 static const std::string trueBool = "TRUE";
1865
1866 // Now find the pT and eta window
1867 std::vector<std::string> v_pT_window;
1868 std::vector<std::string> v_eta_window;
1869 pT_window.clear();
1870 eta_window.clear();
1871 float pT_min = -99.0;
1872 float pT_max = -99.0;
1873 float eta_min = -99.0;
1874 float eta_max = -99.0;
1875 for (const auto& cut : cuts) {
1876 if(cut == "PtRegion") {
1877 v_pT_window = split(rEnv.GetValue("PtRegion", ""), ";");
1878 std::transform(std::begin(v_pT_window),
1879 std::end(v_pT_window),
1880 std::back_inserter(pT_window),
1881 [](const std::string& s) { return std::stof(s); }
1882 );
1883 } else if (cut == "PtMin") {
1884 pT_min = rEnv.GetValue("PtMin", NAN);
1885 } else if (cut == "PtMax") {
1886 pT_max = rEnv.GetValue("PtMax", NAN);
1887 } else if (cut == "AbsEtaRegion") {
1888 v_eta_window = split(rEnv.GetValue("AbsEtaRegion", ""), ";");
1889 std::transform(std::begin(v_eta_window),
1890 std::end(v_eta_window),
1891 std::back_inserter(eta_window),
1892 [](const std::string& s) { return std::stof(s); }
1893 );
1894 } else if (cut == "AbsEtaMin") {
1895 eta_min = rEnv.GetValue("AbsEtaMin", NAN);
1896 } else if (cut == "AbsEtaMax") {
1897 eta_max = rEnv.GetValue("AbsEtaMax", NAN);
1898 }
1899
1900 //OR settings
1901 else if (cut == "EleOLR"){
1902 eleOLR = (rEnv.GetValue("EleOLR", "FALSE") == trueBool);
1903 }
1904 else if (cut == "MuonVeto"){
1905 muVeto = (rEnv.GetValue("MuonVeto", "FALSE") == trueBool);
1906 }
1907 else if (cut == "MuonOLR"){
1908 muOLR = (rEnv.GetValue("MuonOLR", "FALSE") == trueBool);
1909 }
1910 }
1911
1912 if(pT_window.empty()) {
1913 if(pT_min == pT_min) {
1914 // fails on NaN
1915 pT_window.push_back(pT_min);
1916 } else {
1917 pT_window.push_back(-std::numeric_limits<float>::infinity());
1918 }
1919
1920 if(pT_max == pT_max) {
1921 // fails on NaN
1922 pT_window.push_back(pT_max);
1923 } else {
1924 pT_window.push_back(std::numeric_limits<float>::infinity());
1925 }
1926 }
1927
1928 if(eta_window.empty()) {
1929 if(eta_min == eta_min) {
1930 // fails on NaN
1931 eta_window.push_back(eta_min);
1932 } else {
1933 eta_window.push_back(-std::numeric_limits<float>::infinity());
1934 }
1935
1936 if(eta_max == eta_max) {
1937 // fails on NaN
1938 eta_window.push_back(eta_max);
1939 } else {
1940 eta_window.push_back(std::numeric_limits<float>::infinity());
1941 }
1942 }
1943}
1944
1945StatusCode SUSYObjDef_xAOD::validConfig(bool strict) const {
1946 // Validate configuration (i.e. that signal settings are tighter than baseline, etc)
1947 // :: Throw SC::FAILURE if strict mode is enabled, just a WARNING if not
1948
1949 // Electrons
1950 if( m_elePt < m_eleBaselinePt ){
1951 ATH_MSG_WARNING("Your electron pt configuration is inconsistent! Signal : " << m_elePt << " < Baseline : " << m_eleBaselinePt);
1952 if(strict) return StatusCode::FAILURE;
1953 }
1954 if( m_eleEta > m_eleBaselineEta ){
1955 ATH_MSG_WARNING("Your electron eta configuration is inconsistent! Signal : " << m_eleEta << " < Baseline : " << m_eleBaselineEta);
1956 if(strict) return StatusCode::FAILURE;
1957 }
1958
1960 ATH_MSG_WARNING("Your electron ID configuration is inconsistent! Signal : " << m_eleId << " looser than Baseline : " << m_eleIdBaseline);
1961 if(strict) return StatusCode::FAILURE;
1962 }
1964 ATH_MSG_WARNING("Your electron crack removal is inconsistent! Signal : " << m_eleCrackVeto << " while Baseline : " << m_eleBaselineCrackVeto);
1965 if(strict) return StatusCode::FAILURE;
1966 }
1967
1968 // Muons
1969 if( m_muPt < m_muBaselinePt ){
1970 ATH_MSG_WARNING("Your muon pt configuration is inconsistent! Signal : " << m_muPt << " < Baseline : " << m_muBaselinePt);
1971 if(strict) return StatusCode::FAILURE;
1972 }
1973 if( m_muEta > m_muBaselineEta ){
1974 ATH_MSG_WARNING("Your muon eta configuration is inconsistent! Signal : " << m_muEta << " < Baseline : " << m_muBaselineEta);
1975 if(strict) return StatusCode::FAILURE;
1976 }
1977 if( m_muId > m_muIdBaseline ){
1978 ATH_MSG_WARNING("Your muon ID configuration is inconsistent! Signal : " << m_muId << " < Baseline : " << m_muIdBaseline);
1979 if(strict) return StatusCode::FAILURE;
1980 }
1981
1982 // Photons
1984 ATH_MSG_WARNING("Your photon pt configuration is inconsistent! Signal : " << m_photonPt << " < Baseline : " << m_photonBaselinePt);
1985 if(strict) return StatusCode::FAILURE;
1986 }
1988 ATH_MSG_WARNING("Your photon eta configuration is inconsistent! Signal : " << m_photonEta << " < Baseline : " << m_photonBaselineEta);
1989 if(strict) return StatusCode::FAILURE;
1990 }
1991 if( m_photonId=="Loose" && m_photonIdBaseline=="Tight" ){
1992 ATH_MSG_WARNING("Your photon ID configuration is inconsistent! Signal : " << m_photonId << " < Baseline : " << m_photonIdBaseline);
1993 if(strict) return StatusCode::FAILURE;
1994 }
1996 ATH_MSG_WARNING("Your photon crack removal is inconsistent! Signal : " << m_photonCrackVeto << " while Baseline : " << m_photonBaselineCrackVeto);
1997 if(strict) return StatusCode::FAILURE;
1998 }
1999
2000 // Jets
2001 if ( m_jetPt < 20e3 ){
2002 ATH_MSG_WARNING("Your minimum signal jet pt is less than 20 GeV! Jet.Pt : " << m_jetPt << ". This is NOT supported by the jet group!");
2003 }
2004
2005 //Btagging //OR-wp looser than signal-wp?
2006 if( m_BtagWP.compare(0, m_BtagWP.size()-3, m_orBtagWP, 0, m_BtagWP.size()-3) == 0 ){ //same tagger WP (FixedCutBEff_XX or HybBEff_XX)
2007 if( atoi(m_BtagWP.substr(m_BtagWP.size()-2, m_BtagWP.size()).c_str()) > atoi(m_orBtagWP.substr(m_orBtagWP.size()-2, m_orBtagWP.size()).c_str()) ){
2008 ATH_MSG_WARNING("Your btagging configuration is inconsistent! Signal : " << m_BtagWP << " is looser than OR-Baseline : " << m_orBtagWP);
2009 }
2010 }
2011 if (m_BtagMinPt < 20e3 || m_BtagMinPt_trkJet < 10e3) {
2012 ATH_MSG_WARNING("You btagging MinPt settings are inconsistent! EM(Topo|PFlow)Jets: not calibrated below 20 GeV (Btag.MinPt: " << m_BtagMinPt/1000. << " GeV set), VRTrackJets: not calibrated below 10 GeV (BtagTrkJet.MinPt: " << m_BtagMinPt_trkJet/1000. << " GeV set).");
2013 }
2014
2015 //Taus
2017 if(m_tauPrePtCut > 0 and m_tauPrePtCut > m_tauPt) {
2018 ATH_MSG_WARNING("Your tau pt configuration is inconsistent! Signal pt cut : " << m_tauPt << " < Baseline (pre) pt cut : " << m_tauPrePtCut);
2019 if(strict) return StatusCode::FAILURE;
2020 }
2023 ATH_MSG_WARNING("Your tau ID configuration is inconsistent! Signal : " << m_tauId << " looser than Baseline : " << m_tauIdBaseline);
2024 if(strict) return StatusCode::FAILURE;
2025 }
2026
2028 std::vector<float> pT_window;
2029 std::vector<float> eta_window;
2030 bool elOLR=false;
2031 bool muVeto=false;
2032 bool muOLR=false;
2033
2034 if(!m_tauConfigPathBaseline.empty()) { //baseline taus
2035
2036 std::string theConfig = m_tauConfigPathBaseline;
2037 if( m_tauConfigPathBaseline=="default" ){
2038 if (m_tauId == "rnn001") theConfig = "SUSYTools/tau_selection_rnn001.conf";
2039 else if (m_tauId == "VeryLoose") theConfig = "SUSYTools/tau_selection_veryloose.conf";
2040 else if (m_tauId == "Loose") theConfig = "SUSYTools/tau_selection_loose.conf";
2041 else if (m_tauId == "Medium") theConfig = "SUSYTools/tau_selection_medium.conf";
2042 else if (m_tauId == "Tight") theConfig = "SUSYTools/tau_selection_tight.conf";
2043 }
2044
2045 //read config
2046 getTauConfig(theConfig, pT_window, eta_window, elOLR, muVeto, muOLR);
2047
2048 //pt-eta checks
2049 if( m_tauPrePtCut > 0 and (m_tauPrePtCut != 1000*pT_window[0] or (pT_window[1] > 0 and m_tauPrePtCut > 1000*pT_window[1]))) {
2050 ATH_MSG_WARNING("Your baseline tau pt configuration is inconsistent! pre pT cut : " << m_tauPrePtCut << " / TauSelectionTool window (in MeV) : [" << 1000*pT_window[0] << ", " << 1000*pT_window[1] << "]");
2051 if(strict) return StatusCode::FAILURE;
2052 }
2053
2054 if( m_tauPt > 0 and (m_tauPt != 1000*pT_window[0] or (pT_window[1] > 0 and m_tauPt > 1000*pT_window[1]))) {
2055 ATH_MSG_WARNING("Your baseline tau pt configuration is inconsistent! pT cut : " << m_tauPt << " / TauSelectionTool window (in Mev) : [" << 1000*pT_window[0] << ", " << 1000*pT_window[1] << "]");
2056 if(strict) return StatusCode::FAILURE;
2057 }
2058
2059 if( m_tauEta > 0 and m_tauEta != eta_window[eta_window.size()-1]) { // eta window can have 4 entries
2060 ATH_MSG_WARNING("Your baseline tau eta configuration is inconsistent! eta cut : " << m_tauEta << " != TauSelectionTool max eta : " << eta_window[eta_window.size()-1]);
2061 if(strict) return StatusCode::FAILURE;
2062 }
2063 }
2064
2065 if(!m_tauConfigPath.empty()) { //signal taus
2066
2067 std::string theConfig = m_tauConfigPath;
2068 if( m_tauConfigPath=="default" ){
2069 if (m_tauId == "rnn001") theConfig = "SUSYTools/tau_selection_rnn001.conf";
2070 else if (m_tauId == "VeryLoose") theConfig = "SUSYTools/tau_selection_veryloose.conf";
2071 else if (m_tauId == "Loose") theConfig = "SUSYTools/tau_selection_loose.conf";
2072 else if (m_tauId == "Medium") theConfig = "SUSYTools/tau_selection_medium.conf";
2073 else if (m_tauId == "Tight") theConfig = "SUSYTools/tau_selection_tight.conf";
2074 }
2075
2076 getTauConfig(theConfig, pT_window, eta_window, elOLR, muVeto, muOLR);
2077
2078 if( m_tauPrePtCut > 0 and (m_tauPrePtCut != 1000*pT_window[0] or (pT_window[1] > 0 and m_tauPrePtCut > 1000*pT_window[1]))) {
2079 ATH_MSG_WARNING("Your tau pt configuration is inconsistent! pre pT cut : " << m_tauPrePtCut << " / TauSelectionTool window (in MeV) : [" << 1000*pT_window[0] << ", " << 1000*pT_window[1] << "]");
2080 if(strict) return StatusCode::FAILURE;
2081 }
2082
2083 if( m_tauPt > 0 and (m_tauPt != 1000*pT_window[0] or (pT_window[1] > 0 and m_tauPt > 1000*pT_window[1]))) {
2084 ATH_MSG_WARNING("Your tau pt configuration is inconsistent! pT cut : " << m_tauPt << " / TauSelectionTool window (in Mev) : [" << 1000*pT_window[0] << ", " << 1000*pT_window[1] << "]");
2085 if(strict) return StatusCode::FAILURE;
2086 }
2087
2088 if( m_tauEta > 0 and m_tauEta != eta_window[eta_window.size()-1]) { // eta window can have 4 entries
2089 ATH_MSG_WARNING("Your tau eta configuration is inconsistent! eta cut : " << m_tauEta << " != TauSelectionTool max eta : " << eta_window[eta_window.size()-1]);
2090 if(strict) return StatusCode::FAILURE;
2091 }
2092 }
2093
2094
2095 return StatusCode::SUCCESS;
2096}
2097
2098
2099
2101
2105
2109
2111 return syst.name().empty();
2112}
2113
2115 // returns true if all systematics do _not_ affect kinematics and _any_ of them affects the weight
2116 bool affectsWeights = false;
2117 for (const auto& sys : systSet) {
2118 auto info = getSystInfo(sys);
2119 if(info.affectsKinematics) { return false; }
2120 affectsWeights = affectsWeights or info.affectsWeights;
2121 }
2122 return affectsWeights;
2123}
2124
2126 // returns true if _any_ of the systematics affect kinematics. ignores effect on weights.
2127 for (const auto& sys : systSet) {
2128 auto info = getSystInfo(sys);
2129 if(info.affectsKinematics) { return true; }
2130 }
2131 return false;
2132}
2133
2137
2141
2145
2146
2147
2149{
2150 if (!m_tool_init) {
2151 ATH_MSG_ERROR("SUSYTools was not initialized!!");
2152 return StatusCode::FAILURE;
2153 }
2154
2155 ATH_MSG_DEBUG(" in SUSYObjDef_xAOD::applySystematicVariation \"" << systConfig.name() << "\" size " << systConfig.size());
2156
2157 m_currentSyst = systConfig;
2158
2159 // NB: SystematicSet typically has only one component (see SUSYToolsTester macro)
2160 if (!m_jetUncertaintiesTool.empty() && systConfig.name().find("PseudoData") == std::string::npos) {
2161 StatusCode ret = m_jetUncertaintiesTool->applySystematicVariation(systConfig);
2162 if ( ret != StatusCode::SUCCESS) {
2163 ATH_MSG_VERBOSE("Cannot configure JetUncertaintiesTool for systematic var. " << systConfig.name() );
2164 } else {
2165 ATH_MSG_VERBOSE("Configured JetUncertaintiesTool for systematic var. " << systConfig.name() );
2166 }
2167 }
2168 if (!m_jetUncertaintiesPDSmearTool.empty() && systConfig.name().find("PseudoData") != std::string::npos) {
2169 StatusCode ret = m_jetUncertaintiesPDSmearTool->applySystematicVariation(systConfig);
2170 if ( ret != StatusCode::SUCCESS) {
2171 ATH_MSG_VERBOSE("Cannot configure JetUncertaintiesPDSmearTool for systematic var. " << systConfig.name() );
2172 } else {
2173 ATH_MSG_VERBOSE("Configured JetUncertaintiesPDSmearTool for systematic var. " << systConfig.name() );
2174 }
2175 }
2176 if (!m_WTagjetUncertaintiesTool.empty() && !m_WTagUncConfig.empty()) {
2177 StatusCode ret = m_WTagjetUncertaintiesTool->applySystematicVariation(systConfig);
2178 if ( ret != StatusCode::SUCCESS) {
2179 ATH_MSG_VERBOSE("Cannot configure (Fat)JetUncertaintiesTool (WTag) for systematic var. " << systConfig.name() );
2180 } else {
2181 ATH_MSG_VERBOSE("Configured (Fat)JetUncertaintiesTool (WTag) for systematic var. " << systConfig.name() );
2182 }
2183 }
2184 if (!m_ZTagjetUncertaintiesTool.empty() && !m_ZTagUncConfig.empty()) {
2185 StatusCode ret = m_ZTagjetUncertaintiesTool->applySystematicVariation(systConfig);
2186 if ( ret != StatusCode::SUCCESS) {
2187 ATH_MSG_VERBOSE("Cannot configure (Fat)JetUncertaintiesTool (ZTag) for systematic var. " << systConfig.name() );
2188 } else {
2189 ATH_MSG_VERBOSE("Configured (Fat)JetUncertaintiesTool (ZTag) for systematic var. " << systConfig.name() );
2190 }
2191 }
2192
2193 if (!m_TopTagjetUncertaintiesTool.empty() && !m_TopTagUncConfig.empty()) {
2194 StatusCode ret = m_TopTagjetUncertaintiesTool->applySystematicVariation(systConfig);
2195 if ( ret != StatusCode::SUCCESS) {
2196 ATH_MSG_VERBOSE("Cannot configure (Fat)JetUncertaintiesTool (TopTag) for systematic var. " << systConfig.name() );
2197 } else {
2198 ATH_MSG_VERBOSE("Configured (Fat)JetUncertaintiesTool (TopTag) for systematic var. " << systConfig.name() );
2199 }
2200 }
2201 if (!m_fatjetUncertaintiesTool.empty() && systConfig.name().find("PseudoData") == std::string::npos) {
2202 StatusCode ret = m_fatjetUncertaintiesTool->applySystematicVariation(systConfig);
2203 if ( ret != StatusCode::SUCCESS) {
2204 ATH_MSG_VERBOSE("Cannot configure (Fat)JetUncertaintiesTool (main) for systematic var. " << systConfig.name() );
2205 } else {
2206 ATH_MSG_VERBOSE("Configured (Fat)JetUncertaintiesTool (main) for systematic var. " << systConfig.name() );
2207 }
2208 }
2209 if (!m_fatjetUncertaintiesPDSmearTool.empty() && systConfig.name().find("PseudoData") != std::string::npos) {
2210 StatusCode ret = m_fatjetUncertaintiesPDSmearTool->applySystematicVariation(systConfig);
2211 if ( ret != StatusCode::SUCCESS) {
2212 ATH_MSG_VERBOSE("Cannot configure FatJetUncertaintiesPDSmearTool for systematic var. " << systConfig.name() );
2213 } else {
2214 ATH_MSG_VERBOSE("Configured FatJetUncertaintiesPDSmearTool for systematic var. " << systConfig.name() );
2215 }
2216 }
2217 if (!m_fatjetFFSmearingTool.empty() && std::find(m_fatjetFFSmearingSyst.begin(), m_fatjetFFSmearingSyst.end(), systConfig) != m_fatjetFFSmearingSyst.end()) {
2218 StatusCode ret = m_fatjetFFSmearingTool->applySystematicVariation(systConfig);
2219 if ( ret != StatusCode::SUCCESS) {
2220 ATH_MSG_VERBOSE("Cannot configure (Fat)JetFFSmearingTool (main) for systematic var. " << systConfig.name() );
2221 } else {
2222 ATH_MSG_VERBOSE("Configured (Fat)JetFFSmearingTool (main) for systematic var. " << systConfig.name() );
2223 }
2224 }
2225 if (!m_jetNNJvtEfficiencyTool.empty()) {
2226 StatusCode ret = m_jetNNJvtEfficiencyTool->applySystematicVariation(systConfig);
2227 if ( ret != StatusCode::SUCCESS) {
2228 ATH_MSG_VERBOSE("Cannot configure NNJvtEfficiency for systematic var. " << systConfig.name() );
2229 } else {
2230 ATH_MSG_VERBOSE("Configured NNJvtEfficiency for systematic var. " << systConfig.name() );
2231 }
2232 }
2233 if (!m_jetfJvtEfficiencyTool.empty()) {
2234 StatusCode ret = m_jetfJvtEfficiencyTool->applySystematicVariation(systConfig);
2235 if ( ret != StatusCode::SUCCESS) {
2236 ATH_MSG_VERBOSE("Cannot configure fJvtEfficiency for systematic var. " << systConfig.name() );
2237 } else {
2238 ATH_MSG_VERBOSE("Configured fJvtEfficiency for systematic var. " << systConfig.name() );
2239 }
2240 }
2241 if (!m_muonCalibTool.empty()) {
2242 StatusCode ret = m_muonCalibTool->applySystematicVariation(systConfig);
2243 if (ret != StatusCode::SUCCESS) {
2244 ATH_MSG_ERROR("Cannot configure MuonCalibTool for systematic var. " << systConfig.name() );
2245 return ret;
2246 } else {
2247 ATH_MSG_VERBOSE("MuonCalibTool configured for systematic var. " << systConfig.name() );
2248 }
2249 }
2250 if (!m_muonEfficiencySFTool.empty()) {
2251 StatusCode ret = m_muonEfficiencySFTool->applySystematicVariation(systConfig);
2252 if ( ret != StatusCode::SUCCESS) {
2253 ATH_MSG_ERROR("Cannot configure MuonEfficiencyScaleFactors for systematic var. " << systConfig.name() );
2254 return ret;
2255 } else {
2256 ATH_MSG_VERBOSE("MuonEfficiencyScaleFactors configured for systematic var. " << systConfig.name() );
2257 }
2258 }
2259 if (!m_muonEfficiencyBMHighPtSFTool.empty()) {
2260 StatusCode ret = m_muonEfficiencyBMHighPtSFTool->applySystematicVariation(systConfig);
2261 if ( ret != StatusCode::SUCCESS) {
2262 ATH_MSG_ERROR("Cannot configure MuonBadMuonHighPtScaleFactors for systematic var. " << systConfig.name() );
2263 return ret;
2264 } else {
2265 ATH_MSG_VERBOSE("MuonBadMuonHighPtScaleFactors configured for systematic var. " << systConfig.name() );
2266 }
2267 }
2268 if (!m_muonTTVAEfficiencySFTool.empty()) {
2269 StatusCode ret = m_muonTTVAEfficiencySFTool->applySystematicVariation(systConfig);
2270 if ( ret != StatusCode::SUCCESS) {
2271 ATH_MSG_ERROR("Cannot configure MuonTTVAEfficiencyScaleFactors for systematic var. " << systConfig.name() );
2272 return ret;
2273 } else {
2274 ATH_MSG_VERBOSE("MuonTTVAEfficiencyScaleFactors configured for systematic var. " << systConfig.name() );
2275 }
2276 }
2277 if (!m_muonIsolationSFTool.empty()) {
2278 StatusCode ret = m_muonIsolationSFTool->applySystematicVariation(systConfig);
2279 if ( ret != StatusCode::SUCCESS) {
2280 ATH_MSG_ERROR("Cannot configure MuonIsolationScaleFactors for systematic var. " << systConfig.name() );
2281 return ret;
2282 } else {
2283 ATH_MSG_VERBOSE("MuonIsolationScaleFactors configured for systematic var. " << systConfig.name() );
2284 }
2285 }
2286 if (!m_muonTriggerSFTool.empty()) {
2287 StatusCode ret = m_muonTriggerSFTool->applySystematicVariation(systConfig);
2288 if ( ret != StatusCode::SUCCESS) {
2289 ATH_MSG_ERROR("Cannot configure MuonTriggerScaleFactors for systematic var. " << systConfig.name() );
2290 return ret;
2291 } else {
2292 ATH_MSG_VERBOSE("MuonTriggerScaleFactors configured for systematic var. " << systConfig.name() );
2293 }
2294 }
2295 if (!m_elecEfficiencySFTool_reco.empty()) {
2296 StatusCode ret = m_elecEfficiencySFTool_reco->applySystematicVariation(systConfig);
2297 if (ret != StatusCode::SUCCESS) {
2298 ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (reco) for systematic var. " << systConfig.name() );
2299 return ret;
2300 } else {
2301 ATH_MSG_VERBOSE("AsgElectronEfficiencyCorrectionTool (reco) configured for systematic var. " << systConfig.name() );
2302 }
2303 }
2304 if (!m_elecEfficiencySFTool_id.empty()) {
2305 StatusCode ret = m_elecEfficiencySFTool_id->applySystematicVariation(systConfig);
2306 if (ret != StatusCode::SUCCESS) {
2307 ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (id) for systematic var. " << systConfig.name() );
2308 return ret;
2309 } else {
2310 ATH_MSG_VERBOSE("AsgElectronEfficiencyCorrectionTool (id) configured for systematic var. " << systConfig.name() );
2311 }
2312 }
2314 StatusCode ret = m_elecEfficiencySFTool_trig_singleLep->applySystematicVariation(systConfig);
2315 if (ret != StatusCode::SUCCESS) {
2316 ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() );
2317 return ret;
2318 } else {
2319 ATH_MSG_VERBOSE("AsgElectronEfficiencyCorrectionTool (trigger) configured for systematic var. " << systConfig.name() );
2320 }
2321 }
2323 StatusCode ret = m_elecEfficiencySFTool_trigEff_singleLep->applySystematicVariation(systConfig);
2324 if (ret != StatusCode::SUCCESS) {
2325 ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (trigger SFTool) for systematic var. " << systConfig.name() );
2326 return ret;
2327 } else {
2328 ATH_MSG_VERBOSE("AsgElectronEfficiencyCorrectionTool (trigger SFTool) configured for systematic var. " << systConfig.name() );
2329 }
2330 }
2331 if (!m_trigGlobalEffCorrTool_diLep.empty()) {
2332 StatusCode ret = m_trigGlobalEffCorrTool_diLep->applySystematicVariation(systConfig);
2333 for(auto &sfop : m_elecTrigEffTools){
2334 StatusCode ret1 = sfop->applySystematicVariation(systConfig);
2335 if (ret1 != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure m_elecTrigEffTools (dilepton trigger) for systematic var. " << systConfig.name() ); return ret1; }
2336 }
2337 for(auto &sfop : m_elecTrigSFTools){
2338 StatusCode ret1 = sfop->applySystematicVariation(systConfig);
2339 if (ret1 != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure m_elecTrigSFTools (dilepton trigger) for systematic var. " << systConfig.name() ); return ret1; }
2340 }
2341 for(auto &sfop : m_muonTrigSFTools){
2342 StatusCode ret1 = sfop->applySystematicVariation(systConfig);
2343 if (ret1 != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure m_muonTrigSFTools (dilepton trigger) for systematic var. " << systConfig.name() ); return ret1; }
2344 }
2345 if (ret != StatusCode::SUCCESS) {
2346 ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (dilepton trigger) for systematic var. " << systConfig.name() );
2347 return ret;
2348 } else {
2349 ATH_MSG_VERBOSE("TrigGlobalEfficiencyCorrectionTool (dilepton trigger) configured for systematic var. " << systConfig.name() );
2350 }
2351 }
2352 if (!m_trigGlobalEffCorrTool_multiLep.empty()) {
2353 StatusCode ret = m_trigGlobalEffCorrTool_multiLep->applySystematicVariation(systConfig);
2354 for(auto &sfop : m_elecTrigEffTools){
2355 StatusCode ret1 = sfop->applySystematicVariation(systConfig);
2356 if (ret1 != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure m_elecTrigEffTools (multilep trigger) for systematic var. " << systConfig.name() ); return ret1; }
2357 }
2358 for(auto &sfop : m_elecTrigSFTools){
2359 StatusCode ret1 = sfop->applySystematicVariation(systConfig);
2360 if (ret1 != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure m_elecTrigSFTools (multilep trigger) for systematic var. " << systConfig.name() ); return ret1; }
2361 }
2362 for(auto &sfop : m_muonTrigSFTools){
2363 StatusCode ret1 = sfop->applySystematicVariation(systConfig);
2364 if (ret1 != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure m_muonTrigSFTools (multilep trigger) for systematic var. " << systConfig.name() ); return ret1; }
2365 }
2366 if (ret != StatusCode::SUCCESS) {
2367 ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (multi-lepton trigger) for systematic var. " << systConfig.name() );
2368 return ret;
2369 } else {
2370 ATH_MSG_VERBOSE("TrigGlobalEfficiencyCorrectionTool (multi-lepton trigger) configured for systematic var. " << systConfig.name() );
2371 }
2372 }
2373 if (!m_elecEfficiencySFTool_iso.empty()) {
2374 StatusCode ret = m_elecEfficiencySFTool_iso->applySystematicVariation(systConfig);
2375 if (ret != StatusCode::SUCCESS) {
2376 ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (iso) for systematic var. " << systConfig.name() );
2377 return ret;
2378 } else {
2379 ATH_MSG_VERBOSE("AsgElectronEfficiencyCorrectionTool (iso) configured for systematic var. " << systConfig.name() );
2380 }
2381 }
2382 if (!m_elecEfficiencySFTool_isoHighPt.empty()) {
2383 StatusCode ret = m_elecEfficiencySFTool_isoHighPt->applySystematicVariation(systConfig);
2384 if (ret != StatusCode::SUCCESS) {
2385 ATH_MSG_ERROR("Cannot configure AsgElectronEfficiencyCorrectionTool (iso high-pt) for systematic var. " << systConfig.name() );
2386 return ret;
2387 } else {
2388 ATH_MSG_VERBOSE("AsgElectronEfficiencyCorrectionTool (iso high-pt) configured for systematic var. " << systConfig.name() );
2389 }
2390 }
2391 if (!m_elecChargeEffCorrTool.empty()) {
2392 StatusCode ret = m_elecChargeEffCorrTool->applySystematicVariation(systConfig);
2393 if (ret != StatusCode::SUCCESS) {
2394 ATH_MSG_ERROR("Cannot configure ElectronChargeEffCorrectionTool for systematic var. " << systConfig.name() );
2395 return ret;
2396 } else {
2397 ATH_MSG_VERBOSE("ElectronChargeEffCorrectionTool configured for systematic var. " << systConfig.name() );
2398 }
2399 }
2400 if (!isData() && !m_photonEfficiencySFTool.empty()) {
2401 StatusCode ret = m_photonEfficiencySFTool->applySystematicVariation(systConfig);
2402 if (ret != StatusCode::SUCCESS) {
2403 ATH_MSG_ERROR("Cannot configure AsgPhotonEfficiencyCorrectionTool (reco) for systematic var. " << systConfig.name() );
2404 return ret;
2405 } else {
2406 ATH_MSG_VERBOSE("AsgPhotonEfficiencyCorrectionTool (reco) configured for systematic var. " << systConfig.name() );
2407 }
2408 }
2409 if (!isData() && !m_photonIsolationSFTool.empty()) {
2410 StatusCode ret = m_photonIsolationSFTool->applySystematicVariation(systConfig);
2411 if (ret != StatusCode::SUCCESS) {
2412 ATH_MSG_ERROR("Cannot configure AsgPhotonEfficiencyCorrectionTool (iso) for systematic var. " << systConfig.name() );
2413 return ret;
2414 } else {
2415 ATH_MSG_VERBOSE("AsgPhotonEfficiencyCorrectionTool configured (iso) for systematic var. " << systConfig.name() );
2416 }
2417 }
2418 if (!isData() && !m_photonTriggerSFTool.empty()) {
2419 StatusCode ret = m_photonTriggerSFTool->applySystematicVariation(systConfig);
2420 if (ret != StatusCode::SUCCESS) {
2421 ATH_MSG_ERROR("Cannot configure AsgPhotonEfficiencyCorrectionTool (trigger) for systematic var. " << systConfig.name() );
2422 return ret;
2423 } else {
2424 ATH_MSG_VERBOSE("AsgPhotonEfficiencyCorrectionTool configured (trigger) for systematic var. " << systConfig.name() );
2425 }
2426 }
2427 if (!m_trigGlobalEffCorrTool_diPhoton.empty()) {
2428 StatusCode ret = m_trigGlobalEffCorrTool_diPhoton->applySystematicVariation(systConfig);
2429 for(auto &sfop : m_photonTrigEffTools){
2430 StatusCode ret1 = sfop->applySystematicVariation(systConfig);
2431 if (ret1 != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure m_photonTrigEffTools (diphoton trigger) for systematic var. " << systConfig.name() ); return ret1; }
2432 }
2433 for(auto &sfop : m_photonTrigSFTools){
2434 StatusCode ret1 = sfop->applySystematicVariation(systConfig);
2435 if (ret1 != StatusCode::SUCCESS) { ATH_MSG_ERROR("Cannot configure m_photonTrigSFTools (diphoton trigger) for systematic var. " << systConfig.name() ); return ret1; }
2436 }
2437 if (ret != StatusCode::SUCCESS) {
2438 ATH_MSG_ERROR("Cannot configure TrigGlobalEfficiencyCorrectionTool (diphoton trigger) for systematic var. " << systConfig.name() );
2439 return ret;
2440 } else {
2441 ATH_MSG_VERBOSE("TrigGlobalEfficiencyCorrectionTool (diphoton trigger) configured for systematic var. " << systConfig.name() );
2442 }
2443 }
2444 if (!m_egammaCalibTool.empty()) {
2445 StatusCode ret = m_egammaCalibTool->applySystematicVariation(systConfig);
2446 if (ret != StatusCode::SUCCESS) {
2447 ATH_MSG_ERROR("Cannot configure EgammaCalibrationAndSmearingTool for systematic var. " << systConfig.name() );
2448 return ret;
2449 } else {
2450 ATH_MSG_VERBOSE("EgammaCalibrationAndSmearingTool configured for systematic var. " << systConfig.name() );
2451 }
2452 }
2453 if (!m_isoCorrTool.empty()) {
2454 StatusCode ret = m_isoCorrTool->applySystematicVariation(systConfig);
2455 if (ret != StatusCode::SUCCESS) {
2456 ATH_MSG_ERROR("Cannot configure IsolationCorrectionTool for systematic var. " << systConfig.name() );
2457 return ret;
2458 } else {
2459 ATH_MSG_VERBOSE("IsolationCorrectionTool configured for systematic var. " << systConfig.name() );
2460 }
2461 }
2462 if (!m_btagEffTool.empty()) {
2463 //if ( systConfig.size() > 0 && m_btagEffTool->isAffectedBySystematic(*systConfig.begin()) ) {
2464 StatusCode ret = m_btagEffTool->applySystematicVariation(systConfig);
2465 if ( ret != StatusCode::SUCCESS) {
2466 ATH_MSG_ERROR("Cannot configure xAODBTaggingEfficiency for systematic var. " << systConfig.name() );
2467 return ret;
2468 } else {
2469 ATH_MSG_VERBOSE("Configured xAODBTaggingEfficiency for systematic var. " << systConfig.name() );
2470 }
2471 //}
2472 }
2473 if (!m_btagEffTool_trkJet.empty()) {
2474 StatusCode ret = m_btagEffTool_trkJet->applySystematicVariation(systConfig);
2475 if ( ret != StatusCode::SUCCESS) {
2476 ATH_MSG_ERROR("Cannot configure xAODBTaggingEfficiency (track jets) for systematic var. " << systConfig.name() );
2477 return ret;
2478 } else {
2479 ATH_MSG_VERBOSE("Configured xAODBTaggingEfficiency (track jets) for systematic var. " << systConfig.name() );
2480 }
2481 }
2482 if (!m_tauSmearingTool.empty()) {
2483 StatusCode ret = m_tauSmearingTool->applySystematicVariation(systConfig);
2484 if ( ret != StatusCode::SUCCESS) {
2485 ATH_MSG_ERROR("Cannot configure TauSmearingTool for systematic var. " << systConfig.name() );
2486 return ret;
2487 } else {
2488 ATH_MSG_VERBOSE("Configured TauSmearingTool for systematic var. " << systConfig.name() );
2489 }
2490 }
2491 if (!m_tauEffTool.empty()) {
2492 StatusCode ret = m_tauEffTool->applySystematicVariation(systConfig);
2493 if ( ret != StatusCode::SUCCESS) {
2494 ATH_MSG_ERROR("Cannot configure TauEfficiencyCorrectionsTool for systematic var. " << systConfig.name() );
2495 return ret;
2496 } else {
2497 ATH_MSG_VERBOSE("Configured TauEfficiencyCorrectionsTool for systematic var. " << systConfig.name() );
2498 }
2499 }
2500 for(auto &tool : m_tauTrigEffTool) {
2501 StatusCode ret = tool->applySystematicVariation(systConfig);
2502 if (ret != StatusCode::SUCCESS) {
2503 ATH_MSG_ERROR("Cannot configure " << tool->name() << " for systematic var. " << systConfig.name() );
2504 return ret;
2505 } else {
2506 ATH_MSG_VERBOSE("Configured " << tool->name() << " for systematic var. " << systConfig.name() );
2507 }
2508 }
2509 if (!m_metSystTool.empty()) {
2510 StatusCode ret = m_metSystTool->applySystematicVariation(systConfig);
2511 if ( ret != StatusCode::SUCCESS) {
2512 ATH_MSG_ERROR("Cannot configure METSystematicsTool for systematic var. " << systConfig.name() );
2513 return ret;
2514 } else {
2515 ATH_MSG_VERBOSE("Configured METSystematicsTool for systematic var. " << systConfig.name() );
2516 }
2517 }
2518 if (!m_prwTool.empty()) {
2519 StatusCode ret = m_prwTool->applySystematicVariation(systConfig);
2520 if ( ret != StatusCode::SUCCESS) {
2521 ATH_MSG_ERROR("Cannot configure PileupReweightingTool for systematic var. " << systConfig.name() );
2522 return ret;
2523 } else {
2524 ATH_MSG_VERBOSE("Configured PileupReweightingTool for systematic var. " << systConfig.name() );
2525 }
2526 }
2527
2528 if (!m_LRTuncTool.empty()) {
2529 StatusCode ret = m_LRTuncTool->applySystematicVariation(systConfig);
2530 if ( ret != StatusCode::SUCCESS) {
2531 ATH_MSG_ERROR("Cannot configure InDetTrackFilterTool for systematic var. " << systConfig.name() );
2532 return ret;
2533 } else {
2534 ATH_MSG_VERBOSE("Configured InDetTrackFilterTool for systematic var. " << systConfig.name() );
2535 }
2536 }
2537
2538 return StatusCode::SUCCESS;
2539}
2540
2541std::vector<ST::SystInfo> SUSYObjDef_xAOD::getSystInfoList() const {
2542 if (!m_tool_init) {
2543 ATH_MSG_ERROR("SUSYTools was not initialized!!");
2544 return vector<ST::SystInfo>();
2545 }
2546
2547 ATH_MSG_INFO("Extracting systematics info list");
2548
2549 // Now we can look at systematics:
2551 const CP::SystematicSet& recommendedSystematics = registry.recommendedSystematics();
2552
2553 vector<SystInfo> sysInfoList;
2554 sysInfoList.reserve(recommendedSystematics.size() * 2); // allow for continuous systematics
2555
2556 // this is the nominal set
2557 SystInfo infodef;
2558 infodef.affectsKinematics = false;
2559 infodef.affectsWeights = false;
2560 infodef.affectsType = Unknown;
2561 infodef.affectedWeights.clear();
2562 sysInfoList.push_back(infodef);
2563
2564
2565 // add all recommended systematics
2566 for (const auto& systSet : CP::make_systematics_vector(recommendedSystematics)) {
2567 for (const auto& sys : systSet) {
2568 sysInfoList.push_back(getSystInfo(sys));
2569 }
2570 }
2571
2572 ATH_MSG_INFO("Returning list of " << sysInfoList.size() << " systematic variations");
2573 return sysInfoList;
2574}
2575
2577
2578 SystInfo sysInfo;
2579 sysInfo.affectsKinematics = false;
2580 sysInfo.affectsWeights = false;
2581 sysInfo.affectedWeights.clear();
2582 sysInfo.systset.insert(sys);
2583
2584 if (!m_jetNNJvtEfficiencyTool.empty()) {
2585 if ( m_jetNNJvtEfficiencyTool->isAffectedBySystematic( sys ) ) {
2586 sysInfo.affectsWeights = true;
2587 sysInfo.affectsType = SystObjType::Jet;
2588 sysInfo.affectedWeights.insert(ST::Weights::Jet::JVT);
2589 }
2590 }
2591
2592 if (!m_jetfJvtEfficiencyTool.empty()) {
2593 if ( m_jetfJvtEfficiencyTool->isAffectedBySystematic( sys ) ) {
2594 sysInfo.affectsWeights = true;
2595 sysInfo.affectsType = SystObjType::Jet;
2596 sysInfo.affectedWeights.insert(ST::Weights::Jet::FJVT);
2597 }
2598 }
2599
2600 if (!m_jetUncertaintiesTool.empty()) {
2601 if ( m_jetUncertaintiesTool->isAffectedBySystematic( sys ) ) {
2602 sysInfo.affectsKinematics = true;
2603 sysInfo.affectsType = SystObjType::Jet;
2604 }
2605 }
2606 if (!m_jetUncertaintiesPDSmearTool.empty()) {
2607 if ( m_jetUncertaintiesPDSmearTool->isAffectedBySystematic( sys ) ) {
2608 sysInfo.affectsKinematics = true;
2609 sysInfo.affectsType = SystObjType::Jet;
2610 }
2611 }
2612
2613 if (!m_fatjetUncertaintiesTool.empty()) {
2614 if ( m_fatjetUncertaintiesTool->isAffectedBySystematic( sys ) ) {
2615 sysInfo.affectsKinematics = true;
2616 sysInfo.affectsType = SystObjType::Jet;
2617 }
2618 }
2619 if (!m_fatjetUncertaintiesPDSmearTool.empty()) {
2620 if ( m_fatjetUncertaintiesPDSmearTool->isAffectedBySystematic( sys ) ) {
2621 sysInfo.affectsKinematics = true;
2622 sysInfo.affectsType = SystObjType::Jet;
2623 }
2624 }
2625
2626 if (!m_fatjetFFSmearingTool.empty()) {
2627 CP::SystematicSet dummy;
2628 dummy.insert(sys);
2629 if ( std::find(m_fatjetFFSmearingSyst.begin(), m_fatjetFFSmearingSyst.end(), dummy) != m_fatjetFFSmearingSyst.end() ) {
2630 sysInfo.affectsKinematics = true;
2631 sysInfo.affectsType = SystObjType::Jet;
2632 }
2633 }
2634
2635 if (!m_WTagjetUncertaintiesTool.empty()) {
2636 if ( m_WTagjetUncertaintiesTool->isAffectedBySystematic( CP::SystematicVariation(sys.basename(), CP::SystematicVariation::CONTINUOUS) ) ) {
2637 sysInfo.affectsKinematics = true;
2638 sysInfo.affectsType = SystObjType::Jet;
2639 }
2640 }
2641 if (!m_ZTagjetUncertaintiesTool.empty()) {
2642 if ( m_ZTagjetUncertaintiesTool->isAffectedBySystematic( CP::SystematicVariation(sys.basename(), CP::SystematicVariation::CONTINUOUS) ) ) {
2643 sysInfo.affectsKinematics = true;
2644 sysInfo.affectsType = SystObjType::Jet;
2645 }
2646 }
2647 if (!m_TopTagjetUncertaintiesTool.empty()) {
2648 if ( m_TopTagjetUncertaintiesTool->isAffectedBySystematic( CP::SystematicVariation(sys.basename(), CP::SystematicVariation::CONTINUOUS) ) ) {
2649 sysInfo.affectsKinematics = true;
2650 sysInfo.affectsType = SystObjType::Jet;
2651 }
2652 }
2653
2654 if (!m_muonCalibTool.empty()) {
2655 if ( m_muonCalibTool->isAffectedBySystematic(sys) ) {
2656 sysInfo.affectsKinematics = true;
2658 }
2659 }
2661 if ( m_elecEfficiencySFTool_trig_singleLep->isAffectedBySystematic(sys) ) {
2662 sysInfo.affectsWeights = true;
2664 sysInfo.affectedWeights.insert(ST::Weights::Electron::Trigger);
2665 }
2666 }
2668 if ( m_elecEfficiencySFTool_trigEff_singleLep->isAffectedBySystematic(sys) ) {
2669 sysInfo.affectsWeights = true;
2671 sysInfo.affectedWeights.insert(ST::Weights::Electron::Trigger);
2672 }
2673 }
2674 if (!m_muonEfficiencySFTool.empty()) {
2675 if ( m_muonEfficiencySFTool->isAffectedBySystematic(sys) ) {
2676 sysInfo.affectsWeights = true;
2678 sysInfo.affectedWeights.insert(ST::Weights::Muon::Reconstruction);
2679 }
2680 }
2681 if (!m_muonEfficiencyBMHighPtSFTool.empty()) {
2682 if ( m_muonEfficiencyBMHighPtSFTool->isAffectedBySystematic(sys) ) {
2683 sysInfo.affectsWeights = true;
2685 sysInfo.affectedWeights.insert(ST::Weights::Muon::Reconstruction);
2686 }
2687 }
2688 if (!m_muonTTVAEfficiencySFTool.empty()) {
2689 if ( m_muonTTVAEfficiencySFTool->isAffectedBySystematic(sys) ) {
2690 sysInfo.affectsWeights = true;
2692 sysInfo.affectedWeights.insert(ST::Weights::Muon::Reconstruction);
2693 }
2694 }
2695 if (!m_muonIsolationSFTool.empty()) {
2696 if ( m_muonIsolationSFTool->isAffectedBySystematic(sys) ) {
2697 sysInfo.affectsWeights = true;
2699 sysInfo.affectedWeights.insert(ST::Weights::Muon::Isolation);
2700 }
2701 }
2702 if (!m_muonTriggerSFTool.empty()) {
2703 if ( m_muonTriggerSFTool->isAffectedBySystematic(sys) ) {
2704 sysInfo.affectsWeights = true;
2706 sysInfo.affectedWeights.insert(ST::Weights::Muon::Trigger);
2707 }
2708 }
2709 if (!m_elecEfficiencySFTool_reco.empty()) {
2710 if ( m_elecEfficiencySFTool_reco->isAffectedBySystematic(sys) ) {
2711 sysInfo.affectsWeights = true;
2713 sysInfo.affectedWeights.insert(ST::Weights::Electron::Reconstruction);
2714 }
2715 }
2716 if (!m_elecEfficiencySFTool_id.empty()) {
2717 if ( m_elecEfficiencySFTool_id->isAffectedBySystematic(sys) ) {
2718 sysInfo.affectsWeights = true;
2720 sysInfo.affectedWeights.insert(ST::Weights::Electron::ID);
2721 }
2722 }
2723 if (!m_trigGlobalEffCorrTool_diLep.empty()) {
2724 if ( m_trigGlobalEffCorrTool_diLep->isAffectedBySystematic(sys) ) {
2725 sysInfo.affectsWeights = true;
2727 sysInfo.affectedWeights.insert(ST::Weights::Electron::Trigger);
2728 }
2729 }
2730 if (!m_trigGlobalEffCorrTool_multiLep.empty()) {
2731 if ( m_trigGlobalEffCorrTool_multiLep->isAffectedBySystematic(sys) ) {
2732 sysInfo.affectsWeights = true;
2734 sysInfo.affectedWeights.insert(ST::Weights::Electron::Trigger);
2735 }
2736 }
2737 if (!m_elecEfficiencySFTool_iso.empty() ) {
2738 if ( m_elecEfficiencySFTool_iso->isAffectedBySystematic(sys) ) {
2739 sysInfo.affectsWeights = true;
2741 sysInfo.affectedWeights.insert(ST::Weights::Electron::Isolation);
2742 }
2743 }
2744 if (!m_elecEfficiencySFTool_isoHighPt.empty() ) {
2745 if ( m_elecEfficiencySFTool_isoHighPt->isAffectedBySystematic(sys) ) {
2746 sysInfo.affectsWeights = true;
2748 sysInfo.affectedWeights.insert(ST::Weights::Electron::Isolation);
2749 }
2750 }
2751 if (!m_egammaCalibTool.empty()) {
2752 if ( m_egammaCalibTool->isAffectedBySystematic(sys) ) {
2753 sysInfo.affectsKinematics = true;
2754 if (sys.basename().compare(0, 3, "EG_") == 0) {
2756 } else if (sys.basename().compare(0, 3, "PH_") == 0) {
2758 } else if (sys.basename().compare(0, 3, "EL_") == 0) {
2760 }
2761 }
2762 }
2763 if (!isData() && !m_isoCorrTool.empty()) {
2764 if (m_isoCorrTool->isAffectedBySystematic(sys)){
2765 sysInfo.affectsWeights = false;
2766 sysInfo.affectsKinematics = true;
2768 }
2769 }
2770 if (!isData() && !m_photonEfficiencySFTool.empty()) {
2771 if (m_photonEfficiencySFTool->isAffectedBySystematic(CP::SystematicVariation(sys.basename(), CP::SystematicVariation::CONTINUOUS)) ) {
2772 sysInfo.affectsWeights = true;
2774 sysInfo.affectedWeights.insert(ST::Weights::Photon::Reconstruction);
2775 }
2776 }
2777 if (!isData() && !m_photonIsolationSFTool.empty()) {
2778 if (m_photonIsolationSFTool->isAffectedBySystematic(sys)) {
2779 sysInfo.affectsWeights = true;
2781 sysInfo.affectedWeights.insert(ST::Weights::Photon::Isolation);
2782 }
2783 }
2784 if (!isData() && !m_photonTriggerSFTool.empty()) {
2785 if (m_photonTriggerSFTool->isAffectedBySystematic(sys)) {
2786 sysInfo.affectsWeights = true;
2788 sysInfo.affectedWeights.insert(ST::Weights::Photon::Trigger);
2789 }
2790 }
2791 if (!m_trigGlobalEffCorrTool_diPhoton.empty()) {
2792 if ( m_trigGlobalEffCorrTool_diPhoton->isAffectedBySystematic(sys) ) {
2793 sysInfo.affectsWeights = true;
2795 sysInfo.affectedWeights.insert(ST::Weights::Photon::Trigger);
2796 }
2797 }
2798 if ( !m_btagEffTool.empty() ) {
2799 if ( m_btagEffTool->isAffectedBySystematic(sys) ) {
2800 sysInfo.affectsWeights = true;
2802 sysInfo.affectedWeights.insert(ST::Weights::Jet::Btag);
2803 }
2804 }
2805 if ( !m_btagEffTool_trkJet.empty() ) {
2806 if ( m_btagEffTool_trkJet->isAffectedBySystematic(sys) ) {
2807 sysInfo.affectsWeights = true;
2809 sysInfo.affectedWeights.insert(ST::Weights::Jet::Btag_Track);
2810 }
2811 }
2812 if (!m_tauSmearingTool.empty()) {
2813 if ( m_tauSmearingTool->isAffectedBySystematic(sys) ) {
2814 sysInfo.affectsKinematics = true;
2815 sysInfo.affectsType = SystObjType::Tau;
2816 }
2817 }
2818 if (!m_tauEffTool.empty()) {
2819 if ( m_tauEffTool->isAffectedBySystematic(sys) ) {
2820 sysInfo.affectsWeights = true;
2821 sysInfo.affectsType = SystObjType::Tau;
2823 }
2824 }
2825 for(const auto &tool : m_tauTrigEffTool) {
2826 if(tool->isAffectedBySystematic(sys)) {
2827 sysInfo.affectsWeights = true;
2828 sysInfo.affectsType = SystObjType::Tau;
2830 break;
2831 }
2832 }
2833 if (!m_metSystTool.empty()) {
2834 if ( m_metSystTool->isAffectedBySystematic(sys) ) {
2835 sysInfo.affectsKinematics = true;
2836 switch (met::getSystType(sys)) {
2837 case met::SOFTCALO:
2839 break;
2840 case met::SOFTTRK:
2842 break;
2843 case met::JETTRK:
2845 break;
2846 default:
2847 ATH_MSG_ERROR("Unsupported systematic!");
2848 }
2849 }
2850 }
2851 if (!m_prwTool.empty()) {
2852 if ( m_prwTool->isAffectedBySystematic(sys) ) {
2853 sysInfo.affectsWeights = true;
2855 }
2856 }
2857
2858 if (!m_LRTuncTool.empty()){
2859 if ( m_LRTuncTool->isAffectedBySystematic(sys) ) {
2860 sysInfo.affectsKinematics = true;
2862 }
2863 }
2864
2865 std::string affectedType;
2866 switch (sysInfo.affectsType) {
2867 case Unknown : affectedType = "UNKNOWN"; break;
2868 case Jet : affectedType = "JET"; break;
2869 case Egamma : affectedType = "EGAMMA"; break;
2870 case Electron : affectedType = "ELECTRON"; break;
2871 case Photon : affectedType = "PHOTON"; break;
2872 case Muon : affectedType = "MUON"; break;
2873 case Tau : affectedType = "TAU"; break;
2874 case BTag : affectedType = "BTAG"; break;
2875 case MET_TST : affectedType = "MET_TST"; break;
2876 case MET_CST : affectedType = "MET_CST"; break;
2877 case MET_Track : affectedType = "MET_Track"; break;
2878 case EventWeight : affectedType = "EVENT WEIGHT"; break;
2879 case LRT_Object : affectedType = "LRT_OBJECT"; break;
2880 }
2881
2882 ATH_MSG_VERBOSE("Variation " << sys.name() << " affects "
2883 << ( sysInfo.affectsWeights ? "weights " : "" )
2884 << ( sysInfo.affectsKinematics ? "kinematics " : "" )
2885 << "for " << affectedType );
2886
2887 return sysInfo;
2888
2889}
2890
2891
2892// Temporary function for Sherpa 2.2 V+jets n-jets reweighting
2893// (see https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/CentralMC15ProductionList#NEW_Sherpa_v2_2_V_jets_NJet_rewe)
2895
2896 //Retrieve the truth jets
2897 if( evtStore()->contains<xAOD::JetContainer>("AntiKt4TruthWZJets") ){
2898 return getSherpaVjetsNjetsWeight("AntiKt4TruthWZJets");
2899 }
2900 else if( evtStore()->contains<xAOD::JetContainer>("AntiKt4TruthJets")){
2901 return getSherpaVjetsNjetsWeight("AntiKt4TruthJets" );
2902 }
2903 else{
2904 ATH_MSG_WARNING("No TruthJetContainer found! Dummy null weight retrieved.");
2905 }
2906 return 0.;
2907}
2908
2909float SUSYObjDef_xAOD::getSherpaVjetsNjetsWeight(const std::string& jetContainer) const {
2910
2911 if(jetContainer=="AntiKt4TruthWZJets"){
2912 return m_pmgSHnjetWeighterWZ->getWeight();
2913 }
2914 else if (jetContainer=="AntiKt4TruthJets"){
2915 return m_pmgSHnjetWeighter->getWeight();
2916 }
2917 else{
2918 ATH_MSG_WARNING(jetContainer << " is no supported by PMGSherpa22VJetsWeightTool! Please check...");
2919 }
2920 return 1.;
2921
2922}
2923
2924
2926 const xAOD::VertexContainer* vertices = nullptr;
2927 if ( evtStore()->retrieve( vertices, "PrimaryVertices" ).isSuccess() ) {
2928 for ( const auto vx : *vertices ) {
2929 if (vx->vertexType() == xAOD::VxType::PriVtx) {
2930 ATH_MSG_DEBUG("PrimaryVertex found with z=" << vx->z());
2931 return vx;
2932 }
2933 }
2934 } else {
2935 ATH_MSG_WARNING("Failed to retrieve VertexContainer \"PrimaryVertices\", returning nullptr");
2936 }
2937 return nullptr;
2938}
2939
2940
2942 const xAOD::JetContainer *jets, const xAOD::PhotonContainer* gamma,
2943 const xAOD::TauJetContainer* taujet, const xAOD::JetContainer* fatjets)
2944{
2945
2946 if (this->GetPrimVtx() == nullptr) {
2947 ATH_MSG_WARNING( "Will now call the OR tool on an event without a primary vertex, and it will likely crash. Please require a PV earlier in your analysis code!");
2948 }
2949
2950 ATH_CHECK( m_orToolbox.masterTool->removeOverlaps(electrons, muons, jets, taujet, gamma, fatjets) );
2951
2952 /*
2953 // Count number of objects after overlap removal
2954 int Nel = 0;
2955 for (const auto& el : *electrons) {
2956 if (dec_passOR( *el )) Nel++;
2957 }
2958
2959 int Nmu = 0;
2960 for (const auto& mu : *muons) {
2961 if (dec_passOR( *mu )) Nmu++;
2962 }
2963
2964 int Njet = 0;
2965 for (const auto& jet : *jets) {
2966 if (dec_passOR( *jet )) Njet++;
2967 }
2968
2969 ATH_MSG_VERBOSE( "After overlap removal: Nel=" << Nel << ", Nmu=" << Nmu << ", Njet=" << Njet );
2970 */
2971
2972 return StatusCode::SUCCESS;
2973}
2974
2975
2977 // This getCloseByIsoCorrection is computationally less expensive and actually corrects the isoaltion
2978 // variables from the contribution of the close by leptons
2979 if (m_isoCloseByTool->getCloseByIsoCorrection(Gaudi::Hive::currentContext(), electrons,muons) != CP::CorrectionCode::Ok) {
2980 return StatusCode::FAILURE;
2981 }
2982 // All done, all good :-)
2983 return StatusCode::SUCCESS;
2984}
2985
2987 const xAOD::EventInfo* evtInfo = nullptr;
2988 if ( evtStore()->retrieve( evtInfo, "EventInfo" ).isFailure() ) {
2989 throw std::runtime_error("Unable to fetch EventInfo.");
2990 }
2991 return evtInfo;
2992}
2993
2995
2996 const xAOD::EventInfo* evtInfo = GetEventInfo();
2997 float pu_weight = m_prwTool->getCombinedWeight(*evtInfo);
2998
2999 if(!isfinite(pu_weight)) pu_weight = 1.;
3000
3001 return pu_weight;
3002}
3003
3004float SUSYObjDef_xAOD::GetPileupWeightPrescaledTrigger(const std::string & trigger_expr) {
3005 /* This requires the setup of the PRW tool using your own prescaled lumicalc
3006 files with syntax "HLT_PrescaledTriggerA.lumicalc.root:HLT_PrescaledTriggerA".
3007 For further informations, please refer to:
3008 https://twiki.cern.ch/twiki/bin/view/AtlasProtected/ExtendedPileupReweighting#Prescaling%20MC
3009 */
3010
3011 const xAOD::EventInfo* evtInfo = GetEventInfo();
3012 float pu_weight = m_prwTool->getCombinedWeight(*evtInfo,trigger_expr);
3013
3014 if(!isfinite(pu_weight)) pu_weight = 1.;
3015
3016 return pu_weight;
3017}
3018
3020 const xAOD::EventInfo* evtInfo = GetEventInfo();
3021 return m_prwTool->getPRWHash( *evtInfo );
3022}
3023
3024float SUSYObjDef_xAOD::GetDataWeight(const std::string& trig) {
3025 const xAOD::EventInfo* evtInfo = GetEventInfo();
3026 return m_prwTool->getDataWeight( *evtInfo, trig );
3027}
3028
3030 const xAOD::EventInfo* evtInfo = GetEventInfo();
3031 return m_prwTool->getCorrectedAverageInteractionsPerCrossing( *evtInfo, includeDataSF );
3032}
3033
3035 const xAOD::EventInfo* evtInfo = GetEventInfo();
3036 return m_prwTool->getCorrectedActualInteractionsPerCrossing( *evtInfo, includeDataSF );
3037}
3038
3040 return m_prwTool->GetSumOfEventWeights(channel);
3041}
3042
3043unsigned int SUSYObjDef_xAOD::GetRandomRunNumber(bool muDependentRRN) {
3044
3045 const xAOD::EventInfo* evtInfo = GetEventInfo();
3046 if (randomrunnumber.isAvailable(*(evtInfo)) && muDependentRRN) {
3047 return randomrunnumber(*(evtInfo));
3048 }
3049 else if (!muDependentRRN) {
3050 return m_prwTool->getRandomRunNumber( *evtInfo, muDependentRRN );
3051 }
3052 ATH_MSG_ERROR ( "Failed to find RandomRunNumber decoration! You need to call ApplyPRWTool() beforehand!" );
3053 return 0;
3054}
3055
3056
3057StatusCode SUSYObjDef_xAOD::ApplyPRWTool(bool muDependentRRN) {
3058
3059 const xAOD::EventInfo* evtInfo = GetEventInfo();
3060 if(!randomrunnumber.isAvailable(*evtInfo))
3061 ATH_CHECK( m_prwTool->apply( *evtInfo, muDependentRRN ) );
3062 return StatusCode::SUCCESS;
3063}
3064
3065unsigned int SUSYObjDef_xAOD::GetRunNumber() const {
3066
3067 const xAOD::EventInfo* evtInfo = GetEventInfo();
3068
3069 // For data, we can just directly use the run number
3070 if (isData()) { return evtInfo->runNumber(); }
3071
3072 // else it's MC as we need the RRN assigned by the PRW tool
3073 if (!randomrunnumber.isAvailable(*(evtInfo))) {
3074 ATH_MSG_ERROR ( "Failed to find RandomRunNumber decoration! You need to call ApplyPRWTool() beforehand!" );
3075 }
3076 return randomrunnumber(*(evtInfo));
3077
3078}
3079
3080
3083
3084 if ( !tracks.isValid() ) {
3085 throw std::runtime_error("Unable to fetch LargeD0 tracks.");
3086 }
3087
3088 //const xAOD::TrackParticleContainer out = *tracks;
3089
3090 return *tracks;
3091}
3092
3095
3096 if ( !tracks.isValid() ) {
3097 throw std::runtime_error("Unable to fetch LargeD0 GSF tracks.");
3098 }
3099 return *tracks;
3100}
3101
3103
3104 // Don't apply variations for data
3105 if (isData()) return StatusCode::SUCCESS;
3106
3107 const EventContext& ctx = Gaudi::Hive::currentContext();
3108
3109 // Loop over tracks and call LRT uncertainty tool
3110 ATH_MSG_DEBUG ( "Applying LRT filter tool decorations for uncertainty");
3112 for(const auto trk: inTracks) dec_lrtFilter(*trk) = m_LRTuncTool->accept(trk);
3113
3114 // Loop over GSF LRT tracks and call uncertainty tool
3116 for(const auto trk: inGSFTracks) dec_lrtFilter(*trk) = m_LRTuncTool->accept(trk);
3117
3118 return StatusCode::SUCCESS;
3119}
3120
3121
3122int SUSYObjDef_xAOD::treatAsYear(const int runNumber) const {
3123 // Use the run number we are passed if we are passed one, otherwise
3124 // use the run number from the GetRunNumber function
3125 int theRunNumber = runNumber>0?runNumber:GetRunNumber();
3126 if (theRunNumber<290000) return 2015;
3127 else if (theRunNumber<320000) return 2016;
3128 else if (theRunNumber<342000) return 2017;
3129 else if (theRunNumber<400000) return 2018;
3130 else if (theRunNumber<445000) return 2022;
3131 else if (theRunNumber<465000) return 2023;
3132 return 2024;
3133}
3134
3136
3137#ifdef XAOD_STANDALONE
3138 // remove all tools from the asg::ToolStore (and delete them)
3139 // so that they don't get re-used if we set up another SUSYTools
3140 // instance, e.g. when processing two datasets in one EventLoop
3141 // job
3142 if (!m_trigDecTool.empty()){
3143 if (asg::ToolStore::contains<Trig::TrigDecisionTool>("ToolSvc.TrigDecisionTool") ){
3144 // Ignore both of these so that we are safe if others have cleaned up
3145 m_trigDecTool->finalize().ignore();
3146 asg::ToolStore::remove("ToolSvc.TrigDecisionTool").ignore();
3147 }
3148 }
3149#endif
3150}
3151
3152
3153}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
#define x
static std::string retrieveMetadata(const std::string &folder, const std::string &key, const ServiceHandle< StoreGateSvc > &inputMetaStore)
method that always returns as a string you can use from, e.g, pyROOT with evt = ROOT....
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
@ Ok
The correction was done successfully.
This module implements the central registry for handling systematic uncertainties with CP tools.
const SystematicSet & recommendedSystematics() const
returns: the recommended set of systematics
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
Class to wrap a set of SystematicVariations.
std::string name() const
returns: the systematics joined into a single string.
void insert(const SystematicVariation &systematic)
description: insert a systematic into the set
size_t size() const
returns: size of the set
virtual bool isValid() override final
Can the handle be successfully dereferenced?
asg::AnaToolHandle< TauAnalysisTools::ITauSelectionTool > m_tauSelToolBaseline
std::vector< std::string > m_v_trigs24_cache_singleEle
std::string m_defaultTrackJets
std::vector< std::string > m_v_trigs23_cache_singleLep
std::vector< std::string > m_ph_id_support
bool m_metRemoveOverlappingCaloTaggedMuons
std::string m_BtagWP_trkJet
bool isAtlfast() const override final
std::string m_tauConfigPath
asg::AnaToolHandle< IWeightTool > m_pmgSHnjetWeighter
std::string m_JetTruthLabelName
void getTauConfig(const std::string &tauConfigPath, std::vector< float > &pT_window, std::vector< float > &eta_window, bool &eleOLR, bool &muVeto, bool &muOLR) const
std::map< std::string, std::string > m_conf_to_prop
asg::AnaToolHandle< ICPJetUncertaintiesTool > m_WTagjetUncertaintiesTool
asg::AnaToolHandle< CP::IElectronLRTOverlapRemovalTool > m_elecLRTORTool
std::vector< std::string > m_mu_iso_support
std::vector< std::string > m_el_id_support
asg::AnaToolHandle< Trig::TrigDecisionTool > m_trigDecTool
asg::AnaToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
std::string m_trig2017combination_singleLep
asg::AnaToolHandle< IWeightTool > m_pmgSHnjetWeighterWZ
std::string m_prwActualMu2018File
asg::AnaToolHandle< ICPJetUncertaintiesTool > m_ZTagjetUncertaintiesTool
std::string m_autoconfigPRWPath
std::string m_trig2017combination_diPhoton
std::string m_trig2018combination_singleLep
StatusCode ApplyLRTUncertainty() override final
std::string m_trig2016combination_multiLep
std::string m_photonIdBaseline
asg::AnaToolHandle< IJetCalibrationTool > m_jetFatCalibTool
std::string m_trig2016combination_diPhoton
asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_trigGlobalEffCorrTool_multiLep
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoBaselineTool
std::vector< std::string > m_v_trigs18_cache_multiLep
asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > m_elecEfficiencySFTool_isoHighPt
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencySFTool
std::string m_prwActualMu2022File
asg::AnaToolHandle< CP::IPileupReweightingTool > m_prwTool
std::string m_EG_corrFNList
asg::AnaToolHandle< TauAnalysisTools::ITauSelectionTool > m_tauSelTool
asg::AnaToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesPDSmearTool
std::string m_autoconfigPRWRtags
std::string m_trig2024combination_singleLep
asg::AnaToolHandle< IAsgElectronLikelihoodTool > m_elecSelLikelihood
double m_orBoostedElectronMaxConeSize
ST::SystInfo getSystInfo(const CP::SystematicVariation &sys) const override final
std::vector< std::string > m_v_trigs15_cache_singleEle
ToolHandleArray< CP::IMuonTriggerScaleFactors > m_muonTrigSFTools
std::vector< std::string > m_prwLcalcFiles
std::string m_metsysConfigPrefix
StatusCode OverlapRemoval(const xAOD::ElectronContainer *electrons, const xAOD::MuonContainer *muons, const xAOD::JetContainer *jets, const xAOD::PhotonContainer *gamma=nullptr, const xAOD::TauJetContainer *taujet=nullptr, const xAOD::JetContainer *fatjets=nullptr) override final
bool check_isTighter(const std::string &wp1, const std::string &wp, const std::vector< std::string > &list) const
asg::AnaToolHandle< TauAnalysisTools::ITauEfficiencyCorrectionsTool > m_tauEffTool
void setDataSource(int source)
std::string m_trig2016combination_singleLep
std::string m_trigMatchingPrefix
Use composite trigger matching tool if matching was done upstream.
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoHighPtTool
std::string m_commonPRWFileMC20d
std::map< std::string, bool > m_slices
asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_trigGlobalEffCorrTool_diPhoton
asg::AnaToolHandle< IAsgElectronLikelihoodTool > m_elecSelLikelihoodBaseline
std::string m_commonPRWFileMC23c
bool isWeight(const CP::SystematicSet &systSet) const
bool isVariation(const CP::SystematicSet &syst) const
asg::AnaToolHandle< IAsgPhotonIsEMSelector > m_photonSelIsEM
bool isData() const override final
SG::ConstAccessor< char > m_acc_photonId
asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > m_elecEfficiencySFTool_id
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonTTVAEfficiencySFTool
std::string m_ZTagUncConfig
StatusCode NearbyLeptonCorrections(xAOD::ElectronContainer *electrons=nullptr, xAOD::MuonContainer *muons=nullptr) const override final
asg::AnaToolHandle< ICPJetCorrectionTool > m_fatjetFFSmearingTool
std::string m_eleEffMapFilePath
std::string m_WZTaggerCalibArea
unsigned int GetRunNumber() const override final
std::string m_trig2015combination_singleLep
std::string m_EigenvectorReductionB
asg::AnaToolHandle< IMETSignificance > m_metSignif
asg::AnaToolHandle< CP::IIsolationSelectionTool > m_isoTool
asg::AnaToolHandle< CP::IJvtEfficiencyTool > m_jetfJvtEfficiencyTool
void GetTriggerTokens(std::string, std::vector< std::string > &, std::vector< std::string > &, std::vector< std::string > &, std::vector< std::string > &, std::vector< std::string > &, std::vector< std::string > &, std::vector< std::string > &) const
Definition Trigger.cxx:338
SG::ConstAccessor< char > m_acc_eleId
std::string m_prwActualMu2024File
std::vector< std::string > m_v_trigs22_cache_diLep
std::string m_metJetSelection
float GetPileupWeightPrescaledTrigger(const std::string &trigger_expr) override final
SG::WriteHandleKey< xAOD::MuonContainer > m_outMuonLocation
std::vector< std::string > m_el_iso_support
std::string m_trig2017combination_multiLep
std::string m_jetUncertaintiesConfig
Prefix for trigger matchiing container name.
asg::AnaToolHandle< Trig::IMatchingTool > m_trigMatchingTool
std::string m_photonBaselineIso_WP
asg::AnaToolHandle< IAsgElectronLikelihoodTool > m_elecChargeIDSelectorTool
SG::WriteHandleKey< xAOD::ElectronContainer > m_outElectronLocation
StatusCode ApplyPRWTool(bool muDependentRRN=true) override final
double GetSumOfWeights(int channel) override final
std::string m_BtagSystStrategy
ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > m_elecTrigEffTools
ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > m_elecTrigSFTools
std::string EG_WP(const std::string &wp) const
StatusCode applySystematicVariation(const CP::SystematicSet &systConfig) override final
std::string m_defaultTruthJets
std::string m_commonPRWFileMC20e
asg::AnaToolHandle< JetPileupLabelingTool > m_jetPileupLabelingTool
std::string m_trig2023combination_singleLep
asg::AnaToolHandle< CP::IMuonLRTOverlapRemovalTool > m_muonLRTORTool
std::vector< std::string > m_v_trigs23_cache_singleEle
SUSYObjDef_xAOD(const std::string &name)
SG::ConstAccessor< char > m_acc_photonIdBaseline
asg::AnaToolHandle< JSSWTopTaggerDNN > m_TopTaggerTool
const CP::SystematicSet & currentSystematic() const
asg::AnaToolHandle< CP::IMuonTriggerScaleFactors > m_muonTriggerSFTool
std::string m_jetUncertaintiesCalibArea
float GetCorrectedActualInteractionsPerCrossing(bool includeDataSF=false) override final
std::vector< std::string > m_tau_id_support
std::string m_tauEffToolRecommendationTag
std::string m_muBaselineIso_WP
std::vector< std::string > m_v_trigs18_cache_singleEle
int treatAsYear(const int runNumber=-1) const override final
std::vector< std::string > m_v_trigs17_cache_multiLep
unsigned int GetRandomRunNumber(bool muDependentRRN=true) override final
std::vector< std::string > m_v_trigs22_cache_singleLep
std::string m_TopTaggerCalibArea
std::vector< std::string > GetTriggerOR(const std::string &trigExpr) const
Definition Trigger.cxx:320
std::string m_trig2015combination_diLep
asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > m_elecEfficiencySFTool_trigEff_singleLep
std::string m_photonTriggerName
asg::AnaToolHandle< IAsgSelectionTool > m_jetNNJvtSelectionTool
float GetPileupWeight() override final
asg::AnaToolHandle< SmoothedWZTagger > m_ZTaggerTool
asg::AnaToolHandle< JetPileupTag::JetVertexNNTagger > m_jetNNJvtMomentTool
std::string m_fJvtConfigRun3
std::vector< std::string > m_v_trigs15_cache_multiLep
std::string m_eleIdBaseline
std::map< std::string, std::string > m_el_iso_fallback
CP::SystematicSet m_currentSyst
StatusCode initialize() override final
Dummy implementation of the initialisation function.
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonEfficiencyBMHighPtSFTool
asg::AnaToolHandle< ORUtils::IOverlapTool > m_tauJetORtool
std::vector< std::string > m_v_trigs17_cache_diLep
std::string m_jetCleanDFName
float GetCorrectedAverageInteractionsPerCrossing(bool includeDataSF=false) override final
std::string m_commonPRWFileMC23d
std::string m_muIsoHighPt_WP
std::vector< std::string > m_v_trigs18_cache_singleLep
CP::SystematicSet m_defaultSyst
std::string m_jesConfigJMSData
std::string m_commonPRWFileMC23e
asg::AnaToolHandle< CP::IMuonCalibrationAndSmearingTool > m_muonCalibTool
std::string m_fJvtConfigRun2
std::vector< std::string > m_v_trigs15_cache_diLep
std::string m_photonIdBaselineDFName
asg::AnaToolHandle< JetVertexTaggerTool > m_jetJvtMomentTool
ULong64_t GetPileupWeightHash() override final
asg::AnaToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesTool
std::string m_tauSmearingToolRecommendationTag
asg::AnaToolHandle< IEGammaAmbiguityTool > m_egammaAmbiguityTool
std::vector< std::string > m_v_trigs22_cache_multiLep
asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > m_elecChargeEffCorrTool
StatusCode validConfig(bool strict=false) const
asg::AnaToolHandle< TrigConf::ITrigConfigTool > m_trigConfTool
std::string m_WTagUncConfig
asg::AnaToolHandle< CP::IIsolationCloseByCorrectionTool > m_isoCloseByTool
std::string m_jesCalibSeqJMS
std::string m_tauIdBaseline
std::string m_eleIsoHighPt_WP
bool check_isOption(const std::string &wp, const std::vector< std::string > &list) const
asg::AnaToolHandle< IMETMaker > m_metMaker
asg::AnaToolHandle< Trig::IMatchScoringTool > m_trigDRScoringTool
StatusCode resetSystematics() override final
asg::AnaToolHandle< IAsgPhotonEfficiencyCorrectionTool > m_photonIsolationSFTool
bool m_orDoTau
Overlap removal options.
StatusCode readConfig() override final
std::string m_trig2016combination_diLep
std::vector< std::string > m_v_trigs24_cache_singleLep
std::string m_JvtConfigRun2
asg::AnaToolHandle< ICPJetUncertaintiesTool > m_fatjetUncertaintiesTool
bool isNominal(const CP::SystematicSet &syst) const
std::vector< std::string > m_v_trigs18_cache_diLep
asg::AnaToolHandle< CP::IIsolationCorrectionTool > m_isoCorrTool
ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > m_photonTrigSFTools
std::vector< ST::SystInfo > getSystInfoList() const override final
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_GSFLRTCollectionName
std::string m_eleConfigBaseline
std::string m_trig2022combination_singleLep
asg::AnaToolHandle< IMETSystematicsTool > m_metSystTool
std::set< std::string > m_bool_prop_set
asg::AnaToolHandle< CP::IMuonSelectionTool > m_muonSelectionHighPtTool
std::string m_EigenvectorReductionLight
asg::AnaToolHandle< IAsgSelectionTool > m_jetfJvtSelectionTool
bool currentSystematicIsVariation() const
std::string m_trig2018combination_diPhoton
asg::AnaToolHandle< IJetSelector > m_jetCleaningTool
const xAOD::TrackParticleContainer & GetInDetLargeD0GSFTracks(const EventContext &ctx) const override final
asg::AnaToolHandle< IBTaggingSelectionTool > m_btagSelTool_trkJet
asg::AnaToolHandle< InDet::IInclusiveTrackFilterTool > m_LRTuncTool
std::vector< std::string > getElSFkeys(const std::string &mapFile) const
std::vector< std::string > m_v_trigs16_cache_multiLep
asg::AnaToolHandle< CP::IJvtEfficiencyTool > m_jetNNJvtEfficiencyTool
float GetDataWeight(const std::string &) override final
std::string m_commonPRWFileMC20a
std::string m_trig2022combination_diLep
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonHighPtIsolationSFTool
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_LRTCollectionName
std::string m_tauSmearingToolGenerator
asg::AnaToolHandle< TauAnalysisTools::ITauSmearingTool > m_tauSmearingTool
SG::ConstAccessor< char > m_acc_eleIdBaseline
std::string m_trig2018combination_diLep
std::string m_trig2017combination_diLep
asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > m_trigGlobalEffCorrTool_diLep
const std::vector< std::string > split(const std::string &s, const std::string &delim) const
asg::AnaToolHandle< IBTaggingEfficiencyTool > m_btagEffTool_trkJet
std::string m_prwActualMu2017File
std::vector< std::string > m_v_trigs22_cache_singleEle
std::vector< std::string > m_prwConfFiles
asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > m_elecEfficiencySFTool_reco
Combined muon collection.
std::string m_jesConfigAFII
const xAOD::Vertex * GetPrimVtx() const override final
asg::AnaToolHandle< ICPJetUncertaintiesTool > m_TopTagjetUncertaintiesTool
std::vector< CP::SystematicSet > m_fatjetFFSmearingSyst
std::vector< std::string > m_v_trigs17_cache_singleEle
asg::AnaToolHandle< IBTaggingEfficiencyTool > m_btagEffTool
StatusCode SUSYToolsInit()
float getSherpaVjetsNjetsWeight() const override final
std::vector< std::string > m_v_trigs16_cache_singleLep
asg::AnaToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_tauTruthMatch
std::vector< std::string > m_v_trigs16_cache_singleEle
asg::AnaToolHandle< IBTaggingSelectionTool > m_btagSelTool_OR
std::string m_commonPRWFileMC21a
std::string m_muTriggerSFCalibRelease
std::string m_tauConfigPathBaseline
std::vector< std::string > m_v_trigs16_cache_diLep
std::map< std::string, std::string > m_mu_iso_fallback
std::string m_jetUncertaintiesAnalysisFile
std::string m_BtagKeyOverride
asg::AnaToolHandle< IAsgPhotonIsEMSelector > m_photonSelIsEMBaseline
bool currentSystematicIsNominal() const
std::string m_eleIdBaselineDFName
std::string m_jetUncertaintiesMCType
std::string m_inputMETSuffix
std::vector< asg::AnaToolHandle< TauAnalysisTools::ITauEfficiencyCorrectionsTool > > m_tauTrigEffTool
asg::AnaToolHandle< IBTaggingSelectionTool > m_btagSelTool
SG::ConstAccessor< char > m_acc_jetClean
ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > m_photonTrigEffTools
asg::AnaToolHandle< IAsgPhotonEfficiencyCorrectionTool > m_photonTriggerSFTool
std::string m_EigenvectorReductionC
std::string m_fatJetUncConfig
ORUtils::ToolBox m_orToolbox
std::string m_TopTagUncConfig
asg::AnaToolHandle< Trig::IMatchScoringTool > m_trigMatchScoringTool
asg::AnaToolHandle< CP::IMuonSelectionTool > m_muonSelectionToolBaseline
std::string m_trig2022combination_multiLep
std::string m_muTriggerSFCalibFilename
asg::AnaToolHandle< CP::IEgammaCalibrationAndSmearingTool > m_egammaCalibTool
Combined electron collection.
std::string m_IsoCloseByORpassLabel
const xAOD::TrackParticleContainer & GetInDetLargeD0Tracks(const EventContext &ctx) const override final
StatusCode autoconfigurePileupRWTool(const std::string &PRWfilesDir="dev/PileupReweighting/share/", const std::string &PRWfileName="", bool usePathResolver=true, bool RPVLLmode=false, bool Combinedmode=false, const std::string &HFFilter="")
std::string m_trig2015combination_multiLep
std::string m_trig2022combination_diPhoton
void configFromFile(bool &property, const std::string &propname, TEnv &rEnv, bool defaultValue)
std::string m_prwActualMu2023File
asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > m_elecEfficiencySFTool_trig_singleLep
asg::AnaToolHandle< JetTruthLabelingTool > m_jetTruthLabelingTool
asg::AnaToolHandle< ICPJetUncertaintiesTool > m_fatjetUncertaintiesPDSmearTool
std::string m_autoconfigPRWFile
StatusCode setBoolProperty(const std::string &name, const bool &property) override final
std::string m_bTaggingCalibrationFilePath
asg::AnaToolHandle< IAsgElectronEfficiencyCorrectionTool > m_elecEfficiencySFTool_iso
asg::AnaToolHandle< SmoothedWZTagger > m_WTaggerTool
std::string m_commonPRWFileMC23a
asg::AnaToolHandle< IJetCalibrationTool > m_jetCalibTool
std::string m_photonIdDFName
bool currentSystematicIsWeight() const
std::string m_eleBaselineIso_WP
std::vector< std::string > m_v_trigs15_cache_singleLep
std::string m_fatJetUncVars
std::string m_electronTriggerSFStringSingle
std::string getDefaultJetUncConfig()
std::string m_trig2015combination_diPhoton
asg::AnaToolHandle< CP::IMuonEfficiencyScaleFactors > m_muonIsolationSFTool
const xAOD::EventInfo * GetEventInfo() const override final
std::vector< std::string > m_v_trigs17_cache_singleLep
std::string m_jesConfigFatData
std::string TrigSingleLep() const override final
std::string m_BtagTagger_trkJet
std::string m_trig2018combination_multiLep
asg::AnaToolHandle< IAsgPhotonEfficiencyCorrectionTool > m_photonEfficiencySFTool
std::string m_JvtConfigRun3
std::string m_jesCalibSeqFat
AsgMetadataTool(const std::string &name)
Normal ASG tool constructor with a name.
MetaStorePtr_t inputMetaStore() const
Accessor for the input metadata store.
static bool contains(const std::string &name)
Check whether a tool with a given type and name is known in the store.
Definition ToolStore.h:51
static StatusCode remove(const IAsgTool *tool)
Remove the specified tool from the store.
Definition ToolStore.cxx:77
uint32_t runNumber() const
The current event's run number.
uint32_t mcChannelNumber() const
The MC generator's channel number.
@ mcProcID
Same as mc_channel_number [float].
@ dataType
Data type that's in the file [string].
@ amiTag
AMI tag used to process the file the last time [string].
@ simFlavour
Fast or Full sim [string].
bool value(MetaDataType type, std::string &val) const
Get a pre-defined string value out of the object.
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
std::vector< CP::SystematicSet > make_systematics_vector(const SystematicSet &systematics)
utility functions for working with systematics
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
static const unsigned int Reconstruction
static const unsigned int Trigger
static const SG::Decorator< char > dec_lrtFilter("passLRTFilter")
static const SG::ConstAccessor< unsigned int > randomrunnumber("RandomRunNumber")
SystType getSystType(const CP::SystematicVariation &systematic)
STL namespace.
const std::string & typeName(Type id)
@ PriVtx
Primary vertex.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Jet_v1 Jet
Definition of the current "jet version".
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
@ Unknown
Track fitter not defined.
setRawEt setRawPhi int
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Photon_v1 Photon
Definition of the current "egamma version".
setBGCode setTAP setLVL2ErrorBits bool
FileMetaData_v1 FileMetaData
Declare the latest version of the class.
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
Electron_v1 Electron
Definition of the current "egamma version".
std::set< unsigned int > affectedWeights
unsigned int affectsType
CP::SystematicSet systset