00001 #ifndef ECALDDIGIPRODUCER_H 00002 #define ECALDDIGIPRODUCER_H 00003 00004 #include "FWCore/Framework/interface/EDProducer.h" 00005 #include "FWCore/Framework/interface/Event.h" 00006 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00007 #include "FWCore/Framework/interface/EventSetup.h" 00008 #include "SimCalorimetry/EcalSimAlgos/interface/APDShape.h" 00009 #include "SimCalorimetry/EcalSimAlgos/interface/EBShape.h" 00010 #include "SimCalorimetry/EcalSimAlgos/interface/EEShape.h" 00011 #include "SimCalorimetry/EcalSimAlgos/interface/ESShape.h" 00012 #include "DataFormats/Math/interface/Error.h" 00013 #include "SimGeneral/NoiseGenerators/interface/CorrelatedNoisifier.h" 00014 #include "SimCalorimetry/EcalSimAlgos/interface/EcalCorrelatedNoiseMatrix.h" 00015 #include "SimCalorimetry/EcalSimAlgos/interface/ESElectronicsSim.h" 00016 00017 #include "SimCalorimetry/CaloSimAlgos/interface/CaloTDigitizer.h" 00018 #include "SimCalorimetry/EcalSimAlgos/interface/EcalTDigitizer.h" 00019 #include "SimCalorimetry/EcalSimAlgos/interface/EcalDigitizerTraits.h" 00020 00021 00022 typedef EcalTDigitizer<EBDigitizerTraits> EBDigitizer ; 00023 typedef EcalTDigitizer<EEDigitizerTraits> EEDigitizer ; 00024 typedef CaloTDigitizer<ESOldDigitizerTraits> ESOldDigitizer ; 00025 00026 class ESDigitizer ; 00027 00028 class APDSimParameters ; 00029 class EBHitResponse ; 00030 class EEHitResponse ; 00031 class ESHitResponse ; 00032 class CaloHitResponse ; 00033 class EcalSimParameterMap ; 00034 class EcalCoder ; 00035 class EcalElectronicsSim ; 00036 class ESElectronicsSim ; 00037 class ESElectronicsSimFast ; 00038 class CaloGeometry ; 00039 class EBDigiCollection ; 00040 class EEDigiCollection ; 00041 class ESDigiCollection ; 00042 00043 class EcalDigiProducer : public edm::EDProducer 00044 { 00045 00046 public: 00047 00048 EcalDigiProducer( const edm::ParameterSet& params ) ; 00049 virtual ~EcalDigiProducer() ; 00050 00052 virtual void produce( edm::Event& event , 00053 const edm::EventSetup& eventSetup ) ; 00054 00055 virtual void cacheEBDigis( const EBDigiCollection* ebDigiPtr ) const { } 00056 virtual void cacheEEDigis( const EEDigiCollection* eeDigiPtr ) const { } 00057 00058 protected: 00059 00060 void checkGeometry(const edm::EventSetup& eventSetup) ; 00061 00062 void updateGeometry() ; 00063 00064 void checkCalibrations(const edm::Event& event, const edm::EventSetup& eventSetup) ; 00065 00066 const APDShape m_APDShape ; 00067 const EBShape m_EBShape ; 00068 const EEShape m_EEShape ; 00069 ESShape m_ESShape ; // no const because gain must be set 00070 00071 const std::string m_EBdigiCollection ; 00072 const std::string m_EEdigiCollection ; 00073 const std::string m_ESdigiCollection ; 00074 const std::string m_hitsProducerTag ; 00075 00076 bool m_useLCcorrection; 00077 00078 const bool m_apdSeparateDigi ; 00079 00080 const double m_EBs25notCont ; 00081 const double m_EEs25notCont ; 00082 00083 const unsigned int m_readoutFrameSize ; 00084 const EcalSimParameterMap* m_ParameterMap ; 00085 const std::string m_apdDigiTag ; 00086 const APDSimParameters* m_apdParameters ; 00087 00088 EBHitResponse* m_APDResponse ; 00089 EBHitResponse* m_EBResponse ; 00090 EEHitResponse* m_EEResponse ; 00091 ESHitResponse* m_ESResponse ; 00092 CaloHitResponse* m_ESOldResponse ; 00093 00094 const bool m_addESNoise ; 00095 00096 const bool m_doFastES ; 00097 00098 ESElectronicsSim* m_ESElectronicsSim ; 00099 ESOldDigitizer* m_ESOldDigitizer ; 00100 ESElectronicsSimFast* m_ESElectronicsSimFast ; 00101 ESDigitizer* m_ESDigitizer ; 00102 00103 EBDigitizer* m_APDDigitizer ; 00104 EBDigitizer* m_BarrelDigitizer ; 00105 EEDigitizer* m_EndcapDigitizer ; 00106 00107 EcalElectronicsSim* m_ElectronicsSim ; 00108 EcalCoder* m_Coder ; 00109 00110 EcalElectronicsSim* m_APDElectronicsSim ; 00111 EcalCoder* m_APDCoder ; 00112 00113 const CaloGeometry* m_Geometry ; 00114 00115 CorrelatedNoisifier<EcalCorrMatrix>* m_EBCorrNoise[3] ; 00116 CorrelatedNoisifier<EcalCorrMatrix>* m_EECorrNoise[3] ; 00117 }; 00118 00119 #endif