Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:14:35

0001 #ifndef Tracker_TkPedestalCalculator_h
0002 #define Tracker_TkPedestalCalculator_h
0003 
0004 #include "CalibTracker/SiStripAPVAnalysis/interface/ApvAnalysis.h"
0005 #include "CalibTracker/SiStripAPVAnalysis/interface/TkStateMachine.h"
0006 /**
0007  * The abstract class for pedestal calculation/subtraction.
0008  */
0009 class TkPedestalCalculator {
0010 public:
0011   virtual ~TkPedestalCalculator() {}
0012   /** Return reconstructed pedestals */
0013   //  virtual ApvAnalysis::PedestalType pedestal() const = 0 ;
0014   virtual ApvAnalysis::PedestalType pedestal() const = 0;
0015   virtual ApvAnalysis::PedestalType rawNoise() const = 0;
0016 
0017   /** Return status flag indicating if pedestals are usable */
0018   TkStateMachine* status() { return &theStatus; }
0019 
0020   virtual void resetPedestals() = 0;
0021   virtual void setPedestals(ApvAnalysis::PedestalType&) = 0;
0022 
0023   virtual void setNoise(ApvAnalysis::PedestalType&) {}
0024 
0025   /** Request that status flag be updated */
0026   virtual void updateStatus() = 0;
0027 
0028   //
0029   // Actions
0030   //
0031 
0032   /** Update pedestals with current event */
0033   virtual void updatePedestal(ApvAnalysis::RawSignalType& in) = 0;
0034 
0035   /** Return raw noise, determined without CMN subtraction */
0036 
0037   /** Tell pedestal calculator that a new event is available */
0038   virtual void newEvent() {}
0039 
0040 protected:
0041   TkStateMachine theStatus;
0042 };
0043 
0044 #endif