File indexing completed on 2024-04-06 11:59:39
0001 #ifndef Tracker_TT6CommonModeCalculator_h
0002 #define Tracker_TT6CommonModeCalculator_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
0009
0010
0011 class TT6CommonModeCalculator : public TkCommonModeCalculator {
0012 public:
0013 TT6CommonModeCalculator(TkNoiseCalculator* noise_calc, TkApvMask* mask_calc, float sig_cut);
0014
0015 ~TT6CommonModeCalculator() 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 void calculateCMSlope(ApvAnalysis::PedestalType&);
0029
0030 TkCommonMode* theTkCommonMode;
0031 std::vector<float> theCommonModeValues;
0032 TkNoiseCalculator* theNoiseCalculator;
0033 TkApvMask* theApvMask;
0034 bool alreadyUsedEvent;
0035 float slope;
0036
0037 float cutToAvoidSignal;
0038 };
0039 #endif