ATLAS Offline Software
JetForwardJvtTool.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 // JetForwardJvtTool.h
8 // Header file for class JetForwardJvtTool
9 // Author: Matt Klein<matthew.henry.klein@cern.ch>
11 #ifndef FORWARDJVTTOOL_JVT_FORWARDJVTTOOL_H
12 #define FORWARDJVTTOOL_JVT_FORWARDJVTTOOL_H 1
13 
14 // STL includes
15 #include <string>
16 
17 
18 // FrameWork includes
19 #include "AsgTools/ToolHandle.h"
20 #include "AsgTools/AsgTool.h"
24 
25 // EDM includes
26 #include "xAODJet/JetContainer.h"
31 #include "AsgTools/IAsgTool.h"
32 
33 //ASG_TOOL_INTERFACE(IJetUpdateJvt)
34 
36  : public asg::AsgTool,
37  virtual public IJetDecorator{
39 
40  // This macro defines the constructor with the interface declaration
41  //ASG_TOOL_CLASS(JetForwardJvtTool, IJetForwardJvtTool)
42 
43 
44  // Public methods:
46  public:
47 
48  // Copy constructor:
49 
51  JetForwardJvtTool(const std::string& name);
52 
54  virtual ~JetForwardJvtTool();
55 
56  // Athena algtool's Hooks
57  virtual StatusCode initialize() override;
58 
59  virtual StatusCode decorate(const xAOD::JetContainer& jetCont) const override;
60 
61  float getFJVT(const xAOD::Jet *jet, const std::vector<TVector2>& pileupMomenta, std::size_t pvind) const;
62  bool forwardJet(const xAOD::Jet *jet) const;
63  bool centralJet(const xAOD::Jet *jet) const;
64  float getDrpt(const xAOD::Jet *jet) const;
65  int getJetVertex(const xAOD::Jet *jet) const;
66 
68  std::vector<TVector2> calculateVertexMomenta(const xAOD::JetContainer *jets, std::size_t pvind) const;
69  float getCombinedWidth(const xAOD::Jet *jet) const;
70 
71  private:
72 
73  Gaudi::Property<double> m_etaThresh{this, "EtaThresh", 2.5, "Eta threshold"};
74  Gaudi::Property<double> m_forwardMinPt{this, "ForwardMinPt", 20e3, "Forward minimum Pt"};
75  Gaudi::Property<double> m_forwardMaxPt{this, "ForwardMaxPt", 50e3, "Forward maximum Pt"};
76  Gaudi::Property<double> m_centerMinPt{this, "CentralMinPt", 20e3, "Central minimum Pt"};
77  Gaudi::Property<double> m_centerMaxPt{this, "CentralMaxPt", -1, "Central maximum Pt"};
78  Gaudi::Property<double> m_centerJvtThresh{this, "CentralJvtThresh", 0.14, "Central JVT threshold"};
79  Gaudi::Property<double> m_centerDrptThresh{this, "CentralDrptThresh", 0.2, "Central drpt threshold"};
80  Gaudi::Property<double> m_maxStochPt{this, "CentralMaxStochPt", 35e3, "Central maximum StochPt"};
81  Gaudi::Property<double> m_jetScaleFactor{this, "JetScaleFactor", 0.4, "Jet scale factor"};
82  Gaudi::Property<double> m_fjvtThresh{this, "FjvtThresh", 15e3, "FJVT threshold"}; //15GeV->92%,11GeV->85%
83  Gaudi::Property<bool> m_tightOP{this, "UseTightOP", false, "Use tight (true) or loose (false)"};
84  Gaudi::Property<bool> m_recalculateFjvt{this, "RecalculateFjvt", true, "Recalculate Fjvt or use stored value"};
85  std::size_t getPV() const;
86 
89 
90  Gaudi::Property<bool> m_renounceOutputs{this, "RenounceOutputs", false, "If true, then we're not interested in output dependencies. In that case, JetContainer is irrelevant."};
91  Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", "SG key for the input jet container"};
92  SG::ReadDecorHandleKey<xAOD::JetContainer> m_orKey{this, "OverlapDec", "", "Overlap decoration key"};
93  SG::WriteDecorHandleKey<xAOD::JetContainer> m_outKey{this, "OutputDec", "passFJVT", "Output decoration key"};
94  SG::WriteDecorHandleKey<xAOD::JetContainer> m_isHSKey{this, "IsJvtHSName", "isJvtHS", "Decoration key for isJvtHS"};
95  SG::WriteDecorHandleKey<xAOD::JetContainer> m_isPUKey{this, "IsJvtPUName", "isJvtPU", "Decoration key for isJvtPU"};
96  SG::WriteDecorHandleKey<xAOD::JetContainer> m_fjvtDecKey{this, "FJVTName", "fJvt", "Decoration key for fJvt"};
97 
98  SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainerName{this, "VertexContainerName", "PrimaryVertices", "SG key for vertex container"};
99  SG::ReadHandleKey<xAOD::MissingETContainer> m_trkMETName{this, "Met_TrackName", "MET_Track", "SG key for MET track container"};
100 
101  SG::ReadDecorHandleKey<xAOD::JetContainer> m_widthKey{this, "WidthName", "Width", "SG key for jet width"};
102  SG::ReadDecorHandleKey<xAOD::JetContainer> m_jvtMomentKey{this, "JvtMomentName", "Jvt", "JVT moment name"};
103  SG::ReadDecorHandleKey<xAOD::JetContainer> m_sumPtsKey{this, "SumPtsName", "SumPtTrkPt500", "SG key for SumPt vector"};
104 
105  };
106 #endif //> !FORWARDJVTTOOL_JVT_FORWARDJVTTOOL_H
JetForwardJvtTool::m_etaThresh
Gaudi::Property< double > m_etaThresh
Definition: JetForwardJvtTool.h:73
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
JetForwardJvtTool::tagTruth
StatusCode tagTruth(const xAOD::JetContainer *jets, const xAOD::JetContainer *truthJets)
Definition: JetForwardJvtTool.cxx:247
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
JetForwardJvtTool::JetForwardJvtTool
JetForwardJvtTool()
Default constructor:
JetForwardJvtTool::m_centerMinPt
Gaudi::Property< double > m_centerMinPt
Definition: JetForwardJvtTool.h:76
JetForwardJvtTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetForwardJvtTool.cxx:38
JetForwardJvtTool::getPV
std::size_t getPV() const
Definition: JetForwardJvtTool.cxx:225
JetForwardJvtTool::centralJet
bool centralJet(const xAOD::Jet *jet) const
Definition: JetForwardJvtTool.cxx:182
JetForwardJvtTool::m_forwardMaxPt
Gaudi::Property< double > m_forwardMaxPt
Definition: JetForwardJvtTool.h:75
IJetDecorator
Interface for adding a decoration to a jet container.
Definition: IJetDecorator.h:21
JetForwardJvtTool::m_tightOP
Gaudi::Property< bool > m_tightOP
Definition: JetForwardJvtTool.h:83
JetForwardJvtTool::getCombinedWidth
float getCombinedWidth(const xAOD::Jet *jet) const
Definition: JetForwardJvtTool.cxx:158
JetForwardJvtTool::calculateVertexMomenta
std::vector< TVector2 > calculateVertexMomenta(const xAOD::JetContainer *jets, std::size_t pvind) const
Definition: JetForwardJvtTool.cxx:127
JetForwardJvtTool::getDrpt
float getDrpt(const xAOD::Jet *jet) const
Definition: JetForwardJvtTool.cxx:212
JetForwardJvtTool::m_outKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_outKey
Definition: JetForwardJvtTool.h:93
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
JetForwardJvtTool::m_centerJvtThresh
Gaudi::Property< double > m_centerJvtThresh
Definition: JetForwardJvtTool.h:78
JetForwardJvtTool::getFJVT
float getFJVT(const xAOD::Jet *jet, const std::vector< TVector2 > &pileupMomenta, std::size_t pvind) const
Definition: JetForwardJvtTool.cxx:110
IJetDecorator.h
JetForwardJvtTool::m_centerDrptThresh
Gaudi::Property< double > m_centerDrptThresh
Definition: JetForwardJvtTool.h:79
JetForwardJvtTool::m_maxStochPt
Gaudi::Property< double > m_maxStochPt
Definition: JetForwardJvtTool.h:80
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
CaloCluster.h
JetForwardJvtTool::m_sumPtsKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_sumPtsKey
Definition: JetForwardJvtTool.h:103
JetForwardJvtTool::m_trkMETName
SG::ReadHandleKey< xAOD::MissingETContainer > m_trkMETName
Definition: JetForwardJvtTool.h:99
JetForwardJvtTool::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition: JetForwardJvtTool.h:91
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JetForwardJvtTool::m_jetScaleFactor
Gaudi::Property< double > m_jetScaleFactor
Definition: JetForwardJvtTool.h:81
JetForwardJvtTool::m_forwardMinPt
Gaudi::Property< double > m_forwardMinPt
Definition: JetForwardJvtTool.h:74
JetForwardJvtTool::m_centerMaxPt
Gaudi::Property< double > m_centerMaxPt
Definition: JetForwardJvtTool.h:77
IAsgTool.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
JetForwardJvtTool::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jetCont) const override
Decorate a jet collection without otherwise modifying it.
Definition: JetForwardJvtTool.cxx:90
WriteDecorHandleKey.h
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JetForwardJvtTool
Definition: JetForwardJvtTool.h:37
VertexContainer.h
JetForwardJvtTool::getJetVertex
int getJetVertex(const xAOD::Jet *jet) const
Definition: JetForwardJvtTool.cxx:197
JetForwardJvtTool::m_fjvtDecKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_fjvtDecKey
Definition: JetForwardJvtTool.h:96
JetContainer.h
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
JetForwardJvtTool::m_jvtMomentKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_jvtMomentKey
Definition: JetForwardJvtTool.h:102
JetForwardJvtTool::forwardJet
bool forwardJet(const xAOD::Jet *jet) const
Definition: JetForwardJvtTool.cxx:176
JetForwardJvtTool::m_fjvtThresh
Gaudi::Property< double > m_fjvtThresh
Definition: JetForwardJvtTool.h:82
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
JetForwardJvtTool::m_isPUKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_isPUKey
Definition: JetForwardJvtTool.h:95
ToolHandle.h
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
AsgTool.h
JetForwardJvtTool::m_renounceOutputs
Gaudi::Property< bool > m_renounceOutputs
Definition: JetForwardJvtTool.h:90
JetForwardJvtTool::m_orKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_orKey
Definition: JetForwardJvtTool.h:92
JetForwardJvtTool::m_recalculateFjvt
Gaudi::Property< bool > m_recalculateFjvt
Definition: JetForwardJvtTool.h:84
MissingETContainer.h
JetForwardJvtTool::m_widthKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_widthKey
Definition: JetForwardJvtTool.h:101
JetForwardJvtTool::m_isHSKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_isHSKey
Definition: JetForwardJvtTool.h:94
JetForwardJvtTool::m_vertexContainerName
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerName
Definition: JetForwardJvtTool.h:98
JetForwardJvtTool::~JetForwardJvtTool
virtual ~JetForwardJvtTool()
Destructor: