ATLAS Offline Software
TrackCaloCluster_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 // $Id: TrackCaloCluster_v1.cxx $
5 
6 // Misc includes
7 #include <bitset>
8 #include <vector>
9 
10 // EDM include(s):
12 
13 // Local include(s):
15 
16 namespace xAOD {
17 
19 
21 
22  double TrackCaloCluster_v1::e() const {
23  return genvecP4().E();
24  }
25 
27  return genvecP4().Rapidity();
28  }
29 
35 
37  FourMom_t p4;
38  p4.SetPtEtaPhiM( pt(), eta(), phi(), m() );
39  return p4;
40  }
41 
43  return GenVecFourMom_t( pt(), eta(), phi(),m());
44  }
45 
48  }
49 
52  trackParticleLink,
53  setTrackParticleLink)
54 
56  // The accessor:
57  static const SG::AuxElement::Accessor< ElementLink< xAOD::TrackParticleContainer > > acc( "trackPartcleLink" );
58  if( !acc.isAvailable( *this ) ) {
59  return nullptr;
60  }
61  if( !acc( *this ).isValid() ) {
62  return nullptr;
63  }
64  return *(acc( *this ));
65  }
66 
67  AUXSTORE_OBJECT_SETTER_AND_GETTER( TrackCaloCluster_v1,
69  caloClusterLinks,
70  setCaloClusterLinks)
71 
72  void TrackCaloCluster_v1::setParameters(float pt, float eta, float phi, float m, TrackCaloCluster_v1::Taste taste,
75 
76  static const Accessor< float > acc1( "pt" );
77  acc1( *this ) = pt;
78  static const Accessor< float > acc2( "eta" );
79  acc2( *this ) = eta;
80  static const Accessor< float > acc3( "phi" );
81  acc3( *this ) = phi;
82  static const Accessor< float > acc4( "m" );
83  acc4( *this ) = m;
84 
85  static const Accessor< int > acc( "taste" );
86  acc( *this ) = (int)taste;
87 
90 
91  }
92 
93 
94 
95 } // namespace xAOD
python.CaloBCIDAvgAlgConfig.acc3
def acc3
Definition: CaloBCIDAvgAlgConfig.py:68
xAOD::TrackCaloCluster_v1::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type (GenVector version)
Definition: TrackCaloCluster_v1.h:61
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
AuxStoreAccessorMacros.h
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
xAOD::TrackCaloCluster_v1
Class describing a TrackCaloCluster.
Definition: TrackCaloCluster_v1.h:25
xAOD::TrackCaloCluster_v1::setCaloClusterLinks
void setCaloClusterLinks(const std::vector< ElementLink< xAOD::CaloClusterContainer > > &caloClusterLinks)
Set the links to the CaloClusters.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::pt
setRcore setEtHad setFside pt
Definition: TrigPhoton_v1.cxx:106
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
xAOD::TrackCaloCluster_v1::trackParticle
const xAOD::TrackParticle * trackParticle() const
Returns a pointer (which can be NULL) to the xAOD::TrackParticle associated with this TrackCaloCluste...
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:68
xAOD::TrackCaloCluster
TrackCaloCluster_v1 TrackCaloCluster
Reference the current persistent version:
Definition: TrackCaloCluster.h:12
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
xAOD::TrackCaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
xAOD::TrackCaloCluster_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
xAOD::TrackCaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle (has range to .)
xAOD::TrackCaloCluster_v1::setTrackParticleLink
void setTrackParticleLink(const ElementLink< xAOD::TrackParticleContainer > &particle)
Set the link to the TrackParticle.
xAOD::TrackCaloCluster_v1::m
virtual double m() const
The invariant mass of the particle..
xAOD::TrackCaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: TrackCaloCluster_v1.cxx:22
python.CaloBCIDAvgAlgConfig.acc1
def acc1
Definition: CaloBCIDAvgAlgConfig.py:48
xAOD::AUXSTORE_PRIMITIVE_GETTER_WITH_CAST
AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(Muon_v1, uint8_t, Muon_v1::EnergyLossType, energyLossType) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(Muon_v1
python.CaloBCIDAvgAlgConfig.acc2
def acc2
Definition: CaloBCIDAvgAlgConfig.py:58
python.LArRecUtilsConfig.acc4
def acc4
Definition: LArRecUtilsConfig.py:196
xAOD::TrackCaloCluster_v1::genvecP4
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector version.
Definition: TrackCaloCluster_v1.cxx:42
xAOD::TrackCaloCluster_v1::taste
virtual int taste() const
The taste of the particle.
xAOD::TrackCaloCluster_v1::rapidity
virtual double rapidity() const
The true rapidity (y) of the particle.
Definition: TrackCaloCluster_v1.cxx:26
TrackCaloCluster_v1.h
xAOD::TrackCaloCluster_v1::Taste
Taste
Type of TrackCaloCluster - Charged - Neutral - Combined.
Definition: TrackCaloCluster_v1.h:30
xAOD::TrackCaloCluster_v1::~TrackCaloCluster_v1
~TrackCaloCluster_v1()
Definition: TrackCaloCluster_v1.cxx:20
AUXSTORE_PRIMITIVE_GETTER
#define AUXSTORE_PRIMITIVE_GETTER(CL, TYPE, NAME)
Macro creating the reader function for a primitive auxiliary property.
Definition: AuxStoreAccessorMacros.h:59
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
xAOD::TrackCaloCluster_v1::TrackCaloCluster_v1
TrackCaloCluster_v1()
Definition: TrackCaloCluster_v1.cxx:18
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::TrackCaloCluster_v1::type
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
Definition: TrackCaloCluster_v1.cxx:46
xAOD::TrackCaloCluster_v1::setParameters
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)
xAOD::int
setRawEt setRawPhi int
Definition: TrigCaloCluster_v1.cxx:33
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27