CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/SimCalorimetry/HcalSimProducers/interface/HcalDigitizer.h

Go to the documentation of this file.
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 
00015 class CaloHitResponse;
00016 class HcalSimParameterMap;
00017 class HcalAmplifier;
00018 class HPDIonFeedbackSim;
00019 class HcalCoderFactory;
00020 class HcalElectronicsSim;
00021 class HcalHitCorrection;
00022 class HcalTimeSlewSim;
00023 class HcalBaseSignalGenerator;
00024 class HcalShapes;
00025 
00026 class HcalDigitizer
00027 {
00028 public:
00029 
00030   explicit HcalDigitizer(const edm::ParameterSet& ps);
00031   virtual ~HcalDigitizer();
00032 
00034   void produce(edm::Event& e, const edm::EventSetup& c);
00035   void beginRun(const edm::EventSetup & es);
00036   void endRun();
00037   
00038   void setHBHENoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
00039   void setHFNoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
00040   void setHONoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
00041   void setZDCNoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
00042 
00043 private:
00045   void fillFakeHits();
00048   void checkGeometry(const edm::EventSetup& eventSetup);
00049   const CaloGeometry * theGeometry;
00050   void updateGeometry(const edm::EventSetup& eventSetup);
00051 
00052   void buildHOSiPMCells(const std::vector<DetId>& allCells, const edm::EventSetup& eventSetup);
00053 
00055   typedef CaloTDigitizer<HBHEDigitizerTraits> HBHEDigitizer;
00056   typedef CaloTDigitizer<HODigitizerTraits> HODigitizer;
00057   typedef CaloTDigitizer<HFDigitizerTraits> HFDigitizer;
00058   typedef CaloTDigitizer<ZDCDigitizerTraits> ZDCDigitizer;
00059  
00060   HcalSimParameterMap * theParameterMap;
00061   HcalShapes * theShapes;
00062 
00063   CaloHitResponse * theHBHEResponse;
00064   CaloHitResponse * theHBHESiPMResponse;
00065   CaloHitResponse * theHOResponse;
00066   CaloHitResponse * theHOSiPMResponse;
00067   CaloHitResponse * theHFResponse;
00068   CaloHitResponse * theZDCResponse;
00069 
00070   // we need separate amplifiers (and electronicssims)
00071   // because they might have separate noise generators
00072   HcalAmplifier * theHBHEAmplifier;
00073   HcalAmplifier * theHFAmplifier;
00074   HcalAmplifier * theHOAmplifier;
00075   HcalAmplifier * theZDCAmplifier;
00076 
00077   HPDIonFeedbackSim * theIonFeedback;
00078   HcalCoderFactory * theCoderFactory;
00079 
00080   HcalElectronicsSim * theHBHEElectronicsSim;
00081   HcalElectronicsSim * theHFElectronicsSim;
00082   HcalElectronicsSim * theHOElectronicsSim;
00083   HcalElectronicsSim * theZDCElectronicsSim;
00084 
00085 
00086   HBHEHitFilter theHBHEHitFilter;
00087   HFHitFilter   theHFHitFilter;
00088   HOHitFilter   theHOHitFilter;
00089   HcalHitFilter theHOSiPMHitFilter;
00090   ZDCHitFilter  theZDCHitFilter;
00091 
00092   HcalHitCorrection * theHitCorrection;
00093   HcalTimeSlewSim * theTimeSlewSim;
00094   CaloVNoiseSignalGenerator * theNoiseGenerator;
00095   CaloVNoiseHitGenerator * theNoiseHitGenerator;
00096 
00097   HBHEDigitizer * theHBHEDigitizer;
00098   HBHEDigitizer * theHBHESiPMDigitizer;
00099   HODigitizer* theHODigitizer;
00100   HODigitizer* theHOSiPMDigitizer;
00101   HFDigitizer* theHFDigitizer;
00102   ZDCDigitizer* theZDCDigitizer;
00103 
00104   // need to cache some DetIds for the digitizers,
00105   // if they don't come straight from the geometry
00106   std::vector<DetId> theHBHEDetIds;
00107   std::vector<DetId> theHOHPDDetIds;
00108   std::vector<DetId> theHOSiPMDetIds;
00109 
00110   bool isZDC,isHCAL,zdcgeo,hbhegeo,hogeo,hfgeo;
00111 
00112   std::string hitsProducer_;
00113 
00114   int theHOSiPMCode;
00115 };
00116 
00117 #endif
00118 
00119