StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFmsTowerCluster.h
Go to the documentation of this file.
1 // $Id: StFmsTowerCluster.h,v 1.5 2016/01/26 14:42:48 akio Exp $
2 //
3 // $Log: StFmsTowerCluster.h,v $
4 // Revision 1.5 2016/01/26 14:42:48 akio
5 // better chi2 handling
6 //
7 // Revision 1.4 2015/10/21 15:58:05 akio
8 // Code speed up (~x2) by optimizing minimization fuctions and showershape function
9 // Add option to merge small cells to large, so that it finds cluster at border
10 // Add option to perform 1photon fit when 2photon fit faield
11 // Add option to turn on/off global refit
12 // Moment analysis done without ECUTOFF when no tower in cluster exceed ECUTOFF=0.5GeV
13 //
14 // Revision 1.3 2015/10/01 19:55:48 akio
15 // *** empty log message ***
16 //
17 // Revision 1.2 2015/09/02 15:01:32 akio
18 // Removing StFmsGeometry class, and now it uses StFmsDbMaker to get appropriate parameters.
19 //
20 // Revision 1.1 2015/03/10 14:38:54 jeromel
21 // First version of FmsUtil from Yuxi Pan - reviewd 2015/02
22 //
32 #ifndef STROOT_STFMSPOINTMAKER_STFMSTOWERCLUSTER_H_
33 #define STROOT_STFMSPOINTMAKER_STFMSTOWERCLUSTER_H_
34 
35 #include "Rtypes.h" // For ClassDef macro
36 
37 #include <list>
38 #include <memory> // For unique_ptr
39 #include <vector>
40 
42 
43 class StFmsCluster;
44 
45 namespace FMSCluster { // $NMSPC
46 class StFmsTower;
59  public:
60  typedef std::list<StFmsTower*> Towers;
61  typedef std::vector<StFmsFittedPhoton> Photons;
71  // Use default copy constructor and assignment operator
73  virtual ~StFmsTowerCluster();
74  /* Clear photon and tower lists and reset other values to defaults */
75  void Clear(const char* optionNotUsed = "");
87  void findClusterAxis(Double_t Ecoff, Double_t xwidth, Double_t ywidth) {
88  mEnergyCutoff = Ecoff;
89  findClusterAxis(xwidth, ywidth);
90  }
92  Int_t index() const { return mIndex; }
94  void setIndex(Int_t index) { mIndex = index; }
96  Int_t detectorId() const { return mDetectorId; }
98  double etot() const { return mEtot; }
100  double sigmaX() const { return mSigmaX; }
102  double sigmaY() const { return mSigmaY; }
104  double sigmaXY() const { return mSigmaXY; }
106  Double_t thetaAxis() const { return mThetaAxis; }
108  Double_t chiSquare() const { return mChiSquare; }
109  Double_t chiSquare1() const { return mChiSquare1; }
110  Double_t chiSquare2() const { return mChiSquare2; }
112  void setChiSquare(Double_t chi2) { mChiSquare = chi2; }
113  void setChiSquare1(Double_t chi2) { mChiSquare1 = chi2; }
114  void setChiSquare2(Double_t chi2) { mChiSquare2 = chi2; }
116  double energyCutoff() const { return mEnergyCutoff; }
118  Towers& towers() { return mTowers; }
120  const Towers& towers() const { return mTowers; }
122  Photons& photons() { return mPhotons; }
124  const Photons& photons() const { return mPhotons; }
126  StFmsCluster* cluster() { return mCluster.get(); }
128  const StFmsCluster* cluster() const { return mCluster.get(); }
130  StFmsCluster* release();
131 
132  protected:
134  void findClusterAxis(Double_t xwidth, Double_t ywidth);
137  Double_t getSigma(Double_t theta, Double_t xwidth, Double_t ywidth);
138  Int_t mIndex;
139  Int_t mDetectorId;
140  Float_t mEtot;
141  Double_t mSigmaX;
142  Double_t mSigmaY;
143  Double_t mSigmaXY;
144  Double_t mThetaAxis;
145  Double_t mChiSquare;
147  Double_t mChiSquare1;
148  Double_t mChiSquare2;
149  Double_t mEnergyCutoff;
151 #ifndef __CINT__ // CINT won't parse unique_ptr so hide it
152  std::unique_ptr<StFmsCluster> mCluster;
153 #endif // __CINT__
154  Photons mPhotons;
155 
156  private:
173  StFmsTowerCluster& operator=(const StFmsTowerCluster&);
174 
175  ClassDef(StFmsTowerCluster, 0)
176 }; // class StFmsTowerCluster
177 } // namespace FMSCluster
178 #endif // STROOT_STFMSPOINTMAKER_STFMSTOWERCLUSTER_H_
Double_t mSigmaY
2nd moment in y
void setChiSquare(Double_t chi2)
Double_t mThetaAxis
of least-2nd-sigma axis
Towers mTowers
Towers that make the cluster.
Double_t mSigmaX
2nd moment in x
Double_t getSigma(Double_t theta, Double_t xwidth, Double_t ywidth)
Double_t mChiSquare2
Chi-square of the fitting 2 photon.
std::list< StFmsTower * > Towers
Shorthand for tower collection.
void findClusterAxis(Double_t Ecoff, Double_t xwidth, Double_t ywidth)
const Towers & towers() const
void calculateClusterMoments(Double_t energyCutoff)
std::unique_ptr< StFmsCluster > mCluster
Pointer to StEvent cluster.
Int_t mIndex
cluster number in an event, counts from 0
const Photons & photons() const
StFmsTowerCluster(StFmsCluster *cluster, Int_t detectorId)
const StFmsCluster * cluster() const
Double_t mChiSquare1
Chi-square of the fitting 1 photon.
Photons mPhotons
Photons in cluster.
Double_t mChiSquare
Chi-square of the fitting.
Declaration of StFmsFittedPhoton, a photon fitted to an FMS cluster.
Double_t mEnergyCutoff
Cutoff on towers to use in moment calculations.
Double_t mSigmaXY
2nd moment in x-y