File indexing completed on 2024-04-06 11:59:41
0001 #ifndef CalibTracker_SiStripChannelGain_SiStripGainRandomCalculator_h
0002 #define CalibTracker_SiStripChannelGain_SiStripGainRandomCalculator_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include "CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h"
0022 #include "CondFormats/SiStripObjects/interface/SiStripApvGain.h"
0023
0024 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0025 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0026 #include "FWCore/Framework/interface/ESWatcher.h"
0027
0028 #include <vector>
0029 #include <memory>
0030
0031 class SiStripGainRandomCalculator : public ConditionDBWriter<SiStripApvGain> {
0032 public:
0033 explicit SiStripGainRandomCalculator(const edm::ParameterSet &);
0034 ~SiStripGainRandomCalculator() override;
0035
0036 private:
0037 void algoAnalyze(const edm::Event &, const edm::EventSetup &) override;
0038
0039 std::unique_ptr<SiStripApvGain> getNewObject() override;
0040
0041 private:
0042 double meanGain_;
0043 double sigmaGain_;
0044 double minimumPosValue_;
0045
0046 std::vector<std::pair<uint32_t, unsigned short> > detid_apvs_;
0047 bool printdebug_;
0048
0049 edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> tkGeomToken_;
0050 edm::ESWatcher<TrackerDigiGeometryRecord> tkDigiGeomRcdWatcher_;
0051 };
0052 #endif