Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:59:39

0001 #ifndef ApvAnalysis_TT6NoiseCalculator_H
0002 #define ApvAnalysis_TT6NoiseCalculator_H
0003 
0004 #include "CalibTracker/SiStripAPVAnalysis/interface/TkNoiseCalculator.h"
0005 /**
0006  * Concrete implementation of TkNoiseCalculator  for TT6.
0007  */
0008 
0009 class TT6NoiseCalculator : public TkNoiseCalculator {
0010 public:
0011   // Use the constructor without arguments, since the other will soon
0012   // be obsolete.
0013   TT6NoiseCalculator();
0014   TT6NoiseCalculator(int evnt_ini, int evnt_iter, float sig_cut);
0015   ~TT6NoiseCalculator() override;
0016 
0017   void setStripNoise(ApvAnalysis::PedestalType& in) override {
0018     theNoise.clear();
0019     theNoise = in;
0020   }
0021   ApvAnalysis::PedestalType noise() const override { return theNoise; }
0022   float stripNoise(int in) const override { return theNoise[in]; }
0023   int nevents() const { return numberOfEvents; }
0024 
0025   void updateStatus() override;
0026   void resetNoise() override { theNoise.clear(); }
0027   void updateNoise(ApvAnalysis::PedestalType& in) override;
0028   void newEvent() override;
0029 
0030   ApvAnalysis::PedestalType stripCMPSubtractedSignal() const { return theCMPSubtractedSignal; }
0031 
0032 protected:
0033   void init();
0034 
0035 protected:
0036   ApvAnalysis::PedestalType theNoise;
0037   ApvAnalysis::PedestalType theCMPSubtractedSignal;
0038   std::vector<double> theNoiseSum, theNoiseSqSum;
0039   std::vector<unsigned short> theEventPerStrip;
0040   int numberOfEvents;
0041   bool alreadyUsedEvent;
0042 
0043   int eventsRequiredToCalibrate_;
0044   int eventsRequiredToUpdate_;
0045   float cutToAvoidSignal_;
0046 };
0047 #endif