34 #ifndef StRichCluster_hh
35 #define StRichCluster_hh
42 StRichCluster(
int nPads,
int nLocMax,
int fPad,
float ampSum,
float amp2Sum,
float rms2);
48 int numberOfPads()
const;
49 int numberOfLocalMax()
const;
51 float minimumAmplitudeOfLocalMax()
const;
52 float amplitudeSum()
const;
53 float amplitude2Sum()
const;
57 void increaseNumberOfLocalMax();
58 void increaseNumberOfPads();
59 void setFirstPad(
int index);
60 void setNumberOfPads(
int newNPads);
61 void updateAmplitude(
float newamp);
62 void setMinimumAmplitudeOfLocalMax(
float newLocMax);
66 Int_t mNumberOfLocalMax;
68 Float_t mMinimumAmplitudeOfLocalMax;
69 Float_t mAmplitudeSum;
70 Float_t mAmplitude2Sum;
75 inline int StRichCluster::numberOfPads()
const {
return mNumberOfPads; }
76 inline int StRichCluster::numberOfLocalMax()
const {
return mNumberOfLocalMax; }
77 inline int StRichCluster::firstPad()
const {
return mFirstPad; }
78 inline float StRichCluster::minimumAmplitudeOfLocalMax()
const {
return mMinimumAmplitudeOfLocalMax; }
79 inline float StRichCluster::amplitudeSum()
const {
return mAmplitudeSum; }
80 inline float StRichCluster::amplitude2Sum()
const {
return mAmplitude2Sum; }
81 inline float StRichCluster::rms2()
const {
return mRms2; }
82 inline void StRichCluster::increaseNumberOfLocalMax() { mNumberOfLocalMax++; }
83 inline void StRichCluster::increaseNumberOfPads() { mNumberOfPads++; }
84 inline void StRichCluster::setFirstPad(
int index) { mFirstPad=index; }
85 inline void StRichCluster::setNumberOfPads(
int newNPads) { mNumberOfPads=newNPads; }
86 inline void StRichCluster::updateAmplitude(
float newamp)
88 mAmplitudeSum += newamp;
89 mAmplitude2Sum += newamp*newamp;
91 inline float StRichCluster::rms2Calc()
92 {
return (mRms2 = mAmplitude2Sum/mNumberOfPads - (mAmplitudeSum*mAmplitudeSum/mNumberOfPads/mNumberOfPads)); }
93 inline void StRichCluster::setMinimumAmplitudeOfLocalMax(
float newLocMax)
94 { mMinimumAmplitudeOfLocalMax = newLocMax; }