ATLAS Offline Software
SUSYToolsTester.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // System include(s):
6 #include <cstdlib>
7 #include <iostream>
8 #include <map>
9 #include <memory>
10 #include <numeric>
11 #include <regex>
12 #include <string>
13 #include <utility>
14 #include <vector>
15 
16 // ROOT include(s):
17 #include <TEnv.h>
18 #include <TFile.h>
19 #include <TTree.h>
20 #include <TBranch.h>
21 #include <TError.h>
22 #include <TString.h>
23 #include <TStopwatch.h>
24 #include <TSystem.h>
25 #include "TObjArray.h"
26 #include "TObjString.h"
27 
28 #include "xAODRootAccess/Init.h"
29 #include "xAODRootAccess/TStore.h"
30 #ifdef ROOTCORE
31 #include "xAODRootAccess/TEvent.h"
32 #else
33 #include "POOLRootAccess/TEvent.h"
34 #endif // ROOTCORE
35 
36 // EDM include(s):
38 #include "xAODMuon/MuonContainer.h"
43 #include "xAODJet/JetContainer.h"
48 #include "xAODTruth/TruthEvent.h"
49 #include "xAODCore/ShallowCopy.h"
56 
57 // Local include(s):
60 
61 // Other includes
67 #include "AsgTools/ToolStore.h"
68 #include "AsgTools/ToolHandle.h"
70 #include "AsgTools/IAsgTool.h"
71 
74 
76 
77 const size_t Ncuts = 10;
78 const char *cut_name[] =
79 { "All",
80  "GRL+Cleaning",
81  "TileTrip",
82  "Trigger",
83  "Cosmic veto",
84  "==1 baseline lepton",
85  "==1 signal lepton",
86  "lepton pT>20 GeV",
87  "trig. matched lepton",
88  "Njet(pT>50 GeV)>=2"
89 };
90 
91 const unsigned int nSel=8;
92 enum sel {
95  bad,
100  passOR
101 };
102 
103 namespace asg{ANA_MSG_HEADER(msgSTT) ANA_MSG_SOURCE(msgSTT,"SUSYToolsTester")}
104 
105 //====================================================================================================
106 std::vector<std::string> getTokens(TString line, const TString& delim);
107 std::map<std::string, std::string> getFileContainers(std::unique_ptr<TFile> &);
108 
109 //====================================================================================================
110 int main( int argc, char* argv[] ) {
111 
112  using namespace asg::msgSTT;
113  ANA_CHECK_SET_TYPE (int);
114  setMsgLevel(MSG::INFO);
115 
117 
118  // The application's name:
119  const char* APP_NAME = argv[ 0 ];
120 
121  // Check if we received a file name:
122  if ( argc < 2 ) {
123  ANA_MSG_ERROR( "No file name received!" );
124  ANA_MSG_ERROR( " Usage: " << APP_NAME << " [xAOD file name] [maxEvents] [isData=0/1 isAtlfast=0/1] [NoSyst=0/1] [Debug=0/1/2] [ConfigFile=<cfile.conf>] [PRWFile=<prwfile.root>] [autoconfigPRW=0/1] [commonPRWFile=0/1]" );
125  return 1;
126  }
127 
128 
130 
131  int autoconfigPRW = 1;
132  int commonPRWFile = 1;
133  int isData = -1;
134  int isAtlfast = -1;
135  int NoSyst = 1;
136  int debug = 1;
137  bool isPHYSLite = false;
138  bool hasLRT = false;
139  Long64_t entries=-1;
140 
141  // Open the input file:
142  TString fileName = argv[1];
143  ANA_MSG_INFO( "Opening file: " << fileName );
144  std::unique_ptr< TFile > ifile( TFile::Open( fileName, "READ" ) );
145  ANA_CHECK( ifile.get() );
146 
147  bool isRun3 = false;
148  if ((fileName.Contains("mc23") || fileName.Contains("mc21") || fileName.Contains("data2")) && fileName.Contains("13p6TeV")) isRun3 = true;
149  std::string config_file = (PathResolverFindCalibFile("SUSYTools/SUSYTools_Default.conf")).c_str();
150  if (fileName.Contains("LITE")) config_file = (PathResolverFindCalibFile("SUSYTools/SUSYTools_Default_LITE.conf")).c_str();
151  if (isRun3) {
152  config_file = (PathResolverFindCalibFile("SUSYTools/SUSYTools_Default_Run3.conf")).c_str();
153  if (fileName.Contains("LITE")) config_file = (PathResolverFindCalibFile("SUSYTools/SUSYTools_Default_Run3_LITE.conf")).c_str();
154  ANA_MSG_INFO("Configuring for Run 3");
155  }
156  std::string prw_file = "DUMMY";
157  std::string ilumicalc_file = "DUMMY";
158 
159  for (int i = 1 ; i < argc ; i++) {
160  const char* key = strtok(argv[i], "=") ;
161  const char* val = strtok(0, " ") ;
162 
163  ANA_MSG_INFO( "===== Processing key " << TString(key) << " with value " << TString(val) );
164  if (strcmp(key, "autoconfigPRW") == 0) autoconfigPRW = atoi(val);
165  if (strcmp(key, "commonPRWFile") == 0) commonPRWFile = atoi(val);
166  if (strcmp(key, "isData") == 0) isData = atoi(val);
167  if (strcmp(key, "isAtlfast") == 0) isAtlfast = atoi(val);
168  if (strcmp(key, "NoSyst") == 0) NoSyst = atoi(val);
169  if (strcmp(key, "Debug") == 0) debug = atoi(val);
170  if (strcmp(key, "ConfigFile") == 0) config_file = (PathResolverFindCalibFile(val)).c_str();
171  if (strcmp(key, "PRWFile") == 0) prw_file = std::string(val);
172  if (strcmp(key, "ilumicalcFile") == 0) ilumicalc_file = std::string(val);
173  if (strcmp(key, "maxEvents") == 0) entries = atoi(val);
174 
175  }
176 
177  if (debug>0) setMsgLevel((MSG::Level)(3-debug)); // NIL=0, VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL, ALWAYS
178 
179  if (isData < 0 || isAtlfast < 0) {
180  ANA_MSG_ERROR( "One of the flags isData or isAtlfast was not set! Must provide isData or isAtlfast." );
181  ANA_MSG_ERROR( " Usage: " << APP_NAME << " [xAOD file name] [maxEvents] [isData=0/1 isAtlfast=0/1] [NoSyst=0/1] [Debug=0/1/2] [ConfigFile=<cfile.conf>] [PRWFile=<prwfile.root>] [autoconfigPRW=0/1] [commonPRWFile=0/1]");
182  return 10;
183  }
185 
186 
187  // Open file and check available containers
188  std::map<std::string, std::string> containers = getFileContainers(ifile);
189  bool hasTrkJets(false), hasFatJets(false);
190  for (auto& x : containers) {
191  if (x.first.find("AntiKtVR30Rmax4Rmin02TrackJets")!=std::string::npos) hasTrkJets = true;
192  if (x.first.find("AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets")!=std::string::npos) hasFatJets = true;
193  if (x.first.find("AnalysisElectrons")!=std::string::npos) isPHYSLite = true;
194  if (isPHYSLite && x.first.find("AnalysisLargeRJets")!=std::string::npos) hasFatJets = false;
195  if (x.first.find("InDetLargeD0TrackParticles") != std::string::npos) hasLRT = true;
196  }
197  if (debug>0) {
198  ANA_MSG_INFO("Checking file contents (containers):");
199  for (auto& x : containers) ANA_MSG_INFO(" - found " << x.first.c_str() << " (" << x.second.c_str() << ")");
200  ANA_MSG_INFO("hasTrkJets: " << (hasTrkJets?"true":"false"));
201  ANA_MSG_INFO("hasFatJets: " << (hasFatJets?"true":"false"));
202  ANA_MSG_INFO("isPHYSLite: " << (isPHYSLite?"true":"false"));
203  ANA_MSG_INFO("hasLRT : " << (hasLRT?"true":"false"));
204  }
205 
206  // Create a TEvent object:
207 
209  ANA_CHECK( event.readFrom( ifile.get() ) );
210  ANA_MSG_INFO( "Number of events in the file: " << static_cast< int >( event.getEntries() ) );
211 
213 
214  // Open up an output file. Not needed for this example. If you wish to enable
215  // this, please don't forget to add the call to fill towards the end of the code!
216  //std::unique_ptr< TFile > ofile( TFile::Open( "out.root", "RECREATE" ) );
217  //ANA_CHECK( event.writeTo( ofile.get() ) );
218 
219  // If we haven't set the number of events, then run over the whole tree
220  if (entries<0){
221  entries = event.getEntries();
222  }
223 
224  // GRL tool
226  if (isData) {
227  m_grl.setTypeAndName("GoodRunsListSelectionTool/grl");
228  std::vector<std::string> myGRLs;
229 
230  myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data15_13TeV/20170619/physics_25ns_21.0.19.xml"));
231  myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data16_13TeV/20180129/physics_25ns_21.0.19.xml"));
232  myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data17_13TeV/20180619/physics_25ns_Triggerno17e33prim.xml"));
233  myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data18_13TeV/20190219/physics_25ns_Triggerno17e33prim.xml"));
234  myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data22_13p6TeV/20230116/data22_13p6TeV.periodAllYear_DetStatus-v109-pro28-04_MERGED_PHYS_StandardGRL_All_Good_25ns.xml"));
235  myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data23_13p6TeV/20230828/data23_13p6TeV.periodAllYear_DetStatus-v110-pro31-06_MERGED_PHYS_StandardGRL_All_Good_25ns.xml"));
236  //myGRLs.push_back(PathResolverFindCalibFile("GoodRunsLists/data22_13p6TeV/20230116/data22_13p6TeV.periodAllYear_DetStatus-v109-pro28-04_MERGED_PHYS_StandardGRL_All_Good_25ns_ignore_TRIGMUO_TRIGLAR.xml"));
237  ANA_CHECK( m_grl.setProperty("GoodRunsListVec", myGRLs) );
238  ANA_CHECK( m_grl.setProperty("PassThrough", false) );
239  ANA_CHECK( m_grl.retrieve() );
240 
241  ANA_MSG_INFO( "GRL tool retrieve & initialized... " );
242  }
243 
244  //xsec DB
245  SUSY::CrossSectionDB *my_XsecDB(0);
246  if (!isData){
248  if (isRun3 && fileName.Contains("mc21")) { my_XsecDB = new SUSY::CrossSectionDB(PathResolverFindCalibFile("dev/PMGTools/PMGxsecDB_mc21.txt"));}
249  else if (isRun3 && fileName.Contains("mc23")) { my_XsecDB = new SUSY::CrossSectionDB(PathResolverFindCalibFile("dev/PMGTools/PMGxsecDB_mc23.txt"));}
250  else { my_XsecDB = new SUSY::CrossSectionDB(PathResolverFindCalibFile("dev/PMGTools/PMGxsecDB_mc16.txt"));}
251  ANA_MSG_INFO( "xsec DB initialized" );
252  }
253 
254  // Create the tool(s) to test:
255  ST::SUSYObjDef_xAOD objTool("SUSYObjDef_xAOD");
256 
257  ANA_MSG_INFO(" ABOUT TO INITIALIZE SUSYTOOLS " );
258 
260  // Configure the SUSYObjDef instance
261 
262  ANA_CHECK( objTool.setProperty("DataSource", datasource) ) ;
263  if(!config_file.empty())
264  ANA_CHECK( objTool.setProperty("ConfigFile", config_file) );
265 
272 
273  std::vector<std::string> prw_conf;
274  if (!isData) {
275  if ( autoconfigPRW == 1 ) {
276  ANA_CHECK( objTool.setBoolProperty("AutoconfigurePRWTool", true) );
277  if ( commonPRWFile == 1 )
278  ANA_CHECK( objTool.setBoolProperty("PRWUseCommonMCFiles", true) );
279  } else {
280  if (prw_file == "DUMMY") {
281  prw_conf.push_back("dev/SUSYTools/merged_prw_mc16a_latest.root");
282  } else {
283  prw_conf = getTokens(prw_file,",");
284  }
285  ANA_CHECK( objTool.setProperty("PRWConfigFiles", prw_conf) );
286  }
287  }
288 
305 
306 
307  std::vector<std::string> prw_lumicalc;
308  if (ilumicalc_file == "DUMMY") {
309  ANA_CHECK( objTool.setProperty( "mcCampaign", "mc16e" ) );
310  prw_lumicalc.push_back(PathResolverFindCalibFile("GoodRunsLists/data18_13TeV/20190318/ilumicalc_histograms_None_348885-364292_OflLumi-13TeV-010.root"));
311  } else {
312  prw_lumicalc = getTokens(ilumicalc_file,",");
313  }
314  ANA_CHECK( objTool.setProperty("PRWLumiCalcFiles", prw_lumicalc) );
315 
316  // ============================================================================================
317  // Guess shower type for btagging MC/MC SFs
318  if(!isData){
319  int ishower = objTool.getMCShowerType("PhPy8EG"); //get your sample name here!
320  ANA_CHECK( objTool.setProperty("ShowerType", (int)ishower) );
321  }
322 
324  // ANA_CHECK( objTool.setBoolProperty("EleForceNoId", false) );
325  // ANA_CHECK( objTool.setBoolProperty("MuForceNoId", false) );
327 
328  ANA_CHECK(objTool.setProperty("OutputLevel", msg().level() ));
329  ANA_CHECK(objTool.setBoolProperty("DebugMode", (debug>1))); // debug=0:INFO,1:DEBUG->0, debug=2:VERBOSE->1
330 
331  if ( objTool.initialize() != StatusCode::SUCCESS) {
332  ANA_MSG_ERROR( "Cannot initialize SUSYObjDef_xAOD, exiting." );
333  return 1;
334  } else {
335  ANA_MSG_INFO( "SUSYObjDef_xAOD initialized..." );
336  }
337 
338  ANA_MSG_INFO( "Initialized SUSYTools" );
339 
340  // ============================================================================================
341  // Configuration
342  TEnv rEnv;
343  if ( rEnv.ReadFile(config_file.c_str(), kEnvAll) != 0 ) {
344  ANA_MSG_ERROR( "Cannot open config file, exiting.");
345  return 1;
346  }
347  ANA_MSG_INFO( "Config file opened" );
348 
349  std::map<std::string,std::string> configDict = {};
350  configDict["Jet.LargeRcollection"] = rEnv.GetValue("Jet.LargeRcollection", "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets" );
351  configDict["TrackJet.Collection"] = rEnv.GetValue("TrackJet.Collection", "AntiKtVR30Rmax4Rmin02TrackJets" );
352  configDict["Jet.WtaggerConfig"] = rEnv.GetValue("Jet.WtaggerConfig", "None");
353  configDict["Jet.ZtaggerConfig"] = rEnv.GetValue("Jet.ZtaggerConfig", "None");
354  configDict["Jet.ToptaggerConfig"] = rEnv.GetValue("Jet.ToptaggerConfig", "None");
355  // Trim comments and extra spaces from config entries
356  std::regex comment("#.*$");
357  std::regex trimspaces("^ +| +$|( ) +");
358  for (auto& keyval : configDict) {
359  configDict[keyval.first] = regex_replace(configDict[keyval.first], comment, "");
360  configDict[keyval.first] = regex_replace(configDict[keyval.first], trimspaces, "$1");
361  ANA_MSG_DEBUG("config " << keyval.first << " : " << configDict[keyval.first]);
362  }
363  std::string FatJetCollection = configDict["Jet.LargeRcollection"];
364  std::string TrkJetCollection = configDict["TrackJet.Collection"];
365  if (configDict["TrackJet.Collection"].find("None")!=std::string::npos) TrkJetCollection = "";
366 
367  std::map<std::string,bool> slices = {};
368  slices["ele"] = bool(rEnv.GetValue("Slices.Ele", true));
369  slices["pho"] = bool(rEnv.GetValue("Slices.Pho", true));
370  slices["mu"] = bool(rEnv.GetValue("Slices.Mu", true));
371  slices["tau"] = bool(rEnv.GetValue("Slices.Tau", true));
372  slices["jet"] = bool(rEnv.GetValue("Slices.Jet", true));
373  slices["bjet"] = bool(rEnv.GetValue("Slices.BJet", true));
374  slices["fjet"] = bool(rEnv.GetValue("Slices.FJet", true));
375  slices["tjet"] = bool(rEnv.GetValue("Slices.TJet", true));
376  slices["met"] = bool(rEnv.GetValue("Slices.MET", true));
377  for (auto& x : slices) { ANA_MSG_DEBUG( "Slice " << x.first << ": " << ((x.second)?"true":"false")); }
378 
379  // ============================================================================================
380  ToolHandle<TauAnalysisTools::ITauTruthMatchingTool> T2MT = 0;
381  if (slices["tau"]) {
382  // borrow the T2MT from SUSYTools
383  T2MT = asg::ToolStore::get<TauAnalysisTools::ITauTruthMatchingTool>("ToolSvc.TauTruthMatch");
384  ANA_CHECK(T2MT.retrieve());
385  }
386 
387  // ============================================================================================
388  // Triggers from https://twiki.cern.ch/twiki/bin/view/Atlas/LowestUnprescaled
389  std::vector<std::string> el_triggers,mu_triggers,ph_triggers,tau_triggers,emu_triggers;
390  if (isRun3){
391  el_triggers = {"HLT_e26_lhtight_ivarloose_L1EM22VHI","HLT_e26_lhtight_ivarloose_L1eEM26M","HLT_e60_lhmedium_L1EM22VHI", "HLT_e140_lhloose_L1EM22VHI"};//,"HLT_e300_etcut_L1EM22VHI"
392  mu_triggers = {"HLT_mu24_ivarmedium_L1MU14FCH","HLT_mu50_L1MU14FCH","HLT_mu60_0eta105_msonly_L1MU14FCH","HLT_mu60_L1MU14FCH","HLT_mu80_msonly_3layersEC_L1MU14FCH"};
393  ph_triggers = {"HLT_g140_loose_L1EM22VHI","HLT_g300_etcut_L1EM22VHI"};
394  tau_triggers = {"HLT_tau160_mediumRNN_tracktwoMVA_L1TAU100", "HLT_tau40_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRAB_L1TAU25IM_2TAU20IM_2J25_3J20"};
395  emu_triggers = {"HLT_2e12_lhloose_mu10_L12EM8VH_MU8F", "HLT_e12_lhloose_2mu10_L12MU8F", "HLT_e17_lhloose_mu14_L1EM15VH_MU8F", "HLT_e7_lhmedium_mu24_L1MU14FCH"};
396  }
397  else
398  {
399  el_triggers = {"HLT_e24_lhmedium_L1EM20VH","HLT_e26_lhtight_nod0_ivarloose", "HLT_e60_lhmedium_nod0", "HLT_e160_lhloose_nod0"};
400  mu_triggers = {"HLT_mu26_ivarmedium","HLT_mu50","HLT_mu20_mu8noL1"};
401  ph_triggers = {"HLT_g120_loose"};
402  tau_triggers = {"HLT_tau125_medium1_tracktwo", "HLT_tau40_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA"};
403  emu_triggers = {"HLT_2e12_lhloose_nod0_mu10", "HLT_e12_lhloose_nod0_2mu10", "HLT_e17_lhloose_nod0_mu14", "HLT_e7_lhmedium_nod0_mu24"};
404  }
405  // ============================================================================================
406  // Systematics and counts
407  std::vector<ST::SystInfo> systInfoList;
408  if (NoSyst) {
409  ST::SystInfo infodef;
410  infodef.affectsKinematics = false;
411  infodef.affectsWeights = false;
412  infodef.affectsType = ST::Unknown;
413  systInfoList.push_back(infodef);
414  } else {
415  systInfoList = objTool.getSystInfoList();
416  }
417 
418  size_t isys = 0;
419  const size_t Nsyst = systInfoList.size();
420  std::vector<std::vector<int> > elcuts;
421  std::vector<std::vector<int> > mucuts;
422  for (isys = 0; isys < Nsyst; ++isys) {
423  std::vector<int> elcutsCurrentSyst;
424  std::vector<int> mucutsCurrentSyst;
425  for (size_t icut = 0; icut < Ncuts; ++icut) {
426  elcutsCurrentSyst.push_back(0);
427  mucutsCurrentSyst.push_back(0);
428  }
429  elcuts.push_back(elcutsCurrentSyst);
430  mucuts.push_back(elcutsCurrentSyst);
431  }
432 
433  if (objTool.resetSystematics() != StatusCode::SUCCESS) {
434  Error(APP_NAME, "Cannot reset SUSYTools systematics" );
435  exit(-2);
436  }
437 
438  // ===============================================================================================
439  // Event Loop
440  TStopwatch m_clock0;
441  m_clock0.Start();
442  TStopwatch m_clock1;
443  m_clock1.Start();
444  TStopwatch m_clock2;
445 
446  int period = (debug>0) ? 1 : 100;
447  std::string cbkname, stream, ostream, kernel;
448 
449  // Loop over the events:
450  for ( Long64_t entry = 0; entry < entries; ++entry ) {
451 
452  if (entry == 1) {
453  m_clock1.Stop();
454  m_clock2.Start();
455  // CALLGRIND_TOGGLE_COLLECT;
456  // ProfilerStart("gperftools.profile.out");
457  }
458 
459 
460  // Tell the object which entry to look at:
461  event.getEntry( entry );
462 
463  if(entry == 0){
464  // Read the CutBookkeeper container
465  const xAOD::CutBookkeeperContainer* completeCBC = nullptr;
466  if (!event.retrieveMetaInput(completeCBC, "CutBookkeepers").isSuccess()) {
467  ANA_MSG_ERROR("Failed to retrieve CutBookkeepers from MetaData, exiting.");
468  return 1;
469  }
470 
471  // Let's find the right CBK (latest with StreamAOD input before derivations)
472  const xAOD::CutBookkeeper* allEventsCBK = nullptr;
473  int maxcycle=-1;
474  for ( const auto *cbk : *completeCBC ) {
475  cbkname = cbk->name();
476  stream = cbk->inputStream();
477  ostream = (cbk->outputStreams().size() ? cbk->outputStreams()[0] : "");
478  ANA_MSG_INFO("== cbkname: " << cbkname << ", description: " << cbk->description() << ", stream: " << stream);
479  ANA_MSG_INFO(" inputStream: " << cbk->inputStream() << ", outputStreams: " << ostream);
480  ANA_MSG_INFO(" cycle: " << cbk->cycle() << ", allEvents = " << cbk->nAcceptedEvents());
481  if (cbkname.find("PHYSVAL")!=std::string::npos) kernel="PHYSVAL";
482  else if (cbkname.find("PHYSLITE")!=std::string::npos) kernel="PHYSLITE";
483  else if (cbkname.find("PHYS")!=std::string::npos) kernel="PHYS";
484  else if (stream.find("StreamAOD")!=std::string::npos) kernel=stream.replace(stream.find("Stream"),6,"");
485  else kernel="other";
486  if (cbkname.find("AllExecutedEvents")!=std::string::npos && ostream.find("StreamAOD")!=std::string::npos && cbk->cycle() > maxcycle) {
487  maxcycle = cbk->cycle();
488  allEventsCBK = cbk;
489  }
490  }
491 
492  if (allEventsCBK) {
493  uint64_t nEventsProcessed = allEventsCBK->nAcceptedEvents();
494  double sumOfWeights = allEventsCBK->sumOfEventWeights();
495  double sumOfWeightsSquared = allEventsCBK->sumOfEventWeightsSquared();
496  ANA_MSG_INFO( "CutBookkeepers Accepted " << nEventsProcessed << " SumWei " << sumOfWeights << " sumWei2 " << sumOfWeightsSquared);
497  } else { ANA_MSG_INFO( "No relevent CutBookKeepers found" ); }
498 
499  ANA_MSG_INFO("Found kernel: " << kernel);
500  ANA_MSG_INFO("Found stream: " << stream);
501 
502  // No special jets when running on PHYSLITE
503  if (isPHYSLite) {
504  hasTrkJets = false;
505  }
506  }
507 
508  // Only need to PRW if we aren't running on PHYSLITE
509  if (!isPHYSLite) {
510  ANA_CHECK( objTool.ApplyPRWTool());
511  }
512 
513  // Only need LRT uncertainty tool if there are LRT tracks!
514  if (hasLRT) {
515  ANA_MSG_DEBUG( "Applying LRT uncertainty decorations" );
516  ANA_CHECK( objTool.ApplyLRTUncertainty());
517  }
518 
519  // ============================================================================================
520  // Print some event information for fun:
521  const xAOD::EventInfo* ei = nullptr;
522  ANA_CHECK( event.retrieve( ei, "EventInfo" ) );
523 
524  if (entry==0 || entry % period == 999) {
525  ANA_MSG_INFO( "===>>> start processing event #, " << static_cast< int >( ei->eventNumber() ) <<
526  "run #" << static_cast< int >( ei->runNumber() ) << " " << static_cast< int >( entry ) << " events processed so far <<<===");
527  }
528 
529  if (!isData && entry % period == 0) {
530  float xsectTimesEff = my_XsecDB->xsectTimesEff(ei->mcChannelNumber());
531  ANA_MSG_INFO( "===>>> process cross section " << xsectTimesEff );
532  }
533 
534  bool eventPassesGRL(true);
535  bool eventPassesCleaning(true);
536  bool eventPassesTileTrip(true); // move to xAOD tool!
537  bool eventPassesTrigger(true); // coming soon!
538 
539  if (!isData){
540  float PRW_weight = isPHYSLite? ei->auxdata< float >("PileupWeight_NOSYS"): objTool.GetPileupWeight();
541  ANA_MSG_DEBUG( "PRW Weight = " << PRW_weight);
542  }
543 
544  if (isData) {
545  eventPassesGRL = m_grl->passRunLB(ei->runNumber(), ei->lumiBlock());
546 
547  eventPassesCleaning = !((ei->errorState(xAOD::EventInfo::LAr) == xAOD::EventInfo::Error ) ||
551  }
552  else {
553  // Check SUSY Proc. ID for signal MC (only for first event for now!)
554  if(entry<5){
555  int pdgid1 = 0;
556  int pdgid2 = 0;
557 
558  if( objTool.FindSusyHP(pdgid1, pdgid2) != StatusCode::SUCCESS ){
559  ANA_MSG_WARNING( "SUSY Proc finding failed. Normal for non-SUSY samples." );
560  }
561 
562  if( pdgid1!=0 && pdgid2!=0){ //(just to avoid warnings)
563  // --- Deprecated usage of procID
564  ANA_MSG_INFO( "--- SIGNAL ID1 : " << pdgid1 );
565  ANA_MSG_INFO( " SIGNAL ID2 : " << pdgid2 );
566  ANA_MSG_INFO( "--- XSECTION DETAILS" );
567  }
568  ANA_MSG_INFO( " Xsec (high order) " << my_XsecDB->xsectTimesEff(ei->mcChannelNumber(),0) );
569  ANA_MSG_INFO( " kfactor (high order) " << my_XsecDB->kfactor(ei->mcChannelNumber(),0) );
570  ANA_MSG_INFO( " filter efficiency " << my_XsecDB->efficiency(ei->mcChannelNumber(),0) );
571  }
572  }
573 
574 
575  //Check PV in the event
576  if (objTool.GetPrimVtx() == nullptr) {
577  Warning(APP_NAME , "No PV found for this event! Skipping...");
578  store.clear();
579  continue;
580  }
581 
582 
583  // ====================================================================================================
584  // Object containers - nominal
585  xAOD::ElectronContainer* electrons_nominal(nullptr);
586  xAOD::ShallowAuxContainer* electrons_nominal_aux(nullptr);
587  xAOD::PhotonContainer* photons_nominal(nullptr);
588  xAOD::ShallowAuxContainer* photons_nominal_aux(nullptr);
589  xAOD::MuonContainer* muons_nominal(nullptr);
590  xAOD::ShallowAuxContainer* muons_nominal_aux(nullptr);
591  xAOD::JetContainer* jets_nominal(nullptr);
592  xAOD::ShallowAuxContainer* jets_nominal_aux(nullptr);
593  xAOD::JetContainer* trkjets_nominal(nullptr);
594  xAOD::ShallowAuxContainer* trkjets_nominal_aux(nullptr);
595  xAOD::JetContainer* fatjets_nominal(nullptr);
596  xAOD::ShallowAuxContainer* fatjets_nominal_aux(nullptr);
597  xAOD::TauJetContainer* taus_nominal(nullptr);
598  xAOD::ShallowAuxContainer* taus_nominal_aux(nullptr);
603 
604  // ====================================================================================================
605  // Get the nominal object containers from the event
606  // Electrons
607  if (slices["ele"]) {
608  ANA_MSG_DEBUG( "Nominal electron step" );
609  ANA_CHECK( objTool.GetElectrons(electrons_nominal, electrons_nominal_aux, true, isPHYSLite?"AnalysisElectrons":"Electrons") );
610  ANA_MSG_DEBUG( electrons_nominal->size() << " electrons");
611 
612  for (const auto& electron : *electrons_nominal){
613  if (debug>0 && entry<10) {
614  bool accepted=false;
615  bool idok = electron->passSelection(accepted, "passBaseID");
616  if(idok) ANA_MSG_DEBUG("Electron Baseline ID Decision : " << accepted );
617  else ANA_MSG_DEBUG("Electron Baseline ID Decision not available " );
618  }
619  }
620  }
621 
622  // Photons
623  if( slices["pho"] && stream.find("SUSY12")==std::string::npos) {
624  ANA_MSG_DEBUG( "Nominal photon step" );
625  ANA_CHECK( objTool.GetPhotons(photons_nominal,photons_nominal_aux, true, isPHYSLite?"AnalysisPhotons":"Photons") );
626  ANA_MSG_DEBUG( photons_nominal->size() << " photons");
627  }
628 
629  // Muons
630  if (slices["mu"]) {
631  ANA_MSG_DEBUG( "Nominal muon step" );
632  ANA_CHECK( objTool.GetMuons(muons_nominal, muons_nominal_aux, true, isPHYSLite?"AnalysisMuons":"Muons") );
633  ANA_MSG_DEBUG( muons_nominal->size() << " muons");
634 
635  // check HighPt muons (if required)
636  for (const auto& muon : *muons_nominal){
637  if (debug>0 && entry<10){
638  ANA_MSG_DEBUG("--------------------------------------" );
639  ANA_MSG_DEBUG("Muon pt = " << muon->pt()*0.001 << " , "
640  << "baseline = " << (int)muon->auxdata<char>("baseline") << " ,"
641  << "bad = " << (int)muon->auxdata<char>("bad") << " ,"
642  << "IsHighPt(deco) = " << (int)muon->auxdata<char>("passedHighPtCuts") << " , "
643  << "IsHighPt(only) = " << (int)objTool.IsHighPtMuon(*muon) );
644  }
645  }
646  }
647 
648  // Jets
649  if (slices["jet"]) {
650  ANA_MSG_DEBUG( "Nominal jet step" );
651  ANA_CHECK( objTool.GetJets(jets_nominal, jets_nominal_aux, true, isPHYSLite?"AnalysisJets":"") );
652  ANA_MSG_DEBUG( jets_nominal->size() << " jets");
653  }
654 
655  // TrackJets
656  const xAOD::JetContainer* TJC = nullptr;
657  if (slices["tjet"] && hasTrkJets) {
658  ANA_MSG_DEBUG( "Nominal track jet step" );
659  if( event.retrieve(TJC, TrkJetCollection).isSuccess() ){
660  ANA_CHECK(objTool.GetTrackJets(trkjets_nominal, trkjets_nominal_aux));
661  ANA_MSG_DEBUG( trkjets_nominal->size() << " track jets");
662  } else {
663  ANA_MSG_ERROR("TrackJet collection " << TrkJetCollection.c_str() << " not available in input file. Please check!");
664  return 1;
665  }
666  }
667 
668  // FatJets
669  const xAOD::JetContainer* FJC = nullptr;
670  if(slices["fjet"] && hasFatJets) { // stream.Contains("SUSY10") || stream.Contains("PHYSVAL")){
671  ANA_MSG_DEBUG( "Nominal fat jet step, collection: " << FatJetCollection );
672  if( event.retrieve(FJC, FatJetCollection).isSuccess() ){
673  ANA_CHECK( objTool.GetFatJets(fatjets_nominal, fatjets_nominal_aux, true, "", true) );
674  ANA_MSG_DEBUG( fatjets_nominal->size() << " large R jets");
675  if (debug>0 && entry < 10) {
676  for (const auto& fatjet : *fatjets_nominal) {
677  ANA_MSG_INFO( " FatJet pt = " << fatjet->pt()*0.001 << ", Wtag = " << fatjet->auxdata<int>("Wtag") << ", Ztag = " << fatjet->auxdata<int>("Ztag") );
678  }
679  }
680  } else {
681  ANA_MSG_ERROR("LargeR jet collection " << FatJetCollection.c_str() << " not available in input file. Please check!");
682  return 1;
683  }
684  }
685 
686  // Taus
687  if(slices["tau"]) {
688  ANA_MSG_DEBUG( "Nominal tau step" );
689  ANA_CHECK( objTool.GetTaus(taus_nominal,taus_nominal_aux, true, isPHYSLite?"AnalysisTauJets":"TauJets") );
690  ANA_MSG_DEBUG( taus_nominal->size() << " taus");
691  }
692 
693  // MET Trigger
694  bool passMETtrig = objTool.IsMETTrigPassed();
695  ANA_MSG_DEBUG( "Pass MET trigger " << passMETtrig);
696 
697  // MET
698  metcst_nominal->setStore(metcst_nominal_aux);
699  metcst_nominal->reserve(10);
700  double metsig_cst (0.);
701  mettst_nominal->setStore(mettst_nominal_aux);
702  mettst_nominal->reserve(10);
703  double metsig_tst (0.);
704 
705 
706  // ============================================================================================
707  // Set up the event weights
708  // Base should include all weights that do not depend on individual objects
709  double base_event_weight(1.);
710  if (!isData){
711  base_event_weight *= ei->mcEventWeight();
712  //Check for the new Sherpa 2.2 Reweighting function
713  if(debug>0 && entry < 5){
714  float RW_sh22 = objTool.getSherpaVjetsNjetsWeight("AntiKt4TruthWZDressedJets");
715  Info(APP_NAME , "--- SHERPA2.2 REWEIGHTING : %f", RW_sh22);
716  }
717  }
718 
719  // ============================================================================================
720  // Nominal weights
721  // Additionally define a nominal weight for each object type
722  double elecSF_nominal(1.);
723  double muonSF_nominal(1.);
724  //double tauSF_nominal(1.);
725  double btagSF_nominal(1.);
726  double btagSF_trkJet_nominal(1.);
727 
728  // ====================
729  bool isNominal(true);
730  isys = 0;
731  // Now loop over all the systematic variations
732  for (const auto& sysInfo : systInfoList) {
733  const CP::SystematicSet& sys = sysInfo.systset;
734  ANA_MSG_DEBUG(">>>> Working on variation: \"" <<(sys.name()).c_str() << "\" <<<<<<" );
735 
736  size_t icut = 0;
737  // log all events
738  elcuts[isys][icut] += 1;
739  mucuts[isys][icut] += 1;
740  ++icut;
741 
742  // does the event pass the GRL + Cleaning?
743  if (!(eventPassesGRL && eventPassesCleaning)) {++isys; continue;}
744  elcuts[isys][icut] += 1;
745  mucuts[isys][icut] += 1;
746  ++icut;
747 
748  // Apply TileTrip
749  if (!eventPassesTileTrip) {++isys; continue;}
750  elcuts[isys][icut] += 1;
751  mucuts[isys][icut] += 1;
752  ++icut;
753 
754  if (debug>0 && entry==0) {
755  // Testing trigger
756  std::vector<std::string> trigItem = {"HLT_e26_lhtight_nod0_ivarloose","HLT_mu26_ivarmedium","HLT_mu50","HLT_xe100","HLT_noalg_.*"}; // Trigger for Run 2
757  if (isRun3) trigItem = {"HLT_e26_lhtight_ivarloose_L1EM22VHI","HLT_e26_lhtight_ivarloose_L1eEM26M","HLT_mu24_ivarmedium_L1MU14FCH","HLT_mu50_L1MU14FCH","HLT_xe100","HLT_noalg_.*"}; // Trigger for Run 3
758  for (int it = 0; it < (int) trigItem.size(); it++) {
759  bool passed = objTool.IsTrigPassed(trigItem[it]);
760  float prescale = objTool.GetTrigPrescale(trigItem[it]);
761  ANA_MSG_DEBUG( "Pass " << trigItem[it].c_str() << " trigger? " << (int)passed << ", prescale " << prescale );
762  //
763  // example of more sophisticated trigger access
764  const Trig::ChainGroup* cg = objTool.GetTrigChainGroup(trigItem[it]);
765  bool cg_passed = cg->isPassed();
766  float cg_prescale = cg->getPrescale();
767  ANA_MSG_DEBUG( "ChainGroup " << trigItem[it].c_str() << ": passing trigger? " << (int)cg_passed << ", prescale " << cg_prescale );
768  for (const auto& cg_trig : cg->getListOfTriggers()) {
769  ANA_MSG_DEBUG("\t\t includes trigger " << cg_trig.c_str() );
770  }
771  }
772  }
773 
774  // Trigger (coming soon...)
775  if (!eventPassesTrigger) {++isys; continue;}
776  elcuts[isys][icut] += 1;
777  mucuts[isys][icut] += 1;
778  ++icut;
779 
780  // ====================================================================================================
781  // Object containers - systematics
782 
783  // Generic pointers for either nominal or systematics copy
784  xAOD::ElectronContainer* electrons(electrons_nominal);
785  xAOD::PhotonContainer* photons(photons_nominal);
786  xAOD::MuonContainer* muons(muons_nominal);
787  xAOD::JetContainer* jets(jets_nominal);
788  xAOD::JetContainer* trkjets(trkjets_nominal);
789  xAOD::TauJetContainer* taus(taus_nominal);
790  xAOD::MissingETContainer* metcst(metcst_nominal);
791  xAOD::MissingETContainer* mettst(mettst_nominal);
792  xAOD::MissingETAuxContainer* metcst_aux(metcst_nominal_aux);
793  xAOD::MissingETAuxContainer* mettst_aux(mettst_nominal_aux);
794 
796 
797 
798  // Tell the SUSYObjDef_xAOD which variation to apply
799  if (objTool.applySystematicVariation(sys) != StatusCode::SUCCESS) {
800  ANA_MSG_INFO( "Cannot configure SUSYTools for systematic var. " << (sys.name()).c_str() );
801  } else {
802  ANA_MSG_DEBUG( "Variation " << (sys.name()).c_str() << " configured...");
803  }
804  if (sysInfo.affectsKinematics || sysInfo.affectsWeights) isNominal = false;
805 
806  // If nominal, compute the nominal weight, otherwise recompute the weight
807  double event_weight = base_event_weight;
808 
809  // If necessary (kinematics affected), make a shallow copy with the variation applied
810  bool syst_affectsElectrons = ST::testAffectsObject(xAOD::Type::Electron, sysInfo.affectsType);
811  bool syst_affectsMuons = ST::testAffectsObject(xAOD::Type::Muon, sysInfo.affectsType);
812  bool syst_affectsTaus = ST::testAffectsObject(xAOD::Type::Tau, sysInfo.affectsType);
813  bool syst_affectsPhotons = ST::testAffectsObject(xAOD::Type::Photon, sysInfo.affectsType);
814  bool syst_affectsJets = ST::testAffectsObject(xAOD::Type::Jet, sysInfo.affectsType);
815  bool syst_affectsBTag = ST::testAffectsObject(xAOD::Type::BTag, sysInfo.affectsType);
816  //bool syst_affectsMET = ST::testAffectsObject(xAOD::Type::MissingET, sysInfo.affectsType);
817 
818 
819  if (sysInfo.affectsKinematics) {
820  if (slices["ele"] && syst_affectsElectrons) {
821  xAOD::ElectronContainer* electrons_syst(nullptr);
822  xAOD::ShallowAuxContainer* electrons_syst_aux(nullptr);
823  ANA_CHECK( objTool.GetElectrons(electrons_syst, electrons_syst_aux, true, isPHYSLite?"AnalysisElectrons":"Electrons") );
824  electrons = electrons_syst;
825  }
826 
827  if (slices["mu"] && syst_affectsMuons) {
828  xAOD::MuonContainer* muons_syst(nullptr);
829  xAOD::ShallowAuxContainer* muons_syst_aux(nullptr);
830  ANA_CHECK( objTool.GetMuons(muons_syst, muons_syst_aux, true, isPHYSLite?"AnalysisMuons":"Muons") );
831  muons = muons_syst;
832  }
833 
834  if(slices["tau"] && syst_affectsTaus) {
835  xAOD::TauJetContainer* taus_syst(nullptr);
836  xAOD::ShallowAuxContainer* taus_syst_aux(nullptr);
837  ANA_CHECK( objTool.GetTaus(taus_syst,taus_syst_aux, true, isPHYSLite?"AnalysisTauJets":"TauJets") );
838  taus = taus_syst;
839  }
840 
841  if(slices["pho"] && syst_affectsPhotons) {
842  xAOD::PhotonContainer* photons_syst(nullptr);
843  xAOD::ShallowAuxContainer* photons_syst_aux(nullptr);
844  ANA_CHECK( objTool.GetPhotons(photons_syst,photons_syst_aux, true, isPHYSLite?"AnalysisPhotons":"Photons") );
845  photons = photons_syst;
846  }
847 
848  if (slices["jet"] && syst_affectsJets) {
849  xAOD::JetContainer* jets_syst(nullptr);
850  xAOD::ShallowAuxContainer* jets_syst_aux(nullptr);
851  ANA_CHECK( objTool.GetJetsSyst(*jets_nominal, jets_syst, jets_syst_aux, true, isPHYSLite?"AnalysisJets":"") );
852  jets = jets_syst;
853  }
854 
855  if (slices["btag"] && syst_affectsBTag) {
856  xAOD::JetContainer* trkjets_syst(nullptr);
857  xAOD::ShallowAuxContainer* trkjets_syst_aux(nullptr);
858  ANA_CHECK( objTool.GetTrackJets(trkjets_syst, trkjets_syst_aux) );
859  trkjets = trkjets_syst;
860  }
861 
866  if (slices["met"]) {
867  metcst_syst->setStore(metcst_syst_aux);
868  mettst_syst->setStore(mettst_syst_aux);
869  metcst_nominal->reserve(10);
870  metcst_nominal->reserve(10);
871 
872  metcst = metcst_syst;
873  mettst = mettst_syst;
874  metcst_aux = metcst_syst_aux;
875  mettst_aux = mettst_syst_aux;
876  }
877  }
878 
879 
880  // *************** ************************ *****************
881  // *************** Now start processing the event *****************
882  // *************** ************************ *****************
883 
884  // Electrons
885  if (slices["ele"] && (isNominal || (sysInfo.affectsKinematics && syst_affectsElectrons))) {
886  for (const auto& el : *electrons) {
887  //objTool.IsSignalElectron( *el ) ; // TODO: check that this should be removed /CO
888 
889  if (!isData) {
891  if (truthEle) {
892  ANA_MSG_DEBUG( " Truth Electron pt " << truthEle->pt() << " eta " << truthEle->eta() );
893  ANA_MSG_DEBUG( " IsPrompt() = " << objTool.isPrompt(el) );
894  } else { ANA_MSG_DEBUG( " Truth Electron not found" ); }
895  }
896  }
897  }
898 
899  // Muons
900  if (slices["mu"] && (isNominal || (sysInfo.affectsKinematics && syst_affectsMuons))) {
901  for (const auto& mu : *muons) {
902  // TODO: check that these should be removed too /CO
903  //objTool.IsSignalMuon( *mu ) ;
904  //objTool.IsCosmicMuon( *mu ) ;
905 
906  if (!isData) {
907  // Example to access MC type/origin
908  int muonTruthType = 0;
909  int muonTruthOrigin = 0;
910  const xAOD::TrackParticle* trackParticle = mu->primaryTrackParticle();
911  if (trackParticle) {
912  static SG::AuxElement::Accessor<int> acc_truthType("truthType");
913  static SG::AuxElement::Accessor<int> acc_truthOrigin("truthOrigin");
914  if (acc_truthType.isAvailable(*trackParticle) ) muonTruthType = acc_truthType(*trackParticle);
915  if (acc_truthOrigin.isAvailable(*trackParticle)) muonTruthOrigin = acc_truthOrigin(*trackParticle);
916  const xAOD::TruthParticle* truthMu = xAOD::TruthHelpers::getTruthParticle(*trackParticle);
917  if (truthMu) {
918  ANA_MSG_DEBUG( " Truth Muon pt " << truthMu->pt() << " eta " << truthMu->eta() );
919  ANA_MSG_DEBUG( " type " << muonTruthType << " origin " << muonTruthOrigin );
920  } else { ANA_MSG_DEBUG( "Truth Muon not found" ); }
921  }
922  }
923  }
924  }
925 
926  // Jets
927  if (slices["jet"] && (isNominal || (sysInfo.affectsKinematics && syst_affectsJets))) {
928  for (const auto& jet : *jets) {
929  objTool.IsBJet( *jet) ;
930  }
931  }
932 
933  // Taus
934  if (slices["tau"] && (isNominal || (sysInfo.affectsKinematics && syst_affectsTaus))) {
935  for(const auto& tau : *taus){
936  if (!isData){
937  const xAOD::TruthParticle* truthTau = T2MT->getTruth(*tau) ;
938  if (tau->auxdata<char>("IsTruthMatched") || !truthTau){
939  ANA_MSG_DEBUG("Tau was matched to a truth tau, which has "
940  << int(tau->auxdata<size_t>("TruthProng"))
941  << " prongs and a charge of "
942  << tau->auxdata<int>("TruthCharge"));
943  } else { ANA_MSG_DEBUG( "Tau was not matched to truth" ); }
944  }
945  }
946  }
947 
948  // Overlap Removal
949  ANA_MSG_DEBUG( "Overlap removal" );
950  if (isNominal || (sysInfo.affectsKinematics && (syst_affectsElectrons || syst_affectsMuons || syst_affectsJets))) {
951  if(stream.find("SUSY3")!=std::string::npos) { ANA_CHECK( objTool.OverlapRemoval(electrons, muons, jets, 0, taus) ); }
952  else if(stream.find("SUSY10")!=std::string::npos) { ANA_CHECK( objTool.OverlapRemoval(electrons, muons, jets, 0, 0, fatjets_nominal) ); }
953  else{ ANA_CHECK( objTool.OverlapRemoval(electrons, muons, jets, photons) ); }
954  }
955 
956  // Jets - get goodjets
957  if (slices["jet"]) {
959  ANA_MSG_DEBUG("GoodJets?");
960  for (const auto& jet : *jets) {
961  if (jet->auxdata<char>("baseline") == 1 &&
962  jet->auxdata<char>("passOR") == 1 &&
963  jet->auxdata<char>("signal") == 1 &&
964  jet->pt() > 20000. && ( std::abs(jet->eta()) < 2.5) ) {
965  goodJets->push_back(jet);
966  }
967  // PHYSLITE doesn't bother trying to keep JetInputType as a decoration
968  if (stream.compare("PHYSVAL")==0) jetInputType = jet->getInputType();
969  else if (stream.find("PHYS")!=std::string::npos) jetInputType = xAOD::JetInput::PFlow;
970  else if (stream.find("SUSY")!=std::string::npos) {
971  std::string jetcoll = jets_nominal_aux->name();
972  if (jetcoll.find("EMTopo")!=std::string::npos) jetInputType = xAOD::JetInput::EMTopo;
973  else if (jetcoll.find("EMPFlow")!=std::string::npos) jetInputType = xAOD::JetInput::PFlow;
974  }
975  }
976 
977  std::string jetCollection = xAOD::JetInput::typeName(jetInputType);
978  ANA_MSG_DEBUG ("xAOD::JetInputtypeName: " << jetCollection);
979  if (jetCollection == "EMPFlow") {
980  if (objTool.treatAsYear()<2017 && !objTool.IsPFlowCrackVetoCleaning(electrons, photons)) {
981  ANA_MSG_WARNING( "Event failed 2015+2016 IsPFlowCrackVetoCleaning(electrons, photons), skipping..." );
982  store.clear();
983  continue;
984  }
985  }
986  }
987 
988  if (slices["met"] && (isNominal || sysInfo.affectsKinematics)) {
989  ANA_MSG_DEBUG( "MET step" );
990  if(stream.find("SUSY3")!=std::string::npos){
991  if (debug>0) Info(APP_NAME, "METCST?");
992  ANA_CHECK( objTool.GetMET(*metcst, jets, electrons, muons, photons, taus, false, false) ); // CST=false, JVT=false (No JVT if you use CST)
993  if (debug>0) Info(APP_NAME, "METSignificance CST?");
994  ANA_CHECK( objTool.GetMETSig(*metcst, metsig_cst, false, false) );
995 
996  if (debug>0) Info(APP_NAME, "METTST?");
997  ANA_CHECK( objTool.GetMET(*mettst, jets, electrons, muons, photons, taus, true, true) );
998  if (debug>0) Info(APP_NAME, "METSignificance TST?");
999  ANA_CHECK( objTool.GetMETSig(*mettst, metsig_tst, true, true) );
1000  }
1001  else{
1002  if (debug>0) Info(APP_NAME, "METCST?");
1003  ANA_CHECK( objTool.GetMET(*metcst, jets, electrons, muons, photons, 0, false, false) ); // CST=false, JVT=false (No JVT if you use CST)
1004  if (debug>0) Info(APP_NAME, "METSignificance CST?");
1005  ANA_CHECK( objTool.GetMETSig(*metcst, metsig_cst, false, false) );
1006 
1007  if (debug>0) Info(APP_NAME, "METTST?");
1008  ANA_CHECK( objTool.GetMET(*mettst, jets, electrons, muons, photons, 0, true, true) );
1009  if (debug>0) Info(APP_NAME, "METSignificance TST?");
1010  ANA_CHECK( objTool.GetMETSig(*mettst, metsig_tst, true, true) );
1011  }
1012  if (debug>0) Info(APP_NAME, "MET done");
1013  }
1014 
1015  // ========================================
1016  // Electrons
1017  float elecSF = 1.0;
1018  int el_idx[nSel] = {0};
1019  if (slices["ele"]) {
1020  ANA_MSG_DEBUG( "Electron step - selection" );
1021  for (const auto& el : *electrons) {
1022  if ( el->auxdata<char>("passOR") == 0 ) {
1023  el_idx[passOR]++;
1024  continue;
1025  }
1026  if ( el->auxdata<char>("baseline") == 1 ) {
1027  el_idx[baseline]++;
1028  }
1029  if ( el->auxdata<char>("signal") == 1 ) {
1030  el_idx[signallep]++;
1031  if ( el->pt() > 20000. ) {
1032  el_idx[goodpt]++;
1033 
1034  bool passTM=false;
1035  for(const auto& t : el_triggers){
1036  passTM |= (objTool.IsTrigPassed(t) && objTool.IsTrigMatched(el, t));
1037  }
1038  if(passTM)
1039  el_idx[trgmatch]++;
1040 
1041  //check ChID BDT
1042  //Info(APP_NAME, "electron passChID : %d , BDT : %.3f", el->auxdata<char>("passChID") , el->auxdata<double>("ecisBDT"));
1043  }
1044  }
1045  }
1046  if (isNominal || syst_affectsElectrons) {
1047  if(!isData) elecSF = objTool.GetTotalElectronSF(*electrons);
1048  }
1049 
1050  if (isNominal) {elecSF_nominal = elecSF;}
1051  else if (!syst_affectsElectrons) {elecSF = elecSF_nominal;}
1052  event_weight *= elecSF;
1053  }
1054 
1055  // ====================
1056  // Muons
1057  float muonSF = 1.0;
1058  int mu_idx[nSel] = {0};
1059  bool passTMtest = false;
1060 
1061  TString muTrig2015 = "HLT_mu20_iloose_L1MU15_OR_HLT_mu50"; //"HLT_mu18_mu8noL1"; //"HLT_mu20_iloose_L1MU15_OR_HLT_mu50";
1062  TString muTrig2016 = "HLT_mu26_ivarmedium_OR_HLT_mu50";
1063  TString muTrig2017 = "HLT_mu26_ivarmedium_OR_HLT_mu50";
1064  TString muTrig2022 = "HLT_mu24_ivarmedium_L1MU14FCH_OR_HLT_mu50_L1MU14FCH";
1065 
1066  std::vector<std::string> muTrigs2015 = {"HLT_mu20_iloose_L1MU15","HLT_mu50"}; //"HLT_mu18_mu8noL1"; //"HLT_mu20_iloose_L1MU15_OR_HLT_mu50";
1067  std::vector<std::string> muTrigs2016 = {"HLT_mu26_ivarmedium","HLT_mu50"};
1068  std::vector<std::string> muTrigs2017 = {"HLT_mu26_ivarmedium","HLT_mu50"};
1069  std::vector<std::string> muTrigs2022 = {"HLT_mu24_ivarmedium_L1MU14FCH","HLT_mu50_L1MU14FCH"};
1070 
1071  if (slices["mu"]) {
1072  ANA_MSG_DEBUG( "Muon step - selection" );
1073  for (const auto& mu : *muons) {
1074  if ( mu->auxdata<char>("passOR") == 0 ) {
1075  mu_idx[passOR]++;
1076  continue;
1077  }
1078  if ( mu->auxdata<char>("baseline") == 1 ) {
1079  mu_idx[baseline]++;
1080  if ( mu->auxdata<char>("cosmic") == 1 ) {
1081  mu_idx[cosmic]++;
1082  }
1083  }
1084  if ( mu->auxdata<char>("signal") == 1 ) {
1085  mu_idx[signallep]++;
1086  if ( mu->pt() > 20000. ) {
1087  mu_idx[goodpt]++;
1088 
1089  bool passTM=false;
1090  for(const auto& t : mu_triggers){
1091  if (objTool.IsTrigPassed(t)) ANA_MSG_DEBUG("Pass " << t << " : " << (int)objTool.IsTrigMatched(mu, t));
1092  else ANA_MSG_DEBUG("Pass " << t << " : " << 0);
1093  passTM |= (objTool.IsTrigPassed(t) && objTool.IsTrigMatched(mu, t));
1094  }
1095  if(passTM)
1096  mu_idx[trgmatch]++;
1097 
1098  }
1099 
1100  std::vector<std::string> my_mu_trigs;
1101  if(!isData){
1102  if(objTool.treatAsYear()==2015)
1103  my_mu_trigs=muTrigs2015;
1104  else if(objTool.treatAsYear()==2016)
1105  my_mu_trigs=muTrigs2016;
1106  else if(objTool.treatAsYear()==2017 || objTool.treatAsYear()==2018)
1107  my_mu_trigs=muTrigs2017;
1108  else
1109  my_mu_trigs=muTrigs2022;
1110  }
1111  else{
1112  my_mu_trigs=muTrigs2016;
1113  }
1114  for (auto& t : my_mu_trigs) passTMtest |= (objTool.IsTrigPassed(t) && objTool.IsTrigMatched(mu,t));
1115  }
1116  }
1117  }
1118 
1119 
1120  // ========================================
1121  // Photons
1122  if (slices["pho"]) {
1123  ANA_MSG_DEBUG( "Photon step - selection" );
1124  int n_SignalPhotons = 0;
1125  for (const auto& y : *photons) {
1126  if ( y->auxdata<char>("passOR") && y->auxdata<char>("signal")) {
1127  n_SignalPhotons++;
1128  ANA_MSG_DEBUG( "Photon pt = "<< y->pt()*1e-3
1129  << ", idSF = " << objTool.GetSignalPhotonSF(*y,true,false,false)
1130  << ", isoSF = " << objTool.GetSignalPhotonSF(*y,false,true,false)
1131  << ", trigSF = " << objTool.GetSignalPhotonSF(*y,false,false,true)
1132  );
1133  }
1134  }
1135  if(n_SignalPhotons>0) ANA_MSG_DEBUG( "Total Event photon SF = " << objTool.GetTotalPhotonSF(*photons, true, true, true));
1136  }
1137 
1138  // ====================
1139  // Check for combined e-mu triggers
1140  bool comb_trig_check = false;
1141 
1142  if (slices["ele"] && slices["mu"] && comb_trig_check) {
1143  ANA_MSG_DEBUG( "Electron/Muon step - trigger" );
1144  if (objTool.IsTrigPassed("HLT_2e12_lhloose_L12EM10VH"))
1145  ANA_MSG_DEBUG(" 2e12_lhloose_L12EM10VH SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton"));
1146  if (objTool.IsTrigPassed("HLT_e17_lhloose_mu14"))
1147  ANA_MSG_DEBUG("e17_lhloose_mu14 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1148  if (objTool.IsTrigPassed("HLT_2e17_lhvloose_nod0"))
1149  ANA_MSG_DEBUG(" 2e17_lhvloose_nod0 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1150  if (objTool.IsTrigPassed("HLT_2e17_lhvloose_nod0_L12EM15VHI"))
1151  ANA_MSG_DEBUG(" 2e17_lhvloose_nod0_L12EM15VHI SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1152  if (objTool.IsTrigPassed("HLT_e17_lhloose_nod0_mu14"))
1153  ANA_MSG_DEBUG(" e17_lhloose_nod0_mu14 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1154  if (objTool.IsTrigPassed("HLT_e7_lhmedium_mu24"))
1155  ANA_MSG_DEBUG(" e7_lhmedium_mu24 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1156  if (objTool.IsTrigPassed("HLT_e7_lhmedium_nod0_mu24"))
1157  ANA_MSG_DEBUG(" e7_lhmedium_nod0_mu24 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1158  if (objTool.IsTrigPassed("HLT_mu18_mu8noL1"))
1159  ANA_MSG_DEBUG(" mu18_mu8noL1 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1160  if (objTool.IsTrigPassed("HLT_mu20_mu8noL1"))
1161  ANA_MSG_DEBUG(" mu20_mu8noL1 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1162  if (objTool.IsTrigPassed("HLT_2mu10"))
1163  ANA_MSG_DEBUG(" 2mu10 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1164  if (objTool.IsTrigPassed("HLT_2mu14"))
1165  ANA_MSG_DEBUG(" 2mu14 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "diLepton") );
1166  if (objTool.IsTrigPassed("HLT_2e12_lhloose_mu10"))
1167  ANA_MSG_DEBUG(" 2e12_lhloose_mu10 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "multiLepton") );
1168  if (objTool.IsTrigPassed("HLT_2e12_lhloose_nod0_mu10"))
1169  ANA_MSG_DEBUG(" 2e12_lhloose_nod0_mu10 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "multiLepton") );
1170  if (objTool.IsTrigPassed("HLT_e12_lhloose_2mu10"))
1171  ANA_MSG_DEBUG(" e12_lhloose_2mu10 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "multiLepton") );
1172  if (objTool.IsTrigPassed("HLT_e12_lhloose_nod0_2mu10"))
1173  ANA_MSG_DEBUG(" e12_lhloose_nod0_2mu10 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "multiLepton") );
1174  if (objTool.IsTrigPassed("HLT_3mu6"))
1175  ANA_MSG_DEBUG(" 3mu6 SF: " << objTool.GetTriggerGlobalEfficiencySF(*electrons_nominal, *muons_nominal, "multiLepton") );
1176  }
1177 
1178  if (slices["mu"] && ((!isData && isNominal) || syst_affectsMuons)) {
1179  ANA_MSG_DEBUG( "Muon step - trigger" );
1180  if(passTMtest || 1){ //objTool.IsTrigPassed(muTrig.ReplaceAll("_OR_",",").Data())){
1181  ANA_MSG_DEBUG("MUON BEFORE SF = " << muonSF << " " << objTool.treatAsYear() << " " << objTool.GetRandomRunNumber() << " " << objTool.GetPileupWeight() );
1182  if(objTool.treatAsYear()==2015) muonSF = objTool.GetTotalMuonSF(*muons, true, true, muTrig2015.Data());
1183  else if(objTool.treatAsYear()==2016) muonSF = objTool.GetTotalMuonSF(*muons, true, true, muTrig2016.Data());
1184  else if(objTool.treatAsYear()==2017) muonSF = objTool.GetTotalMuonSF(*muons, true, true, muTrig2017.Data());
1185  else if(objTool.treatAsYear()==2018) muonSF = objTool.GetTotalMuonSF(*muons, true, true, muTrig2017.Data());
1186  else if(objTool.treatAsYear()==2022) muonSF = objTool.GetTotalMuonSF(*muons, true, true, muTrig2022.Data());
1187  ANA_MSG_DEBUG("MUON AFTER SF = " << muonSF << " " << objTool.treatAsYear() << " " << objTool.GetRandomRunNumber() << " " << objTool.GetPileupWeight() );
1188  }
1189  }
1190 
1191  if (slices["mu"]) {
1192  if (isNominal) { muonSF_nominal = muonSF; }
1193  else if (!syst_affectsMuons) { muonSF = muonSF_nominal; }
1194  event_weight *= muonSF;
1195  }
1196 
1197  // ====================
1198  // Taus
1199  if (slices["tau"] && isNominal && !isData && stream.find("SUSY3")!=std::string::npos) {
1200  ANA_MSG_DEBUG( "Tau step - SF" );
1201  if (entry<10){
1202  // CP::SystematicSet testSet("TAUS_TRUEHADTAU_EFF_TRIGGER_TOTAL2016__1up");
1203  // testSet.insert( CP::SystematicVariation("TAUS_TRUEHADTAU_EFF_TRIGGER_TOTAL2016", 1) );
1204 
1205  // CP::SystematicSet testSet("TAUS_TRUEHADTAU_EFF_TRIGGER_SYST2015__1up");
1206  // testSet.insert( CP::SystematicVariation("TAUS_TRUEHADTAU_EFF_TRIGGER_SYST2015", 1) );
1207  // if(objTool.applySystematicVariation(testSet) != StatusCode::SUCCESS){
1208  // Error( APP_NAME, "Problems with tau trig eff systematic settings!");
1209  // }
1210 
1211  for (const auto& tau : *taus) {
1212  ANA_MSG_INFO( "Tau pt = "<< tau->pt()*1e-3
1213  << ", idSF = " << objTool.GetSignalTauSF(*tau,true,false,"tau125_medium1_tracktwo")
1214  << ", trigSF = " << objTool.GetSignalTauSF(*tau,false,true,"tau125_medium1_tracktwo")
1215  << ", totSF = " << objTool.GetSignalTauSF(*tau,true,true,"tau125_medium1_tracktwo")
1216  );
1217  }
1218  ANA_MSG_INFO( "Total Event Tau SF = " << objTool.GetTotalTauSF(*taus, true, true, "tau125_medium1_tracktwo") );
1219  }
1220  }
1221 
1222  ANA_MSG_DEBUG( "Lepton SF done" );
1223 
1224  // ====================
1225  // Jets
1226  int jet_idx[nSel] = {0};
1227  if (slices["jet"]) {
1228  ANA_MSG_DEBUG( "Jet step - selection" );
1229  for (const auto& jet : *goodJets) {
1230  if ( jet->auxdata<char>("bad") == 1 )
1231  jet_idx[bad]++;
1232  if ( jet->auxdata<char>("passOR") == 0 ) {
1233  jet_idx[passOR]++;
1234  continue;
1235  }
1236  if ( jet->auxdata<char>("baseline") == 1 ) {
1237  jet_idx[baseline]++;
1238  if ( jet->pt() > 50000. )
1239  jet_idx[goodpt]++;
1240  }
1241  if ( jet->auxdata<char>("bjet") == 1 )
1242  jet_idx[btagged]++;
1243  }
1244  }
1245 
1246  // compute b-tagging SF
1247  float btagSF(1.);
1248  if (slices["jet"] && slices["btag"]) {
1249  ANA_MSG_DEBUG( "(b)Jet step - selection" );
1250  if (!isData) {
1251  if (isNominal) {btagSF = btagSF_nominal = objTool.BtagSF(jets);}
1252  else if (syst_affectsBTag || (sysInfo.affectsKinematics && syst_affectsJets)) {btagSF = objTool.BtagSF(jets);}
1253  else {btagSF = btagSF_nominal;}
1254  }
1255  event_weight *= btagSF;
1256 
1257  // checking BtagSF
1258  if ( stream.find("SUSY1")!=std::string::npos ) { // PHYSVAL doesn't contain truthlabel for VR jets
1259  float btagSF_trkJet(1.);
1260  if (!isData) {
1261  if (isNominal) {btagSF_trkJet = btagSF_trkJet_nominal = objTool.BtagSF_trkJet(trkjets);}
1262  else if (syst_affectsBTag || (sysInfo.affectsKinematics && syst_affectsJets)) {btagSF_trkJet = objTool.BtagSF_trkJet(trkjets);}
1263  else {btagSF_trkJet = btagSF_trkJet_nominal;}
1264  }
1265  event_weight *= btagSF_trkJet;
1266  }
1267  }
1268 
1269  ANA_MSG_DEBUG("Jet SF done");
1270 
1271  // ====================
1272  // Cosmics
1273  if (slices["ele"] && slices["mu"] && mu_idx[cosmic] == 0 ) {
1274  elcuts[isys][icut] += 1;
1275  mucuts[isys][icut] += 1;
1276  ++icut;
1277 
1278  bool passlep = (el_idx[baseline] + mu_idx[baseline]) == 1;
1279  if (passlep) {
1280  bool passel = el_idx[baseline] == 1;
1281  bool passmu = mu_idx[baseline] == 1;
1282  if (passel) elcuts[isys][icut] += 1;
1283  if (passmu) mucuts[isys][icut] += 1;
1284  ++icut;
1285 
1286  passel = el_idx[signallep] == 1;
1287  passmu = mu_idx[signallep] == 1;
1288  if (passel) elcuts[isys][icut] += 1;
1289  if (passmu) mucuts[isys][icut] += 1;
1290  ++icut;
1291 
1292  passel = el_idx[goodpt] == 1;
1293  passmu = mu_idx[goodpt] == 1;
1294  if (passel) elcuts[isys][icut] += 1;
1295  if (passmu) mucuts[isys][icut] += 1;
1296  ++icut;
1297 
1298  passel = el_idx[trgmatch] == 1;
1299  passmu = mu_idx[trgmatch] == 1;
1300  if (passel) elcuts[isys][icut] += 1;
1301  if (passmu) mucuts[isys][icut] += 1;
1302  ++icut;
1303 
1304  if (jet_idx[goodpt] >= 2) {
1305  if (passel) elcuts[isys][icut] += 1;
1306  if (passmu) mucuts[isys][icut] += 1;
1307  ++icut;
1308  } // good jets
1309  } // passlep
1310  } // cosmics
1311 
1312  ANA_MSG_DEBUG("Lepton SF done");
1313  ANA_MSG_DEBUG("Final event weight = " << event_weight);
1314 
1315  // Clean up the systematics copies
1316  if (sysInfo.affectsKinematics) {
1317  delete metcst;
1318  delete metcst_aux;
1319  delete mettst;
1320  delete mettst_aux;
1321  }
1322 
1323  isNominal = false;
1324  ANA_MSG_DEBUG(">>>> Finished with variation: \"" <<(sys.name()).c_str() << "\" <<<<<<" );
1325 
1326 
1327  ++isys;
1328  }
1329 
1330 
1331  //Reset systematics settings for next event
1332  ANA_CHECK( objTool.resetSystematics());
1333 
1334 
1335  // The containers created by the shallow copy are owned by you. Remember to delete them.
1336  // In our case, all of these were put into the store
1337 
1338  // store.print();
1339  store.clear();
1340 
1341  // Close with a message:
1342  if (entry==0 || entry % period == 99) {
1343  Info( APP_NAME,
1344  "===>>> done processing event #%i, "
1345  "run #%i %i events processed so far <<<===",
1346  static_cast< int >( ei->eventNumber() ),
1347  static_cast< int >( ei->runNumber() ),
1348  static_cast< int >( entry + 1 ) );
1349  }
1350 
1351 
1352  }
1353 
1354  m_clock0.Stop();
1355  m_clock2.Stop();
1356 
1357  // CALLGRIND_TOGGLE_COLLECT;
1358  // CALLGRIND_DUMP_STATS;
1359  // ProfilerStop();
1360 
1361  Info( APP_NAME,
1362  "Time per event: (CPU / WALL)\n"
1363  " Entire loop - %f / %f ms\n"
1364  " First event - %f / %f ms\n"
1365  " Excluding first event - %f / %f ms",
1366  m_clock0.CpuTime() * 1e3 / entries, m_clock0.RealTime() * 1e3 / entries,
1367  m_clock1.CpuTime() * 1e3, m_clock1.RealTime() * 1e3,
1368  m_clock2.CpuTime() * 1e3 / (entries - 1), m_clock2.RealTime() * 1e3 / (entries - 1));
1369 
1370 
1371  // Dump the cutflow:
1372  isys = 0;
1373  for (const auto& sysInfo : systInfoList) {
1374  const CP::SystematicSet& sys = sysInfo.systset;
1375  ANA_MSG_INFO( "-- Dummy Cutflow -- >>>> Variation " << sys.name().c_str() << " <<<<" );
1376  for (size_t icut = 0; icut < Ncuts; ++icut) {
1377  ANA_MSG_INFO( "Cut " << icut << "(" << cut_name[icut] << ")"
1378  << "-> el: " << elcuts[isys][icut] << ", mu: " << mucuts[isys][icut] );
1379  }
1380  ++isys;
1381  }
1382 
1383  // Return gracefully:
1384  return 0;
1385 }
1386 
1387 //====================================================================================================
1388 //====================================================================================================
1389 std::vector<std::string> getTokens(TString line, const TString& delim) {
1390  std::vector<std::string> vtokens;
1391  TObjArray* tokens = TString(std::move(line)).Tokenize(delim); //delimiters
1392  if(tokens->GetEntriesFast()) {
1393  TIter iString(tokens);
1394  TObjString* os = nullptr;
1395  while ((os=(TObjString*)iString())) {
1396  vtokens.push_back( os->GetString().Data() );
1397  }
1398  }
1399  delete tokens;
1400 
1401  return vtokens;
1402 }
1403 
1404 //====================================================================================================
1405 // get list of containers in file ~ checkxAOD.py style
1406 std::map<std::string, std::string> getFileContainers(std::unique_ptr<TFile> &f) {
1407  std::map< std::string, std::string > containers;
1408  std::unique_ptr< TTree > ctree( dynamic_cast<TTree*>( f->Get("CollectionTree") ) );
1409  TObjArray *blist = dynamic_cast<TObjArray*>( ctree->GetListOfBranches() );
1410  std::smatch match;
1411  std::string result, bname;
1412  for (int ib=0; ib<blist->GetEntries(); ++ib) {
1413  TBranch *b = dynamic_cast<TBranch*>( blist->At(ib) );
1414  bname = b->GetName();
1415  if (bname.find("Aux")==std::string::npos) continue;
1416  //
1417  if (std::regex_search(bname, match, std::regex("(.*)Aux\\..*")) && match.size() > 1) { result = match.str(1); } // static
1418  else if (std::regex_search(bname, match, std::regex("(.*)AuxDyn\\..*")) && match.size() > 1) { result = match.str(1); } // dynamic
1419  //
1420  if ((!result.empty()) && (containers.find(result)==containers.end()) && (ctree->GetBranch(result.c_str()))) {
1421  containers[result] = ctree->GetBranch(result.c_str())->GetClassName();
1422  }
1423  result = "";
1424  }
1425  return containers;
1426 }
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
POOL::TEvent::retrieveMetaInput
StatusCode retrieveMetaInput(const T *&obj, const std::string &key)
Definition: PhysicsAnalysis/POOLRootAccess/POOLRootAccess/TEvent.h:89
ShallowCopy.h
bad
@ bad
Definition: SUSYToolsTester.cxx:95
TestSUSYToolsAlg.ifile
ifile
Definition: TestSUSYToolsAlg.py:92
ST::SUSYObjDef_xAOD::resetSystematics
StatusCode resetSystematics() override final
Definition: SUSYObjDef_xAOD.cxx:2033
python.AtlRunQueryAMI.period
period
Definition: AtlRunQueryAMI.py:225
ST::SUSYObjDef_xAOD::isPrompt
bool isPrompt(const xAOD::IParticle *part) const override final
Definition: Truth.cxx:23
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
TrigJetMonitorAlgorithm.jetcoll
jetcoll
Definition: TrigJetMonitorAlgorithm.py:1161
ST::SUSYObjDef_xAOD::IsHighPtMuon
bool IsHighPtMuon(const xAOD::Muon &input) const override final
Definition: Muons.cxx:384
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
ST::SUSYObjDef_xAOD::GetRandomRunNumber
unsigned int GetRandomRunNumber(bool muDependentRRN=true) override final
Definition: SUSYObjDef_xAOD.cxx:2955
IGoodRunsListSelectionTool.h
CutBookkeeper.h
ST::SUSYObjDef_xAOD::GetJets
StatusCode GetJets(xAOD::JetContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &jetkey="", const xAOD::JetContainer *containerToBeCopied=nullptr) override final
Definition: Jets.cxx:76
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
ST::SUSYObjDef_xAOD::GetTotalTauSF
double GetTotalTauSF(const xAOD::TauJetContainer &taus, const bool idSF=true, const bool triggerSF=true, const std::string &trigExpr="tau25_medium1_tracktwo") override final
Definition: Taus.cxx:227
ST::SUSYObjDef_xAOD::BtagSF
float BtagSF(const xAOD::JetContainer *jets) override final
Definition: Jets.cxx:787
checkFileSG.line
line
Definition: checkFileSG.py:75
ST::SUSYObjDef_xAOD::IsPFlowCrackVetoCleaning
bool IsPFlowCrackVetoCleaning(const xAOD::ElectronContainer *elec=nullptr, const xAOD::PhotonContainer *gamma=nullptr) const override final
Definition: MET.cxx:261
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
get_generator_info.result
result
Definition: get_generator_info.py:21
ST::ISUSYObjDef_xAODTool::DataSource
DataSource
Definition: ISUSYObjDef_xAODTool.h:462
xAOD::MissingETAuxContainer
MissingETAuxContainer_v1 MissingETAuxContainer
Definition: MissingETAuxContainer.h:16
xAOD::JetInput::PFlow
@ PFlow
Definition: JetContainerInfo.h:62
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
ST::SUSYObjDef_xAOD
Definition: SUSYObjDef_xAOD.h:141
ST::SUSYObjDef_xAOD::IsBJet
bool IsBJet(const xAOD::Jet &input) const override final
Definition: Jets.cxx:733
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
CP::CorrectionCode::enableFailure
static void enableFailure() noexcept
Definition: CorrectionCode.h:64
ST::SUSYObjDef_xAOD::GetTotalMuonSF
double GetTotalMuonSF(const xAOD::MuonContainer &muons, const bool recoSF=true, const bool isoSF=true, const std::string &trigExpr="HLT_mu20_iloose_L1MU15_OR_HLT_mu50", const bool bmhptSF=true) override final
Definition: Muons.cxx:601
SUSY::CrossSectionDB::kfactor
float kfactor(int id, int proc=0) const
Definition: SUSYCrossSection.h:101
xAOD::CutBookkeeper_v1
Description of the class that is used to keep track of event counts.
Definition: CutBookkeeper_v1.h:29
TruthParticleContainer.h
SystematicSet.h
skel.it
it
Definition: skel.GENtoEVGEN.py:423
xAOD::ShallowAuxContainer
Class creating a shallow copy of an existing auxiliary container.
Definition: ShallowAuxContainer.h:54
asg
Definition: DataHandleTestTool.h:28
ST::SUSYObjDef_xAOD::GetMETSig
StatusCode GetMETSig(xAOD::MissingETContainer &met, double &metSignificance, bool doTST=true, bool doJVTCut=true) override final
Definition: MET.cxx:240
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
ST::SUSYObjDef_xAOD::GetTotalElectronSF
float GetTotalElectronSF(const xAOD::ElectronContainer &electrons, const bool recoSF=true, const bool idSF=true, const bool triggerSF=true, const bool isoSF=true, const std::string &trigExpr="singleLepton", const bool ecidsSF=false, const bool cidSF=false) override final
Definition: Electrons.cxx:625
PlotCalibFromCool.ib
ib
Definition: PlotCalibFromCool.py:419
xAOD::CutBookkeeper_v1::sumOfEventWeightsSquared
double sumOfEventWeightsSquared() const
Get the sum-of-(event-weights-squared) that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:327
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
SUSYObjDef_xAOD.h
xAOD::ShallowAuxContainer::name
const char * name() const
Get the name of the container instance.
Definition: ShallowAuxContainer.cxx:575
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
xAOD::MissingETContainer
MissingETContainer_v1 MissingETContainer
Definition: Event/xAOD/xAODMissingET/xAODMissingET/MissingETContainer.h:16
ST::SUSYObjDef_xAOD::GetPrimVtx
const xAOD::Vertex * GetPrimVtx() const override final
Definition: SUSYObjDef_xAOD.cxx:2837
ST::SUSYObjDef_xAOD::GetFatJets
StatusCode GetFatJets(xAOD::JetContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=false, const std::string &jetkey="", const bool doLargeRdecorations=false, const xAOD::JetContainer *containerToBeCopied=nullptr) override final
Definition: Jets.cxx:243
cosmic
@ cosmic
Definition: SUSYToolsTester.cxx:96
LArCellConditions.argv
argv
Definition: LArCellConditions.py:112
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
main
int main(int argc, char *argv[])
Definition: SUSYToolsTester.cxx:110
beamspotman.tokens
tokens
Definition: beamspotman.py:1284
xAOD::TEvent::kClassAccess
@ kClassAccess
Access auxiliary data using the aux containers.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:97
xAODTruthHelpers.h
ChainGroup.h
xAOD::JetInput::typeName
const std::string & typeName(Type id)
Definition: JetContainerInfo.cxx:199
x
#define x
trgmatch
@ trgmatch
Definition: SUSYToolsTester.cxx:99
ST::SUSYObjDef_xAOD::GetMET
StatusCode GetMET(xAOD::MissingETContainer &met, const xAOD::JetContainer *jet, const xAOD::ElectronContainer *elec=nullptr, const xAOD::MuonContainer *muon=nullptr, const xAOD::PhotonContainer *gamma=nullptr, const xAOD::TauJetContainer *taujet=nullptr, bool doTST=true, bool doJVTCut=true, const xAOD::IParticleContainer *invis=nullptr) override final
Definition: MET.cxx:23
xAOD::EventInfo_v1::LAr
@ LAr
The LAr calorimeter.
Definition: EventInfo_v1.h:335
SUSY::CrossSectionDB::efficiency
float efficiency(int id, int proc=0) const
Definition: SUSYCrossSection.h:103
Ncuts
const size_t Ncuts
Definition: SUSYToolsTester.cxx:77
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
ST::SUSYObjDef_xAOD::setBoolProperty
StatusCode setBoolProperty(const std::string &name, const bool &property) override final
Definition: SUSYObjDef_xAOD.cxx:850
ST::SUSYObjDef_xAOD::BtagSF_trkJet
float BtagSF_trkJet(const xAOD::JetContainer *trkjets) override final
Definition: Jets.cxx:868
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
xAOD::EventInfo_v1::Error
@ Error
The sub-detector issued an error.
Definition: EventInfo_v1.h:349
ST::SUSYObjDef_xAOD::ApplyLRTUncertainty
StatusCode ApplyLRTUncertainty() override final
Definition: SUSYObjDef_xAOD.cxx:3014
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
TruthParticleAuxContainer.h
xAOD::EventInfo_v1::mcChannelNumber
uint32_t mcChannelNumber() const
The MC generator's channel number.
ST::SUSYObjDef_xAOD::GetJetsSyst
StatusCode GetJetsSyst(const xAOD::JetContainer &calibjets, xAOD::JetContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &jetkey="") override final
Definition: Jets.cxx:322
getTokens
std::vector< std::string > getTokens(TString line, const TString &delim)
Definition: SUSYToolsTester.cxx:1389
ITauTruthMatchingTool.h
ST::SUSYObjDef_xAOD::getMCShowerType
int getMCShowerType(const std::string &sample_name="") const override final
Definition: SUSYObjDef_xAOD.h:428
POOL::TEvent::readFrom
StatusCode readFrom(TFile *file)
Definition: PhysicsAnalysis/POOLRootAccess/src/TEvent.cxx:132
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ST::SUSYObjDef_xAOD::ApplyPRWTool
StatusCode ApplyPRWTool(bool muDependentRRN=true) override final
Definition: SUSYObjDef_xAOD.cxx:2969
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
ElectronContainer.h
IsoCloseByCorrectionTest.containers
containers
Associate the close-by pflow objects and the calorimeter clusters.
Definition: IsoCloseByCorrectionTest.py:82
asg::StandaloneToolHandle::setProperty
StatusCode setProperty(const std::string &name, T2 &&value)
Definition: StandaloneToolHandle.h:105
lumiFormat.i
int i
Definition: lumiFormat.py:92
ST::SUSYObjDef_xAOD::GetPileupWeight
float GetPileupWeight() override final
Definition: SUSYObjDef_xAOD.cxx:2906
CaloCluster.h
btagged
@ btagged
Definition: SUSYToolsTester.cxx:98
POOL::TEvent::getEntries
long getEntries()
Definition: PhysicsAnalysis/POOLRootAccess/src/TEvent.cxx:123
asg::StandaloneToolHandle
an "initializing" ToolHandle for stand-alone applications
Definition: StandaloneToolHandle.h:44
ST::ISUSYObjDef_xAODTool::Data
@ Data
Definition: ISUSYObjDef_xAODTool.h:464
ST::SUSYObjDef_xAOD::IsTrigPassed
bool IsTrigPassed(const std::string &, unsigned int condition=TrigDefs::Physics) const override final
Definition: Trigger.cxx:222
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
MissingETAuxContainer.h
sel
sel
Definition: SUSYToolsTester.cxx:92
ANA_MSG_INFO
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:290
MessageCheck.h
macros for messaging and checking status codes
ANA_MSG_WARNING
#define ANA_MSG_WARNING(xmsg)
Macro printing warning messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:292
APP_NAME
#define APP_NAME
Definition: BoostedXbbTag.cxx:23
baseline
@ baseline
Definition: SUSYToolsTester.cxx:94
TEvent.h
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
CutBookkeeperContainer.h
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
xAOD::MissingETAuxContainer_v1
Auxiliary data store for xAOD::MissingETContainer.
Definition: MissingETAuxContainer_v1.h:20
Init.h
ST::SUSYObjDef_xAOD::GetTrackJets
StatusCode GetTrackJets(xAOD::JetContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &jetkey="", const xAOD::JetContainer *containerToBeCopied=nullptr) override final
Definition: Jets.cxx:170
xAOD::CutBookkeeperContainer_v1
Container that holds the Container of all CutBookkeepers.
Definition: CutBookkeeperContainer_v1.h:27
ST::SystInfo::affectsType
unsigned int affectsType
Definition: ISUSYObjDef_xAODTool.h:67
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
ST::SUSYObjDef_xAOD::IsTrigMatched
bool IsTrigMatched(const xAOD::IParticle *part, const std::string &tr_item) override final
Definition: Trigger.cxx:227
ST::ISUSYObjDef_xAODTool::FullSim
@ FullSim
Definition: ISUSYObjDef_xAODTool.h:465
IAsgTool.h
TauJetContainer.h
cut_name
const char * cut_name[]
Definition: SUSYToolsTester.cxx:78
xAOD::JetInput::Type
Type
Definition: JetContainerInfo.h:54
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
calibdata.exit
exit
Definition: calibdata.py:236
asg::StandaloneToolHandle::retrieve
StatusCode retrieve()
initialize the tool, will succeed if the tool was already initialized
Definition: StandaloneToolHandle.h:147
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
ST::SUSYObjDef_xAOD::GetTotalPhotonSF
double GetTotalPhotonSF(const xAOD::PhotonContainer &photons, const bool effSF=true, const bool isoSF=true, const bool triggerSF=false) const override final
Definition: Photons.cxx:317
ST::SUSYObjDef_xAOD::getSystInfoList
std::vector< ST::SystInfo > getSystInfoList() const override final
Definition: SUSYObjDef_xAOD.cxx:2457
SUSYCrossSection.h
asg::ANA_MSG_HEADER
ANA_MSG_HEADER(msgSTT) ANA_MSG_SOURCE(msgSTT
StatusCode.h
SG::AuxElement::auxdata
Accessor< T, ALLOC >::reference_type auxdata(const std::string &name)
Fetch an aux data variable, as a non-const reference.
CaloCondBlobAlgs_fillNoiseFromASCII.comment
string comment
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:27
Trig::ChainGroup
Definition: Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.h:51
ST::SystInfo::affectsKinematics
bool affectsKinematics
Definition: ISUSYObjDef_xAODTool.h:65
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
Trig::ChainGroup::isPassed
bool isPassed(unsigned int condition=TrigDefs::Physics) const
tells if chain group passed
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx:208
xAOD::MissingETContainer_v1
Container for xAOD::MissingET_v1 objects.
Definition: MissingETContainer_v1.h:21
nSel
const unsigned int nSel
Definition: SUSYToolsTester.cxx:91
ST::SUSYObjDef_xAOD::GetSignalPhotonSF
double GetSignalPhotonSF(const xAOD::Photon &ph, const bool effSF=true, const bool isoSF=true, const bool triggerSF=false) const override final
Definition: Photons.cxx:203
xAOD::CutBookkeeper_v1::nAcceptedEvents
uint64_t nAcceptedEvents() const
Get the number of accepted events that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:291
PathResolver.h
ANA_MSG_SOURCE
#define ANA_MSG_SOURCE(NAME, TITLE)
the source code part of ANA_MSG_SOURCE
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:133
TEvent.h
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
ST::SUSYObjDef_xAOD::IsMETTrigPassed
bool IsMETTrigPassed(unsigned int runnumber=0, bool j400_OR=false) const override final
Definition: Trigger.cxx:30
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
ST::SUSYObjDef_xAOD::getSherpaVjetsNjetsWeight
float getSherpaVjetsNjetsWeight() const override final
Definition: SUSYObjDef_xAOD.cxx:2806
xAOD::TruthHelpers::getTruthParticle
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
Definition: xAODTruthHelpers.cxx:25
ST::SystInfo
Definition: ISUSYObjDef_xAODTool.h:63
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::CutBookkeeper_v1::sumOfEventWeights
double sumOfEventWeights() const
Get the sum-of-event-weights that this CutBookkeeper has seen.
Definition: CutBookkeeper_v1.cxx:309
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:174
EventInfo.h
xAOD::CutBookkeeper_v1::name
const std::string & name() const
Get the name of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:156
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
MuonContainer.h
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
ST::SUSYObjDef_xAOD::GetTrigPrescale
float GetTrigPrescale(const std::string &) const override final
Definition: Trigger.cxx:317
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
Muon
struct TBPatternUnitContext Muon
xAOD::JetInput::EMTopo
@ EMTopo
Definition: JetContainerInfo.h:56
asg::StandaloneToolHandle::setTypeAndName
void setTypeAndName(const std::string &typeAndName)
Definition: StandaloneToolHandle.h:101
ST::SUSYObjDef_xAOD::GetTrigChainGroup
const Trig::ChainGroup * GetTrigChainGroup(const std::string &) const override final
Definition: Trigger.cxx:322
ST::SUSYObjDef_xAOD::GetSignalTauSF
double GetSignalTauSF(const xAOD::TauJet &tau, const bool idSF=true, const bool triggerSF=true, const std::string &trigExpr="tau25_medium1_tracktwo") override final
Definition: Taus.cxx:129
FlavorTagDiscriminants::hbb_key::fatjet
const std::string fatjet
Definition: HbbConstants.h:19
xAOD::EventInfo_v1::Tile
@ Tile
The Tile calorimeter.
Definition: EventInfo_v1.h:336
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
xAOD::TStore
A relatively simple transient store for objects created in analysis.
Definition: TStore.h:44
ST::SUSYObjDef_xAOD::FindSusyHP
StatusCode FindSusyHP(int &pdgid1, int &pdgid2) const
Definition: Truth.cxx:75
y
#define y
SUSY::CrossSectionDB
Definition: SUSYCrossSection.h:29
ST::SUSYObjDef_xAOD::GetPhotons
StatusCode GetPhotons(xAOD::PhotonContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &photonkey="Photons", const xAOD::PhotonContainer *containerToBeCopied=nullptr) override final
Definition: Photons.cxx:33
ST::SUSYObjDef_xAOD::GetMuons
StatusCode GetMuons(xAOD::MuonContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &muonkey="Muons", const std::string &lrtmuonkey="MuonsLRT", const xAOD::MuonContainer *containerToBeCopied=nullptr) override final
Definition: Muons.cxx:101
JetContainer.h
ANA_CHECK_SET_TYPE
#define ANA_CHECK_SET_TYPE(TYPE)
set the type for ANA_CHECK to report failures
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:314
POOL::TEvent::retrieve
StatusCode retrieve(const T *&obj)
Definition: PhysicsAnalysis/POOLRootAccess/POOLRootAccess/TEvent.h:73
ST::SUSYObjDef_xAOD::GetTriggerGlobalEfficiencySF
double GetTriggerGlobalEfficiencySF(const xAOD::ElectronContainer &electrons, const xAOD::MuonContainer &muons, const std::string &trigExpr="diLepton") override final
Definition: Trigger.cxx:405
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
Trig::ChainGroup::getPrescale
float getPrescale(unsigned int condition=TrigDefs::Physics) const
returns prescale factor for chain group with single chain in returns real prescale factor for real ch...
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx:407
ST::SUSYObjDef_xAOD::OverlapRemoval
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
Definition: SUSYObjDef_xAOD.cxx:2853
ST::SUSYObjDef_xAOD::applySystematicVariation
StatusCode applySystematicVariation(const CP::SystematicSet &systConfig) override final
Definition: SUSYObjDef_xAOD.cxx:2079
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
ST::ISUSYObjDef_xAODTool::AtlfastII
@ AtlfastII
Definition: ISUSYObjDef_xAODTool.h:466
xAOD::EventInfo_v1::errorState
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
Definition: EventInfo_v1.cxx:817
entries
double entries
Definition: listroot.cxx:49
JetAuxContainer.h
IGoodRunsListSelectionTool::passRunLB
virtual bool passRunLB(const std::vector< std::string > &grlnameVec=std::vector< std::string >(), const std::vector< std::string > &brlnameVec=std::vector< std::string >()) const =0
Check if the current event passes the selection.
python.grid.isData
def isData(dataset)
Definition: grid.py:491
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:166
xAOD::EventInfo_v1::isEventFlagBitSet
bool isEventFlagBitSet(EventFlagSubDet subDet, size_t bit) const
Check one particular bit of one particular sub-detector.
Definition: EventInfo_v1.cxx:703
xAODType::Tau
@ Tau
The object is a tau (jet)
Definition: ObjectType.h:49
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
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
signallep
@ signallep
Definition: SUSYToolsTester.cxx:93
ST::SystInfo::affectsWeights
bool affectsWeights
Definition: ISUSYObjDef_xAODTool.h:66
CorrectionCode.h
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
IParticleHelpers.h
ST::Unknown
@ Unknown
Definition: ISUSYObjDef_xAODTool.h:73
xAOD::EventInfo_v1::mcEventWeight
float mcEventWeight(size_t i=0) const
The weight of one specific MC event used in the simulation.
Definition: EventInfo_v1.cxx:203
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition: JetContainer.h:17
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
StandaloneToolHandle.h
xAODType::BTag
@ BTag
The object is a b-tagging object.
Definition: ObjectType.h:60
ToolStore.h
getFileContainers
std::map< std::string, std::string > getFileContainers(std::unique_ptr< TFile > &)
Definition: SUSYToolsTester.cxx:1406
ToolHandle.h
Trig::ChainGroup::getListOfTriggers
std::vector< std::string > getListOfTriggers() const
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx:467
TruthEventContainer.h
ST::SUSYObjDef_xAOD::GetElectrons
StatusCode GetElectrons(xAOD::ElectronContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &elekey="Electrons", const std::string &lrtelekey="LRTElectrons", const xAOD::ElectronContainer *containerToBeCopied=nullptr) override final
Definition: Electrons.cxx:120
ST::SUSYObjDef_xAOD::treatAsYear
int treatAsYear(const int runNumber=-1) const override final
Definition: SUSYObjDef_xAOD.cxx:3031
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
passOR
@ passOR
Definition: SUSYToolsTester.cxx:100
ST::SUSYObjDef_xAOD::GetTaus
StatusCode GetTaus(xAOD::TauJetContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &taukey="TauJets", const xAOD::TauJetContainer *containerToBeCopied=nullptr) override final
Definition: Taus.cxx:30
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
PhotonContainer.h
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
MissingETContainer.h
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::EventInfo_v1::Core
@ Core
Core flags describing the event.
Definition: EventInfo_v1.h:339
xAOD::JetInput::Uncategorized
@ Uncategorized
Definition: JetContainerInfo.h:100
TStore.h
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
ST::SUSYObjDef_xAOD::initialize
StatusCode initialize() override final
Dummy implementation of the initialisation function.
Definition: SUSYObjDef_xAOD.cxx:856
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:81
keylayer_zslicemap.slices
slices
Definition: keylayer_zslicemap.py:112
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
SUSY::CrossSectionDB::xsectTimesEff
float xsectTimesEff(int id, int proc=0) const
Definition: SUSYCrossSection.h:94
TruthEvent.h
xAOD::EventInfo_v1::SCT
@ SCT
The SCT.
Definition: EventInfo_v1.h:333
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
ANA_MSG_DEBUG
#define ANA_MSG_DEBUG(xmsg)
Macro printing debug messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:288
goodpt
@ goodpt
Definition: SUSYToolsTester.cxx:97