CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CalibTracker/SiStripAPVAnalysis/interface/TT6NoiseCalculator.h

Go to the documentation of this file.
00001 #ifndef ApvAnalysis_TT6NoiseCalculator_H
00002 #define ApvAnalysis_TT6NoiseCalculator_H
00003 
00004 #include "CalibTracker/SiStripAPVAnalysis/interface/TkNoiseCalculator.h"
00009 class TT6NoiseCalculator : public TkNoiseCalculator {
00010   
00011 public:  
00012   
00013   // Use the constructor without arguments, since the other will soon
00014   // be obsolete.
00015   TT6NoiseCalculator();
00016   TT6NoiseCalculator(int evnt_ini,int evnt_iter,float sig_cut);
00017   virtual ~TT6NoiseCalculator();
00018 
00019   void setStripNoise(ApvAnalysis::PedestalType& in) {theNoise.clear(); theNoise = in;}
00020   ApvAnalysis::PedestalType noise() const {return theNoise;}
00021   float stripNoise(int in) const {return theNoise[in];}
00022   int nevents() const {return numberOfEvents;}
00023 
00024   void updateStatus();  
00025   void resetNoise() {theNoise.clear();}
00026   void updateNoise(ApvAnalysis::PedestalType& in);
00027   void newEvent();
00028   
00029   ApvAnalysis::PedestalType stripCMPSubtractedSignal() const
00030                {return theCMPSubtractedSignal;}
00031   
00032 protected:
00033   void init();
00034 
00035 protected:
00036   ApvAnalysis::PedestalType theNoise;
00037   ApvAnalysis::PedestalType theCMPSubtractedSignal;
00038   std::vector<double> theNoiseSum,theNoiseSqSum;
00039   std::vector<unsigned short> theEventPerStrip;
00040   int numberOfEvents;
00041   bool alreadyUsedEvent;
00042 
00043   int eventsRequiredToCalibrate_;
00044   int eventsRequiredToUpdate_;
00045   float cutToAvoidSignal_;
00046 };
00047 #endif