SND@LHC Software
Loading...
Searching...
No Matches
ecalModule.h
Go to the documentation of this file.
1
8
#ifndef ECALMODULE_H
9
#define ECALMODULE_H
10
11
#include "
ecalCell.h
"
12
13
#include <vector>
14
#include <list>
15
16
class
ecalModule
:
public
ecalCell
17
{
18
19
public
:
20
// Set mc==1 to construct ecalCellMC, not ecalCell
21
ecalModule
(
char
type=1, Int_t cellnumber=-1, Float_t x1=0, Float_t y1=0, Float_t x2=0, Float_t y2=0, Int_t mc=0,Float_t energy=0);
22
23
ecalCell
*
Locate
(Int_t x, Int_t y)
const
;
24
25
//Faster than Locate, but doesn't check boundaries
26
inline
ecalCell
*
At
(Int_t x, Int_t y)
const
{
return
fCells
[y*
GetType
()+x];}
27
ecalCell
*
FindCell
(Float_t x, Float_t y)
const
;
28
void
AddEnergy
(Float_t x, Float_t y, Float_t energy);
29
inline
Float_t
GetEnergy
(Float_t x, Float_t y)
const
30
{
31
ecalCell
* tmp=
FindCell
(x,y);
32
if
(tmp)
return
tmp->GetEnergy();
33
return
-1;
34
}
35
void
ResetModule
();
36
37
inline
Float_t
GetDX
()
const
{
return
fDx
;}
38
inline
Float_t
GetDY
()
const
{
return
fDy
;}
39
std::vector<ecalCell*>
GetCells
()
const
{
return
fCells
;}
40
41
//returns cells for which X1<x<X2
42
std::list<ecalCell*>
GetCellsX
(Float_t x)
const
;
43
//returns cells for which Y1<y<Y2
44
std::list<ecalCell*>
GetCellsY
(Float_t y)
const
;
45
46
private
:
48
Float_t
fDx
;
50
Float_t
fDy
;
52
std::vector<ecalCell*>
fCells
;
53
54
ClassDef
(
ecalModule
,1);
55
};
56
57
inline
void
ecalModule::ResetModule
()
58
{
59
ResetEnergyFast
();
60
for
(UInt_t i=0;i<
fCells
.size();i++)
fCells
[i]->
ResetEnergyFast
();
61
}
62
#endif
ecalCell
Definition
ecalCell.h:17
ecalCell::GetType
Char_t GetType() const
Definition
ecalCell.h:26
ecalCell::ResetEnergyFast
void ResetEnergyFast()
Definition
ecalCell.h:109
ecalModule
Definition
ecalModule.h:17
ecalModule::GetEnergy
Float_t GetEnergy(Float_t x, Float_t y) const
Definition
ecalModule.h:29
ecalModule::FindCell
ecalCell * FindCell(Float_t x, Float_t y) const
Definition
ecalModule.cxx:54
ecalModule::AddEnergy
void AddEnergy(Float_t x, Float_t y, Float_t energy)
Definition
ecalModule.cxx:64
ecalModule::ResetModule
void ResetModule()
Definition
ecalModule.h:57
ecalModule::GetDX
Float_t GetDX() const
Definition
ecalModule.h:37
ecalModule::Locate
ecalCell * Locate(Int_t x, Int_t y) const
Definition
ecalModule.cxx:47
ecalModule::fCells
std::vector< ecalCell * > fCells
Definition
ecalModule.h:52
ecalModule::At
ecalCell * At(Int_t x, Int_t y) const
Definition
ecalModule.h:26
ecalModule::GetCellsY
std::list< ecalCell * > GetCellsY(Float_t y) const
Definition
ecalModule.cxx:84
ecalModule::fDx
Float_t fDx
Definition
ecalModule.h:48
ecalModule::GetCellsX
std::list< ecalCell * > GetCellsX(Float_t x) const
Definition
ecalModule.cxx:73
ecalModule::ClassDef
ClassDef(ecalModule, 1)
ecalModule::GetDY
Float_t GetDY() const
Definition
ecalModule.h:38
ecalModule::GetCells
std::vector< ecalCell * > GetCells() const
Definition
ecalModule.h:39
ecalModule::fDy
Float_t fDy
Definition
ecalModule.h:50
ecalCell.h
ecal
ecalModule.h
Generated by
1.9.8