21 #include "StEvent/StFmsHit.h"
25 namespace FMSCluster {
27 : mEnergyCutoff(0.5), mCluster(cluster) {
45 Float_t w0, w1, mtmp, mx, my, sigx, sigy, sigXY;
46 w0 = w1 = mtmp = mx = my = sigx = sigy = sigXY = 0;
47 for (Towers::const_iterator i =
mTowers.begin(); i !=
mTowers.end(); ++i) {
50 xxx = tower->
column() - 0.5;
51 yyy = tower->
row() - 0.5;
52 mtmp = log(tower->
hit()->energy() + 1. - Ecoff) > 0 ?
53 log(tower->
hit()->energy() + 1. - Ecoff) : 0;
55 w0 += tower->
hit()->energy();
58 sigx += mtmp * xxx * xxx;
59 sigy += mtmp * yyy * yyy;
60 sigXY += mtmp * xxx * yyy;
79 Double_t dSigma2, aA, bB;
83 if (mSigmaXY < 1e-10) {
85 bB = sqrt(dSigma2 * dSigma2 + 4.0 * mSigmaXY * mSigmaXY) - dSigma2;
90 Double_t myPi = TMath::Pi();
104 TVector2 vaxis(cos(theta), sin(theta));
107 for (Towers::const_iterator i =
mTowers.begin(); i !=
mTowers.end(); ++i) {
115 Double_t dis = (v1.Norm(vaxis)).Mod();
120 sigma += wtmp * dis * dis;
122 return wnew > 0 ? sqrt(sigma / wnew) : 0;
Float_t mSigmaY
2nd moment in y
Double_t getSigma(Double_t theta) const
std::unique_ptr< StFmsCluster > mCluster
Pointer to StEvent cluster.
Declaration of StFmsCluster, a group of adjacent FMS hits.
Declaration of StFmsTower, a simple FMS tower wrapper.
static const int kMaxPhotonsPerCluster
Support 2-photon clusters.
void Clear(const char *optionNotUsed="")
Float_t mEnergyCutoff
Cutoff on towers to use in moment calculations.
StFmsFittedPhoton mPhotons[kMaxPhotonsPerCluster]
Photons in cluster.
StFmsTowerCluster(StFmsCluster *cluster)
Declaration of StFmsTowerCluster, a cluster of FMS towers.
Float_t mSigmaXY
2nd moment in x-y
Float_t mSigmaX
2nd moment in x
const StFmsHit * hit() const
Float_t mChiSquare
Chi-square of the fitting.
Towers mTowers
Towers that make the cluster.
void calculateClusterMoments(Float_t energyCutoff)