File indexing completed on 2024-04-06 12:30:33
0001 #ifndef SimDataMixingHcalDigiWorkerProd_h
0002 #define SimDataMixingHcalDigiWorkerProd_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include "FWCore/Framework/interface/Event.h"
0018 #include "FWCore/Framework/interface/EventPrincipal.h"
0019 #include "FWCore/Framework/interface/EventSetup.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021
0022 #include "CalibFormats/CaloObjects/interface/CaloSamples.h"
0023 #include "DataFormats/Common/interface/Handle.h"
0024 #include "DataFormats/HcalDigi/interface/HBHEDataFrame.h"
0025 #include "DataFormats/HcalDigi/interface/HFDataFrame.h"
0026 #include "DataFormats/HcalDigi/interface/HODataFrame.h"
0027 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0028 #include "DataFormats/HcalDigi/interface/QIE10DataFrame.h"
0029 #include "DataFormats/HcalDigi/interface/QIE11DataFrame.h"
0030 #include "DataFormats/Provenance/interface/ProductID.h"
0031 #include "SimCalorimetry/HcalSimAlgos/interface/HcalSignalGenerator.h"
0032 #include "SimCalorimetry/HcalSimProducers/interface/HcalDigiProducer.h"
0033 #include "SimGeneral/DataMixingModule/plugins/HcalNoiseStorage.h"
0034
0035 #include <map>
0036 #include <string>
0037 #include <vector>
0038
0039 namespace edm {
0040 class ConsumesCollector;
0041 class ModuleCallingContext;
0042
0043 class DataMixingHcalDigiWorkerProd {
0044 public:
0045
0046 explicit DataMixingHcalDigiWorkerProd(const edm::ParameterSet &ps,
0047 edm::ConsumesCollector &&iC,
0048 const edm::ESGetToken<HcalDbService, HcalDbRecord> &);
0049
0050
0051 virtual ~DataMixingHcalDigiWorkerProd();
0052
0053 void putHcal(edm::Event &e, const edm::EventSetup &ES);
0054 void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES);
0055 void addHcalPileups(const int bcr,
0056 const edm::EventPrincipal *,
0057 unsigned int EventId,
0058 const edm::EventSetup &ES,
0059 edm::ModuleCallingContext const *);
0060
0061 void beginRun(const edm::Run &run, const edm::EventSetup &ES);
0062 void initializeEvent(const edm::Event &e, const edm::EventSetup &ES);
0063
0064 private:
0065
0066
0067
0068 edm::InputTag HBHEPileInputTag_;
0069 edm::InputTag HOPileInputTag_;
0070 edm::InputTag HFPileInputTag_;
0071 edm::InputTag ZDCPileInputTag_;
0072 edm::InputTag QIE10PileInputTag_;
0073 edm::InputTag QIE11PileInputTag_;
0074 std::string HBHEDigiCollectionDM_;
0075
0076 std::string HODigiCollectionDM_;
0077 std::string HFDigiCollectionDM_;
0078 std::string ZDCDigiCollectionDM_;
0079 std::string QIE10DigiCollectionDM_;
0080
0081 std::string QIE11DigiCollectionDM_;
0082
0083
0084 edm::EDGetTokenT<HBHEDigitizerTraits::DigiCollection> tok_hbhe_;
0085 edm::EDGetTokenT<HODigitizerTraits::DigiCollection> tok_ho_;
0086 edm::EDGetTokenT<HFDigitizerTraits::DigiCollection> tok_hf_;
0087 edm::EDGetTokenT<ZDCDigitizerTraits::DigiCollection> tok_zdc_;
0088 edm::EDGetTokenT<HcalQIE10DigitizerTraits::DigiCollection> tok_qie10_;
0089 edm::EDGetTokenT<HcalQIE11DigitizerTraits::DigiCollection> tok_qie11_;
0090
0091 const edm::ESGetToken<HcalDbService, HcalDbRecord> tokDB_;
0092
0093 HcalDigiProducer *myHcalDigitizer_;
0094 HBHESignalGenerator theHBHESignalGenerator;
0095 HOSignalGenerator theHOSignalGenerator;
0096 HFSignalGenerator theHFSignalGenerator;
0097 ZDCSignalGenerator theZDCSignalGenerator;
0098 QIE10SignalGenerator theQIE10SignalGenerator;
0099 QIE11SignalGenerator theQIE11SignalGenerator;
0100
0101 std::string label_;
0102 };
0103 }
0104
0105 #endif