Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00008 #include "FWCore/Utilities/interface/EDMException.h"
00009 #include "FWCore/Framework/interface/Selector.h"
00010 #include "DataMixingHcalDigiWorkerProd.h"
00011
00012
00013 using namespace std;
00014 namespace edm {
00015
00016 DataMixingHcalDigiWorkerProd::DataMixingHcalDigiWorkerProd(const edm::ParameterSet& ps) :
00017 HBHEPileInputTag_(ps.getParameter<edm::InputTag>("HBHEPileInputTag")),
00018 HOPileInputTag_(ps.getParameter<edm::InputTag>("HOPileInputTag")),
00019 HFPileInputTag_(ps.getParameter<edm::InputTag>("HFPileInputTag")),
00020 ZDCPileInputTag_(ps.getParameter<edm::InputTag>("ZDCPileInputTag")),
00021 theHBHESignalGenerator(HBHEPileInputTag_),
00022 theHOSignalGenerator(HOPileInputTag_),
00023 theHFSignalGenerator(HFPileInputTag_),
00024 theZDCSignalGenerator(ZDCPileInputTag_),
00025 label_(ps.getParameter<std::string>("Label"))
00026 {
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
00045 HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
00046 HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
00047 ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
00048
00049
00050
00051 myHcalDigitizer_ = new HcalDigitizer( ps );
00052
00053 myHcalDigitizer_->setHBHENoiseSignalGenerator( & theHBHESignalGenerator );
00054 myHcalDigitizer_->setHFNoiseSignalGenerator( & theHFSignalGenerator );
00055 myHcalDigitizer_->setHONoiseSignalGenerator( & theHOSignalGenerator );
00056 myHcalDigitizer_->setZDCNoiseSignalGenerator( & theZDCSignalGenerator );
00057
00058 }
00059
00060
00061 DataMixingHcalDigiWorkerProd::~DataMixingHcalDigiWorkerProd() {
00062 delete myHcalDigitizer_;
00063
00064
00065 }
00066
00067 void DataMixingHcalDigiWorkerProd::addHcalSignals(const edm::Event &e,const edm::EventSetup& ES) {
00068
00069
00070
00071 }
00072
00073 void DataMixingHcalDigiWorkerProd::addHcalPileups(const int bcr, const EventPrincipal *ep, unsigned int eventNr,const edm::EventSetup& ES) {
00074
00075 LogDebug("DataMixingHcalDigiWorkerProd") <<"\n===============> adding pileups from event "<<ep->id()<<" for bunchcrossing "<<bcr;
00076
00077 theHBHESignalGenerator.initializeEvent(ep, &ES);
00078 theHOSignalGenerator.initializeEvent(ep, &ES);
00079 theHFSignalGenerator.initializeEvent(ep, &ES);
00080 theZDCSignalGenerator.initializeEvent(ep, &ES);
00081
00082 theHBHESignalGenerator.fill();
00083 theHOSignalGenerator.fill();
00084 theHFSignalGenerator.fill();
00085 }
00086
00087 void DataMixingHcalDigiWorkerProd::putHcal(edm::Event &e,const edm::EventSetup& ES) {
00088
00089
00090
00091 myHcalDigitizer_->produce( e, ES );
00092 }
00093
00094 }
00095