CMS 3D CMS Logo

SimpleNoiseCalculator.h

Go to the documentation of this file.
00001 #ifndef ApvAnalysis_SimpleNoiseCalculator_H
00002 #define ApvAnalysis_SimpleNoiseCalculator_H
00003 
00004 #include "CalibTracker/SiStripAPVAnalysis/interface/TkNoiseCalculator.h"
00009 class SimpleNoiseCalculator : public TkNoiseCalculator {
00010   
00011 public:  
00012   
00013   // Use the constructor without arguments, since the other will soon
00014   // be obsolete.
00015   SimpleNoiseCalculator();
00016   SimpleNoiseCalculator(int evnt_ini, bool useDB);
00017   virtual ~SimpleNoiseCalculator();
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   bool useDB_;  
00043 
00044   int eventsRequiredToCalibrate_;
00045   // int eventsRequiredToUpdate_;
00046   // float cutToAvoidSignal_;
00047 };
00048 #endif

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