00001 #ifndef EMCGLSECTORREC_H
00002 #define EMCGLSECTORREC_H
00003
00004
00005
00006
00007
00008 #include "EmcSectorRec.h"
00009
00010
00011
00016 class EmcGlSectorRec: public EmcSectorRec
00017 {
00018
00019 public:
00020
00021 EmcGlSectorRec():EmcSectorRec(){ SetTowerThreshold(0.05); }
00022 virtual ~EmcGlSectorRec(){}
00023
00024 virtual void Gamma(int nmod, EmcModule *modules, float *pchi, float *pchi0,
00025 float *pe1, float *px1, float *py1,
00026 float *pe2, float *px2, float *py2,
00027 int &ndf);
00028
00029
00030 virtual void SetTowerThreshold(float Thresh){fgTowerThresh = Thresh;}
00031 virtual float Chi2Limit(int ndf);
00032 virtual float Chi2Correct(float chi2, int ndf);
00033 virtual void SetProfileParameters(int sectorID, float energy,
00034 float z, float y);
00035 virtual float PredictEnergy(float deltaz, float deltay, float energy);
00036 virtual float ClusterChisq(int nmod, EmcModule* modules,
00037 float energy, float zcg, float ycg, int &ndf);
00038 virtual void CorrectPosition(float energy, float zcg, float ycg,
00039 float *zcgcorr, float *ycgcorr, bool callSetPar=true);
00040 virtual void CorrectEnergy(float energy, float x, float y, float *ecorr);
00041 virtual void CorrectECore(float ecore, float x, float y, float *ecorecorr);
00042
00043
00044 virtual void CalculateErrors(float e, float x, float y, float* pde,
00045 float* pdx, float* pdy, float* pdz);
00046 virtual void TwoGamma(int nmod, EmcModule *modules, float *pchi,
00047 float *pe1, float *pz1, float *py1,
00048 float *pe2, float *pz2, float *py2);
00049 virtual void getTowerPos(int ix, int iy, float &x, float & y);
00051 void TowersToSector(float, float, float &, float &);
00053 void TowersToSector(int, int, float &, float &);
00055 void SectorToTowers(float, float, int &, int &);
00056
00057 protected:
00058
00059
00060 static float fgEpar00;
00061 static float fgEpar0;
00062 static float fgEpar1;
00063 static float fgEpar2;
00064 static float fgEpar3;
00065 static float fgEpar4;
00066
00067 static float fSin4T;
00068
00069 static float fgConfLevel;
00070
00071
00072 static float const fgSigEcorr0;
00073 static float const fgSigEcorr1;
00074 static float const fgSigAcorr0;
00075 static float const fgSigAcorr1;
00076
00077
00078 static float const fgCutEcorr0;
00079 static float const fgCutEcorr1;
00080
00081
00082 static float const fgCoorPar00;
00083 static float const fgCoorPar01;
00084 static float const fgCoorPar02;
00085 static float const fgCoorPar03;
00086 static float const fgCoorPar10;
00087 static float const fgCoorPar11;
00088 static float const fgCoorPar12;
00089 static float const fgCoorPar20;
00090 static float const fgCoorPar21;
00091
00092
00093 float fSinTx;
00094 float fSinTy;
00095 float fTheta;
00096 float fPhi;
00097 float fShift;
00098 float fExc1;
00099 float fExc2;
00100 float fShapePars[4];
00101
00102 float fSpecThr;
00103 float fThrCorr;
00104
00105 private:
00106
00107
00108 static float ShiftFunc(float energy, float angle);
00109 static float Sigma1Func(float energy, float angle);
00110 static float Sigma2Func(float energy, float angle);
00111
00112 static float ShapeFunc(float *x, float *par);
00113 static float AFunc(float energy, float angle, float phi);
00114 static float CFunc(float energy, float angle, float phi);
00115 static float DFunc(float energy, float angle, float phi);
00116 static float SFunc(float energy, float angle, float phi);
00117 static float PeriodicFunc(float *x, float *par);
00118
00119 static float InvScurveFunc(float cog, float *par);
00120 static void Rotate(float phi, float &deltaRow, float &deltaCol);
00121
00122 static float CalcSigma(float predicted, float totSignal, float theta);
00123
00124 };
00125
00126 #endif // #ifndef EMCGLSECTORREC_H