ATLAS Offline Software
TopJetMETCPTools.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3  */
4 
6 
7 #include <map>
8 #include <string>
9 
10 // Top includes
12 #include "TopEvent/EventTools.h"
13 
14 // PathResolver include(s):
16 
17 // Jet include(s):
28 
29 
30 // MET include(s):
31 #include "METUtilities/METMaker.h"
35 
36 namespace top {
37  JetMETCPTools::JetMETCPTools(const std::string& name) :
38  asg::AsgTool(name),
39 
40  m_jetJVT_ConfigFile("JVTlikelihood_20140805.root"),
41 
42  // EMTopo (calibration configs for R21 only)
43  m_jetAntiKt4_Data_ConfigFile("JES_MC16Recommendation_Consolidated_EMTopo_Apr2019_Rel21.config"),
44  m_jetAntiKt4_Data_CalibSequence("JetArea_Residual_EtaJES_GSC_Insitu"),
45 
46  m_jetAntiKt4_MCFS_ConfigFile("JES_MC16Recommendation_Consolidated_EMTopo_Apr2019_Rel21.config"),
47  m_jetAntiKt4_MCFS_CalibSequence("JetArea_Residual_EtaJES_GSC_Smear"),
48 
49  m_jetAntiKt4_Data_JMS_ConfigFile("JES_JMS_MC16Recommendation_Consolidated_data_only_EMTopo_Sep2019_Rel21.config"),
50  m_jetAntiKt4_Data_JMS_CalibSequence("JetArea_Residual_EtaJES_GSC_JMS_Insitu"),
51 
52  m_jetAntiKt4_MCFS_JMS_ConfigFile("JES_JMS_MC16Recommendation_Consolidated_MC_only_EMTopo_July2019_Rel21.config"),
53  m_jetAntiKt4_MCFS_JMS_CalibSequence("JetArea_Residual_EtaJES_GSC_Smear_JMS"),
54 
55  m_jetAntiKt4_MCAFII_ConfigFile("JES_MC16Recommendation_AFII_EMTopo_Apr2019_Rel21.config"),
56  m_jetAntiKt4_MCAFII_CalibSequence("JetArea_Residual_EtaJES_GSC_Smear"),
57 
58  // PFlow (some calibration configs are updated to R22)
59  // No R22 AF3 calibs yet
60  m_jetAntiKt4_MCAFII_PFlow_ConfigFile("JES_MC16Recommendation_AFII_PFlow_Apr2019_Rel21.config"),
61  m_jetAntiKt4_MCAFII_PFlow_CalibSequence("JetArea_Residual_EtaJES_GSC_Smear"),
62 
63  // Phase-1 pre-recs for R22 Data & Fullsim
64  m_jetAntiKt4_Data_PFlow_ConfigFile("PreRec_R22_PFlow_ResPU_EtaJES_GSC_February23_230215.config"),
65  m_jetAntiKt4_Data_PFlow_CalibSequence("JetArea_Residual_EtaJES_GSC_Insitu"),
66 
67  m_jetAntiKt4_PFlow_MCFS_ConfigFile("PreRec_R22_PFlow_ResPU_EtaJES_GSC_February23_230215.config"),
68  m_jetAntiKt4_PFlow_MCFS_CalibSequence("JetArea_Residual_EtaJES_GSC"),
69 
70  // No JMS recommendations for R22 yet
71  m_jetAntiKt4_Data_PFlow_JMS_ConfigFile("JES_JMS_MC16Recommendation_Consolidated_data_only_PFlow_July2019_Rel21.config"),
72  m_jetAntiKt4_Data_PFlow_JMS_CalibSequence("JetArea_Residual_EtaJES_GSC_JMS_Insitu"),
73 
74  m_jetAntiKt4_PFlow_MCFS_JMS_ConfigFile("JES_JMS_MC16Recommendation_Consolidated_MC_only_PFlow_July2019_Rel21.config"),
75  m_jetAntiKt4_PFlow_MCFS_JMS_CalibSequence("JetArea_Residual_EtaJES_GSC_Smear_JMS") {
76  declareProperty("config", m_config);
77 
78  declareProperty("JetCalibrationTool", m_jetCalibrationTool);
79  declareProperty("JetCalibrationToolLargeR", m_jetCalibrationToolLargeR);
80 
81  declareProperty("JetUncertaintiesToolLargeR", m_jetUncertaintiesToolLargeR);
82  declareProperty("JetUncertaintiesToolLargeRPseudoData", m_jetUncertaintiesToolLargeRPseudoData);
83 
84  declareProperty("JetUncertaintiesTool", m_jetUncertaintiesTool);
85  declareProperty("JetUncertaintiesToolPseudoData", m_jetUncertaintiesToolPseudoData);
86  declareProperty("FFJetSmearingTool", m_FFJetSmearingTool);
87  declareProperty("JetUncertaintiesToolReducedNPScenario1", m_jetUncertaintiesToolReducedNPScenario1);
88  declareProperty("JetUncertaintiesToolReducedNPScenario2", m_jetUncertaintiesToolReducedNPScenario2);
89  declareProperty("JetUncertaintiesToolReducedNPScenario3", m_jetUncertaintiesToolReducedNPScenario3);
90  declareProperty("JetUncertaintiesToolReducedNPScenario4", m_jetUncertaintiesToolReducedNPScenario4);
91 
92  declareProperty("JetCleaningToolLooseBad", m_jetCleaningToolLooseBad);
93  declareProperty("JetCleaningToolTightBad", m_jetCleaningToolTightBad);
94 
95  declareProperty("JetEventCleaningToolLooseBad", m_jetEventCleaningToolLooseBad);
96  declareProperty("JetEventCleaningToolTightBad", m_jetEventCleaningToolTightBad);
97 
98  declareProperty("JetUpdateJvtTool", m_jetUpdateJvtTool);
99  declareProperty("JetSelectfJvtTool", m_jetSelectfJvtTool);
100  declareProperty("TruthJetCollectionForHSTagging", m_truthJetCollForHS = "AntiKt4TruthDressedWZJets");
101 
102  declareProperty("JES_data2016_data2015_Recommendation_Dec2016.config", m_jetAntiKt4_MCFS_ConfigFile);
103  declareProperty("JetCalibrationSequenceFS", m_jetAntiKt4_MCFS_CalibSequence);
104 
105  declareProperty("JES_MC15cRecommendation_PFlow_Aug2016.config", m_jetAntiKt4_PFlow_MCFS_ConfigFile);
106  declareProperty("JetArea_Residual_EtaJES_GSC", m_jetAntiKt4_PFlow_MCFS_CalibSequence);
107 
108  declareProperty("met_maker", m_met_maker);
109  declareProperty("met_systematics", m_met_systematics);
110  declareProperty("metSignif", m_metSignif);
111  }
112 
114  ATH_MSG_INFO("top::JetMETCPTools initialize...");
115  if (m_config->isTruthDxAOD()) {
116  ATH_MSG_INFO("top::JetMETCPTools: no need to initialise anything on truth DxAOD");
117  return StatusCode::SUCCESS;
118  }
119 
120  if (m_config->useJets()) {
121  if (m_config->makeAllCPTools()) {// skiping calibrations on mini-xAODs
122  top::check(setupJetsCalibration(), "Failed to setup jet calibration tools");
123  }
124  // JVT tool needed for both MC and data (for both selection and SFs)
125  top::check(setupJetsScaleFactors(), "Failed to setup jet scale-factor tools");
126  }
127 
128  if (m_config->useLargeRJets()) top::check(setupLargeRJetsCalibration(), "Failed to setup large-R jet calibration");
129 
130  if (m_config->makeAllCPTools()) {// MET not needed on mini-xAODs
131  top::check(setupMET(), "Failed to setup MET tools");
132  }
133 
134  return StatusCode::SUCCESS;
135  }
136 
138  // R21 specific
139  // https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JetEtmissRecommendationsR21
140  // https://twiki.cern.ch/twiki/bin/view/AtlasProtected/ApplyJetCalibrationR21
141 
142  // For R22 (currently only fullsim & data without JMS)
143  // https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JetEtmissRecommendationsR22
144  // https://twiki.cern.ch/twiki/bin/view/AtlasProtected/ApplyJetCalibrationR22
145 
146  // Get jet calibration name and erase "Jets" from the end
147  const std::string caloJets_type = m_config->sgKeyJets();
148  std::string jetCalibrationName;
149  if (caloJets_type == "AntiKt4EMTopoNoElJets") {
150  jetCalibrationName = "AntiKt4EMTopoJets";
151  } else {
152  jetCalibrationName = caloJets_type;
153  }
154  jetCalibrationName.erase(jetCalibrationName.length() - 4);
155 
157  if (asg::ToolStore::contains<IJetCalibrationTool>("JetCalibrationTool")) {
158  m_jetCalibrationTool = asg::ToolStore::get<IJetCalibrationTool>("JetCalibrationTool");
159  } else {
160  std::string calibConfig, calibSequence;
161  if (m_config->isMC()) { // MC calibration and sequence
162  if (m_config->isAFII()) { // AFII calibrations, if supported
163  if (m_config->jetCalibSequence() == "JMS") {
164  if (m_config->allowSmallRJMSforAFII()) {
165  ATH_MSG_WARNING("You enabled support for JMS calibration on AFII samples for small-R jets! NOTE that if you want to use this in an analysis, you must get back to JetEtMiss to demonstrate that AFII use is justifiable in your analysis.");
166  } else {
167  ATH_MSG_ERROR("The JMS calibration for small-R jets is not supported for AFII samples! If you want to use this in an analysis, you must get back to JetEtMiss to demonstrate that AFII use is justifiable in your analysis. Set config option AllowJMSforAFII to True if you insist on running JMS on AFII.");
168  return StatusCode::FAILURE;
169  }
170  }
171  if (m_config->useParticleFlowJets()) {
174  } else {
175  calibConfig = m_jetAntiKt4_MCAFII_ConfigFile;
176  calibSequence = m_jetAntiKt4_MCAFII_CalibSequence;
177  }
178  } else { // FullSim calibrations
179  if (m_config->jetCalibSequence() == "JMS") {
180  if (m_config->useParticleFlowJets()) { // PFlow
183  } else { // EMTopo
184  calibConfig = m_jetAntiKt4_MCFS_JMS_ConfigFile;
185  calibSequence = m_jetAntiKt4_MCFS_JMS_CalibSequence;
186  }
187  } else { // GSC, no JMS calibration, fullsim
188  if (m_config->useParticleFlowJets()) { // PFlow
191  } else { // EMTopo
192  calibConfig = m_jetAntiKt4_MCFS_ConfigFile;
193  calibSequence = m_jetAntiKt4_MCFS_CalibSequence;
194  }
195  }
196  }
197  } else { // data calibration config & sequence
198  if (m_config->jetCalibSequence() == "JMS") {
199  if (m_config->useParticleFlowJets()) {
202  } else {
203  calibConfig = m_jetAntiKt4_Data_JMS_ConfigFile;
204  calibSequence = m_jetAntiKt4_Data_JMS_CalibSequence;
205  }
206  } else { // GSC, no JMS calibration, data
207  if (m_config->useParticleFlowJets()) {
210  } else {
211  calibConfig = m_jetAntiKt4_Data_ConfigFile;
212  calibSequence = m_jetAntiKt4_Data_CalibSequence;
213  }
214  }
215  }
216 
217  // Print out some information
218  ATH_MSG_INFO("Configuration JES tools with ");
219  ATH_MSG_INFO("JES Calibration Configuration : " << calibConfig);
220  ATH_MSG_INFO("JES Calibration Sequence : " << calibSequence);
221 
222  JetCalibrationTool* jetCalibrationTool = new JetCalibrationTool("JetCalibrationTool");
223  top::check(asg::setProperty(jetCalibrationTool, "JetCollection", jetCalibrationName),
224  "Failed to set JetCollection " + jetCalibrationName);
225  top::check(asg::setProperty(jetCalibrationTool, "ConfigFile", calibConfig),
226  "Failed to set ConfigFile " + calibConfig);
227  top::check(asg::setProperty(jetCalibrationTool, "CalibSequence", calibSequence),
228  "Failed to set CalibSequence " + calibSequence);
229  top::check(asg::setProperty(jetCalibrationTool, "IsData", !m_config->isMC()),
230  "Failed to set IsData " + std::to_string (!m_config->isMC()));
231 
232  top::check(jetCalibrationTool->initialize(),
233  "Failed to initialize JetCalibrationTool");
234  m_jetCalibrationTool = jetCalibrationTool;
235  }
236 
238  // We don't need this for normal JVT, since the recalculation can be performed directly in JetJvtEfficiency there
239  // Only setup fJVT tool if user actually wants it
240  if (m_config->doForwardJVTinMET() || m_config->getfJVTWP() != "None") {
241  // Currently, fJVT does not work correctly in R22, so this failure will be placed here temporarily
242  ATH_MSG_ERROR("fJVT and fJVT in MET does not yet work in R22!");
243  return StatusCode::FAILURE;
244 
245  const std::string fjvt_tool_name = "JetSelectfJvtTool";
246  if (asg::ToolStore::contains<IJetModifier>(fjvt_tool_name)) {
247  m_jetSelectfJvtTool = asg::ToolStore::get<IJetModifier>(fjvt_tool_name);
248  } else {
249  IJetModifier* JetSelectfJvtTool = new JetForwardJvtTool(fjvt_tool_name);
250  top::check(asg::setProperty(JetSelectfJvtTool, "JvtMomentName", "NNJvt"), // fJVT uses JVT decision
251  "Failed to set JvtMomentName for JetForwardJvtTool");
252 
253  // Default fJVT WP is medium but this can't be used with default Tight MET WP
254  // MET WP takes precedence so making ATop default fJVT=Tight
255  if (m_config->getfJVTWP() != "Medium"){
256  top::check(asg::setProperty(JetSelectfJvtTool, "UseTightOP", true),
257  "Failed to set UseTightOP for JetForwardJvtTool");
258  }
259  top::check(asg::setProperty(JetSelectfJvtTool, "JetContainer", m_config->sgKeyJets()),
260  "Failed to set JetContainer for JetForwardJvtTool");
261  top::check(asg::setProperty(JetSelectfJvtTool, "OutputDec", "AnalysisTop_fJVTdecision"), //Adds custom decorator, 'AnalysisTop_fJVTdecision', to all jets
262  "Failed to set OutputDec for JetForwardJvtTool");
263 
264  top::check(JetSelectfJvtTool->initialize(), "Failed to initialize " + fjvt_tool_name);
265  m_jetSelectfJvtTool = JetSelectfJvtTool;
266  }
267  }
268 
272 
275 
276  // Uncertainties
277  // Is our MC MC20 (for Run 2), MC21 (for Run 3), AFII, or AF3?
278  std::string MC_type = "";
279  if (!m_config->isRun3() && !m_config->isAFII()) {
280  MC_type = "MC20";
281  } else if (!m_config->isRun3()) {
282  MC_type = "AFII";
283  } else if (!m_config->isAFII()) {
284  MC_type = "MC21";
285  } else {
286  // No AF3 support yet, so quit in this case
287  ATH_MSG_ERROR("No recommendations for fastsim in Run 3 yet!");
288  return StatusCode::FAILURE;
289  }
290 
291  // Moriond2018 - AF2 JES
292  // Summer2019 - JES/JER update
293  // Summer2021 - JMS-options
294  // Winter2023_PreRec - R22 Phase-1 JES/JER pre-recs
295  // Summer2023_PreRec - R22 Phase-1 JES/JER pre-recs improved after GSC and energy-per-layer bugfixes
296  std::string conference = "Summer2023_PreRec";
297 
298  // By setting calib_area to "None" we pick up the default from the JES group
299  std::string calib_area = "None";
300 
301  // JER string option configuration
302  const bool JERisPseudoData = (m_config->jetJERSmearingModel() == "Full_PseudoData") || (m_config->jetJERSmearingModel() == "All_PseudoData");
303  std::string JERSmearModel = m_config->jetJERSmearingModel();
304  std::string JMSOption = m_config->jetJMSOption();
305  bool jmsR21Override = false; // In case some JMS option is specified, we revert to R21 recommendations
306  // This flags helps in suppressing additional R22-specific warnings below
307 
308  if (JMSOption != "None") {
309  // Updated files using the JMS option are in Spring2021 - Switching and letting the user know
310  ATH_MSG_WARNING("JMS not yet available for R22 pre-recs - Moving to Spring2021 R21 recommendations!");
311  jmsR21Override = true;
312  conference = "Spring2021";
313 
314  if (JMSOption == "JMS_frozen") JMSOption = "_JMS_frozen";
315  else if (JMSOption == "JMS_scaled") JMSOption = "_JMS_scaled";
316  else {
317  ATH_MSG_ERROR("Incorrect JMS option: None, JMS_frozen, JMS_scaled");
318  return StatusCode::FAILURE;
319  }
320  }
321  else JMSOption = ""; // Default JMSOption
322  // Any PseudoData Option (Smear MC as data)
323  if (JERSmearModel == "Full_PseudoData") {
324  JERSmearModel = "Full";
325  ATH_MSG_INFO("JER PseudoData option provided - Treating MC as if it is data for JER uncertainty");
326  }
327  if (JERSmearModel == "All_PseudoData") {
328  JERSmearModel = "All";
329  ATH_MSG_INFO("JER PseudoData option provided - Treating MC as if it is data for JER uncertainty");
330  }
331 
332  // Throw out a warning if we are using the FTAG-calib only NP-Model
333  if (m_config->jetUncertainties_NPModel() == "SR_Scenario1"
334  && JERSmearModel == "Simple"
335  && !jmsR21Override) {
337  "\n **********************************************************************************"
338  "\n * NP-Model 'SR_Scenario1' is ONLY supposed to be used for FTAG calibration work! *"
339  "\n * Please choose another model if you are conducting an analysis! *"
340  "\n **********************************************************************************"
341  );
342  }
343  // Check if we have necessary configs already for R22 for users to have an easy time debugging
344  else if ((!(m_config->jetUncertainties_NPModel() == "CategoryReduction") || !(JERSmearModel == "Full"))
345  && !jmsR21Override) {
347  "Incorrect JES/JER config: In R22 phase-1, only NP-Model \"CategoryReduction\" with some type of \"Full\""
348  " JER-smearing is supported for analyses! Your choices might lead to a crash unless you have installed custom"
349  " options!"
350  );
351  }
352 
353  // Strings need to be defined clearly for jet tool
354  if (JERSmearModel == "All") JERSmearModel = "_AllJERNP";
355  else if (JERSmearModel == "Full") JERSmearModel = "_FullJER";
356  else if (JERSmearModel == "Simple") JERSmearModel = "_SimpleJER";
357  else {
358  ATH_MSG_ERROR("Incorrect JER option: All, All_PseudoData, Full, Full_PseudoData, Simple");
359  return StatusCode::FAILURE;
360  }
361 
362  // Are we doing multiple JES for the reduced NP senarios?
363  if (!m_config->doMultipleJES()) {
364  m_jetUncertaintiesTool = setupJetUncertaintiesTool("JetUncertaintiesTool",
365  jetCalibrationName,
366  MC_type,
367  m_config->isMC(),
368  "rel22/" + conference
369  + "/R4_" + m_config->jetUncertainties_NPModel()
370  + JERSmearModel
371  + JMSOption
372  + ".config",
373  nullptr,
374  m_config->jetUncertainties_QGFracFile(),
375  calib_area
376  );
377  // setup the pseudodata tool when required
378  if (JERisPseudoData) {
379  m_jetUncertaintiesToolPseudoData = setupJetUncertaintiesTool("JetUncertaintiesToolPseudoData",
380  jetCalibrationName,
381  MC_type,
382  false, // treat MC as data
383  "rel22/" + conference
384  + "/R4_" + m_config->jetUncertainties_NPModel()
385  + JERSmearModel
386  + JMSOption
387  + ".config",
388  nullptr,
389  m_config->jetUncertainties_QGFracFile(),
390  calib_area
391  );
392 
393  }
394 
395  } else {
396  // Strong reductions now enabled. If you want to run a single scenario please note the new config file names
397  // R4_SR_Scenario*_SimpleJER
399  = setupJetUncertaintiesTool("JetUncertaintiesToolReducedNPScenario1",
400  jetCalibrationName,
401  MC_type,
402  m_config->isMC(),
403  "rel21/"
404  + conference
405  + "/R4_SR_Scenario1_SimpleJER"
406  + JMSOption
407  + ".config",
408  nullptr,
409  m_config->jetUncertainties_QGFracFile(),
410  calib_area);
412  = setupJetUncertaintiesTool("JetUncertaintiesToolReducedNPScenario2",
413  jetCalibrationName,
414  MC_type,
415  m_config->isMC(),
416  "rel21/"
417  + conference
418  + "/R4_SR_Scenario2_SimpleJER"
419  + JMSOption
420  + ".config",
421  nullptr,
422  m_config->jetUncertainties_QGFracFile(),
423  calib_area);
425  = setupJetUncertaintiesTool("JetUncertaintiesToolReducedNPScenario3",
426  jetCalibrationName,
427  MC_type,
428  m_config->isMC(),
429  "rel21/"
430  + conference
431  + "/R4_SR_Scenario3_SimpleJER"
432  + JMSOption
433  + ".config",
434  nullptr,
435  m_config->jetUncertainties_QGFracFile(),
436  calib_area);
438  = setupJetUncertaintiesTool("JetUncertaintiesToolReducedNPScenario4",
439  jetCalibrationName,
440  MC_type,
441  m_config->isMC(),
442  "rel21/"
443  + conference
444  + "/R4_SR_Scenario4_SimpleJER"
445  + JMSOption
446  + ".config",
447  nullptr,
448  m_config->jetUncertainties_QGFracFile(),
449  calib_area);
450  }
451 
452  return StatusCode::SUCCESS;
453  }
454 
456  std::string jetCalibrationNameLargeR = m_config->sgKeyLargeRJets();
457  jetCalibrationNameLargeR.erase(jetCalibrationNameLargeR.length() - 4); // erase "Jets" from the end
458 
459  // Only a single calib config/sequence for MC and data
460  // so just put it here for now.
461  std::string calibConfigLargeR = "";
462  std::string calibSequenceLargeR = "EtaJES_JMS"; // CalibSequence for MC (changed below for data)
463  const std::string calibAreaLargeR = "00-04-82";
464  const std::string calibChoice = m_config->largeRJESJMSConfig();
465 
466  if (asg::ToolStore::contains<IJetCalibrationTool>("JetCalibrationToolLargeR")) {
467  m_jetCalibrationToolLargeR = asg::ToolStore::get<IJetCalibrationTool>("JetCalibrationToolLargeR");
468  } else {
469  // First check that we have a valid calibChoice
470  // !!! Please also update the options in ConfigurationSettings.cxx 'LargeJetJESJMSConfig' if more are added !!!
471  if (calibChoice != "UFOSDMass") {
473  "Unknown largeRJESJMSConfig (Available options: UFOSDMass)) : " + calibChoice);
474  return StatusCode::FAILURE;
475  }
476 
477  if (m_config->isMC()) { // Currently the same for both data and MC (but not always from R21 experience...)
478  if (calibChoice == "UFOSDMass") {
479  calibConfigLargeR = "JES_MC20PreRecommendation_R10_UFO_CSSK_SoftDrop_JMS_R21Insitu_10Mar2023.config";
480  }
481  } else { // In-situ calibration for Data
482  if (calibChoice == "UFOSDMass") {
483  calibConfigLargeR = "JES_MC20PreRecommendation_R10_UFO_CSSK_SoftDrop_JMS_R21Insitu_10Mar2023.config";
484  }
485  }
486 
487  if (!m_config->isMC()) {
488  if (calibChoice == "UFOSDMass") {
489  calibSequenceLargeR = "EtaJES_JMS_Insitu";
490  }
491  }
492 
493  JetCalibrationTool* jetCalibrationToolLargeR
494  = new JetCalibrationTool("JetCalibrationToolLargeR");
495  top::check(asg::setProperty(jetCalibrationToolLargeR, "JetCollection", jetCalibrationNameLargeR),
496  "Failed to set JetCollection " + jetCalibrationNameLargeR);
497  top::check(asg::setProperty(jetCalibrationToolLargeR, "ConfigFile", calibConfigLargeR),
498  "Failed to set ConfigFile " + calibConfigLargeR);
499  top::check(asg::setProperty(jetCalibrationToolLargeR, "CalibSequence", calibSequenceLargeR),
500  "Failed to set CalibSequence " + calibSequenceLargeR);
501  top::check(asg::setProperty(jetCalibrationToolLargeR, "CalibArea", calibAreaLargeR),
502  "Failed to set CalibArea " + calibAreaLargeR);
503  top::check(asg::setProperty(jetCalibrationToolLargeR, "IsData", !m_config->isMC()),
504  "Failed to set IsData " + std::to_string (!m_config->isMC()));
505  top::check(jetCalibrationToolLargeR->initialize(),
506  "Failed to initialize JetCalibrationToolLargeR");
507  m_jetCalibrationToolLargeR = jetCalibrationToolLargeR;
508  }
509 
510  std::string configDir("");
511  std::string largeRJESJERJMS_unc_config = m_config->largeRJetUncertainties_NPModel();
512  std::string largeRJMR_unc_config = m_config->largeRJetUncertainties_JMR_NPModel();
513  std::string calibArea = "None"; // Take the default JetUncertainties CalibArea tag
514  std::string MC_type = "MC20";
515 
516  // If we are in Run 3, we should use MC21 instead...
517  if (m_config->isRun3()) MC_type = "MC21";
518 
519  configDir = m_config->largeRJetUncertaintiesConfigDir();
520 
521  // Comment out uncertainties tool setup until we have large-R uncertainty prescriptions
522  ATH_MSG_WARNING("No large-R jet uncertainty prescriptions are available yet!");
523 
524  // m_jetUncertaintiesToolLargeR
525  // = setupJetUncertaintiesTool("JetUncertaintiesToolLargeR",
526  // jetCalibrationNameLargeR,
527  // MC_type,
528  // m_config->isMC(),
529  // configDir + "/R10_" + largeRJESJERJMS_unc_config + ".config",
530  // nullptr,
531  // "",
532  // calibArea);
533  //
534  // // setup the large-R pseudodata tool when required
535  // if (m_config->isMC() && m_config->doLargeRPseudodataJER()) {
536  // m_jetUncertaintiesToolLargeRPseudoData
537  // = setupJetUncertaintiesTool("JetUncertaintiesToolLargeRPseudoData",
538  // jetCalibrationNameLargeR,
539  // MC_type,
540  // false, // treat MC as data
541  // configDir + "/R10_" + largeRJESJERJMS_unc_config + ".config",
542  // nullptr,
543  // "",
544  // calibArea);
545  // }
546  //
547  // if (!m_config->isSystNominal(m_config->systematics()))
548  // m_FFJetSmearingTool = setupFFJetSmearingTool(calibChoice,configDir + "/R10_" + largeRJMR_unc_config + ".config");
549 
550  return StatusCode::SUCCESS;
551  }
552 
553  ICPJetCorrectionTool * JetMETCPTools::setupFFJetSmearingTool(const std::string& mass_def, const std::string& config) {
554  // <cgarner@physics.utoronto.ca> Added Apr. 13th, 2021
555  // Function to setup FFJetSmearingTool needed for consolidated JMR uncertainties
556 
557  const std::string ff_tool_name = "FFJetSmearingTool";
558  // erase "Mass" from the end
559  const std::string mass_def_name = mass_def.substr(0, mass_def.size()-4);
560 
561  ICPJetCorrectionTool * tool = nullptr;
562 
563  if (asg::ToolStore::contains<ICPJetCorrectionTool>(ff_tool_name)) {
564  tool = asg::ToolStore::get<ICPJetCorrectionTool>(ff_tool_name);
565  } else {
566  tool = new CP::FFJetSmearingTool(ff_tool_name);
567  top::check(asg::setProperty( tool, "MassDef", mass_def_name ), "Failed to set proper MassDef for FFJetSmearingTool" );
568  top::check(asg::setProperty( tool, "ConfigFile", config ), "Failed to set proper config file for FFJetSmearingTool" );
569  top::check(tool->initialize(), "Failed to initialize " + ff_tool_name );
570  }
571 
572  return tool;
573  }
574 
576  // <tom.neep@cern.ch> Added 16th Feb 2016.
577  // Jet JVT tool - can be used for both selection and for SFs
578  // Since we use this for jet selection we also need it for data
579 
580  // <chris.scheulen@cern.ch> Modified 2022-12-04
581  // Added support for new NNJvt Algorithm used by default in R22
582  const std::string jvt_tool_name = "JetJvtEfficiencyTool";
583 
584  // Use Jet/Etmiss provided enum to associate Tagging Algo option with their naming scheme
586  std::string JVT_SFFile = "DummySFs.root"; // Currently, there are no dedicated SFs available
587  const std::string JVT_WP = m_config->getJVTWP();
588 
589  if (asg::ToolStore::contains<CP::IJetJvtEfficiency>(jvt_tool_name)) {
590  m_jetJvtTool = asg::ToolStore::get<CP::IJetJvtEfficiency>(jvt_tool_name);
591  } else {
592  CP::JetJvtEfficiency* jetJvtTool = new CP::JetJvtEfficiency(jvt_tool_name);
593  top::check(jetJvtTool->setProperty("TaggingAlg", JVT_Algo),
594  "Failed to set JVT Algorithm");
595  top::check(jetJvtTool->setProperty("WorkingPoint", JVT_WP),
596  "Failed to set JVT WP");
597  top::check(jetJvtTool->setProperty("SFFile", JVT_SFFile),
598  "Failed to set JVT SFFile name");
599  top::check(jetJvtTool->setProperty("JetJvtMomentName", "NNJvt"),
600  "Failed to set NNJvt decoration name");
601  top::check(jetJvtTool->setProperty("TruthLabel", "AnalysisTop_isHS"),
602  "Failed to set JVT TruthLabel decoration name");
603  top::check(jetJvtTool->setProperty("TruthJetContainerName", m_truthJetCollForHS),
604  "Failed to set JVT TruthJetContainerName decoration name");
605  top::check(jetJvtTool->initialize(), "Failed to initialize JVT tool");
606  m_jetJvtTool = jetJvtTool;
607  }
608 
609  // <jonathan.jamieson@cern.ch> Added 9th June 2020.
610  // Jet fJVT tool - uses same tool as for JVT,
611  // Only setup fJVT Efficiency tool if user actually wants it
612 
613  // <chris.scheulen@cern.ch> Modified 2022-12-04.
614  // For R22, we now have an option 'TaggingAlg', which needs to be set to fJVT mode explicitly.
615  if (m_config->getfJVTWP() != "None") {
616  const std::string fjvt_tool_name = "JetForwardJvtEfficiencyTool";
617  const std::string fJVT_SFFile =
618  (m_config->useParticleFlowJets()) ?
619  "JetJvtEfficiency/May2020/fJvtSFFile.EMPFlow.root" : // pflow jets
620  "JetJvtEfficiency/May2020/fJvtSFFile.EMtopo.root"; // default is EM jet
621  std::string fJVT_WP = m_config->getfJVTWP();
622  if (fJVT_WP == "Medium") {
623  fJVT_WP = "Loose"; // Efficiency tool still uses old WP names...
624  }
625 
627 
628  if (asg::ToolStore::contains<CP::IJetJvtEfficiency>(fjvt_tool_name)) {
629  m_jetfJvtTool = asg::ToolStore::get<CP::IJetJvtEfficiency>(fjvt_tool_name);
630  } else {
631  CP::JetJvtEfficiency* jetfJvtTool = new CP::JetJvtEfficiency(fjvt_tool_name);
632  top::check(jetfJvtTool->setProperty("TaggingAlg", fJVT_Algo),
633  "Failed to set fJVT Algorithm");
634  top::check(jetfJvtTool->setProperty("WorkingPoint", fJVT_WP),
635  "Failed to set fJVT WP");
636  top::check(jetfJvtTool->setProperty("SFFile", fJVT_SFFile),
637  "Failed to set fJVT SFFile name");
638  top::check(jetfJvtTool->setProperty("UseMuSFFormat", true),
639  "Failed to set fJVT SFFile to updated mu binning");
640  top::check(jetfJvtTool->setProperty("ScaleFactorDecorationName", "fJVTSF"),
641  "Failed to set fJVT SF decoration name");
642  top::check(jetfJvtTool->setProperty("JetJvtMomentName", "DFCommonJets_fJvt"),
643  "Failed to set fJVT pass/fail decoration name");
644  top::check(jetfJvtTool->setProperty("TruthLabel", "AnalysisTop_isHS"),
645  "Failed to set fJVT TruthLabel decoration name");
646  top::check(jetfJvtTool->setProperty("TruthJetContainerName", m_truthJetCollForHS),
647  "Failed to set fJVT TruthJetContainerName decoration name");
648  top::check(jetfJvtTool->initialize(), "Failed to initialize fJVT Efficiency tool");
649  m_jetfJvtTool = jetfJvtTool;
650  }
651  }
652  return StatusCode::SUCCESS;
653  }
654 
656  // See https://twiki.cern.ch/twiki/bin/view/AtlasProtected/JetMetR22MigrationGuide#MET_Building_and_Systematics
657  // <chris.scheulen@cern.ch> modified 2023-01-18: Adapted for NNJvt usage in R22
658  // METMaker tool
659  if (asg::ToolStore::contains<IMETMaker>("met::METMaker")) {
660  m_met_maker = asg::ToolStore::get<IMETMaker>("met::METMaker");
661  } else {
662  met::METMaker* metMaker = new met::METMaker("met::METMaker");
663  top::check(metMaker->setProperty("JetSelection", m_config->getMETJetSelectionWP()),
664  "Failed to set METMaker Jvt WP");
665 
666  if (m_config->useParticleFlowJets()) {
667  top::check(metMaker->setProperty("DoPFlow", true), "Failed to set METMaker DoPFlow to true");
668  }
669 
670  if (m_config->doForwardJVTinMET()) {
671  if (m_config->getfJVTWP() == "Medium") {
672  top::check(metMaker->setProperty("JetSelection", "Tenacious"),
673  "Failed to set METMaker JetSelection to Tenacious");
674  }
675  top::check(metMaker->setProperty("JetRejectionDec", "DFCommonJets_fJvt"),
676  "Failed to set METMaker JetRejectionDec to DFCommonJets_fJvt");
677  }
678  top::check(metMaker->initialize(), "Failed to initialize");
679  metMaker->msg().setLevel(MSG::INFO);
680  m_met_maker = metMaker;
681  }
682 
683  // MET Systematics tool
684  if (asg::ToolStore::contains<IMETSystematicsTool>("met::METSystematicsTool")) {
685  m_met_systematics = asg::ToolStore::get<IMETSystematicsTool>("met::METSystematicsTool");
686  } else {
687  met::METSystematicsTool* metSyst = new met::METSystematicsTool("met::METSystematicsTool");
688 
689  std::string METconfigDir = m_config->METUncertaintiesConfigDir();
690  if (METconfigDir == "Latest") METconfigDir = "METUtilities/R22_PreRecs"; //Find calib files here: /cvmfs/atlas.cern.ch/repo/sw/database/GroupData/METUtilities/
691  top::check(metSyst->setProperty("ConfigPrefix", METconfigDir), "Failed to set METsyst calibration area"); //Set calib area explicitly - removes potential for crash when default area is changed in METSyst code
692  // TST (Track soft terms)
693  if (m_config->useParticleFlowJets()) {
694  top::check(metSyst->setProperty("ConfigSoftTrkFile", "TrackSoftTerms-pflow.config"), "Failed to set property");
695  } else {
696  if (m_config->isAFII() && METconfigDir == "METUtilities/data17_13TeV/prerec_Jan16/") {
697  top::check(metSyst->setProperty("ConfigSoftTrkFile", "TrackSoftTerms_AFII.config"), "Failed to set property");
698  } else {
699  top::check(metSyst->setProperty("ConfigSoftTrkFile", "TrackSoftTerms.config"), "Failed to set property");
700  }
701  }
702  // Deactivate CST terms
703  top::check(metSyst->setProperty("ConfigSoftCaloFile", ""), "Failed to set property");
704  top::check(metSyst->initialize(), "Failed to initialize");
705  m_met_systematics = metSyst;
706  }
707  // MET significance tool
708  if (m_config->METSignificance()) {
709  if (asg::ToolStore::contains<IMETSignificance>("metSignificance")) {
710  m_metSignif = asg::ToolStore::get<IMETSignificance>("metSignificance");
711  } else {
712  met::METSignificance* metSignificance = new met::METSignificance("metSignificance");
713  met::SoftTermParams softTerm;
714  if (m_config->METSignifSoftTermParam().compare("Random")==0) {
715  softTerm = met::Random;
716  } else if (m_config->METSignifSoftTermParam().compare("PthardParam")==0) {
717  softTerm = met::PthardParam;
718  } else if (m_config->METSignifSoftTermParam().compare("TSTParam")==0) {
719  softTerm = met::TSTParam;
720  } else {
721  ATH_MSG_ERROR("top::JetMETCPTools: Unkown SoftTermParam for MetSignificance");
722  // TODO actually throw some error here, though we should not get here since config restricts this to one of the three options above
723  }
724  top::check(metSignificance->setProperty("SoftTermParam", softTerm), "Failed to set MetSignificance::SoftTermParam!");
725  top::check(metSignificance->setProperty("DoPhiReso", true), "Failed to set MetSignificance::DoPhiReso!");
726  top::check(metSignificance->setProperty("IsDataJet", false), "Failed to set MetSignificance::IsDataJet!");
727  top::check(metSignificance->setProperty("IsAFII", m_config->isAFII()), "Failed to set MetSignificance::IsAFII!");
728  //chopping off the "Jets" part from the jet container name for correct initialization of the METSigTool.
729  std::string jetCollectionName = m_config->sgKeyJets();
730  std::string deleteString = "Jets";
731  std::string::size_type index = jetCollectionName.find(deleteString);
732  if(index != std::string::npos) jetCollectionName.erase(index, (jetCollectionName.length() - index));
733  top::check(metSignificance->setProperty("JetCollection", jetCollectionName), "Failed to set MetSignificance::JetCollection!");
734  //disable TreatPUJets when using EMTopoJets and fjvt not active
735  top::check(metSignificance->setProperty("TreatPUJets",(jetCollectionName != "AntiKt4EMTopo") || (m_config->doForwardJVTinMET()) ),"Failed to set MetSignificance::TreatPUJets!");
736  top::check(metSignificance->initialize(), "Failed to initialize METSignificanceTool");
737  m_metSignif = metSignificance;
738  }
739  }
740 
741  return StatusCode::SUCCESS;
742  }
743 
746  const std::string& jet_def,
747  const std::string& mc_type,
748  bool isMC,
749  const std::string& config_file,
750  std::vector<std::string>* variables,
751  const std::string& analysis_file,
752  const std::string& calib_area
753  ) {
754  ICPJetUncertaintiesTool* tool = nullptr;
755 
756  if (asg::ToolStore::contains<ICPJetUncertaintiesTool>(name)) {
757  tool = asg::ToolStore::get<ICPJetUncertaintiesTool>(name);
758  } else {
760  top::check(asg::setProperty(tool, "JetDefinition", jet_def),
761  "Failed to set JetDefinition for " + name);
762  top::check(asg::setProperty(tool, "MCType", mc_type),
763  "Failed to set MCType for " + name);
764  top::check(asg::setProperty(tool, "IsData", !isMC),
765  "Failed to set IsData (for JER only)");
766  top::check(asg::setProperty(tool, "ConfigFile", config_file),
767  "Failed to set ConfigFile for " + name);
768  if (variables != nullptr) {
769  top::check(asg::setProperty(tool, "VariablesToShift", *variables),
770  "Failed to set VariablesToShift for LargeR Jes Uncertainty " + name);
771  }
772  if (analysis_file != "None") {
773  if (m_config->jetUncertainties_QGHistPatterns().size() == 0 || analysis_file == "") { // no histogram pattern to look for, or empty analysis_file argument
774  top::check(asg::setProperty(tool, "AnalysisFile", analysis_file),
775  "Failed to set AnalysisFile for " + name);
776  } else if (m_config->jetUncertainties_QGHistPatterns().size() == 1) { // a single pattern was specified - let's use it for all DSIDs
777  top::check(asg::setProperty(tool, "AnalysisFile", analysis_file),
778  "Failed to set AnalysisFile for " + name);
779  top::check(asg::setProperty(tool, "AnalysisHistPattern", m_config->jetUncertainties_QGHistPatterns()[0]),
780  "Failed to set AnalysisHistPattern for " + name);
781  } else { // a list of DSIDs was specified
782  int DSID = m_config->getDSID();
783  for (auto s : m_config->jetUncertainties_QGHistPatterns()) {
784  if (std::atoi(s.c_str()) == DSID) {
785  top::check(asg::setProperty(tool, "AnalysisFile", analysis_file),
786  "Failed to set AnalysisFile for " + name);
787  top::check(asg::setProperty(tool, "AnalysisHistPattern", s),
788  "Failed to set AnalysisHistPattern for " + name);
789  break;
790  }
791  }// if the DSID is not found in the list, we don't try to use the AnalysisFile, so we get the default 50 +/-
792  // 50%
793  }
794  }
795  if (calib_area != "None") {
796  top::check(asg::setProperty(tool, "CalibArea", calib_area),
797  "Failed to set CalibArea " + calib_area);
798  }
799  top::check(tool->initialize(), "Failed to initialize " + name);
800  }
801  return tool;
802  }
803 
805  IJetSelector* tool = nullptr;
806 
807  std::string name = "JetCleaningTool" + WP;
808  if (asg::ToolStore::contains<IJetSelector>(name)) {
809  tool = asg::ToolStore::get<IJetSelector>(name);
810  } else {
811  tool = new JetCleaningTool(name);
812  top::check(asg::setProperty(tool, "CutLevel", WP),
813  "Failed to set CutLevel to " + WP + " for " + name);
814  top::check(asg::setProperty(tool, "DoUgly", false),
815  "Failed to set DoUgly for " + name);
816  top::check(asg::setProperty(tool, "UseDecorations", true),
817  "Failed to set UserDecorations for " + name);
818  top::check(tool->initialize(), "Failed to initialize " + name);
819  }
820  return tool;
821  }
822 
824  const ToolHandle<IJetSelector>& JetCleaningToolHandle)
825  {
827  std::string name = "JetEventCleaningTool" + WP;
828  if (asg::ToolStore::contains<ECUtils::IEventCleaningTool>(name)) {
829  tool = asg::ToolStore::get<ECUtils::IEventCleaningTool>(name);
830  } else {
832  top::check(asg::setProperty(tool, "JetContainer", m_config->sgKeyJets()),
833  "Failed to set jet container name for JetEventCleaningTool");
834  top::check(asg::setProperty(tool, "PtCut", std::to_string(m_config->jetPtcut())),
835  "Failed to set jet pt cut in JetEventCleaningTool");
836  top::check(asg::setProperty(tool, "EtaCut", std::to_string(m_config->jetEtacut())),
837  "Failed to set jet eta cut in JetEventCleaningTool");
838  top::check(asg::setProperty(tool, "JvtDecorator", "passJVT"),
839  "Failed to set JVT property in JetEventCleaningTool");
840  std::string OrDecorator = "";
841  if (m_config->doLooseEvents()) OrDecorator = "ORToolDecorationLoose";
842  else OrDecorator = "ORToolDecoration";
843  top::check(asg::setProperty(tool, "OrDecorator", OrDecorator),
844  "Failed to set jet OR decoration in JetEventCleaningTool");
845  top::check(asg::setProperty(tool, "CleaningLevel", WP),
846  "Failed to set jet WP " + WP + " in JetEventCleaningTool");
847  top::check(asg::setProperty(tool, "JetCleaningTool", JetCleaningToolHandle),
848  "Failed to associate the JetCleaningTool object to JetEventCleaningTool");
849  top::check(tool->initialize(), "Failed to initialize " + name);
850  }
851 
852  return tool;
853  }
854 } // namespace top
CP::JetJvtEfficiency::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetJvtEfficiency.cxx:62
met::METSystematicsTool
Definition: METSystematicsTool.h:85
top::JetMETCPTools::m_jetAntiKt4_Data_PFlow_ConfigFile
std::string m_jetAntiKt4_Data_PFlow_ConfigFile
Definition: TopJetMETCPTools.h:70
met::METMaker
Definition: METMaker.h:44
top::JetMETCPTools::m_jetAntiKt4_PFlow_MCFS_CalibSequence
std::string m_jetAntiKt4_PFlow_MCFS_CalibSequence
Definition: TopJetMETCPTools.h:74
top::JetMETCPTools::m_jetAntiKt4_Data_CalibSequence
std::string m_jetAntiKt4_Data_CalibSequence
Definition: TopJetMETCPTools.h:51
top::JetMETCPTools::m_jetAntiKt4_Data_JMS_ConfigFile
std::string m_jetAntiKt4_Data_JMS_ConfigFile
Definition: TopJetMETCPTools.h:57
top::JetMETCPTools::m_jetAntiKt4_Data_PFlow_JMS_ConfigFile
std::string m_jetAntiKt4_Data_PFlow_JMS_ConfigFile
Definition: TopJetMETCPTools.h:77
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
checkCoolLatestUpdate.variables
variables
Definition: checkCoolLatestUpdate.py:13
met::METSignificance::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: METSignificance.cxx:103
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
top::JetMETCPTools::m_met_systematics
ToolHandle< IMETSystematicsTool > m_met_systematics
Definition: TopJetMETCPTools.h:112
top::JetMETCPTools::setupMET
StatusCode setupMET()
Definition: TopJetMETCPTools.cxx:655
index
Definition: index.py:1
met::METSystematicsTool::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: METSystematicsTool.cxx:83
top::JetMETCPTools::JetMETCPTools
JetMETCPTools(const std::string &name)
Definition: TopJetMETCPTools.cxx:37
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
top::JetMETCPTools::m_jetAntiKt4_MCFS_CalibSequence
std::string m_jetAntiKt4_MCFS_CalibSequence
Definition: TopJetMETCPTools.h:54
top::JetMETCPTools::setupJetsCalibration
StatusCode setupJetsCalibration()
Definition: TopJetMETCPTools.cxx:137
top::JetMETCPTools::setupJetUncertaintiesTool
ICPJetUncertaintiesTool * setupJetUncertaintiesTool(const std::string &name, const std::string &jet_def, const std::string &mc_type, bool isMC, const std::string &config_file, std::vector< std::string > *variables, const std::string &analysis_file="", const std::string &calib_area="None")
Definition: TopJetMETCPTools.cxx:745
IsoCloseByCorrectionTest.WP
WP
Definition: IsoCloseByCorrectionTest.py:56
top::JetMETCPTools::m_jetAntiKt4_MCAFII_PFlow_CalibSequence
std::string m_jetAntiKt4_MCAFII_PFlow_CalibSequence
Definition: TopJetMETCPTools.h:68
top::JetMETCPTools::m_truthJetCollForHS
std::string m_truthJetCollForHS
Definition: TopJetMETCPTools.h:48
ECUtils::IEventCleaningTool
Interface for the event cleaning tool.
Definition: IEventCleaningTool.h:24
met::METMaker::initialize
virtual StatusCode initialize() override final
Dummy implementation of the initialisation function.
Definition: METMaker.cxx:172
top::JetMETCPTools::m_jetCleaningToolLooseBad
ToolHandle< IJetSelector > m_jetCleaningToolLooseBad
Definition: TopJetMETCPTools.h:98
FFJetSmearingTool.h
met::METSignificance
Definition: METSignificance.h:47
JetCleaningTool
Class for selecting jets that pass cleaning cuts.
Definition: JetCleaningTool.h:40
asg
Definition: DataHandleTestTool.h:28
ECUtils::EventCleaningTool
Definition: EventCleaningTool.h:39
top::JetMETCPTools::m_jetUncertaintiesToolReducedNPScenario2
ToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesToolReducedNPScenario2
Definition: TopJetMETCPTools.h:94
JetCalibrationTool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetCalibrationTool.cxx:57
CP::JetJvtEfficiency
Definition: JetJvtEfficiency.h:38
IMETSignificance.h
top::JetMETCPTools::m_config
std::shared_ptr< top::TopConfig > m_config
Definition: TopJetMETCPTools.h:45
JetJvtEfficiency.h
JetForwardJvtTool.h
top::JetMETCPTools::m_jetUpdateJvtTool
ToolHandle< IJetUpdateJvt > m_jetUpdateJvtTool
Definition: TopJetMETCPTools.h:105
ICPJetUncertaintiesTool
Definition: ICPJetUncertaintiesTool.h:15
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
EventTools.h
A few functions for doing operations on particles / events. Currently holds code for dR,...
top::JetMETCPTools::m_met_maker
ToolHandle< IMETMaker > m_met_maker
Definition: TopJetMETCPTools.h:111
top::JetMETCPTools::setupJetCleaningTool
IJetSelector * setupJetCleaningTool(const std::string &WP)
Definition: TopJetMETCPTools.cxx:804
top::JetMETCPTools::m_jetAntiKt4_PFlow_MCFS_JMS_ConfigFile
std::string m_jetAntiKt4_PFlow_MCFS_JMS_ConfigFile
Definition: TopJetMETCPTools.h:81
CP::NNJvt
@ NNJvt
Definition: IJetJvtEfficiency.h:24
top::JetMETCPTools::m_jetUncertaintiesToolReducedNPScenario4
ToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesToolReducedNPScenario4
Definition: TopJetMETCPTools.h:96
top::JetMETCPTools::m_jetUncertaintiesToolReducedNPScenario1
ToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesToolReducedNPScenario1
Definition: TopJetMETCPTools.h:93
top::JetMETCPTools::m_jetAntiKt4_PFlow_MCFS_ConfigFile
std::string m_jetAntiKt4_PFlow_MCFS_ConfigFile
Definition: TopJetMETCPTools.h:73
JetCalibrationTool.h
top::JetMETCPTools::m_jetAntiKt4_MCAFII_CalibSequence
std::string m_jetAntiKt4_MCAFII_CalibSequence
Definition: TopJetMETCPTools.h:65
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EventCleaningTool.h
JetUncertaintiesTool
Definition: JetUncertaintiesTool.h:44
top::JetMETCPTools::m_jetEventCleaningToolLooseBad
ToolHandle< ECUtils::IEventCleaningTool > m_jetEventCleaningToolLooseBad
Definition: TopJetMETCPTools.h:102
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JetCleaningTool.h
ICPJetCorrectionTool
class ICPJetCorrectionTool
Definition: ICPJetCorrectionTool.h:28
JetCalibrationTool
Definition: JetCalibrationTool.h:34
CP::JvtTagger
JvtTagger
Definition: IJetJvtEfficiency.h:22
met::Random
@ Random
Definition: IMETSignificance.h:27
met::PthardParam
@ PthardParam
Definition: IMETSignificance.h:28
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
met::TSTParam
@ TSTParam
Definition: IMETSignificance.h:29
top::JetMETCPTools::m_jetCalibrationToolLargeR
ToolHandle< IJetCalibrationTool > m_jetCalibrationToolLargeR
Definition: TopJetMETCPTools.h:85
METSignificance.h
top::JetMETCPTools::m_jetAntiKt4_MCFS_JMS_ConfigFile
std::string m_jetAntiKt4_MCFS_JMS_ConfigFile
Definition: TopJetMETCPTools.h:61
GetAllXsec.DSID
tuple DSID
Definition: GetAllXsec.py:53
top::JetMETCPTools::m_jetSelectfJvtTool
ToolHandle< IJetModifier > m_jetSelectfJvtTool
Definition: TopJetMETCPTools.h:106
CP::fJvt
@ fJvt
Definition: IJetJvtEfficiency.h:25
top::JetMETCPTools::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: TopJetMETCPTools.cxx:113
top::JetMETCPTools::m_jetAntiKt4_Data_PFlow_JMS_CalibSequence
std::string m_jetAntiKt4_Data_PFlow_JMS_CalibSequence
Definition: TopJetMETCPTools.h:78
top::JetMETCPTools::m_jetAntiKt4_Data_JMS_CalibSequence
std::string m_jetAntiKt4_Data_JMS_CalibSequence
Definition: TopJetMETCPTools.h:58
top::JetMETCPTools::m_jetCleaningToolTightBad
ToolHandle< IJetSelector > m_jetCleaningToolTightBad
Definition: TopJetMETCPTools.h:99
top::JetMETCPTools::m_jetUncertaintiesToolLargeRPseudoData
ToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesToolLargeRPseudoData
Definition: TopJetMETCPTools.h:88
PathResolver.h
top::JetMETCPTools::m_jetfJvtTool
ToolHandle< CP::IJetJvtEfficiency > m_jetfJvtTool
Definition: TopJetMETCPTools.h:109
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
IJetSelector
IJetSelector is a dual-use tool interface for a tool that selects a jet.
Definition: IJetSelector.h:19
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
top::JetMETCPTools::m_jetAntiKt4_Data_PFlow_CalibSequence
std::string m_jetAntiKt4_Data_PFlow_CalibSequence
Definition: TopJetMETCPTools.h:71
TopConfig.h
top::JetMETCPTools::m_jetUncertaintiesToolLargeR
ToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesToolLargeR
Definition: TopJetMETCPTools.h:87
top::JetMETCPTools::m_jetUncertaintiesToolPseudoData
ToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesToolPseudoData
Definition: TopJetMETCPTools.h:91
METMaker.h
top::JetMETCPTools::m_jetJvtTool
ToolHandle< CP::IJetJvtEfficiency > m_jetJvtTool
Definition: TopJetMETCPTools.h:108
top::JetMETCPTools::m_jetCalibrationTool
ToolHandle< IJetCalibrationTool > m_jetCalibrationTool
Definition: TopJetMETCPTools.h:84
JetVertexTaggerTool.h
JetForwardJvtTool
Definition: JetForwardJvtTool.h:37
top::JetMETCPTools::m_jetEventCleaningToolTightBad
ToolHandle< ECUtils::IEventCleaningTool > m_jetEventCleaningToolTightBad
Definition: TopJetMETCPTools.h:103
PhysDESDM_VH_DV.jetCollectionName
jetCollectionName
Definition: PhysDESDM_VH_DV.py:50
top::JetMETCPTools::m_jetAntiKt4_MCFS_ConfigFile
std::string m_jetAntiKt4_MCFS_ConfigFile
Definition: TopJetMETCPTools.h:53
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
met::SoftTermParams
SoftTermParams
Definition: IMETSignificance.h:26
METSystematicsTool.h
top::JetMETCPTools::m_jetUncertaintiesTool
ToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesTool
Definition: TopJetMETCPTools.h:90
top::JetMETCPTools::m_jetUncertaintiesToolReducedNPScenario3
ToolHandle< ICPJetUncertaintiesTool > m_jetUncertaintiesToolReducedNPScenario3
Definition: TopJetMETCPTools.h:95
top::JetMETCPTools::m_metSignif
ToolHandle< IMETSignificance > m_metSignif
Definition: TopJetMETCPTools.h:113
AthCommonMsg::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::FFJetSmearingTool
Definition: FFJetSmearingTool.h:96
top::JetMETCPTools::m_jetAntiKt4_MCAFII_PFlow_ConfigFile
std::string m_jetAntiKt4_MCAFII_PFlow_ConfigFile
Definition: TopJetMETCPTools.h:67
EventInfoRead.isMC
isMC
Definition: EventInfoRead.py:11
top::JetMETCPTools::m_jetAntiKt4_Data_ConfigFile
std::string m_jetAntiKt4_Data_ConfigFile
Definition: TopJetMETCPTools.h:50
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
top::JetMETCPTools::setupJetsScaleFactors
StatusCode setupJetsScaleFactors()
Definition: TopJetMETCPTools.cxx:575
top::JetMETCPTools::m_jetAntiKt4_PFlow_MCFS_JMS_CalibSequence
std::string m_jetAntiKt4_PFlow_MCFS_JMS_CalibSequence
Definition: TopJetMETCPTools.h:82
TopJetMETCPTools.h
top::JetMETCPTools::m_FFJetSmearingTool
ToolHandle< ICPJetCorrectionTool > m_FFJetSmearingTool
Definition: TopJetMETCPTools.h:92
IJetJvtEfficiency.h
top::JetMETCPTools::setupFFJetSmearingTool
ICPJetCorrectionTool * setupFFJetSmearingTool(const std::string &mass_def, const std::string &config)
Definition: TopJetMETCPTools.cxx:553
top::JetMETCPTools::m_jetAntiKt4_MCAFII_ConfigFile
std::string m_jetAntiKt4_MCAFII_ConfigFile
Definition: TopJetMETCPTools.h:64
IJetModifier
IJetModifier is a dual-use tool interface for a tool that modifies a jet collection.
Definition: IJetModifier.h:20
JetUncertaintiesTool.h
top::JetMETCPTools::m_jetAntiKt4_MCFS_JMS_CalibSequence
std::string m_jetAntiKt4_MCFS_JMS_CalibSequence
Definition: TopJetMETCPTools.h:62
top::JetMETCPTools::setupLargeRJetsCalibration
StatusCode setupLargeRJetsCalibration()
Definition: TopJetMETCPTools.cxx:455
top::JetMETCPTools::setupJetEventCleaningTool
ECUtils::IEventCleaningTool * setupJetEventCleaningTool(const std::string &WP, const ToolHandle< IJetSelector > &JetCleaningToolHandle)
Definition: TopJetMETCPTools.cxx:823