21 DataMixingSiStripRawWorker::DataMixingSiStripRawWorker() {}
25 : label_(ps.getParameter<std::
string>(
"Label"))
76 LogDebug(
"DataMixingSiStripRawWorker")
77 <<
"\n===============> adding pileups from event " << ep->
id() <<
" for bunchcrossing " << bcr;
79 std::shared_ptr<Wrapper<edm::DetSetVector<SiStripDigi>>
const> pSSD;
80 std::shared_ptr<Wrapper<edm::DetSetVector<SiStripRawDigi>>
const> pSSRD;
89 std::cout <<
"you shouldn't be here" << std::endl;
106 LogDebug(
"DataMixingSiStripRawWorker") <<
"Processing DetID " << DSViter->id;
110 LocalMap.
reserve((DSViter->data).size());
111 LocalMap.insert(LocalMap.end(), (DSViter->data).
begin(), (DSViter->data).
end());
121 std::vector<edm::DetSet<SiStripRawDigi>> vSiStripRawDigi;
130 SiGlobalIndex::const_iterator itest;
136 LogDebug(
"DataMixingSiStripRawWorker") <<
"Pileups: Processing DetID " << rawDSViter->id;
140 LocalMap = itest->second;
141 OneDetectorMap::const_iterator iLocal = LocalMap.
begin();
144 int currentstrip = 0;
146 while (iRawDigi != rawDSViter->
end()) {
147 int ADCSum = iRawDigi->adc();
150 if (iLocal->strip() == currentstrip) {
151 ADCSum += iLocal->adc();
167 vSiStripRawDigi.push_back(*rawDSViter);
176 std::unique_ptr<edm::DetSetVector<SiStripRawDigi>> MySiStripRawDigis(
edm::InputTag SistripLabelSig_
const edm::DetSetVector< SiStripDigi > * digicollection_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void push_back(const T &t)
void addSiStripSignals(const edm::Event &e)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
EventID const & id() const
virtual ~DataMixingSiStripRawWorker()
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > SiStripInputTok_
std::vector< SiStripDigi > OneDetectorMap
SiGlobalIndex SiHitStorage_
void addSiStripPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
edm::InputTag Sistripdigi_collectionSig_
Container::value_type value_type
std::string SiStripDigiCollectionDM_
iterator end()
Return the off-the-end iterator.
edm::InputTag SiStripRawInputTag_
void putSiStrip(edm::Event &e)
T const * product() const
T getParameter(std::string const &) const
edm::InputTag SiStripPileInputTag_
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > SiStripRawInputTok_
std::string SiStripRawDigiSource_
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
const edm::DetSetVector< SiStripRawDigi > * rawdigicollection_
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...