00001 #ifndef HcalTestBeam_HcalTBDigiProducer_h 00002 #define HcalTestBeam_HcalTBDigiProducer_h 00003 00004 #include "FWCore/Framework/interface/EDProducer.h" 00005 #include "FWCore/Framework/interface/Event.h" 00006 #include "FWCore/Framework/interface/EventSetup.h" 00007 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00008 #include "SimCalorimetry/HcalSimAlgos/interface/HcalDigitizerTraits.h" 00009 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h" 00010 #include "SimCalorimetry/CaloSimAlgos/interface/CaloTDigitizer.h" 00011 #include "SimCalorimetry/HcalTestBeam/interface/HcalTBSimParameterMap.h" 00012 #include "SimCalorimetry/HcalSimAlgos/interface/HcalShape.h" 00013 #include "SimCalorimetry/HcalSimAlgos/interface/HcalElectronicsSim.h" 00014 #include "SimCalorimetry/HcalSimAlgos/interface/HBHEHitFilter.h" 00015 #include "SimCalorimetry/HcalSimAlgos/interface/HOHitFilter.h" 00016 #include "SimCalorimetry/CaloSimAlgos/interface/CaloHitResponse.h" 00017 #include "SimCalorimetry/HcalSimAlgos/interface/HcalAmplifier.h" 00018 #include "SimCalorimetry/HcalSimAlgos/interface/HcalCoderFactory.h" 00019 #include "SimCalorimetry/HcalSimAlgos/interface/HcalHitCorrection.h" 00020 00021 #include<vector> 00022 #include<string> 00023 00024 class HcalTBDigiProducer : public edm::EDProducer { 00025 00026 public: 00027 00028 explicit HcalTBDigiProducer(const edm::ParameterSet& ps); 00029 virtual ~HcalTBDigiProducer(); 00030 00032 virtual void produce(edm::Event& e, const edm::EventSetup& c); 00033 00034 private: 00035 00037 void sortHits(const edm::PCaloHitContainer & hits); 00040 void checkGeometry(const edm::EventSetup& eventSetup); 00041 void updateGeometry(); 00042 00043 void setPhaseShift(const DetId & detId); 00044 00045 private: 00046 00048 typedef CaloTDigitizer<HBHEDigitizerTraits> HBHEDigitizer; 00049 typedef CaloTDigitizer<HODigitizerTraits> HODigitizer; 00050 00051 HcalTBSimParameterMap * theParameterMap; 00052 CaloVShape * theHcalShape; 00053 CaloVShape * theHcalIntegratedShape; 00054 00055 CaloHitResponse * theHBHEResponse; 00056 CaloHitResponse * theHOResponse; 00057 00058 HcalAmplifier * theAmplifier; 00059 HcalCoderFactory * theCoderFactory; 00060 HcalElectronicsSim * theElectronicsSim; 00061 00062 HBHEHitFilter theHBHEHitFilter; 00063 HOHitFilter theHOHitFilter; 00064 00065 HcalHitCorrection * theHitCorrection; 00066 00067 HBHEDigitizer * theHBHEDigitizer; 00068 HODigitizer * theHODigitizer; 00069 00070 const CaloGeometry * theGeometry; 00071 std::vector<DetId> hbheCells; 00072 std::vector<DetId> hoCells; 00073 00074 std::vector<PCaloHit> theHBHEHits, theHOHits; 00075 00076 std::string ecalTBInfoLabel; 00077 double thisPhaseShift; 00078 00079 bool doPhaseShift; 00080 double tunePhaseShift; 00081 }; 00082 00083 #endif 00084