ATLAS Offline Software
Loading...
Searching...
No Matches
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
7#include "CLHEP/Geometry/Vector3D.h"
8#include "CLHEP/Geometry/Point3D.h"
9#include "CaloDetDescr/CaloDetDescrElement.h"
11#include <cmath>
12
14{
15// destructor
16}
17
18
20 float energy,
21 float time,
22 double quality,
24 :
26 m_time(time),
27 m_quality((int)(quality)),
28 m_ID(caloDDE ? caloDDE->identify() : Identifier()),
29 m_gain(gain),
31{}
32
33// cppcheck-suppress uninitMemberVar ; m_quality
35 float energy,
36 float time,
37 uint16_t quality,
38 uint16_t provenance,
40 :
42 m_time(time),
43 m_ID(caloDDE ? caloDDE->identify() : Identifier()),
44 m_gain(gain),
46{
48 // cppcheck-suppress objectIndex
50}
51
52
54 const Identifier & ID,
55 float energy,
56 float time,
57 double quality,
59 :
61 m_time(time),
62 m_quality((int)(quality)),
63 m_ID(ID),
64 m_gain(gain),
66{}
67
68// cppcheck-suppress uninitMemberVar ; m_quality
70 const Identifier & ID,
71 float energy,
72 float time,
73 uint16_t quality,
74 uint16_t provenance,
76 :
78 m_time(time),
79 m_ID(ID),
80 m_gain(gain),
82{
84 // cppcheck-suppress objectIndex
86}
87
88
90 float time,
91 uint16_t quality,
92 uint16_t provenance,
94{
96 m_time = time;
97 m_gain = gain;
99 // cppcheck-suppress objectIndex
101}
102
103
105 float time,
106 double quality,
108{
110 m_time = time;
111 m_quality = (int)(quality);
112 m_gain = gain;
113}
114
115void CaloCell::set4Mom (const I4Momentum * const )
116{
117 std::cout << " FATAL ERROR : CaloCell::set4Mom called. Cannot change 4mom " << std::endl ;
118 std::abort();
119}
120
122{
123 std::cout << " FATAL ERROR : CaloCell::set4Mom called. Cannot change 4mom " << std::endl ;
124 std::abort();
125}
126
127void 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
134std::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
145{
146 // actual correct implementation is in LArCell and TileCell
147 return false;
148}
149
150
Provide an interface for finding inheritance information at run time.
#define SG_ADD_BASE(D, B)
Add a new base class B to class D.
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
float time() const
get time (data member)
Definition CaloCell.h:368
const CaloDetDescrElement * m_caloDDE
pointer to static CaloDetDescrElement to access information that does not change from event to event
Definition CaloCell.h:256
int m_quality
Definition CaloCell.h:245
CaloCell()
default constructor (should not be used, only there for persistency reason)
Definition CaloCell.h:263
float m_energy
energy (in MeV)
Definition CaloCell.h:230
double energy() const
get energy (data member)
Definition CaloCell.h:327
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
uint16_t provenance() const
get provenance (data member)
Definition CaloCell.h:354
virtual void set4Mom(const I4Momentum *const theI4Mom) override final
set 4Momentum (will throw exception since cannot be implemented)
Definition CaloCell.cxx:115
virtual ~CaloCell()
default destructor
Definition CaloCell.cxx:13
uint16_t quality() const
get quality (data member)
Definition CaloCell.h:348
void set(const CaloDetDescrElement *caloDDE, const Identifier &ID)
Fast method to change the identity of a cell.
Definition CaloCell.h:511
float m_time
time
Definition CaloCell.h:232
virtual bool badcell() const
check is cell is dead
Definition CaloCell.cxx:144
CaloGain::CaloGain gain() const
get gain (data member )
Definition CaloCell.h:361
Identifier m_ID
offline identifier
Definition CaloCell.h:251
virtual std::unique_ptr< CaloCell > clone() const
clone a CaloCell
Definition CaloCell.cxx:134
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition CaloCell.h:295
CaloGain::CaloGain m_gain
gain
Definition CaloCell.h:253
uint16_t m_qualProv[2]
Definition CaloCell.h:246
This class groups all DetDescr information related to a CaloCell.
I4Momentum is an abstract base class providing 4-momentum behavior.
Definition I4Momentum.h:31