1 #include "StEEmcSmdCluster.h"
4 #include "StEvent/StEmcCluster.h"
9 StEEmcSmdCluster::StEEmcSmdCluster()
17 void StEEmcSmdCluster::print()
20 std::cout <<
"key=" <<
key() << std::endl;
21 std::cout <<
"energy=" << energy() << std::endl;
22 std::cout <<
"mean=" << mean() << std::endl;
41 void StEEmcSmdCluster::add(
StEEmcStrip strip, Float_t weight )
47 Float_t energy = strip.
energy() * weight;
68 Int_t iuv=(
mStrips[0].plane()==1 );
84 for ( Int_t i=0; i<numberOfStrips(); i++ ) {
95 Float_t StEEmcSmdCluster::energy(Int_t nmax, Option_t *opts)
99 if ( TString(opts).Contains(
"seed") )
107 Int_t min=(Int_t)(mymean-(Float_t)nmax);
108 Int_t max=(Int_t)(mymean+(Float_t)nmax);
112 for ( UInt_t i=0;i<
mStrips.size();i++ )
122 Float_t StEEmcSmdCluster::sigma(Int_t nmax, Option_t *opts)
126 if ( TString(opts).Contains(
"seed") )
134 Int_t min=(Int_t)(mymean-(Float_t)nmax);
135 Int_t max=(Int_t)(mymean+(Float_t)nmax);
137 std::cout <<
"mymean=" << mymean << std::endl;
138 std::cout <<
"min =" << min << std::endl;
139 std::cout <<
"max =" << max << std::endl;
145 for ( UInt_t i=0;i<
mStrips.size();i++ )
148 std::cout << i <<
" " << s.
index() << std::endl;
158 sig=TMath::Sqrt( x2sum/esum - (xsum/esum)*(xsum/esum) );
Float_t mEnergy
Energy of this SMD cluster.
void index(Int_t i)
Sets the index for this SMD strip, 0..287.
Float_t mMean
Mean and sigma computed after each strip is added.
std::vector< Float_t > mWeights
Vector of strip weights.
Int_t key()
Return a unique key assigned by the cluster maker.
Float_t mSumX2W
Running sums to calculate mean, sigma of cluster.
StEEmcStripVec_t mStrips
Vector of strips belonging to this SMD cluster.
A base class for representing clusters of EEMC smd strips.
StEmcCluster * mEmcCluster
POinter to EMC cluster.
Int_t mSize
Kludge so that root will store number of smd strips.
StEEmcTowerVec_t mMatchedTowers
Vector of hit towers above this SMD cluster.
void energy(Float_t e)
Set the energy (adc-ped+0.5)/gain for this element.
Base class for describing an endcap SMD strip.
Float_t mSumXW
Running sums to calculate mean, sigma of cluster.