StFms  0.0.0
FMS software in the STAR framework
StFmsTowerCluster.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // $Log$
13 #ifndef STROOT_STFMSPOINTMAKER_STFMSTOWERCLUSTER_H_
14 #define STROOT_STFMSPOINTMAKER_STFMSTOWERCLUSTER_H_
15 
16 #include "Rtypes.h" // For ClassDef macro
17 
18 #include <list>
19 #include <memory> // For unique_ptr
20 
22 
23 class StFmsCluster;
24 
25 namespace FMSCluster { // $NMSPC
26 class StFmsTower;
39  public:
40  typedef std::list<StFmsTower*> Towers;
41 
50  // Use default copy constructor and assignment operator
53  /* Clear photon and tower lists and reset other values to defaults */
54  void Clear(const char* optionNotUsed = "");
66  void findClusterAxis(Float_t Ecoff) {
67  mEnergyCutoff = Ecoff;
69  }
71  Int_t index() const { return mIndex; }
73  void setIndex(Int_t index) { mIndex = index; }
75  float sigmaX() const { return mSigmaX; }
77  float sigmaY() const { return mSigmaY; }
79  float sigmaXY() const { return mSigmaXY; }
81  Float_t thetaAxis() const { return mThetaAxis; }
83  Float_t chiSquare() const { return mChiSquare; }
85  void setChiSquare(Float_t chi2) { mChiSquare = chi2; }
87  float energyCutoff() const { return mEnergyCutoff; }
89  Towers& towers() { return mTowers; }
91  const Towers& towers() const { return mTowers; }
95  const StFmsFittedPhoton* photons() const { return mPhotons; }
97  StFmsCluster* cluster() { return mCluster.get(); }
99  const StFmsCluster* cluster() const { return mCluster.get(); }
101  StFmsCluster* release() { return mCluster.release(); }
102 
103  protected:
104  static const int kMaxPhotonsPerCluster = 2;
105 
106  void findClusterAxis();
109  Double_t getSigma(Double_t theta) const;
110  Int_t mIndex;
111  Float_t mSigmaX;
112  Float_t mSigmaY;
113  Float_t mSigmaXY;
114  Float_t mThetaAxis;
115  Float_t mChiSquare;
117  Float_t mEnergyCutoff;
119 #ifndef __CINT__ // CINT won't parse unique_ptr so hide it
120  std::unique_ptr<StFmsCluster> mCluster;
121 #endif // __CINT__
123 
124  private:
142  ClassDef(StFmsTowerCluster, 0)
143 }; // class StFmsTowerCluster
144 } // namespace FMSCluster
145 #endif // STROOT_STFMSPOINTMAKER_STFMSTOWERCLUSTER_H_
Float_t mSigmaY
2nd moment in y
Double_t getSigma(Double_t theta) const
std::unique_ptr< StFmsCluster > mCluster
Pointer to StEvent cluster.
const StFmsCluster * cluster() const
static const int kMaxPhotonsPerCluster
Support 2-photon clusters.
void Clear(const char *optionNotUsed="")
Float_t mEnergyCutoff
Cutoff on towers to use in moment calculations.
void findClusterAxis(Float_t Ecoff)
StFmsFittedPhoton mPhotons[kMaxPhotonsPerCluster]
Photons in cluster.
std::list< StFmsTower * > Towers
Shorthand for tower collection.
StFmsTowerCluster(StFmsCluster *cluster)
StFmsTowerCluster & operator=(const StFmsTowerCluster &)
StFmsFittedPhoton * photons()
Float_t mSigmaXY
2nd moment in x-y
Float_t mSigmaX
2nd moment in x
Declaration of StFmsFittedPhoton, a photon fitted to an FMS cluster.
Int_t mIndex
cluster number in an event, counts from 0
Float_t mChiSquare
Chi-square of the fitting.
const Towers & towers() const
Towers mTowers
Towers that make the cluster.
const StFmsFittedPhoton * photons() const
void calculateClusterMoments(Float_t energyCutoff)