ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetUtils
Root
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
5
#include "
JetUtils/JetOriginHelpers.h
"
6
7
#include "
xAODCaloEvent/CaloVertexedTopoCluster.h
"
8
#include "
xAODTracking/Vertex.h
"
9
10
namespace
jet
{
11
12
xAOD::JetFourMom_t
clusterOriginCorrection
(
const
xAOD::Jet
&
jet
,
const
xAOD::Vertex
& vx,
const
xAOD::CaloCluster::State
state){
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
}
CaloVertexedTopoCluster.h
Evaluate cluster kinematics with a different vertex / signal state.
Vertex.h
JetOriginHelpers.h
Helpers to calculate corrected 4-vectors w.r.t to a given orign.
xAOD::CaloCluster_v1::State
State
enum of possible signal states.
Definition
CaloCluster_v1.h:307
xAOD::CaloCluster_v1::UNKNOWN
@ UNKNOWN
Definition
CaloCluster_v1.h:308
xAOD::CaloVertexedClusterBase::p4
virtual FourMom_t p4() const final
The full 4-momentum of the particle.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h:88
xAOD::CaloVertexedTopoCluster
Evaluate cluster kinematics with a different vertex / signal state.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedTopoCluster.h:38
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:69
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
Definition
Vertex_v1.cxx:106
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
jet
Definition
JetCalibTools_PlotJESFactors.cxx:23
jet::clusterOriginCorrection
xAOD::JetFourMom_t clusterOriginCorrection(const xAOD::Jet &jet, const xAOD::Vertex &vx)
returns 4-vector of the jet relative to the vertex
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition
Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition
Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition
JetTypes.h:17
Generated on
for ATLAS Offline Software by
1.17.0