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

#include <ecalCluster.h>

Inheritance diagram for ecalCluster:
Collaboration diagram for ecalCluster:

Public Member Functions

 ecalCluster ()
 
 ecalCluster (Int_t num, const std::list< ecalCell * > &cluster, const std::list< ecalMaximum * > &maximums)
 
Int_t Number () const
 
Int_t Size () const
 
Int_t Maxs () const
 
Double_t Energy () const
 
Double_t PreCalibrated () const
 
Double_t Moment () const
 
Double_t MomentX () const
 
Double_t MomentY () const
 
Double_t X () const
 
Double_t Y () const
 
Double_t Chi2 () const
 
Short_t Status () const
 
void SetStatus (Short_t st)
 
Int_t CellNum (Int_t i) const
 
Int_t PeakNum (Int_t i) const
 
Double_t PreEnergy (Int_t i) const
 
ecalMaximumMaximum (Int_t i) const
 
virtual ~ecalCluster ()
 

Private Member Functions

 ecalCluster (const ecalCluster &)
 
ecalClusteroperator= (const ecalCluster &)
 

Private Attributes

Int_t fNum
 
Int_t fSize
 
Int_t fMaxs
 
Double_t fEnergy
 
Double_t fPreCalibrated
 
Double_t fMoment
 
Double_t fMomentX
 
Double_t fMomentY
 
Double_t fX
 
Double_t fY
 
Double_t fChi2
 
Short_t fStatus
 
TArrayI fCellNums
 
TArrayI fPeakNums
 
TArrayD fPreEnergy
 
ecalMaximum ** fMaximums
 

Friends

class ecalClusterFinder
 

Detailed Description

A temporary cluster needed for debugging of cluster finder procedure

Definition at line 24 of file ecalCluster.h.

Constructor & Destructor Documentation

◆ ecalCluster() [1/3]

ecalCluster::ecalCluster ( )

An empty constructor

Definition at line 14 of file ecalCluster.cxx.

15 : TObject(),
16 fNum(0),
17 fSize(0),
18 fMaxs(0),
19 fEnergy(0.),
20 fPreCalibrated(-1111.),
21 fMoment(0.),
22 fMomentX(0.),
23 fMomentY(0.),
24 fX(0.),
25 fY(0.),
26 fChi2(0.),
27 fStatus(0),
28 fCellNums(),
29 fPeakNums(),
30 fPreEnergy(),
31 fMaximums(NULL)
32{
33}
TArrayD fPreEnergy
Definition ecalCluster.h:95
Double_t fEnergy
Definition ecalCluster.h:73
Double_t fMomentY
Definition ecalCluster.h:81
Double_t fY
Definition ecalCluster.h:84
Double_t fPreCalibrated
Definition ecalCluster.h:75
TArrayI fPeakNums
Definition ecalCluster.h:93
Double_t fMoment
Definition ecalCluster.h:77
Double_t fMomentX
Definition ecalCluster.h:79
TArrayI fCellNums
Definition ecalCluster.h:91
Short_t fStatus
Definition ecalCluster.h:88
Double_t fChi2
Definition ecalCluster.h:86
ecalMaximum ** fMaximums
Definition ecalCluster.h:97
Double_t fX
Definition ecalCluster.h:83

◆ ecalCluster() [2/3]

ecalCluster::ecalCluster ( Int_t  num,
const std::list< ecalCell * > &  cluster,
const std::list< ecalMaximum * > &  maximums 
)

A more advanced constructor. Should use this.

Still not clear about next 3 variables

Definition at line 36 of file ecalCluster.cxx.

37 : TObject(),
38 fNum(num),
39 fSize(0),
40 fMaxs(0),
41 fEnergy(0.),
42 fPreCalibrated(-1111.),
43 fMoment(0.),
44 fMomentX(0.),
45 fMomentY(0.),
46 fX(0.),
47 fY(0.),
48 fChi2(0.),
49 fStatus(0),
50 fCellNums(),
51 fPeakNums(),
52 fPreEnergy(),
53 fMaximums(NULL)
54{
55 std::list<ecalCell*> cls;
56 list<ecalCell*>::const_iterator p=cluster.begin();
57 list<ecalMaximum*>::const_iterator pm;
58 Double_t e;
59 Double_t x;
60 Double_t y;
61 Double_t r;
62 Int_t i;
63
64 fMaxs=maximums.size();
65 fEnergy=0;
66 fX=0;
67 fY=0;
68 for(;p!=cluster.end();++p)
69 {
70 cls.push_back(*p);
71 e=(*p)->GetEnergy();
72 x=(*p)->GetCenterX();
73 y=(*p)->GetCenterY();
74 fX+=x*e; fY+=y*e;
75 fEnergy+=e;
76 }
77 fSize=cls.size();
78
79 cls.sort(ecalClusterSortProcess());
80 cls.reverse();
81 fX/=fEnergy;
82 fY/=fEnergy;
83 fChi2=-1111.0;
84
85 fCellNums.Set(fSize);
86 fPeakNums.Set(fMaxs);
87 fPreEnergy.Set(fMaxs);
88
90 for(p=cls.begin();p!=cls.end();++p)
91 {
93 e=(*p)->GetEnergy();
94 x=fX-(*p)->GetCenterX(); x*=x;
95 y=fY-(*p)->GetCenterY(); y*=y;
96 fMomentX+=x*e; fMomentY+=y*e; fMoment+=(x+y)*e;
97 }
99
100 i=0;
101 for(p=cls.begin();p!=cls.end();++p)
102 fCellNums[i++]=(*p)->GetCellNumber();
103 i=0;
105 for(pm=maximums.begin();pm!=maximums.end();++pm)
106 {
107 fMaximums[i]=(*pm);
108 fPeakNums[i++]=(*pm)->Cell()->GetCellNumber();
109 }
110}
Int_t GetCellNumber() const
Definition ecalCell.h:40
ecalCell * Cell() const
Definition ecalMaximum.h:21
int i
Definition ShipAna.py:86

◆ ~ecalCluster()

ecalCluster::~ecalCluster ( )
virtual

An virtual destructor

Definition at line 112 of file ecalCluster.cxx.

113{
114 delete [] fMaximums;
115}

◆ ecalCluster() [3/3]

ecalCluster::ecalCluster ( const ecalCluster )
private

Member Function Documentation

◆ CellNum()

Int_t ecalCluster::CellNum ( Int_t  i) const
inline

Getters for cells and peaks

Definition at line 58 of file ecalCluster.h.

58{return fCellNums[i];}

◆ Chi2()

Double_t ecalCluster::Chi2 ( ) const
inline

\chi^2 of cluster after fitting

Definition at line 52 of file ecalCluster.h.

52{return fChi2;}

◆ Energy()

Double_t ecalCluster::Energy ( ) const
inline

Energy of cluster

Definition at line 39 of file ecalCluster.h.

39{return fEnergy;}

◆ Maximum()

ecalMaximum * ecalCluster::Maximum ( Int_t  i) const
inline

Definition at line 61 of file ecalCluster.h.

61{return fMaximums[i];}

◆ Maxs()

Int_t ecalCluster::Maxs ( ) const
inline

Number of maximums in cluster

Definition at line 37 of file ecalCluster.h.

37{return fMaxs;}

◆ Moment()

Double_t ecalCluster::Moment ( ) const
inline

Second moment

Definition at line 43 of file ecalCluster.h.

43{return fMoment;}

◆ MomentX()

Double_t ecalCluster::MomentX ( ) const
inline

Moment over X axis

Definition at line 45 of file ecalCluster.h.

45{return fMomentX;}

◆ MomentY()

Double_t ecalCluster::MomentY ( ) const
inline

Moment over Y axis

Definition at line 47 of file ecalCluster.h.

47{return fMomentY;}

◆ Number()

Int_t ecalCluster::Number ( ) const
inline

Number of cluster in event

Definition at line 33 of file ecalCluster.h.

33{return fNum;}

◆ operator=()

ecalCluster & ecalCluster::operator= ( const ecalCluster )
private

◆ PeakNum()

Int_t ecalCluster::PeakNum ( Int_t  i) const
inline

Definition at line 59 of file ecalCluster.h.

59{return fPeakNums[i];}

◆ PreCalibrated()

Double_t ecalCluster::PreCalibrated ( ) const
inline

Calibrated energy of the cluster with assumption of normal incident angle

Definition at line 41 of file ecalCluster.h.

41{return fPreCalibrated;}

◆ PreEnergy()

Double_t ecalCluster::PreEnergy ( Int_t  i) const
inline

Definition at line 60 of file ecalCluster.h.

60{return fPreEnergy[i];}

◆ SetStatus()

void ecalCluster::SetStatus ( Short_t  st)
inline

Definition at line 55 of file ecalCluster.h.

55{fStatus=st;}

◆ Size()

Int_t ecalCluster::Size ( ) const
inline

Size of cluster

Definition at line 35 of file ecalCluster.h.

35{return fSize;}

◆ Status()

Short_t ecalCluster::Status ( ) const
inline

Status of the cluster: -1 — rejected, 0 — new, 1 — reconstructed

Definition at line 54 of file ecalCluster.h.

54{return fStatus;}

◆ X()

Double_t ecalCluster::X ( ) const
inline

Coordinates of cluster centre of gravity

Definition at line 49 of file ecalCluster.h.

49{return fX;}

◆ Y()

Double_t ecalCluster::Y ( ) const
inline

Definition at line 50 of file ecalCluster.h.

50{return fY;}

Friends And Related Symbol Documentation

◆ ecalClusterFinder

friend class ecalClusterFinder
friend

Definition at line 26 of file ecalCluster.h.

Member Data Documentation

◆ fCellNums

TArrayI ecalCluster::fCellNums
private

Serial numbers of cells in cluster

Definition at line 91 of file ecalCluster.h.

◆ fChi2

Double_t ecalCluster::fChi2
private

\chi^2 after fitting

Definition at line 86 of file ecalCluster.h.

◆ fEnergy

Double_t ecalCluster::fEnergy
private

Energy of cluster

Definition at line 73 of file ecalCluster.h.

◆ fMaximums

ecalMaximum** ecalCluster::fMaximums
private

Serial numbers of maximums in system

Definition at line 97 of file ecalCluster.h.

◆ fMaxs

Int_t ecalCluster::fMaxs
private

Number of maximums in cluster

Definition at line 71 of file ecalCluster.h.

◆ fMoment

Double_t ecalCluster::fMoment
private

Second moment

Definition at line 77 of file ecalCluster.h.

◆ fMomentX

Double_t ecalCluster::fMomentX
private

Moment over X axis

Definition at line 79 of file ecalCluster.h.

◆ fMomentY

Double_t ecalCluster::fMomentY
private

Moment over Y axis

Definition at line 81 of file ecalCluster.h.

◆ fNum

Int_t ecalCluster::fNum
private

Cluster number

Definition at line 66 of file ecalCluster.h.

◆ fPeakNums

TArrayI ecalCluster::fPeakNums
private

Serial numbers of peaks in cluster

Definition at line 93 of file ecalCluster.h.

◆ fPreCalibrated

Double_t ecalCluster::fPreCalibrated
private

Calibrated energy of the cluster with assumption of normal incident angle

Definition at line 75 of file ecalCluster.h.

◆ fPreEnergy

TArrayD ecalCluster::fPreEnergy
private

An energy deposition in peak areas (preclusters)

Definition at line 95 of file ecalCluster.h.

◆ fSize

Int_t ecalCluster::fSize
private

Cluster size in cells A separate variable. fCells not stored

Definition at line 69 of file ecalCluster.h.

◆ fStatus

Short_t ecalCluster::fStatus
private

Status of the cluster: -1 — rejected, 0 — new, 1 — reconstructed

Definition at line 88 of file ecalCluster.h.

◆ fX

Double_t ecalCluster::fX
private

Coordinates of cluster centre of gravity

Definition at line 83 of file ecalCluster.h.

◆ fY

Double_t ecalCluster::fY
private

Definition at line 84 of file ecalCluster.h.


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