00001
00002
00003
00004
00005
00006
00008
00009
00010
00012
00013
00014 #ifndef PIDFitter_h
00015 #define PIDFitter_h
00016
00017 #include <TROOT.h>
00018 #include "TH1.h"
00019 #include "StPidProbabilityConst.hh"
00020
00021 class TF1;
00022
00023 class PIDFitter {
00024 public:
00025
00026 PIDFitter();
00027 virtual ~PIDFitter(){};
00028
00029 void FitMultiGaus(Char_t* fileNameOfInput, Char_t* fileNameOfOutput);
00030 void DoPhaseSpaceCalibration(Char_t* fileName4Calibration,Char_t* phaseSpaceCalibFileName);
00031 void GetSigmaOfSingleTrail(Char_t* fileName4Calibration,Char_t* sigmaFileName);
00032 void ExtrapAmp(Char_t* fileNameOfInput, Char_t* fileNameOfOutput);
00033
00034 void Process( Char_t* sigmaOfSigmTrialInputName,
00035 Char_t* sigmaOfSigmTrialOutputName,
00036 Char_t* phaseSpaceCalibInputName,
00037 Char_t* phaseSpaceCalibOutputName,
00038 Char_t* gausFitInputName,
00039 Char_t* gausFitOutputName,
00040 Char_t* ampFitOutputName );
00041
00042 virtual void Init();
00043
00044
00045 protected:
00046
00047 Bool_t mWriteSigmaNSampleGraph;
00048 Bool_t mWriteGaus4SigmaNSampleHist;
00049
00050 double * mSigmaOfSingleTrail;
00051
00052 TF1* electronBandCenter;
00053 TF1* pionBandCenter;
00054 TF1* kaonBandCenter;
00055 TF1* antiprotonBandCenter;
00056
00057 TF1* pionKaonBandCenter;
00058 TF1* kaonAntiprotonBandCenter;
00059
00060 double **BBOffSetPar;
00061 double **BBScalePar;
00062
00063 private:
00064
00065 double mEGausHeight;
00066 double mPiGausHeight;
00067 double mKGausHeight;
00068 double mPGausHeight;
00069
00070 double mEGausCenter;
00071 double mPiGausCenter;
00072 double mKGausCenter;
00073 double mPGausCenter;
00074
00075 double mESigma;
00076 double mPiSigma;
00077 double mKSigma;
00078 double mPSigma;
00079
00080
00081 double delta(double calib, double pionPosition, double protonPosition);
00082 double look4MinDeltaDiff(double calibStart, double calibEnd, int calibSteps, double pionPosition, double protonPosition, double DeltaRef);
00083 double minimumIonizingdEdx(double calib, double pionPosition);
00084
00085 float FitResoGaus(TH1F* resoHist,float fitRange,float& er,float theStart, float theEnd, int ParIndex, int j, int k, float thePPosition);
00086 void PresetHeightAndSigma(double center, double& height, double& sigma, TH1F* resoHist, double tempSigmaOfSingleTrial, int k);
00087 void RefreshPresettings(TH1F* resoHist, double tempSigmaOfSingleTrial, int k, float thePPosition);
00088
00089 ClassDef (PIDFitter,1)
00090 };
00091
00092
00093 #endif
00094
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105