SND@LHC Software
Loading...
Searching...
No Matches
hcalModule Class Reference

#include <hcalModule.h>

Inheritance diagram for hcalModule:
Collaboration diagram for hcalModule:

Public Member Functions

 hcalModule (Int_t modulenumber, Float_t x1=0, Float_t y1=0, Float_t x2=0, Float_t y2=0)
 
Bool_t IsInside (Float_t x, Float_t y)
 
Float_t X1 () const
 
Float_t Y1 () const
 
Float_t X2 () const
 
Float_t Y2 () const
 
Float_t GetX1 () const
 
Float_t GetY1 () const
 
Float_t GetX2 () const
 
Float_t GetY2 () const
 
Float_t GetCenterX () const
 
Float_t GetCenterY () const
 
Short_t ADC () const
 
Short_t GetADC () const
 
Int_t GetNumber () const
 
Float_t GetEnergy () const
 
Float_t GetEnergy2 () const
 
void GetNeighborsList (std::list< hcalModule * > &neib) const
 
void SetNeighborsList (std::list< hcalModule * > &neib)
 
void SetEnergy (Float_t energy)
 
void SetEnergy2 (Float_t energy)
 
void SetADC (Short_t adc)
 
void ResetEnergyFast ()
 
void AddEnergy (Float_t energy)
 
void AddEnergy2 (Float_t energy)
 
void GetClusterEnergy (Float_t &EcalEnergy)
 
void SetCoord (Float_t x1, Float_t y1, Float_t x2, Float_t y2)
 
Int_t CountNeighbors (const std::list< hcalModule * > &lst) const
 

Private Member Functions

 ClassDef (hcalModule, 1)
 

Private Attributes

Int_t fNumber
 
Float_t fX1
 
Float_t fY1
 
Float_t fX2
 
Float_t fY2
 
Float_t fEnergy
 
Float_t fEnergy2
 
Short_t fADC
 
std::list< hcalModule * > fNeighbors
 

Detailed Description

hcalModule.h

Author
Mikhail Prokudin

hcalModule module

Definition at line 16 of file hcalModule.h.

Constructor & Destructor Documentation

◆ hcalModule()

hcalModule::hcalModule ( Int_t  modulenumber,
Float_t  x1 = 0,
Float_t  y1 = 0,
Float_t  x2 = 0,
Float_t  y2 = 0 
)
inline

Definition at line 19 of file hcalModule.h.

20 : TObject(), fNumber(modulenumber), fX1(x1), fY1(y1), fX2(x2),
21 fY2(y2), fEnergy(0), fEnergy2(0), fADC(-1111), fNeighbors()
22 {};
Int_t fNumber
Definition hcalModule.h:69
Float_t fEnergy
Definition hcalModule.h:79
Float_t fY2
Definition hcalModule.h:77
Float_t fX2
Definition hcalModule.h:75
Float_t fX1
Definition hcalModule.h:71
Float_t fY1
Definition hcalModule.h:73
Float_t fEnergy2
Definition hcalModule.h:81
std::list< hcalModule * > fNeighbors
Definition hcalModule.h:87
Short_t fADC
Definition hcalModule.h:83

Member Function Documentation

◆ ADC()

Short_t hcalModule::ADC ( ) const
inline

Definition at line 36 of file hcalModule.h.

36{return fADC;}

◆ AddEnergy()

void hcalModule::AddEnergy ( Float_t  energy)
inline

Definition at line 57 of file hcalModule.h.

◆ AddEnergy2()

void hcalModule::AddEnergy2 ( Float_t  energy)
inline

Definition at line 58 of file hcalModule.h.

◆ ClassDef()

hcalModule::ClassDef ( hcalModule  ,
 
)
private

◆ CountNeighbors()

Int_t hcalModule::CountNeighbors ( const std::list< hcalModule * > &  lst) const

returns number of neighbors in list with module

Definition at line 18 of file hcalModule.cxx.

19{
20 Int_t c=0;
21 list<hcalModule*>::const_iterator p=lst.begin();
22 for(;p!=lst.end();++p)
23 if (find(fNeighbors.begin(), fNeighbors.end(), *p)!=fNeighbors.end())
24 ++c;
25
26 return c;
27}
c
Definition hnl.py:100

◆ GetADC()

Short_t hcalModule::GetADC ( ) const
inline

Definition at line 37 of file hcalModule.h.

37{return fADC;}

◆ GetCenterX()

Float_t hcalModule::GetCenterX ( ) const
inline

Definition at line 34 of file hcalModule.h.

34{return (fX1+fX2)/2.0;}

◆ GetCenterY()

Float_t hcalModule::GetCenterY ( ) const
inline

Definition at line 35 of file hcalModule.h.

35{return (fY1+fY2)/2.0;}

◆ GetClusterEnergy()

void hcalModule::GetClusterEnergy ( Float_t &  EcalEnergy)

3x3 cluster, first section

Definition at line 30 of file hcalModule.cxx.

31{
32 EcalEnergy=-1;
33 EcalEnergy=GetEnergy();
34 list<hcalModule*>::const_iterator p;
35 for(p=fNeighbors.begin();p!=fNeighbors.end();++p)
36 {
37 EcalEnergy+=(*p)->GetEnergy();
38 }
39}
Float_t GetEnergy() const
Definition hcalModule.h:41

◆ GetEnergy()

Float_t hcalModule::GetEnergy ( ) const
inline

Definition at line 41 of file hcalModule.h.

41{return fEnergy;}

◆ GetEnergy2()

Float_t hcalModule::GetEnergy2 ( ) const
inline

Definition at line 42 of file hcalModule.h.

42{return fEnergy2;}

◆ GetNeighborsList()

void hcalModule::GetNeighborsList ( std::list< hcalModule * > &  neib) const
inline

Definition at line 44 of file hcalModule.h.

45 {
46 neib=fNeighbors;
47 }

◆ GetNumber()

Int_t hcalModule::GetNumber ( ) const
inline

Definition at line 39 of file hcalModule.h.

39{return fNumber;}

◆ GetX1()

Float_t hcalModule::GetX1 ( ) const
inline

Definition at line 30 of file hcalModule.h.

30{return fX1;}

◆ GetX2()

Float_t hcalModule::GetX2 ( ) const
inline

Definition at line 32 of file hcalModule.h.

32{return fX2;}

◆ GetY1()

Float_t hcalModule::GetY1 ( ) const
inline

Definition at line 31 of file hcalModule.h.

31{return fY1;}

◆ GetY2()

Float_t hcalModule::GetY2 ( ) const
inline

Definition at line 33 of file hcalModule.h.

33{return fY2;}

◆ IsInside()

Bool_t hcalModule::IsInside ( Float_t  x,
Float_t  y 
)
inline

Definition at line 24 of file hcalModule.h.

24{return x>GetX1()&&x<GetX2()&&y>GetY1()&&y<GetY2();}
Float_t GetX2() const
Definition hcalModule.h:32
Float_t GetY2() const
Definition hcalModule.h:33
Float_t GetY1() const
Definition hcalModule.h:31
Float_t GetX1() const
Definition hcalModule.h:30

◆ ResetEnergyFast()

void hcalModule::ResetEnergyFast ( )
inline

Reset all energies in module

Definition at line 92 of file hcalModule.h.

93{
94 fEnergy=0.0;
95 fEnergy2=0.0;
96 fADC=-1111;
97}

◆ SetADC()

void hcalModule::SetADC ( Short_t  adc)
inline

Definition at line 54 of file hcalModule.h.

54{fADC=adc;}

◆ SetCoord()

void hcalModule::SetCoord ( Float_t  x1,
Float_t  y1,
Float_t  x2,
Float_t  y2 
)
inline

Definition at line 63 of file hcalModule.h.

64 { fX1=x1; fY1=y1; fX2=x2; fY2=y2; }

◆ SetEnergy()

void hcalModule::SetEnergy ( Float_t  energy)
inline

Definition at line 52 of file hcalModule.h.

◆ SetEnergy2()

void hcalModule::SetEnergy2 ( Float_t  energy)
inline

Definition at line 53 of file hcalModule.h.

◆ SetNeighborsList()

void hcalModule::SetNeighborsList ( std::list< hcalModule * > &  neib)
inline

Definition at line 48 of file hcalModule.h.

49 {
50 fNeighbors=neib;
51 }

◆ X1()

Float_t hcalModule::X1 ( ) const
inline

Definition at line 26 of file hcalModule.h.

26{return fX1;}

◆ X2()

Float_t hcalModule::X2 ( ) const
inline

Definition at line 28 of file hcalModule.h.

28{return fX2;}

◆ Y1()

Float_t hcalModule::Y1 ( ) const
inline

Definition at line 27 of file hcalModule.h.

27{return fY1;}

◆ Y2()

Float_t hcalModule::Y2 ( ) const
inline

Definition at line 29 of file hcalModule.h.

29{return fY2;}

Member Data Documentation

◆ fADC

Short_t hcalModule::fADC
private

ADC counts read

Definition at line 83 of file hcalModule.h.

◆ fEnergy

Float_t hcalModule::fEnergy
private

energy in first section of hcal module

Definition at line 79 of file hcalModule.h.

◆ fEnergy2

Float_t hcalModule::fEnergy2
private

energy in second section of hcal module

Definition at line 81 of file hcalModule.h.

◆ fNeighbors

std::list<hcalModule*> hcalModule::fNeighbors
private

list of neighbor modules

Definition at line 87 of file hcalModule.h.

◆ fNumber

Int_t hcalModule::fNumber
private

module number

Definition at line 69 of file hcalModule.h.

◆ fX1

Float_t hcalModule::fX1
private

left edge of the module

Definition at line 71 of file hcalModule.h.

◆ fX2

Float_t hcalModule::fX2
private

right edge of the module

Definition at line 75 of file hcalModule.h.

◆ fY1

Float_t hcalModule::fY1
private

bottom edge of the module

Definition at line 73 of file hcalModule.h.

◆ fY2

Float_t hcalModule::fY2
private

upper edge of the module

Definition at line 77 of file hcalModule.h.


The documentation for this class was generated from the following files: