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

#include <ecalCell.h>

Inheritance diagram for ecalCell:
Collaboration diagram for ecalCell:

Public Member Functions

 ecalCell (Int_t cellnumber, Float_t x1=0, Float_t y1=0, Float_t x2=0, Float_t y2=0, Char_t type=0, Float_t energy=0)
 
Bool_t IsInside (Float_t x, Float_t y)
 
Char_t GetType () const
 
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 GetCellNumber () const
 
Float_t GetEnergy () const
 
Float_t GetTime () const
 
void SetTime (Float_t time)
 
void GetNeighborsList (std::list< ecalCell * > &neib) const
 
void SetNeighborsList (std::list< ecalCell * > &neib)
 
void Get5x5Cluster (std::list< ecalCell * > &cls)
 
void SetEnergy (Float_t energy)
 
void SetADC (Short_t adc)
 
void ResetEnergyFast ()
 
void AddEnergy (Float_t energy)
 
void GetClusterEnergy (Float_t &EcalEnergy)
 
void SetCoord (Float_t x1, Float_t y1, Float_t x2, Float_t y2)
 
void SetType (Char_t type)
 
Int_t CountNeighbors (const std::list< ecalCell * > &lst) const
 

Private Member Functions

void Create5x5Cluster ()
 
 ClassDef (ecalCell, 1)
 

Private Attributes

Int_t fNumber
 
Float_t fX1
 
Float_t fY1
 
Float_t fX2
 
Float_t fY2
 
Char_t fType
 
Float_t fEnergy
 
Short_t fADC
 
std::list< ecalCell * > fNeighbors
 
std::list< ecalCell * > f5x5Cluster
 
Double_t fTime
 

Detailed Description

ecalCell.h

Author
Mikhail Prokudin

ECAL cell structure, a part of ECAL module

Definition at line 16 of file ecalCell.h.

Constructor & Destructor Documentation

◆ ecalCell()

ecalCell::ecalCell ( Int_t  cellnumber,
Float_t  x1 = 0,
Float_t  y1 = 0,
Float_t  x2 = 0,
Float_t  y2 = 0,
Char_t  type = 0,
Float_t  energy = 0 
)
inline

Definition at line 19 of file ecalCell.h.

20 : TObject(), fNumber(cellnumber), fX1(x1), fY1(y1), fX2(x2),
21 fY2(y2), fType(type), fEnergy(energy), fADC(-1111), fNeighbors(), f5x5Cluster(),fTime(-1111)
22 {};
Float_t fY1
Definition ecalCell.h:84
Float_t fEnergy
Definition ecalCell.h:92
Float_t fX1
Definition ecalCell.h:82
Float_t fX2
Definition ecalCell.h:86
Short_t fADC
Definition ecalCell.h:94
Double_t fTime
Definition ecalCell.h:104
std::list< ecalCell * > fNeighbors
Definition ecalCell.h:98
Float_t fY2
Definition ecalCell.h:88
Char_t fType
Definition ecalCell.h:90
std::list< ecalCell * > f5x5Cluster
Definition ecalCell.h:100
Int_t fNumber
Definition ecalCell.h:80

Member Function Documentation

◆ ADC()

Short_t ecalCell::ADC ( ) const
inline

Definition at line 37 of file ecalCell.h.

37{return fADC;}

◆ AddEnergy()

void ecalCell::AddEnergy ( Float_t  energy)
inline

Definition at line 68 of file ecalCell.h.

◆ ClassDef()

ecalCell::ClassDef ( ecalCell  ,
 
)
private

◆ CountNeighbors()

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

returns number of neighbors in lst with cell

Definition at line 18 of file ecalCell.cxx.

19{
20 Int_t c=0;
21 list<ecalCell*>::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

◆ Create5x5Cluster()

void ecalCell::Create5x5Cluster ( )
private

Definition at line 43 of file ecalCell.cxx.

44{
45 list<ecalCell*> c3;
46 list<ecalCell*> c;
47 list<ecalCell*>::const_iterator p;
48 list<ecalCell*>::const_iterator p2;
49
51 for(p=c3.begin();p!=c3.end();++p)
52 {
53 (*p)->GetNeighborsList(c);
54 for(p2=c.begin();p2!=c.end();++p2)
55 if (find(f5x5Cluster.begin(), f5x5Cluster.end(), *p2)==f5x5Cluster.end())
56 f5x5Cluster.push_back(*p2);
57 }
58}
void GetNeighborsList(std::list< ecalCell * > &neib) const
Definition ecalCell.h:48

◆ Get5x5Cluster()

void ecalCell::Get5x5Cluster ( std::list< ecalCell * > &  cls)
inline

Definition at line 58 of file ecalCell.h.

59 {
60 if (f5x5Cluster.size()==0) Create5x5Cluster();
61 cls=f5x5Cluster;
62 }
void Create5x5Cluster()
Definition ecalCell.cxx:43

◆ GetADC()

Short_t ecalCell::GetADC ( ) const
inline

Definition at line 38 of file ecalCell.h.

38{return fADC;}

◆ GetCellNumber()

Int_t ecalCell::GetCellNumber ( ) const
inline

Definition at line 40 of file ecalCell.h.

40{return fNumber;}

◆ GetCenterX()

Float_t ecalCell::GetCenterX ( ) const
inline

Definition at line 35 of file ecalCell.h.

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

◆ GetCenterY()

Float_t ecalCell::GetCenterY ( ) const
inline

Definition at line 36 of file ecalCell.h.

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

◆ GetClusterEnergy()

void ecalCell::GetClusterEnergy ( Float_t &  EcalEnergy)

Definition at line 30 of file ecalCell.cxx.

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

◆ GetEnergy()

Float_t ecalCell::GetEnergy ( ) const
inline

Definition at line 42 of file ecalCell.h.

42{return fEnergy;}

◆ GetNeighborsList()

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

Definition at line 48 of file ecalCell.h.

49 {
50 neib=fNeighbors;
51 }

◆ GetTime()

Float_t ecalCell::GetTime ( ) const
inline

Definition at line 43 of file ecalCell.h.

43{return fTime;}

◆ GetType()

Char_t ecalCell::GetType ( ) const
inline

Definition at line 26 of file ecalCell.h.

26{return fType;}

◆ GetX1()

Float_t ecalCell::GetX1 ( ) const
inline

Definition at line 31 of file ecalCell.h.

31{return fX1;}

◆ GetX2()

Float_t ecalCell::GetX2 ( ) const
inline

Definition at line 33 of file ecalCell.h.

33{return fX2;}

◆ GetY1()

Float_t ecalCell::GetY1 ( ) const
inline

Definition at line 32 of file ecalCell.h.

32{return fY1;}

◆ GetY2()

Float_t ecalCell::GetY2 ( ) const
inline

Definition at line 34 of file ecalCell.h.

34{return fY2;}

◆ IsInside()

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

Definition at line 24 of file ecalCell.h.

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

◆ ResetEnergyFast()

void ecalCell::ResetEnergyFast ( )
inline

Reset all energies in cell

Definition at line 109 of file ecalCell.h.

110{
111 fEnergy=0;
112 fADC=-1111;
113 fTime=-1111;
114}

◆ SetADC()

void ecalCell::SetADC ( Short_t  adc)
inline

Definition at line 65 of file ecalCell.h.

65{fADC=adc;}

◆ SetCoord()

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

Definition at line 73 of file ecalCell.h.

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

◆ SetEnergy()

void ecalCell::SetEnergy ( Float_t  energy)
inline

Definition at line 64 of file ecalCell.h.

◆ SetNeighborsList()

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

Definition at line 52 of file ecalCell.h.

53 {
54 fNeighbors=neib;
55 }

◆ SetTime()

void ecalCell::SetTime ( Float_t  time)
inline

Definition at line 44 of file ecalCell.h.

44{fTime=time;}

◆ SetType()

void ecalCell::SetType ( Char_t  type)
inline

Definition at line 75 of file ecalCell.h.

◆ X1()

Float_t ecalCell::X1 ( ) const
inline

Definition at line 27 of file ecalCell.h.

27{return fX1;}

◆ X2()

Float_t ecalCell::X2 ( ) const
inline

Definition at line 29 of file ecalCell.h.

29{return fX2;}

◆ Y1()

Float_t ecalCell::Y1 ( ) const
inline

Definition at line 28 of file ecalCell.h.

28{return fY1;}

◆ Y2()

Float_t ecalCell::Y2 ( ) const
inline

Definition at line 30 of file ecalCell.h.

30{return fY2;}

Member Data Documentation

◆ f5x5Cluster

std::list<ecalCell*> ecalCell::f5x5Cluster
private

5x5 cluster

Definition at line 100 of file ecalCell.h.

◆ fADC

Short_t ecalCell::fADC
private

ADC counts read

Definition at line 94 of file ecalCell.h.

◆ fEnergy

Float_t ecalCell::fEnergy
private

energy in the calorimeter cell

Definition at line 92 of file ecalCell.h.

◆ fNeighbors

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

list of neighbor cells

Definition at line 98 of file ecalCell.h.

◆ fNumber

Int_t ecalCell::fNumber
private

cell number within the module

Definition at line 80 of file ecalCell.h.

◆ fTime

Double_t ecalCell::fTime
private

Time of cell to fire

Definition at line 104 of file ecalCell.h.

◆ fType

Char_t ecalCell::fType
private

type of cell

Definition at line 90 of file ecalCell.h.

◆ fX1

Float_t ecalCell::fX1
private

left edge of the cell

Definition at line 82 of file ecalCell.h.

◆ fX2

Float_t ecalCell::fX2
private

right edge of the cell

Definition at line 86 of file ecalCell.h.

◆ fY1

Float_t ecalCell::fY1
private

bottom edge of the cell

Definition at line 84 of file ecalCell.h.

◆ fY2

Float_t ecalCell::fY2
private

upper edge of the cell

Definition at line 88 of file ecalCell.h.


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