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