00001 #ifndef DataMixingEMWorker_h 00002 #define SimDataMixingEMWorker_h 00003 00017 #include "FWCore/Framework/interface/Event.h" 00018 #include "FWCore/Framework/interface/EventPrincipal.h" 00019 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00020 00021 #include "DataFormats/Provenance/interface/ProductID.h" 00022 #include "DataFormats/Common/interface/Handle.h" 00023 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h" 00024 #include "DataFormats/EcalDetId/interface/EBDetId.h" 00025 #include "DataFormats/EcalDetId/interface/EEDetId.h" 00026 #include "DataFormats/EcalDetId/interface/ESDetId.h" 00027 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" 00028 00029 #include <map> 00030 #include <vector> 00031 #include <string> 00032 00033 00034 namespace edm 00035 { 00036 class DataMixingEMWorker 00037 { 00038 public: 00039 00040 DataMixingEMWorker(); 00041 00043 explicit DataMixingEMWorker(const edm::ParameterSet& ps); 00044 00046 virtual ~DataMixingEMWorker(); 00047 00048 void putEM(edm::Event &e) ; 00049 void addEMSignals(const edm::Event &e); 00050 void addEMPileups(const int bcr, const edm::EventPrincipal*,unsigned int EventId); 00051 00052 00053 private: 00054 // data specifiers 00055 00056 edm::InputTag EBProducerSig_; // primary? name given to collection of EB calib rechits 00057 edm::InputTag EEProducerSig_; // primary? name given to collection of EE calib rechits 00058 edm::InputTag ESProducerSig_; // primary? name given to collection of ES calib rechits 00059 00060 edm::InputTag EBrechitCollectionSig_; // secondary name given to collection of EB calib rechits 00061 edm::InputTag EErechitCollectionSig_; // secondary name given to collection of EE calib rechits 00062 edm::InputTag ESrechitCollectionSig_; // secondary name given to collection of ES calib rechits 00063 00064 edm::InputTag EBPileRecHitInputTag_; // full InputTag for pileup EB calib rechits 00065 edm::InputTag EEPileRecHitInputTag_; // full InputTag for pileup EE calib rechits 00066 edm::InputTag ESPileRecHitInputTag_; // full InputTag for pileup ES calib rechits 00067 00068 00069 00070 00071 std::string EBRecHitCollectionDM_; // secondary name to be given to EB collection of hits 00072 std::string EERecHitCollectionDM_; // secondary name to be given to EE collection of hits 00073 std::string ESRecHitCollectionDM_; // secondary name to be given to ES collection of hits 00074 00075 typedef std::multimap<DetId, EcalRecHit> EBRecHitMap; 00076 typedef std::multimap<DetId, EcalRecHit> EERecHitMap; 00077 typedef std::multimap<DetId, EcalRecHit> ESRecHitMap; 00078 00079 EBRecHitMap EBRecHitStorage_; 00080 EERecHitMap EERecHitStorage_; 00081 ESRecHitMap ESRecHitStorage_; 00082 00083 00084 // unsigned int eventId_; //=0 for signal, from 1-n for pileup events 00085 00086 std::string label_; 00087 00088 }; 00089 }//edm 00090 00091 #endif