StFms  0.0.0
FMS software in the STAR framework
StFmsClusterFitter.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // $Log$
13 #ifndef STROOT_STFMSPOINTMAKER_STFMSCLUSTERFITTER_H_
14 #define STROOT_STFMSPOINTMAKER_STFMSCLUSTERFITTER_H_
15 
16 #include <list>
17 
18 #include "TMinuit.h"
19 #include "TObject.h"
20 
23 
24 class TF2;
25 
26 namespace FMSCluster { // $NMSPC
27 typedef std::list<StFmsFittedPhoton> PhotonList;
28 class StFmsGeometry;
29 class StFmsTower;
50 class StFmsClusterFitter : public TObject {
51  public:
53  StFmsClusterFitter(const StFmsGeometry* geometry, Int_t detectorId);
68  TF2* showerShapeFunction();
70  void setTowers(StFmsTowerCluster::Towers* towers) { mTowers = towers; }
88  Double_t fit(const Double_t* par, const Double_t* step,
89  const Double_t* low, const Double_t* up, PhotonList* photons);
107  Int_t fit2PhotonCluster(const Double_t* para, const Double_t* step,
108  const Double_t* low, const Double_t* up,
109  PhotonList* photons);
124  static Double_t energyDepositionInTower(Double_t* x, Double_t* par);
126  static int maxNFittedPhotons() { return kMaxNPhotons; }
127 
128  private:
129  static const Int_t kMaxNPhotons = 7;
130 
144  static Double_t energyDepositionDistribution(Double_t* x, Double_t* par);
154  static void minimizationFunctionNPhoton(Int_t& npar, Double_t* grad,
155  Double_t& fval, Double_t* par,
156  Int_t iflag);
162  static void minimizationFunction2Photon(Int_t& nparam, Double_t* grad,
163  Double_t& fval, Double_t* param,
164  Int_t iflag);
165  Double_t mSteps[3 * kMaxNPhotons + 1];
166  Double_t mTowerWidth;
167  TMinuit mMinuit;
169  static Float_t mTowerWidthXY[2];
170  ClassDef(StFmsClusterFitter, 0)
171 }; // class StFmsClusterFitter
172 } // namespace FMSCluster
173 #endif // STROOT_STFMSPOINTMAKER_STFMSCLUSTERFITTER_H_
static const Int_t kMaxNPhotons
Maximum number that can be fitted.
StFmsClusterFitter & operator=(const StFmsClusterFitter &)
static Double_t energyDepositionDistribution(Double_t *x, Double_t *par)
Double_t fit(const Double_t *par, const Double_t *step, const Double_t *low, const Double_t *up, PhotonList *photons)
static Double_t energyDepositionInTower(Double_t *x, Double_t *par)
TMinuit mMinuit
Minuit fitting interface.
void setTowers(StFmsTowerCluster::Towers *towers)
std::list< StFmsTower * > Towers
Shorthand for tower collection.
Double_t mSteps[3 *kMaxNPhotons+1]
Step size in each fit variable.
Declaration of StFmsTowerCluster, a cluster of FMS towers.
static Float_t mTowerWidthXY[2]
glass width X, Y in cm
Declaration of StFmsFittedPhoton, a photon fitted to an FMS cluster.
static void minimizationFunction2Photon(Int_t &nparam, Double_t *grad, Double_t &fval, Double_t *param, Int_t iflag)
Int_t fit2PhotonCluster(const Double_t *para, const Double_t *step, const Double_t *low, const Double_t *up, PhotonList *photons)
std::list< StFmsFittedPhoton > PhotonList
Double_t mTowerWidth
width of one lead glass module
static void minimizationFunctionNPhoton(Int_t &npar, Double_t *grad, Double_t &fval, Double_t *par, Int_t iflag)
static StFmsTowerCluster::Towers * mTowers
List of towers to fit.