CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/CalibCalorimetry/EcalLaserAnalyzer/interface/TMConfig.h

Go to the documentation of this file.
00001 #ifndef TMConfig_H
00002 #define TMConfig_H
00003 
00004 #include "TObject.h"
00005 
00006 #define fNsmNmax 36  //number of SM
00007 #define fNlmodN 9    //number of lmodN in a SM
00008 #define fNmem 10     //number of PNs in a MEM
00009 #define fNmodN 4     //number of modN in a SM
00010 #define fNtt 68      //number of trigger towers in a SM
00011 #define fNmax 8
00012 #define fNburmax 3
00013 #define fNseqmax 3
00014 #define fNcolors 6   //number of laser colors
00015 
00016 class TMConfig: public TObject 
00017 {
00018 
00019  private:
00020   int smin;
00021   int arr[fNsmNmax+1][fNmodN+1];
00022   int nbof[fNsmNmax+1][fNlmodN+1];
00023   int towerlist[fNsmNmax+1][fNlmodN][fNmax+1];
00024   int channlist[fNsmNmax+1][fNlmodN][fNmax+1];
00025   int addrpn[fNsmNmax+1][fNmodN+1][fNmem];
00026   int n_pin[fNsmNmax+1][fNmodN+1];
00027   int seqTypeOfSignal[fNseqmax+1],numbOfEventperBurstAndSignal[fNseqmax+1];
00028   int numbOfBurstperSignal[fNseqmax+1];
00029   int ped_size[fNburmax+1],laser_size[fNcolors][fNseqmax+1];
00030   double alpha[fNcolors],beta[fNcolors];
00031   double alpha_run[fNcolors][fNsmNmax+1][fNtt],beta_run[fNcolors][fNsmNmax+1][fNtt];
00032 
00033   void init();
00034   void readSequenzaConfig();
00035   void readlmodNConfig();
00036   void readpnConfig();
00037   void initShapeAnalysis();
00038   void initLaserPulseFit();
00039   void initTPFit();
00040   void initPNFit();
00041   void initMatacqPulseFit();
00042 
00043   int convert(int);
00044 
00045   int firstSample, lastSample;
00046   double alpha_start, beta_start;
00047 
00048   int firstpnSample, lastpnSample;
00049   int nbofiter,nbofpresamp,samplemin,samplemax;
00050   int nbofpnpresamp, nbofpnsamp, nbofsamp;
00051 
00052   int nbofmtqsamples,nbofmtqpresamp,vlastmtqsample,nbofmtqsigmas;
00053   int nbofmtqsamp1esbeforemax_parab,nbofmtqsamplesaftermax_parab;
00054   int thres_mtq,ampllow_trise,amplhigh_trise;
00055 
00056  public:
00057   // Default Constructor, mainly for Root
00058   TMConfig();
00059 
00060   // Destructor: Does nothing
00061   virtual ~TMConfig();
00062 
00063   int getfirstSM() {return smin;}
00064   int getfirstSample() {return firstSample;}
00065   int getlastSample() {return lastSample;}
00066   int getfirstPNSample() {return firstpnSample;}
00067   int getlastPNSample() {return lastpnSample;}
00068   float getalpha0() {return alpha_start;}
00069   float getbeta0() {return beta_start;}
00070   int getsampleMin() {return samplemin;}
00071   int getsampleMax() {return samplemax;}
00072   int getNbOfxtalpresamples() {return nbofpresamp;}
00073   int getNbOfPNpresamples() {return nbofpnpresamp;}
00074   int getNbOfiterations() {return nbofiter;}
00075   int getNbOfPNsamples() { return nbofpnsamp;}
00076   int getNbOfxtalsamples() { return nbofsamp;}
00077   double getalpha_ls(int c) { return alpha[c];}
00078   double getbeta_ls(int c) { return beta[c];}
00079 
00080   void loadPParams();
00081   double getalpha_run(int,int,int);
00082   double getbeta_run(int,int,int);
00083 
00084   int getNbOf(int,int);
00085   int getTNumb(int,int,int);
00086   int getXNumb(int,int,int);
00087   int getPNaddr(int,int,int);
00088   int getNbOfPNs(int,int);
00089 
00090   int getNbOfMatacqsamples() {return nbofmtqsamples;}
00091   int getNbOfMatacqpresamples() {return nbofmtqpresamp;}
00092   int getvlastMatacqsample() {return vlastmtqsample;}
00093   int getNoiseCutForMatacq() {return nbofmtqsigmas;}
00094   int getNbOfsamplesBefMax() {return nbofmtqsamp1esbeforemax_parab;}
00095   int getNbOfsamplesAftMax() {return nbofmtqsamplesaftermax_parab;}
00096   int getThresForMatacq() {return thres_mtq;}
00097   int getLowLevelForTRise() {return ampllow_trise;}
00098   int getHighLevelForTRise() {return amplhigh_trise;}
00099 
00100   int getSignalTypeForSeq(int seqNumb) { return seqTypeOfSignal[seqNumb];}
00101   int getNbOfBurstperSignalForSeq(int seqNumb) { return numbOfBurstperSignal[seqNumb];}
00102   int getNbOfEventperBurstAndSignalForSeq(int seqNumb) { return numbOfEventperBurstAndSignal[seqNumb];}
00103 
00104   //  ClassDef(TMConfig,1)
00105 };
00106 
00107 #endif
00108