StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcMipMaker.h
1 #ifndef STAR_StEmcMipMaker
2 #define STAR_StEmcMipMaker
3 
4 #include <TString.h>
5 #include <TF1.h>
6 #include <TH2.h>
7 #include <TH1.h>
8 
9 #include <StMaker.h>
10 
11 #include "StEmcCalibrationMaker.h"
12 #include "StEmcCalibMaker.h"
13 
14 #define MAXTRACK 10000
15 #define MAXBEMC 4
16 #define MAXCHANNEL 18000
17 
18 class StEmcEqualMaker;
19 
21 {
22  protected:
23  TH1F *mMipPos;
24  TH1F *mMipPosErr;
25  TH1F *mMipWid;
26  TH1F *mMipWidErr;
27  TH1F *mGain;
28  TH1F *mGainDistr;
29  TH1F *mChi2;
30  TH1F *mIntegral;
31 
32  float mPmin;
33  int mNPoints;
34 
35  int mNFailed[10];
36 
37  public:
38 
39  StEmcMipMaker(const char *name="EmcMip");
40  virtual ~StEmcMipMaker();
41  virtual Int_t Init();
42  virtual Int_t Make();
43  virtual Int_t Finish();
44  virtual void Clear(Option_t *option="");
45 
46  TH1F* compareToDb(char*,int=0);
47  void saveToDb(char*);
48 
49  void mipCalib();
50  void mipCalib(int,int,int,StEmcEqualMaker*, bool = false);
51 
52  TH1F* findMip(int,int=1,bool=true);
53  TH1F* findMip(int,int,StEmcEqualMaker*);
54  float findGain(int,bool=true);
55 
56  float getMipPosition(int id) {return mMipPos->GetBinContent(id);}
57  float getMipPositionError(int id) {return mMipPosErr->GetBinContent(id);}
58  float getMipWidth(int id) {return mMipWid->GetBinContent(id);}
59  float getMipWidthError(int id) {return mMipWidErr->GetBinContent(id);}
60  float getGain(int id) {return mGain->GetBinContent(id);}
61  float getChi2(int id) {return mChi2->GetBinContent(id);}
62  float getIntegral(int id) {return mIntegral->GetBinContent(id);}
63 
64  int getNFailed(int flag) { return mNFailed[flag];}
65 
66  TH1F* getGainHist() { return mGain;}
67  TH1F* getGainDistrHist() { return mGainDistr;}
68  TH1F* getChi2Hist() { return mChi2;}
69  TH1F* getIntegralHist() { return mIntegral;}
70  TH1F* getMipPosHist() { return mMipPos;}
71  TH1F* getMipWidHist() { return mMipWid;}
72 
73  void fit(TH1F*);
74 
75  TF1* funcFit;
76  TF1* funcFitPeak;
77  TF1* funcFitBack;
78 
79  ClassDef(StEmcMipMaker, 1)
80 };
81 
82 #endif
virtual void Clear(Option_t *option="")
User defined functions.
virtual Int_t Make()
virtual Int_t Finish()