00001 #ifndef ECALTBDDIGIPRODUCER_H 00002 #define ECALTBDDIGIPRODUCER_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/CaloSimAlgos/interface/CaloHitResponse.h" 00009 #include "SimCalorimetry/CaloSimAlgos/interface/CaloTDigitizer.h" 00010 #include "SimCalorimetry/EcalSimAlgos/interface/EcalTDigitizer.h" 00011 #include "SimGeneral/NoiseGenerators/interface/CorrelatedNoisifier.h" 00012 #include "SimCalorimetry/EcalSimAlgos/interface/EcalSimParameterMap.h" 00013 #include "SimCalorimetry/EcalSimAlgos/interface/EcalCorrelatedNoiseMatrix.h" 00014 #include "SimCalorimetry/EcalSimAlgos/interface/EcalShape.h" 00015 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h" 00016 #include "SimCalorimetry/EcalSimAlgos/interface/EcalCoder.h" 00017 #include "SimCalorimetry/EcalSimAlgos/interface/EcalElectronicsSim.h" 00018 #include "SimCalorimetry/EcalSimAlgos/interface/EcalDigitizerTraits.h" 00019 #include "Geometry/CaloGeometry/interface/CaloGeometry.h" 00020 #include "Geometry/CaloTopology/interface/EcalTrigTowerConstituentsMap.h" 00021 00022 #include "SimCalorimetry/EcalTestBeamAlgos/interface/EcalTBReadout.h" 00023 00024 #include "TBDataFormats/EcalTBObjects/interface/EcalTBTDCSample.h" 00025 #include "TBDataFormats/EcalTBObjects/interface/EcalTBTDCRawInfo.h" 00026 #include "RecoTBCalo/EcalTBTDCReconstructor/interface/EcalTBTDCRecInfoAlgo.h" 00027 00028 #include <string> 00029 00030 class EcalTBDigiProducer : public edm::EDProducer 00031 { 00032 public: 00033 00034 // The following is not yet used, but will be the primary 00035 // constructor when the parameter set system is available. 00036 // 00037 explicit EcalTBDigiProducer(const edm::ParameterSet& params); 00038 virtual ~EcalTBDigiProducer(); 00039 00041 void produce(edm::Event& event, const edm::EventSetup& eventSetup); 00042 00043 private: 00044 00045 void checkGeometry(const edm::EventSetup & eventSetup); 00046 00047 void updateGeometry(); 00048 00049 void checkCalibrations(const edm::EventSetup & eventSetup); 00050 00051 void setPhaseShift(const DetId & detId); 00052 00053 void fillTBTDCRawInfo(EcalTBTDCRawInfo & theTBTDCRawInfo); 00054 00056 typedef EcalTDigitizer<EBDigitizerTraits> EBDigitizer; 00057 //typedef CaloTDigitizer<EBDigitizerTraits> EBDigitizer; 00058 00059 EBDigitizer * theBarrelDigitizer; 00060 00061 const EcalSimParameterMap * theParameterMap; 00062 const CaloVShape * theEcalShape; 00063 00064 CaloHitResponse * theEcalResponse; 00065 00066 CorrelatedNoisifier<EcalCorrMatrix> * theCorrNoise; 00067 EcalCorrelatedNoiseMatrix * theNoiseMatrix; 00068 00069 EcalElectronicsSim * theElectronicsSim; 00070 EcalCoder * theCoder; 00071 00072 const CaloGeometry * theGeometry; 00073 00074 const EcalTrigTowerConstituentsMap * theTTmap; 00075 00076 EcalTBReadout * theTBReadout; 00077 00078 std::string ecalTBInfoLabel; 00079 00080 bool doPhaseShift; 00081 double thisPhaseShift; 00082 00083 bool doReadout; 00084 00085 std::vector<EcalTBTDCRecInfoAlgo::EcalTBTDCRanges> tdcRanges; 00086 bool use2004OffsetConvention_; 00087 00088 double tunePhaseShift; 00089 00090 std::string EBdigiCollection_; 00091 std::string hitsProducer_; 00092 00093 double EBs25notCont; 00094 double EEs25notCont; 00095 }; 00096 00097 #endif