ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloEvent
src
CaloCell.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// base class for Calorimeter Cells
6
#include "
CaloEvent/CaloCell.h
"
7
#include "CLHEP/Geometry/Vector3D.h"
8
#include "CLHEP/Geometry/Point3D.h"
9
#include "CaloDetDescr/CaloDetDescrElement.h"
10
#include "
AthenaKernel/BaseInfo.h
"
11
#include <cmath>
12
13
CaloCell::~CaloCell
()
14
{
15
// destructor
16
}
17
18
19
CaloCell::CaloCell
(
const
CaloDetDescrElement
*
caloDDE
,
20
float
energy
,
21
float
time
,
22
double
quality
,
23
CaloGain::CaloGain
gain
)
24
:
25
m_energy
(
energy
),
26
m_time
(
time
),
27
m_quality
((int)(
quality
)),
28
m_ID
(
caloDDE
?
caloDDE
->identify() :
Identifier
()),
29
m_gain
(
gain
),
30
m_caloDDE
(
caloDDE
)
31
{}
32
33
// cppcheck-suppress uninitMemberVar ; m_quality
34
CaloCell::CaloCell
(
const
CaloDetDescrElement
*
caloDDE
,
35
float
energy
,
36
float
time
,
37
uint16_t
quality
,
38
uint16_t
provenance
,
39
CaloGain::CaloGain
gain
)
40
:
41
m_energy
(
energy
),
42
m_time
(
time
),
43
m_ID
(
caloDDE
?
caloDDE
->identify() :
Identifier
()),
44
m_gain
(
gain
),
45
m_caloDDE
(
caloDDE
)
46
{
47
m_qualProv
[0]=
quality
;
48
// cppcheck-suppress objectIndex
49
m_qualProv
[1]=
provenance
;
50
}
51
52
53
CaloCell::CaloCell
(
const
CaloDetDescrElement
*
caloDDE
,
54
const
Identifier
&
ID
,
55
float
energy
,
56
float
time
,
57
double
quality
,
58
CaloGain::CaloGain
gain
)
59
:
60
m_energy
(
energy
),
61
m_time
(
time
),
62
m_quality
((int)(
quality
)),
63
m_ID
(
ID
),
64
m_gain
(
gain
),
65
m_caloDDE
(
caloDDE
)
66
{}
67
68
// cppcheck-suppress uninitMemberVar ; m_quality
69
CaloCell::CaloCell
(
const
CaloDetDescrElement
*
caloDDE
,
70
const
Identifier
&
ID
,
71
float
energy
,
72
float
time
,
73
uint16_t
quality
,
74
uint16_t
provenance
,
75
CaloGain::CaloGain
gain
)
76
:
77
m_energy
(
energy
),
78
m_time
(
time
),
79
m_ID
(
ID
),
80
m_gain
(
gain
),
81
m_caloDDE
(
caloDDE
)
82
{
83
m_qualProv
[0]=
quality
;
84
// cppcheck-suppress objectIndex
85
m_qualProv
[1]=
provenance
;
86
}
87
88
89
void
CaloCell::set
(
float
energy
,
90
float
time
,
91
uint16_t
quality
,
92
uint16_t
provenance
,
93
CaloGain::CaloGain
gain
)
94
{
95
m_energy
=
energy
;
96
m_time
=
time
;
97
m_gain
=
gain
;
98
m_qualProv
[0]=
quality
;
99
// cppcheck-suppress objectIndex
100
m_qualProv
[1]=
provenance
;
101
}
102
103
104
void
CaloCell::set
(
float
energy
,
105
float
time
,
106
double
quality
,
107
CaloGain::CaloGain
gain
)
108
{
109
m_energy
=
energy
;
110
m_time
=
time
;
111
m_quality
= (int)(
quality
);
112
m_gain
=
gain
;
113
}
114
115
void
CaloCell::set4Mom
(
const
I4Momentum
*
const
)
116
{
117
std::cout <<
" FATAL ERROR : CaloCell::set4Mom called. Cannot change 4mom "
<< std::endl ;
118
std::abort();
119
}
120
121
void
CaloCell::set4Mom
(
const
I4Momentum
& )
122
{
123
std::cout <<
" FATAL ERROR : CaloCell::set4Mom called. Cannot change 4mom "
<< std::endl ;
124
std::abort();
125
}
126
127
void
CaloCell::set4Mom
(
const
CLHEP::HepLorentzVector & )
128
{
129
std::cout <<
" FATAL ERROR : CaloCell::set4Mom called. Cannot change 4mom "
<< std::endl ;
130
std::abort();
131
}
132
133
134
std::unique_ptr<CaloCell>
CaloCell::clone
()
const
135
{
136
return
std::make_unique<CaloCell>(this->
caloDDE
(),
137
this->
energy
(),
138
this->
time
(),
139
this->
quality
(),
140
this->
provenance
(),
141
this->
gain
() );
142
}
143
144
bool
CaloCell::badcell
()
const
145
{
146
// actual correct implementation is in LArCell and TileCell
147
return
false
;
148
}
149
150
151
SG_ADD_BASE
(
CaloCell
,
INavigable4Momentum
);
CaloCell.h
BaseInfo.h
Provide an interface for finding inheritance information at run time.
SG_ADD_BASE
#define SG_ADD_BASE(D, B)
Add a new base class B to class D.
Definition
Control/AthenaKernel/AthenaKernel/BaseInfo.h:325
CaloCell
Data object for each calorimeter readout cell.
Definition
CaloCell.h:57
CaloCell::time
float time() const
get time (data member)
Definition
CaloCell.h:368
CaloCell::m_caloDDE
const CaloDetDescrElement * m_caloDDE
pointer to static CaloDetDescrElement to access information that does not change from event to event
Definition
CaloCell.h:256
CaloCell::m_quality
int m_quality
Definition
CaloCell.h:245
CaloCell::CaloCell
CaloCell()
default constructor (should not be used, only there for persistency reason)
Definition
CaloCell.h:263
CaloCell::m_energy
float m_energy
energy (in MeV)
Definition
CaloCell.h:230
CaloCell::energy
double energy() const
get energy (data member)
Definition
CaloCell.h:327
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition
CaloCell.h:321
CaloCell::provenance
uint16_t provenance() const
get provenance (data member)
Definition
CaloCell.h:354
CaloCell::set4Mom
virtual void set4Mom(const I4Momentum *const theI4Mom) override final
set 4Momentum (will throw exception since cannot be implemented)
Definition
CaloCell.cxx:115
CaloCell::~CaloCell
virtual ~CaloCell()
default destructor
Definition
CaloCell.cxx:13
CaloCell::quality
uint16_t quality() const
get quality (data member)
Definition
CaloCell.h:348
CaloCell::set
void set(const CaloDetDescrElement *caloDDE, const Identifier &ID)
Fast method to change the identity of a cell.
Definition
CaloCell.h:511
CaloCell::m_time
float m_time
time
Definition
CaloCell.h:232
CaloCell::badcell
virtual bool badcell() const
check is cell is dead
Definition
CaloCell.cxx:144
CaloCell::gain
CaloGain::CaloGain gain() const
get gain (data member )
Definition
CaloCell.h:361
CaloCell::m_ID
Identifier m_ID
offline identifier
Definition
CaloCell.h:251
CaloCell::clone
virtual std::unique_ptr< CaloCell > clone() const
clone a CaloCell
Definition
CaloCell.cxx:134
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition
CaloCell.h:295
CaloCell::m_gain
CaloGain::CaloGain m_gain
gain
Definition
CaloCell.h:253
CaloCell::m_qualProv
uint16_t m_qualProv[2]
Definition
CaloCell.h:246
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell.
Definition
Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
I4Momentum
I4Momentum is an abstract base class providing 4-momentum behavior.
Definition
I4Momentum.h:31
INavigable4Momentum
Definition
INavigable4Momentum.h:21
CaloGain::CaloGain
CaloGain
Definition
CaloGain.h:11
Identifier
Definition
IdentifierFieldParser.cxx:14
Generated on
for ATLAS Offline Software by
1.17.0