ATLAS Offline Software
ElectronJetDRAssociator.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 */
14 #ifndef EGAMMAD3PDMAKER_ELECTRONJETDRASSOCIATOR_H
15 #define EGAMMAD3PDMAKER_ELECTRONJETDRASSOCIATOR_H
16 
17 
20 #include "xAODEgamma/Electron.h"
21 #include "xAODJet/Jet.h"
23 #include "GaudiKernel/ToolHandle.h"
24 #include <string>
25 #include <vector>
26 
27 
28 
29 namespace Trk { class VxCandidate; }
30 
31 
32 namespace D3PD {
33 
34 
35 class ICollectionGetterTool;
36 
37 
43  : public MultiAssociationTool<xAOD::Electron,xAOD::Jet>
44 {
45 public:
47 
54  ElectronJetDRAssociator (const std::string& type,
55  const std::string& name,
56  const IInterface* parent);
57 
58 
60  virtual StatusCode initialize() override;
61 
62 
73  const std::type_info& ti) override;
74 
75 
80  virtual StatusCode reset (const xAOD::Electron& eg) override;
81 
82 
88  virtual const xAOD::Jet* next() override;
89 
90 
96  virtual StatusCode book() final;
97 
98 
99 private:
107  const xAOD::Jet* j,
108  float& reducedPt);
109 
118  const xAOD::Jet* j0,
119  float& signedIP, float& PTRel);
120 
121 
123  std::string m_targetLabel;
124 
127 
129  double m_drcut;
130 
132  ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
133  { this, "TrackToVertexIPEstimator", "Trk::TrackToVertexIPEstimator", "" };
134 
136  ToolHandle<ICollectionGetterRegistryTool> m_registry;
137 
138 
141 
142  // Input electrons; source of the association.
144 
146  float* m_dr;
147 
149  float* m_signedIP;
150 
152  float* m_ptrel;
153 
155  unsigned int* m_jetSize;
156 
158  float* m_reducedPt;
159 };
160 
161 
162 } // namespace D3PD
163 
164 
165 #endif // EGAMMAD3PDMAKER_EGAMMAJETDRASSOCIATOR_H
Jet.h
D3PD::IAddVariable
Common interface for adding a variable to a tuple.
Definition: IAddVariable.h:70
ICollectionGetterRegistryTool.h
Abstract interface to keep a registry of collection getter tools.
D3PD::ElectronJetDRAssociator::initialize
virtual StatusCode initialize() override
Standard Gaudi initialize method.
Definition: ElectronJetDRAssociator.cxx:64
D3PD::ElectronJetDRAssociator::m_reducedPt
float * m_reducedPt
Variable: Jet pT with electron removed.
Definition: ElectronJetDRAssociator.h:158
MultiAssociationTool.h
Type-safe wrapper for multiple-target associator tools.
ParticleTest.eg
eg
Definition: ParticleTest.py:29
Jet
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
D3PD::ElectronJetDRAssociator::m_trackToVertexIPEstimator
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
Property: Tool for the estimation of the IPs to the vertex.
Definition: ElectronJetDRAssociator.h:133
D3PD::ElectronJetDRAssociator::m_ptrel
float * m_ptrel
Variable: Relative Pt between electron and jet.
Definition: ElectronJetDRAssociator.h:152
D3PD::ElectronJetDRAssociator::m_signedIP
float * m_signedIP
Variable: Signed impact parameter between electron and jet.
Definition: ElectronJetDRAssociator.h:149
D3PD::ElectronJetDRAssociator::m_targetLabel
std::string m_targetLabel
Property: Target label for the getter for the jets to which to associate.
Definition: ElectronJetDRAssociator.h:123
tree
TChain * tree
Definition: tile_monitor.h:30
D3PD::ElectronJetDRAssociator::ElectronJetDRAssociator
ElectronJetDRAssociator(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: ElectronJetDRAssociator.cxx:36
D3PD::MultiAssociationTool
Type-safe wrapper for multiple-target associator tools.
Definition: MultiAssociationTool.h:153
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
D3PD::ElectronJetDRAssociator::m_registry
ToolHandle< ICollectionGetterRegistryTool > m_registry
Property: The ICollectionGetterRegistryTool instance.
Definition: ElectronJetDRAssociator.h:136
D3PD::ElectronJetDRAssociator::findReducedPt
StatusCode findReducedPt(const xAOD::Electron *eg, const xAOD::Jet *j, float &reducedPt)
Find the pT of the jet with electron removed.
Definition: ElectronJetDRAssociator.cxx:181
D3PD::ElectronJetDRAssociator::m_jetSize
unsigned int * m_jetSize
Variable: Number of jet constituents.
Definition: ElectronJetDRAssociator.h:155
D3PD::ElectronJetDRAssociator::configureD3PD
virtual StatusCode configureD3PD(IAddVariable *tree, const std::type_info &ti) override
Configure during initialization: type-check.
Definition: ElectronJetDRAssociator.cxx:81
D3PD::ICollectionGetterTool
Abstract interface to get a collection of objects and iterate over it.
Definition: ICollectionGetterTool.h:39
D3PD::ElectronJetDRAssociator::next
virtual const xAOD::Jet * next() override
Return a pointer to the next element in the association.
Definition: ElectronJetDRAssociator.cxx:109
D3PD::ElectronJetDRAssociator::m_eg
const xAOD::Electron * m_eg
Definition: ElectronJetDRAssociator.h:143
D3PD
Block filler tool for noisy FEB information.
Definition: CaloCellDetailsFillerTool.cxx:29
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
D3PD::ElectronJetDRAssociator::m_drcut
double m_drcut
Property: DR cut between electrons and jets.
Definition: ElectronJetDRAssociator.h:129
D3PD::ElectronJetDRAssociator::book
virtual StatusCode book() final
Create any needed tuple variables.
Definition: ElectronJetDRAssociator.cxx:158
test_pyathena.parent
parent
Definition: test_pyathena.py:15
D3PD::ElectronJetDRAssociator::Base
MultiAssociationTool< xAOD::Electron, xAOD::Jet > Base
Definition: ElectronJetDRAssociator.h:46
D3PD::ElectronJetDRAssociator
For every electron find jets in a cone and store lifetime, signed IP, and PTRel of relation.
Definition: ElectronJetDRAssociator.h:44
D3PD::ElectronJetDRAssociator::m_vertexContainerName
std::string m_vertexContainerName
Property: Vertex container name.
Definition: ElectronJetDRAssociator.h:126
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
D3PD::ElectronJetDRAssociator::m_target
ICollectionGetterTool * m_target
Getter defining the collection within which to index.
Definition: ElectronJetDRAssociator.h:140
D3PD::ElectronJetDRAssociator::reset
virtual StatusCode reset(const xAOD::Electron &eg) override
Start the iteration for a new association.
Definition: ElectronJetDRAssociator.cxx:95
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAOD::Electron_v1
Definition: Electron_v1.h:34
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Electron
Class describing an electron.
ITrackToVertexIPEstimator.h
D3PD::ElectronJetDRAssociator::findSignedIPAndPTRelEleJetPair
StatusCode findSignedIPAndPTRelEleJetPair(const xAOD::Electron *eg, const xAOD::Jet *j0, float &signedIP, float &PTRel)
Find the signed impact parameter and PTRel of EG's track relative to the beamspot.
Definition: ElectronJetDRAssociator.cxx:211
Electron.h
D3PD::ElectronJetDRAssociator::m_dr
float * m_dr
Variable: DR between electron and jet.
Definition: ElectronJetDRAssociator.h:146