CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/CalibCalorimetry/EcalLaserAnalyzer/interface/TShapeAnalysis.h

Go to the documentation of this file.
00001 #ifndef TShapeAnalysis_H
00002 #define TShapeAnalysis_H
00003 
00004 #include "TObject.h"
00005 #include <vector>
00006 class TTree;
00007 
00008 #define fNchsel 1700
00009 
00010 class TShapeAnalysis: public TObject 
00011 {
00012 
00013  private:
00014 
00015   char filename[80];
00016   long int timestart,timestop;
00017   int index[fNchsel],npass[fNchsel];
00018   int nsamplecristal,sampbmax,sampamax,nevt;
00019   int presample;
00020   double noise;
00021   double alpha0,beta0;
00022   double alpha_val[fNchsel], beta_val[fNchsel], width_val[fNchsel], chi2_val[fNchsel];
00023   int flag_val[fNchsel];
00024   double alpha_init[fNchsel], beta_init[fNchsel], width_init[fNchsel], chi2_init[fNchsel];
00025   int flag_init[fNchsel], eta_init[fNchsel], phi_init[fNchsel];
00026 
00027   int dcc_init[fNchsel], tower_init[fNchsel], ch_init[fNchsel], side_init[fNchsel];
00028 
00029   double rawsglu[fNchsel][200][10];
00030   double npassok[fNchsel];
00031  
00032   TTree *tABinit; 
00033   TTree *tABout;
00034 
00035   double chi2cut;
00036   int nchsel;
00037 
00038   void init(double, double, double, double);
00039   void init(TTree *tAB, double, double, double, double);
00040 
00041  public:
00042   // Default Constructor, mainly for Root
00043   TShapeAnalysis(double, double, double, double);
00044   // Default Constructor, mainly for Root
00045   TShapeAnalysis(TTree *tAB, double, double, double, double);
00046 
00047   // Destructor: Does nothing
00048   virtual ~TShapeAnalysis();
00049 
00050   void set_const(int,int,int,int,int,double,double);
00051   void set_presample(int);
00052   void set_nch(int);
00053   void assignChannel(int,int);
00054   void putDateStart(long int);
00055   void putDateStop(long int);
00056   void getDateStart();
00057   void getDateStop();
00058   void putAllVals(int,double*, int, int);
00059   void putAllVals(int,double*, int, int, int, int, int, int);
00060   void putalphaVal(int,double);
00061   void putbetaVal(int,double);
00062   void putwidthVal(int,double);
00063   void putchi2Val(int,double);
00064   void putflagVal(int,int);
00065   void putalphaInit(int,double);
00066   void putbetaInit(int,double);
00067   void putwidthInit(int,double);
00068   void putchi2Init(int,double);
00069   void putflagInit(int,int);
00070   void putetaInit(int,int);
00071   void putphiInit(int,int);
00072   void computeShape(std::string namefile, TTree*);
00073   void computetmaxVal(int,double*);
00074   void printshapeData(int);
00075   std::vector<double> getVals(int);
00076   std::vector<double> getInitVals(int);
00077 
00078   //  ClassDef(TShapeAnalysis,1)
00079 };
00080 
00081 #endif