ATLAS Offline Software
JetBalancePFlowJvtTool.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // JetBalancePFlowJvtTool.h
8 // Header file for class JetBalancePFlowJvtTool
9 // Author: Eimear Conroy <eimear.isobel.conroy@cern.ch>
10 // Inherits from JetForwardPFlowJvtTool - Author: Anastasia Kotsokechagia <anastasia.kotsokechagia@cern.ch>
11 
12 // Tool for calculating bjvt values for pflow jets.
13 // Short describtion of the tool;
14 // First central PU jets are built per vertex.
15 // Reconstructed calibrated jets are then used to calculate the per vertex missing momentum (miss-mom).
16 // The per vertex missing momentum is defined as: The vector some of the calibrated jet momenta (for jets with pt>20GeV && Rpt>0.1 wrt to the vertex) + tracks assosiated to the vertex (otherwise).
17 // PU Jets closeby (dR<0.3) to a HS jet are not considered.
18 // The bJVT value for every central jet (cj) of the event is then calculated choosing the vertex with the largest negative miss-mom projection on the cj.
19 // User action: After initializing the tool the user has to call the modify(xAOD::JetContainer& jetCont) function. Argument in this fuction is the PFlow jet container of the event.
20 // The bjvt value for every central jet of the container is then calculated and can be retrieved.
22 
23  //Parameters inherited from JetForwardPFlowJvtTool
24  // m_orLabel: "" (redundant here)
25  // m_jetsName : "Container name for the output reconstructed PU jets "
26  // m_tightOP: "If true a tight fjvt threshold value is applied" (redundant here)
27  // m_outLabelFjvt: "Decorator for passing fJVT threshold (tight or loose)" (redundant here)
28  // m_jetchargedp4: "Name of the jet charged momentum 4-vector"
29  // m_etaThresh: "Maximum eta value for considering a jet as central"
30  // m_forwardMinPt: "Minimum forward jet pt" (redundant here)
31  // m_forwardMaxPt: "Maximum forward jet pt. If -1 no threshold is applied" (redundant here)
32  // m_centerMinPt: "Minimum central jet pt"
33  // m_centerMaxPt: "Maximum central jet pt. If -1 no threshold is applied"
34  // m_pvind: "Hard-Scatter primary vertex index of the event. If -1 it's automatically retrieved from the event"
35  // m_rptCut: "Rpt cut value for central PU jets contributing in the missing momentum calculation"
36  // m_jvtCut: "JVT threshold value for considering a central PU jet as HS"
37  // m_dzCut: "Dz=z-z0 cut value for pfo objects participating in the HS vertex jet reco"
38  // m_vertices: "Number of vertices for which the missing momentum is calculated"
39  // m_maxRap: "Maximum rapidity value in fastjet::AreaDefinition"
40  // m_neutMaxRap: "Maximum rapidity value for neutral pfos participating in jet reco"
41  // m_weight: "PFO weight value"
42  // m_pfoToolName: "Name of PFO retriever tool" (redundant here)
43  // m_wpfoToolName: "Name of PFO weighting tool"
44  // m_pfoJESName: "Name of jet calibration tool" (redundant here)
45  // m_jetAlgo: "Jet calibration collection name" (redundant here)
46  // m_calibconfig: "Calibration config for PFlow jets, need to be updated with latest one" (redundant here)
47  // m_calibSeq: "Calibration sequence to be applied" (redundant here)
48  // m_calibArea: "Calibration area" (redundant here)
49  // m_isdata: "True if data" (redundant here)
50  //
51  //New parameters for bJVT
52  // m_QCDPUMinPt: "Minimum pt cut value for central PU jets contributing in the missing momentum calculation"
53  // m_QCDPUMaxPt: "Maximum pt cut value for central PU jets contributing in the missing momentum calculation. If -1 no threshold is applied"
54  // m_bjvtKey: "Decorator for passing bJVT threshold (tight or loose)"
55  // m_bjvtRawKey: "Decorator for raw bJVT variable"
56  // m_isQCDPUKey: "SG key for output isJVTQCDPU decoration"
57  // m_isStochPUKey: "SG key for output isJVTStochPU decoration"
58 
59 
60 #ifndef BALANCEPFLOWJVTTOOL_JVT_BALANCEPFLOWJVTTOOL_H
61 #define BALANCEPFLOWJVTTOOL_JVT_BALANCEPFLOWJVTTOOL_H 1
62 
63 // STL includes
64 #include <string>
65 
66 // FrameWork includes
67 #include "AsgTools/ToolHandle.h"
68 #include "AsgTools/AsgTool.h"
72 #include "xAODJet/JetContainer.h"
75 
80 
81 // Pflow / FE tools
82 #include "PFlowUtils/FEHelpers.h"
86 
87 #include "AsgTools/ToolHandle.h"
89 
91 
92 
93 
95 
97 
98 
99  // Public methods:
101  public:
102 
104  JetBalancePFlowJvtTool(const std::string& name);
105 
108 
109  virtual StatusCode initialize() override;
110  virtual StatusCode decorate(const xAOD::JetContainer& jetCont) const override;
111 
112  //New methods
113  bool isQCDPUJet(const xAOD::Jet *jet) const;
114 
115  //Overridden/overloaded methods from JetForwardPFlowJvtTool
116  virtual std::vector<TVector2> calculateVertexMomenta(const xAOD::JetContainer *jets,int pvind, int vertices) const override;
117  StatusCode tagTruth(const xAOD::JetContainer *jets,const xAOD::JetContainer *truthJets,const xAOD::JetContainer *itpujets,const xAOD::JetContainer *ootpujets);
118 
119  protected:
120  //New properties for bJVT, JetForwardPFlowJvtTool properties also inherited
121 
122  Gaudi::Property<float> m_QCDPUMinPt{this, "QCDPUMinPt", 20e3, "Minimum pt cut value for central PU jets contributing in the missing momentum calculation"};
123  Gaudi::Property<float> m_QCDPUMaxPt{this, "QCDPUMaxPt", -1, "Maximum pt cut value for central PU jets contributing in the missing momentum calculation. If -1 no threshold is applied"};
124  //EMTopo tool also had selections on JVF and JVT
125 
126  SG::WriteDecorHandleKey<xAOD::JetContainer> m_bjvtKey{this, "BjvtName", "passOnlyBJVT", "Decorator for passing bJVT threshold (tight or loose)"};
127  SG::WriteDecorHandleKey<xAOD::JetContainer> m_bjvtRawKey{this, "BjvtRawName", "bJvt", "Decorator for raw bJVT variable"};
128  SG::WriteDecorHandleKey<xAOD::JetContainer> m_isQCDPUKey{this, "isQCDPUName", "isJvtQCDPU", "SG key for output isJVTQCDPU decoration"};
129  SG::WriteDecorHandleKey<xAOD::JetContainer> m_isStochPUKey{this, "isStochPUName", "isJvtStochPU", "SG key for output isJVTStochPU decoration"};
130 
132 
133  };
134 #endif //> !BALANCEJVTTOOL_JVT_BALANCEJVTTOOL_H
JetBalancePFlowJvtTool::JetBalancePFlowJvtTool
JetBalancePFlowJvtTool(const std::string &name)
Constructor with parameters:
Definition: JetBalancePFlowJvtTool.cxx:33
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
FEHelpers.h
PropertyWrapper.h
JetBalancePFlowJvtTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetBalancePFlowJvtTool.cxx:45
FlowElementContainer.h
JetBalancePFlowJvtTool::m_isStochPUKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_isStochPUKey
Definition: JetBalancePFlowJvtTool.h:129
JetForwardPFlowJvtTool.h
IJetDecorator
Interface for adding a decoration to a jet container.
Definition: IJetDecorator.h:21
JetBalancePFlowJvtTool::m_QCDPUMinPt
Gaudi::Property< float > m_QCDPUMinPt
Definition: JetBalancePFlowJvtTool.h:122
IWeightPFOTool.h
IJetDecorator.h
JetForwardPFlowJvtTool
Definition: JetForwardPFlowJvtTool.h:89
IJetCalibrationTool.h
JetBalancePFlowJvtTool::tagTruth
StatusCode tagTruth(const xAOD::JetContainer *jets, const xAOD::JetContainer *truthJets, const xAOD::JetContainer *itpujets, const xAOD::JetContainer *ootpujets)
Definition: JetBalancePFlowJvtTool.cxx:186
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
JetBalancePFlowJvtTool::~JetBalancePFlowJvtTool
virtual ~JetBalancePFlowJvtTool()
Destructor:
JetBalancePFlowJvtTool::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jetCont) const override
Decorate a jet collection without otherwise modifying it.
Definition: JetBalancePFlowJvtTool.cxx:104
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JetBalancePFlowJvtTool
Definition: JetBalancePFlowJvtTool.h:94
JetBalancePFlowJvtTool::m_bjvtRawKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_bjvtRawKey
Definition: JetBalancePFlowJvtTool.h:127
TrackVertexAssociation.h
JetBalancePFlowJvtTool::m_isQCDPUKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_isQCDPUKey
Definition: JetBalancePFlowJvtTool.h:128
JetBalancePFlowJvtTool::isQCDPUJet
bool isQCDPUJet(const xAOD::Jet *jet) const
Definition: JetBalancePFlowJvtTool.cxx:178
WeightPFOTool.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
JetBalancePFlowJvtTool::m_bjvtThresh
float m_bjvtThresh
Definition: JetBalancePFlowJvtTool.h:131
WriteDecorHandle.h
Handle class for adding a decoration to an object.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
JetBalancePFlowJvtTool::m_bjvtKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_bjvtKey
Definition: JetBalancePFlowJvtTool.h:126
WriteDecorHandleKey.h
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JetContainer.h
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
ReadDecorHandle.h
Handle class for reading a decoration on an object.
JetAuxContainer.h
JetBalancePFlowJvtTool::m_QCDPUMaxPt
Gaudi::Property< float > m_QCDPUMaxPt
Definition: JetBalancePFlowJvtTool.h:123
JetBalancePFlowJvtTool::calculateVertexMomenta
virtual std::vector< TVector2 > calculateVertexMomenta(const xAOD::JetContainer *jets, int pvind, int vertices) const override
Definition: JetBalancePFlowJvtTool.cxx:133
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
ToolHandle.h
AsgTool.h