ATLAS Offline Software
Event
xAOD
xAODCaloEvent
Root
CaloTower_v1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
xAODCaloEvent/versions/CaloTower_v1.h
"
7
#include "
xAODCaloEvent/versions/CaloTowerContainer_v1.h
"
8
#include <cmath>
9
10
namespace
{
11
const
double
s_towerMass{0.};
12
}
13
14
xAOD::CaloTower_v1::CaloTower_v1
()
15
:
IParticle
()
16
{}
17
18
19
xAOD::CaloTower_v1::~CaloTower_v1
()
20
{ }
21
22
void
xAOD::CaloTower_v1::addEnergy
(
double
energy
) {
23
f_ref_e() +=
energy
;
24
}
25
26
void
xAOD::CaloTower_v1::setEnergy
(
double
energy
) {
27
f_ref_e() =
energy
;
28
}
29
30
void
xAOD::CaloTower_v1::reset
() {
31
f_ref_e() = 0.;
32
}
33
34
35
36
double
xAOD::CaloTower_v1::e
()
const
{
return
f_val_e(); }
37
38
double
xAOD::CaloTower_v1::eta
()
const
{
39
const
CaloTowerContainer_v1
* pTowCont =
40
static_cast<
const
CaloTowerContainer_v1
*
>
(container());
41
return
pTowCont->
eta
(
index
());
42
}
43
44
double
xAOD::CaloTower_v1::phi
()
const
{
45
const
CaloTowerContainer_v1
* pTowCont =
46
static_cast<
const
CaloTowerContainer_v1
*
>
(container());
47
return
pTowCont->
phi
(
index
());
48
}
49
50
double
xAOD::CaloTower_v1::m
()
const
{
return
s_towerMass; }
51
double
xAOD::CaloTower_v1::rapidity
()
const
{
return
eta(); }
52
double
xAOD::CaloTower_v1::pt
()
const
{
return
genvecP4().Pt(); }
53
54
// FIXME!!!
55
xAOD::Type::ObjectType
xAOD::CaloTower_v1::type
()
const
{
return
Type::ObjectType::Other; }
56
57
58
xAOD::CaloTower_v1::FourMom_t
xAOD::CaloTower_v1::p4
()
const
{
59
60
FourMom_t
p4;
61
62
if
(
e
() <= 0) {
63
// negative energy towers do not have a valid four-momentum representation (but a valid energy, eta, phi)
64
return
p4;
65
}
66
67
const
CaloTowerContainer_v1
* pTowCont =
68
static_cast<
const
CaloTowerContainer_v1
*
>
(container());
69
70
71
const
double
eta=pTowCont->
eta
(
index
());
72
const
double
phi
=pTowCont->
phi
(
index
());
73
const
double
invcosheta = 1./std::cosh(eta);
74
const
double
pt
=
e
()*invcosheta;
75
p4.SetPtEtaPhiM(
pt
,eta,
phi
,
m
());
76
return
p4;
77
}
78
79
xAOD::CaloTower_v1::GenVecFourMom_t
xAOD::CaloTower_v1::genvecP4
()
const
{
80
81
if
(
e
() <= 0) {
82
// negative energy towers do not have a valid four-momentum representation (but a valid energy, eta, phi)
83
return
GenVecFourMom_t
();
84
}
85
86
const
CaloTowerContainer_v1
* pTowCont =
87
static_cast<
const
CaloTowerContainer_v1
*
>
(container());
88
89
90
const
double
eta=pTowCont->
eta
(
index
());
91
const
double
phi
=pTowCont->
phi
(
index
());
92
const
double
invcosheta = 1./std::cosh(eta);
93
const
double
pt
=
e
()*invcosheta;
94
return
GenVecFourMom_t
(
pt
,eta,
phi
,
m
());
95
}
python.SystemOfUnits.m
int m
Definition:
SystemOfUnits.py:91
xAOD::CaloTowerContainer_v1
Basic container storing all information need for xAOD::CaloTower_v1 objects.
Definition:
CaloTowerContainer_v1.h:21
ObjectType
ObjectType
Definition:
BaseObject.h:11
CaloTower_v1.h
xAOD::CaloTower_v1::m
virtual double m() const
mass (by convention)
Definition:
CaloTower_v1.cxx:50
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: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::phi
setEt phi
Definition:
TrigEMCluster_v1.cxx:29
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::e
setPy e
Definition:
CompositeParticle_v1.cxx:166
xAOD::CaloTower_v1::~CaloTower_v1
~CaloTower_v1()
Destructor.
Definition:
CaloTower_v1.cxx:19
DerivationFramework::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for TrackParticle.
Definition:
Cascade3Plus1.cxx:27
xAOD::CaloTower_v1::p4
virtual FourMom_t p4() const
Four-momentum representation.
Definition:
CaloTower_v1.cxx:58
CaloTowerContainer_v1.h
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::CaloTowerContainer_v1::phi
double phi(size_t index) const
Definition:
CaloTowerContainer_v1.cxx:86
xAOD::CaloTower_v1::setEnergy
void setEnergy(double energy)
Sets the energy.
Definition:
CaloTower_v1.cxx:26
DeMoScan.index
string index
Definition:
DeMoScan.py:364
xAOD::CaloTower_v1::CaloTower_v1
CaloTower_v1()
Default constructor.
Definition:
CaloTower_v1.cxx:14
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
xAOD::CaloTower_v1::rapidity
virtual double rapidity() const
rapidity
Definition:
CaloTower_v1.cxx:51
xAOD::CaloTowerContainer_v1::eta
double eta(size_t index) const
Definition:
CaloTowerContainer_v1.cxx:77
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
Generated on Sun Dec 22 2024 21:08:05 for ATLAS Offline Software by
1.8.18