ATLAS Offline Software
CaloTower_v1.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef CALOEVENT_CALOTOWER_V1_H
8 #define CALOEVENT_CALOTOWER_V1_H
9 
10 #include "xAODBase/IParticle.h"
11 
12 // ROOT include(s):
13 #include "Math/Vector4D.h"
14 
15 namespace xAOD {
16 
17  class CaloTower_v1 : public IParticle
18  {
19  public:
20 
21  enum {
22  INVALIDINDEX=-1
23  };
24 
25 
29  CaloTower_v1();
30 
32  ~CaloTower_v1();
33 
37  void reset();
38 
42  void addEnergy(double energy);
46  void setEnergy(double energy);
47 
50  virtual double pt() const;
51  virtual double eta() const;
52  virtual double phi() const;
53  virtual double rapidity() const;
54  virtual double m() const;
55  virtual double e() const;
56 
59 
61  typedef ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<double> > GenVecFourMom_t;
62 
63  GenVecFourMom_t genvecP4() const;
64 
65  virtual FourMom_t p4() const;
66 
70  virtual Type::ObjectType type() const;
71 
73  private:
74 
77  float& f_ref_e();
78  float f_val_e() const;
82 
84  };
85 }
86 
87 inline float& xAOD::CaloTower_v1::f_ref_e() { static const Accessor<float> acc("towerE"); return acc(*this); }
88 
89 inline float xAOD::CaloTower_v1::f_val_e() const { static const ConstAccessor<float> acc("towerE"); return acc(*this); }
90 
122 #endif
xAOD::CaloTower_v1::f_ref_e
float & f_ref_e()
Reference to modifiable energy store.
Definition: CaloTower_v1.h:87
IParticle.h
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
xAOD::CaloTower_v1::m
virtual double m() const
mass (by convention)
Definition: CaloTower_v1.cxx:50
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::CaloTower_v1::phi
virtual double phi() const
azimuth
Definition: CaloTower_v1.cxx:44
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:69
xAOD::CaloTower_v1::INVALIDINDEX
@ INVALIDINDEX
Definition: CaloTower_v1.h:22
xAOD::CaloTower_v1::pt
virtual double pt() const
transverse momentum
Definition: CaloTower_v1.cxx:52
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
xAOD::CaloTower_v1::addEnergy
void addEnergy(double energy)
Add energy.
Definition: CaloTower_v1.cxx:22
xAOD::CaloTower_v1::~CaloTower_v1
~CaloTower_v1()
Destructor.
Definition: CaloTower_v1.cxx:19
xAOD::CaloTower_v1::p4
virtual FourMom_t p4() const
Four-momentum representation.
Definition: CaloTower_v1.cxx:58
xAOD::CaloTower_v1::f_val_e
float f_val_e() const
Accessor for energy.
Definition: CaloTower_v1.h:89
xAOD::CaloTower_v1::genvecP4
GenVecFourMom_t genvecP4() const
Four-momentum representation: GenVector.
Definition: CaloTower_v1.cxx:79
xAOD::CaloTower_v1::eta
virtual double eta() const
pseudorapidity $
Definition: CaloTower_v1.cxx:38
xAOD::CaloTower_v1::setEnergy
void setEnergy(double energy)
Sets the energy.
Definition: CaloTower_v1.cxx:26
xAOD::CaloTower_v1::CaloTower_v1
CaloTower_v1()
Default constructor.
Definition: CaloTower_v1.cxx:14
xAOD::CaloTower_v1
!
Definition: CaloTower_v1.h:18
xAOD::CaloTower_v1::reset
void reset()
Reset function.
Definition: CaloTower_v1.cxx:30
xAOD::CaloTower_v1::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for calo.
Definition: CaloTower_v1.h:61
xAOD::CaloTower_v1::e
virtual double e() const
energy
Definition: CaloTower_v1.cxx:36
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::CaloTower_v1::rapidity
virtual double rapidity() const
rapidity
Definition: CaloTower_v1.cxx:51
xAOD::CaloTower_v1::type
virtual Type::ObjectType type() const
object type - presently Type::Other (FIXME)
Definition: CaloTower_v1.cxx:55
xAOD::CaloTower_v1::FourMom_t
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition: CaloTower_v1.h:58