00001 #ifndef SimCalorimetry_EcalTestBeam_EcalTBDigiProducer_h 00002 #define SimCalorimetry_EcalTestBeam_EcalTBDigiProducer_h 00003 00004 #include "SimCalorimetry/EcalSimProducers/interface/EcalDigiProducer.h" 00005 #include "Geometry/CaloTopology/interface/EcalTrigTowerConstituentsMap.h" 00006 #include "SimCalorimetry/EcalTestBeamAlgos/interface/EcalTBReadout.h" 00007 #include "RecoTBCalo/EcalTBTDCReconstructor/interface/EcalTBTDCRecInfoAlgo.h" 00008 #include "TBDataFormats/EcalTBObjects/interface/EcalTBTDCRawInfo.h" 00009 00010 namespace edm { 00011 class EDProducer; 00012 class Event; 00013 class EventSetup; 00014 class ParameterSet; 00015 } 00016 class PileUpEventPrincipal; 00017 00018 class EcalTBDigiProducer : public EcalDigiProducer 00019 { 00020 public: 00021 00022 EcalTBDigiProducer( const edm::ParameterSet& params, edm::EDProducer& mixMod ) ; 00023 virtual ~EcalTBDigiProducer() ; 00024 00025 00026 virtual void initializeEvent(edm::Event const&, edm::EventSetup const&); 00027 virtual void finalizeEvent(edm::Event&, edm::EventSetup const&); 00028 00029 private: 00030 00031 virtual void cacheEBDigis( const EBDigiCollection* ebDigiPtr ) const ; 00032 virtual void cacheEEDigis( const EEDigiCollection* eeDigiPtr ) const ; 00033 00034 void setPhaseShift( const DetId& detId ) ; 00035 00036 void fillTBTDCRawInfo( EcalTBTDCRawInfo& theTBTDCRawInfo ) ; 00037 00038 const EcalTrigTowerConstituentsMap m_theTTmap ; 00039 EcalTBReadout* m_theTBReadout ; 00040 00041 std::string m_ecalTBInfoLabel ; 00042 std::string m_EBdigiFinalTag ; 00043 std::string m_EBdigiTempTag ; 00044 00045 bool m_doPhaseShift ; 00046 double m_thisPhaseShift ; 00047 00048 bool m_doReadout ; 00049 00050 std::vector<EcalTBTDCRecInfoAlgo::EcalTBTDCRanges> m_tdcRanges ; 00051 bool m_use2004OffsetConvention ; 00052 00053 double m_tunePhaseShift ; 00054 00055 mutable std::auto_ptr<EBDigiCollection> m_ebDigis ; 00056 mutable std::auto_ptr<EEDigiCollection> m_eeDigis ; 00057 mutable std::auto_ptr<EcalTBTDCRawInfo> m_TDCproduct ; 00058 }; 00059 00060 #endif