ATLAS Offline Software
TauAnalysisToolsExample.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // System include(s):
6 #include <memory>
7 #include <cstdlib>
8 #include <iostream>
9 
10 // ROOT include(s):
11 #include <TFile.h>
12 #include <TError.h>
13 #include <TString.h>
14 
15 // Infrastructure include(s):
16 #ifdef ROOTCORE
17 # include "xAODRootAccess/Init.h"
18 # include "xAODRootAccess/TEvent.h"
19 #endif // ROOTCORE
20 #include "xAODCore/ShallowCopy.h"
21 
22 // EDM include(s):
26 #include "xAODCore/ShallowCopy.h"
27 
28 #include "AsgTools/ToolHandle.h"
29 
30 // Local include(s):
35 
37 
38 // Smart Slimming include(s):
39 #include "xAODCore/tools/IOStats.h"
41 
42 using namespace TauAnalysisTools;
43 
44 #define CHECK( ARG ) \
45  do { \
46  const bool result = ARG; \
47  if( ! result ) { \
48  ::Error( "TauAnalysisToolsExample", "Failed to execute: \"%s\"", \
49  #ARG ); \
50  return 1; \
51  } \
52  } while( false )
53 
54 #define RETRIEVE( TYPE, CONTAINER , NAME ) \
55  do { \
56  if (xEvent.contains<TYPE>(NAME)) \
57  CHECK( xEvent.retrieve( CONTAINER, NAME ) ); \
58  else \
59  Warning("TauAnalysisToolsExample","%s container is not available", NAME); \
60  } while(false) \
61 
62 int main( int argc, char* argv[] )
63 {
64  StatusCode::enableFailure();
65 
66  // Check if we received a file name:
67  if( argc < 2 )
68  {
69  Error( "TauAnalysisToolsExample", "No file name received!" );
70  Error( "TauAnalysisToolsExample", " Usage: %s [xAOD file name]", "TauAnalysisToolsExample" );
71  return 1;
72  }
73 
74  // Initialise the application:
75  CHECK( xAOD::Init( "TauAnalysisToolsExample" ) );
76 
77  // Open the input file:
78  const TString sInputFileName = argv[ 1 ];
79  Info( "TauAnalysisToolsExample", "Opening input file: %s", sInputFileName.Data() );
80  std::unique_ptr< TFile > fInputFile( TFile::Open( sInputFileName, "READ" ) );
81  CHECK( fInputFile.get() );
82 
83  // Create the output file:
84  TString sOutputFileName = "output.root";
85  if (argc>3)
86  sOutputFileName = TString(argv[3]);
87 
88  //Do the trigger efficiency tools, requires correct ilumicalc
89  bool m_doTrigger = bool(argc>4);
90 
91  Info( "TauAnalysisToolsExample", "Opening output file: %s", sOutputFileName.Data() );
92  std::unique_ptr< TFile > fOutputFile( TFile::Open( sOutputFileName, "RECREATE" ) );
93  CHECK( fOutputFile.get() );
94 
95  // Create a TEvent object:
96  // xAOD::TEvent xEvent( xAOD::TEvent::kClassAccess );
98  CHECK( xEvent.readFrom( fInputFile.get() ) );
99 
100  // Connect TEvent with output file :
101  CHECK( xEvent.writeTo( fOutputFile.get() ) );
102 
103  Info( "TauAnalysisToolsExample", "Number of events in the file: %i",
104  static_cast< int >( xEvent.getEntries() ) );
105 
106  // Decide how many events to run over:
107  Long64_t iEntries = xEvent.getEntries();
108  if( argc > 2 )
109  {
110  const Long64_t iMaxEntries = atoll( argv[ 2 ] );
111  if( iMaxEntries < iEntries )
112  {
113  iEntries = iMaxEntries;
114  }
115  }
116 
117  // defining needed Container
118  const xAOD::EventInfo* xEventInfo = 0;
119  const xAOD::TauJetContainer* xTauJetContainer = 0;
120 
121  CP::PileupReweightingTool* m_tPRWTool = new CP::PileupReweightingTool("PileupReweightingTool");
122  if (m_doTrigger){//dont initialize tool if not requested
123  std::vector<std::string> vLumiCalcFiles = {"/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data15_13TeV/20200803/ilumicalc_histograms_None_282026-282457_OflLumi-13TeV-009.root","/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data16_13TeV/20190708/ilumicalc_histograms_None_297730-311481_OflLumi-13TeV-010.root","/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data18_13TeV/20190318/ilumicalc_histograms_None_348885-364292_OflLumi-13TeV-010.root","/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data22_13p6TeV/20221025/ilumicalc_histograms_None_428648-436169_OflLumi-Run3-001.root","/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data22_13p6TeV/20221025/ilumicalc_histograms_None_430536-436169_OflLumi-Run3-001.root","/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/20190609/ilumicalc_histograms_None_276262-284484_OflLumi-13TeV-010.root","/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/20190609/ilumicalc_histograms_None_325713-340453_OflLumi-13TeV-010.root"};
124  CHECK(m_tPRWTool->setProperty("LumiCalcFiles", vLumiCalcFiles));
125  // CHECK(m_tPRWTool->setProperty("DefaultChannel", "" ));
126  CHECK(m_tPRWTool->initialize());
127  }
128  ToolHandle<CP::IPileupReweightingTool> m_tPRWToolHandle = m_tPRWTool;
129  // ===========================================================================
130  // TauSelectionTool
131  // ===========================================================================
132  TauAnalysisTools::TauSelectionTool* TauSelTool = new TauAnalysisTools::TauSelectionTool( "TauSelectionTool" );
133  TauSelTool->msg().setLevel( MSG::DEBUG );
134  // preparation for control hisograms
135  TauSelTool->setOutFile( fOutputFile.get() );
136  CHECK(TauSelTool->setProperty("CreateControlPlots", true ));
137  CHECK(TauSelTool->setProperty("JetIDWP", int(JETIDRNNMEDIUM) ));
138  CHECK(TauSelTool->setProperty("EleIDWP", int(ELEIDRNNLOOSE) ));
139  CHECK(TauSelTool->setProperty("EleIDVersion", 1 ));
140  CHECK(TauSelTool->setProperty("PtMin", 20. ));
141  CHECK(TauSelTool->setProperty("ConfigPath", "" ));
142  CHECK(TauSelTool->setProperty("SelectionCuts", int(CutPt|CutJetIDWP|CutEleIDWP) ));
143  CHECK(TauSelTool->initialize());
144 
145  ToolHandle<TauAnalysisTools::ITauSelectionTool> TauSelToolHandle = TauSelTool;
146 
147  // ===========================================================================
148  // TauSmearingTool
149  // ===========================================================================
150  TauAnalysisTools::TauSmearingTool TauSmeTool( "TauSmearingTool" );
151  TauSmeTool.msg().setLevel( MSG::DEBUG );
152  CHECK(TauSmeTool.setProperty("RecommendationTag","2022-prerec"));
153  CHECK(TauSmeTool.setProperty("Campaign","mc21"));
154  CHECK(TauSmeTool.initialize());
155 
156  // restructure all recommended systematic variations for smearing tool
157  std::vector<CP::SystematicSet> vSmearingSystematicSet;
158  for (auto SystematicsVariation : TauSmeTool.recommendedSystematics())
159  {
160  vSmearingSystematicSet.push_back(CP::SystematicSet());
161  vSmearingSystematicSet.back().insert(SystematicsVariation);
162  }
163 
164  // ===========================================================================
165  // TauEfficiencyCorrectionsTool
166  // ===========================================================================
167  TauAnalysisTools::TauEfficiencyCorrectionsTool TauEffCorrTool( "TauEfficiencyCorrectionsTool" );
168  TauEffCorrTool.msg().setLevel( MSG::VERBOSE );
169  CHECK(TauEffCorrTool.setProperty("JetIDLevel", (int)TauAnalysisTools::JetID::JETIDRNNMEDIUM));
170  CHECK(TauEffCorrTool.setProperty("EfficiencyCorrectionTypes", (int)TauAnalysisTools::EfficiencyCorrectionType::SFJetIDHadTau));
171  CHECK(TauEffCorrTool.setProperty("RecommendationTag","2022-prerec"));
172  CHECK(TauEffCorrTool.initialize());
173 
174  // restructure all recommended systematic variations for efficiency tools
175  std::vector<CP::SystematicSet> vEfficiencyCorrectionsSystematicSet;
176  vEfficiencyCorrectionsSystematicSet.push_back(CP::SystematicSet());
177  for (auto SystematicsVariation : TauEffCorrTool.recommendedSystematics())
178  {
179  vEfficiencyCorrectionsSystematicSet.push_back(CP::SystematicSet());
180  vEfficiencyCorrectionsSystematicSet.back().insert(SystematicsVariation);
181  }
182 
183  // ===========================================================================
184  // TauEfficiencyCorrectionsTriggerTool
185  // ===========================================================================
186  TauAnalysisTools::TauEfficiencyCorrectionsTool TauEffTrigTool( "TauEfficiencyCorrectionsTriggerTool" );
187  // restructure all recommended systematic variations for efficiency tools
188  std::vector<CP::SystematicSet> vEfficiencyCorrectionsTriggerSystematicSet;
189  if (m_doTrigger){
190 
191  TauEffTrigTool.msg().setLevel( MSG::DEBUG );
192  CHECK(TauEffTrigTool.setProperty("EfficiencyCorrectionTypes", std::vector<int>({SFTriggerHadTau}) ));
193  CHECK(TauEffTrigTool.setProperty("TriggerName", "HLT_tau25_medium1_tracktwo" ));
194  CHECK(TauEffTrigTool.setProperty("JetIDLevel", (int)JETIDRNNMEDIUM ));
195  CHECK(TauEffTrigTool.setProperty("PileupReweightingTool", m_tPRWToolHandle ));
196  CHECK(TauEffTrigTool.setProperty("TriggerSFMeasurement", "combined"));
197  CHECK(TauEffTrigTool.initialize());
198 
199  vEfficiencyCorrectionsTriggerSystematicSet.push_back(CP::SystematicSet());
200  for (auto SystematicsVariation : TauEffTrigTool.recommendedSystematics())
201  {
202  vEfficiencyCorrectionsTriggerSystematicSet.push_back(CP::SystematicSet());
203  vEfficiencyCorrectionsTriggerSystematicSet.back().insert(SystematicsVariation);
204  }
205  }
206  // ===========================================================================
207  // TauTruthMatchingTool
208  // ===========================================================================
209  TauAnalysisTools::TauTruthMatchingTool T2MT( "TauTruthMatchingTool");
210  T2MT.msg().setLevel( MSG::INFO );
211  CHECK(T2MT.setProperty("TruthJetContainerName", "AntiKt4TruthDressedWZJets"));
212  CHECK(T2MT.initialize());
213 
214  static const SG::ConstAccessor<char> acc_IsTruthMatched("IsTruthMatched");
215  static const SG::ConstAccessor<char> acc_IsHadronicTau("IsHadronicTau");
216  static const SG::ConstAccessor<size_t> acc_numCharged("numCharged");
217  static const SG::ConstAccessor<ElementLink< xAOD::JetContainer >> acc_truthJetLink("truthJetLink");
218  static const SG::ConstAccessor<double> acc_TauSFRecoHadTau("TauScaleFactorReconstructionHadTau");
219  static const SG::ConstAccessor<double> acc_TauSFJetIDHadTau("TauScaleFactorJetIDHadTau");
220  static const SG::ConstAccessor<double> acc_TauSFEleIDHadTau("TauScaleFactorEleIDHadTau");
221  static const SG::ConstAccessor<double> acc_TauSFEleIDEle("TauScaleFactorEleIDElectron");
222  static const SG::ConstAccessor<double> acc_TauSFTrigHadTau("TauScaleFactorTriggerHadTau");
223 
224  // Loop over the events:
225  for( Long64_t iEntry = 0; iEntry < iEntries; ++iEntry )
226  {
227 
228  //Check TauJet Container Name
229  const char * m_tauJetContainerName = "TauJets";
230 
231 
232 
233  // Tell the object which entry to look at:
234  xEvent.getEntry( iEntry );
235 
236  // Print some event information for fun:
237  RETRIEVE(xAOD::EventInfo, xEventInfo, "EventInfo");
238  if (xEventInfo)
239  Info( "TauAnalysisToolsExample",
240  "===>>> start processing event #%i, "
241  "run #%i %i events processed so far <<<===",
242  static_cast< int >( xEventInfo->eventNumber() ),
243  static_cast< int >( xEventInfo->runNumber() ),
244  static_cast< int >( iEntry ) );
245 
246  if (xEvent.contains<xAOD::TauJetContainer>(m_tauJetContainerName)){
247  RETRIEVE(xAOD::TauJetContainer, xTauJetContainer, m_tauJetContainerName);
248  }else{
249  m_tauJetContainerName = "AnalysisTauJets";
250  RETRIEVE(xAOD::TauJetContainer, xTauJetContainer, m_tauJetContainerName);
251  }
252  std::pair< xAOD::TauJetContainer*, xAOD::ShallowAuxContainer* >xTauShallowContainer = xAOD::shallowCopyContainer(*xTauJetContainer);
253  if(iEntry==0){
254  Info( "TauAnalysisToolsExample:: TauJetContainer = ",m_tauJetContainerName);
255  }
256 
257  // // copy truth particles to get truthparticle link for truth taus to work
258  if (xEvent.contains<xAOD::TruthParticleContainer>("TruthParticles"))
259  CHECK( xEvent.copy("TruthParticles") );
260 
261  // copy taus
262  CHECK( xEvent.copy(m_tauJetContainerName) );
263 
264  // copy tracks
265  CHECK( xEvent.copy("InDetTrackParticles") );
266 
267  // Print tau properties, using the tools:
268  for ( auto xTau : *xTauShallowContainer.first )
269  {
270  // perform truth matching
271  auto xTruthTau = T2MT.getTruth(*xTau);
272  // if (xTau->pt() < 25*1000) continue;
273 
274  if ((bool)acc_IsTruthMatched(*xTau))
275  {
276  if (xTruthTau->isTau())
277  {
278  if ((bool)acc_IsHadronicTau(*xTruthTau))
279  Info( "TauAnalysisToolsExample",
280  "Tau was matched to a truth hadronic tau, which has %i prongs and a charge of %i",
281  int(acc_numCharged(*xTruthTau)),
282  int(xTruthTau->charge()));
283  else
284  Info( "TauAnalysisToolsExample",
285  "Tau was matched to a truth leptonic tau, which has a charge of %i",
286  int(xTruthTau->charge()));
287  }
288  else if (xTruthTau->isElectron())
289  Info( "TauAnalysisToolsExample",
290  "Tau was matched to a truth electron");
291  else if (xTruthTau->isMuon())
292  Info( "TauAnalysisToolsExample",
293  "Tau was matched to a truth muon");
294  }
295  else
296  Info( "TauAnalysisToolsExample", "Tau was not matched to truth" );
297 
298  auto xTruthJetLink = acc_truthJetLink(*xTau);
299  if (xTruthJetLink.isValid())
300  {
301  const xAOD::Jet* xTruthJet = *xTruthJetLink;
302  Info( "TauAnalysisToolsExample",
303  "Tau was matched to a truth jet, which has pt=%g, eta=%g, phi=%g, m=%g",
304  xTruthJet->p4().Pt(),
305  xTruthJet->p4().Eta(),
306  xTruthJet->p4().Phi(),
307  xTruthJet->p4().M());
308  }
309  else
310  Info( "TauAnalysisToolsExample", "Tau was not matched to truth jet" );
311 
312  Info( "TauAnalysisToolsExample",
313  "Un-Smeared tau pt: %g ",
314  xTau->ptFinalCalib());
315  CHECK( TauSmeTool.applyCorrection(*xTau) );
316  Info( "TauAnalysisToolsExample",
317  "Smeared tau pt: %g ",
318  xTau->pt());
319 
320  for (auto sSystematicSet: vSmearingSystematicSet)
321  {
322  CHECK( TauSmeTool.applySystematicVariation(sSystematicSet)) ;
323  CHECK( TauSmeTool.applyCorrection(*xTau) );
324  //Skip TES uncertainty print out for non-had taus
325  if ((bool)acc_IsTruthMatched(*xTau) && xTruthTau->isTau() && (bool)acc_IsHadronicTau(*xTruthTau)){
326  Info( "TauAnalysisToolsExample",
327  "Smeared tau pt: %g for type %s ",
328  xTau->pt(),
329  sSystematicSet.name().c_str());
330  }
331  }
332 
333  // Select "good" taus:
334  if( ! TauSelTool->accept( *xTau ) ){
335  Info( "TauAnalysisToolsExample",
336  "Tau does not pass selection tool: pt %g ",
337  xTau->pt());
338  continue;
339  }
340 
341  for (auto sSystematicSet: vEfficiencyCorrectionsSystematicSet)
342  {
343  CHECK( TauEffCorrTool.applySystematicVariation(sSystematicSet));
344  CHECK( TauEffCorrTool.applyEfficiencyScaleFactor(*xTau) );
345  Info( "TauAnalysisToolsExample",
346  "SystType %s: RecoSF: %g JetIDSF: %g EleOLRSFHadTau: %g EleRNNSFElectron: %g",
347  sSystematicSet.name().c_str(),
348  acc_TauSFRecoHadTau(*xTau),
349  acc_TauSFJetIDHadTau(*xTau),
350  acc_TauSFEleIDHadTau(*xTau),
351  acc_TauSFEleIDEle(*xTau));
352  }
353 
354  for (auto sSystematicSet: vEfficiencyCorrectionsTriggerSystematicSet)
355  {
356  CHECK( TauEffTrigTool.applySystematicVariation(sSystematicSet));
357  CHECK( TauEffTrigTool.applyEfficiencyScaleFactor(*xTau) );
358  Info( "TauAnalysisToolsExample",
359  "SystType %s: Trigger: %g",
360  sSystematicSet.name().c_str(),
361  acc_TauSFTrigHadTau(*xTau));
362  }
363  // print some info about the selected tau:
364  Info( "TauAnalysisToolsExample", "Selected tau: pt = %g MeV, eta = %g, phi = %g, prong = %i, charge = %i",
365  xTau->pt(), xTau->eta(), xTau->phi(), int(xTau->nTracks()), int(xTau->charge()));
366  }
367  if (xTauJetContainer->empty())
368  CHECK (T2MT.retrieveTruthTaus());
369  xEvent.fill();
370  }
371 
372  TauSelTool->writeControlHistograms();
373  delete TauSelTool;
374  CHECK( xEvent.finishWritingTo(fOutputFile.get()));
375  fOutputFile.get()->Close();
376  Info( "TauAnalysisToolsExample", "Finished writing to file: %s", sOutputFileName.Data() );
377 
378  // smart slimming
380 
381  return 0;
382 }
ShallowCopy.h
xAOD::TEvent::finishWritingTo
StatusCode finishWritingTo(::TFile *file)
Finish writing to an output file.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:735
TauAnalysisTools
Definition: TruthCollectionMakerTau.h:16
TauTruthMatchingTool.h
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
xAOD::IOStats::stats
ReadStats & stats()
Access the object belonging to the current thread.
Definition: IOStats.cxx:17
TauAnalysisTools::TauSelectionTool
Definition: TauSelectionTool.h:53
TauAnalysisTools::JETIDRNNMEDIUM
@ JETIDRNNMEDIUM
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:21
TauAnalysisTools::BuildTruthTaus::retrieveTruthTaus
virtual StatusCode retrieveTruthTaus() override
Definition: BuildTruthTaus.cxx:69
xAOD::TEvent::kAthenaAccess
@ kAthenaAccess
Access containers/objects like Athena does.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:101
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
CHECK
#define CHECK(ARG)
Definition: TauAnalysisToolsExample.cxx:44
TauAnalysisTools::TauSelectionTool::setOutFile
virtual void setOutFile(TFile *fOutFile) override
Set output file for control histograms.
Definition: TauSelectionTool.cxx:477
TauAnalysisTools::TauSelectionTool::initialize
virtual StatusCode initialize() override
Function initialising the tool.
Definition: TauSelectionTool.cxx:72
xAOD::TEvent::copy
StatusCode copy(const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=0)
Copy an object directly from the input to the output.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1144
SG::ConstAccessor< char >
IOStats.h
TauAnalysisTools::CutJetIDWP
@ CutJetIDWP
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:47
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
TauJetAuxContainer.h
TauAnalysisTools::ELEIDRNNLOOSE
@ ELEIDRNNLOOSE
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:33
PileupReweightingTool.h
TauAnalysisTools::TauSmearingTool::applyCorrection
virtual CP::CorrectionCode applyCorrection(xAOD::TauJet &xTau) const
Apply the correction on a modifyable object.
Definition: TauSmearingTool.cxx:115
main
int main(int argc, char *argv[])
Definition: TauAnalysisToolsExample.cxx:62
ReadStats.h
TauEfficiencyCorrectionsTool.h
TauSmearingTool.h
TauAnalysisTools::TauSmearingTool
Definition: TauSmearingTool.h:32
TauAnalysisTools::TauSmearingTool::recommendedSystematics
virtual CP::SystematicSet recommendedSystematics() const
returns: the list of all systematics this tool recommends to use
Definition: TauSmearingTool.cxx:138
LArCellNtuple.argv
argv
Definition: LArCellNtuple.py:152
xAOD::TEvent::getEntries
::Long64_t getEntries() const
Get how many entries are available from the current input file(s)
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1294
TauAnalysisTools::TauEfficiencyCorrectionsTool
Definition: TauEfficiencyCorrectionsTool.h:34
xAOD::TEvent::getEntry
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0)
Function loading a given entry of the input TTree.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1325
TauAnalysisTools::TauEfficiencyCorrectionsTool::initialize
virtual StatusCode initialize()
Function initialising the tool.
Definition: TauEfficiencyCorrectionsTool.cxx:64
TauAnalysisTools::TauSmearingTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const CP::SystematicSet &systConfig)
effects: configure this tool for the given list of systematic variations.
Definition: TauSmearingTool.cxx:143
TEvent.h
TauAnalysisTools::TauSelectionTool::writeControlHistograms
virtual void writeControlHistograms() override
Write control histograms to output file.
Definition: TauSelectionTool.cxx:483
Init.h
TauAnalysisTools::TauTruthMatchingTool
Definition: TauTruthMatchingTool.h:25
xAOD::TEvent::contains
::Bool_t contains(const std::string &key)
Function checking if an object is available from the store.
CP::PileupReweightingTool
Implementation of the PileupReweighting tool.
Definition: PileupReweightingTool.h:34
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
CP::PileupReweightingTool::initialize
virtual StatusCode initialize()
Function initialising the tool.
Definition: PileupReweightingTool.cxx:169
TauJetContainer.h
xAOD::IOStats::instance
static IOStats & instance()
Singleton object accessor.
Definition: IOStats.cxx:11
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
xAOD::ReadStats::printSmartSlimmingBranchList
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
TauAnalysisTools::SFJetIDHadTau
@ SFJetIDHadTau
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:70
TauAnalysisTools::TauSelectionTool::accept
virtual asg::AcceptData accept(const xAOD::IParticle *p) const override
Get the decision using a generic IParticle pointer.
Definition: TauSelectionTool.cxx:392
TauSelectionTool.h
xAOD::TEvent::fill
::Int_t fill()
Function filling one event into the output tree.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1509
xAOD::shallowCopyContainer
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
Definition: ShallowCopy.h:110
EventInfo.h
TauAnalysisTools::CutEleIDWP
@ CutEleIDWP
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:49
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
TauAnalysisTools::TauEfficiencyCorrectionsTool::recommendedSystematics
virtual CP::SystematicSet recommendedSystematics() const
returns: the list of all systematics this tool recommends to use
Definition: TauEfficiencyCorrectionsTool.cxx:283
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
xAOD::Jet_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: Jet_v1.cxx:71
TauAnalysisTools::TauEfficiencyCorrectionsTool::applyEfficiencyScaleFactor
virtual CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::TauJet &xTau, unsigned int iRunNumber=0, unsigned int iMu=0)
Decorate the tau with its efficiency scale factor.
Definition: TauEfficiencyCorrectionsTool.cxx:231
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
xAOD::TEvent::writeTo
StatusCode writeTo(::TFile *file, Int_t autoFlush=200, const char *treeName=EVENT_TREE_NAME)
Connect the object to an output file.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:693
TauAnalysisTools::TauTruthMatchingTool::initialize
virtual StatusCode initialize() override final
Definition: TauTruthMatchingTool.cxx:33
xAOD::TEvent::readFrom
StatusCode readFrom(::TFile *file, Bool_t useTreeCache=kTRUE, const char *treeName=EVENT_TREE_NAME)
Connect the object to a new input file.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:365
TauAnalysisTools::TauTruthMatchingTool::getTruth
virtual const xAOD::TruthParticle * getTruth(const xAOD::TauJet &xTau) override final
Definition: TauTruthMatchingTool.cxx:59
RETRIEVE
#define RETRIEVE(TYPE, CONTAINER, NAME)
Definition: TauAnalysisToolsExample.cxx:54
TauAnalysisTools::CutPt
@ CutPt
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:42
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
ToolHandle.h
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
TauAnalysisTools::TauSmearingTool::initialize
virtual StatusCode initialize()
Function initialising the tool.
Definition: TauSmearingTool.cxx:37
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:84
TauAnalysisTools::TauEfficiencyCorrectionsTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const CP::SystematicSet &systConfig)
effects: configure this tool for the given list of systematic variations.
Definition: TauEfficiencyCorrectionsTool.cxx:294
xAOD::Init
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
Definition: Init.cxx:31