File indexing completed on 2024-04-06 12:30:33
0001 #ifndef SimDataMixingSiStripWorker_h
0002 #define SimDataMixingSiStripWorker_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/ParameterSet/interface/ParameterSet.h"
0021
0022 #include "DataFormats/Common/interface/Handle.h"
0023 #include "DataFormats/Provenance/interface/ProductID.h"
0024
0025 #include "DataFormats/Common/interface/DetSet.h"
0026 #include "DataFormats/Common/interface/DetSetVector.h"
0027 #include "DataFormats/SiStripDigi/interface/SiStripDigi.h"
0028
0029 #include <map>
0030 #include <string>
0031 #include <vector>
0032
0033 namespace edm {
0034 class ModuleCallingContext;
0035
0036 class DataMixingSiStripWorker {
0037 public:
0038 DataMixingSiStripWorker();
0039
0040
0041 explicit DataMixingSiStripWorker(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC);
0042
0043
0044 virtual ~DataMixingSiStripWorker();
0045
0046 void putSiStrip(edm::Event &e);
0047 void addSiStripSignals(const edm::Event &e);
0048 void addSiStripPileups(const int bcr,
0049 const edm::EventPrincipal *,
0050 unsigned int EventId,
0051 ModuleCallingContext const *);
0052
0053 private:
0054
0055
0056 edm::InputTag SistripLabelSig_;
0057 edm::InputTag SiStripPileInputTag_;
0058 std::string SiStripDigiCollectionDM_;
0059
0060
0061 edm::EDGetTokenT<edm::DetSetVector<SiStripDigi>> SiStripDigiToken_;
0062 edm::EDGetTokenT<edm::DetSetVector<SiStripDigi>> SiStripDigiPToken_;
0063
0064
0065
0066 typedef std::vector<SiStripDigi> OneDetectorMap;
0067
0068 typedef std::map<uint32_t, OneDetectorMap> SiGlobalIndex;
0069
0070 SiGlobalIndex SiHitStorage_;
0071
0072
0073
0074 std::string label_;
0075
0076 class StrictWeakOrdering {
0077 public:
0078 bool operator()(SiStripDigi i, SiStripDigi j) const { return i.strip() < j.strip(); }
0079 };
0080 };
0081 }
0082
0083 #endif