Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:42

0001 #ifndef CSCDigitizer_CSCStripConditions_h
0002 #define CSCDigitizer_CSCStripConditions_h
0003 
0004 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "SimGeneral/NoiseGenerators/interface/CorrelatedNoisifier.h"
0007 #include "SimMuon/CSCDigitizer/src/CSCAnalogSignal.h"
0008 
0009 namespace CLHEP {
0010   class HepRandomEngine;
0011 }
0012 
0013 class CSCStripConditions {
0014 public:
0015   typedef math::ErrorD<8>::type CSCCorrelatedNoiseMatrix;
0016   typedef CorrelatedNoisifier<CSCCorrelatedNoiseMatrix> CSCCorrelatedNoisifier;
0017   CSCStripConditions();
0018 
0019   virtual ~CSCStripConditions();
0020 
0021   /// superimposes noise, in fC, on the signal
0022   void noisify(const CSCDetId &detId, CSCAnalogSignal &signal, CLHEP::HepRandomEngine *);
0023 
0024   virtual void initializeEvent(const edm::EventSetup &es) {}
0025 
0026   /// channels count from 1
0027   /// gain is the ratio that takes us from fC to ADC.  Nominally around 2
0028   virtual float gain(const CSCDetId &detId, int channel) const = 0;
0029   virtual float gainSigma(const CSCDetId &detId, int channel) const = 0;
0030   virtual float smearedGain(const CSCDetId &detId, int channel, CLHEP::HepRandomEngine *) const;
0031 
0032   /// in ADC counts
0033   virtual float pedestal(const CSCDetId &detId, int channel) const = 0;
0034   virtual float pedestalSigma(const CSCDetId &detId, int channel) const = 0;
0035 
0036   /// calculated from pedestalSigma & gain
0037   float analogNoise(const CSCDetId &detId, int channel) const;
0038 
0039   virtual void crosstalk(const CSCDetId &detId,
0040                          int channel,
0041                          double stripLength,
0042                          bool leftRight,
0043                          float &capacitive,
0044                          float &resistive) const = 0;
0045 
0046   /// is supplied layer/chamber flagged as bad? (default impl. is no)
0047   virtual bool isInBadChamber(const CSCDetId &id) const { return false; }
0048 
0049 protected:
0050   virtual void fetchNoisifier(const CSCDetId &detId, int istrip) = 0;
0051 
0052   CSCCorrelatedNoisifier *theNoisifier;
0053 };
0054 
0055 #endif