00001 #ifndef Tracker_MedianCommonModeCalculator_h 00002 #define Tracker_MedianCommonModeCalculator_h 00003 00004 #include "CalibTracker/SiStripAPVAnalysis/interface/TkCommonModeCalculator.h" 00005 #include "CalibTracker/SiStripAPVAnalysis/interface/TkNoiseCalculator.h" 00006 #include "CalibTracker/SiStripAPVAnalysis/interface/TkApvMask.h" 00011 class MedianCommonModeCalculator : public TkCommonModeCalculator { 00012 public: 00013 00014 MedianCommonModeCalculator(); 00015 00016 virtual ~MedianCommonModeCalculator(); 00017 00018 ApvAnalysis::PedestalType doIt(ApvAnalysis::PedestalType); 00019 00020 void setCM(TkCommonMode* in) {theTkCommonMode = in;} 00021 void setCM(std::vector<float> in) {theTkCommonMode->setCommonMode(in);} 00022 TkCommonMode* commonMode() {return theTkCommonMode;} 00023 00024 void newEvent(); 00025 float getCMSlope() { return slope;} 00026 00027 protected: 00028 00029 void calculateCommonMode(ApvAnalysis::PedestalType&); 00030 00031 TkCommonMode* theTkCommonMode; 00032 std::vector<float> theCommonModeValues; 00033 bool alreadyUsedEvent; 00034 float slope; 00035 00039 00040 }; 00041 #endif 00042 00043 00044 00045