#ifndef fQChrgPDF_h_seen #define fQChrgPDF_h_seen #include #include #include //#define nPMTType 2 //#define nRangMax 10 //#define nParamMax 10 //#define nPunhitOrd 3 //class fQChrgPDF : public TNamed { class fQChrgPDF { public: static const int nPMTType=2; static const int nRangMax=10; static const int nParamMax=10; static const int nPunhitOrd=3; private: bool flgLoaded; static bool flgUseGlParArr; static int iPMTType_gl; static Double_t qval_gl;// Current charge q static Double_t param_gl[nParamMax]; TFile *cPDFparf; fQChrgPDF(); static fQChrgPDF* staticthis; public: static fQChrgPDF* Get(){ if (!staticthis) { staticthis = new fQChrgPDF(); } return staticthis; } ~fQChrgPDF(); bool flgStrict; double Punhit_cn[nPMTType][nPunhitOrd]; TH1D *hCPDFrange[nPMTType]; TGraph *gParam[nPMTType][nRangMax][nParamMax]; TGraph *gmuthr[nPMTType][nRangMax][2]; void LoadParams(char *ifName); void SetGlobal_PMTType(int tmp) {iPMTType_gl=tmp;} void SetGlobal_qval(double tmp) {qval_gl=tmp;} static Double_t flogcPDFptr(Double_t *x, Double_t *par); static double flogchrgPDF(double mu, int nparam, double *par, double *thr, double *coeff); double flogcPDF(double mu, double q, int iPMTType); int GetCPDFRange(double tmpchrg, int iPMTType, int &iRang, int &nparam); void SetCPDFParams(double tmpchrg, int iPMTType, int &nparam, double *par, double *muthr, double *coeff); // ClassDef(fQChrgPDF,1); }; #endif