File indexing completed on 2024-04-06 12:30:32
0001 #ifndef SimDataMixingHcalDigiWorker_h
0002 #define SimDataMixingHcalDigiWorker_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include "FWCore/Framework/interface/ConsumesCollector.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/EventPrincipal.h"
0020 #include "FWCore/Framework/interface/EventSetup.h"
0021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0022
0023 #include "CalibFormats/CaloObjects/interface/CaloSamples.h"
0024 #include "CalibFormats/HcalObjects/interface/HcalDbRecord.h"
0025 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
0026 #include "DataFormats/Common/interface/Handle.h"
0027 #include "DataFormats/HcalDigi/interface/HBHEDataFrame.h"
0028 #include "DataFormats/HcalDigi/interface/HFDataFrame.h"
0029 #include "DataFormats/HcalDigi/interface/HODataFrame.h"
0030 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0031 #include "DataFormats/HcalDigi/interface/QIE10DataFrame.h"
0032 #include "DataFormats/HcalDigi/interface/QIE11DataFrame.h"
0033 #include "DataFormats/Provenance/interface/ProductID.h"
0034
0035 #include <map>
0036 #include <string>
0037 #include <vector>
0038
0039 namespace edm {
0040 class ModuleCallingContext;
0041
0042 class DataMixingHcalDigiWorker {
0043 public:
0044 DataMixingHcalDigiWorker();
0045
0046
0047 explicit DataMixingHcalDigiWorker(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC);
0048
0049
0050 virtual ~DataMixingHcalDigiWorker();
0051
0052 void putHcal(edm::Event &e, const edm::EventSetup &ES);
0053 void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES);
0054 void addHcalPileups(const int bcr,
0055 const edm::EventPrincipal *,
0056 unsigned int EventId,
0057 const edm::EventSetup &ES,
0058 ModuleCallingContext const *);
0059
0060 private:
0061
0062
0063
0064 edm::InputTag HBHEdigiCollectionSig_;
0065 edm::InputTag HOdigiCollectionSig_;
0066 edm::InputTag HFdigiCollectionSig_;
0067 edm::InputTag ZDCdigiCollectionSig_;
0068 edm::InputTag QIE10digiCollectionSig_;
0069 edm::InputTag QIE11digiCollectionSig_;
0070
0071 edm::InputTag HBHEPileInputTag_;
0072 edm::InputTag HOPileInputTag_;
0073 edm::InputTag HFPileInputTag_;
0074 edm::InputTag ZDCPileInputTag_;
0075 edm::InputTag QIE10PileInputTag_;
0076 edm::InputTag QIE11PileInputTag_;
0077
0078 edm::EDGetTokenT<HBHEDigiCollection> HBHEDigiToken_;
0079 edm::EDGetTokenT<HODigiCollection> HODigiToken_;
0080 edm::EDGetTokenT<HFDigiCollection> HFDigiToken_;
0081 edm::EDGetTokenT<ZDCDigiCollection> ZDCDigiToken_;
0082 edm::EDGetTokenT<QIE10DigiCollection> QIE10DigiToken_;
0083 edm::EDGetTokenT<QIE11DigiCollection> QIE11DigiToken_;
0084
0085 edm::EDGetTokenT<HBHEDigiCollection> HBHEDigiPToken_;
0086 edm::EDGetTokenT<HODigiCollection> HODigiPToken_;
0087 edm::EDGetTokenT<HFDigiCollection> HFDigiPToken_;
0088 edm::EDGetTokenT<ZDCDigiCollection> ZDCDigiPToken_;
0089 edm::EDGetTokenT<QIE10DigiCollection> QIE10DigiPToken_;
0090 edm::EDGetTokenT<QIE11DigiCollection> QIE11DigiPToken_;
0091
0092 std::string HBHEDigiCollectionDM_;
0093
0094 std::string HODigiCollectionDM_;
0095 std::string HFDigiCollectionDM_;
0096 std::string ZDCDigiCollectionDM_;
0097 std::string QIE10DigiCollectionDM_;
0098
0099 std::string QIE11DigiCollectionDM_;
0100
0101
0102 typedef std::multimap<DetId, CaloSamples> HBHEDigiMap;
0103 typedef std::multimap<DetId, CaloSamples> HFDigiMap;
0104 typedef std::multimap<DetId, CaloSamples> HODigiMap;
0105 typedef std::multimap<DetId, CaloSamples> ZDCDigiMap;
0106 typedef std::multimap<DetId, CaloSamples> QIE10DigiMap;
0107 typedef std::multimap<DetId, CaloSamples> QIE11DigiMap;
0108
0109 HBHEDigiMap HBHEDigiStorage_;
0110 HFDigiMap HFDigiStorage_;
0111 HODigiMap HODigiStorage_;
0112 ZDCDigiMap ZDCDigiStorage_;
0113 QIE10DigiMap QIE10DigiStorage_;
0114 QIE11DigiMap QIE11DigiStorage_;
0115
0116 bool DoZDC_;
0117
0118 std::string label_;
0119 edm::ESGetToken<HcalDbService, HcalDbRecord> dbToken_;
0120 };
0121 }
0122
0123 #endif