CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/DQM/SiStripCommissioningAnalysis/interface/SiStripPulseShape.h

Go to the documentation of this file.
00001 // Class:      SiStripPulseShape
00002 //
00011 //
00012 // Original Author:  Christophe Delaere
00013 //         Created:  Thu Nov  5 17:02:15 CEST 2006
00014 // $Id: SiStripPulseShape.h,v 1.1 2008/07/07 16:24:06 delaer Exp $
00015 //
00016 //
00017 
00018 #ifndef SiStripPulseShape_h_
00019 #define SiStripPulseShape_h_
00020 
00021 double fpeak(double *x, double *par);
00022 
00023 double fdeconv(double *x, double *par);
00024 
00025 double fpeak_convoluted(double *x, double *par);
00026 
00027 double fdeconv_convoluted(double *x, double *par);
00028 
00029 class SiStripPulseShape
00030 {
00031   public: 
00032     enum mode {peak,deconvolution};
00033     SiStripPulseShape():mode_(deconvolution) {}
00034     virtual ~SiStripPulseShape() {}
00035     inline void setMode(const mode theMode) { mode_=theMode; }
00036     inline mode getMode() const { return mode_; } 
00037     inline double getNormalizedValue(const double& t) const
00038     {
00039       double parameters[5]={0.,-2.82,0.066,50,20};
00040       double time = t;
00041       switch(mode_) {
00042        case peak:
00043         {
00044           return fpeak_convoluted(&time,parameters);
00045         }
00046        case deconvolution:
00047         {
00048           return fdeconv_convoluted(&time,parameters);
00049         }
00050       }
00051     }
00052 
00053   private:
00054     mode mode_;
00055 };
00056 
00057 #endif