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