ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
SUSYToolsAlg Class Reference

#include <SUSYToolsAlg.h>

Inheritance diagram for SUSYToolsAlg:
Collaboration diagram for SUSYToolsAlg:

Public Types

typedef ServiceHandle< StoreGateSvc > & MetaStorePtr_t
 Type of the metadata store pointer in standalone mode. More...
 
typedef const ServiceHandle< StoreGateSvc > & ConstMetaStorePtr_t
 
typedef ServiceHandle< StoreGateSvcMetaStore_t
 Type of the metadata store variable in Athena. More...
 

Public Member Functions

 SUSYToolsAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~SUSYToolsAlg ()
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
::StatusCode requestFileExecute ()
 register this algorithm to have an implementation of fileexecute More...
 
::StatusCode requestBeginInputFile ()
 register this algorithm to have an implementation of beginInputFile More...
 
::StatusCode requestEndInputFile ()
 register this algorithm to have an implementation of endInputFile More...
 
void handle (const Incident &inc)
 receive the given incident More...
 
virtual StatusCode sysInitialize ()
 Initialization method invoked by the framework. More...
 
const ServiceHandle< ITHistSvc > & histSvc () const
 The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a pointer to the THistSvc. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

virtual void print () const
 print the state of the algorithm More...
 
virtual ::StatusCode fileExecute ()
 perform the action exactly once for each file in the dataset More...
 
virtual ::StatusCode beginInputFile ()
 perform the action for the beginning of an input file More...
 
virtual ::StatusCode endInputFile ()
 perform the action for the end of an input file More...
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 
StatusCode configAthHistogramming (const ServiceHandle< ITHistSvc > &histSvc, const std::string &prefix, const std::string &rootDir, const std::string &histNamePrefix, const std::string &histNamePostfix, const std::string &histTitlePrefix, const std::string &histTitlePostfix)
 To be called by the derived classes to fill the internal configuration. More...
 
TH1 * bookGetPointer (const TH1 &hist, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of histograms. More...
 
TH1 * bookGetPointer (TH1 *hist, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of histograms. More...
 
TH1 * bookGetPointer (TH1 &histRef, std::string tDir="", std::string stream="")
 Simplify the booking and registering (into THistSvc) of histograms. More...
 
TTree * bookGetPointer (const TTree &treeRef, std::string tDir="", std::string stream="")
 Simplify the booking and registering (into THistSvc) of TTrees. More...
 
TGraph * bookGetPointer (const TGraph &graphRef, std::string tDir="", std::string stream="")
 Simplify the booking and registering (into THistSvc) of TGraphs. More...
 
TEfficiency * bookGetPointer (const TEfficiency &eff, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of TEfficiency. More...
 
TEfficiency * bookGetPointer (TEfficiency *eff, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of TEfficiency. More...
 
TEfficiency * bookGetPointer (TEfficiency &effRef, std::string tDir="", std::string stream="")
 Simplify the booking and registering (into THistSvc) of TEfficiency. More...
 
StatusCode book (const TH1 &hist, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of histograms. More...
 
StatusCode book (TH1 *hist, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of histograms. More...
 
StatusCode book (TH1 &histRef, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of histograms. More...
 
StatusCode book (const TTree &treeRef, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of TTrees. More...
 
StatusCode book (const TGraph &graphRef, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of TGraphs. More...
 
StatusCode book (const TEfficiency &eff, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of TEfficiency. More...
 
StatusCode book (TEfficiency *eff, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of TEfficiency. More...
 
StatusCode book (TEfficiency &effRef, const std::string &tDir="", const std::string &stream="")
 Simplify the booking and registering (into THistSvc) of TEfficiency. More...
 
TH1 * hist (const std::string &histName, const std::string &tDir="", const std::string &stream="")
 Simplify the retrieval of registered histograms of any type. More...
 
TH2 * hist2d (const std::string &histName, const std::string &tDir="", const std::string &stream="")
 Simplify the retrieval of registered 2-d histograms. More...
 
TH3 * hist3d (const std::string &histName, const std::string &tDir="", const std::string &stream="")
 Simplify the retrieval of registered 3-d histograms. More...
 
TTree * tree (const std::string &treeName, const std::string &tDir="", const std::string &stream="")
 Simplify the retrieval of registered TTrees. More...
 
TGraph * graph (const std::string &graphName, const std::string &tDir="", const std::string &stream="")
 Simplify the retrieval of registered TGraphs. More...
 
TEfficiency * efficiency (const std::string &effName, const std::string &tDir="", const std::string &stream="")
 Simplify the retrieval of registered TEfficiency. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 
typedef uint32_t hash_t
 typedef for the internal hash More...
 
typedef std::map< const hash_t, TH1 * > HistMap_t
 Typedef for convenience. More...
 
typedef std::map< const hash_t, TEfficiency * > EffMap_t
 Typedef for convenience. More...
 
typedef std::map< const hash_t, TTree * > TreeMap_t
 Typedef for convenience. More...
 
typedef std::map< const hash_t, TGraph * > GraphMap_t
 Typedef for convenience. More...
 

Private Member Functions

 SUSYToolsAlg ()
 
void groupSysts (void)
 
StatusCode bookHistograms (void)
 
void stdHistsForObj (xAOD::IParticle *obj, const std::string &objtype, const std::string &objlevel, std::map< std::string, std::string > config=std::map< std::string, std::string >())
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 
void buildBookingString (std::string &bookingString, std::string &histName, std::string &tDir, std::string &stream, bool usePrefixPostfix=false)
 Method to build individual booking string. More...
 
void myReplace (std::string &str, const std::string &oldStr, const std::string &newStr)
 Helper method to replace sub-string. More...
 
hash_t hash (const std::string &histName) const
 Method to calculate a 32-bit hash from a string. More...
 

Private Attributes

std::vector< std::string > m_GRLFiles
 
std::string m_mcCampaign
 
std::map< std::string, bool > m_slices
 
std::map< std::string, TH1 * > m_hists
 
std::map< std::string, TEfficiency * > m_heffs
 
std::map< std::string, std::string > m_configDict
 
asg::AnaToolHandle< ST::ISUSYObjDef_xAODToolm_SUSYTools
 
asg::AnaToolHandle< IGoodRunsListSelectionToolm_grl
 
asg::AnaToolHandle< TauAnalysisTools::ITauTruthMatchingToolm_tauTruthMatchingTool
 
unsigned int m_Nevts
 
int m_maxEvts
 
int m_lbfilter
 
bool m_isPHYSLITE
 
std::string m_kernel
 
std::string m_configFile
 
std::string m_FatJetCollection
 
std::string m_TrkJetCollection
 
std::string m_TrkJetTimeStamp
 
bool m_doSyst
 
std::vector< ST::SystInfom_sysInfoList
 
std::map< std::string, std::vector< std::string > > m_syst_all
 
std::map< std::string, std::vector< std::string > > m_syst_weights
 
TStopwatch m_clock0
 
TStopwatch m_clock1
 
TStopwatch m_clock2
 
std::map< std::string, std::vector< std::string > > m_triggers
 
std::vector< std::string > m_objects
 
std::vector< std::string > m_levels
 
std::vector< std::string > m_vars
 
std::map< std::string, std::map< std::string, int > > m_obj_count
 
xAOD::MissingETContainerm_mettst_syst
 
xAOD::MissingETAuxContainerm_mettst_syst_aux
 
xAOD::MissingETContainerm_metcst_syst
 
xAOD::MissingETAuxContainerm_metcst_syst_aux
 
xAOD::MissingETContainerm_metcst_nominal
 
xAOD::MissingETAuxContainerm_metcst_nominal_aux
 
xAOD::MissingETContainerm_mettst_nominal
 
xAOD::MissingETAuxContainerm_mettst_nominal_aux
 
MetaStore_t m_inputMetaStore
 Object accessing the input metadata store. More...
 
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store. More...
 
bool m_hasFileExecute {false}
 the value of hasFileExecute More...
 
bool m_hasBeginInputFile {false}
 the value of hasBeginInputFile More...
 
bool m_hasEndInputFile {false}
 the value of hasEndInputFile More...
 
ServiceHandle< ITHistSvc > m_histSvc
 Default constructor: AthHistogramAlgorithm();. More...
 
std::string m_prefix
 Name of the ROOT output stream (file) More...
 
std::string m_rootDir
 Name of the ROOT directory. More...
 
std::string m_histNamePrefix
 The prefix for the histogram THx name. More...
 
std::string m_histNamePostfix
 The postfix for the histogram THx name. More...
 
std::string m_histTitlePrefix
 The prefix for the histogram THx title. More...
 
std::string m_histTitlePostfix
 The postfix for the histogram THx title. More...
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 
HistMap_t m_histMap
 The map of histogram names to their pointers. More...
 
EffMap_t m_effMap
 The map of histogram names to their pointers. More...
 
TreeMap_t m_treeMap
 The map of TTree names to their pointers. More...
 
GraphMap_t m_graphMap
 The map of TGraph names to their pointers. More...
 
std::string m_streamName
 Name of the ROOT output stream (file) More...
 
std::string m_name
 Instance name. More...
 
MsgStream m_msg
 Cached Message Stream. More...
 

Detailed Description

Definition at line 51 of file SUSYToolsAlg.h.

Member Typedef Documentation

◆ ConstMetaStorePtr_t

Definition at line 111 of file AnaAlgorithm.h.

◆ EffMap_t

typedef std::map< const hash_t, TEfficiency* > AthHistogramming::EffMap_t
privateinherited

Typedef for convenience.

Definition at line 205 of file AthHistogramming.h.

◆ GraphMap_t

typedef std::map< const hash_t, TGraph* > AthHistogramming::GraphMap_t
privateinherited

Typedef for convenience.

Definition at line 219 of file AthHistogramming.h.

◆ hash_t

typedef uint32_t AthHistogramming::hash_t
privateinherited

typedef for the internal hash

Definition at line 169 of file AthHistogramming.h.

◆ HistMap_t

typedef std::map< const hash_t, TH1* > AthHistogramming::HistMap_t
privateinherited

Typedef for convenience.

Definition at line 198 of file AthHistogramming.h.

◆ MetaStore_t

Type of the metadata store variable in Athena.

Definition at line 546 of file AnaAlgorithm.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 110 of file AnaAlgorithm.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ TreeMap_t

typedef std::map< const hash_t, TTree* > AthHistogramming::TreeMap_t
privateinherited

Typedef for convenience.

Definition at line 212 of file AthHistogramming.h.

Constructor & Destructor Documentation

◆ SUSYToolsAlg() [1/2]

SUSYToolsAlg::SUSYToolsAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 77 of file SUSYToolsAlg.cxx.

79  : EL::AnaAlgorithm (name, pSvcLocator)
80  , m_SUSYTools("ST::SUSYObjDef_xAOD/SUSYTools",this)
81  , m_tauTruthMatchingTool("TauAnalysisTools::TauTruthMatchingTool/TauTruthMatchingTool")
82  , m_Nevts(0)
83  , m_kernel("StreamDAOD")
84  , m_configFile("SUSYTools/SUSYTools_Default.conf")
85 {
86 
87  declareProperty( "DoSyst", m_doSyst = false );
88  declareProperty( "GRLFiles", m_GRLFiles );
89  declareProperty( "maxEvts", m_maxEvts = -999 );
90  declareProperty( "LumiBlockFilter", m_lbfilter = 90 );
91 
92 
93  // asg Tool Handles must be dealt with differently
94  m_tauTruthMatchingTool.declarePropertyFor( this, "TauTruthMatchingTool", "The TTMT" );
95  m_SUSYTools.declarePropertyFor( this, "SUSYTools", "The SUSYTools instance" );
96 }

◆ ~SUSYToolsAlg()

SUSYToolsAlg::~SUSYToolsAlg ( )

Definition at line 100 of file SUSYToolsAlg.cxx.

100 { }

◆ SUSYToolsAlg() [2/2]

SUSYToolsAlg::SUSYToolsAlg ( )
private

Member Function Documentation

◆ beginInputFile()

StatusCode EL::AnaAlgorithm::beginInputFile ( )
protectedinherited

perform the action for the beginning of an input file

Ideally you don't use this, but instead rely on meta-data tools instead. However, there are enough people asking for it that I decided to implement it anyways.

\warn To use this you have to call requestBeginInputFile to use this.

\warn If a file is split across multiple jobs this will be called more than once. This only happens for specific batch drivers and/or if it is explicitly configured by the user. With PROOF it could even happen multiple times within the same job, and while PROOF is no longer supported that behavior may come back if support for a similar framework is added in the future. As such, this method should not be used for accounting that relies to be called exactly once per file, take a look at fileExecute if you want something that is guaranteed to be executed exactly once per input file.

\warn The execution order of beginInputFile and fileExecute is currently unspecified.

Definition at line 350 of file AnaAlgorithm.cxx.

352  {
353  return StatusCode::SUCCESS;
354  }

◆ book() [1/8]

StatusCode AthHistogramming::book ( const TEfficiency &  eff,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of TEfficiency.

Definition at line 335 of file AthHistogramming.h.

336 {
337  // We need to create a non-const clone
338  TEfficiency* effClone = dynamic_cast< TEfficiency* >( eff.Clone() );
339  if ( !effClone ) {
340  m_msg << MSG::ERROR << "Couldn't create a TEfficiency clone" << endmsg;
341  return StatusCode::FAILURE;
342  }
343  return this->book( *effClone, tDir, stream );
344 }

◆ book() [2/8]

StatusCode AthHistogramming::book ( const TGraph &  graphRef,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of TGraphs.

◆ book() [3/8]

StatusCode AthHistogramming::book ( const TH1 &  hist,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of histograms.

Definition at line 303 of file AthHistogramming.h.

304 {
305  // We need to create a non-const clone
306  TH1* histClone = dynamic_cast< TH1* >( hist.Clone() );
307  if ( !histClone ) {
308  m_msg << MSG::ERROR << "Couldn't create a TH1 clone" << endmsg;
309  return StatusCode::FAILURE;
310  }
311  return this->book( *histClone, tDir, stream );
312 }

◆ book() [4/8]

StatusCode AthHistogramming::book ( const TTree &  treeRef,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of TTrees.

Definition at line 403 of file AthHistogramming.h.

404 {
405  // Call the other Book method and see if it returns a valid pointer
406  TTree* treePointer = this->bookGetPointer( treeRef, tDir, stream );
407  if ( treePointer )
408  {
409  return StatusCode::SUCCESS;
410  }
411  else
412  {
413  return StatusCode::FAILURE;
414  }
415 }

◆ book() [5/8]

StatusCode AthHistogramming::book ( TEfficiency &  effRef,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of TEfficiency.

Definition at line 356 of file AthHistogramming.h.

357 {
358  // Call the other Book method and see if it returns a valid pointer
359  TEfficiency* effPointer = this->bookGetPointer( effRef, tDir, stream );
360  if ( !effPointer ) {
361  m_msg << MSG::ERROR << "Couldn't book a TEfficiency" << endmsg;
362  return StatusCode::FAILURE;
363  }
364  return StatusCode::SUCCESS;
365 }

◆ book() [6/8]

StatusCode AthHistogramming::book ( TEfficiency *  eff,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of TEfficiency.

Definition at line 346 of file AthHistogramming.h.

347 {
348  if ( !eff ) {
349  m_msg << MSG::ERROR << "Got a zero pointer to a TEfficiency" << endmsg;
350  return StatusCode::FAILURE;
351  }
352  return this->book( *eff, tDir, stream );
353 }

◆ book() [7/8]

StatusCode AthHistogramming::book ( TH1 &  histRef,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of histograms.

Definition at line 324 of file AthHistogramming.h.

325 {
326  // Call the other Book method and see if it returns a valid pointer
327  TH1* histPointer = this->bookGetPointer( histRef, tDir, stream );
328  if ( !histPointer ) {
329  m_msg << MSG::ERROR << "Couldn't book a TH1" << endmsg;
330  return StatusCode::FAILURE;
331  }
332  return StatusCode::SUCCESS;
333 }

◆ book() [8/8]

StatusCode AthHistogramming::book ( TH1 *  hist,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of histograms.

Definition at line 314 of file AthHistogramming.h.

315 {
316  if ( !hist ) {
317  m_msg << MSG::ERROR << "Got a zero pointer to a TH1" << endmsg;
318  return StatusCode::FAILURE;
319  }
320  return this->book( *hist, tDir, stream );
321 }

◆ bookGetPointer() [1/8]

TEfficiency * AthHistogramming::bookGetPointer ( const TEfficiency &  eff,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of TEfficiency.

Definition at line 281 of file AthHistogramming.h.

282 {
283  // We need to create a non-const clone
284  TEfficiency* histClone = dynamic_cast< TEfficiency* >( hist.Clone() );
285  if ( !histClone ) {
286  m_msg << MSG::ERROR << "Couldn't create a TEfficiency clone in bookGetPointer" << endmsg;
287  return 0;
288  }
289  return this->bookGetPointer( *histClone, tDir, stream );
290 
291 }

◆ bookGetPointer() [2/8]

TGraph * AthHistogramming::bookGetPointer ( const TGraph &  graphRef,
std::string  tDir = "",
std::string  stream = "" 
)
protectedinherited

Simplify the booking and registering (into THistSvc) of TGraphs.

Definition at line 427 of file AthHistogramming.cxx.

428 {
429  // Get a pointer
430  const TGraph* graphPointer = &graphRef;
431 
432  // Check that we got a valid pointer
433  if ( !graphPointer )
434  {
435  m_msg << MSG::WARNING
436  << "We got an invalid TGraph pointer in the BookGetPointer(TGraph*) method of the class" << m_name
437  << "!" << endmsg;
438  return NULL;
439  }
440 
441  // Modify the name and title according to the prefixes of this classes instance
442  std::string graphName = graphPointer->GetName();
443  const std::string graphTitle = graphPointer->GetTitle();
444 
445  // Check if the hash for this graphName already exists, i.e., if we have a hash collision
446  const hash_t graphHash = this->hash(graphName);
447  GraphMap_t::const_iterator it = m_graphMap.find( graphHash );
448  if ( it != m_graphMap.end() ) // It does exist!
449  {
450  m_msg << MSG::WARNING
451  << "Detected a hash collision. The hash for the TGraph with name=" << graphName
452  << " already exists and points to a TGraph with name=" << it->second->GetName()
453  << " NOT going to book the new histogram and returning a NULL pointer!" << endmsg;
454  return NULL;
455  }
456 
457  // Create a clone that has the new name
458  TGraph* graphClone = dynamic_cast< TGraph* >( graphPointer->Clone((m_histNamePrefix+graphName+m_histNamePostfix).c_str()) );
459  if( !graphClone )
460  {
461  m_msg << MSG::WARNING
462  << "We couldn't clone the TGraph in the BookGetPointer(TGraph&) method of the class" << m_name
463  << "!" << endmsg;
464  return NULL;
465  }
466  graphClone->SetTitle ((m_histTitlePrefix+graphTitle+m_histTitlePostfix).c_str());
467 
468  // Massage the final string to book things
469  std::string bookingString("");
470  this->buildBookingString( bookingString, graphName, tDir, stream );
471 
472  // Register the TGraph into the THistSvc
473  if ( !((histSvc()->regGraph(bookingString, graphClone)).isSuccess()) )
474  {
475  m_msg << MSG::WARNING
476  << "Problem registering TGraph with name " << graphName
477  << ", title " << graphTitle
478  << " in " << m_name << "!" << endmsg;
479  return NULL;
480  }
481 
482  // Also register it in the local map of string to pointer
483  m_graphMap.insert( m_graphMap.end(), std::pair< const hash_t, TGraph* >( graphHash, graphClone ) );
484 
485  return graphClone;
486 }

◆ bookGetPointer() [3/8]

TH1 * AthHistogramming::bookGetPointer ( const TH1 &  hist,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of histograms.

Definition at line 260 of file AthHistogramming.h.

261 {
262  // We need to create a non-const clone
263  TH1* histClone = dynamic_cast< TH1* >( hist.Clone() );
264  if ( !histClone ) {
265  m_msg << MSG::ERROR << "Couldn't create a TH1 clone in bookGetPointer" << endmsg;
266  return 0;
267  }
268  return this->bookGetPointer( *histClone, tDir, stream );
269 
270 }

◆ bookGetPointer() [4/8]

TTree * AthHistogramming::bookGetPointer ( const TTree &  treeRef,
std::string  tDir = "",
std::string  stream = "" 
)
protectedinherited

Simplify the booking and registering (into THistSvc) of TTrees.

Definition at line 312 of file AthHistogramming.cxx.

313 {
314  // Get a pointer
315  const TTree* treePointer = &treeRef;
316 
317  // Check that we got a valid pointer
318  if ( !treePointer )
319  {
320  m_msg << MSG::WARNING
321  << "We got an invalid TTree pointer in the BookGetPointer(TTree*) method of the class" << m_name
322  << "!" << endmsg;
323  return NULL;
324  }
325 
326  // Modify the name and title according to the prefixes of this classes instance
327  std::string treeName = treePointer->GetName();
328  const std::string treeTitle = treePointer->GetTitle();
329 
330  // Check if the hash for this treeName already exists, i.e., if we have a hash collision
331  const hash_t treeHash = this->hash(treeName);
332  TreeMap_t::const_iterator it = m_treeMap.find( treeHash );
333  if ( it != m_treeMap.end() ) // It does exist!
334  {
335  m_msg << MSG::WARNING
336  << "Detected a hash collision. The hash for the TTree with name=" << treeName
337  << " already exists and points to a TTree with name=" << it->second->GetName()
338  << " NOT going to book the new histogram and returning a NULL pointer!" << endmsg;
339  return NULL;
340  }
341 
342  // Create a clone that has the new name
343  TTree* treeClone = dynamic_cast< TTree* >( treePointer->Clone(treeName.c_str()) );
344  if( !treeClone )
345  {
346  m_msg << MSG::WARNING
347  << "We couldn't clone the TTree in the BookGetPointer(TTree&) method of the class" << m_name
348  << "!" << endmsg;
349  return NULL;
350  }
351  treeClone->SetTitle (treeTitle.c_str());
352 
353  // Massage the final string to book things
354  std::string bookingString("");
355  this->buildBookingString( bookingString, treeName, tDir, stream );
356 
357  // Register the TTree into the THistSvc
358  if ( !((histSvc()->regTree(bookingString, treeClone)).isSuccess()) )
359  {
360  m_msg << MSG::WARNING
361  << "Problem registering TTree with name " << treeName
362  << ", title " << treeTitle
363  << " in " << m_name << "!" << endmsg;
364  return NULL;
365  }
366 
367  // Also register it in the local map of string to pointer
368  m_treeMap.insert( m_treeMap.end(), std::pair< const hash_t, TTree* >( treeHash, treeClone ) );
369 
370  return treeClone;
371 }

◆ bookGetPointer() [5/8]

TEfficiency * AthHistogramming::bookGetPointer ( TEfficiency &  effRef,
std::string  tDir = "",
std::string  stream = "" 
)
protectedinherited

Simplify the booking and registering (into THistSvc) of TEfficiency.

Definition at line 146 of file AthHistogramming.cxx.

147 {
148  // Modify the name and title according to the prefixes of this classes instance
149  std::string effName(effRef.GetName());
150  const std::string effTitle(effRef.GetTitle());
151  std::string bookingString("");
152 
153  this->buildBookingString( bookingString, effName, tDir, stream );
154  effRef.SetTitle((m_histTitlePrefix+effTitle+m_histTitlePostfix).c_str() );
155  effRef.SetName(effName.c_str());
156 
157  // Check if the hash for this effName already exists, i.e., if we have a hash collision
158  const hash_t effHash = this->hash(effName);
159  EffMap_t::const_iterator it = m_effMap.find( effHash );
160  if ( it != m_effMap.end() ) // It does exist!
161  {
162  m_msg << MSG::WARNING
163  << "Detected a hash collision. The hash for the TEfficiency with name=" << effName
164  << " already exists and points to a TEfficiency with name=" << it->second->GetName()
165  << " NOT going to book the new TEfficiency and returning a NULL pointer!" << endmsg;
166  return NULL;
167  }
168 
169  // Set the new name and title for the TEfficiency, based on the prefixes that the user set for this class instance
170  // Create a clone that has the new name
171 
172  // Massage the final string to book things
173 
174  // Register the TEfficiency into the THistSvc
175  if ( !((histSvc()->regEfficiency(bookingString, &effRef)).isSuccess()) )
176  {
177  m_msg << MSG::WARNING
178  << "Problem registering TEfficiency with name " << effName
179  << ", name prefix " << m_histNamePrefix
180  << ", title " << effTitle
181  << ", tile prefix " << m_histTitlePrefix
182  << ", and tile postfix " << m_histTitlePostfix
183  << " in " << m_name << "!" << endmsg;
184  return NULL;
185  }
186 
187  // Also register it in the local map of string to pointer
188  m_effMap.insert( m_effMap.end(), std::pair< const hash_t, TEfficiency* >( effHash, &effRef ) );
189 
190  return &effRef;
191 }

◆ bookGetPointer() [6/8]

TEfficiency * AthHistogramming::bookGetPointer ( TEfficiency *  eff,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of TEfficiency.

Definition at line 293 of file AthHistogramming.h.

294 {
295  if ( !hist ) {
296  m_msg << MSG::ERROR << "Got a zero pointer to a TEfficiency in bookGetPointer" << endmsg;
297  return 0;
298  }
299  return this->bookGetPointer( *hist, tDir, stream );
300 }

◆ bookGetPointer() [7/8]

TH1 * AthHistogramming::bookGetPointer ( TH1 &  histRef,
std::string  tDir = "",
std::string  stream = "" 
)
protectedinherited

Simplify the booking and registering (into THistSvc) of histograms.

Definition at line 98 of file AthHistogramming.cxx.

99 {
100  // Modify the name and title according to the prefixes of this classes instance
101  std::string histName(histRef.GetName());
102  const std::string histTitle(histRef.GetTitle());
103  std::string bookingString("");
104 
105  this->buildBookingString( bookingString, histName, tDir, stream );
106  histRef.SetTitle((m_histTitlePrefix+histTitle+m_histTitlePostfix).c_str() );
107  histRef.SetName(histName.c_str());
108 
109  // Check if the hash for this histName already exists, i.e., if we have a hash collision
110  const hash_t histHash = this->hash(histName);
111  HistMap_t::const_iterator it = m_histMap.find( histHash );
112  if ( it != m_histMap.end() ) // It does exist!
113  {
114  m_msg << MSG::WARNING
115  << "Detected a hash collision. The hash for the histogram with name=" << histName
116  << " already exists and points to a histogram with name=" << it->second->GetName()
117  << " NOT going to book the new histogram and returning a NULL pointer!" << endmsg;
118  return NULL;
119  }
120 
121  // Set the new name and title for the histogram, based on the prefixes that the user set for this class instance
122  // Create a clone that has the new name
123 
124  // Massage the final string to book things
125 
126  // Register the histogram into the THistSvc
127  if ( !((histSvc()->regHist(bookingString, &histRef)).isSuccess()) )
128  {
129  m_msg << MSG::WARNING
130  << "Problem registering histogram with name " << histName
131  << ", name prefix " << m_histNamePrefix
132  << ", title " << histTitle
133  << ", tile prefix " << m_histTitlePrefix
134  << ", and tile postfix " << m_histTitlePostfix
135  << " in " << m_name << "!" << endmsg;
136  return NULL;
137  }
138 
139  // Also register it in the local map of string to pointer
140  m_histMap.insert( m_histMap.end(), std::pair< const hash_t, TH1* >( histHash, &histRef ) );
141 
142  return &histRef;
143 }

◆ bookGetPointer() [8/8]

TH1 * AthHistogramming::bookGetPointer ( TH1 *  hist,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the booking and registering (into THistSvc) of histograms.

Definition at line 272 of file AthHistogramming.h.

273 {
274  if ( !hist ) {
275  m_msg << MSG::ERROR << "Got a zero pointer to a TH1 in bookGetPointer" << endmsg;
276  return 0;
277  }
278  return this->bookGetPointer( *hist, tDir, stream );
279 }

◆ bookHistograms()

StatusCode SUSYToolsAlg::bookHistograms ( void  )
private

Definition at line 1320 of file SUSYToolsAlg.cxx.

1320  {
1321  // General info
1322  ATH_CHECK( book(TH1D("EventInfo/info_runNo", ";RunNumber;N", 1500, 250000, 400000)) );
1323  ATH_CHECK( book(TH1D("EventInfo/info_evtNo", ";EventNumber;N", 600, 100000000, 400000000)) );
1324  ATH_CHECK( book(TH1D("EventInfo/info_lumiBlock", ";LumiBlock;N", 1000, 0, 1000)) );
1325 
1326  // Kinematic histograms
1327  m_objects = {"el", "ph", "mu", "tau", "jet", "bjet", "fatjet", "trkjet"};
1328  m_levels = {"nom", "bsl", "sig"};
1329  m_vars = {"pt", "eta", "phi", "e", "mass", "d0", "z0", "isolCalo", "isolTrack", "truthType", "truthOrigin", "N", "bweight", "bweightpb", "bweightpc", "bweightpu", "pid", "parentpid", "wtagged", "ztagged", "toptagged", "toptaggedscore","nTracks","nTracksCharged","nTracksIsolation","RNNJetScoreSigTrans"};
1330  std::map<std::string,std::vector<std::string>> cfg_hist_labels = {
1331  {"pt",{"p_{T} [GeV]","N"}}, {"eta",{"#eta","N"}}, {"phi",{"#phi","N"}}, {"e",{"energy","N"}}, {"mass",{"mass","N"}},
1332  {"d0",{"d0 significance","N"}}, {"z0",{"z0 * sin(#theta)","N"}}, {"isolCalo",{"isolation (calo) / pT","N"}}, {"isolTrack",{"isolation (track) / pT","N"}},
1333  {"truthType",{"truth type","N"}}, {"truthOrigin",{"truth origin","N"}}, {"N",{"count","N"}},
1334  {"bweight",{"b-weight","N"}}, {"bweightpb",{"b-weight (pb)","N"}}, {"bweightpc",{"b-weight (pc)","N"}}, {"bweightpu",{"b-weight (pu)","N"}},
1335  {"pid", {"pdg ID", "N"}}, {"parentpid", {"parent pdg ID","N"}},
1336  {"wtagged", {"W tagged", "N"}}, {"ztagged", {"Z tagged", "N"}}, {"toptagged", {"Top tagged", "N"}}, {"toptaggedscore", {"Top tagger score", "N"}},
1337  {"nTracks", {"N tracks", "N"}}, {"nTracksCharged", {"N tracks charged", "N"}}, {"nTracksIsolation", {"N tracks isolation", "N"}}, {"RNNJetScoreSigTrans", {"RNNJetScoreSigTrans","N"}} };
1338  std::map<std::string,int> cfg_hist_nbins = {
1339  {"pt",100}, {"eta",40}, {"phi",64}, {"e",100}, {"mass",100},
1340  {"d0",50}, {"z0",60}, {"isolCalo",70}, {"isolTrack",70},
1341  {"truthType",50}, {"truthOrigin",50}, {"N",16},
1342  {"bweight",200}, {"bweightpb",200}, {"bweightpc",200}, {"bweightpu",200},
1343  {"pid",61}, {"parentpid",61},
1344  {"wtagged",3}, {"ztagged",3}, {"toptagged",3}, {"toptaggedscore",50},
1345  {"nTracks",20}, {"nTracksCharged",20}, {"nTracksIsolation",5}, {"RNNJetScoreSigTrans",50} };
1346  std::map<std::string,std::vector<float>> cfg_hist_minmax = {
1347  {"pt",{0,200}}, {"eta",{-4,4}}, {"phi",{-3.2,3.2}}, {"e",{0,200}}, {"mass",{0,200}},
1348  {"d0",{-10,10}}, {"z0",{-1.5,1.5}}, {"isolCalo",{-0.2,0.5}}, {"isolTrack",{-0.2,0.5}},
1349  {"truthType",{0,50}}, {"truthOrigin",{0,50}}, {"N",{0,16}},
1350  {"bweight",{-10,10}}, {"bweightpb",{-0.5,1.5}}, {"bweightpc",{-0.5,1.5}}, {"bweightpu",{-0.5,1.5}},
1351  {"pid",{-30.5,30.5}}, {"parentpid",{-30.5,30.5}},
1352  {"wtagged", {-1,2}}, {"ztagged", {-1,2}}, {"toptagged", {-1,2}}, {"toptaggedscore", {0,1}},
1353  {"nTracks", {0,20}}, {"nTracksCharged", {0,20}}, {"nTracksIsolation", {0,5}}, {"RNNJetScoreSigTrans", {0,1}} };
1354  std::map<std::string,std::string> labels_objects = { {"el","Electron"}, {"ph","Photon"}, {"mu","Muon"}, {"jet","Jet"}, {"bjet","b-Jet"}, {"tau","Tau"}, {"fatjet","Large-R jet"}, {"trkjet","Track jet"} };
1355  std::map<std::string,std::string> labels_levels = { {"nom","Nominal"}, {"bsl","Baseline"}, {"sig","Signal"} };
1356  std::map<std::string,std::string> labels_dir = { {"el","Electron"}, {"ph","Photon"}, {"mu","Muon"}, {"jet","Jet"}, {"bjet","bJet"}, {"tau","Tau"}, {"fatjet","LargeRJet"}, {"trkjet","TrackJet"} };
1357 
1358  for (const auto& obj : m_objects) {
1359  m_obj_count[obj] = std::map<std::string,int>();
1360  for (const auto& lev : m_levels) {
1361  m_obj_count[obj][lev] = 0;
1362  }
1363  }
1364 
1365  for (const auto& obj : m_objects) {
1366  for (const auto& lev : m_levels) {
1367  for (const auto& var : m_vars) {
1368  if (var.find("bweight")!=std::string::npos && obj.compare("bjet")!=0) continue; // bweights only for bjets
1369  if (var.find("tagged")!=std::string::npos && obj.compare("fatjet")!=0) continue; // boson tagging only for fjets
1370  if ((var.find("nTracks")!=std::string::npos||var.find("RNNJetScore")!=std::string::npos) && obj.compare("tau")!=0) continue; // nTracks/RNN score only for taus
1371  if (var.find("isol")!=std::string::npos && !(obj.compare("el")==0||obj.compare("mu")==0||obj.compare("ph")==0)) continue; // isol only for e/ph/mu
1372  std::string key = labels_dir[obj] + "/" + obj + "_" + lev + "_" + var;
1373  std::string labels = ";"+labels_levels[lev]+" "+labels_objects[obj]+" "+cfg_hist_labels[var][0]+";"+cfg_hist_labels[var][1];
1374  ATH_CHECK( book(TH1D(key.c_str(), labels.c_str(), cfg_hist_nbins[var], cfg_hist_minmax[var][0], cfg_hist_minmax[var][1])) );
1375  m_hists[key] = hist(key);
1376  ATH_MSG_INFO("Defined histogram: " << key.c_str() << ", " << m_hists[key]);
1377  }
1378  }
1379  }
1380 
1381  #ifdef XAOD_STANDALONE
1382  for (std::string obj : {"el","mu","ph"}) {
1384  for (auto trg : m_triggers[obj]) {
1385  for (std::string var : {"pt","eta","phi"} ) {
1386  std::string key = "Trigger/"+obj+"_"+var+"_"+trg;
1387  std::string labels = ";"+labels_objects[obj]+" "+cfg_hist_labels[var][0]+";Efficiency "+trg;
1388  ATH_CHECK(book(TEfficiency(key.c_str(), labels.c_str(), cfg_hist_nbins[var], cfg_hist_minmax[var][0], cfg_hist_minmax[var][1])));
1389  m_heffs[key] = histeff(key);
1390  ATH_MSG_INFO("Defined histogram: " << key.c_str() << ", " << m_heffs[key]);
1391  }
1392  }
1393  }
1394  #endif
1395 
1396  ATH_CHECK( book(TH1D("Trigger/el_trigmatch_eff_nominal", "Electron Trigger Matching Efficiency (Nominal);Electron Trigger Matching Efficiency (Nominal);N", getSize(m_triggers,"el"), 0, getSize(m_triggers,"el")) ) );
1397  ATH_CHECK( book(TH1D("Trigger/ph_trigmatch_eff_nominal", "Photon Trigger Matching Efficiency (Nominal);Photon Trigger Matching Efficiency (Nominal);N", getSize(m_triggers,"ph"), 0, getSize(m_triggers,"ph")) ) );
1398  ATH_CHECK( book(TH1D("Trigger/mu_trigmatch_eff_nominal", "Muon Trigger Matching Efficiency (Nominal);Muon Trigger Matching Efficiency (Nominal);N", getSize(m_triggers,"mu"), 0, getSize(m_triggers,"mu")) ) );
1399 
1400  // Extra histograms
1401  ATH_CHECK( book(TH1D("Cutflow/el_n_flow_nominal", "Electron Cutflow (Nominal);Electron Cutflow (Nominal);N", Cut::NSel, 0, Cut::NSel) ) );
1402  ATH_CHECK( book(TH1D("Cutflow/ph_n_flow_nominal", "Photon Cutflow (Nominal);Photon Cutflow (Nominal);N", Cut::NSel, 0, Cut::NSel) ) );
1403  ATH_CHECK( book(TH1D("Cutflow/mu_n_flow_nominal", "Muon Cutflow (Nominal);Muon Cutflow (Nominal);N", Cut::NSel, 0, Cut::NSel) ) );
1404  ATH_CHECK( book(TH1D("Cutflow/jet_n_flow_nominal", "Jet Cutflow (Nominal);Jet Cutflow (Nominal);N", Cut::NSel, 0, Cut::NSel) ) );
1405  ATH_CHECK( book(TH1D("Cutflow/bjet_n_flow_nominal", "b-jet Cutflow (Nominal);b-jet Cutflow (Nominal);N", Cut::NSel, 0, Cut::NSel) ) );
1406  ATH_CHECK( book(TH1D("Cutflow/fatjet_n_flow_nominal", "Large R. Jet Cutflow (Nominal);Large R. Jet Cutflow (Nominal);N", Cut::NSel, 0, Cut::NSel) ) );
1407  ATH_CHECK( book(TH1D("Cutflow/trkjet_n_flow_nominal", "Track Jet Cutflow (Nominal);Track Jet Cutflow (Nominal);N", Cut::NSel, 0, Cut::NSel) ) );
1408  ATH_CHECK( book(TH1D("Cutflow/tau_n_flow_nominal", "Tau Cutflow (Nominal);Tau Cutflow (Nominal);N", Cut::NSel, 0, Cut::NSel) ) );
1409 
1410  ATH_CHECK( book(TH1D("MET/met_et", "MET (Nominal);MET (Nominal) [GeV];N / [10 GeV]", 50, 0, 500) ) ); //MET (+Components)
1411  ATH_CHECK( book(TH1D("MET/met_phi", "MET_phi (Nominal);MET_phi (Nominal);N", 50, -5, 5) ) );
1412  ATH_CHECK( book(TH1D("MET/met_sumet", "MET_sumet (Nominal);MET_sumet (Nominal) [GeV];N / [10 GeV]", 50, 0, 500) ) );
1413  ATH_CHECK( book(TH1D("MET/met_et_tst", "MET [PVSoftTrk] (Nominal);MET [PVSoftTrk] (Nominal) [GeV];N / [10 GeV]", 50, 0, 500) ) );
1414  ATH_CHECK( book(TH1D("MET/met_et_el", "MET [RefEle] (Nominal);MET [RefEle] (Nominal) [GeV];N / [10 GeV]", 50, 0, 500) ) );
1415  ATH_CHECK( book(TH1D("MET/met_et_ph", "MET [RefGamma] (Nominal);MET [RefGamma] (Nominal) [GeV];N / [10 GeV]", 50, 0, 500) ) );
1416  ATH_CHECK( book(TH1D("MET/met_et_mu", "MET [Muons] (Nominal);MET [Muons] (Nominal) [GeV];N / [10 GeV]", 50, 0, 500) ) );
1417  ATH_CHECK( book(TH1D("MET/met_et_jet", "MET [RefJet] (Nominal);MET [RefJet] (Nominal) [GeV];N / [10 GeV]", 50, 0, 500) ) );
1418  //ATH_CHECK( book(TH1D("MET/met_et_tau", "MET [RefTau] (Nominal);MET [RefTau] (Nominal) [GeV];N / [10 GeV]", 50, 0, 500) ) );
1419  ATH_CHECK( book(TH1D("MET/met_significance", "MET Significance;MET Significance;N / [0.5]", 60, 0, 30) ) );
1420 
1421  ATH_CHECK( book(TH1D("Syst/weight_event", "Event weights (Nom+Systematics) [MC*PRW];Event weights (Nom+Systematics) [MC*PRW];weight", getSize(m_syst_weights,"EventWeight"), 0, getSize(m_syst_weights,"EventWeight"))) ); //weights
1422  ATH_CHECK( book(TH1D("Syst/weight_electrons", "Electron total weights (Nom+Systematics);Electron total weights (Nom+Systematics);weight", getSize(m_syst_weights,"Electron") , 0, getSize(m_syst_weights,"Electron") )) ); //weights
1423  ATH_CHECK( book(TH1D("Syst/weight_muons", "Muon total weights (Nom+Systematics);Muon total weights (Nom+Systematics);weight", getSize(m_syst_weights,"Muon") , 0, getSize(m_syst_weights,"Muon") )) ); //weights
1424  ATH_CHECK( book(TH1D("Syst/weight_photons", "Photon total weights (Nom+Systematics);Photon total weights (Nom+Systematics);weight", getSize(m_syst_weights,"Photon") , 0, getSize(m_syst_weights,"Photon") )) ); //weights
1425  ATH_CHECK( book(TH1D("Syst/weight_taus", "Tau total weights (Nom+Systematics);Tau total weights (Nom+Systematics);weight", getSize(m_syst_weights,"Tau") , 0, getSize(m_syst_weights,"Tau") )) ); //weights
1426  ATH_CHECK( book(TH1D("Syst/weight_jets", "Jet total weights (Nom+Systematics);Jet total weights (Nom+Systematics);weight", getSize(m_syst_weights,"Jet") , 0, getSize(m_syst_weights,"Jet") )) ); //weights
1427  //ATH_CHECK( book(TH1D("Syst/weight_fatjets", "Large R. jet total weights (Nom+Systematics);Large R. jet total weights (Nom+Systematics);weight", getSize(m_syst_weights,"Jet") , 0, getSize(m_syst_weights,"Jet") )) ); //weights
1428  //ATH_CHECK( book(TH1D("Syst/weight_trkjets", "Track jet total weights (Nom+Systematics);Track jet total weights (Nom+Systematics);weight", getSize(m_syst_weights,"Jet") , 0, getSize(m_syst_weights,"Jet") )) ); //weights
1429  ATH_CHECK( book(TH1D("Syst/weight_btags", "Btagging total weights (Nom+Systematics);Btagging total weights (Nom+Systematics);weight", getSize(m_syst_weights,"BTag") , 0, getSize(m_syst_weights,"BTag") )) ); //weights
1430 
1431  ATH_CHECK( book(TH2D("Syst/syst_event", "Systematics list [MC+PRW];;Syst name;", 1,0,1, static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"EventWeight"))),0,static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"EventWeight"))))) ); // syst names
1432  ATH_CHECK( book(TH2D("Syst/syst_electrons", "Systematics list [Electron];Syst name;", 1,0,1, static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Electron"))), 0,static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Electron"))))) ); // syst names
1433  ATH_CHECK( book(TH2D("Syst/syst_muons", "Systematics list [Muon];Syst name;", 1,0,1, static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Muon"))), 0,static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Muon"))))) ); // syst names
1434  ATH_CHECK( book(TH2D("Syst/syst_photons", "Systematics list [Photon];Syst name;", 1,0,1, static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Photon"))), 0,static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Photon"))))) ); // syst names
1435  ATH_CHECK( book(TH2D("Syst/syst_taus", "Systematics list [Tau];Syst name;", 1,0,1, static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Tau"))), 0,static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Tau"))))) ); // syst names
1436  ATH_CHECK( book(TH2D("Syst/syst_jets", "Systematics list [Jet];Syst name;", 1,0,1, static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Jet"))), 0,static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"Jet"))))) ); // syst names
1437  ATH_CHECK( book(TH2D("Syst/syst_btags", "Systematics list [BTag];Syst name;", 1,0,1, static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"BTag"))), 0,static_cast<int>(std::ceil(1.2*getSize(m_syst_all,"BTag"))))) ); // syst names
1438 
1439  return StatusCode::SUCCESS;
1440 }

◆ buildBookingString()

void AthHistogramming::buildBookingString ( std::string &  bookingString,
std::string &  histName,
std::string &  tDir,
std::string &  stream,
bool  usePrefixPostfix = false 
)
privateinherited

Method to build individual booking string.

Definition at line 560 of file AthHistogramming.cxx.

565 {
566  // Massage the final string to book things
567  if(tDir.empty()) tDir = m_rootDir;
568  size_t pos = histName.rfind('/');
569  if(pos != std::string::npos){
570  tDir+='/';
571  tDir.append(histName, 0,pos);
572  histName.erase(0,pos+1);
573  };
574  if(stream.empty()) stream = m_streamName;
575 
576  if(usePrefixPostfix){
577  bookingString = "/"+stream+"/"+tDir+"/"+m_histNamePrefix+histName+m_histNamePostfix;
578  } else {
579  bookingString = "/"+stream+"/"+tDir+"/"+histName;
580  }
581  while(bookingString.find("//") != std::string::npos){
582  this->myReplace(bookingString,"//","/");
583  }
584 
585  return;
586 }

◆ configAthHistogramming()

StatusCode AthHistogramming::configAthHistogramming ( const ServiceHandle< ITHistSvc > &  histSvc,
const std::string &  prefix,
const std::string &  rootDir,
const std::string &  histNamePrefix,
const std::string &  histNamePostfix,
const std::string &  histTitlePrefix,
const std::string &  histTitlePostfix 
)
protectedinherited

To be called by the derived classes to fill the internal configuration.

Definition at line 66 of file AthHistogramming.cxx.

70 {
73  m_rootDir = rootDir;
74  m_histNamePrefix = histNamePrefix;
75  m_histNamePostfix = histNamePostfix;
76  m_histTitlePrefix = histTitlePrefix;
77  m_histTitlePostfix = histTitlePostfix;
78 
79  return StatusCode::SUCCESS;
80 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ efficiency()

TEfficiency * AthHistogramming::efficiency ( const std::string &  effName,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
protectedinherited

Simplify the retrieval of registered TEfficiency.

Definition at line 250 of file AthHistogramming.cxx.

251 {
252  // Build a 32 bit hash out of the name
253  const hash_t effHash = this->hash(effName);
254 
255  // See if this entry exists in the map
256  EffMap_t::const_iterator it = m_effMap.find( effHash );
257  if ( it == m_effMap.end() ) // It doesn't exist!
258  { // Let's see into the THistSvc if somebody else has registered the TEfficiency...
259 
260  // Need to copy the strings as we will massage them from here on
261  std::string effNameCopy = effName;
262  std::string tDirCopy = tDir;
263  std::string streamCopy = stream;
264 
265  // Massage the final string to book things
266  std::string bookingString("");
267  this->buildBookingString( bookingString, effNameCopy, tDirCopy, streamCopy ,false);
268 
269  TEfficiency* effPointer(NULL);
270  if ( !((histSvc()->getEfficiency(bookingString, effPointer)).isSuccess()) )
271  {
272  // Massage the final string to book things
273  std::string bookingString("");
274  this->buildBookingString( bookingString, effNameCopy, tDirCopy, streamCopy, true );
275 
276  if ( !((histSvc()->getEfficiency(bookingString, effPointer)).isSuccess()) )
277  {
278  m_msg << MSG::WARNING
279  << "Problem retrieving the TEfficiency with name (including pre- and post-fixes) "
280  << m_histNamePrefix + effNameCopy + m_histNamePostfix
281  << " or with name " << effNameCopy
282  << " in " << m_name << "... it doesn't exist, neither in the cached map nor in the THistSvc!"
283  << " Will return an NULL pointer... you have to handle it correctly!" << endmsg;
284  return NULL;
285  }
286  // If we get to here, we actually found the TEfficiency in the THistSvc.
287  // So let's add it to the local cache map and return its pointer
288  m_effMap.insert( m_effMap.end(), std::pair< const hash_t, TEfficiency* >( effHash, effPointer ) );
289  return effPointer;
290  }
291  // If we get to here, we actually found the TEfficiency in the THistSvc.
292  // So let's add it to the local cache map and return its pointer
293  m_effMap.insert( m_effMap.end(), std::pair< const hash_t, TEfficiency* >( effHash, effPointer ) );
294  return effPointer;
295  }
296 
297  // Return the pointer to the TEfficiency that we got from the local cache map
298  return it->second;
299 }

◆ endInputFile()

StatusCode EL::AnaAlgorithm::endInputFile ( )
protectedinherited

perform the action for the end of an input file

Ideally you don't use this, but instead rely on meta-data tools instead. However, there are enough people asking for it that I decided to implement it anyways.

\warn To use this you have to call requestEndInputFile to use this.

\warn If a file is split across multiple jobs this will be called more than once. This only happens for specific batch drivers and/or if it is explicitly configured by the user. With PROOF it could even happen multiple times within the same job, and while PROOF is no longer supported that behavior may come back if support for a similar framework is added in the future. As such, this method should not be used for accounting that relies to be called exactly once per file, take a look at fileExecute if you want something that is guaranteed to be executed exactly once per input file.

\warn The execution order of endInputFile and fileExecute is currently unspecified.

Definition at line 358 of file AnaAlgorithm.cxx.

360  {
361  return StatusCode::SUCCESS;
362  }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode SUSYToolsAlg::execute ( )

Definition at line 303 of file SUSYToolsAlg.cxx.

303  {
304  // manual event limit
305  if (m_maxEvts>=0 && m_Nevts>=(unsigned int)m_maxEvts) return StatusCode::SUCCESS;
306 
307  ATH_MSG_VERBOSE("Executing " << name() << "...");
308  m_clock0.Start(false);
309  if (m_Nevts == 0) m_clock1.Start(false);
310  else m_clock2.Start(false);
311 
312  if (m_SUSYTools->resetSystematics() != StatusCode::SUCCESS) {
313  ATH_MSG_ERROR( "Cannot reset SUSYTools systematics" );
314  }
315 
316  // METMaker crashes if there's no PV, check that before anything,
317  // and skip to the next event if there isn't one
318  if (m_SUSYTools->GetPrimVtx() == nullptr) {
319  ATH_MSG_WARNING("No PV found for this event! Skipping...");
320  return StatusCode::SUCCESS;
321  }
322 
323  // call PRW tool to apply all relevant decorations
325 
326  // get EventInfo
327  const xAOD::EventInfo* evtInfo(0);
328  ATH_CHECK( evtStore()->retrieve(evtInfo, "EventInfo") );
329  bool isData = m_SUSYTools->isData();
330 
331  // manual max events within lumiblock selection (on top of Nevts)
332  if (m_maxEvts>=-1 && (evtInfo->lumiBlock() != (unsigned int)m_lbfilter)) return StatusCode::SUCCESS;
333 
334  // get file/kernel info on first event
335  if ( m_Nevts==0 ) {
336  std::string stream;
337 #ifdef ROOTCORE
338  // Read the CutBookkeeper container on the first event
339  const xAOD::CutBookkeeperContainer* completeCBC = 0;
340  if (!evtStore()->event()->retrieveMetaInput(completeCBC, "CutBookkeepers").isSuccess()) {
341  ATH_MSG_ERROR("Failed to retrieve CutBookkeepers from MetaData! Exiting.");
342  }
343  std::string cbkname;
344  for ( const auto *cbk : *completeCBC ) {
345  cbkname = cbk->name();
346  stream = cbk->inputStream();
347  ATH_MSG_INFO("cbkname: " << cbkname << ", stream: " << stream);
348  if (cbkname.find("PHYSVAL")!=std::string::npos) m_kernel="PHYSVAL";
349  else if (cbkname.find("PHYSLITE")!=std::string::npos) m_kernel="PHYSLITE";
350  else if (cbkname.find("PHYS")!=std::string::npos) m_kernel="PHYS";
351  else if (stream.find("StreamDAOD")!=std::string::npos) m_kernel=stream.replace(stream.find("Stream"),6,"");
352  else m_kernel="other";
353  }
354 #else
355  // check the stream info
356  const EventStreamInfo* esi = 0;
357  CHECK( inputMetaStore()->retrieve(esi) );
358  for ( auto stream : esi->getProcessingTags() ) {
359  if (stream.find("PHYSVAL")!=std::string::npos) m_kernel="PHYSVAL";
360  else if (stream.find("PHYSLITE")!=std::string::npos) m_kernel="PHYSLITE";
361  else if (stream.find("PHYS")!=std::string::npos) m_kernel="PHYS";
362  else if (stream.find("StreamDAOD")!=std::string::npos) m_kernel=stream.replace(stream.find("Stream"),6,"");
363  else m_kernel="other";
364  }
365 #endif
366  ATH_MSG_INFO("Input file kernel type: " << m_kernel);
367  }
368 
369  int period = 100;
370  if (m_Nevts==0 || (m_Nevts % period == 99)) ATH_MSG_INFO("===>>> start processing event #" << evtInfo->eventNumber() << ", run #" << evtInfo->runNumber() << " | " << m_Nevts << " events processed so far <<<===");
371 
372  //==================================================
373  // General info
374  TH1* info_runNo = hist("EventInfo/info_runNo");
375  TH1* info_evtNo = hist("EventInfo/info_evtNo");
376  TH1* info_lumiBlock = hist("EventInfo/info_lumiBlock");
377  info_runNo->Fill(evtInfo->runNumber());
378  info_evtNo->Fill(evtInfo->eventNumber());
379  info_lumiBlock->Fill(evtInfo->lumiBlock());
380 
381  // First, create the nominal containers
382  // Only create them if slice active & configured
383  // Only create them freshly if affected by systematics
384 
385  xAOD::ElectronContainer* electrons_nominal(0);
386  xAOD::ShallowAuxContainer* electrons_nominal_aux(0);
387  if (m_slices["ele"]) {
388  ATH_CHECK( m_SUSYTools->GetElectrons(electrons_nominal, electrons_nominal_aux,true, m_isPHYSLITE?"AnalysisElectrons":"Electrons") );
389  ATH_MSG_DEBUG( "Number of electrons: " << electrons_nominal->size() );
390  }
391 
392  xAOD::PhotonContainer* photons_nominal(0);
393  xAOD::ShallowAuxContainer* photons_nominal_aux(0);
394  if (m_slices["pho"]) {
395  ATH_CHECK( m_SUSYTools->GetPhotons(photons_nominal, photons_nominal_aux, true, m_isPHYSLITE?"AnalysisPhotons":"Photons") );
396  ATH_MSG_DEBUG( "Number of photons: " << photons_nominal->size() );
397  }
398 
399  xAOD::MuonContainer* muons_nominal(0);
400  xAOD::ShallowAuxContainer* muons_nominal_aux(0);
401  if (m_slices["mu"]) {
402  ATH_CHECK( m_SUSYTools->GetMuons(muons_nominal, muons_nominal_aux, true, m_isPHYSLITE?"AnalysisMuons":"Muons") );
403  ATH_MSG_DEBUG( "Number of muons: " << muons_nominal->size() );
404  }
405 
406  xAOD::JetContainer* jets_nominal(0);
407  xAOD::ShallowAuxContainer* jets_nominal_aux(0);
408  if (m_slices["jet"]) {
409  ATH_CHECK( m_SUSYTools->GetJets(jets_nominal, jets_nominal_aux, true, m_isPHYSLITE?"AnalysisJets":"") );
410  ATH_MSG_DEBUG( "Number of jets: " << jets_nominal->size() );
411  }
412 
413  static std::atomic<bool> doFatJets = true; // only create if slice on && collection configured
414  if (m_FatJetCollection.empty()) doFatJets = false;
415  const xAOD::JetContainer* fatjets_test(0);
416  xAOD::JetContainer* fatjets_nominal(0);
417  xAOD::ShallowAuxContainer* fatjets_nominal_aux(0);
418  if( m_slices["fjet"] && doFatJets && evtStore()->contains<xAOD::JetContainer>( m_FatJetCollection ) ){
419  if( !evtStore()->retrieve( fatjets_test, m_FatJetCollection ).isSuccess() ){
420  ATH_MSG_ERROR("Failed to retrieve xAOD::JetContainer with name " << m_FatJetCollection );
421  return StatusCode::FAILURE;
422  } else {
423  ATH_CHECK( m_SUSYTools->GetFatJets(fatjets_nominal,fatjets_nominal_aux,true,m_FatJetCollection,true) );
424  ATH_MSG_DEBUG( "Number of Large Radius jets: " << fatjets_nominal->size() );
425  }
426  } else if( m_slices["jet"] && doFatJets) {
427  ATH_MSG_DEBUG("FatJets xAOD::JetContainer with name " << m_FatJetCollection <<" not found");
428  doFatJets=false;
429  }
430 
431  static std::atomic<bool> doTrkJets = true; // only create if slice on && collection configured
432  if (m_TrkJetCollection.empty()) doTrkJets = false;
433  const xAOD::JetContainer* trkjets_test(0);
434  xAOD::JetContainer* trkjets_nominal(0);
435  xAOD::ShallowAuxContainer* trkjets_nominal_aux(0);
436  if( m_slices["tjet"] && doTrkJets && evtStore()->contains<xAOD::JetContainer>( m_TrkJetCollection ) ){
437  if( !evtStore()->retrieve( trkjets_test, m_TrkJetCollection ).isSuccess() ){
438  ATH_MSG_ERROR("Failed to retrieve xAOD::JetContainer with name " << m_TrkJetCollection );
439  return StatusCode::FAILURE;
440  } else {
441  ATH_CHECK( m_SUSYTools->GetTrackJets(trkjets_nominal,trkjets_nominal_aux,true,m_TrkJetCollection) );
442  ATH_MSG_DEBUG( "Number of track jets: " << trkjets_nominal->size() );
443  }
444  } else if(m_slices["jet"] && doTrkJets) {
445  ATH_MSG_DEBUG("TrkJets xAOD::JetContainer with name " << m_TrkJetCollection <<" not found");
446  doTrkJets=false;
447  }
448 
450  //if( m_slices["tau"] && !isData) {
451  // const xAOD::TauJetContainer* p_TauJets = 0;
452  // ATH_CHECK( evtStore()->retrieve(p_TauJets, "TauJets") );
453  // //if( !evtStore()->contains<xAOD::TruthParticleContainer>("TruthTaus") && p_TauJets->size()==0 ){
454  // // // If there are no taus, then we need to force the building of the container
455  // // ATH_MSG_DEBUG("FIXME: TruthTaus hack for empty TauJets.");
456  // // xAOD::TruthParticleContainer* noTT = new xAOD::TruthParticleContainer;
457  // // xAOD::TruthParticleAuxContainer* noTTAux = new xAOD::TruthParticleAuxContainer;
458  // // noTT->setStore( noTTAux );
459  // // ATH_CHECK( evtStore()->record(noTT, "TruthTaus") );
460  // // ATH_CHECK( evtStore()->record(noTTAux, "TruthTausAux.") );
461  // // ATH_CHECK( m_tauTruthMatchingTool->retrieveTruthTaus() );
462  // //}
463  // for(const auto& tau : *p_TauJets) {
464  // const xAOD::TruthParticle* trueTau = 0;
465  // trueTau = m_tauTruthMatchingTool->getTruth(*tau);
466  // if( trueTau ){
467  // ATH_MSG_DEBUG("getTruth tau " <<tau->pt() <<" " <<tau->eta()
468  // <<" " <<tau->phi()
469  // <<" trueTau " <<trueTau->pt() <<" " <<trueTau->eta()
470  // <<" " <<trueTau->phi());
471  // } else {
472  // ATH_MSG_DEBUG("getTruth tau " <<tau->pt() <<" " <<tau->eta()
473  // <<" " <<tau->phi() << "trueTau not found");
474  // }
475  // }
476  //}
477 
478  const xAOD::TauJetContainer* taus_gettruth(0);
479  xAOD::TauJetContainer* taus_nominal(0);
480  xAOD::ShallowAuxContainer* taus_nominal_aux(0);
481  if (m_slices["tau"]) {
482  if (!isData && !m_isPHYSLITE) {
483  ATH_CHECK( evtStore()->retrieve(taus_gettruth,"TauJets") );
484  for(const auto& tau : *taus_gettruth) {
486  }
487  }
488  ATH_CHECK( m_SUSYTools->GetTaus(taus_nominal, taus_nominal_aux, true, m_isPHYSLITE?"AnalysisTauJets":"TauJets") );
489  ATH_MSG_DEBUG( "Number of taus: " << taus_nominal->size() );
490  }
491 
500 
501  double metsig_cst(0.);
502  double metsig_tst(0.);
503  if (m_slices["met"]) {
504  // (met, jets, electrons, muons, photons, taus, doTST, doJVT)
505  ATH_CHECK( m_SUSYTools->GetMET(*m_metcst_nominal, jets_nominal, electrons_nominal, muons_nominal, photons_nominal, 0, false, false) );
506  ATH_MSG_DEBUG("RefFinal CST etx=" << (*m_metcst_nominal)["Final"]->mpx()
507  << ", ety=" << (*m_metcst_nominal)["Final"]->mpy()
508  << ", et=" << (*m_metcst_nominal)["Final"]->met()
509  << ", sumet=" << (*m_metcst_nominal)["Final"]->sumet());
510  ATH_CHECK( m_SUSYTools->GetMETSig(*m_metcst_nominal, metsig_cst, false, false) );
511  ATH_MSG_DEBUG("METSignificance = " << metsig_cst);
512 
513  ATH_CHECK( m_SUSYTools->GetMET(*m_mettst_nominal, jets_nominal, electrons_nominal, muons_nominal, photons_nominal, 0, true, true) ); // bugfix for PHYSLITE with p5511
514  ATH_MSG_DEBUG("RefFinal TST etx=" << (*m_mettst_nominal)["Final"]->mpx()
515  << ", ety=" << (*m_mettst_nominal)["Final"]->mpy()
516  << ", et=" << (*m_mettst_nominal)["Final"]->met()
517  << ", sumet=" << (*m_mettst_nominal)["Final"]->sumet());
518  ATH_CHECK( m_SUSYTools->GetMETSig(*m_mettst_nominal, metsig_tst, true, true) );
519  ATH_MSG_DEBUG("METSignificance = " << metsig_tst);
520 
521  hist("MET/met_et") ->Fill( (*m_mettst_nominal)["Final"]->met()*0.001 );
522  hist("MET/met_sumet") ->Fill( (*m_mettst_nominal)["Final"]->sumet()*0.001 );
523  hist("MET/met_phi") ->Fill( (*m_mettst_nominal)["Final"]->phi() );
524  hist("MET/met_et_tst")->Fill( (*m_mettst_nominal)["PVSoftTrk"]->met() *0.001 );
525  hist("MET/met_et_el") ->Fill( (*m_mettst_nominal)["RefEle"]->met() *0.001 );
526  hist("MET/met_et_ph") ->Fill( (*m_mettst_nominal)["RefGamma"]->met() *0.001 );
527  hist("MET/met_et_mu") ->Fill( (*m_mettst_nominal)["Muons"]->met() *0.001 );
528  hist("MET/met_et_jet")->Fill( (*m_mettst_nominal)["RefJet"]->met() *0.001 );
529  //hist("MET/met_et_tau")->Fill( (*m_mettst_nominal)["RefTau"]->met() *0.001 );
530 
531  hist("MET/met_significance")->Fill( metsig_tst );
532  }
533 
534  //--- Overlap Removal
535  ATH_CHECK( m_SUSYTools->OverlapRemoval(electrons_nominal, muons_nominal, jets_nominal, photons_nominal, taus_nominal) );
536 
537  //--- Trigger
538  bool isRun3Trig = false;
539  if (m_mcCampaign.find("mc21") != std::string::npos || m_mcCampaign.find("mc23") != std::string::npos) isRun3Trig = true;
540 
541  //--- Monitoring
542  for (const auto& obj : m_objects) { for (const auto& lev : m_levels) { m_obj_count[obj][lev] = 0; } }
543 
544  //----- Electrons
545 
546  TH1* el_n_flow_nominal = hist("Cutflow/el_n_flow_nominal");
547  TH1* el_trigmatch_eff_nominal = hist("Trigger/el_trigmatch_eff_nominal");
548 
549  if (m_slices["ele"]) {
550  ATH_MSG_DEBUG("Processing electrons");
551  m_obj_count["el"]["nom"] = electrons_nominal->size();
552  for(auto el : *electrons_nominal) {
553  el_n_flow_nominal->Fill(Cut::all);
554  if ( ST::acc_baseline(*el) == 1 ){
555  el_n_flow_nominal->Fill(Cut::baseline);
556  stdHistsForObj(el,"el","bsl");
557  m_obj_count["el"]["bsl"] += 1;
558 
559  if ( ST::acc_passOR(*el) == 1 ){
560  el_n_flow_nominal->Fill(Cut::passOR);
561  if ( ST::acc_signal(*el) == 1 ){
562  el_n_flow_nominal->Fill(Cut::signal);
563  stdHistsForObj(el,"el","sig");
564  m_obj_count["el"]["sig"] += 1;
565 
566  bool passTM=false;
567  unsigned int idx=1;
568  for(const auto& t : m_triggers["el"]){
569  ATH_MSG_DEBUG( " Processing trigger " << t );
570  bool passit = ((isRun3Trig||t.find("_L1")==std::string::npos) ? m_SUSYTools->IsTrigMatched(el, t) : false);
571  passTM |= passit;
572  if(passit) el_trigmatch_eff_nominal->SetBinContent(idx, el_trigmatch_eff_nominal->GetBinContent(idx)+1);
573  #ifdef XAOD_STANDALONE
574  m_heffs["Trigger/el_pt_"+t]->Fill(passit,el->pt()/1000.);
575  m_heffs["Trigger/el_eta_"+t]->Fill(passit,el->eta());
576  m_heffs["Trigger/el_phi_"+t]->Fill(passit,el->phi());
577  #endif
578  idx++;
579  }
580  if(passTM) el_n_flow_nominal->Fill(Cut::trigmatch);
581  }
582  }
583  }
584  stdHistsForObj(el,"el","nom");
585  }
586  hist("Electron/el_nom_N")->Fill(m_obj_count["el"]["nom"]);
587  hist("Electron/el_bsl_N")->Fill(m_obj_count["el"]["bsl"]);
588  hist("Electron/el_sig_N")->Fill(m_obj_count["el"]["sig"]);
589  }
590 
591  //----- Photons
592 
593  TH1* ph_n_flow_nominal = hist("Cutflow/ph_n_flow_nominal");
594  TH1* ph_trigmatch_eff_nominal = hist("Trigger/ph_trigmatch_eff_nominal");
595 
596  if (m_slices["pho"]) {
597  ATH_MSG_DEBUG("Processing photons");
598  m_obj_count["ph"]["nom"] = photons_nominal->size();
599  for(auto ph : *photons_nominal) {
600  ph_n_flow_nominal->Fill(Cut::all);
601  if ( ST::acc_baseline(*ph) == 1 ){
602  ph_n_flow_nominal->Fill(Cut::baseline);
603  stdHistsForObj(ph,"ph","bsl");
604  m_obj_count["ph"]["bsl"] += 1;
605  if ( ST::acc_passOR(*ph) == 1 ){
606  ph_n_flow_nominal->Fill(Cut::passOR);
607  if ( ST::acc_signal(*ph) == 1 ){
608  ph_n_flow_nominal->Fill(Cut::signal);
609  stdHistsForObj(ph,"ph","sig");
610  m_obj_count["ph"]["sig"] += 1;
611 
612  bool passTM=false;
613  unsigned int idx=1;
614  for(const auto& t : m_triggers["ph"]){
615  bool passit = ((isRun3Trig||t.find("_L1")==std::string::npos) ? m_SUSYTools->IsTrigMatched(ph, t) : false);
616  passTM |= passit;
617  if(passit) ph_trigmatch_eff_nominal->SetBinContent(idx, ph_trigmatch_eff_nominal->GetBinContent(idx)+1);
618  #ifdef XAOD_STANDALONE
619  m_heffs["Trigger/ph_pt_"+t]->Fill(passit,ph->pt()/1000.);
620  m_heffs["Trigger/ph_eta_"+t]->Fill(passit,ph->eta());
621  m_heffs["Trigger/ph_phi_"+t]->Fill(passit,ph->phi());
622  #endif
623  idx++;
624  }
625  if (passTM) ph_n_flow_nominal->Fill(Cut::trigmatch);
626  }
627  }
628  }
629  stdHistsForObj(ph,"ph","nom");
630  }
631  hist("Photon/ph_nom_N")->Fill(m_obj_count["ph"]["nom"]);
632  hist("Photon/ph_bsl_N")->Fill(m_obj_count["ph"]["bsl"]);
633  hist("Photon/ph_sig_N")->Fill(m_obj_count["ph"]["sig"]);
634  }
635 
636  //----- Muons
637 
638  TH1* mu_n_flow_nominal = hist("Cutflow/mu_n_flow_nominal");
639  TH1* mu_trigmatch_eff_nominal = hist("Trigger/mu_trigmatch_eff_nominal");
640 
641  if (m_slices["mu"]) {
642  ATH_MSG_DEBUG("Processing muons");
643  m_obj_count["mu"]["nom"] = muons_nominal->size();
644  for(auto mu : *muons_nominal) {
645  mu_n_flow_nominal->Fill(Cut::all);
646  if ( ST::acc_baseline(*mu) == 1 ){
647  mu_n_flow_nominal->Fill(Cut::baseline);
648  stdHistsForObj(mu,"mu","bsl");
649  m_obj_count["mu"]["bsl"] += 1;
650  if ( ST::acc_passOR(*mu) == 1 ){
651  mu_n_flow_nominal->Fill(Cut::passOR);
652  if ( ST::acc_signal(*mu) == 1 ){
653  mu_n_flow_nominal->Fill(Cut::signal);
654  stdHistsForObj(mu,"mu","sig");
655  m_obj_count["mu"]["sig"] += 1;
656 
657  bool passTM=false;
658  unsigned int idx=1;
659  for(const auto& t : m_triggers["mu"]){
660  bool passit = ((isRun3Trig||t.find("_L1")==std::string::npos) ? m_SUSYTools->IsTrigMatched(mu, t) : false);
661  passTM |= passit;
662  if(passit) mu_trigmatch_eff_nominal->SetBinContent(idx, mu_trigmatch_eff_nominal->GetBinContent(idx)+1);
663  #ifdef XAOD_STANDALONE
664  m_heffs["Trigger/mu_pt_"+t]->Fill(passit,mu->pt()/1000.);
665  m_heffs["Trigger/mu_eta_"+t]->Fill(passit,mu->eta());
666  m_heffs["Trigger/mu_phi_"+t]->Fill(passit,mu->phi());
667  #endif
668  idx++;
669  }
670  if(passTM) mu_n_flow_nominal->Fill(Cut::trigmatch);
671  }
672  }
673  }
674  stdHistsForObj(mu,"mu","nom");
675  }
676  hist("Muon/mu_nom_N")->Fill(m_obj_count["mu"]["nom"]);
677  hist("Muon/mu_bsl_N")->Fill(m_obj_count["mu"]["bsl"]);
678  hist("Muon/mu_sig_N")->Fill(m_obj_count["mu"]["sig"]);
679  }
680 
681  //----- Jets
682 
683  TH1* jet_n_flow_nominal = hist("Cutflow/jet_n_flow_nominal");
684  TH1* bjet_n_flow_nominal = hist("Cutflow/bjet_n_flow_nominal");
685  bool bjet = false;
686 
687  if (m_slices["jet"]) {
688  m_obj_count["jet"]["nom"] = jets_nominal->size();
689  for(auto jet : *jets_nominal) {
690  ATH_MSG_DEBUG("Processing jets");
691  jet_n_flow_nominal->Fill(Cut::all);
692  bjet = false;
693  if ( ST::acc_bjet(*jet) == 1 ) bjet = true;
694  if (bjet) bjet_n_flow_nominal->Fill(Cut::all);
695  //
696  if ( ST::acc_baseline(*jet) == 1 ){
697  jet_n_flow_nominal->Fill(Cut::baseline);
698  if (bjet) {
699  bjet_n_flow_nominal->Fill(Cut::baseline);
700  stdHistsForObj(jet,"bjet","bsl");
701  m_obj_count["bjet"]["bsl"] += 1;
702  }
703  stdHistsForObj(jet,"jet","bsl");
704  m_obj_count["jet"]["bsl"] += 1;
705 
706  if ( ST::acc_passOR(*jet) == 1 ){
707  jet_n_flow_nominal->Fill(Cut::passOR);
708  if (bjet) bjet_n_flow_nominal->Fill(Cut::passOR);
709  if ( ST::acc_signal(*jet) == 1 ){
710  jet_n_flow_nominal->Fill(Cut::signal);
711  jet_n_flow_nominal->Fill(Cut::trigmatch); //no trig matching for jets
712  if (bjet) {
713  bjet_n_flow_nominal->Fill(Cut::signal);
714  bjet_n_flow_nominal->Fill(Cut::trigmatch); //no trig matching for (b)jets
715  stdHistsForObj(jet,"bjet","sig");
716  m_obj_count["bjet"]["sig"] += 1;
717  }
718  stdHistsForObj(jet,"jet","sig");
719  m_obj_count["jet"]["sig"] += 1;
720  }
721  }
722  }
723  if (bjet) {
724  stdHistsForObj(jet,"bjet","nom");
725  }
726  stdHistsForObj(jet,"jet","nom");
727  }
728  hist("Jet/jet_nom_N")->Fill(m_obj_count["jet"]["nom"]);
729  hist("Jet/jet_bsl_N")->Fill(m_obj_count["jet"]["bsl"]);
730  hist("Jet/jet_sig_N")->Fill(m_obj_count["jet"]["sig"]);
731  }
732 
733  //----- Large R. Jets
734 
735  TH1* fatjet_n_flow_nominal = hist("Cutflow/fatjet_n_flow_nominal");
736 
737  if( m_slices["fjet"] && doFatJets ) {
738  ATH_MSG_DEBUG("Processing fatjets");
739  if (m_configDict.find("Jet.WtaggerConfig")!=m_configDict.end() && m_configDict.find("WtaggerKey")==m_configDict.end() && fatjets_nominal->size()>0) {
741  std::string taggerKey;
742  taggerKey = findInReg(reg, (*fatjets_nominal)[0], "(SmoothW.*?)_.*");
743  if (!taggerKey.empty()) { m_configDict["WtaggerKey"] = taggerKey; }
744  }
745  if (m_configDict.find("Jet.ZtaggerConfig")!=m_configDict.end() && m_configDict.find("ZtaggerKey")==m_configDict.end() && fatjets_nominal->size()>0) {
747  std::string taggerKey;
748  taggerKey = findInReg(reg, (*fatjets_nominal)[0], "(SmoothZ.*?)_.*");
749  if (!taggerKey.empty()) { m_configDict["ZtaggerKey"] = taggerKey; }
750  }
751  if (m_configDict.find("Jet.ToptaggerConfig")!=m_configDict.end() && m_configDict.find("ToptaggerKey")==m_configDict.end() && fatjets_nominal->size()>0) {
753  std::string taggerKey;
754  taggerKey = findInReg(reg, (*fatjets_nominal)[0], "(.*Tag.*Top.*?)_.*");
755  if (!taggerKey.empty()) { m_configDict["ToptaggerKey"] = taggerKey; }
756  }
757  ATH_MSG_DEBUG("Tagger configuration retrieved.");
758  ATH_MSG_DEBUG("WTagger: " << m_configDict["WtaggerKey"]);
759  ATH_MSG_DEBUG("ZTagger: " << m_configDict["ZtaggerKey"]);
760  ATH_MSG_DEBUG("TopTagger: " << m_configDict["ToptaggerKey"]);
761 
762  m_obj_count["fatjet"]["nom"] = fatjets_nominal->size();
763  for(auto fatjet : *fatjets_nominal) {
764  fatjet_n_flow_nominal->Fill(Cut::all);
765  if ( ST::acc_baseline(*fatjet) == 1 ){
766  fatjet_n_flow_nominal->Fill(Cut::baseline);
767  stdHistsForObj(fatjet,"fatjet","bsl",m_configDict);
768  m_obj_count["fatjet"]["bsl"] += 1;
769  if ( ST::acc_passOR(*fatjet) == 1 ){
770  fatjet_n_flow_nominal->Fill(Cut::passOR);
771  if ( ST::acc_signal(*fatjet) == 1 ){
772  fatjet_n_flow_nominal->Fill(Cut::signal);
773  fatjet_n_flow_nominal->Fill(Cut::trigmatch); //no trig matching for jets
774  stdHistsForObj(fatjet,"fatjet","sig",m_configDict);
775  m_obj_count["fatjet"]["sig"] += 1;
776  }
777  }
778  }
779  stdHistsForObj(fatjet,"fatjet","nom",m_configDict);
780  }
781  hist("LargeRJet/fatjet_nom_N")->Fill(m_obj_count["fatjet"]["nom"]);
782  hist("LargeRJet/fatjet_bsl_N")->Fill(m_obj_count["fatjet"]["bsl"]);
783  hist("LargeRJet/fatjet_sig_N")->Fill(m_obj_count["fatjet"]["sig"]);
784  }
785 
786  //----- Track Jets
787 
788  TH1* trkjet_n_flow_nominal = hist("Cutflow/trkjet_n_flow_nominal");
789 
790  if( m_slices["tjet"] && doTrkJets ) {
791  m_obj_count["trkjet"]["nom"] = trkjets_nominal->size();
792  for(auto trkjet : *trkjets_nominal) {
793  trkjet_n_flow_nominal->Fill(Cut::all);
794  if ( ST::acc_baseline(*trkjet) == 1 ){
795  trkjet_n_flow_nominal->Fill(Cut::baseline);
796  stdHistsForObj(trkjet,"trkjet","bsl");
797  m_obj_count["trkjet"]["bsl"] += 1;
798  if ( ST::acc_passOR(*trkjet) == 1 ){
799  trkjet_n_flow_nominal->Fill(Cut::passOR);
800  if ( ST::acc_signal(*trkjet) == 1 ){
801  trkjet_n_flow_nominal->Fill(Cut::signal);
802  trkjet_n_flow_nominal->Fill(Cut::trigmatch); //no trig matching for jets
803  stdHistsForObj(trkjet,"trkjet","sig");
804  m_obj_count["trkjet"]["sig"] += 1;
805  }
806  }
807  }
808  stdHistsForObj(trkjet,"trkjet","nom");
809  }
810  hist("TrackJet/trkjet_nom_N")->Fill(m_obj_count["trkjet"]["nom"]);
811  hist("TrackJet/trkjet_bsl_N")->Fill(m_obj_count["trkjet"]["bsl"]);
812  hist("TrackJet/trkjet_sig_N")->Fill(m_obj_count["trkjet"]["sig"]);
813  }
814 
815  //----- Taus
816 
817  TH1* tau_n_flow_nominal = hist("Cutflow/tau_n_flow_nominal");
818 
819  if (m_slices["tau"]) {
820  m_obj_count["tau"]["nom"] = taus_nominal->size();
821  for(auto tau : *taus_nominal) {
822  tau_n_flow_nominal->Fill(Cut::all);
823  if ( ST::acc_baseline(*tau) == 1 ){
824  tau_n_flow_nominal->Fill(Cut::baseline);
825  stdHistsForObj(tau,"tau","bsl");
826  m_obj_count["tau"]["bsl"] += 1;
827  if ( ST::acc_passOR(*tau) == 1 ){
828  tau_n_flow_nominal->Fill(Cut::passOR);
829 
830  if ( ST::acc_signal(*tau) == 1 ){
831  tau_n_flow_nominal->Fill(Cut::signal);
832  tau_n_flow_nominal->Fill(Cut::trigmatch); //no trig matching for taus
833  stdHistsForObj(tau,"tau","sig");
834  m_obj_count["tau"]["sig"] += 1;
835  }
836  }
837  }
838  stdHistsForObj(tau,"tau","nom");
839  }
840  hist("Tau/tau_nom_N")->Fill(m_obj_count["tau"]["nom"]);
841  hist("Tau/tau_bsl_N")->Fill(m_obj_count["tau"]["bsl"]);
842  hist("Tau/tau_sig_N")->Fill(m_obj_count["tau"]["sig"]);
843  }
844 
845  // Set up the event weights
846  // Base should include all weights that do not depend on individual objects
847  double base_event_weight(1.);
848  if (!isData) {
849  base_event_weight *= evtInfo->mcEventWeight();
850 
851  if (m_slices["met"]) {
852  const xAOD::MissingETContainer* met_truth(0);
853  ATH_CHECK( evtStore()->retrieve(met_truth, "MET_Truth") );
854 
855  ATH_MSG_DEBUG("Truth MET etx=" << (*met_truth)["NonInt"]->mpx()
856  << ", ety=" << (*met_truth)["NonInt"]->mpy()
857  << ", et=" << (*met_truth)["NonInt"]->met()
858  << ", sumet=" << (*met_truth)["NonInt"]->sumet());
859  ATH_MSG_DEBUG("CST residuals: detx=" << (*m_metcst_nominal)["Final"]->mpx() - (*met_truth)["NonInt"]->mpx()
860  << ", dety=" << (*m_metcst_nominal)["Final"]->mpy() - (*met_truth)["NonInt"]->mpy());
861  ATH_MSG_DEBUG("TST residuals: detx=" << (*m_mettst_nominal)["Final"]->mpx() - (*met_truth)["NonInt"]->mpx()
862  << ", dety=" << (*m_mettst_nominal)["Final"]->mpy() - (*met_truth)["NonInt"]->mpy());
863  }
864  }
865 
866 
867  // Additionally define a nominal weight for each object type
868  double electrons_weight_nominal(1.);
869  double photons_weight_nominal(1.);
870  double muons_weight_nominal(1.);
871  double jets_weight_nominal(1.);
872  //double fatjets_weight_nominal(1.);
873  //double trkjets_weight_nominal(1.);
874  double btag_weight_nominal(1.);
875  double taus_weight_nominal(1.);
876  double event_weight_nominal(1.);
877  double prw_weight_nominal(1.);
878 
879  //--- Weights
880  TH1* weight_event = hist("Syst/weight_event");
881  TH1* weight_electrons = hist("Syst/weight_electrons");
882  TH1* weight_muons = hist("Syst/weight_muons");
883  TH1* weight_photons = hist("Syst/weight_photons");
884  TH1* weight_taus = hist("Syst/weight_taus");
885  TH1* weight_jets = hist("Syst/weight_jets");
886  TH1* weight_btags = hist("Syst/weight_btags");
887 
888  bool isNominal(true);
889  for (const auto& sysInfo : m_sysInfoList) {
890  CP::SystematicSet sys = sysInfo.systset;
891  if (m_SUSYTools->applySystematicVariation(sys) != StatusCode::SUCCESS) {
892  ATH_MSG_ERROR( "Cannot configure SUSYTools for systematic var. %s" << sys.name() );
893  } else {
894  ATH_MSG_VERBOSE( "Variation \"" << sys.name() << "\" configured..." );
895  }
896  if (isNominal && (sysInfo.affectsKinematics || sysInfo.affectsWeights)) {
897  ATH_MSG_ERROR("Expected nominal variation!");
898  return StatusCode::FAILURE;
899  }
900  if (sysInfo.affectsKinematics || sysInfo.affectsWeights) isNominal = false;
901 
902  double event_weight = base_event_weight;
903  bool syst_affectsEventWeight = (sysInfo.affectsType == ST::SystObjType::EventWeight);
904 
905  // If nominal, compute the nominal weight, otherwise recompute the weight
906 
907  double prw_weight=1.;
908  if(isNominal){
909  if(!isData) prw_weight_nominal = m_SUSYTools->GetPileupWeight();
910  event_weight *= prw_weight_nominal;
911  weight_event->SetBinContent(1, weight_event->GetBinContent(1)+event_weight);
912  }
913  else if (!syst_affectsEventWeight) {
914  event_weight *= prw_weight_nominal;
915  }
916  else {
917  if(!isData){
919  prw_weight = m_SUSYTools->GetPileupWeight();
920  }
921  event_weight *= prw_weight;
922  size_t iwbin = find(m_syst_weights["EventWeight"].begin(), m_syst_weights["EventWeight"].end(), sys.name()) - m_syst_weights["EventWeight"].begin();
923  if(iwbin < m_syst_weights["EventWeight"].size()) { weight_event->SetBinContent(iwbin+1, weight_event->GetBinContent(iwbin+1)+event_weight); }
924  }
925 
926 
927  // Define the generic collection pointers
928  xAOD::ElectronContainer* electrons(electrons_nominal);
929  xAOD::PhotonContainer* photons(photons_nominal);
930  xAOD::MuonContainer* muons(muons_nominal);
931  xAOD::JetContainer* jets(jets_nominal);
932  xAOD::JetContainer* fatjets(fatjets_nominal);
933  xAOD::JetContainer* trkjets(trkjets_nominal);
934  xAOD::TauJetContainer* taus(taus_nominal);
937 
938  bool syst_affectsElectrons = ST::testAffectsObject(xAOD::Type::Electron, sysInfo.affectsType);
939  bool syst_affectsMuons = ST::testAffectsObject(xAOD::Type::Muon, sysInfo.affectsType);
940  bool syst_affectsPhotons = ST::testAffectsObject(xAOD::Type::Photon, sysInfo.affectsType);
941  bool syst_affectsTaus = ST::testAffectsObject(xAOD::Type::Tau, sysInfo.affectsType);
942  bool syst_affectsJets = ST::testAffectsObject(xAOD::Type::Jet, sysInfo.affectsType);
943  bool syst_affectsBTag = ST::testAffectsObject(xAOD::Type::BTag, sysInfo.affectsType);
944  bool syst_affectsLRT = ST::testAffectsObject(sysInfo.affectsType) == "LRT_Objects";
945 
946  // Apply LRT uncertainty.
947  // Needs to be before retrieving leptons as they could be removed if the track is vetoed
948  if (syst_affectsLRT)
949  {
951  }
952 
953  // If necessary (kinematics affected), make a shallow copy with the variation applied
954  // otherwise set the collection pointers to the nominal
955  if (sysInfo.affectsKinematics) {
956  if (m_slices["el"] && syst_affectsElectrons) {
957  ATH_MSG_DEBUG("Get systematics-varied electrons");
958  xAOD::ElectronContainer* electrons_syst(0);
959  xAOD::ShallowAuxContainer* electrons_syst_aux(0);
960  ATH_CHECK( m_SUSYTools->GetElectrons(electrons_syst, electrons_syst_aux, true , m_isPHYSLITE?"AnalysisElectrons":"Electrons") );
961  electrons = electrons_syst;
962  }
963 
964  if (m_slices["pho"] && syst_affectsPhotons) {
965  ATH_MSG_DEBUG("Get systematics-varied photons");
966  xAOD::PhotonContainer* photons_syst(0);
967  xAOD::ShallowAuxContainer* photons_syst_aux(0);
968  ATH_CHECK( m_SUSYTools->GetPhotons(photons_syst, photons_syst_aux, true, m_isPHYSLITE?"AnalysisPhotons":"Photons") );
969  photons = photons_syst;
970  }
971 
972  if (m_slices["mu"] && syst_affectsMuons) {
973  ATH_MSG_DEBUG("Get systematics-varied muons");
974  xAOD::MuonContainer* muons_syst(0);
975  xAOD::ShallowAuxContainer* muons_syst_aux(0);
976  ATH_CHECK( m_SUSYTools->GetMuons(muons_syst, muons_syst_aux, true, m_isPHYSLITE?"AnalysisMuons":"Muons") );
977  muons = muons_syst;
978  }
979 
980  if (syst_affectsJets) {
981  if (m_slices["jet"]) {
982  ATH_MSG_DEBUG("Get systematics-varied jets");
983  xAOD::JetContainer* jets_syst(0);
984  xAOD::ShallowAuxContainer* jets_syst_aux(0);
985  ATH_CHECK( m_SUSYTools->GetJetsSyst(*jets_nominal, jets_syst, jets_syst_aux, true, m_isPHYSLITE?"AnalysisJets":"") );
986  jets = jets_syst;
987  }
988  if (m_slices["fatjet"]) {
989  ATH_MSG_DEBUG("Get systematics-varied fatjets");
990  xAOD::JetContainer* fatjets_syst(0);
991  xAOD::ShallowAuxContainer* fatjets_syst_aux(0);
992  ATH_CHECK( m_SUSYTools->GetJetsSyst(*fatjets_nominal, fatjets_syst, fatjets_syst_aux) );
993  fatjets = fatjets_syst;
994  }
995  if (m_slices["trkjet"]) {
996  ATH_MSG_DEBUG("Get systematics-varied trkjets");
997  xAOD::JetContainer* trkjets_syst(0);
998  xAOD::ShallowAuxContainer* trkjets_syst_aux(0);
999  ATH_CHECK( m_SUSYTools->GetJetsSyst(*trkjets_nominal, trkjets_syst, trkjets_syst_aux) );
1000  trkjets = trkjets_syst;
1001  }
1002  }
1003 
1004  if (m_slices["tau"] && syst_affectsTaus) {
1005  ATH_MSG_DEBUG("Get systematics-varied taus");
1006  xAOD::TauJetContainer* taus_syst(0);
1007  xAOD::ShallowAuxContainer* taus_syst_aux(0);
1008  ATH_CHECK( m_SUSYTools->GetTaus(taus_syst, taus_syst_aux,true, m_isPHYSLITE?"AnalysisTauJets":"TauJets") );
1009  taus = taus_syst;
1010  }
1011 
1012  ATH_MSG_DEBUG("Get systematics-varied MET");
1017  m_mettst_syst->setStore(m_mettst_syst_aux);
1018  m_metcst_syst->setStore(m_metcst_syst_aux);
1019  m_mettst_syst->reserve(10);
1020  m_metcst_syst->reserve(10);
1021  //
1022  if (m_slices["met"]) {
1023  ATH_CHECK( m_SUSYTools->GetMET(*m_metcst_syst, jets, electrons, muons, photons, 0) );
1024  ATH_CHECK( m_SUSYTools->GetMET(*m_mettst_syst, jets, electrons, muons, photons, 0, true, true) );
1025  }
1026  //
1027  mettst = m_mettst_syst;
1028  mettst_aux = m_mettst_syst_aux;
1029  metcst = m_metcst_syst;
1030  metcst_aux = m_metcst_syst_aux;
1031  }
1032 
1033  //--- Overlap Removal
1034  ATH_CHECK( m_SUSYTools->OverlapRemoval(electrons, muons, jets, photons, taus) );
1035 
1036  //--- Electrons
1037  if (m_slices["ele"]) {
1038  ATH_MSG_DEBUG("Working on electrons");
1039  float electrons_weight(1.);
1040  for ( const auto& el : *electrons ) {
1041  if( !isData ){
1042  if (isNominal || syst_affectsElectrons) {
1043  if ((ST::acc_signal(*el) == 1) && (isNominal || sysInfo.affectsWeights)) {
1044  //electrons_weight *= m_SUSYTools->GetSignalElecSF( *el ); // (*el, true, true, false, true) to switch off trigger SF
1045  electrons_weight *= m_SUSYTools->GetSignalElecSF(*el, true, true, false, true);
1046  }
1047  }
1048  }
1049  ATH_MSG_VERBOSE( " Electron passing baseline selection? " << static_cast<int>( ST::acc_baseline(*el)));
1050  ATH_MSG_VERBOSE( " Electron passing signal selection? " << static_cast<int>( ST::acc_signal(*el)));
1051  if (ST::acc_signal(*el) == 1)
1052  ATH_MSG_VERBOSE( " Electron weight " << ST::acc_effscalefact(*el) );
1053 
1054  }
1055  if (isNominal) {
1056  electrons_weight_nominal = electrons_weight;
1057  weight_electrons->SetBinContent(1, weight_electrons->GetBinContent(1)+electrons_weight);
1058  }
1059  else if (!syst_affectsElectrons) {
1060  electrons_weight = electrons_weight_nominal;
1061  }
1062  else if ( sysInfo.affectsWeights ){
1063  size_t iwbin = find(m_syst_weights["Electron"].begin(), m_syst_weights["Electron"].end(), sys.name()) - m_syst_weights["Electron"].begin();
1064  if(iwbin < m_syst_weights["Electron"].size()) { weight_electrons->SetBinContent(iwbin+1, weight_electrons->GetBinContent(iwbin+1)+electrons_weight); }
1065  }
1066 
1067  event_weight *= electrons_weight;
1068  ATH_MSG_DEBUG("Combined electron scale factor: " << electrons_weight);
1069  }
1070 
1071  //--- Photons
1072  if (m_slices["pho"]) {
1073  ATH_MSG_DEBUG("Working on photons");
1074  float photons_weight(1.);
1075  for ( const auto& ph : *photons ) {
1076  if( !isData ){
1077  if (isNominal || syst_affectsPhotons) {
1078  if ((ST::acc_signal(*ph) == 1) && (isNominal || sysInfo.affectsWeights)) {
1079  photons_weight *= m_SUSYTools->GetSignalPhotonSF( *ph );
1080  }
1081  }
1082  }
1083  ATH_MSG_VERBOSE( " Photon passing baseline selection? " << static_cast<int>(ST::acc_baseline(*ph)));
1084  ATH_MSG_VERBOSE( " Photon passing signal selection? " << static_cast<int>(ST::acc_signal(*ph)));
1085  if (ST::acc_signal(*ph) == 1)
1086  ATH_MSG_VERBOSE( " Photon weight " << ST::acc_effscalefact(*ph) );
1087  }
1088  if (isNominal) {
1089  photons_weight_nominal = photons_weight;
1090  weight_photons->SetBinContent(1, weight_photons->GetBinContent(1)+photons_weight);
1091  }
1092  else if (!syst_affectsPhotons) {
1093  photons_weight = photons_weight_nominal;
1094  }
1095  else if ( sysInfo.affectsWeights ){
1096  size_t iwbin = find(m_syst_weights["Photon"].begin(), m_syst_weights["Photon"].end(), sys.name()) - m_syst_weights["Photon"].begin();
1097  if(iwbin < m_syst_weights["Photon"].size()) { weight_photons->SetBinContent(iwbin+1, weight_photons->GetBinContent(iwbin+1)+photons_weight); }
1098  }
1099 
1100  event_weight *= photons_weight;
1101  ATH_MSG_DEBUG("Combined photon scale factor: " << photons_weight);
1102  }
1103 
1104  //--- Muons
1105  if (m_slices["mu"]) {
1106  ATH_MSG_DEBUG("Working on muons");
1107  float muons_weight(1.);
1108  for ( const auto& mu : *muons ) {
1109  if( !isData ){
1110  if (isNominal || syst_affectsMuons) {
1111  if ((ST::acc_signal(*mu) == 1) && (isNominal || sysInfo.affectsWeights)) {
1112  muons_weight *= m_SUSYTools->GetSignalMuonSF(*mu);;
1113  }
1114  }
1115  }
1116  ATH_MSG_VERBOSE( " Muon passing baseline selection? " << static_cast<int>(ST::acc_baseline(*mu)));
1117  ATH_MSG_VERBOSE( " Muon passing signal selection? " << static_cast<int>(ST::acc_signal(*mu)));
1118  ATH_MSG_VERBOSE( " Muon is a cosmic ray? " << static_cast<int>(ST::acc_cosmic(*mu)));
1119  if (ST::acc_signal(*mu) == 1)
1120  ATH_MSG_VERBOSE( " Muon weight " << ST::acc_effscalefact(*mu) );
1121  }
1122  if (isNominal) {
1123  muons_weight_nominal = muons_weight;
1124  weight_muons->SetBinContent(1, weight_muons->GetBinContent(1)+muons_weight);
1125  }
1126  else if (!syst_affectsMuons) {
1127  muons_weight = muons_weight_nominal;
1128  }
1129  else if ( sysInfo.affectsWeights ){
1130  size_t iwbin = find(m_syst_weights["Muon"].begin(), m_syst_weights["Muon"].end(), sys.name()) - m_syst_weights["Muon"].begin();
1131  if(iwbin < m_syst_weights["Muon"].size()) { weight_muons->SetBinContent(iwbin+1, weight_muons->GetBinContent(iwbin+1)+muons_weight); }
1132  }
1133 
1134  event_weight *= muons_weight;
1135  ATH_MSG_DEBUG("Combined muon scale factor: " << muons_weight);
1136  }
1137 
1138  //--- Jets
1139  if (m_slices["jet"]) {
1140  ATH_MSG_DEBUG("Working on jets");
1141  for ( const auto& jet : *jets ) {
1142  ATH_MSG_VERBOSE( " Jet is bad? " << static_cast<int>(ST::acc_bad(*jet)));
1143  ATH_MSG_VERBOSE( " Jet is baseline ? " << static_cast<int>(ST::acc_baseline(*jet)));
1144  ATH_MSG_VERBOSE( " Jet passes OR ? " << static_cast<int>(ST::acc_passOR(*jet)));
1145  if (ST::acc_passOR(*jet)) {
1146  if (m_slices["bjet"] && (isNominal || syst_affectsJets || syst_affectsBTag)) {
1147  m_SUSYTools->IsBJet(*jet);
1148  }
1149  ATH_MSG_VERBOSE( " Jet is bjet ? " << static_cast<int>(ST::acc_bjet(*jet)));
1150  }
1151  }
1152 
1153  float jet_weight(1.);
1154  float btag_weight(1.);
1155  if( !isData ) { //isMC
1156  if (isNominal) { //btagging
1157  btag_weight_nominal = btag_weight = m_SUSYTools->BtagSF(jets);
1158  weight_btags->SetBinContent(1, weight_btags->GetBinContent(1)+btag_weight);
1159  }
1160  else if (!syst_affectsBTag){
1161  btag_weight = btag_weight_nominal;
1162  }
1163  else{
1164  btag_weight = m_SUSYTools->BtagSF(jets);
1165  size_t iwbin = find(m_syst_weights["BTag"].begin(), m_syst_weights["BTag"].end(), sys.name()) - m_syst_weights["BTag"].begin();
1166  if(iwbin < m_syst_weights["BTag"].size()) { weight_btags->SetBinContent(iwbin+1, weight_btags->GetBinContent(iwbin+1)+btag_weight); }
1167  }
1168 
1169  if(isNominal){ //JVT
1170  jet_weight = m_SUSYTools->JVT_SF(jets);
1171  jet_weight *= m_SUSYTools->FJVT_SF(jets);
1172  jets_weight_nominal = jet_weight;
1173  jets_weight_nominal *= m_SUSYTools->FJVT_SF(jets);
1174  weight_jets->SetBinContent(1, weight_jets->GetBinContent(1)+jet_weight);
1175  }
1176  else if (!syst_affectsJets || (syst_affectsJets && !sysInfo.affectsWeights)){
1177  jet_weight = jets_weight_nominal;
1178  }
1179  else if ( syst_affectsJets && sysInfo.affectsWeights ){
1180  jet_weight = m_SUSYTools->JVT_SF(jets);
1181  jet_weight *= m_SUSYTools->FJVT_SF(jets);
1182  size_t iwbin = find(m_syst_weights["Jet"].begin(), m_syst_weights["Jet"].end(), sys.name()) - m_syst_weights["Jet"].begin();
1183  if(iwbin < m_syst_weights["Jet"].size()) { weight_jets->SetBinContent(iwbin+1, weight_jets->GetBinContent(iwbin+1)+jet_weight); }
1184  }
1185  }
1186  else{ //data
1187  weight_jets->SetBinContent(1, 1.);
1188  weight_btags->SetBinContent(1, 1.);
1189  }
1190  event_weight *= jet_weight;
1191  event_weight *= btag_weight;
1192  ATH_MSG_DEBUG("Combined b-tagging scale factor: " << btag_weight);
1193  ATH_MSG_DEBUG("Combined jet scale factor: " << jet_weight);
1194  }
1195 
1196  //--- Large R. Jets
1197 
1198  if( m_slices["fjet"] && doFatJets ) {
1199  ATH_MSG_DEBUG("Working on fat jets");
1200  for ( const auto& fatjet : *fatjets ) {
1201  ATH_MSG_VERBOSE( " Jet is bad? " << static_cast<int>(ST::acc_bad(*fatjet)));
1202  ATH_MSG_VERBOSE( " Jet is baseline ? " << static_cast<int>(ST::acc_baseline(*fatjet)));
1203  ATH_MSG_VERBOSE( " Jet passes OR ? " << static_cast<int>(ST::acc_passOR(*fatjet)));
1204  }
1205 
1206  float fatjet_weight(1.);
1207  //disable - noJVTforfatjets if( !isData ) { //isMC
1208  //disable - noJVTforfatjets if(isNominal){ //JVT - no JVT cuts for fat jets!
1209  //disable - noJVTforfatjets fatjets_weight_nominal = fatjet_weight = m_SUSYTools->JVT_SF(fatjets);
1210  //disable - noJVTforfatjets weight_fatjets->SetBinContent(1, weight_fatjets->GetBinContent(1)+fatjet_weight);
1211  //disable - noJVTforfatjets }
1212  //disable - noJVTforfatjets if (!syst_affectsJets || (syst_affectsJets && !sysInfo.affectsWeights)){
1213  //disable - noJVTforfatjets fatjet_weight = fatjets_weight_nominal;
1214  //disable - noJVTforfatjets }
1215  //disable - noJVTforfatjets else if ( syst_affectsJets && sysInfo.affectsWeights ){
1216  //disable - noJVTforfatjets fatjet_weight = m_SUSYTools->JVT_SF(fatjets);
1217  //disable - noJVTforfatjets size_t iwbin = find(m_syst_weights["Jet"].begin(), m_syst_weights["Jet"].end(), sys.name()) - m_syst_weights["Jet"].begin();
1218  //disable - noJVTforfatjets if(iwbin < m_syst_weights["Jet"].size()) { weight_fatjets->SetBinContent(iwbin+1, weight_fatjets->GetBinContent(iwbin+1)+fatjet_weight); }
1219  //disable - noJVTforfatjets }
1220  //disable - noJVTforfatjets }
1221 
1222  ATH_MSG_DEBUG("Combined large radius jet scale factor: " << fatjet_weight);
1223  }
1224 
1225  //--- Track Jets
1226 
1227  if( m_slices["tjet"] && doTrkJets ) {
1228  ATH_MSG_DEBUG("Working on trk jets");
1229  for ( const auto& trkjet : *trkjets ) {
1230  ATH_MSG_VERBOSE( " Jet is bad? " << static_cast<int>(ST::acc_bad(*trkjet)));
1231  ATH_MSG_VERBOSE( " Jet is baseline ? " << static_cast<int>(ST::acc_baseline(*trkjet)));
1232  ATH_MSG_VERBOSE( " Jet passes OR ? " << static_cast<int>(ST::acc_passOR(*trkjet)));
1233  }
1234 
1235  float trkjet_weight(1.);
1236  //disable - noJVTfortrkjets if( !isData ) { //isMC
1237  //disable - noJVTfortrkjets if(isNominal){ //JVT - no JVT cuts for trk jets!
1238  //disable - noJVTfortrkjets trkjets_weight_nominal = trkjet_weight = 1;//m_SUSYTools->JVT_SF(trkjets);
1239  //disable - noJVTfortrkjets weight_trkjets->SetBinContent(1, weight_trkjets->GetBinContent(1)+trkjet_weight);
1240  //disable - noJVTfortrkjets }
1241  //disable - noJVTfortrkjets else if (!syst_affectsJets || (syst_affectsJets && !sysInfo.affectsWeights)){
1242  //disable - noJVTfortrkjets trkjet_weight = trkjets_weight_nominal;
1243  //disable - noJVTfortrkjets }
1244  //disable - noJVTfortrkjets else if ( syst_affectsJets && sysInfo.affectsWeights ){
1245  //disable - noJVTfortrkjets trkjet_weight = 1;//m_SUSYTools->JVT_SF(trkjets);
1246  //disable - noJVTfortrkjets size_t iwbin = find(m_syst_weights["Jet"].begin(), m_syst_weights["Jet"].end(), sys.name()) - m_syst_weights["Jet"].begin();
1247  //disable - noJVTfortrkjets if(iwbin < m_syst_weights["Jet"].size()) { weight_trkjets->SetBinContent(iwbin+1, weight_trkjets->GetBinContent(iwbin+1)+trkjet_weight); }
1248  //disable - noJVTfortrkjets }
1249  //disable - noJVTfortrkjets }
1250 
1251  ATH_MSG_DEBUG("Combined track jet scale factor: " << trkjet_weight);
1252  }
1253 
1254  //--- Taus
1255  if (m_slices["tau"]) {
1256  ATH_MSG_DEBUG("Working on taus");
1257  float taus_weight(1.);
1258  for ( const auto& ta : *taus ) {
1259  if( !isData ){
1260  if (isNominal || syst_affectsTaus) {
1261  if ((ST::acc_signal(*ta) == 1) && (isNominal || sysInfo.affectsWeights)) {
1262  taus_weight *= m_SUSYTools->GetSignalTauSF(*ta, true, false); //true, "HLT_tau25_medium1_tracktwo");;
1263  }
1264  }
1265  }
1266  ATH_MSG_VERBOSE( " Tau passing baseline selection? " << static_cast<int>(ST::acc_baseline(*ta)));
1267  ATH_MSG_VERBOSE( " Tau passing signal selection? " << static_cast<int>(ST::acc_signal(*ta)));
1268  if (ST::acc_signal(*ta) == 1)
1269  ATH_MSG_VERBOSE( " Tau weight " << ST::acc_effscalefact(*ta) );
1270  }
1271 
1272  if (isNominal) {
1273  taus_weight_nominal = taus_weight;
1274  weight_taus->SetBinContent(1, weight_taus->GetBinContent(1)+taus_weight);
1275  }
1276  else if (!syst_affectsTaus) {
1277  taus_weight = taus_weight_nominal;
1278  }
1279  else if ( sysInfo.affectsWeights ){
1280  size_t iwbin = find(m_syst_weights["Tau"].begin(), m_syst_weights["Tau"].end(), sys.name()) - m_syst_weights["Tau"].begin();
1281  if(iwbin < m_syst_weights["Tau"].size()) { weight_taus->SetBinContent(iwbin+1, weight_taus->GetBinContent(iwbin+1)+taus_weight); }
1282  }
1283 
1284  event_weight *= taus_weight;
1285  }
1286 
1287 
1288  ATH_MSG_DEBUG("Full event weight: " << event_weight);
1289  if (isNominal) {event_weight_nominal = event_weight;}
1290  else if (sysInfo.affectsWeights) ATH_MSG_DEBUG("Difference with nominal weight: " << event_weight - event_weight_nominal);
1291 
1292  // Clean up the systematics copies
1293  if (sysInfo.affectsKinematics) {
1294  delete metcst;
1295  delete mettst;
1296  delete metcst_aux;
1297  delete mettst_aux;
1298  }
1299  isNominal = false;
1300  }
1301 
1302  m_clock0.Stop();
1303  if (m_Nevts == 0) {
1304  m_clock1.Stop();
1305  } else {
1306  m_clock2.Stop();
1307  }
1308  ++m_Nevts;
1309 
1310  delete m_metcst_nominal;
1311  delete m_metcst_nominal_aux;
1312  delete m_mettst_nominal;
1313  delete m_mettst_nominal_aux;
1314 
1315  return StatusCode::SUCCESS;
1316 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ fileExecute()

StatusCode EL::AnaAlgorithm::fileExecute ( )
protectedinherited

perform the action exactly once for each file in the dataset

Ideally you don't use this, but instead rely on meta-data tools instead. However, there are enough people asking for it that I decided to implement it anyways.

\warn To use this you have to call requestFileExecute to use this.

\warn The user should not expect this to be called at any particular point in execution. If a file is split between multiple jobs this will be called in only one of these jobs, and not the others. It usually gets called before the first event in a file, but that is not guaranteed and relying on this is a bug.

\warn The execution order of beginInputFile and fileExecute is currently unspecified.

\warn fileExecute does not work with sub-file splitting in Athena, i.e. processing half the events of a file in one job the other half in another job. this should not normally happen, unless you do crazy things like run AthenaMP or explicitly select sub-file splitting in panda. in that case you are on your own.

Definition at line 342 of file AnaAlgorithm.cxx.

344  {
345  return StatusCode::SUCCESS;
346  }

◆ finalize()

StatusCode SUSYToolsAlg::finalize ( )

Definition at line 257 of file SUSYToolsAlg.cxx.

257  {
258  ATH_MSG_INFO ("Finalizing " << name() << "...");
259 
260  ATH_MSG_INFO("Time per event: (CPU / WALL)");
261  ATH_MSG_INFO(" Entire loop - " << m_clock0.CpuTime() * 1e3 / m_Nevts << " / " << m_clock0.RealTime() * 1e3 / m_Nevts << " ms");
262  ATH_MSG_INFO(" First event - " << m_clock1.CpuTime() * 1e3 << " / " << m_clock1.RealTime() * 1e3 << " ms");
263  ATH_MSG_INFO(" Excluding first event - " << m_clock2.CpuTime() * 1e3 / (m_Nevts - 1) << " / " << m_clock2.RealTime() * 1e3 / (m_Nevts - 1) << " ms");
264 
265 
266  // label cutflow histograms
267  for (std::string hname : {"el_n_flow_nominal", "ph_n_flow_nominal", "mu_n_flow_nominal", "jet_n_flow_nominal", "bjet_n_flow_nominal", "fatjet_n_flow_nominal", "trkjet_n_flow_nominal", "tau_n_flow_nominal"} ) {
268  TH1* h = hist("Cutflow/"+hname);
269  for (unsigned int i=1; i < Cut::NSel+1; i++){ h->GetXaxis()->SetBinLabel(i, Cut::SCut[i-1].Data()); }
270  h->GetXaxis()->SetLabelSize(0.05);
271  }
272 
273  // normalize and label efficiency histograms
274  for (std::string hname : {"el_trigmatch_eff_nominal", "ph_trigmatch_eff_nominal", "mu_trigmatch_eff_nominal"}) {
275  std::string obj = hname.substr(0,2);
276  TH1* h = hist("Trigger/"+hname);
277  for (unsigned int i=1; i < m_triggers[obj].size()+1; i++){ h->GetXaxis()->SetBinLabel(i, m_triggers[obj][i-1].substr(4,std::string::npos).c_str()); }
278  h->GetXaxis()->SetLabelSize(0.05);
279  if (m_obj_count[obj]["sig"]>0) h->Scale(1./static_cast<float>(m_obj_count[obj]["sig"]));
280  }
281 
282  // label weights histograms
283  std::map<std::string,std::string> mapweights = {{"event","EventWeight"},{"electrons","Electron"},{"photons","Photon"},{"muons","Muon"},{"taus","Tau"},{"jets","Jet"},{"btags","BTag"}};
284  for (const auto& weight : mapweights) {
285  TH1* h = hist("Syst/weight_"+weight.first);
286  std::vector syslist = m_syst_weights[weight.second];
287  for (unsigned int i=1; i < syslist.size()+1; i++) { h->GetXaxis()->SetBinLabel(i, syslist.at(i-1).c_str()); }
288  h->GetXaxis()->SetLabelSize(0.05);
289  // average weight
290  h->Scale(1./static_cast<float>(h->GetBinContent(1)));
291 
292  TH2* h2 = hist2d("Syst/syst_"+weight.first);
293  syslist = m_syst_all[weight.second];
294  for (unsigned int i=1; i < syslist.size()+1; i++) { h2->GetYaxis()->SetBinLabel(syslist.size()-i+1, syslist.at(i-1).c_str()); h2->Fill(0.5,syslist.size()-i,1.); }
295  h2->GetYaxis()->SetLabelSize(0.05);
296  }
297 
298  return StatusCode::SUCCESS;
299 }

◆ graph()

TGraph * AthHistogramming::graph ( const std::string &  graphName,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
protectedinherited

Simplify the retrieval of registered TGraphs.

Definition at line 492 of file AthHistogramming.cxx.

493 {
494  // Build a 32 bit hash out of the name
495  const hash_t graphHash = this->hash(graphName);
496 
497  // See if this entry exists in the map
498  GraphMap_t::const_iterator it = m_graphMap.find( graphHash );
499  if ( it == m_graphMap.end() ) // It doesn't exist!
500  { // Let's see into the THistSvc if somebody else has registered the TGraph...
501 
502  // Need to copy the strings as we will massage them from here on
503  std::string graphNameCopy = graphName;
504  std::string tDirCopy = tDir;
505  std::string streamCopy = stream;
506 
507  // Massage the final string to book things
508  std::string bookingString("");
509  this->buildBookingString( bookingString, graphNameCopy, tDirCopy, streamCopy, true);
510 
511  TGraph* graphPointer(NULL);
512  if ( !((histSvc()->getGraph(bookingString, graphPointer)).isSuccess()) )
513  {
514  // Massage the final string to book things
515  std::string bookingString("");
516  this->buildBookingString( bookingString, graphNameCopy, tDirCopy, streamCopy, false );
517 
518  if ( !((histSvc()->getGraph(bookingString, graphPointer)).isSuccess()) )
519  {
520  m_msg << MSG::WARNING
521  << "Problem retrieving the TGraph with name (including pre- and post-fixes) "
522  << m_histNamePrefix + graphNameCopy + m_histNamePostfix
523  << " or with name " << graphNameCopy
524  << " in " << m_name << "... it doesn't exist, neither in the cached map nor in the THistSvc!"
525  << " Will return an NULL pointer... you have to handle it correctly!" << endmsg;
526  return NULL;
527  }
528  // If we get to here, we actually found the TGraph in the THistSvc.
529  // So let's add it to the local cache map and return its pointer
530  m_graphMap.insert( m_graphMap.end(), std::pair< const hash_t, TGraph* >( graphHash, graphPointer ) );
531  return graphPointer;
532  }
533  // If we get to here, we actually found the TGraph in the THistSvc.
534  // So let's add it to the local cache map and return its pointer
535  m_graphMap.insert( m_graphMap.end(), std::pair< const hash_t, TGraph* >( graphHash, graphPointer ) );
536  return graphPointer;
537  }
538 
539 
540  // Return the pointer to the TGraph that we got from the local cache map
541  return it->second;
542 }

◆ groupSysts()

void SUSYToolsAlg::groupSysts ( void  )
private

Definition at line 1444 of file SUSYToolsAlg.cxx.

1444  {
1445  m_syst_all.clear();
1446  m_syst_weights.clear();
1447  const std::vector<std::string> Nominal{"Nominal"};
1448  for (const auto& sysInfo : m_sysInfoList) {
1449  std::string sys_name = sysInfo.systset.name();
1450  std::string sys_affects = ST::testAffectsObject(sysInfo.affectsType);
1451  ATH_MSG_DEBUG("Syst " << sys_name << " affects " << sys_affects);
1452 
1453  bool sys_affects_weights = sysInfo.affectsWeights;
1454 
1455  // collect all syst names
1456  // per affected object
1457  const auto & [pairPtr, inserted] = m_syst_all.try_emplace(sys_affects, Nominal);
1458  pairPtr->second.push_back(sys_name);
1459 
1460  // weight related syst
1461  if (sys_affects_weights) {
1462  const auto & [pairPtr_w, inserted_w] = m_syst_weights.try_emplace(sys_affects, Nominal);
1463  pairPtr_w->second.push_back(sys_name);
1464  }
1465  }
1466 }

◆ handle()

void EL::AnaAlgorithm::handle ( const Incident &  inc)
inherited

receive the given incident

Guarantee
basic
Failures
incident handling errors

Definition at line 520 of file AnaAlgorithm.cxx.

522  {
523  if (inc.type() == IncidentType::BeginInputFile)
524  {
527  if (m_hasFileExecute)
529  } else if (inc.type() == IncidentType::EndInputFile)
530  {
531  if (m_hasEndInputFile)
533  } else
534  {
535  ATH_MSG_WARNING( "Unknown incident type received: " << inc.type() );
536  }
537  }

◆ hash()

AthHistogramming::hash_t AthHistogramming::hash ( const std::string &  histName) const
inlineprivateinherited

Method to calculate a 32-bit hash from a string.

Definition at line 428 of file AthHistogramming.h.

429 {
431  return (hash_t)(hash64 & 0xFFFFFFFF);
432 }

◆ hist()

TH1 * AthHistogramming::hist ( const std::string &  histName,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
protectedinherited

Simplify the retrieval of registered histograms of any type.

Definition at line 198 of file AthHistogramming.cxx.

199 {
200  // Build a 32 bit hash out of the name
201  const hash_t histHash = this->hash(histName);
202 
203  // See if this entry exists in the map
204  HistMap_t::const_iterator it = m_histMap.find( histHash );
205  if ( it == m_histMap.end() ) // It doesn't exist!
206  { // Let's see into the THistSvc if somebody else has registered the histogram...
207 
208  // Need to copy the strings as we will massage them from here on
209  std::string histNameCopy = histName;
210  std::string tDirCopy = tDir;
211  std::string streamCopy = stream;
212 
213  // Massage the final string to book things
214  std::string bookingString("");
215  this->buildBookingString( bookingString, histNameCopy, tDirCopy, streamCopy ,false);
216 
217  TH1* histPointer(NULL);
218  if ( !((histSvc()->getHist(bookingString, histPointer)).isSuccess()) )
219  {
220  // Massage the final string to book things
221  std::string bookingString("");
222  this->buildBookingString( bookingString, histNameCopy, tDirCopy, streamCopy, true );
223 
224  if ( !((histSvc()->getHist(bookingString, histPointer)).isSuccess()) )
225  {
226  m_msg << MSG::WARNING
227  << "Problem retrieving the histogram with name (including pre- and post-fixes) "
228  << m_histNamePrefix + histNameCopy + m_histNamePostfix
229  << " or with name " << histNameCopy
230  << " in " << m_name << "... it doesn't exist, neither in the cached map nor in the THistSvc!"
231  << " Will return an NULL pointer... you have to handle it correctly!" << endmsg;
232  return NULL;
233  }
234  // If we get to here, we actually found the histogram in the THistSvc.
235  // So let's add it to the local cache map and return its pointer
236  m_histMap.insert( m_histMap.end(), std::pair< const hash_t, TH1* >( histHash, histPointer ) );
237  return histPointer;
238  }
239  // If we get to here, we actually found the histogram in the THistSvc.
240  // So let's add it to the local cache map and return its pointer
241  m_histMap.insert( m_histMap.end(), std::pair< const hash_t, TH1* >( histHash, histPointer ) );
242  return histPointer;
243  }
244 
245 
246  // Return the pointer to the histogram that we got from the local cache map
247  return it->second;
248 }

◆ hist2d()

TH2 * AthHistogramming::hist2d ( const std::string &  histName,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the retrieval of registered 2-d histograms.

Definition at line 369 of file AthHistogramming.h.

370 {
371  // Get the TH1 pointer
372  TH1* th1Pointer = this->hist(histName, tDir, stream);
373  if ( !th1Pointer )
374  {
375  m_msg << MSG::ERROR
376  << "Cannot get a 2-d histogram with name " << histName
377  << "... will probably seg-fault!" << endmsg;
378  return NULL;
379  }
380  // If the TH1 pointer is valid, simply return the dynamic_cast
381  return dynamic_cast<TH2*>( th1Pointer );
382 }

◆ hist3d()

TH3 * AthHistogramming::hist3d ( const std::string &  histName,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
inlineprotectedinherited

Simplify the retrieval of registered 3-d histograms.

Definition at line 386 of file AthHistogramming.h.

387 {
388  // Get the TH1 pointer
389  TH1* th1Pointer = this->hist(histName, tDir, stream);
390  if ( !th1Pointer )
391  {
392  m_msg << MSG::ERROR
393  << "Cannot get a 3-d histogram with name " << histName
394  << "... will probably seg-fault!" << endmsg;
395  return NULL;
396  }
397  // If the TH1 pointer is valid, simply return the dynamic_cast
398  return dynamic_cast<TH3*>( th1Pointer );
399 }

◆ histSvc()

const ServiceHandle< ITHistSvc > & AthHistogramAlgorithm::histSvc ( ) const
inlineinherited

The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a pointer to the THistSvc.

Definition at line 113 of file AthHistogramAlgorithm.h.

114 {
115  return m_histSvc;
116 }

◆ initialize()

StatusCode SUSYToolsAlg::initialize ( )

Definition at line 104 of file SUSYToolsAlg.cxx.

104  {
105  ATH_MSG_INFO("Initializing " << name() << "...");
106 
108  ATH_MSG_INFO("Retrieved tool: " << m_SUSYTools->name() );
109 
110  // read some of the property values (may have been autoconfigured at this point)
111  m_mcCampaign = *(m_SUSYTools->getProperty<std::string>("mcCampaign"));
112  m_isPHYSLITE = *(m_SUSYTools->getProperty<bool>("IsPHYSLITE"));
113 
114 
115  // Need truth matching for tau CP tools
116  if( !m_SUSYTools->isData() ){
117  m_tauTruthMatchingTool.setTypeAndName("TauAnalysisTools::TauTruthMatchingTool/TauTruthMatchingTool");
118  ATH_CHECK( m_tauTruthMatchingTool.setProperty("TruthJetContainerName", "AntiKt4TruthDressedWZJets") );
120  ATH_MSG_INFO("Retrieved tool: " << m_tauTruthMatchingTool->name() );
121  }
122 
123  // GRL tool
124  if (m_SUSYTools->isData()) {
125  m_grl.setTypeAndName("GoodRunsListSelectionTool/grl");
127 
128  std::vector<std::string> myGRLs;
129  for ( const auto& x : m_GRLFiles ) myGRLs.push_back(x);
130 
131  ANA_CHECK( m_grl.setProperty("GoodRunsListVec", myGRLs) );
132  ANA_CHECK( m_grl.setProperty("PassThrough", (myGRLs.size()>0?false:true)) );
133  ANA_CHECK( m_grl.retrieve() );
134 
135  ATH_MSG_INFO("GRL tool retrieved & initialized: " << m_grl->name() );
136  }
137 
138  // Systematics
139  m_sysInfoList.clear();
140  // this is the nominal set
141  if (m_doSyst) {
143  } else {
144  ST::SystInfo infodef;
145  infodef.affectsKinematics = false;
146  infodef.affectsWeights = false;
147  infodef.affectsType = ST::Unknown;
148  m_sysInfoList.push_back(infodef);
149  }
150  // order in object groups
151  groupSysts();
152 
153  // setup triggers to be checked
154  m_triggers.clear();
155  if(m_mcCampaign.find("mc20") != std::string::npos){
156  // Trigger for Run2
157  m_triggers["el"] = {};
158  m_triggers["el"].push_back("HLT_e24_lhtight_nod0_ivarloose");
159  m_triggers["el"].push_back("HLT_e60_lhmedium_nod0");
160  m_triggers["el"].push_back("HLT_e26_lhtight_nod0_ivarloose");
161  m_triggers["el"].push_back("HLT_e140_lhloose_nod0");
162  m_triggers["el"].push_back("HLT_e24_lhtight_ivarloose_L1EM22VHI");
163  m_triggers["el"].push_back("HLT_e24_lhtight_ivarloose_L1eEM26M");
164  m_triggers["el"].push_back("HLT_e26_lhtight_ivarloose_L1EM22VHI");
165  m_triggers["el"].push_back("HLT_e26_lhtight_ivarloose_L1eEM26M");
166  m_triggers["el"].push_back("HLT_e60_lhvloose_L1eEM26M");
167  m_triggers["el"].push_back("HLT_e60_lhvloose_L1EM22VHI");
168 
169  m_triggers["ph"] = {};
170  m_triggers["ph"].push_back("HLT_g120_loose");
171  m_triggers["ph"].push_back("HLT_g140_loose");
172  m_triggers["ph"].push_back("HLT_g120_loose_L1eEM26M");
173  m_triggers["ph"].push_back("HLT_g120_loose_L1EM22VHI");
174  m_triggers["ph"].push_back("HLT_g140_loose_L1eEM26M");
175  m_triggers["ph"].push_back("HLT_g140_loose_L1EM22VHI");
176 
177  m_triggers["mu"] = {};
178  m_triggers["mu"].push_back("HLT_mu24_ivarmedium");
179  m_triggers["mu"].push_back("HLT_mu26_ivarmedium");
180  m_triggers["mu"].push_back("HLT_mu50");
181  m_triggers["mu"].push_back("HLT_mu24_ivarmedium_L1MU14FCH");
182  m_triggers["mu"].push_back("HLT_mu24_ivarmedium_L1MU18VFCH");
183  m_triggers["mu"].push_back("HLT_mu26_ivarmedium_L1MU14FCH");
184  m_triggers["mu"].push_back("HLT_mu26_ivarmedium_L1MU18VFCH");
185  }
186  else{
187  // Trigger for Run3
188  m_triggers["el"] = {};
189  m_triggers["el"].push_back("HLT_e26_lhtight_ivarloose_L1EM22VHI");
190  m_triggers["el"].push_back("HLT_e60_lhmedium_L1EM22VHI");
191  m_triggers["el"].push_back("HLT_e140_lhloose_L1EM22VHI");
192 
193  m_triggers["ph"] = {};
194  m_triggers["ph"].push_back("HLT_g140_loose_L1EM22VHI");
195  m_triggers["ph"].push_back("HLT_g300_L1EM22VHI"); // HLT_g300_etcut_L1EM22VHI not working in mc21
196 
197  m_triggers["mu"] = {};
198  m_triggers["mu"].push_back("HLT_mu24_ivarmedium_L1MU14FCH");
199  m_triggers["mu"].push_back("HLT_mu50_L1MU14FCH");
200  m_triggers["mu"].push_back("HLT_mu60_0eta105_msonly_L1MU14FCH");
201  m_triggers["mu"].push_back("HLT_mu60_L1MU14FCH");
202  m_triggers["mu"].push_back("HLT_mu80_msonly_3layersEC_L1MU14FCH");
203 
204  }
205 
206 
207  // book histograms
209 
210  // retrieve SUSYTools config file
211  TEnv rEnv;
212  int success = -1;
214  success = rEnv.ReadFile(m_configFile.c_str(), kEnvAll);
215  if(success != 0){
216  ATH_MSG_ERROR( "Cannot open config file!");
217  return StatusCode::FAILURE;
218  }
219  ATH_MSG_INFO( "Config file opened" );
220 
221  m_configDict.clear();
222  m_configDict["Jet.LargeRcollection"] = rEnv.GetValue("Jet.LargeRcollection", "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" );
223  m_configDict["TrackJet.Collection"] = rEnv.GetValue("TrackJet.Collection", "AntiKtVR30Rmax4Rmin02TrackJets" );
224  m_configDict["Jet.WtaggerConfig"] = rEnv.GetValue("Jet.WtaggerConfig", "None");
225  m_configDict["Jet.ZtaggerConfig"] = rEnv.GetValue("Jet.ZtaggerConfig", "None");
226  m_configDict["Jet.ToptaggerConfig"] = rEnv.GetValue("Jet.ToptaggerConfig", "None");
227 
228  // Trim comments and extra spaces from config entries
229  std::regex comment("#.*$");
230  std::regex trimspaces("^ +| +$|( ) +");
231  for (const auto& keyval : m_configDict) {
232  m_configDict[keyval.first] = regex_replace(m_configDict[keyval.first], comment, "");
233  m_configDict[keyval.first] = regex_replace(m_configDict[keyval.first], trimspaces, "$1");
234  ATH_MSG_DEBUG("config " << keyval.first << " : " << m_configDict[keyval.first]);
235  }
236  m_FatJetCollection = m_configDict["Jet.LargeRcollection"];
237  m_TrkJetCollection = m_configDict["TrackJet.Collection"];
238  if (m_configDict["TrackJet.Collection"].find("None")!=std::string::npos) m_TrkJetCollection = "";
239 
240  m_slices.clear();
241  m_slices["ele"] = bool(rEnv.GetValue("Slices.Ele", true));
242  m_slices["pho"] = bool(rEnv.GetValue("Slices.Pho", true));
243  m_slices["mu"] = bool(rEnv.GetValue("Slices.Mu", true));
244  m_slices["tau"] = bool(rEnv.GetValue("Slices.Tau", true));
245  m_slices["jet"] = bool(rEnv.GetValue("Slices.Jet", true));
246  m_slices["bjet"] = bool(rEnv.GetValue("Slices.BJet", true));
247  m_slices["fjet"] = bool(rEnv.GetValue("Slices.FJet", true));
248  m_slices["tjet"] = bool(rEnv.GetValue("Slices.TJet", true));
249  m_slices["met"] = bool(rEnv.GetValue("Slices.MET", true));
250  for (const auto& x : m_slices) { ATH_MSG_DEBUG( "Slice " << x.first << ": " << ((x.second)?"true":"false")); }
251 
252  return StatusCode::SUCCESS;
253 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ inputMetaStore() [1/2]

AnaAlgorithm::MetaStorePtr_t EL::AnaAlgorithm::inputMetaStore ( )
inherited

Definition at line 81 of file AnaAlgorithm.cxx.

82  {
83 #ifdef XAOD_STANDALONE
84  return &m_inputMetaStore;
85 #else
86  return m_inputMetaStore;
87 #endif // XAOD_STANDALONE
88  }

◆ inputMetaStore() [2/2]

AnaAlgorithm::ConstMetaStorePtr_t EL::AnaAlgorithm::inputMetaStore ( ) const
inherited

Accessor for the input metadata store

Definition at line 72 of file AnaAlgorithm.cxx.

73  {
74 #ifdef XAOD_STANDALONE
75  return &m_inputMetaStore;
76 #else
77  return m_inputMetaStore;
78 #endif // XAOD_STANDALONE
79  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ myReplace()

void AthHistogramming::myReplace ( std::string &  str,
const std::string &  oldStr,
const std::string &  newStr 
)
privateinherited

Helper method to replace sub-string.

Definition at line 590 of file AthHistogramming.cxx.

593 {
594  size_t pos = 0;
595  while((pos = str.find(oldStr, pos)) != std::string::npos)
596  {
597  str.replace(pos, oldStr.length(), newStr);
598  pos += newStr.length();
599  }
600 }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ outputMetaStore() [1/2]

AnaAlgorithm::MetaStorePtr_t EL::AnaAlgorithm::outputMetaStore ( )
inherited

Definition at line 101 of file AnaAlgorithm.cxx.

102  {
103 #ifdef XAOD_STANDALONE
104  return &m_outputMetaStore;
105 #else
106  return m_outputMetaStore;
107 #endif // XAOD_STANDALONE
108  }

◆ outputMetaStore() [2/2]

AnaAlgorithm::ConstMetaStorePtr_t EL::AnaAlgorithm::outputMetaStore ( ) const
inherited

Accessor for the output metadata store

Definition at line 92 of file AnaAlgorithm.cxx.

93  {
94 #ifdef XAOD_STANDALONE
95  return &m_outputMetaStore;
96 #else
97  return m_outputMetaStore;
98 #endif // XAOD_STANDALONE
99  }

◆ print()

void EL::AnaAlgorithm::print ( ) const
protectedvirtualinherited

print the state of the algorithm

This is mostly to allow algorithms to add a little debugging information if they feel like it.

Definition at line 336 of file AnaAlgorithm.cxx.

338  {}

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ requestBeginInputFile()

StatusCode EL::AnaAlgorithm::requestBeginInputFile ( )
inherited

register this algorithm to have an implementation of beginInputFile

Guarantee
strong
Failures
beginInputFile not supported

Definition at line 270 of file AnaAlgorithm.cxx.

272  {
273  m_hasBeginInputFile = true;
274 
275 #ifndef XAOD_STANDALONE
276  // Connect to the IncidentSvc:
277  ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
278  ATH_CHECK( incSvc.retrieve() );
279 
280  // Set up the right callback, but ensure we don't double-register
281  // if we are called twice
282  incSvc->removeListener( this, IncidentType::BeginInputFile );
283  incSvc->addListener( this, IncidentType::BeginInputFile, 0, true );
284 #endif
285 
286  return StatusCode::SUCCESS;
287  }

◆ requestEndInputFile()

StatusCode EL::AnaAlgorithm::requestEndInputFile ( )
inherited

register this algorithm to have an implementation of endInputFile

Guarantee
strong
Failures
endInputFile not supported

Definition at line 291 of file AnaAlgorithm.cxx.

293  {
294  m_hasEndInputFile = true;
295 
296 #ifndef XAOD_STANDALONE
297  // Connect to the IncidentSvc:
298  ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
299  ATH_CHECK( incSvc.retrieve() );
300 
301  // Set up the right callback, but ensure we don't double-register
302  // if we are called twice
303  incSvc->removeListener( this, IncidentType::EndInputFile );
304  incSvc->addListener( this, IncidentType::EndInputFile, 0, true );
305 #endif
306 
307  return StatusCode::SUCCESS;
308  }

◆ requestFileExecute()

StatusCode EL::AnaAlgorithm::requestFileExecute ( )
inherited

register this algorithm to have an implementation of fileexecute

Guarantee
strong
Failures
fileExecute not supported

Definition at line 249 of file AnaAlgorithm.cxx.

251  {
252  m_hasFileExecute = true;
253 
254 #ifndef XAOD_STANDALONE
255  // Connect to the IncidentSvc:
256  ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
257  ATH_CHECK( incSvc.retrieve() );
258 
259  // Set up the right callback, but ensure we don't double-register
260  // if we are called twice
261  incSvc->removeListener( this, IncidentType::BeginInputFile );
262  incSvc->addListener( this, IncidentType::BeginInputFile, 0, true );
263 #endif
264 
265  return StatusCode::SUCCESS;
266  }

◆ stdHistsForObj()

void SUSYToolsAlg::stdHistsForObj ( xAOD::IParticle obj,
const std::string &  objtype,
const std::string &  objlevel,
std::map< std::string, std::string >  config = std::map<std::string,std::string>() 
)
private

Definition at line 1470 of file SUSYToolsAlg.cxx.

1470  {
1471  std::map<std::string,std::string> labels_dir = { {"el","Electron"}, {"ph","Photon"}, {"mu","Muon"}, {"jet","Jet"}, {"bjet","bJet"}, {"tau","Tau"}, {"fatjet","LargeRJet"}, {"trkjet","TrackJet"} };
1472  std::string dir = labels_dir[objtype]+"/";
1473 
1474  ATH_MSG_VERBOSE("Filling histograms for " << obj->type() << ", " << objlevel);
1475  hist(dir+objtype+"_"+objlevel+"_pt")->Fill( obj->pt()/1000. );
1476  hist(dir+objtype+"_"+objlevel+"_eta")->Fill( obj->eta() );
1477  hist(dir+objtype+"_"+objlevel+"_phi")->Fill( obj->phi() );
1478  hist(dir+objtype+"_"+objlevel+"_e")->Fill( obj->e()/1000. );
1479  hist(dir+objtype+"_"+objlevel+"_mass")->Fill( obj->m()/1000. );
1480  //
1481  if (objtype=="el" || objtype=="mu" || objtype=="ph") {
1482  if (objtype=="el") {
1483  if (ST::acc_z0sinTheta.isAvailable(*obj))
1484  hist(dir+objtype+"_"+objlevel+"_z0")->Fill( ST::acc_z0sinTheta(*obj) );
1485  if (ST::acc_d0sig.isAvailable(*obj))
1486  hist(dir+objtype+"_"+objlevel+"_d0")->Fill( ST::acc_d0sig(*obj) );
1487  hist(dir+objtype+"_"+objlevel+"_isolCalo")->Fill( STAlg::acc_topoetcone20(*obj)/obj->pt() );
1488  hist(dir+objtype+"_"+objlevel+"_isolTrack")->Fill( STAlg::acc_ptvarcone30_TTVA_LooseCone(*obj)/obj->pt() );
1489  } else if (objtype=="mu") {
1490  if (ST::acc_z0sinTheta.isAvailable(*obj))
1491  hist(dir+objtype+"_"+objlevel+"_z0")->Fill( ST::acc_z0sinTheta(*obj) );
1492  if (ST::acc_d0sig.isAvailable(*obj))
1493  hist(dir+objtype+"_"+objlevel+"_d0")->Fill( ST::acc_d0sig(*obj) );
1494  hist(dir+objtype+"_"+objlevel+"_isolCalo")->Fill( STAlg::acc_topoetcone20(*obj)/obj->pt() );
1495  hist(dir+objtype+"_"+objlevel+"_isolTrack")->Fill( STAlg::acc_ptvarcone30_TTVA(*obj)/obj->pt() );
1496  } else if (objtype=="ph") {
1497  hist(dir+objtype+"_"+objlevel+"_isolCalo")->Fill( (STAlg::acc_topoetcone40(*obj)-2450)/obj->pt() );
1498  hist(dir+objtype+"_"+objlevel+"_isolTrack")->Fill( STAlg::acc_ptcone20(*obj)/obj->pt() );
1499  }
1500  }
1501  //
1502  if (objtype=="el" || objtype=="mu" || objtype=="ph" || objtype=="tau") {
1503  if ( objtype!="tau" ) {
1504  if (ST::acc_truthType.isAvailable(*obj) && ST::acc_truthOrigin.isAvailable(*obj)) {
1505  ATH_MSG_DEBUG(objtype << ", " << objlevel << ": " << ST::acc_truthType(*obj) << ", " << ST::acc_truthOrigin(*obj));
1506  hist(dir+objtype+"_"+objlevel+"_truthType")->Fill( ST::acc_truthType(*obj) );
1507  hist(dir+objtype+"_"+objlevel+"_truthOrigin")->Fill( ST::acc_truthOrigin(*obj) );
1508  }
1509  } else {
1510  if(!m_isPHYSLITE){
1511  bool istruthmatched = STAlg::acc_IsTruthMatched.isAvailable(*obj) ? (bool)STAlg::acc_IsTruthMatched(*obj) : false;
1512  int pid(0),ppid(0);
1513  if (istruthmatched && STAlg::acc_truthParticleLink.isAvailable(*obj)) {
1514  const auto *tp = *(STAlg::acc_truthParticleLink(*obj));
1515  if (tp) {
1516  pid = tp->pdgId();
1517  ppid = (tp->nParents()>0)?tp->parent(0)->pdgId():0;
1518  }
1519  }
1520  hist(dir+objtype+"_"+objlevel+"_pid")->Fill( pid );
1521  hist(dir+objtype+"_"+objlevel+"_parentpid")->Fill( ppid );
1522  }
1523  }
1524  }
1525 
1526  if (objtype=="tau") {
1527  hist(dir+objtype+"_"+objlevel+"_nTracks")->Fill( dynamic_cast<xAOD::TauJet*>(obj)->nTracks() );
1528  hist(dir+objtype+"_"+objlevel+"_nTracksCharged")->Fill( dynamic_cast<xAOD::TauJet*>(obj)->nTracksCharged() );
1529  hist(dir+objtype+"_"+objlevel+"_nTracksIsolation")->Fill( dynamic_cast<xAOD::TauJet*>(obj)->nTracksIsolation() );
1530  hist(dir+objtype+"_"+objlevel+"_RNNJetScoreSigTrans")->Fill( STAlg::acc_RNNJetScoreSigTrans(*obj) );
1531  }
1532  //
1533 
1534  if (objtype=="bjet") {
1535  hist(dir+objtype+"_"+objlevel+"_bweight")->Fill( ST::acc_btag_weight(*obj) );
1536  hist(dir+objtype+"_"+objlevel+"_bweightpb")->Fill( ST::acc_btag_dl1pb(*obj) );
1537  hist(dir+objtype+"_"+objlevel+"_bweightpc")->Fill( ST::acc_btag_dl1pc(*obj) );
1538  hist(dir+objtype+"_"+objlevel+"_bweightpu")->Fill( ST::acc_btag_dl1pu(*obj) );
1539  }
1540 
1541  //
1542  const static SG::AuxElement::ConstAccessor<bool> acc_topValidPtRangeLow(config["ToptaggerKey"]+"_ValidPtRangeLow");
1543  const static SG::AuxElement::ConstAccessor<bool> acc_topValidPtRangeHigh(config["ToptaggerKey"]+"_ValidPtRangeHigh");
1544  const static SG::AuxElement::ConstAccessor<bool> acc_topValidEtaRange(config["ToptaggerKey"]+"_ValidEtaRange");
1545  const static SG::AuxElement::ConstAccessor<bool> acc_wtagged(config["WtaggerKey"]+"_Tagged");
1546  const static SG::AuxElement::ConstAccessor<bool> acc_ztagged(config["ZtaggerKey"]+"_Tagged");
1547  const static SG::AuxElement::ConstAccessor<bool> acc_toptagged(config["ToptaggerKey"]+"_Tagged");
1548  const static SG::AuxElement::ConstAccessor<float> acc_topscore(config["ToptaggerKey"]+"_Score");
1549 
1550  if (objtype=="fatjet" && acc_topValidPtRangeLow.isAvailable(*obj) && acc_topValidPtRangeHigh.isAvailable(*obj) && acc_topValidEtaRange.isAvailable(*obj)) {
1551  bool kin = acc_topValidPtRangeLow(*obj) && acc_topValidPtRangeHigh(*obj) && acc_topValidEtaRange(*obj);
1552  if (config.find("WtaggerKey")!=config.end()) hist(dir+objtype+"_"+objlevel+"_wtagged") ->Fill( acc_wtagged.isAvailable(*obj) ? kin && acc_wtagged(*obj) : -1);
1553  if (config.find("ZtaggerKey")!=config.end()) hist(dir+objtype+"_"+objlevel+"_ztagged") ->Fill( acc_ztagged.isAvailable(*obj) ? kin && acc_ztagged(*obj) : -1);
1554  if (config.find("ToptaggerKey")!=config.end()) hist(dir+objtype+"_"+objlevel+"_toptagged")->Fill( acc_toptagged.isAvailable(*obj) ? kin && acc_toptagged(*obj) : -1);
1555  if (config.find("ToptaggerKey")!=config.end()) hist(dir+objtype+"_"+objlevel+"_toptaggedscore")->Fill( acc_topscore.isAvailable(*obj) ? acc_topscore(*obj) : -1);
1556  }
1557 }

◆ sysInitialize()

StatusCode AthHistogramAlgorithm::sysInitialize ( )
virtualinherited

Initialization method invoked by the framework.

This method is responsible for any bookkeeping of initialization required by the framework itself. It will in turn invoke the initialize() method of the derived algorithm, and of any sub-algorithms which it creates.

Reimplemented from AthAlgorithm.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 75 of file AthHistogramAlgorithm.cxx.

76 {
77  // ---- stolen from GaudiKernel/Algorithm::sysInitialize -------
78  // Bypass the initialization if the algorithm
79  // has already been initialized.
80  if ( Gaudi::StateMachine::INITIALIZED <= FSMState() ) return StatusCode::SUCCESS;
81 
82  // Set the Algorithm's properties
83  bindPropertiesTo( serviceLocator()->getOptsSvc() );
84 
85  // Bypass the initialization if the algorithm is disabled.
86  // Need to do this after bindPropertiesTo.
87  if ( !isEnabled( ) ) return StatusCode::SUCCESS;
88 
89  // ---- stolen from GaudiKernel/Algorithm::sysInitialize ------- END ---
90 
91 
92  // Get the THistSvc
93  ATH_CHECK ( histSvc().retrieve() );
94 
95  // Configure the underlying AthHistogramming helper
100 
101  // Print some setup information into the log file
102  ATH_MSG_DEBUG ("Initializing " << name() << "...");
103  ATH_MSG_DEBUG (" using THistService = " << m_histSvc );
104  ATH_MSG_DEBUG (" using RootStreamName = " << m_prefix );
105  ATH_MSG_DEBUG (" using RootDirName = " << m_rootDir );
106  ATH_MSG_DEBUG (" using HistNamePrefix = " << m_histNamePrefix );
107  ATH_MSG_DEBUG (" using HistNamePostfix = " << m_histNamePostfix );
108  ATH_MSG_DEBUG (" using HistTitlePrefix = " << m_histTitlePrefix );
109  ATH_MSG_DEBUG (" using HistTitlePostfix = " << m_histTitlePostfix );
110 
111 
112  // re-direct to base class...
114 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tree()

TTree * AthHistogramming::tree ( const std::string &  treeName,
const std::string &  tDir = "",
const std::string &  stream = "" 
)
protectedinherited

Simplify the retrieval of registered TTrees.

Definition at line 378 of file AthHistogramming.cxx.

379 {
380  // Build a 32 bit hash out of the name
381  const hash_t treeHash = this->hash(treeName);
382 
383  // See if this entry exists in the map
384  TreeMap_t::const_iterator it = m_treeMap.find( treeHash );
385  if ( it == m_treeMap.end() ) // It doesn't exist!
386  { // Let's see into the THistSvc if somebody else has registered the TTree...
387 
388  // Need to copy the strings as we will massage them from here on
389  std::string treeNameCopy = treeName;
390  std::string tDirCopy = tDir;
391  std::string streamCopy = stream;
392 
393  // Massage the final string to book things
394  std::string bookingString("");
395  this->buildBookingString( bookingString, treeNameCopy, tDirCopy, streamCopy );
396 
397  TTree* treePointer(NULL);
398  if ( !((histSvc()->getTree(bookingString, treePointer)).isSuccess()) )
399  {
400  m_msg << MSG::WARNING
401  << "Problem retrieving the TTree with name " << treeNameCopy
402  << " in " << m_name << "... it doesn't exist, neither in the cached map nor in the THistSvc!"
403  << " Will return an NULL pointer... you have to handle it correctly!" << endmsg;
404  return NULL;
405  }
406  // If we get to here, we actually found the TTree in the THistSvc.
407  // So let's add it to the local cache map and return its pointer
408  m_treeMap.insert( m_treeMap.end(), std::pair< const hash_t, TTree* >( treeHash, treePointer ) );
409  return treePointer;
410  }
411 
412  // Return the pointer to the TTree that we got from the local cache map
413  return it->second;
414 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_clock0

TStopwatch SUSYToolsAlg::m_clock0
private

Definition at line 104 of file SUSYToolsAlg.h.

◆ m_clock1

TStopwatch SUSYToolsAlg::m_clock1
private

Definition at line 105 of file SUSYToolsAlg.h.

◆ m_clock2

TStopwatch SUSYToolsAlg::m_clock2
private

Definition at line 106 of file SUSYToolsAlg.h.

◆ m_configDict

std::map<std::string,std::string> SUSYToolsAlg::m_configDict
private

Definition at line 82 of file SUSYToolsAlg.h.

◆ m_configFile

std::string SUSYToolsAlg::m_configFile
private

Definition at line 93 of file SUSYToolsAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doSyst

bool SUSYToolsAlg::m_doSyst
private

Definition at line 99 of file SUSYToolsAlg.h.

◆ m_effMap

EffMap_t AthHistogramming::m_effMap
privateinherited

The map of histogram names to their pointers.

Definition at line 208 of file AthHistogramming.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_FatJetCollection

std::string SUSYToolsAlg::m_FatJetCollection
private

Definition at line 94 of file SUSYToolsAlg.h.

◆ m_graphMap

GraphMap_t AthHistogramming::m_graphMap
privateinherited

The map of TGraph names to their pointers.

Definition at line 222 of file AthHistogramming.h.

◆ m_grl

asg::AnaToolHandle<IGoodRunsListSelectionTool> SUSYToolsAlg::m_grl
private

Definition at line 85 of file SUSYToolsAlg.h.

◆ m_GRLFiles

std::vector<std::string> SUSYToolsAlg::m_GRLFiles
private

Definition at line 77 of file SUSYToolsAlg.h.

◆ m_hasBeginInputFile

bool EL::AnaAlgorithm::m_hasBeginInputFile {false}
privateinherited

the value of hasBeginInputFile

Definition at line 590 of file AnaAlgorithm.h.

◆ m_hasEndInputFile

bool EL::AnaAlgorithm::m_hasEndInputFile {false}
privateinherited

the value of hasEndInputFile

Definition at line 594 of file AnaAlgorithm.h.

◆ m_hasFileExecute

bool EL::AnaAlgorithm::m_hasFileExecute {false}
privateinherited

the value of hasFileExecute

Definition at line 586 of file AnaAlgorithm.h.

◆ m_heffs

std::map<std::string,TEfficiency*> SUSYToolsAlg::m_heffs
private

Definition at line 81 of file SUSYToolsAlg.h.

◆ m_histMap

HistMap_t AthHistogramming::m_histMap
privateinherited

The map of histogram names to their pointers.

Definition at line 201 of file AthHistogramming.h.

◆ m_histNamePostfix

std::string AthHistogramAlgorithm::m_histNamePostfix
privateinherited

The postfix for the histogram THx name.

Definition at line 97 of file AthHistogramAlgorithm.h.

◆ m_histNamePrefix

std::string AthHistogramAlgorithm::m_histNamePrefix
privateinherited

The prefix for the histogram THx name.

Definition at line 94 of file AthHistogramAlgorithm.h.

◆ m_hists

std::map<std::string,TH1*> SUSYToolsAlg::m_hists
private

Definition at line 80 of file SUSYToolsAlg.h.

◆ m_histSvc

ServiceHandle<ITHistSvc> AthHistogramAlgorithm::m_histSvc
privateinherited

Default constructor: AthHistogramAlgorithm();.

a handle on the Hist/TTree registration service

Definition at line 83 of file AthHistogramAlgorithm.h.

◆ m_histTitlePostfix

std::string AthHistogramAlgorithm::m_histTitlePostfix
privateinherited

The postfix for the histogram THx title.

Definition at line 103 of file AthHistogramAlgorithm.h.

◆ m_histTitlePrefix

std::string AthHistogramAlgorithm::m_histTitlePrefix
privateinherited

The prefix for the histogram THx title.

Definition at line 100 of file AthHistogramAlgorithm.h.

◆ m_inputMetaStore

MetaStore_t EL::AnaAlgorithm::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 551 of file AnaAlgorithm.h.

◆ m_isPHYSLITE

bool SUSYToolsAlg::m_isPHYSLITE
private

Definition at line 91 of file SUSYToolsAlg.h.

◆ m_kernel

std::string SUSYToolsAlg::m_kernel
private

Definition at line 92 of file SUSYToolsAlg.h.

◆ m_lbfilter

int SUSYToolsAlg::m_lbfilter
private

Definition at line 90 of file SUSYToolsAlg.h.

◆ m_levels

std::vector<std::string> SUSYToolsAlg::m_levels
private

Definition at line 113 of file SUSYToolsAlg.h.

◆ m_maxEvts

int SUSYToolsAlg::m_maxEvts
private

Definition at line 89 of file SUSYToolsAlg.h.

◆ m_mcCampaign

std::string SUSYToolsAlg::m_mcCampaign
private

Definition at line 78 of file SUSYToolsAlg.h.

◆ m_metcst_nominal

xAOD::MissingETContainer* SUSYToolsAlg::m_metcst_nominal
private

Definition at line 122 of file SUSYToolsAlg.h.

◆ m_metcst_nominal_aux

xAOD::MissingETAuxContainer* SUSYToolsAlg::m_metcst_nominal_aux
private

Definition at line 123 of file SUSYToolsAlg.h.

◆ m_metcst_syst

xAOD::MissingETContainer* SUSYToolsAlg::m_metcst_syst
private

Definition at line 119 of file SUSYToolsAlg.h.

◆ m_metcst_syst_aux

xAOD::MissingETAuxContainer* SUSYToolsAlg::m_metcst_syst_aux
private

Definition at line 120 of file SUSYToolsAlg.h.

◆ m_mettst_nominal

xAOD::MissingETContainer* SUSYToolsAlg::m_mettst_nominal
private

Definition at line 124 of file SUSYToolsAlg.h.

◆ m_mettst_nominal_aux

xAOD::MissingETAuxContainer* SUSYToolsAlg::m_mettst_nominal_aux
private

Definition at line 125 of file SUSYToolsAlg.h.

◆ m_mettst_syst

xAOD::MissingETContainer* SUSYToolsAlg::m_mettst_syst
private

Definition at line 117 of file SUSYToolsAlg.h.

◆ m_mettst_syst_aux

xAOD::MissingETAuxContainer* SUSYToolsAlg::m_mettst_syst_aux
private

Definition at line 118 of file SUSYToolsAlg.h.

◆ m_msg

MsgStream AthHistogramming::m_msg
privateinherited

Cached Message Stream.

Definition at line 248 of file AthHistogramming.h.

◆ m_name

std::string AthHistogramming::m_name
privateinherited

Instance name.

Definition at line 245 of file AthHistogramming.h.

◆ m_Nevts

unsigned int SUSYToolsAlg::m_Nevts
private

Definition at line 88 of file SUSYToolsAlg.h.

◆ m_obj_count

std::map<std::string,std::map<std::string,int> > SUSYToolsAlg::m_obj_count
private

Definition at line 115 of file SUSYToolsAlg.h.

◆ m_objects

std::vector<std::string> SUSYToolsAlg::m_objects
private

Definition at line 112 of file SUSYToolsAlg.h.

◆ m_outputMetaStore

MetaStore_t EL::AnaAlgorithm::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 555 of file AnaAlgorithm.h.

◆ m_prefix

std::string AthHistogramAlgorithm::m_prefix
privateinherited

Name of the ROOT output stream (file)

Definition at line 88 of file AthHistogramAlgorithm.h.

◆ m_rootDir

std::string AthHistogramAlgorithm::m_rootDir
privateinherited

Name of the ROOT directory.

Definition at line 91 of file AthHistogramAlgorithm.h.

◆ m_slices

std::map<std::string,bool> SUSYToolsAlg::m_slices
private

Definition at line 79 of file SUSYToolsAlg.h.

◆ m_streamName

std::string AthHistogramming::m_streamName
privateinherited

Name of the ROOT output stream (file)

Definition at line 226 of file AthHistogramming.h.

◆ m_SUSYTools

asg::AnaToolHandle<ST::ISUSYObjDef_xAODTool> SUSYToolsAlg::m_SUSYTools
private

Definition at line 84 of file SUSYToolsAlg.h.

◆ m_sysInfoList

std::vector<ST::SystInfo> SUSYToolsAlg::m_sysInfoList
private

Definition at line 100 of file SUSYToolsAlg.h.

◆ m_syst_all

std::map<std::string,std::vector<std::string> > SUSYToolsAlg::m_syst_all
private

Definition at line 101 of file SUSYToolsAlg.h.

◆ m_syst_weights

std::map<std::string,std::vector<std::string> > SUSYToolsAlg::m_syst_weights
private

Definition at line 101 of file SUSYToolsAlg.h.

◆ m_tauTruthMatchingTool

asg::AnaToolHandle<TauAnalysisTools::ITauTruthMatchingTool> SUSYToolsAlg::m_tauTruthMatchingTool
private

Definition at line 86 of file SUSYToolsAlg.h.

◆ m_treeMap

TreeMap_t AthHistogramming::m_treeMap
privateinherited

The map of TTree names to their pointers.

Definition at line 215 of file AthHistogramming.h.

◆ m_triggers

std::map<std::string,std::vector<std::string> > SUSYToolsAlg::m_triggers
private

Definition at line 109 of file SUSYToolsAlg.h.

◆ m_TrkJetCollection

std::string SUSYToolsAlg::m_TrkJetCollection
private

Definition at line 95 of file SUSYToolsAlg.h.

◆ m_TrkJetTimeStamp

std::string SUSYToolsAlg::m_TrkJetTimeStamp
private

Definition at line 96 of file SUSYToolsAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vars

std::vector<std::string> SUSYToolsAlg::m_vars
private

Definition at line 114 of file SUSYToolsAlg.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
AthHistogramming::m_rootDir
std::string m_rootDir
Name of the ROOT directory.
Definition: AthHistogramming.h:229
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ST::ISUSYObjDef_xAODTool::JVT_SF
virtual double JVT_SF(const xAOD::JetContainer *jets)=0
AthHistogramming::histSvc
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
Definition: AthHistogramming.h:421
AthHistogramAlgorithm::histSvc
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
Definition: AthHistogramAlgorithm.h:113
ST::ISUSYObjDef_xAODTool::getSystInfoList
virtual std::vector< ST::SystInfo > getSystInfoList() const =0
SUSYToolsAlg::m_grl
asg::AnaToolHandle< IGoodRunsListSelectionTool > m_grl
Definition: SUSYToolsAlg.h:85
findInReg
std::string findInReg(SG::AuxTypeRegistry &reg, xAOD::IParticle *obj, const std::string &searchkey)
Definition: SUSYToolsAlg.cxx:1561
python.AtlRunQueryAMI.period
period
Definition: AtlRunQueryAMI.py:225
EL::AnaAlgorithm::m_hasBeginInputFile
bool m_hasBeginInputFile
the value of hasBeginInputFile
Definition: AnaAlgorithm.h:590
python.BuildSignatureFlags.bjet
AthConfigFlags bjet(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:338
ST::ISUSYObjDef_xAODTool::GetTrackJets
virtual StatusCode GetTrackJets(xAOD::JetContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &jetkey="", const xAOD::JetContainer *containerToBeCopied=nullptr)=0
AthHistogramming::hist2d
TH2 * hist2d(const std::string &histName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered 2-d histograms.
Definition: AthHistogramming.h:369
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
EL::AnaAlgorithm::endInputFile
virtual ::StatusCode endInputFile()
perform the action for the end of an input file
Definition: AnaAlgorithm.cxx:359
AthHistogramming::myReplace
void myReplace(std::string &str, const std::string &oldStr, const std::string &newStr)
Helper method to replace sub-string.
Definition: AthHistogramming.cxx:590
AthHistogramming::m_msg
MsgStream m_msg
Cached Message Stream.
Definition: AthHistogramming.h:248
asg::AnaToolHandle::isUserConfigured
bool isUserConfigured() const noexcept
whether this tool handle has been configured by the user
AthHistogramming::m_histMap
HistMap_t m_histMap
The map of histogram names to their pointers.
Definition: AthHistogramming.h:201
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
ST::ISUSYObjDef_xAODTool::FJVT_SF
virtual double FJVT_SF(const xAOD::JetContainer *jets)=0
xAOD::MissingETAuxContainer
MissingETAuxContainer_v1 MissingETAuxContainer
Definition: MissingETAuxContainer.h:16
SUSYToolsAlg::stdHistsForObj
void stdHistsForObj(xAOD::IParticle *obj, const std::string &objtype, const std::string &objlevel, std::map< std::string, std::string > config=std::map< std::string, std::string >())
Definition: SUSYToolsAlg.cxx:1470
AddEmptyComponent.histName
string histName
Definition: AddEmptyComponent.py:64
ST::ISUSYObjDef_xAODTool::GetPileupWeight
virtual float GetPileupWeight()=0
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
AthHistogramAlgorithm::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Default constructor: AthHistogramAlgorithm();.
Definition: AthHistogramAlgorithm.h:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:640
AthHistogramming::book
StatusCode book(const TH1 &hist, const std::string &tDir="", const std::string &stream="")
Simplify the booking and registering (into THistSvc) of histograms.
Definition: AthHistogramming.h:303
asg::AnaToolHandle::retrieve
StatusCode retrieve()
initialize the tool
dqt_zlumi_pandas.hname
string hname
Definition: dqt_zlumi_pandas.py:279
SUSYToolsAlg::m_metcst_syst
xAOD::MissingETContainer * m_metcst_syst
Definition: SUSYToolsAlg.h:119
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ST::EventWeight
@ EventWeight
Definition: ISUSYObjDef_xAODTool.h:84
EventStreamInfo::getProcessingTags
const std::set< std::string > & getProcessingTags() const
Definition: EventStreamInfo.cxx:35
EL::AnaAlgorithm::m_inputMetaStore
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.
Definition: AnaAlgorithm.h:551
Data
@ Data
Definition: BaseObject.h:11
SUSYToolsAlg::m_mettst_nominal
xAOD::MissingETContainer * m_mettst_nominal
Definition: SUSYToolsAlg.h:124
EL::AnaAlgorithm::m_outputMetaStore
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.
Definition: AnaAlgorithm.h:555
EL::AnaAlgorithm::inputMetaStore
ConstMetaStorePtr_t inputMetaStore() const
Definition: AnaAlgorithm.cxx:72
ST::ISUSYObjDef_xAODTool::resetSystematics
virtual StatusCode resetSystematics()=0
SUSYToolsAlg::m_FatJetCollection
std::string m_FatJetCollection
Definition: SUSYToolsAlg.h:94
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
asg::AnaToolHandle::setTypeAndName
void setTypeAndName(const std::string &val_typeAndName)
set the value of type and name
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
xAOD::ShallowAuxContainer
Class creating a shallow copy of an existing auxiliary container.
Definition: ShallowAuxContainer.h:54
ST::ISUSYObjDef_xAODTool::ApplyPRWTool
virtual StatusCode ApplyPRWTool(bool muDependentRRN=true)=0
AthHistogramAlgorithm::m_prefix
std::string m_prefix
Name of the ROOT output stream (file)
Definition: AthHistogramAlgorithm.h:88
ST::ISUSYObjDef_xAODTool::GetMET
virtual 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)=0
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
EL::AnaAlgorithm::beginInputFile
virtual ::StatusCode beginInputFile()
perform the action for the beginning of an input file
Definition: AnaAlgorithm.cxx:351
Cut::baseline
@ baseline
Definition: SUSYToolsAlg.cxx:67
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ParticleTest.tp
tp
Definition: ParticleTest.py:25
AthHistogramAlgorithm::m_histNamePrefix
std::string m_histNamePrefix
The prefix for the histogram THx name.
Definition: AthHistogramAlgorithm.h:94
SUSYToolsAlg::m_clock0
TStopwatch m_clock0
Definition: SUSYToolsAlg.h:104
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:67
AthHistogramAlgorithm::m_histTitlePrefix
std::string m_histTitlePrefix
The prefix for the histogram THx title.
Definition: AthHistogramAlgorithm.h:100
ST::ISUSYObjDef_xAODTool::GetMuons
virtual 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)=0
Cut::passOR
@ passOR
Definition: SUSYToolsAlg.cxx:67
xAOD::MissingETContainer
MissingETContainer_v1 MissingETContainer
Definition: Event/xAOD/xAODMissingET/xAODMissingET/MissingETContainer.h:16
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SUSYToolsAlg::m_mettst_nominal_aux
xAOD::MissingETAuxContainer * m_mettst_nominal_aux
Definition: SUSYToolsAlg.h:125
ST::ISUSYObjDef_xAODTool::GetTaus
virtual StatusCode GetTaus(xAOD::TauJetContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &taukey="TauJets", const xAOD::TauJetContainer *containerToBeCopied=nullptr)=0
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
asg::AnaToolHandle::setProperty
StatusCode setProperty(const std::string &property, const T2 &value)
set the given property of the tool.
SUSYToolsAlg::m_sysInfoList
std::vector< ST::SystInfo > m_sysInfoList
Definition: SUSYToolsAlg.h:100
x
#define x
AthHistogramming::m_histNamePostfix
std::string m_histNamePostfix
The postfix for the histogram THx name.
Definition: AthHistogramming.h:235
EL::AnaAlgorithm::fileExecute
virtual ::StatusCode fileExecute()
perform the action exactly once for each file in the dataset
Definition: AnaAlgorithm.cxx:343
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
H5Utils::getTree
std::string getTree(const std::string &file_name)
Definition: getTree.cxx:36
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
asg::AnaToolHandle::declarePropertyFor
void declarePropertyFor(T2 *tool, const std::string &name, const std::string &description="")
declare as property on the given tool
SUSYToolsAlg::groupSysts
void groupSysts(void)
Definition: SUSYToolsAlg.cxx:1444
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
SUSYToolsAlg::m_mcCampaign
std::string m_mcCampaign
Definition: SUSYToolsAlg.h:78
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
ExpressionParsing::isAvailable
bool isAvailable(const T_Aux &cont, SG::auxid_t auxid)
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:61
ANA_CHECK_THROW
#define ANA_CHECK_THROW(EXP)
check whether the given expression was successful, throwing an exception on failure
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:339
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
SUSYToolsAlg::m_doSyst
bool m_doSyst
Definition: SUSYToolsAlg.h:99
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
ST::ISUSYObjDef_xAODTool::isData
virtual bool isData() const =0
ST::ISUSYObjDef_xAODTool::GetJetsSyst
virtual StatusCode GetJetsSyst(const xAOD::JetContainer &calibjets, xAOD::JetContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &jetkey="")=0
ST::ISUSYObjDef_xAODTool::GetSignalPhotonSF
virtual double GetSignalPhotonSF(const xAOD::Photon &ph, const bool effSF=true, const bool isoSF=true, const bool triggerSF=false) const =0
beamspotnt.labels
list labels
Definition: bin/beamspotnt.py:1447
SUSYToolsAlg::m_slices
std::map< std::string, bool > m_slices
Definition: SUSYToolsAlg.h:79
getSize
int getSize(std::map< std::string, std::vector< std::string >> &collection, const std::string &object)
Definition: SUSYToolsAlg.cxx:1575
met
Definition: IMETSignificance.h:24
SUSYToolsAlg::m_mettst_syst_aux
xAOD::MissingETAuxContainer * m_mettst_syst_aux
Definition: SUSYToolsAlg.h:118
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
SUSYToolsAlg::m_metcst_syst_aux
xAOD::MissingETAuxContainer * m_metcst_syst_aux
Definition: SUSYToolsAlg.h:120
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
ST::ISUSYObjDef_xAODTool::BtagSF
virtual float BtagSF(const xAOD::JetContainer *jets)=0
SUSYToolsAlg::m_syst_all
std::map< std::string, std::vector< std::string > > m_syst_all
Definition: SUSYToolsAlg.h:101
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
ST::ISUSYObjDef_xAODTool::GetSignalTauSF
virtual double GetSignalTauSF(const xAOD::TauJet &tau, const bool idSF=true, const bool triggerSF=true, const std::string &trigExpr="tau25_medium1_tracktwo")=0
ST::ISUSYObjDef_xAODTool::GetJets
virtual StatusCode GetJets(xAOD::JetContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &jetkey="", const xAOD::JetContainer *containerToBeCopied=nullptr)=0
SUSYToolsAlg::m_vars
std::vector< std::string > m_vars
Definition: SUSYToolsAlg.h:114
lumiFormat.i
int i
Definition: lumiFormat.py:85
ST::ISUSYObjDef_xAODTool::GetSignalMuonSF
virtual float GetSignalMuonSF(const xAOD::Muon &mu, const bool recoSF=true, const bool isoSF=true, const bool doBadMuonHP=true, const bool warnOVR=true)=0
SUSYToolsAlg::m_metcst_nominal
xAOD::MissingETContainer * m_metcst_nominal
Definition: SUSYToolsAlg.h:122
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Cut::NSel
const unsigned int NSel
Definition: SUSYToolsAlg.cxx:66
SUSYToolsAlg::m_syst_weights
std::map< std::string, std::vector< std::string > > m_syst_weights
Definition: SUSYToolsAlg.h:101
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
SUSYToolsAlg::m_kernel
std::string m_kernel
Definition: SUSYToolsAlg.h:92
egEnergyCorr::Resolution::Nominal
@ Nominal
Definition: egammaEnergyCorrectionTool.h:62
SUSYToolsAlg::m_tauTruthMatchingTool
asg::AnaToolHandle< TauAnalysisTools::ITauTruthMatchingTool > m_tauTruthMatchingTool
Definition: SUSYToolsAlg.h:86
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
ST::ISUSYObjDef_xAODTool::OverlapRemoval
virtual 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)=0
dumpFileToPlots.treeName
string treeName
Definition: dumpFileToPlots.py:20
SUSYToolsAlg::m_Nevts
unsigned int m_Nevts
Definition: SUSYToolsAlg.h:88
SUSYToolsAlg::m_configFile
std::string m_configFile
Definition: SUSYToolsAlg.h:93
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::MissingETAuxContainer_v1
Auxiliary data store for xAOD::MissingETContainer.
Definition: MissingETAuxContainer_v1.h:20
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
SUSYToolsAlg::m_objects
std::vector< std::string > m_objects
Definition: SUSYToolsAlg.h:112
xAOD::CutBookkeeperContainer_v1
Container that holds the Container of all CutBookkeepers.
Definition: CutBookkeeperContainer_v1.h:27
EL::AnaAlgorithm::m_hasFileExecute
bool m_hasFileExecute
the value of hasFileExecute
Definition: AnaAlgorithm.h:586
ST::SystInfo::affectsType
unsigned int affectsType
Definition: ISUSYObjDef_xAODTool.h:67
AthHistogramming::m_graphMap
GraphMap_t m_graphMap
The map of TGraph names to their pointers.
Definition: AthHistogramming.h:222
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SUSYToolsAlg::m_obj_count
std::map< std::string, std::map< std::string, int > > m_obj_count
Definition: SUSYToolsAlg.h:115
AthHistogramming::m_streamName
std::string m_streamName
Name of the ROOT output stream (file)
Definition: AthHistogramming.h:226
SUSYToolsAlg::m_SUSYTools
asg::AnaToolHandle< ST::ISUSYObjDef_xAODTool > m_SUSYTools
Definition: SUSYToolsAlg.h:84
AthHistogramming::configAthHistogramming
StatusCode configAthHistogramming(const ServiceHandle< ITHistSvc > &histSvc, const std::string &prefix, const std::string &rootDir, const std::string &histNamePrefix, const std::string &histNamePostfix, const std::string &histTitlePrefix, const std::string &histTitlePostfix)
To be called by the derived classes to fill the internal configuration.
Definition: AthHistogramming.cxx:66
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthHistogramming::hash_t
uint32_t hash_t
typedef for the internal hash
Definition: AthHistogramming.h:169
CxxUtils::crc64
uint64_t crc64(const CRCTable &table, const char *data, size_t data_len)
Find the CRC-64 of a string,.
Definition: crc64.cxx:696
AthHistogramming::m_histTitlePostfix
std::string m_histTitlePostfix
The postfix for the histogram THx title.
Definition: AthHistogramming.h:241
beamspotman.dir
string dir
Definition: beamspotman.py:623
ST::ISUSYObjDef_xAODTool::getProperty
const T * getProperty(const std::string &name)
Definition: ISUSYObjDef_xAODTool.h:224
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CaloCondBlobAlgs_fillNoiseFromASCII.comment
string comment
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:27
SUSYToolsAlg::bookHistograms
StatusCode bookHistograms(void)
Definition: SUSYToolsAlg.cxx:1320
ST::SystInfo::affectsKinematics
bool affectsKinematics
Definition: ISUSYObjDef_xAODTool.h:65
SUSYToolsAlg::m_mettst_syst
xAOD::MissingETContainer * m_mettst_syst
Definition: SUSYToolsAlg.h:117
xAOD::MissingETContainer_v1
Container for xAOD::MissingET_v1 objects.
Definition: MissingETContainer_v1.h:21
SUSYToolsAlg::m_GRLFiles
std::vector< std::string > m_GRLFiles
Definition: SUSYToolsAlg.h:77
SUSYToolsAlg::m_maxEvts
int m_maxEvts
Definition: SUSYToolsAlg.h:89
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ST::SystInfo
Definition: ISUSYObjDef_xAODTool.h:63
AthHistogramming::hash
hash_t hash(const std::string &histName) const
Method to calculate a 32-bit hash from a string.
Definition: AthHistogramming.h:428
ST::ISUSYObjDef_xAODTool::GetSignalElecSF
virtual float GetSignalElecSF(const xAOD::Electron &el, 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)=0
module_driven_slicing.getHist
def getHist(name, makehist)
Definition: module_driven_slicing.py:121
ST::ISUSYObjDef_xAODTool::IsBJet
virtual bool IsBJet(const xAOD::Jet &input) const =0
SUSYToolsAlg::m_triggers
std::map< std::string, std::vector< std::string > > m_triggers
Definition: SUSYToolsAlg.h:109
Cut::trigmatch
@ trigmatch
Definition: SUSYToolsAlg.cxx:67
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
SUSYToolsAlg::m_isPHYSLITE
bool m_isPHYSLITE
Definition: SUSYToolsAlg.h:91
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
TauAnalysisTools::ITauTruthMatchingTool::getTruth
virtual const xAOD::TruthParticle * getTruth(const xAOD::TauJet &xTau)=0
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
Muon
struct TBPatternUnitContext Muon
xxh3::hash64
std::uint64_t hash64(const void *data, std::size_t size)
Passthrough to XXH3_64bits.
Definition: XXH.cxx:9
FlavorTagDiscriminants::hbb_key::fatjet
const std::string fatjet
Definition: HbbConstants.h:19
ST::ISUSYObjDef_xAODTool::IsTrigMatched
virtual bool IsTrigMatched(const xAOD::IParticle *part, const std::string &tr_item)=0
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
ST::ISUSYObjDef_xAODTool::GetPrimVtx
virtual const xAOD::Vertex * GetPrimVtx() const =0
SUSYToolsAlg::m_configDict
std::map< std::string, std::string > m_configDict
Definition: SUSYToolsAlg.h:82
a
TList * a
Definition: liststreamerinfos.cxx:10
AthHistogramming::m_effMap
EffMap_t m_effMap
The map of histogram names to their pointers.
Definition: AthHistogramming.h:208
h
SUSYToolsAlg::m_TrkJetCollection
std::string m_TrkJetCollection
Definition: SUSYToolsAlg.h:95
AthHistogramming::m_histTitlePrefix
std::string m_histTitlePrefix
The prefix for the histogram THx title.
Definition: AthHistogramming.h:238
EventStreamInfo
This class provides the summary information stored for data written as a Event Stream.
Definition: EventStreamInfo.h:28
SUSYToolsAlg::m_clock2
TStopwatch m_clock2
Definition: SUSYToolsAlg.h:106
SUSYToolsAlg::m_metcst_nominal_aux
xAOD::MissingETAuxContainer * m_metcst_nominal_aux
Definition: SUSYToolsAlg.h:123
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthHistogramAlgorithm::m_histNamePostfix
std::string m_histNamePostfix
The postfix for the histogram THx name.
Definition: AthHistogramAlgorithm.h:97
ST::ISUSYObjDef_xAODTool::GetMETSig
virtual StatusCode GetMETSig(xAOD::MissingETContainer &met, double &metSignificance, bool doTST=true, bool doJVTCut=true)=0
AthHistogramming::m_treeMap
TreeMap_t m_treeMap
The map of TTree names to their pointers.
Definition: AthHistogramming.h:215
SUSYToolsAlg::m_levels
std::vector< std::string > m_levels
Definition: SUSYToolsAlg.h:113
ST::ISUSYObjDef_xAODTool::GetElectrons
virtual 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)=0
AthHistogramming::m_histNamePrefix
std::string m_histNamePrefix
The prefix for the histogram THx name.
Definition: AthHistogramming.h:232
EL::AnaAlgorithm::m_hasEndInputFile
bool m_hasEndInputFile
the value of hasEndInputFile
Definition: AnaAlgorithm.h:594
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
SUSYToolsAlg::m_lbfilter
int m_lbfilter
Definition: SUSYToolsAlg.h:90
SUSYToolsAlg::m_hists
std::map< std::string, TH1 * > m_hists
Definition: SUSYToolsAlg.h:80
AthHistogramAlgorithm::m_histTitlePostfix
std::string m_histTitlePostfix
The postfix for the histogram THx title.
Definition: AthHistogramAlgorithm.h:103
xAODType::Tau
@ Tau
The object is a tau (jet)
Definition: ObjectType.h:49
AthHistogramming::hist
TH1 * hist(const std::string &histName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered histograms of any type.
Definition: AthHistogramming.cxx:198
ST::SystInfo::affectsWeights
bool affectsWeights
Definition: ISUSYObjDef_xAODTool.h:66
AthHistogramming::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Pointer to the THistSvc (event store by default)
Definition: AthHistogramming.h:194
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
ST::Unknown
@ Unknown
Definition: ISUSYObjDef_xAODTool.h:73
ST::ISUSYObjDef_xAODTool::ApplyLRTUncertainty
virtual StatusCode ApplyLRTUncertainty()=0
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
ST::ISUSYObjDef_xAODTool::GetFatJets
virtual 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)=0
xAODType::BTag
@ BTag
The object is a b-tagging object.
Definition: ObjectType.h:60
AthHistogramming::m_name
std::string m_name
Instance name.
Definition: AthHistogramming.h:245
python.PyAthena.obj
obj
Definition: PyAthena.py:132
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
AthHistogramAlgorithm::m_rootDir
std::string m_rootDir
Name of the ROOT directory.
Definition: AthHistogramAlgorithm.h:91
SUSYToolsAlg::m_clock1
TStopwatch m_clock1
Definition: SUSYToolsAlg.h:105
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
SUSYToolsAlg::m_heffs
std::map< std::string, TEfficiency * > m_heffs
Definition: SUSYToolsAlg.h:81
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
ST::ISUSYObjDef_xAODTool::applySystematicVariation
virtual StatusCode applySystematicVariation(const CP::SystematicSet &systConfig)=0
fitman.k
k
Definition: fitman.py:528
AthHistogramming::buildBookingString
void buildBookingString(std::string &bookingString, std::string &histName, std::string &tDir, std::string &stream, bool usePrefixPostfix=false)
Method to build individual booking string.
Definition: AthHistogramming.cxx:560
ST::ISUSYObjDef_xAODTool::GetPhotons
virtual StatusCode GetPhotons(xAOD::PhotonContainer *&copy, xAOD::ShallowAuxContainer *&copyaux, const bool recordSG=true, const std::string &photonkey="Photons", const xAOD::PhotonContainer *containerToBeCopied=nullptr)=0
ServiceHandle< IIncidentSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
AthHistogramming::bookGetPointer
TH1 * bookGetPointer(const TH1 &hist, const std::string &tDir="", const std::string &stream="")
Simplify the booking and registering (into THistSvc) of histograms.
Definition: AthHistogramming.h:260