Go to the documentation of this file.00001 #ifndef SiStripNoiseNormalizedWithApvGainBuilder_H
00002 #define SiStripNoiseNormalizedWithApvGainBuilder_H
00003
00004 #include "FWCore/ServiceRegistry/interface/Service.h"
00005 #include "CondCore/DBCommon/interface/Exception.h"
00006 #include "CondCore/DBOutputService/interface/PoolDBOutputService.h"
00007 #include "FWCore/Framework/interface/MakerMacros.h"
00008 #include "FWCore/Framework/interface/Frameworkfwd.h"
00009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00010 #include "FWCore/Utilities/interface/Exception.h"
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 #include "CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h"
00013 #include "FWCore/ParameterSet/interface/FileInPath.h"
00014 #include "FWCore/Framework/interface/ESHandle.h"
00015
00016 #include "CondFormats/SiStripObjects/interface/SiStripApvGain.h"
00017 #include "CondFormats/SiStripObjects/interface/SiStripNoises.h"
00018
00019 #include "CLHEP/Random/RandFlat.h"
00020 #include "CLHEP/Random/RandGauss.h"
00021
00028 class SiStripNoiseNormalizedWithApvGainBuilder : public edm::EDAnalyzer
00029 {
00030 public:
00031
00032 explicit SiStripNoiseNormalizedWithApvGainBuilder( const edm::ParameterSet& iConfig);
00033
00034 ~SiStripNoiseNormalizedWithApvGainBuilder(){};
00035
00036 virtual void analyze(const edm::Event& , const edm::EventSetup& );
00037
00038 private:
00040 std::pair<int, int> subDetAndLayer(const uint32_t detit) const;
00042 void fillParameters(std::map<int, std::vector<double> > & mapToFill, const std::string & parameterName) const;
00050 void fillSubDetParameter(std::map<int, std::vector<double> > & mapToFill, const std::vector<double> & v, const int subDet, const unsigned short layers) const;
00051
00052 inline void printLog(const uint32_t detId, const unsigned short strip, const double & noise) const
00053 {
00054 edm::LogInfo("SiStripNoisesDummyCalculator") << "detid: " << detId << " strip: " << strip << " noise: " << noise << " \t" << std::endl;
00055 }
00056
00057 edm::FileInPath fp_;
00058 bool printdebug_;
00059 edm::ParameterSet pset_;
00060
00061 double electronsPerADC_;
00062 double minimumPosValue_;
00063 bool stripLengthMode_;
00064 uint32_t printDebug_;
00065 };
00066
00067 #endif