37 const std::string& name,
38 const IInterface* parent)
44 "Target label for the getter for the jets to which"
47 declareProperty (
"VertexContainerName",
49 "Primary vertex container name");
51 declareProperty (
"DRCut",
m_drcut = 0.7,
52 "DR cut between electrons and jets");
54 declareProperty (
"CollectionGetterRegistry",
m_registry,
55 "The ICollectionGetterRegistryTool instance.");
67 CHECK( Base::initialize() );
68 return StatusCode::SUCCESS;
82 const std::type_info& ti)
87 return StatusCode::SUCCESS;
100 return StatusCode::SUCCESS;
121 float dr = hypot (clus->
p4().DeltaPhi(myjet->p4()),
122 myjet->eta() - clus->
etaBE(2));
123 ATH_MSG_DEBUG(
"The value of DR between Electron and Jet is dr= "<<dr);
125 float signedIP=-9999.9;
127 float reducedPt=-9999.9;
130 signedIP, PTRel ).isFailure() )
161 "DR between electron and associated jet.") );
163 "Signed impact parameter between electron and jet.") );
165 "Relative Pt between electron and jet.") );
167 "Number of jet constituents.") );
169 "Jet Pt with electron removed.") );
171 return StatusCode::SUCCESS;
188 return StatusCode::SUCCESS;
193 return StatusCode::SUCCESS;
196 float px = j->
px() - track->p4().Px();
197 float py = j->
py() - track->p4().Py();
198 reducedPt = hypot (px, py);
200 return StatusCode::SUCCESS;
220 return StatusCode::SUCCESS;
225 return StatusCode::SUCCESS;
228 PTRel= track->p4().Perp (j0->
p4().Vect());
230 CLHEP::Hep3Vector jetDirection( (j0)->px(), (j0)->py(), (j0)->pz());
231 CLHEP::Hep3Vector
unit = jetDirection.unit();
234 return StatusCode::SUCCESS;
242 <<
" not found in StoreGate!";
243 else if (!vxcontainer->
empty())
244 vx = vxcontainer->
front();
249 <<
"No vertex found.";
250 return StatusCode::SUCCESS;
254 (track->perigeeParameters(),
unit, *vx);
256 return StatusCode::SUCCESS;
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE(LVL)
Report a message.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
virtual StatusCode configureD3PD(IAddVariable *tree, const std::type_info &ti) override
Configure during initialization: type-check.
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.
float * m_ptrel
Variable: Relative Pt between electron and jet.
ToolHandle< ICollectionGetterRegistryTool > m_registry
Property: The ICollectionGetterRegistryTool instance.
ICollectionGetterTool * m_target
Getter defining the collection within which to index.
float * m_reducedPt
Variable: Jet pT with electron removed.
virtual StatusCode reset(const xAOD::Electron &eg) override
Start the iteration for a new association.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
unsigned int * m_jetSize
Variable: Number of jet constituents.
double m_drcut
Property: DR cut between electrons and jets.
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
Property: Tool for the estimation of the IPs to the vertex.
virtual StatusCode book() final
Create any needed tuple variables.
virtual const xAOD::Jet * next() override
Return a pointer to the next element in the association.
StatusCode findReducedPt(const xAOD::Electron *eg, const xAOD::Jet *j, float &reducedPt)
Find the pT of the jet with electron removed.
float * m_dr
Variable: DR between electron and jet.
float * m_signedIP
Variable: Signed impact parameter between electron and jet.
ElectronJetDRAssociator(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
MultiAssociationTool< xAOD::Electron, xAOD::Jet > Base
const xAOD::Electron * m_eg
std::string m_vertexContainerName
Property: Vertex container name.
std::string m_targetLabel
Property: Target label for the getter for the jets to which to associate.
Common interface for adding a variable to a tuple.
const T * front() const
Access the first element in the collection as an rvalue.
bool empty() const noexcept
Returns true if the collection is empty.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
float py() const
The y-component of the jet's momentum.
float px() const
The x-component of the jet's momentum.
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
Block filler tool for noisy FEB information.
Jet_v1 Jet
Definition of the current "jet version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
Electron_v1 Electron
Definition of the current "egamma version".