|
ATLAS Offline Software
|
Go to the documentation of this file.
23 if (tau.
jet() ==
nullptr) {
25 return StatusCode::FAILURE;
31 TLorentzVector baryCenter;
38 ATH_MSG_DEBUG(
"barycenter (eta, phi): " << baryCenter.Eta() <<
" " << baryCenter.Phi());
41 TLorentzVector tauDetectorAxis;
46 if (baryCenter.DeltaR(constituentP4) >
m_clusterCone)
continue;
48 tauDetectorAxis += constituentP4;
52 ATH_MSG_DEBUG(
"this tau candidate does not have any constituent clusters!");
53 return StatusCode::FAILURE;
56 ATH_MSG_DEBUG(
"detector axis:" << tauDetectorAxis.Pt()<<
" " << tauDetectorAxis.Eta() <<
" " << tauDetectorAxis.Phi() <<
" " << tauDetectorAxis.E());
57 tau.
setP4(tauDetectorAxis.Pt(), tauDetectorAxis.Eta(), tauDetectorAxis.Phi(), tau.
m());
63 TLorentzVector tauInterAxis;
72 if (jetVertex != tau.
vertex()) {
75 if (tau.
vertex() ==
nullptr) {
76 ATH_MSG_WARNING(
"The seed jet has a vertex, while the tau candidate does not. It should not happen.");
77 return StatusCode::FAILURE;
84 if (jetVertex !=
nullptr) {
89 TLorentzVector baryCenterTauVertex;
96 ATH_MSG_DEBUG(
"barycenter (eta, phi) at tau vertex: " << baryCenterTauVertex.Eta() <<
" " << baryCenterTauVertex.Phi());
102 if (baryCenterTauVertex.DeltaR(constituentP4) >
m_clusterCone)
continue;
104 tauInterAxis += constituentP4;
108 tauInterAxis = tauDetectorAxis;
111 if (tauInterAxis.Pt() == 0.) {
112 ATH_MSG_DEBUG(
"this tau candidate does not have any constituent clusters!");
113 return StatusCode::FAILURE;
116 ATH_MSG_DEBUG(
"tau axis:" << tauInterAxis.Pt()<<
" " << tauInterAxis.Eta() <<
" " << tauInterAxis.Phi() <<
" " << tauInterAxis.E() );
117 tau.
setP4(tauInterAxis.Pt(), tauInterAxis.Eta(), tauInterAxis.Phi(), tau.
m());
121 return StatusCode::SUCCESS;
128 TLorentzVector vertexCorrectedP4;
139 ATH_MSG_WARNING(
"Seed jet constituent type not supported, will not do vertex correction !");
143 return vertexCorrectedP4;
149 TLorentzVector vertexCorrectedP4;
152 TVector3
pos(position.x(), position.y(), position.z());
156 vertexCorrectedP4 = fe.
p4();
160 " eta: " << fe.
eta() <<
" phi: " << fe.
phi() <<
" e: " << fe.
e());
161 ATH_MSG_DEBUG(
"Vertex corrected four momentum, pt: " << vertexCorrectedP4.Pt() <<
162 " eta: " << vertexCorrectedP4.Eta() <<
" phi: " << vertexCorrectedP4.Phi() <<
" e: " << vertexCorrectedP4.E());
164 return vertexCorrectedP4;
virtual FourMom_t p4() const final
The full 4-momentum of the particle.
virtual double m() const
The invariant mass of the particle.
const Amg::Vector3D & position() const
Returns the 3-pos.
virtual double phi() const override
The azimuthal angle ( ) of the particle.
virtual double pt() const override
JetConstituentVector getConstituents() const
Return a vector of consituents. The object behaves like vector<const IParticle*>. See JetConstituentV...
void setP4(double pt, double eta, double phi, double m)
Set methods for IParticle values.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Description of a calorimeter cluster.
::StatusCode StatusCode
StatusCode definition for legacy code.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Class describing a tau jet.
Gaudi::Property< bool > m_doVertexCorrection
const IParticle * rawConstituent() const
Access the real underlying IParticle.
Type::ObjectType type() const
The full 4-momentum of the particle.
virtual double e() const override
The total energy of the particle.
Evaluate cluster kinematics with a different vertex / signal state.
Eigen::Matrix< double, 3, 1 > Vector3D
Gaudi::Property< double > m_clusterCone
virtual double eta() const override
The pseudorapidity ( ) of the particle.
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
virtual StatusCode execute(xAOD::TauJet &tau) const override
Execution of this tool.
Class describing a Vertex.
const Vertex * vertex() const
#define ATH_MSG_WARNING(x)
TLorentzVector getVertexCorrectedP4(const xAOD::JetConstituent &constituent, const Amg::Vector3D &position) const
Get the vertex corrected four momentum.
4-vector of jet constituent at the scale used during jet finding.
A vector of jet constituents at the scale used during jet finding.
Evaluate cluster kinematics with a different vertex / signal state.
TauAxisSetter(const std::string &name)
Constructor.
TLorentzVector getVertexCorrectedFourVec(const xAOD::FlowElement &fe, const xAOD::Vertex &vertexToCorrectTo)
A detector object made of other lower level object(s)