CMS 3D CMS Logo

PreMixingSiStripWorker.cc
Go to the documentation of this file.
11 
14 
15 //Data Formats
19 
27 
33 
34 #include "CLHEP/Random/RandFlat.h"
35 
38 
39 #include <map>
40 #include <memory>
41 
43 public:
45  ~PreMixingSiStripWorker() override = default;
46 
47  void initializeEvent(edm::Event const& e, edm::EventSetup const& c) override;
48  void addSignals(edm::Event const& e, edm::EventSetup const& es) override;
49  void addPileups(PileUpEventPrincipal const& pep, edm::EventSetup const& es) override;
50  void put(edm::Event& e, edm::EventSetup const& iSetup, std::vector<PileupSummaryInfo> const& ps, int bs) override;
51 
52 private:
53  void DMinitializeDetUnit(StripGeomDetUnit const* det, const edm::EventSetup& iSetup);
54 
55  // data specifiers
56 
57  edm::InputTag SistripLabelSig_; // name given to collection of SiStrip digis
58  edm::InputTag SiStripPileInputTag_; // InputTag for pileup strips
59  std::string SiStripDigiCollectionDM_; // secondary name to be given to new SiStrip digis
60 
61  edm::InputTag SistripAPVLabelSig_; // where to find vector of dead APVs
64 
65  //
66 
67  typedef float Amplitude;
68  typedef std::pair<uint16_t, Amplitude> RawDigi; // Replacement for SiStripDigi with pulse height instead of integer ADC
69  typedef std::vector<SiStripDigi> OneDetectorMap; // maps by strip ID for later combination - can have duplicate strips
70  typedef std::vector<RawDigi> OneDetectorRawMap; // maps by strip ID for later combination - can have duplicate strips
71  typedef std::map<uint32_t, OneDetectorMap> SiGlobalIndex; // map to all data for each detector ID
72  typedef std::map<uint32_t, OneDetectorRawMap> SiGlobalRawIndex; // map to all data for each detector ID
73 
75 
76  SiGlobalIndex SiHitStorage_;
77  SiGlobalRawIndex SiRawDigis_;
78 
79  // variables for temporary storage of mixed hits:
80  typedef std::map<int, Amplitude> SignalMapType;
81  typedef std::map<uint32_t, SignalMapType> signalMaps;
82 
83  const SignalMapType* getSignal(uint32_t detID) const {
84  auto where = signals_.find(detID);
85  if (where == signals_.end()) {
86  return nullptr;
87  }
88  return &where->second;
89  }
90 
91  signalMaps signals_;
92 
93  // to keep track of dead APVs from HIP interactions
94  typedef std::multimap<uint32_t, std::bitset<6>> APVMap;
95 
97 
98  // for noise adding:
99 
102  bool peakMode;
103  double theThreshold;
108 
109  std::unique_ptr<SiGaussianTailNoiseAdder> theSiNoiseAdder;
110  std::unique_ptr<SiStripFedZeroSuppression> theSiZeroSuppress;
111  std::unique_ptr<SiTrivialDigitalConverter> theSiDigitalConverter;
112 
114 
115  // bad channels for each detector ID
116  std::map<unsigned int, std::vector<bool>> allBadChannels;
117  // channels killed by HIP interactions for each detector ID
118  std::map<unsigned int, std::vector<bool>> allHIPChannels;
119  // first and last channel wit signal for each detector ID
120  std::map<unsigned int, size_t> firstChannelsWithSignal;
121  std::map<unsigned int, size_t> lastChannelsWithSignal;
122 
123  //----------------------------
124 
126  public:
127  bool operator()(SiStripDigi i, SiStripDigi j) const { return i.strip() < j.strip(); }
128  };
129 
131  public:
132  bool operator()(RawDigi i, RawDigi j) const { return i.first < j.first; }
133  };
134 };
135 
139  : gainLabel(ps.getParameter<std::string>("Gain")),
140  SingleStripNoise(ps.getParameter<bool>("SingleStripNoise")),
141  peakMode(ps.getParameter<bool>("APVpeakmode")),
142  theThreshold(ps.getParameter<double>("NoiseSigmaThreshold")),
143  theElectronPerADC(ps.getParameter<double>(peakMode ? "electronPerAdcPeak" : "electronPerAdcDec")),
144  APVSaturationFromHIP_(ps.getParameter<bool>("APVSaturationFromHIP")),
145  theFedAlgo(ps.getParameter<int>("FedAlgorithm_PM")),
146  geometryType(ps.getParameter<std::string>("GeometryType")),
149 
150 {
151  // declare the products to produce
152 
153  SistripLabelSig_ = ps.getParameter<edm::InputTag>("SistripLabelSig");
154  SiStripPileInputTag_ = ps.getParameter<edm::InputTag>("SiStripPileInputTag");
155 
156  SiStripDigiCollectionDM_ = ps.getParameter<std::string>("SiStripDigiCollectionDM");
157  SistripAPVListDM_ = ps.getParameter<std::string>("SiStripAPVListDM");
158 
160 
161  if (APVSaturationFromHIP_) {
162  SistripAPVLabelSig_ = ps.getParameter<edm::InputTag>("SistripAPVLabelSig");
163  SiStripAPVPileInputTag_ = ps.getParameter<edm::InputTag>("SistripAPVPileInputTag");
164  iC.consumes<std::vector<std::pair<int, std::bitset<6>>>>(SistripAPVLabelSig_);
165  }
167  // clear local storage for this event
168  SiHitStorage_.clear();
169 
171  if (!rng.isAvailable()) {
172  throw cms::Exception("Psiguration") << "SiStripDigitizer requires the RandomNumberGeneratorService\n"
173  "which is not present in the psiguration file. You must add the service\n"
174  "in the configuration file or remove the modules that require it.";
175  }
176 
178 }
179 
181  // initialize individual detectors so we can copy real digitization code:
182 
184 
185  for (auto iu = pDD->detUnits().begin(); iu != pDD->detUnits().end(); ++iu) {
186  unsigned int detId = (*iu)->geographicalId().rawId();
187  DetId idet = DetId(detId);
188  unsigned int isub = idet.subdetId();
189  if ((isub == StripSubdetector::TIB) || (isub == StripSubdetector::TID) || (isub == StripSubdetector::TOB) ||
190  (isub == StripSubdetector::TEC)) {
191  auto stripdet = dynamic_cast<StripGeomDetUnit const*>((*iu));
192  assert(stripdet != nullptr);
193  DMinitializeDetUnit(stripdet, iSetup);
194  }
195  }
196 }
197 
199  edm::ESHandle<SiStripBadStrip> deadChannelHandle;
200  iSetup.get<SiStripBadChannelRcd>().get(deadChannelHandle);
201 
202  unsigned int detId = det->geographicalId().rawId();
203  int numStrips = (det->specificTopology()).nstrips();
204 
205  SiStripBadStrip::Range detBadStripRange = deadChannelHandle->getRange(detId);
206  //storing the bad strip of the the module. the module is not removed but just signal put to 0
207  std::vector<bool>& badChannels = allBadChannels[detId];
208  std::vector<bool>& hipChannels = allHIPChannels[detId];
209  badChannels.clear();
210  badChannels.insert(badChannels.begin(), numStrips, false);
211  hipChannels.clear();
212  hipChannels.insert(hipChannels.begin(), numStrips, false);
213 
214  for (SiStripBadStrip::ContainerIterator it = detBadStripRange.first; it != detBadStripRange.second; ++it) {
215  SiStripBadStrip::data fs = deadChannelHandle->decode(*it);
216  for (int strip = fs.firstStrip; strip < fs.firstStrip + fs.range; ++strip)
217  badChannels[strip] = true;
218  }
219  firstChannelsWithSignal[detId] = numStrips;
220  lastChannelsWithSignal[detId] = 0;
221 }
222 
224  // fill in maps of hits
225 
227 
228  if (e.getByLabel(SistripLabelSig_, input)) {
229  OneDetectorMap LocalMap;
230 
231  //loop on all detsets (detectorIDs) inside the input collection
232  edm::DetSetVector<SiStripDigi>::const_iterator DSViter = input->begin();
233  for (; DSViter != input->end(); DSViter++) {
234 #ifdef DEBUG
235  LogDebug("PreMixingSiStripWorker") << "Processing DetID " << DSViter->id;
236 #endif
237 
238  LocalMap.clear();
239  LocalMap.reserve((DSViter->data).size());
240  LocalMap.insert(LocalMap.end(), (DSViter->data).begin(), (DSViter->data).end());
241 
242  SiHitStorage_.insert(SiGlobalIndex::value_type(DSViter->id, LocalMap));
243  }
244  }
245 
246  // keep here for future reference. In current implementation, HIP killing is done once in PU file
247  /* if(APVSaturationFromHIP_) {
248  edm::Handle<std::vector<std::pair<int,std::bitset<6>> > > APVinput;
249 
250  if( e.getByLabel(SistripAPVLabelSig_,APVinput) ) {
251 
252  std::vector<std::pair<int,std::bitset<6>> >::const_iterator entry = APVinput->begin();
253  for( ; entry != APVinput->end(); entry++) {
254  theAffectedAPVmap_.insert(APVMap::value_type(entry->first, entry->second));
255  }
256  }
257  } */
258 
259 } // end of addSiStripSignals
260 
262  LogDebug("PreMixingSiStripWorker") << "\n===============> adding pileups from event " << pep.principal().id()
263  << " for bunchcrossing " << pep.bunchCrossing();
264 
265  // fill in maps of hits; same code as addSignals, except now applied to the pileup events
266 
268  pep.getByLabel(SiStripPileInputTag_, inputHandle);
269 
270  if (inputHandle.isValid()) {
271  const auto& input = *inputHandle;
272 
273  OneDetectorMap LocalMap;
274 
275  //loop on all detsets (detectorIDs) inside the input collection
277  for (; DSViter != input.end(); DSViter++) {
278 #ifdef DEBUG
279  LogDebug("PreMixingSiStripWorker") << "Pileups: Processing DetID " << DSViter->id;
280 #endif
281 
282  // find correct local map (or new one) for this detector ID
283 
284  SiGlobalIndex::const_iterator itest;
285 
286  itest = SiHitStorage_.find(DSViter->id);
287 
288  if (itest != SiHitStorage_.end()) { // this detID already has hits, add to existing map
289 
290  LocalMap = itest->second;
291 
292  // fill in local map with extra channels
293  LocalMap.insert(LocalMap.end(), (DSViter->data).begin(), (DSViter->data).end());
294  std::stable_sort(LocalMap.begin(), LocalMap.end(), PreMixingSiStripWorker::StrictWeakOrdering());
295  SiHitStorage_[DSViter->id] = LocalMap;
296 
297  } else { // fill local storage with this information, put in global collection
298 
299  LocalMap.clear();
300  LocalMap.reserve((DSViter->data).size());
301  LocalMap.insert(LocalMap.end(), (DSViter->data).begin(), (DSViter->data).end());
302 
303  SiHitStorage_.insert(SiGlobalIndex::value_type(DSViter->id, LocalMap));
304  }
305  }
306 
307  if (APVSaturationFromHIP_) {
309  pep.getByLabel(SiStripAPVPileInputTag_, inputAPVHandle);
310 
311  if (inputAPVHandle.isValid()) {
312  const auto& APVinput = inputAPVHandle;
313 
314  std::vector<std::pair<int, std::bitset<6>>>::const_iterator entry = APVinput->begin();
315  for (; entry != APVinput->end(); entry++) {
316  theAffectedAPVmap_.insert(APVMap::value_type(entry->first, entry->second));
317  }
318  }
319  }
320  }
321 }
322 
324  edm::EventSetup const& iSetup,
325  std::vector<PileupSummaryInfo> const& ps,
326  int bs) {
327  // set up machinery to do proper noise adding:
328  edm::ESHandle<SiStripGain> gainHandle;
329  edm::ESHandle<SiStripNoises> noiseHandle;
330  edm::ESHandle<SiStripThreshold> thresholdHandle;
331  edm::ESHandle<SiStripPedestals> pedestalHandle;
332  edm::ESHandle<SiStripBadStrip> deadChannelHandle;
333  iSetup.get<SiStripGainSimRcd>().get(gainLabel, gainHandle);
334  iSetup.get<SiStripNoisesRcd>().get(noiseHandle);
335  iSetup.get<SiStripThresholdRcd>().get(thresholdHandle);
336  iSetup.get<SiStripPedestalsRcd>().get(pedestalHandle);
337 
339  CLHEP::HepRandomEngine* engine = &rng->getEngine(e.streamID());
340 
341  std::map<int, std::bitset<6>> DeadAPVList;
342  DeadAPVList.clear();
343 
344  // First, have to convert all ADC counts to raw pulse heights so that values can be added properly
345  // In PreMixing, pulse heights are saved with ADC = sqrt(9.0*PulseHeight) - have to undo.
346 
347  // This is done here because it's the only place we have access to EventSetup
348  // Simultaneously, merge lists of hit channels in each DetId.
349  // Signal Digis are in the list first, have to merge lists of hit strips on the fly,
350  // add signals on duplicates later
351 
352  OneDetectorRawMap LocalRawMap;
353 
354  // Now, loop over hits and add them to the map in the proper sorted order
355  // Note: We are assuming that the hits from the Signal events have been created in
356  // "PreMix" mode, rather than in the standard ADC conversion routines. If not, this
357  // doesn't work at all.
358 
359  // At the moment, both Signal and Reconstituted PU hits have the same compression algorithm.
360  // If this were different, and one needed gains, the conversion back to pulse height can only
361  // be done in this routine. So, yes, there is an extra loop over hits here in the current code,
362  // because, in principle, one could convert to pulse height during the read/store phase.
363 
364  for (SiGlobalIndex::const_iterator IDet = SiHitStorage_.begin(); IDet != SiHitStorage_.end(); IDet++) {
365  uint32_t detID = IDet->first;
366 
367  OneDetectorMap LocalMap = IDet->second;
368 
369  //loop over hit strips for this DetId, do conversion to pulse height, store.
370 
371  LocalRawMap.clear();
372 
373  OneDetectorMap::const_iterator iLocal = LocalMap.begin();
374  for (; iLocal != LocalMap.end(); ++iLocal) {
375  uint16_t currentStrip = iLocal->strip();
376  float signal = float(iLocal->adc());
377  if (iLocal->adc() == 1022)
378  signal = 1500.; // average values for overflows
379  if (iLocal->adc() == 1023)
380  signal = 3000.;
381 
382  //convert signals back to raw counts
383 
384  float ReSignal = signal * signal / 9.0; // The PreMixing conversion is adc = sqrt(9.0*pulseHeight)
385 
386  RawDigi NewRawDigi = std::make_pair(currentStrip, ReSignal);
387 
388  LocalRawMap.push_back(NewRawDigi);
389  }
390 
391  // save information for this detiD into global map
392  SiRawDigis_.insert(SiGlobalRawIndex::value_type(detID, LocalRawMap));
393  }
394 
395  // If we are killing APVs, merge list of dead ones before we digitize
396 
397  int NumberOfBxBetweenHIPandEvent = 1e3;
398 
399  if (APVSaturationFromHIP_) {
400  // calculate affected BX parameter
401 
402  bool HasAtleastOneAffectedAPV = false;
403  while (!HasAtleastOneAffectedAPV) {
404  for (int bx = floor(300.0 / 25.0); bx > 0; bx--) { //Reminder: make these numbers not hard coded!!
405  float temp = CLHEP::RandFlat::shoot(engine) < 0.5 ? 1 : 0;
406  if (temp == 1 && bx < NumberOfBxBetweenHIPandEvent) {
407  NumberOfBxBetweenHIPandEvent = bx;
408  HasAtleastOneAffectedAPV = true;
409  }
410  }
411  }
412 
413  APVMap::const_iterator iAPVchk;
414  uint32_t formerID = 0;
415  uint32_t currentID;
416  std::bitset<6> NewAPVBits;
417 
418  for (APVMap::const_iterator iAPV = theAffectedAPVmap_.begin(); iAPV != theAffectedAPVmap_.end(); ++iAPV) {
419  currentID = iAPV->first;
420 
421  if (currentID == formerID) { // we have to OR these
422  for (int ibit = 0; ibit < 6; ++ibit) {
423  NewAPVBits[ibit] = NewAPVBits[ibit] || (iAPV->second)[ibit];
424  }
425  } else {
426  DeadAPVList[currentID] = NewAPVBits;
427  //save pointers for next iteration
428  formerID = currentID;
429  NewAPVBits = iAPV->second;
430  }
431 
432  iAPVchk = iAPV;
433  if ((++iAPVchk) == theAffectedAPVmap_.end()) { //make sure not to lose the last one
434  DeadAPVList[currentID] = NewAPVBits;
435  }
436  }
437  }
438  //
439 
440  // Ok, done with merging raw signals and APVs - now add signals on duplicate strips
441 
442  // collection of Digis to put in the event
443  std::vector<edm::DetSet<SiStripDigi>> vSiStripDigi;
444 
445  // loop through our collection of detectors, merging hits and making a new list of "signal" digis
446 
447  // clear some temporary storage for later digitization:
448 
449  signals_.clear();
450 
451  // big loop over Detector IDs:
452  for (SiGlobalRawIndex::const_iterator IDet = SiRawDigis_.begin(); IDet != SiRawDigis_.end(); IDet++) {
453  uint32_t detID = IDet->first;
454 
455  SignalMapType Signals;
456  Signals.clear();
457 
458  OneDetectorRawMap LocalMap = IDet->second;
459 
460  //counter variables
461  int formerStrip = -1;
462  int currentStrip;
463  float ADCSum = 0;
464 
465  //loop over hit strips for this DetId, add duplicates
466 
467  OneDetectorRawMap::const_iterator iLocalchk;
468  OneDetectorRawMap::const_iterator iLocal = LocalMap.begin();
469  for (; iLocal != LocalMap.end(); ++iLocal) {
470  currentStrip = iLocal->first; // strip is first element
471 
472  if (currentStrip == formerStrip) { // we have to add these digis together
473 
474  ADCSum += iLocal->second; // raw pulse height is second element.
475  } else {
476  if (formerStrip != -1) {
477  Signals.insert(std::make_pair(formerStrip, ADCSum));
478  }
479  // save pointers for next iteration
480  formerStrip = currentStrip;
481  ADCSum = iLocal->second; // lone ADC
482  }
483 
484  iLocalchk = iLocal;
485  if ((++iLocalchk) == LocalMap.end()) { //make sure not to lose the last one
486  Signals.insert(std::make_pair(formerStrip, ADCSum));
487  }
488  }
489  // save merged map:
490  signals_.insert(std::make_pair(detID, Signals));
491  }
492 
493  //Now, do noise, zero suppression, take into account bad channels, etc.
494  // This section stolen from SiStripDigitizerAlgorithm
495  // must loop over all detIds in the tracker to get all of the noise added properly.
496  for (const auto& iu : pDD->detUnits()) {
497  const StripGeomDetUnit* sgd = dynamic_cast<const StripGeomDetUnit*>(iu);
498  if (sgd != nullptr) {
499  uint32_t detID = sgd->geographicalId().rawId();
500 
501  edm::DetSet<SiStripDigi> SSD(detID); // Make empty collection with this detector ID
502 
503  int numStrips = (sgd->specificTopology()).nstrips();
504 
505  // see if there is some signal on this detector
506 
507  const SignalMapType* theSignal(getSignal(detID));
508 
509  std::vector<float> detAmpl(numStrips, 0.);
510  if (theSignal) {
511  for (const auto& amp : *theSignal) {
512  detAmpl[amp.first] = amp.second;
513  }
514  }
515 
516  //removing signal from the dead (and HIP effected) strips
517  std::vector<bool>& badChannels = allBadChannels[detID];
518 
519  for (int strip = 0; strip < numStrips; ++strip) {
520  if (badChannels[strip])
521  detAmpl[strip] = 0.;
522  }
523 
524  if (APVSaturationFromHIP_) {
525  std::bitset<6>& bs = DeadAPVList[detID];
526 
527  if (bs.any()) {
528  // Here below is the scaling function which describes the evolution of the baseline (i.e. how the charge is suppressed).
529  // This must be replaced as soon as we have a proper modeling of the baseline evolution from VR runs
530  float Shift =
531  1 - NumberOfBxBetweenHIPandEvent / floor(300.0 / 25.0); //Reminder: make these numbers not hardcoded!!
532  float randomX = CLHEP::RandFlat::shoot(engine);
533  float scalingValue = (randomX - Shift) * 10.0 / 7.0 - 3.0 / 7.0;
534 
535  for (int strip = 0; strip < numStrips; ++strip) {
536  if (!badChannels[strip] && bs[strip / 128] == 1) {
537  detAmpl[strip] *= scalingValue > 0 ? scalingValue : 0.0;
538  }
539  }
540  }
541  }
542 
543  SiStripNoises::Range detNoiseRange = noiseHandle->getRange(detID);
544  SiStripApvGain::Range detGainRange = gainHandle->getRange(detID);
545 
546  // Gain conversion is already done during signal adding
547  //convert our signals back to raw counts so that we can add noise properly:
548 
549  /*
550  if(theSignal) {
551  for(unsigned int iv = 0; iv!=detAmpl.size(); iv++) {
552  float signal = detAmpl[iv];
553  if(signal > 0) {
554  float gainValue = gainHandle->getStripGain(iv, detGainRange);
555  signal *= theElectronPerADC/gainValue;
556  detAmpl[iv] = signal;
557  }
558  }
559  }
560  */
561 
562  //SiStripPedestals::Range detPedestalRange = pedestalHandle->getRange(detID);
563 
564  // -----------------------------------------------------------
565 
566  size_t firstChannelWithSignal = 0;
567  size_t lastChannelWithSignal = numStrips;
568 
569  if (SingleStripNoise) {
570  std::vector<float> noiseRMSv;
571  noiseRMSv.clear();
572  noiseRMSv.insert(noiseRMSv.begin(), numStrips, 0.);
573  for (int strip = 0; strip < numStrips; ++strip) {
574  if (!badChannels[strip]) {
575  float gainValue = gainHandle->getStripGain(strip, detGainRange);
576  noiseRMSv[strip] = (noiseHandle->getNoise(strip, detNoiseRange)) * theElectronPerADC / gainValue;
577  }
578  }
579  theSiNoiseAdder->addNoiseVR(detAmpl, noiseRMSv, engine);
580  } else {
581  int RefStrip = int(numStrips / 2.);
582  while (RefStrip < numStrips &&
583  badChannels[RefStrip]) { //if the refstrip is bad, I move up to when I don't find it
584  RefStrip++;
585  }
586  if (RefStrip < numStrips) {
587  float RefgainValue = gainHandle->getStripGain(RefStrip, detGainRange);
588  float RefnoiseRMS = noiseHandle->getNoise(RefStrip, detNoiseRange) * theElectronPerADC / RefgainValue;
589 
590  theSiNoiseAdder->addNoise(
591  detAmpl, firstChannelWithSignal, lastChannelWithSignal, numStrips, RefnoiseRMS, engine);
592  }
593  }
594 
595  DigitalVecType digis;
596  theSiZeroSuppress->suppress(
597  theSiDigitalConverter->convert(detAmpl, gainHandle, detID), digis, detID, noiseHandle, thresholdHandle);
598 
599  SSD.data = digis;
600 
601  // stick this into the global vector of detector info
602  vSiStripDigi.push_back(SSD);
603 
604  } // end of loop over one detector
605 
606  } // end of big loop over all detector IDs
607 
608  // put the collection of digis in the event
609  edm::LogInfo("PreMixingSiStripWorker") << "total # Merged strips: " << vSiStripDigi.size();
610 
611  // make new digi collection
612 
613  std::unique_ptr<edm::DetSetVector<SiStripDigi>> MySiStripDigis(new edm::DetSetVector<SiStripDigi>(vSiStripDigi));
614 
615  // put collection
616 
617  e.put(std::move(MySiStripDigis), SiStripDigiCollectionDM_);
618 
619  // clear local storage for this event
620  SiHitStorage_.clear();
621  SiRawDigis_.clear();
622  signals_.clear();
623 }
624 
#define LogDebug(id)
unsigned short range
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
std::map< unsigned int, std::vector< bool > > allBadChannels
T getParameter(std::string const &) const
void addSignals(edm::Event const &e, edm::EventSetup const &es) override
std::vector< SiStripDigi > DigitalVecType
std::map< unsigned int, std::vector< bool > > allHIPChannels
PreMixingSiStripWorker(const edm::ParameterSet &ps, edm::ProducerBase &producer, edm::ConsumesCollector &&iC)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
std::unique_ptr< SiTrivialDigitalConverter > theSiDigitalConverter
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
std::map< unsigned int, size_t > lastChannelsWithSignal
void reserve(size_t s)
Definition: DetSetVector.h:150
std::map< uint32_t, OneDetectorRawMap > SiGlobalRawIndex
std::vector< unsigned int >::const_iterator ContainerIterator
edm::ESHandle< TrackerGeometry > pDD
std::map< uint32_t, OneDetectorMap > SiGlobalIndex
EventID const & id() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
void DMinitializeDetUnit(StripGeomDetUnit const *det, const edm::EventSetup &iSetup)
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
std::multimap< uint32_t, std::bitset< 6 > > APVMap
static std::string const input
Definition: EdmProvDump.cc:48
edm::EventPrincipal const & principal()
static float getNoise(uint16_t strip, const Range &range)
Definition: SiStripNoises.h:74
static float getStripGain(const uint16_t &strip, const SiStripApvGain::Range &range)
Definition: SiStripGain.h:73
std::vector< SiStripDigi > OneDetectorMap
const uint16_t & strip() const
Definition: SiStripDigi.h:33
const SignalMapType * getSignal(uint32_t detID) const
std::unique_ptr< SiGaussianTailNoiseAdder > theSiNoiseAdder
bool isAvailable() const
Definition: Service.h:40
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
std::pair< ContainerIterator, ContainerIterator > Range
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
~PreMixingSiStripWorker() override=default
#define end
Definition: vmac.h:39
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
bool isValid() const
Definition: HandleBase.h:74
std::unique_ptr< SiStripFedZeroSuppression > theSiZeroSuppress
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
void put(edm::Event &e, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bs) override
Definition: DetId.h:18
bool operator()(SiStripDigi i, SiStripDigi j) const
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
unsigned short firstStrip
std::pair< uint16_t, Amplitude > RawDigi
collection_type data
Definition: DetSet.h:80
#define begin
Definition: vmac.h:32
const Range getRange(const uint32_t detID) const
const Range getRange(const uint32_t detID) const
std::pair< ContainerIterator, ContainerIterator > Range
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
T get() const
Definition: EventSetup.h:71
std::map< unsigned int, size_t > firstChannelsWithSignal
StreamID streamID() const
Definition: Event.h:95
void addPileups(PileUpEventPrincipal const &pep, edm::EventSetup const &es) override
std::vector< RawDigi > OneDetectorRawMap
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:50
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104
#define DEFINE_PREMIXING_WORKER(TYPE)
std::map< uint32_t, SignalMapType > signalMaps
def move(src, dest)
Definition: eostools.py:511
std::map< int, Amplitude > SignalMapType
data decode(const unsigned int &value) const
const SiStripApvGain::Range getRange(uint32_t detID) const
Definition: SiStripGain.h:71
SiDigitalConverter::DigitalVecType DigitalVecType