ATLAS Offline Software
METTruthTool.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // METTruthTool.h
8 // Header file for class METTruthTool
9 //
10 // This is a scheduler for the MET Reconstruction, and sets up
11 // the sequence in which the individual terms are constructed.
12 //
13 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
14 //
15 // Author: P Loch, S Resconi, TJ Khoo, AS Mete
17 #ifndef METRECONSTRUCTION_METTRUTHTOOL_H
18 #define METRECONSTRUCTION_METTRUTHTOOL_H 1
19 
20 // STL includes
21 #include <string>
22 
23 // METReconstruction includes
25 
27 
28 // Truth EDM
30 
31 namespace met{
32 
34  : public METBuilderTool
35  {
36  // This macro defines the constructor with the interface declaration
38 
39 
40 
41  // Public methods:
43  public:
44 
45  // Constructor with name (does this have to be a non-const
46  // std::string and not a const reference?)
47  METTruthTool(const std::string& name);
48  ~METTruthTool() = default;
49 
50  // AsgTool Hooks
51  virtual StatusCode initialize() override;
52 
53 
55  // Private data:
57  protected:
58  virtual
59  StatusCode executeTool(xAOD::MissingET* metTerm, xAOD::MissingETComponentMap* metMap) const override;
60  // Accept functions
61  virtual
62  bool accept (const xAOD::IParticle* object) const override;
63  bool accept_nonint (const xAOD::TruthParticle* truth) const;
64  bool accept_int (const xAOD::TruthParticle* truth) const;
65  bool accept_intout (const xAOD::TruthParticle* truth) const;
66  bool accept_intmuons (const xAOD::TruthParticle* truth) const;
67  // Overlap resolver function
68  virtual
71  std::vector<const xAOD::IParticle*>&,
72  MissingETBase::Types::weight_t&) const override { return true;};
73 
74  private:
75  // Default constructor:
77 
78  Gaudi::Property<std::string> m_inputType{this, "InputComposition", "NonInt", "truth type"}; // NonInt, Int, IntMuons, IntOut
80 
81  Gaudi::Property<double> m_det_maxEta{this, "MaxEtaDet", 5., "nominal max detector eta"};
82  Gaudi::Property<double> m_truthmu_minPt{this, "MinPtMu", 6e3, "nominal min muon pt"};
83  Gaudi::Property<double> m_truthmu_maxEta{this, "MaxEtaMu", 2.7, "nominal max MS eta"};
84  SG::ReadHandleKey<xAOD::TruthEventContainer> m_truthEventKey{this, "InputCollection", "TruthEvents", "truth events input collection"};
85 
86  // TEMPORARILY recopy some helper from TruthHelper and GeneratorUtils packages
87  // *** via JetSimTools ***
88  // We'll have to use this package when they work properly with xAOD.
89  };
90 
91 }
92 
93 #endif //> !METRECONSTRUCTION_METTRUTHTOOL_H
xAOD::MissingETComponentMap_v1
Definition: MissingETComponentMap_v1.h:25
met::METTruthTool
Definition: METTruthTool.h:35
met::METTruthTool::m_inputType
Gaudi::Property< std::string > m_inputType
Definition: METTruthTool.h:78
TruthParticleFwd.h
met::METBuilderTool
Definition: METBuilderTool.h:39
met::METTruthTool::METTruthTool
METTruthTool()
METBuilderTool.h
met::METTruthTool::accept_intout
bool accept_intout(const xAOD::TruthParticle *truth) const
Definition: METTruthTool.cxx:142
met::METTruthTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: METTruthTool.cxx:64
met::METTruthTool::m_truthmu_minPt
Gaudi::Property< double > m_truthmu_minPt
Definition: METTruthTool.h:82
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
met::METTruthTool::accept_int
bool accept_int(const xAOD::TruthParticle *truth) const
Definition: METTruthTool.cxx:127
IMETToolBase
Definition: IMETToolBase.h:25
met::METTruthTool::m_truthEventKey
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventKey
Definition: METTruthTool.h:84
met
Definition: IMETSignificance.h:24
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
met::METTruthTool::m_truthmu_maxEta
Gaudi::Property< double > m_truthmu_maxEta
Definition: METTruthTool.h:83
met::METTruthTool::m_truth_type
MissingETBase::Source::TruthType m_truth_type
Definition: METTruthTool.h:79
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
met::METTruthTool::executeTool
virtual StatusCode executeTool(xAOD::MissingET *metTerm, xAOD::MissingETComponentMap *metMap) const override
Definition: METTruthTool.cxx:173
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
met::METTruthTool::m_det_maxEta
Gaudi::Property< double > m_det_maxEta
Definition: METTruthTool.h:81
MissingETBase::Source::TruthType
TruthType
Truth type indicators.
Definition: MissingETBase.h:203
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
met::METTruthTool::resolveOverlap
virtual bool resolveOverlap(const xAOD::IParticle *, xAOD::MissingETComponentMap *, std::vector< const xAOD::IParticle * > &, MissingETBase::Types::weight_t &) const override
Definition: METTruthTool.h:69
met::METTruthTool::accept_intmuons
bool accept_intmuons(const xAOD::TruthParticle *truth) const
Definition: METTruthTool.cxx:160
xAOD::MissingETComponent_v1::Weight
Kinematic weight descriptor.
Definition: MissingETComponent_v1.h:28
met::METTruthTool::~METTruthTool
~METTruthTool()=default
met::METTruthTool::accept
virtual bool accept(const xAOD::IParticle *object) const override
Definition: METTruthTool.cxx:91
met::METTruthTool::accept_nonint
bool accept_nonint(const xAOD::TruthParticle *truth) const
Definition: METTruthTool.cxx:120
TruthEventContainer.h