CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/CondFormats/HcalObjects/interface/HcalFlagHFDigiTimeParam.h

Go to the documentation of this file.
00001 #ifndef GUARD_HcalFlagHFDigiTimeParam
00002 #define GUARD_HcalFlagHFDigiTimeParam
00003 
00020 #include <boost/cstdint.hpp>
00021 #include <vector>
00022 
00023 class HcalFlagHFDigiTimeParam{
00024 
00025   // Default constructor sets parameters according to 6-TS digis
00026   // (Is there a way to pass in default vector arguments directly, rather than by using push_back?) 
00027  public:HcalFlagHFDigiTimeParam():mId(0),mHFdigiflagFirstSample(1),mHFdigiflagSamplesToAdd(3),mHFdigiflagExpectedPeak(2),mHFdigiflagMinEthreshold(40) {
00028     mHFdigiflagCoefficients.clear();
00029     mHFdigiflagCoefficients.push_back(0.93);
00030     mHFdigiflagCoefficients.push_back(-0.38275);
00031     mHFdigiflagCoefficients.push_back(-0.012667);
00032   }
00033   
00034   // Set parameters based on input
00035   HcalFlagHFDigiTimeParam(unsigned long fId, 
00036                           unsigned int fFirstSample, 
00037                           unsigned int fSamplesToAdd, 
00038                           unsigned int fExpectedPeak, 
00039                           double fminEThreshold, 
00040                           std::vector<double> fcoef): 
00041     mId(fId), 
00042     mHFdigiflagFirstSample(fFirstSample), 
00043     mHFdigiflagSamplesToAdd(fSamplesToAdd), 
00044     mHFdigiflagExpectedPeak(fExpectedPeak), 
00045     mHFdigiflagMinEthreshold(fminEThreshold),
00046     mHFdigiflagCoefficients(fcoef)
00047       {      }
00048     
00049     uint32_t rawId () const {return mId;}
00050   
00051 
00052     // Return flag parameter values
00053     uint32_t HFdigiflagFirstSample()   const  {return mHFdigiflagFirstSample;}
00054     uint32_t HFdigiflagSamplesToAdd()  const  {return mHFdigiflagSamplesToAdd;}
00055     uint32_t HFdigiflagExpectedPeak()  const  {return mHFdigiflagExpectedPeak;}
00056     double    HFdigiflagMinEThreshold() const  {return mHFdigiflagMinEthreshold;}
00057     std::vector<double> HFdigiflagCoefficients()  const {return mHFdigiflagCoefficients;}
00058 
00059  private:
00060     uint32_t mId; // detector ID
00061     uint32_t mHFdigiflagFirstSample;         // first sample used in NTS calculation
00062     uint32_t mHFdigiflagSamplesToAdd;        // # of sampels to use in NTS calculation
00063     uint32_t mHFdigiflagExpectedPeak;        // expected peak position; used for calculating TS(peak)
00064     double    mHFdigiflagMinEthreshold;       // minimum energy for flagged rechit
00065     std::vector<double> mHFdigiflagCoefficients; // coefficients used to parameterize TS(peak)/NTS threshold:  [0]-exp([1]+[2]*E+....)
00066 };
00067 
00068 #endif