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

Class describing a TrackCaloCluster. More...

#include <TrackCaloCluster_v1.h>

Inheritance diagram for xAOD::TrackCaloCluster_v1:
Collaboration diagram for xAOD::TrackCaloCluster_v1:

Public Types

enum  Taste { Charged = 0 , Neutral , Combined }
 Type of TrackCaloCluster - Charged - Neutral - Combined. More...

Public Member Functions

 TrackCaloCluster_v1 ()
 ~TrackCaloCluster_v1 ()
Defining parameters functions

The 'defining parameters' are key to the concept of a TrackCaloCluster, and give the values for the IParticle interface ( pt(), phi(), eta() etc.).

The \(\phi\) parameter is returned by either the phi() or the phi0() methods, the difference just being whether it is returned as a float or a double (it is stored as a float)

void setParameters (float pt, float eta, float phi, float m, TrackCaloCluster_v1::Taste taste, const ElementLink< xAOD::TrackParticleContainer > &particle, const std::vector< ElementLink< xAOD::CaloClusterContainer > > &clusters)
Links

Returns a link (which can be invalid) to the xAOD::TrackParticle associated with this TrackCaloCluster.

const ElementLink< xAOD::TrackParticleContainer > & trackParticleLink () const
void setTrackParticleLink (const ElementLink< xAOD::TrackParticleContainer > &particle)
 Set the link to the TrackParticle.
const xAOD::TrackParticletrackParticle () const
 Returns a pointer (which can be NULL) to the xAOD::TrackParticle associated with this TrackCaloCluster.
const std::vector< ElementLink< xAOD::CaloClusterContainer > > & caloClusterLinks () const
 Returns a vector to the links (which can be invalid) to the xAOD::CaloClusters associated with this TrackCaloCluster.
void setCaloClusterLinks (const std::vector< ElementLink< xAOD::CaloClusterContainer > > &caloClusterLinks)
 Set the links to the CaloClusters.
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.

xAOD::IParticle functions

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

typedef IParticle::FourMom_t FourMom_t
 Definition of the 4-momentum type.
typedef ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
 Base 4 Momentum type (GenVector version).
virtual double pt () const
 The transverse momentum ( \(p_T\)) of the particle.
virtual double eta () const
 The pseudorapidity ( \(\eta\)) of the particle.
virtual double phi () const
 The azimuthal angle ( \(\phi\)) of the particle (has range \(-\pi\) to \(+\pi\).).
virtual double m () const
 The invariant mass of the particle..
virtual double e () const
 The total energy of the particle.
virtual double rapidity () const
 The true rapidity (y) of the particle.
virtual int taste () const
 The taste of the particle.
virtual FourMom_t p4 () const
 The full 4-momentum of the particle.
GenVecFourMom_t genvecP4 () const
 The full 4-momentum of the particle : GenVector version.
virtual Type::ObjectType type () const
 The type of the object as a simple enumeration.

Detailed Description

Class describing a TrackCaloCluster.

Author
Noemi Calace Noemi.nosp@m..Cal.nosp@m.ace@c.nosp@m.ern..nosp@m.ch

Definition at line 25 of file TrackCaloCluster_v1.h.

Member Typedef Documentation

◆ FourMom_t

Definition of the 4-momentum type.

Definition at line 55 of file TrackCaloCluster_v1.h.

◆ GenVecFourMom_t

typedef ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<double> > xAOD::TrackCaloCluster_v1::GenVecFourMom_t

Base 4 Momentum type (GenVector version).

Definition at line 61 of file TrackCaloCluster_v1.h.

Member Enumeration Documentation

◆ Taste

Type of TrackCaloCluster - Charged - Neutral - Combined.

Enumerator
Charged 
Neutral 
Combined 

Definition at line 30 of file TrackCaloCluster_v1.h.

Constructor & Destructor Documentation

◆ TrackCaloCluster_v1()

xAOD::TrackCaloCluster_v1::TrackCaloCluster_v1 ( )

Definition at line 18 of file TrackCaloCluster_v1.cxx.

18: IParticle() {}
IParticle()=default

◆ ~TrackCaloCluster_v1()

xAOD::TrackCaloCluster_v1::~TrackCaloCluster_v1 ( )

Definition at line 20 of file TrackCaloCluster_v1.cxx.

20{}

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

◆ caloClusterLinks()

const std::vector< ElementLink< xAOD::CaloClusterContainer > > & xAOD::TrackCaloCluster_v1::caloClusterLinks ( ) const

Returns a vector to the links (which can be invalid) to the xAOD::CaloClusters associated with this TrackCaloCluster.

◆ e()

double xAOD::TrackCaloCluster_v1::e ( ) const
virtual

The total energy of the particle.

Implements xAOD::IParticle.

Definition at line 22 of file TrackCaloCluster_v1.cxx.

22 {
23 return genvecP4().E();
24 }
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector version.

◆ eta()

virtual double xAOD::TrackCaloCluster_v1::eta ( ) const
virtual

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

Implements xAOD::IParticle.

◆ genvecP4()

TrackCaloCluster_v1::GenVecFourMom_t xAOD::TrackCaloCluster_v1::genvecP4 ( ) const

The full 4-momentum of the particle : GenVector version.

Definition at line 42 of file TrackCaloCluster_v1.cxx.

42 {
43 return GenVecFourMom_t( pt(), eta(), phi(),m());
44 }
virtual double m() const
The invariant mass of the particle..
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type (GenVector version).
virtual double eta() const
The pseudorapidity ( ) of the particle.
setRcore setEtHad setFside pt

◆ 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::TrackCaloCluster_v1::m ( ) const
virtual

The invariant mass of the particle..

Implements xAOD::IParticle.

◆ p4()

TrackCaloCluster_v1::FourMom_t xAOD::TrackCaloCluster_v1::p4 ( ) const
virtual

The full 4-momentum of the particle.

Implements xAOD::IParticle.

Definition at line 36 of file TrackCaloCluster_v1.cxx.

36 {
38 p4.SetPtEtaPhiM( pt(), eta(), phi(), m() );
39 return p4;
40 }
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
virtual FourMom_t p4() const
The full 4-momentum of the particle.

◆ phi()

virtual double xAOD::TrackCaloCluster_v1::phi ( ) const
virtual

The azimuthal angle ( \(\phi\)) of the particle (has range \(-\pi\) to \(+\pi\).).

Implements xAOD::IParticle.

◆ pt()

virtual double xAOD::TrackCaloCluster_v1::pt ( ) const
virtual

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

Implements xAOD::IParticle.

◆ rapidity()

double xAOD::TrackCaloCluster_v1::rapidity ( ) const
virtual

The true rapidity (y) of the particle.

Implements xAOD::IParticle.

Definition at line 26 of file TrackCaloCluster_v1.cxx.

26 {
27 return genvecP4().Rapidity();
28 }

◆ setCaloClusterLinks()

void xAOD::TrackCaloCluster_v1::setCaloClusterLinks ( const std::vector< ElementLink< xAOD::CaloClusterContainer > > & caloClusterLinks)

Set the links to the CaloClusters.

◆ setParameters()

void xAOD::TrackCaloCluster_v1::setParameters ( float pt,
float eta,
float phi,
float m,
TrackCaloCluster_v1::Taste taste,
const ElementLink< xAOD::TrackParticleContainer > & particle,
const std::vector< ElementLink< xAOD::CaloClusterContainer > > & clusters )

◆ setTrackParticleLink()

void xAOD::TrackCaloCluster_v1::setTrackParticleLink ( const ElementLink< xAOD::TrackParticleContainer > & particle)

Set the link to the TrackParticle.

◆ taste()

virtual int xAOD::TrackCaloCluster_v1::taste ( ) const
virtual

The taste of the particle.

◆ trackParticle()

const xAOD::TrackParticle * xAOD::TrackCaloCluster_v1::trackParticle ( ) const

Returns a pointer (which can be NULL) to the xAOD::TrackParticle associated with this TrackCaloCluster.

◆ trackParticleLink()

const ElementLink< xAOD::TrackParticleContainer > & xAOD::TrackCaloCluster_v1::trackParticleLink ( ) const

◆ type()

Type::ObjectType xAOD::TrackCaloCluster_v1::type ( ) const
virtual

The type of the object as a simple enumeration.

Implements xAOD::IParticle.

Definition at line 46 of file TrackCaloCluster_v1.cxx.

46 {
47 return Type::TrackCaloCluster;
48 }

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