ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::CaloVertexedClusterBase Class Reference

Evaluate cluster kinematics with a different vertex / signal state. More...

#include <CaloVertexedClusterBase.h>

Inheritance diagram for xAOD::CaloVertexedClusterBase:
Collaboration diagram for xAOD::CaloVertexedClusterBase:

Public Types

Functions describing the 4-momentum of the object
typedef TLorentzVector FourMom_t
 Definition of the 4-momentum type.

Public Member Functions

 CaloVertexedClusterBase (const CaloCluster &cl)
 Constructor.
 CaloVertexedClusterBase (const CaloCluster &cl, CaloCluster::State s)
 Constructor.
const CaloClusterclust () const
 Return the cluster being proxied,.
virtual Type::ObjectType type () const final
 The type of the object as a simple enumeration.
Functions describing the 4-momentum of the object
virtual double pt () const final
 The transverse momentum ( \(p_T\)) of the particle.
virtual double eta () const final
 The pseudorapidity ( \(\eta\)) of the particle.
virtual double phi () const final
 The azimuthal angle ( \(\phi\)) of the particle.
virtual double m () const final
 The invariant mass of the particle.
virtual double e () const final
 The total energy of the particle.
virtual double rapidity () const final
 The true rapidity (y) of the particle.
virtual FourMom_t p4 () const final
 The full 4-momentum of the particle.
Functions for getting and setting user properties
template<class T>
XAOD_AUXDATA_DEPRECATED T & auxdata (const std::string &name, const std::string &clsname="")
 Fetch an aux data variable, as a non-const reference.
template<class T>
XAOD_AUXDATA_DEPRECATED const T & auxdata (const std::string &name, const std::string &clsname="") const
 Fetch an aux data variable, as a const reference.
template<class T>
XAOD_AUXDATA_DEPRECATED bool isAvailable (const std::string &name, const std::string &clsname="") const
 Check if a user property is available for reading or not.
template<class T>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable (const std::string &name, const std::string &clsname="") const
 Check if a user property is available for writing or not.

Protected Member Functions

void computeVertexCorr (const Amg::Vector3D &vx, double radius)
 Calculate cluster kinematics for a given vertex.

Protected Attributes

const CaloClusterm_cl
 The cluster being proxied.
double m_eta
 The recalculated cluster eta.
double m_phi
 The recalculated cluster phi.
FourMom_t m_p4
 The recalculated cluster 4-momentum.

Detailed Description

Evaluate cluster kinematics with a different vertex / signal state.

A base for classes acting as a proxy for a cluster object. Concrete classes are

  • CaloVertexedCluster : vertex correction uses the EM layer information. Available only in athena, since geometry is required.
  • CaloVertexedTopoCluster : vertex correction uses the "" It provides the same IParticle interface, except that the cluster kinematics are recalculated for a different vertex, and optionally a different signal state.

Definition at line 39 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

Member Typedef Documentation

◆ FourMom_t

typedef TLorentzVector xAOD::IParticle::FourMom_t
inherited

Definition of the 4-momentum type.

Definition at line 69 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

Constructor & Destructor Documentation

◆ CaloVertexedClusterBase() [1/2]

xAOD::CaloVertexedClusterBase::CaloVertexedClusterBase ( const CaloCluster & cl)

Constructor.

Parameters
clThe cluster to proxy.

In this case, we'll return unchanged the kinematics of the cluster for the default signal state.

Definition at line 33 of file CaloVertexedClusterBase.cxx.

34 : m_cl (&cl),
35 m_eta (cl.eta()),
36 m_phi (cl.phi()),
37 m_p4 (cl.p4())
38{
39}
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]

◆ CaloVertexedClusterBase() [2/2]

xAOD::CaloVertexedClusterBase::CaloVertexedClusterBase ( const CaloCluster & cl,
CaloCluster::State s )

Constructor.

Parameters
clThe cluster to proxy.
sThe desired signal state.

In this case, we'll return unchanged the kinematics of the cluster for signal state S.

Definition at line 50 of file CaloVertexedClusterBase.cxx.

52 : m_cl (&cl),
53 m_eta (cl.eta(s)),
54 m_phi (cl.phi(s)),
55 m_p4 (cl.p4(s))
56{
57}

Member Function Documentation

◆ auxdata() [1/2]

template<class T>
XAOD_AUXDATA_DEPRECATED T & xAOD::IParticle::auxdata ( const std::string & name,
const std::string & clsname = "" )
inlineinherited

Fetch an aux data variable, as a non-const reference.

This function provides an easy way for users to decorate objects with auxiliary data.

Take note that this function is slow. Should not be used inside time-critical code.

Parameters
nameName of the aux variable
clsnameThe name of the associated class. May be blank
Returns
A modifiable reference to the decoration

Definition at line 98 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

99 {
100
101 return SG::Accessor< T >(name, clsname)(*this);
102 }
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:573

◆ auxdata() [2/2]

template<class T>
XAOD_AUXDATA_DEPRECATED const T & xAOD::IParticle::auxdata ( const std::string & name,
const std::string & clsname = "" ) const
inlineinherited

Fetch an aux data variable, as a const reference.

This function provides an easy way for users to retrieve auxiliary decorations from an object.

Take note that this function is slow. Should not be used inside time-critical code.

Parameters
nameName of the aux variable
clsnameThe name of the associated class. May be blank
Returns
A constant reference to the decoration

Definition at line 118 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

119 {
120
121 return SG::ConstAccessor< T >( name, clsname )( *this );
122 }
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:570

◆ clust()

const CaloCluster & xAOD::CaloVertexedClusterBase::clust ( ) const
inline

Return the cluster being proxied,.

Definition at line 69 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

69{ return *m_cl; }

◆ computeVertexCorr()

void xAOD::CaloVertexedClusterBase::computeVertexCorr ( const Amg::Vector3D & vx,
double radius )
protected

Calculate cluster kinematics for a given vertex.

Parameters
vxThe vertex to use for calculating cluster kinematics.

Definition at line 67 of file CaloVertexedClusterBase.cxx.

68{
69
70 if (radius<1.) return;
71
72 double eta = m_eta;
73 double phi = m_phi;
74
75 if (std::fabs(eta)>10. || std::fabs(phi)>10.) return;
76
77 CxxUtils::sincos sc (phi);
78 double iradius = 1 / radius;
79 m_eta += (-vx[2]/cosh(m_eta) + sc.apply (vx[1], vx[0])*tanh(m_eta)) * iradius;
80 m_phi += sc.apply (vx[0], -vx[1]) * iradius;
82
83 double pt = m_p4.P() / cosh (m_eta);
84 m_p4.SetPtEtaPhiE (pt, m_eta, m_phi, m_p4.E());
85}
static Double_t sc
virtual double phi() const final
The azimuthal angle ( ) of the particle.
virtual double eta() const final
The pseudorapidity ( ) of the particle.
virtual double pt() const final
The transverse momentum ( ) of the particle.
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
Definition phihelper.h:24

◆ e()

virtual double xAOD::CaloVertexedClusterBase::e ( ) const
inlinefinalvirtual

The total energy of the particle.

Implements xAOD::IParticle.

Definition at line 83 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

83{ return m_p4.E(); }

◆ eta()

virtual double xAOD::CaloVertexedClusterBase::eta ( ) const
inlinefinalvirtual

The pseudorapidity ( \(\eta\)) of the particle.

Implements xAOD::IParticle.

Definition at line 77 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

77{ return m_eta; }

◆ isAvailable()

template<class T>
XAOD_AUXDATA_DEPRECATED bool xAOD::IParticle::isAvailable ( const std::string & name,
const std::string & clsname = "" ) const
inlineinherited

Check if a user property is available for reading or not.

This function should be used to check if a user property which may or may not exist, is set on the object.

Parameters
nameName of the auxiliary variable
clsnameThe name of the associated class. May be blank
Returns
Whether the decoration exists or not

Definition at line 135 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

136 {
137
138 return SG::ConstAccessor< T >(name, clsname).isAvailable(*this);
139 }
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.

◆ isAvailableWritable()

template<class T>
XAOD_AUXDATA_DEPRECATED bool xAOD::IParticle::isAvailableWritable ( const std::string & name,
const std::string & clsname = "" ) const
inlineinherited

Check if a user property is available for writing or not.

This function can be used to check whether it will be possible to set a user property on the object.

Parameters
nameName of the auxiliary variable
clsnameThe name of the associated class. May be blank
Returns
Whether the decoration is possible to set

Definition at line 152 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

153 {
154
155 return SG::Accessor< T >(name, clsname).isAvailableWritable(*this);
156 }
bool isAvailableWritable(ELT &e) const
Test to see if this variable exists in the store and is writable.

◆ m()

virtual double xAOD::CaloVertexedClusterBase::m ( ) const
inlinefinalvirtual

The invariant mass of the particle.

Implements xAOD::IParticle.

Definition at line 81 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

81{ return m_p4.M(); }

◆ p4()

virtual FourMom_t xAOD::CaloVertexedClusterBase::p4 ( ) const
inlinefinalvirtual

The full 4-momentum of the particle.

Implements xAOD::IParticle.

Definition at line 88 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

88{ return m_p4; }

◆ phi()

virtual double xAOD::CaloVertexedClusterBase::phi ( ) const
inlinefinalvirtual

The azimuthal angle ( \(\phi\)) of the particle.

Implements xAOD::IParticle.

Definition at line 79 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

79{ return m_phi; }

◆ pt()

virtual double xAOD::CaloVertexedClusterBase::pt ( ) const
inlinefinalvirtual

The transverse momentum ( \(p_T\)) of the particle.

Implements xAOD::IParticle.

Definition at line 75 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

75{ return m_p4.Pt(); }

◆ rapidity()

virtual double xAOD::CaloVertexedClusterBase::rapidity ( ) const
inlinefinalvirtual

The true rapidity (y) of the particle.

Implements xAOD::IParticle.

Definition at line 85 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

85{ return m_p4.Rapidity(); }

◆ type()

virtual Type::ObjectType xAOD::CaloVertexedClusterBase::type ( ) const
inlinefinalvirtual

The type of the object as a simple enumeration.

Implements xAOD::IParticle.

Definition at line 93 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

93{ return m_cl->type(); }

Member Data Documentation

◆ m_cl

const CaloCluster* xAOD::CaloVertexedClusterBase::m_cl
protected

The cluster being proxied.

Definition at line 105 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

◆ m_eta

double xAOD::CaloVertexedClusterBase::m_eta
protected

The recalculated cluster eta.

Definition at line 109 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

◆ m_p4

FourMom_t xAOD::CaloVertexedClusterBase::m_p4
protected

The recalculated cluster 4-momentum.

Definition at line 117 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.

◆ m_phi

double xAOD::CaloVertexedClusterBase::m_phi
protected

The recalculated cluster phi.

Definition at line 113 of file Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloVertexedClusterBase.h.


The documentation for this class was generated from the following files: