#include <hcalStructure.h>
|
| hcalStructure (hcalInf *hcalinf) |
|
void | SetUseMC (Int_t mc=0) |
|
Int_t | GetUseMC () const |
|
void | Construct () |
|
Int_t | GetNumber (Int_t x, Int_t y) const |
|
Bool_t | AddEnergy (Float_t x, Float_t y, Float_t energy, Float_t energy2) |
|
Float_t | GetEnergy (Float_t x, Float_t y, Int_t section=0) const |
|
hcalModule * | GetModule (Float_t x, Float_t y) const |
|
Int_t | GetModuleNumber (Float_t x, Float_t y) const |
|
Float_t | GetX1 () const |
|
Float_t | GetY1 () const |
|
Float_t | GetX2 () const |
|
Float_t | GetY2 () const |
|
hcalInf * | GetHcalInf () const |
|
void | GetStructure (std::vector< hcalModule * > &stru) const |
|
void | GetModules (std::list< hcalModule * > &mdls) const |
|
void | ResetModules () |
|
hcalModule * | CreateModule (char type, Int_t number, Float_t x1, Float_t y1, Float_t x2, Float_t y2) |
|
Int_t | GetHitId (Float_t x, Float_t y) const |
|
void | GetHitXY (const Int_t hitId, Float_t &x, Float_t &y) const |
|
hcalModule * | GetModule (Int_t fVolId, Int_t §ion) |
|
hcalModule * | GetHitModule (const Int_t hitId) const |
|
Definition at line 20 of file hcalStructure.h.
◆ hcalStructure() [1/2]
hcalStructure::hcalStructure |
( |
hcalInf * |
hcalinf | ) |
|
Definition at line 69 of file hcalStructure.cxx.
70 : TNamed("hcalStructure", "Hadron calorimeter structure"),
78{
81}
Double_t GetModuleSize() const
std::vector< hcalModule * > fStructure
std::vector< hcalModule * > fHash
std::list< hcalModule * > fModules
◆ hcalStructure() [2/2]
◆ AddEnergy()
Bool_t hcalStructure::AddEnergy |
( |
Float_t |
x, |
|
|
Float_t |
y, |
|
|
Float_t |
energy, |
|
|
Float_t |
energy2 |
|
) |
| |
|
inline |
Add preshower or calorimeter energy to a module with coordinate (x,y)
Definition at line 125 of file hcalStructure.h.
126{
129 if (mdl)
130 {
133 }
134 else
135 return kFALSE;
136 return kTRUE;
137}
void AddEnergy2(Float_t energy)
void AddEnergy(Float_t energy)
hcalModule * GetModule(Float_t x, Float_t y) const
◆ ClassDef()
◆ Construct()
void hcalStructure::Construct |
( |
| ) |
|
Definition at line 84 of file hcalStructure.cxx.
85{
87
97 Int_t number;
99
101
104
108 if (type) {
111 number=(
i*100+
j)*100;
113 }
114 else
116 }
117#ifdef _DECALSTRUCT
118 Info("Construct()", "Calorimeter matrix created.");
119#endif
120
121 list<hcalModule*> neib;
122 vector<hcalModule*> cl;
123 vector<hcalModule*>::const_iterator pcl;
124
125 Int_t num;
126
130 neib.clear();
131
133 if (-1!=num) {
135 }
136
138 if (-1!=num) {
140 }
141
143 if (-1!=num) {
145 }
146
148 if (-1!=num) {
150 }
151
153 if (-1!=num) {
155 }
156
158 if (-1!=num) {
160 }
161
163 if (-1!=num) {
165 }
166
168 if (-1!=num) {
170 }
171
174 }
176}
char GetType(Int_t x, Int_t y) const
hcalModule * CreateModule(char type, Int_t number, Float_t x1, Float_t y1, Float_t x2, Float_t y2)
Int_t GetNum(Int_t x, Int_t y) const
Int_t GetNumber(Int_t x, Int_t y) const
◆ CreateModule()
hcalModule * hcalStructure::CreateModule |
( |
char |
type, |
|
|
Int_t |
number, |
|
|
Float_t |
x1, |
|
|
Float_t |
y1, |
|
|
Float_t |
x2, |
|
|
Float_t |
y2 |
|
) |
| |
Definition at line 55 of file hcalStructure.cxx.
56{
57 if (type!=1)
58 {
59 Fatal("CreateModule", "All modules in hcal should have type 1");
60 return NULL;
61 }
64 else
66}
◆ GetEnergy()
Float_t hcalStructure::GetEnergy |
( |
Float_t |
x, |
|
|
Float_t |
y, |
|
|
Int_t |
section = 0 |
|
) |
| const |
|
inline |
Definition at line 139 of file hcalStructure.h.
140{
142 if (mdl)
143 {
144 if (section==1)
146 else
148 }
149 return -1111;
150}
Float_t GetEnergy() const
Float_t GetEnergy2() const
◆ GetHcalInf()
hcalInf * hcalStructure::GetHcalInf |
( |
| ) |
const |
|
inline |
◆ GetHitId()
Int_t hcalStructure::GetHitId |
( |
Float_t |
x, |
|
|
Float_t |
y |
|
) |
| const |
|
inline |
Definition at line 153 of file hcalStructure.h.
154{
156 if (mdl)
158 else
159 return -1111;
160}
◆ GetHitModule()
hcalModule * hcalStructure::GetHitModule |
( |
const Int_t |
hitId | ) |
const |
Hit Id -> Cell
Definition at line 215 of file hcalStructure.cxx.
216{
219
220
221 Int_t mnum=hitId/10;
222 Int_t cellx = mnum/100;
223 Int_t celly = mnum%100;
224 mnum =
GetNum(cellx, celly);
225
226
227
229}
◆ GetHitXY()
void hcalStructure::GetHitXY |
( |
const Int_t |
hitId, |
|
|
Float_t & |
x, |
|
|
Float_t & |
y |
|
) |
| const |
Hit Id -> (x,y)
Definition at line 195 of file hcalStructure.cxx.
196{
199
200
201 Int_t mnum=hitId/10;
202 Int_t cellx = mnum/100;
203 Int_t celly = mnum%100;
204 mnum =
GetNum(cellx, celly);
205
206
207
209 if (module==NULL) return;
210 x=
module->GetCenterX();
211 y=
module->GetCenterY();
212}
◆ GetModule() [1/2]
hcalModule * hcalStructure::GetModule |
( |
Float_t |
x, |
|
|
Float_t |
y |
|
) |
| const |
|
inline |
get ECAL module by known module center coordinate (x,y)
Definition at line 82 of file hcalStructure.h.
83{
86 if (-1==num)
return NULL;
else return fStructure[num];
87}
Int_t GetModuleNumber(Float_t x, Float_t y) const
◆ GetModule() [2/2]
hcalModule * hcalStructure::GetModule |
( |
Int_t |
fVolId, |
|
|
Int_t & |
section |
|
) |
| |
Definition at line 20 of file hcalStructure.cxx.
21{
23 static Int_t volidmax = 0;
24 volidmax=10000000;
25
26 if ((Int_t)
fHash.size()<volidmax)
27 {
28 fHash.resize(volidmax);
31 }
32 if (volId>volidmax)
33 return NULL;
34 if (
fHash[volId]==NULL)
35 {
40 }
41 section=volId%10;
43}
static Bool_t GetCellCoordInf(Int_t fVolumeID, Float_t &x, Float_t &y, Int_t §ion)
◆ GetModuleNumber()
Int_t hcalStructure::GetModuleNumber |
( |
Float_t |
x, |
|
|
Float_t |
y |
|
) |
| const |
|
inline |
get ECAL module by known module center coordinate (x,y)
Definition at line 89 of file hcalStructure.h.
◆ GetModules()
void hcalStructure::GetModules |
( |
std::list< hcalModule * > & |
mdls | ) |
const |
|
inline |
◆ GetNum()
Int_t hcalStructure::GetNum |
( |
Int_t |
x, |
|
|
Int_t |
y |
|
) |
| const |
|
inlineprivate |
get ECAL absolute module number by known module relative number (x,y)
Definition at line 107 of file hcalStructure.h.
◆ GetNumber()
Int_t hcalStructure::GetNumber |
( |
Int_t |
x, |
|
|
Int_t |
y |
|
) |
| const |
|
inline |
get ECAL absolute module number by known module relative number (x,y) with check for the ECAL boundaries
Definition at line 97 of file hcalStructure.h.
98{
101 if (x>-1&&y>-1)
102 if (x<fHcalInf->GetXSize()&&y<fHcalInf->GetYSize())
104 return -1;
105}
◆ GetStructure()
void hcalStructure::GetStructure |
( |
std::vector< hcalModule * > & |
stru | ) |
const |
|
inline |
◆ GetUseMC()
Int_t hcalStructure::GetUseMC |
( |
| ) |
const |
|
inline |
◆ GetX1()
Float_t hcalStructure::GetX1 |
( |
| ) |
const |
|
inline |
◆ GetX2()
Float_t hcalStructure::GetX2 |
( |
| ) |
const |
|
inline |
◆ GetY1()
Float_t hcalStructure::GetY1 |
( |
| ) |
const |
|
inline |
◆ GetY2()
Float_t hcalStructure::GetY2 |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ ResetModules()
void hcalStructure::ResetModules |
( |
| ) |
|
Definition at line 179 of file hcalStructure.cxx.
180{
181 list<hcalModule*>::const_iterator
p=
fModules.begin();
183 {
185 (*p)->ResetEnergyFast();
186 }
187 else
188 {
191 }
192}
◆ Serialize()
void hcalStructure::Serialize |
( |
| ) |
|
|
private |
◆ SetUseMC()
void hcalStructure::SetUseMC |
( |
Int_t |
mc = 0 | ) |
|
|
inline |
◆ fHash
◆ fHcalInf
◆ fModules
◆ fStructure
std::vector<hcalModule*> hcalStructure::fStructure |
|
private |
◆ fUseMC
Int_t hcalStructure::fUseMC |
|
private |
◆ fX1
Float_t hcalStructure::fX1 |
|
private |
X coordibate of left bottom angle of ECAL
Definition at line 64 of file hcalStructure.h.
◆ fY1
Float_t hcalStructure::fY1 |
|
private |
Y coordibate of left bottom angle of ECAL
Definition at line 66 of file hcalStructure.h.
The documentation for this class was generated from the following files: