00001 #ifndef Tracker_TT6CommonModeCalculator_h 00002 #define Tracker_TT6CommonModeCalculator_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 TT6CommonModeCalculator : public TkCommonModeCalculator { 00012 public: 00013 00014 TT6CommonModeCalculator(TkNoiseCalculator* noise_calc, 00015 TkApvMask* mask_calc, float sig_cut); 00016 00017 virtual ~TT6CommonModeCalculator(); 00018 00019 ApvAnalysis::PedestalType doIt(ApvAnalysis::PedestalType); 00020 00021 void setCM(TkCommonMode* in) {theTkCommonMode = in;} 00022 void setCM(std::vector<float> in) {theTkCommonMode->setCommonMode(in);} 00023 TkCommonMode* commonMode() {return theTkCommonMode;} 00024 00025 void newEvent(); 00026 float getCMSlope() { return slope;} 00027 00028 protected: 00029 00030 void calculateCommonMode(ApvAnalysis::PedestalType&); 00031 void calculateCMSlope(ApvAnalysis::PedestalType&); 00032 00033 TkCommonMode* theTkCommonMode; 00034 std::vector<float> theCommonModeValues; 00035 TkNoiseCalculator* theNoiseCalculator; 00036 TkApvMask* theApvMask; 00037 bool alreadyUsedEvent; 00038 float slope; 00039 00040 00041 float cutToAvoidSignal; 00042 }; 00043 #endif 00044 00045 00046 00047