00001
00002
00003
00004 #ifndef SmdGains_h
00005 #define SmdGains_h
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TObject.h"
00015 #include "TFile.h"
00016 class TObjArray ;
00017 class TH1F;
00018 class TF1;
00019 class TCanvas;
00020 class TGraphErrors;
00021
00022 class StripG {
00023 public:
00024 int id;
00025 float sl,esl;
00026 float mpv1,empv1;
00027 float gc,egc;
00028 int sum1;
00029 int flag;
00030
00031 StripG();
00032 void clear();
00033 void print();
00034 };
00035
00036
00037
00038
00039 class SmdGains :public TObject{
00040 TCanvas *c1, *c2;
00041 private:
00042 enum {mxS=288,mxH=8};
00043 TFile *fdIn;
00044 TObjArray *HList;
00045 TF1 *gnCorFn;
00046
00047 int sectID;
00048 char planeUV;
00049 TString plCore;
00050
00051
00052 int adcMin,adcMax,minSum;
00053 float maxRelEr;
00054 float minMipEne, maxMipEne;
00055 float idealMipEne;
00056
00057
00058 TH1F *hA[mxH];
00059 TGraphErrors * grA[mxH];
00060
00061
00062 StripG str[mxS];
00063
00064 public:
00065 SmdGains();
00066 virtual ~SmdGains(){};
00067 void set( TObjArray * hL, int se, char uv){ HList=hL; sectID=se, planeUV=uv;};
00068 void plTGraph(const Char_t *shpFunc="pol1",int ig=1, int pl=0);
00069 void plFGC();
00070
00071 void doGainCorr(int str1, int str2, int ns=20, int pl=0);
00072
00073 void avrMipNEne(int str1,int ns);
00074
00075 TFile* open(TString);
00076 void init();
00077 void doSlopesOnly(float fac=1.);
00078 void saveHisto(const Char_t *fname=0);
00079 void saveGains(FILE *fd=0);
00080
00081 void fitSlopesSmd(int str1, int str2, int pl=0);
00082 void fitSlopesTile(int eta1, int nEta, char cT, int pl=0) ;
00083
00084 ClassDef(SmdGains,1)
00085 };
00086
00087 #endif
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115