ATLAS Offline Software
Loading...
Searching...
No Matches
JetOriginHelpers.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9
10namespace jet {
11
13
14
15 xAOD::CaloCluster::State constitScale = state;
16 if(constitScale==xAOD::CaloCluster::UNKNOWN) constitScale = (xAOD::CaloCluster::State) jet.getConstituentsSignalState();
17
18 int numC = jet.numConstituents();
19 const Amg::Vector3D& vxpos= vx.position();
20
21 xAOD::IParticle::FourMom_t corrP4(0,0,0,0);
22
23 for(int i=0; i<numC;i++){
24 const xAOD::CaloCluster* cl = dynamic_cast<const xAOD::CaloCluster*>(jet.rawConstituent(i) );
25 if( ! cl ) continue;
26
27 xAOD::CaloVertexedTopoCluster corrCl(*cl, constitScale, vxpos );
28 xAOD::IParticle::FourMom_t p4CorrCl=corrCl.p4();
29 if(cl->e(constitScale) < 0.) p4CorrCl*=-1.;
30 corrP4 += p4CorrCl;
31 }
32
33 xAOD::JetFourMom_t corrJet;
34 corrJet.SetPxPyPzE(corrP4.Px(), corrP4.Py(), corrP4.Pz(), corrP4.E() );
35 return corrJet;
36
37 }
38
39}
Evaluate cluster kinematics with a different vertex / signal state.
Helpers to calculate corrected 4-vectors w.r.t to a given orign.
State
enum of possible signal states.
virtual FourMom_t p4() const final
The full 4-momentum of the particle.
Evaluate cluster kinematics with a different vertex / signal state.
TLorentzVector FourMom_t
Definition of the 4-momentum type.
const Amg::Vector3D & position() const
Returns the 3-pos.
Eigen::Matrix< double, 3, 1 > Vector3D
xAOD::JetFourMom_t clusterOriginCorrection(const xAOD::Jet &jet, const xAOD::Vertex &vx)
returns 4-vector of the jet relative to the vertex
Jet_v1 Jet
Definition of the current "jet version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Vertex_v1 Vertex
Define the latest version of the vertex class.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition JetTypes.h:17