ATLAS Offline Software
HiggsTruthCategoryTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /*
6  * Dual-use tool interface for Rivet routine for classifying MC events according to the Higgs template cross section categories
7  * Authors: Jim Lacey (Carleton University)
8  * <james.lacey@cern.ch,jlacey@physics.carleton.ca>
9  */
10 
11 #ifndef TRUTHRIVETTOOLS_HIGGSTRUTHCATEGORYTOOL_H
12 #define TRUTHRIVETTOOLS_HIGGSTRUTHCATEGORYTOOL_H 1
13 
15 #include "Rivet/AnalysisHandler.hh"
17 
18 // To avoid coflict of UNUSED macro of
19 // Control/CxxUtils/CxxUtils/unused.h and Rivet/Tools/Utils.hh
20 #ifdef UNUSED
21 #undef UNUSED
22 #endif // UNUSED
23 
24 // Base classes
25 #include "AsgTools/AsgTool.h"
27 
28 // Return type (non-pointer)
29 // Note: the Template XSec Defs *depends* on having included
30 // the TLorentzVector header *before* it is included -- it
31 // uses the include guard from TLorentzVector to decide
32 // what is available
33 #include "TLorentzVector.h"
35 
36 #include "AtlasHepMC/GenEvent.h"
37 
38 // System include(s).
39 #include <memory>
40 
42 : public asg::AsgTool,
43  public virtual IHiggsTruthCategoryTool
44 {
45  public:
47  HiggsTruthCategoryTool( const std::string& name );
48 
49  public:
50  std::unique_ptr<Rivet::AnalysisHandler> m_rivetAnaHandler;
52  virtual StatusCode initialize() override;
53  StatusCode finalize () override;
54  HTXS::HiggsClassification* getHiggsTruthCategoryObject(const HepMC::GenEvent& HepMCEvent, const HTXS::HiggsProdMode prodMode) const override;
55  private:
56  mutable std::atomic_flag m_isInitialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT;
58 };
59 
60 #endif //> !HIGGSTRUTHCLASSIFIER_HIGGSTRUTHCATEGORYTOOL_H
HiggsTruthCategoryTool::m_higgsTemplateCrossSections
Rivet::HiggsTemplateCrossSections * m_higgsTemplateCrossSections
Definition: HiggsTruthCategoryTool.h:51
HiggsTruthCategoryTool::m_outHistos
bool m_outHistos
Definition: HiggsTruthCategoryTool.h:57
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
GenEvent.h
HiggsTemplateCrossSectionsDefs.h
Rivet::HiggsTemplateCrossSections
Rivet routine for classifying MC events according to the Higgs template cross section categories.
Definition: HiggsTemplateCrossSections.h:33
HiggsTemplateCrossSections.h
IHiggsTruthCategoryTool
Definition: IHiggsTruthCategoryTool.h:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HiggsTruthCategoryTool
Definition: HiggsTruthCategoryTool.h:44
HiggsTruthCategoryTool::HiggsTruthCategoryTool
HiggsTruthCategoryTool(const std::string &name)
Definition: HiggsTruthCategoryTool.cxx:10
HiggsTruthCategoryTool::m_rivetAnaHandler
std::unique_ptr< Rivet::AnalysisHandler > m_rivetAnaHandler
Definition: HiggsTruthCategoryTool.h:50
HTXS::HiggsProdMode
HiggsProdMode
Higgs production modes, corresponding to input sample.
Definition: HiggsTemplateCrossSectionsDefs.h:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
HiggsTruthCategoryTool::getHiggsTruthCategoryObject
HTXS::HiggsClassification * getHiggsTruthCategoryObject(const HepMC::GenEvent &HepMCEvent, const HTXS::HiggsProdMode prodMode) const override
Definition: HiggsTruthCategoryTool.cxx:48
HiggsTruthCategoryTool::ATLAS_THREAD_SAFE
std::atomic_flag m_isInitialized ATLAS_THREAD_SAFE
Definition: HiggsTruthCategoryTool.h:56
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
HiggsTruthCategoryTool::finalize
StatusCode finalize() override
Definition: HiggsTruthCategoryTool.cxx:31
IHiggsTruthCategoryTool.h
AsgTool.h
checker_macros.h
Define macros for attributes used to control the static checker.
HiggsTruthCategoryTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: HiggsTruthCategoryTool.cxx:20