17 #ifndef STFCSDBPULSE_H
18 #define STFCSDBPULSE_H
24 #include "TGraphAsymmErrors.h"
26 #include "St_base/StMessMgr.h"
36 static double sqrtpi(){
return sqrt(TMath::Pi());}
37 static double sqrt2pi(){
return sqrt(2.0*TMath::Pi());}
85 static void setTGraphAsymmErrors(TGraphAsymmErrors* gae,
const int &i,
const double &adc,
double Yerr,
double YerrSat);
120 TF1*
createPulse(
double xlow=0,
double xhigh=1,
int npars=5 );
129 static int GenericPadPos(
int value,
int Nvals,
int PadNums );
138 static int PadNum4x4(
int det,
int col,
int row);
149 static Int_t
getYMinMax(TGraphAsymmErrors* gae, Double_t &Ymin, Double_t &Ymax, Double_t xmin=-5, Double_t xmax=2000);
151 virtual void Print(Option_t* opt =
"")
const;
168 static const int mAdcSaturation = 4000;
static double sqrtpi()
sqrt(TMath::Pi)
double mXoff1
pulse shape tail: x offset of first xexp function
StFcsDbPulse(const char *name="fcsPulse")
Constructor.
double nsecPerTB() const
nanoseconds per timebin
static Int_t getYMinMax(TGraphAsymmErrors *gae, Double_t &Ymin, Double_t &Ymax, Double_t xmin=-5, Double_t xmax=2000)
Finds minimum and maximum y-values in a TGraph and returns index for max y.
TF1 * createPulse(double xlow=0, double xhigh=1, int npars=5)
Function to create pulse shape for FCS, 5 parameters is minimum.
double BeamLengthSig() const
beam length sigma
double mP1
pulse shape tail: power of first xexp function
int Init()
Initialize object.
static double sqrt2pi()
sqrt(2*TMath::Pi)
double mXoff2
pulse shape tail: x offset of second xexp function
void setTBPerRC(double v)
double mGSigma
pulse shape nominal sigma of Gaussian part
static void setTGraphAsymmErrors(TGraphAsymmErrors *gae, const int &i, const double &adc, double Yerr, double YerrSat)
Figure out and set the errors on FCS pulse data stored in a TGraphAsymmErrors object.
static int GenericPadPos(int value, int Nvals, int PadNums)
Function to tell you pad number when drawing multiple objects on the same pad.
double mTau2
pulse shape tail: scale of second xexp function
virtual ~StFcsDbPulse()
Destructor.
static int PadNum4x4(int det, int col, int row)
Function that gives pad number when drawing a specific detector id.
double mA1
pulse shape tail: height of first xexp function
double mA2
pulse shape tail: height of second xexp function
double multiPulseShape(double *x, double *p)
Multi-pulse shape function constant+gaus+xexp+xexp for many pulses.
double mTau1
pulse shape tail: scale of first xexp function
double pulseShape(double *x, double *p)
Single pulse shape gaus+xexp+xexp.
double mTBPerRC
number of timebins in one RHIC crossing
double mP2
pulse shape tail: power of second xexp function
void setTail(int tail)
Sets the variables needed by the sum of xexp functions that describe the tail of the pulse shape...
virtual void Print(Option_t *opt="") const
Print all the constants associated with this class.