Go to the documentation of this file.00001 #include "SimMuon/CSCDigitizer/src/CSCStripConditions.h"
00002
00003 #include "SimGeneral/NoiseGenerators/interface/CorrelatedNoisifier.icc"
00004
00005 template class CorrelatedNoisifier< CSCStripConditions::CSCCorrelatedNoiseMatrix > ;
00006
00007 template
00008 void
00009 CorrelatedNoisifier< CSCStripConditions::CSCCorrelatedNoiseMatrix
00010 >::noisify(CSCAnalogSignal&,
00011 const std::vector<double>* rangau) const ;
00012
00013
00014 CSCStripConditions::CSCStripConditions()
00015 : theNoisifier(0),
00016 theRandGaussQ(0)
00017 {}
00018
00019
00020 CSCStripConditions::~CSCStripConditions()
00021 {
00022 delete theRandGaussQ;
00023 }
00024
00025
00026 void CSCStripConditions::setRandomEngine(CLHEP::HepRandomEngine& engine)
00027 {
00028 if(theRandGaussQ) delete theRandGaussQ;
00029 theRandGaussQ = new CLHEP::RandGaussQ(engine);
00030 }
00031
00032
00033 float CSCStripConditions::smearedGain(const CSCDetId & detId, int channel) const
00034 {
00035 return theRandGaussQ->fire( gain(detId, channel), gainSigma(detId, channel) );
00036 }
00037
00038
00039 void CSCStripConditions::noisify(const CSCDetId & detId, CSCAnalogSignal & signal)
00040 {
00041 const int nScaBins = 8;
00042 const float scaBinSize = 50.;
00043 int channel = signal.getElement();
00044 std::vector<float> binValues(nScaBins, 0.);
00045
00046 CSCAnalogSignal tmpSignal(channel, scaBinSize, binValues,
00047 0., signal.getTimeOffset());
00048
00049 fetchNoisifier(detId, channel );
00050 theNoisifier->noisify(tmpSignal);
00051
00052 tmpSignal *= 1./gain(detId, channel);
00053 signal.superimpose(tmpSignal);
00054 }
00055
00056
00057 float CSCStripConditions::analogNoise(const CSCDetId & detId, int channel) const
00058 {
00059 return sqrt(2) * pedestalSigma(detId, channel) / gain(detId, channel);
00060 }
00061
00062