Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Tracker_MedianCommonModeCalculator_h
0002 #define Tracker_MedianCommonModeCalculator_h
0003 
0004 #include "CalibTracker/SiStripAPVAnalysis/interface/TkCommonModeCalculator.h"
0005 #include "CalibTracker/SiStripAPVAnalysis/interface/TkNoiseCalculator.h"
0006 #include "CalibTracker/SiStripAPVAnalysis/interface/TkApvMask.h"
0007 /**
0008  * Concrete implementation of TkCommonModeCalculator  for Median.
0009  */
0010 
0011 class MedianCommonModeCalculator : public TkCommonModeCalculator {
0012 public:
0013   MedianCommonModeCalculator();
0014 
0015   ~MedianCommonModeCalculator() override;
0016 
0017   ApvAnalysis::PedestalType doIt(const ApvAnalysis::PedestalType&) override;
0018 
0019   void setCM(TkCommonMode* in) override { theTkCommonMode = in; }
0020   void setCM(const std::vector<float>& in) override { theTkCommonMode->setCommonMode(in); }
0021   TkCommonMode* commonMode() override { return theTkCommonMode; }
0022 
0023   void newEvent() override;
0024   float getCMSlope() override { return slope; }
0025 
0026 protected:
0027   void calculateCommonMode(ApvAnalysis::PedestalType&);
0028 
0029   TkCommonMode* theTkCommonMode;
0030   std::vector<float> theCommonModeValues;
0031   bool alreadyUsedEvent;
0032   float slope;
0033 
0034   ///  TkNoiseCalculator*   theNoiseCalculator;
0035   ///  TkApvMask*           theApvMask;
0036   ///  float cutToAvoidSignal;
0037 };
0038 #endif