CMS 3D CMS Logo

EcalFenixLinearizer.h

Go to the documentation of this file.
00001 #ifndef ECAL_FENIX_LINEARIZER_H
00002 #define ECAL_FENIX_LINEARIZER_H
00003 
00004 #include <DataFormats/EcalDigi/interface/EcalMGPASample.h>
00005 #include <CondFormats/EcalObjects/interface/EcalTPGPedestals.h>
00006 #include <CondFormats/EcalObjects/interface/EcalTPGLinearizationConst.h>
00007 #include <vector> 
00008 
00017   class EcalFenixLinearizer  {
00018 
00019 
00020   private:
00021     bool famos_;
00022     int uncorrectedSample_;
00023     int gainID_;
00024     int base_;
00025     int mult_;
00026     int shift_;
00027     int strip_;
00028 
00029     const EcalTPGLinearizationConstant  *linConsts_;
00030     const EcalTPGPedestal *peds_;
00031 
00032     int setInput(const EcalMGPASample &RawSam) ;
00033     int process() ;
00034 
00035 
00036   public:
00037     EcalFenixLinearizer(bool famos);
00038     virtual ~EcalFenixLinearizer();
00039 
00040     template <class T>  
00041       void process(const T &, std::vector<int>&); 
00042     void setParameters(uint32_t raw, const EcalTPGPedestals * ecaltpPed,const EcalTPGLinearizationConst * ecaltpLin) ;
00043 };
00044 
00045 template <class T> 
00046 void EcalFenixLinearizer::process(const T&df, std::vector<int> & output_percry)
00047 {
00048 
00049   //We know a tower numbering is:
00050 // S1 S2 S3 S4 S5
00051 //
00052 // 4  5  14 15 24
00053 // 3  6  13 16 23
00054 // 2  7  12 17 22
00055 // 1  8  11 18 21
00056 // 0  9  10 19 20
00057   for (int i=0;i<df.size();i++) {
00058     setInput(df[i]);
00059     output_percry[i]=process();
00060   }
00061 
00062   return;
00063 }
00064 
00065 #endif

Generated on Tue Jun 9 17:46:17 2009 for CMSSW by  doxygen 1.5.4