![]() |
![]() |
00001 #ifndef HcalSimProducers_HcalDigitizer_h 00002 #define HcalSimProducers_HcalDigitizer_h 00003 00004 #include "SimCalorimetry/HcalSimAlgos/interface/HcalDigitizerTraits.h" 00005 #include "SimCalorimetry/CaloSimAlgos/interface/CaloTDigitizer.h" 00006 #include "SimCalorimetry/HcalSimAlgos/interface/HBHEHitFilter.h" 00007 #include "SimCalorimetry/HcalSimAlgos/interface/HFHitFilter.h" 00008 #include "SimCalorimetry/HcalSimAlgos/interface/HOHitFilter.h" 00009 #include "SimCalorimetry/HcalSimAlgos/interface/HcalHitFilter.h" 00010 #include "SimCalorimetry/HcalSimAlgos/interface/ZDCHitFilter.h" 00011 #include "Geometry/CaloGeometry/interface/CaloGeometry.h" 00012 #include "DataFormats/DetId/interface/DetId.h" 00013 #include "FWCore/Framework/interface/Frameworkfwd.h" 00014 #include "CondFormats/HcalObjects/interface/HcalCholeskyMatrix.h" 00015 #include "CondFormats/HcalObjects/interface/HcalCholeskyMatrices.h" 00016 00017 class CaloVShape; 00018 class CaloHitResponse; 00019 class HcalSimParameterMap; 00020 class HcalAmplifier; 00021 class HPDIonFeedbackSim; 00022 class HcalCoderFactory; 00023 class HcalElectronicsSim; 00024 class HcalHitCorrection; 00025 class HcalBaseSignalGenerator; 00026 00027 class HcalDigitizer 00028 { 00029 public: 00030 00031 explicit HcalDigitizer(const edm::ParameterSet& ps); 00032 virtual ~HcalDigitizer(); 00033 00035 virtual void produce(edm::Event& e, const edm::EventSetup& c); 00036 00037 void setHBHENoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator); 00038 void setHFNoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator); 00039 void setHONoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator); 00040 void setZDCNoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator); 00041 00042 private: 00044 void fillFakeHits(); 00047 void checkGeometry(const edm::EventSetup& eventSetup); 00048 const CaloGeometry * theGeometry; 00049 void updateGeometry(); 00050 00051 void buildHOSiPMCells(const std::vector<DetId>& allCells); 00052 00054 typedef CaloTDigitizer<HBHEDigitizerTraits> HBHEDigitizer; 00055 typedef CaloTDigitizer<HODigitizerTraits> HODigitizer; 00056 typedef CaloTDigitizer<HFDigitizerTraits> HFDigitizer; 00057 typedef CaloTDigitizer<ZDCDigitizerTraits> ZDCDigitizer; 00058 00059 HcalSimParameterMap * theParameterMap; 00060 CaloVShape * theHcalShape; 00061 CaloVShape * theSiPMShape; 00062 CaloVShape * theHFShape; 00063 CaloVShape * theZDCShape; 00064 CaloVShape * theHcalIntegratedShape; 00065 CaloVShape * theSiPMIntegratedShape; 00066 CaloVShape * theHFIntegratedShape; 00067 CaloVShape * theZDCIntegratedShape; 00068 00069 CaloHitResponse * theHBHEResponse; 00070 CaloHitResponse * theHBHESiPMResponse; 00071 CaloHitResponse * theHOResponse; 00072 CaloHitResponse * theHOSiPMResponse; 00073 CaloHitResponse * theHFResponse; 00074 CaloHitResponse * theZDCResponse; 00075 00076 // we need separate amplifiers (and electronicssims) 00077 // because they might have separate noise generators 00078 HcalAmplifier * theHBHEAmplifier; 00079 HcalAmplifier * theHFAmplifier; 00080 HcalAmplifier * theHOAmplifier; 00081 HcalAmplifier * theZDCAmplifier; 00082 00083 HPDIonFeedbackSim * theIonFeedback; 00084 HcalCoderFactory * theCoderFactory; 00085 00086 HcalElectronicsSim * theHBHEElectronicsSim; 00087 HcalElectronicsSim * theHFElectronicsSim; 00088 HcalElectronicsSim * theHOElectronicsSim; 00089 HcalElectronicsSim * theZDCElectronicsSim; 00090 00091 00092 HBHEHitFilter theHBHEHitFilter; 00093 HFHitFilter theHFHitFilter; 00094 HOHitFilter theHOHitFilter; 00095 HcalHitFilter theHOSiPMHitFilter; 00096 ZDCHitFilter theZDCHitFilter; 00097 00098 HcalHitCorrection * theHitCorrection; 00099 CaloVNoiseSignalGenerator * theNoiseGenerator; 00100 CaloVNoiseHitGenerator * theNoiseHitGenerator; 00101 00102 HBHEDigitizer * theHBHEDigitizer; 00103 HBHEDigitizer * theHBHESiPMDigitizer; 00104 HODigitizer* theHODigitizer; 00105 HODigitizer* theHOSiPMDigitizer; 00106 HFDigitizer* theHFDigitizer; 00107 ZDCDigitizer* theZDCDigitizer; 00108 00109 // need to cache some DetIds for the digitizers, 00110 // if they don't come straight from the geometry 00111 std::vector<DetId> theHBHEDetIds; 00112 std::vector<DetId> theHOHPDDetIds; 00113 std::vector<DetId> theHOSiPMDetIds; 00114 00115 bool isZDC,isHCAL,zdcgeo,hbhegeo,hogeo,hfgeo; 00116 00117 std::string hitsProducer_; 00118 00119 int theHOSiPMCode; 00120 }; 00121 00122 #endif 00123 00124