21 DataMixingSiStripWorker::DataMixingSiStripWorker() {}
25 : label_(ps.getParameter<
std::
string>(
"Label"))
59 for (; DSViter != input->end(); DSViter++) {
61 LogDebug(
"DataMixingSiStripWorker") <<
"Processing DetID " << DSViter->id;
65 LocalMap.
reserve((DSViter->data).size());
66 LocalMap.insert(LocalMap.end(), (DSViter->data).
begin(), (DSViter->data).
end());
77 LogDebug(
"DataMixingSiStripWorker") <<
"\n===============> adding pileups from event " << ep->
id()
78 <<
" for bunchcrossing " << bcr;
83 std::shared_ptr<Wrapper<edm::DetSetVector<SiStripDigi>>
const> inputPTR =
99 for (; DSViter != input->
end(); DSViter++) {
101 LogDebug(
"DataMixingSiStripWorker") <<
"Pileups: Processing DetID " << DSViter->id;
106 SiGlobalIndex::const_iterator itest;
112 LocalMap = itest->second;
123 LocalMap.
reserve((DSViter->data).size());
134 std::vector<edm::DetSet<SiStripDigi>> vSiStripDigi;
147 int formerStrip = -1;
151 OneDetectorMap::const_iterator iLocalchk;
152 OneDetectorMap::const_iterator iLocal = LocalMap.begin();
153 for (; iLocal != LocalMap.end(); ++iLocal) {
154 currentStrip = iLocal->strip();
156 if (currentStrip == formerStrip) {
157 ADCSum += iLocal->adc();
159 if (formerStrip != -1) {
162 else if (ADCSum > 253 && ADCSum < 512)
168 formerStrip = currentStrip;
169 ADCSum = iLocal->adc();
173 if ((++iLocalchk) == LocalMap.end()) {
176 else if (ADCSum > 253 && ADCSum < 512)
182 vSiStripDigi.push_back(SSD);
187 LogInfo(
"DataMixingSiStripWorker") <<
"total # Merged strips: " << vSiStripDigi.size();
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void push_back(const T &t)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
EventID const & id() const
std::vector< SiStripDigi > OneDetectorMap
edm::InputTag SiStripPileInputTag_
static std::string const input
edm::InputTag SistripLabelSig_
Container::value_type value_type
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
iterator end()
Return the off-the-end iterator.
void addSiStripPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > SiStripDigiToken_
virtual ~DataMixingSiStripWorker()
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > SiStripDigiPToken_
SiGlobalIndex SiHitStorage_
void insert(detset const &s)
Insert the given DetSet.
void addSiStripSignals(const edm::Event &e)
std::string SiStripDigiCollectionDM_
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
void putSiStrip(edm::Event &e)