51 #ifndef STROOT_STFCSWAVEFORMFITMAKER_STFCSWAVEFORMFITMAKER_H_
52 #define STROOT_STFCSWAVEFORMFITMAKER_STFCSWAVEFORMFITMAKER_H_
55 #include "StFcsPulseAna.h"
63 class TGraphAsymmErrors;
73 virtual int InitRun(
int runNumber);
76 virtual void Clear(Option_t* option =
"");
78 void setDebug(
int v=1) {SetDebug(v);}
80 void setEnergySelect(
int ecal=13,
int hcal=13,
int pres=1) {mEnergySelect[0]=ecal; mEnergySelect[1]=hcal; mEnergySelect[2]=pres;}
81 void setEnergySumScale(
double ecal=1.0,
double hcal=1.0,
double pres=1.0) {mEnergySumScale[0]=ecal; mEnergySumScale[1]=hcal; mEnergySumScale[2]=pres;}
82 void setCenterTimeBins(
int v,
int min=0,
int max=512) {mCenterTB=v; mMinTB=min; mMaxTB=max;}
83 void setAdcSaturation(
int v) {mAdcSaturation=(double)v;}
84 void setError(
double v) {mError=v;}
85 void setErrorSaturated(
int v) {mErrorSaturated=v;}
86 void setMinAdc(
int v) {mMinAdc=v;}
99 TGraphAsymmErrors*
getGraph(
int idx=-1);
100 TGraphAsymmErrors*
getGraph(
int det,
int id);
103 void setMeasureTime(
char* file) {mMeasureTime=file;}
157 float analyzeWaveform(
int select, TGraphAsymmErrors* g,
float* res, TF1*& f,
float ped=0.0);
158 float analyzeWaveform(
int select,
int n,
double* t,
double* adc,
float* res, TF1*& f,
float ped=0.0);
159 float analyzeWaveform(
int select, TGraph* g,
float* res, TF1*& f,
float ped=0.0);
163 float AnaPed( TGraphAsymmErrors* g,
float& ped,
float& pedstd );
164 float AnaPed(
StFcsHit*
hit,
float& ped,
float& pedstd );
166 float sum8 (TGraphAsymmErrors* g,
float *res);
167 float sum16 (TGraphAsymmErrors* g,
float *res);
168 float highest (TGraphAsymmErrors* g,
float *res);
169 float highest3(TGraphAsymmErrors* g,
float *res);
170 float gausFit (TGraphAsymmErrors* g,
float *res, TF1*& f,
float ped=0.0);
172 float PulseFit1(TGraphAsymmErrors* g,
float* res, TF1*& f,
float ped=0.0);
173 float PulseFit2(TGraphAsymmErrors* g,
float* res, TF1*& f,
float ped=0.0);
174 float PulseFitAll(TGraphAsymmErrors* g,
float* res, TF1*& f,
float ped=0.0);
190 void setFileName(
char* file,
int maxpage=25,
int skip=5){mFilename=file; mMaxPage=maxpage; mSkip=skip;}
202 void setFitFilter(
char* filter) {mFilter=filter; mFitDrawOn=2;}
219 static int GenericPadPos(
int value,
int Nvals,
int PadNums );
229 static int PadNum4x4(
int det,
int col,
int row);
243 void drawRegion(
int det,
int col_low,
int row_low,
int col_high,
int row_high,
int event=0);
255 void drawCh(UInt_t detid, UInt_t ch)
const;
272 void drawFit(TGraphAsymmErrors* gg, TF1* func);
293 TH2F* mH2_Dep0DepMod[3];
294 TH2F* mH2_Sum8Dep0[3];
295 TH2F* mH2_Sum8DepMod[3];
354 std::vector<int>
NPeaksPrePost(
int& trigidx, Double_t& xmin, Double_t& xmax)
const;
361 unsigned int mHitIdx = 0;
364 char *mMeasureTime=0;
366 int mEnergySelect[3];
367 double mEnergySumScale[3];
374 double mErrorSaturated=1000.0;
375 double mAdcSaturation=4000.0;
396 virtual const Char_t *GetCVS()
const {
static const Char_t cvs[]=
"Tag " __DATE__
" " __TIME__ ;
return cvs;}
400 #endif // STROOT_STFCSWAVEFORMFITMAKER_STFCSWAVEFORMFITMAKER_H_
virtual void Draw(Option_t *opt="")
Draw method for PeakAna.