CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
PreMixingSiStripWorker Class Reference
Inheritance diagram for PreMixingSiStripWorker:
PreMixingWorker

Classes

class  StrictWeakOrdering
 
class  StrictWeakRawOrdering
 

Public Member Functions

void addPileups (PileUpEventPrincipal const &pep, edm::EventSetup const &es) override
 
void addSignals (edm::Event const &e, edm::EventSetup const &es) override
 
void initializeEvent (edm::Event const &e, edm::EventSetup const &c) override
 
 PreMixingSiStripWorker (const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
 
void put (edm::Event &e, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bs) override
 
 ~PreMixingSiStripWorker () override=default
 
- Public Member Functions inherited from PreMixingWorker
virtual void beginLuminosityBlock (edm::LuminosityBlock const &iLumi, edm::EventSetup const &iSetup)
 
virtual void beginRun (edm::Run const &iRun, edm::EventSetup const &iSetup)
 
virtual void endRun ()
 
virtual void finalizeBunchCrossing (edm::Event &iEvent, edm::EventSetup const &iSetup, int bunchCrossing)
 
virtual void initializeBunchCrossing (edm::Event const &iEvent, edm::EventSetup const &iSetup, int bunchCrossing)
 
 PreMixingWorker ()=default
 
virtual ~PreMixingWorker ()=default
 

Private Types

typedef float Amplitude
 
typedef std::multimap< uint32_t, std::bitset< 6 > > APVMap
 
typedef SiDigitalConverter::DigitalVecType DigitalVecType
 
typedef std::vector< SiStripDigiOneDetectorMap
 
typedef std::vector< RawDigiOneDetectorRawMap
 
typedef std::pair< uint16_t, AmplitudeRawDigi
 
typedef std::map< uint32_t, OneDetectorMapSiGlobalIndex
 
typedef std::map< uint32_t, OneDetectorRawMapSiGlobalRawIndex
 
typedef std::map< uint32_t, SignalMapTypesignalMaps
 
typedef std::map< int, AmplitudeSignalMapType
 

Private Member Functions

void DMinitializeDetUnit (StripGeomDetUnit const *det, const edm::EventSetup &iSetup)
 
const SignalMapTypegetSignal (uint32_t detID) const
 

Private Attributes

std::map< unsigned int, std::vector< bool > > allBadChannels
 
std::map< unsigned int, std::vector< bool > > allHIPChannels
 
const double apv_fCPerElectron_
 
const double apv_maxResponse_
 
const double apv_mVPerQ_
 
const double apv_rate_
 
bool APVSaturationFromHIP_
 
std::map< unsigned int, size_t > firstChannelsWithSignal
 
const double fracOfEventsToSimAPV_
 
std::string gainLabel
 
std::string geometryType
 
bool includeAPVSimulation_
 
std::map< unsigned int, size_t > lastChannelsWithSignal
 
edm::ESHandle< TrackerGeometrypDD
 
bool peakMode
 
signalMaps signals_
 
SiGlobalIndex SiHitStorage_
 
bool SingleStripNoise
 
SiGlobalRawIndex SiRawDigis_
 
edm::InputTag SistripAPVLabelSig_
 
std::string SistripAPVListDM_
 
edm::InputTag SiStripAPVPileInputTag_
 
std::string SiStripDigiCollectionDM_
 
edm::InputTag SistripLabelSig_
 
edm::InputTag SiStripPileInputTag_
 
APVMap theAffectedAPVmap_
 
double theElectronPerADC
 
int theFedAlgo
 
std::unique_ptr< SiTrivialDigitalConvertertheSiDigitalConverter
 
std::unique_ptr< SiGaussianTailNoiseAddertheSiNoiseAdder
 
std::unique_ptr< SiStripFedZeroSuppressiontheSiZeroSuppress
 
double theThreshold
 

Detailed Description

Definition at line 45 of file PreMixingSiStripWorker.cc.

Member Typedef Documentation

◆ Amplitude

typedef float PreMixingSiStripWorker::Amplitude
private

Definition at line 70 of file PreMixingSiStripWorker.cc.

◆ APVMap

typedef std::multimap<uint32_t, std::bitset<6> > PreMixingSiStripWorker::APVMap
private

Definition at line 97 of file PreMixingSiStripWorker.cc.

◆ DigitalVecType

Definition at line 77 of file PreMixingSiStripWorker.cc.

◆ OneDetectorMap

Definition at line 72 of file PreMixingSiStripWorker.cc.

◆ OneDetectorRawMap

typedef std::vector<RawDigi> PreMixingSiStripWorker::OneDetectorRawMap
private

Definition at line 73 of file PreMixingSiStripWorker.cc.

◆ RawDigi

typedef std::pair<uint16_t, Amplitude> PreMixingSiStripWorker::RawDigi
private

Definition at line 71 of file PreMixingSiStripWorker.cc.

◆ SiGlobalIndex

typedef std::map<uint32_t, OneDetectorMap> PreMixingSiStripWorker::SiGlobalIndex
private

Definition at line 74 of file PreMixingSiStripWorker.cc.

◆ SiGlobalRawIndex

typedef std::map<uint32_t, OneDetectorRawMap> PreMixingSiStripWorker::SiGlobalRawIndex
private

Definition at line 75 of file PreMixingSiStripWorker.cc.

◆ signalMaps

typedef std::map<uint32_t, SignalMapType> PreMixingSiStripWorker::signalMaps
private

Definition at line 84 of file PreMixingSiStripWorker.cc.

◆ SignalMapType

typedef std::map<int, Amplitude> PreMixingSiStripWorker::SignalMapType
private

Definition at line 83 of file PreMixingSiStripWorker.cc.

Constructor & Destructor Documentation

◆ PreMixingSiStripWorker()

PreMixingSiStripWorker::PreMixingSiStripWorker ( const edm::ParameterSet ps,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector &&  iC 
)

Definition at line 146 of file PreMixingSiStripWorker.cc.

149  : gainLabel(ps.getParameter<std::string>("Gain")),
150  SingleStripNoise(ps.getParameter<bool>("SingleStripNoise")),
151  peakMode(ps.getParameter<bool>("APVpeakmode")),
152  theThreshold(ps.getParameter<double>("NoiseSigmaThreshold")),
153  theElectronPerADC(ps.getParameter<double>(peakMode ? "electronPerAdcPeak" : "electronPerAdcDec")),
154  APVSaturationFromHIP_(ps.getParameter<bool>("APVSaturationFromHIP")),
155  theFedAlgo(ps.getParameter<int>("FedAlgorithm_PM")),
156  geometryType(ps.getParameter<std::string>("GeometryType")),
159  includeAPVSimulation_(ps.getParameter<bool>("includeAPVSimulation")),
160  fracOfEventsToSimAPV_(ps.getParameter<double>("fracOfEventsToSimAPV")),
161  apv_maxResponse_(ps.getParameter<double>("apv_maxResponse")),
162  apv_rate_(ps.getParameter<double>("apv_rate")),
163  apv_mVPerQ_(ps.getParameter<double>("apv_mVPerQ")),
164  apv_fCPerElectron_(ps.getParameter<double>("apvfCPerElectron"))
165 
166 {
167  // declare the products to produce
168 
169  SistripLabelSig_ = ps.getParameter<edm::InputTag>("SistripLabelSig");
170  SiStripPileInputTag_ = ps.getParameter<edm::InputTag>("SiStripPileInputTag");
171 
172  SiStripDigiCollectionDM_ = ps.getParameter<std::string>("SiStripDigiCollectionDM");
173  SistripAPVListDM_ = ps.getParameter<std::string>("SiStripAPVListDM");
174 
176  producesCollector.produces<bool>(SiStripDigiCollectionDM_ + "SimulatedAPVDynamicGain");
177 
178  if (APVSaturationFromHIP_) {
179  SistripAPVLabelSig_ = ps.getParameter<edm::InputTag>("SistripAPVLabelSig");
180  SiStripAPVPileInputTag_ = ps.getParameter<edm::InputTag>("SistripAPVPileInputTag");
181  iC.consumes<std::vector<std::pair<int, std::bitset<6>>>>(SistripAPVLabelSig_);
182  }
184  // clear local storage for this event
185  SiHitStorage_.clear();
186 
188  if (!rng.isAvailable()) {
189  throw cms::Exception("Psiguration") << "SiStripDigitizer requires the RandomNumberGeneratorService\n"
190  "which is not present in the psiguration file. You must add the service\n"
191  "in the configuration file or remove the modules that require it.";
192  }
193 
194  theSiNoiseAdder = std::make_unique<SiGaussianTailNoiseAdder>(theThreshold);
195 }

References APVSaturationFromHIP_, Exception, edm::ParameterSet::getParameter(), edm::Service< T >::isAvailable(), edm::ProducesCollector::produces(), SiHitStorage_, SistripAPVLabelSig_, SistripAPVListDM_, SiStripAPVPileInputTag_, SiStripDigiCollectionDM_, SistripLabelSig_, SiStripPileInputTag_, AlCaHLTBitMon_QueryRunRegistry::string, theSiNoiseAdder, and theThreshold.

◆ ~PreMixingSiStripWorker()

PreMixingSiStripWorker::~PreMixingSiStripWorker ( )
overridedefault

Member Function Documentation

◆ addPileups()

void PreMixingSiStripWorker::addPileups ( PileUpEventPrincipal const &  pep,
edm::EventSetup const &  es 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 278 of file PreMixingSiStripWorker.cc.

278  {
279  LogDebug("PreMixingSiStripWorker") << "\n===============> adding pileups from event " << pep.principal().id()
280  << " for bunchcrossing " << pep.bunchCrossing();
281 
282  // fill in maps of hits; same code as addSignals, except now applied to the pileup events
283 
285  pep.getByLabel(SiStripPileInputTag_, inputHandle);
286 
287  if (inputHandle.isValid()) {
288  const auto& input = *inputHandle;
289 
290  OneDetectorMap LocalMap;
291 
292  //loop on all detsets (detectorIDs) inside the input collection
294  for (; DSViter != input.end(); DSViter++) {
295 #ifdef DEBUG
296  LogDebug("PreMixingSiStripWorker") << "Pileups: Processing DetID " << DSViter->id;
297 #endif
298 
299  // find correct local map (or new one) for this detector ID
300 
301  SiGlobalIndex::const_iterator itest;
302 
303  itest = SiHitStorage_.find(DSViter->id);
304 
305  if (itest != SiHitStorage_.end()) { // this detID already has hits, add to existing map
306 
307  LocalMap = itest->second;
308 
309  // fill in local map with extra channels
310  LocalMap.insert(LocalMap.end(), (DSViter->data).begin(), (DSViter->data).end());
311  std::stable_sort(LocalMap.begin(), LocalMap.end(), PreMixingSiStripWorker::StrictWeakOrdering());
312  SiHitStorage_[DSViter->id] = LocalMap;
313 
314  } else { // fill local storage with this information, put in global collection
315 
316  LocalMap.clear();
317  LocalMap.reserve((DSViter->data).size());
318  LocalMap.insert(LocalMap.end(), (DSViter->data).begin(), (DSViter->data).end());
319 
320  SiHitStorage_.insert(SiGlobalIndex::value_type(DSViter->id, LocalMap));
321  }
322  }
323 
324  if (APVSaturationFromHIP_) {
326  pep.getByLabel(SiStripAPVPileInputTag_, inputAPVHandle);
327 
328  if (inputAPVHandle.isValid()) {
329  const auto& APVinput = inputAPVHandle;
330 
331  std::vector<std::pair<int, std::bitset<6>>>::const_iterator entry = APVinput->begin();
332  for (; entry != APVinput->end(); entry++) {
333  theAffectedAPVmap_.insert(APVMap::value_type(entry->first, entry->second));
334  }
335  }
336  }
337  }
338 }

References APVSaturationFromHIP_, PileUpEventPrincipal::bunchCrossing(), mps_fire::end, mps_splice::entry, PileUpEventPrincipal::getByLabel(), edm::EventPrincipal::id(), input, edm::HandleBase::isValid(), LogDebug, PileUpEventPrincipal::principal(), SiHitStorage_, SiStripAPVPileInputTag_, SiStripPileInputTag_, and theAffectedAPVmap_.

◆ addSignals()

void PreMixingSiStripWorker::addSignals ( edm::Event const &  e,
edm::EventSetup const &  es 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 240 of file PreMixingSiStripWorker.cc.

240  {
241  // fill in maps of hits
242 
244 
245  if (e.getByLabel(SistripLabelSig_, input)) {
246  OneDetectorMap LocalMap;
247 
248  //loop on all detsets (detectorIDs) inside the input collection
250  for (; DSViter != input->end(); DSViter++) {
251 #ifdef DEBUG
252  LogDebug("PreMixingSiStripWorker") << "Processing DetID " << DSViter->id;
253 #endif
254 
255  LocalMap.clear();
256  LocalMap.reserve((DSViter->data).size());
257  LocalMap.insert(LocalMap.end(), (DSViter->data).begin(), (DSViter->data).end());
258 
259  SiHitStorage_.insert(SiGlobalIndex::value_type(DSViter->id, LocalMap));
260  }
261  }
262 
263  // keep here for future reference. In current implementation, HIP killing is done once in PU file
264  /* if(APVSaturationFromHIP_) {
265  edm::Handle<std::vector<std::pair<int,std::bitset<6>> > > APVinput;
266 
267  if( e.getByLabel(SistripAPVLabelSig_,APVinput) ) {
268 
269  std::vector<std::pair<int,std::bitset<6>> >::const_iterator entry = APVinput->begin();
270  for( ; entry != APVinput->end(); entry++) {
271  theAffectedAPVmap_.insert(APVMap::value_type(entry->first, entry->second));
272  }
273  }
274  } */
275 
276 } // end of addSiStripSignals

References MillePedeFileConverter_cfg::e, mps_fire::end, input, LogDebug, edm::DetSetVector< T >::reserve(), SiHitStorage_, and SistripLabelSig_.

◆ DMinitializeDetUnit()

void PreMixingSiStripWorker::DMinitializeDetUnit ( StripGeomDetUnit const *  det,
const edm::EventSetup iSetup 
)
private

Definition at line 215 of file PreMixingSiStripWorker.cc.

215  {
216  edm::ESHandle<SiStripBadStrip> deadChannelHandle;
217  iSetup.get<SiStripBadChannelRcd>().get(deadChannelHandle);
218 
219  unsigned int detId = det->geographicalId().rawId();
220  int numStrips = (det->specificTopology()).nstrips();
221 
222  SiStripBadStrip::Range detBadStripRange = deadChannelHandle->getRange(detId);
223  //storing the bad strip of the the module. the module is not removed but just signal put to 0
224  std::vector<bool>& badChannels = allBadChannels[detId];
225  std::vector<bool>& hipChannels = allHIPChannels[detId];
226  badChannels.clear();
227  badChannels.insert(badChannels.begin(), numStrips, false);
228  hipChannels.clear();
229  hipChannels.insert(hipChannels.begin(), numStrips, false);
230 
231  for (SiStripBadStrip::ContainerIterator it = detBadStripRange.first; it != detBadStripRange.second; ++it) {
232  SiStripBadStrip::data fs = deadChannelHandle->decode(*it);
233  for (int strip = fs.firstStrip; strip < fs.firstStrip + fs.range; ++strip)
234  badChannels[strip] = true;
235  }
236  firstChannelsWithSignal[detId] = numStrips;
237  lastChannelsWithSignal[detId] = 0;
238 }

References allBadChannels, allHIPChannels, SiStripBadStrip::decode(), firstChannelsWithSignal, SiStripBadStrip::data::firstStrip, GeomDet::geographicalId(), edm::EventSetup::get(), get, SiStripBadStrip::getRange(), lastChannelsWithSignal, SiStripBadStrip::data::range, DetId::rawId(), StripGeomDetUnit::specificTopology(), and digitizers_cfi::strip.

Referenced by initializeEvent().

◆ getSignal()

const SignalMapType* PreMixingSiStripWorker::getSignal ( uint32_t  detID) const
inlineprivate

Definition at line 86 of file PreMixingSiStripWorker.cc.

86  {
87  auto where = signals_.find(detID);
88  if (where == signals_.end()) {
89  return nullptr;
90  }
91  return &where->second;
92  }

References signals_.

Referenced by put().

◆ initializeEvent()

void PreMixingSiStripWorker::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 197 of file PreMixingSiStripWorker.cc.

197  {
198  // initialize individual detectors so we can copy real digitization code:
199 
201 
202  for (auto iu = pDD->detUnits().begin(); iu != pDD->detUnits().end(); ++iu) {
203  unsigned int detId = (*iu)->geographicalId().rawId();
204  DetId idet = DetId(detId);
205  unsigned int isub = idet.subdetId();
206  if ((isub == StripSubdetector::TIB) || (isub == StripSubdetector::TID) || (isub == StripSubdetector::TOB) ||
207  (isub == StripSubdetector::TEC)) {
208  auto stripdet = dynamic_cast<StripGeomDetUnit const*>((*iu));
209  assert(stripdet != nullptr);
210  DMinitializeDetUnit(stripdet, iSetup);
211  }
212  }
213 }

References cms::cuda::assert(), TrackerGeometry::detUnits(), DMinitializeDetUnit(), geometryType, edm::EventSetup::get(), get, pDD, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, and StripSubdetector::TOB.

◆ put()

void PreMixingSiStripWorker::put ( edm::Event e,
edm::EventSetup const &  iSetup,
std::vector< PileupSummaryInfo > const &  ps,
int  bs 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 340 of file PreMixingSiStripWorker.cc.

343  {
344  // set up machinery to do proper noise adding:
345  edm::ESHandle<SiStripGain> gainHandle;
346  edm::ESHandle<SiStripNoises> noiseHandle;
347  edm::ESHandle<SiStripThreshold> thresholdHandle;
348  edm::ESHandle<SiStripPedestals> pedestalHandle;
349  edm::ESHandle<SiStripBadStrip> deadChannelHandle;
350  edm::ESHandle<SiStripApvSimulationParameters> apvSimulationParametersHandle;
352  iSetup.get<SiStripGainSimRcd>().get(gainLabel, gainHandle);
353  iSetup.get<SiStripNoisesRcd>().get(noiseHandle);
354  iSetup.get<SiStripThresholdRcd>().get(thresholdHandle);
355  iSetup.get<SiStripPedestalsRcd>().get(pedestalHandle);
356 
358  CLHEP::HepRandomEngine* engine = &rng->getEngine(e.streamID());
359 
360  const bool simulateAPVInThisEvent = includeAPVSimulation_ && (CLHEP::RandFlat::shoot(engine) < fracOfEventsToSimAPV_);
361  float nTruePU = 0.; // = ps.getTrueNumInteractions();
362  if (simulateAPVInThisEvent) {
363  iSetup.get<TrackerTopologyRcd>().get(tTopo);
364  iSetup.get<SiStripApvSimulationParametersRcd>().get(apvSimulationParametersHandle);
365  const auto it = std::find_if(
366  std::begin(ps), std::end(ps), [](const PileupSummaryInfo& bxps) { return bxps.getBunchCrossing() == 0; });
367  if (it != std::begin(ps)) {
368  nTruePU = it->getTrueNumInteractions();
369  } else {
370  edm::LogWarning("PreMixingSiStripWorker") << "Could not find PileupSummaryInfo for current bunch crossing";
371  nTruePU = std::begin(ps)->getTrueNumInteractions();
372  }
373  }
374 
375  std::map<int, std::bitset<6>> DeadAPVList;
376  DeadAPVList.clear();
377 
378  // First, have to convert all ADC counts to raw pulse heights so that values can be added properly
379  // In PreMixing, pulse heights are saved with ADC = sqrt(9.0*PulseHeight) - have to undo.
380 
381  // This is done here because it's the only place we have access to EventSetup
382  // Simultaneously, merge lists of hit channels in each DetId.
383  // Signal Digis are in the list first, have to merge lists of hit strips on the fly,
384  // add signals on duplicates later
385 
386  OneDetectorRawMap LocalRawMap;
387 
388  // Now, loop over hits and add them to the map in the proper sorted order
389  // Note: We are assuming that the hits from the Signal events have been created in
390  // "PreMix" mode, rather than in the standard ADC conversion routines. If not, this
391  // doesn't work at all.
392 
393  // At the moment, both Signal and Reconstituted PU hits have the same compression algorithm.
394  // If this were different, and one needed gains, the conversion back to pulse height can only
395  // be done in this routine. So, yes, there is an extra loop over hits here in the current code,
396  // because, in principle, one could convert to pulse height during the read/store phase.
397 
398  for (SiGlobalIndex::const_iterator IDet = SiHitStorage_.begin(); IDet != SiHitStorage_.end(); IDet++) {
399  uint32_t detID = IDet->first;
400 
401  OneDetectorMap LocalMap = IDet->second;
402 
403  //loop over hit strips for this DetId, do conversion to pulse height, store.
404 
405  LocalRawMap.clear();
406 
407  OneDetectorMap::const_iterator iLocal = LocalMap.begin();
408  for (; iLocal != LocalMap.end(); ++iLocal) {
409  uint16_t currentStrip = iLocal->strip();
410  float signal = float(iLocal->adc());
411  if (iLocal->adc() == 1022)
412  signal = 1500.; // average values for overflows
413  if (iLocal->adc() == 1023)
414  signal = 3000.;
415 
416  //convert signals back to raw counts
417 
418  float ReSignal = signal * signal / 9.0; // The PreMixing conversion is adc = sqrt(9.0*pulseHeight)
419 
420  RawDigi NewRawDigi = std::make_pair(currentStrip, ReSignal);
421 
422  LocalRawMap.push_back(NewRawDigi);
423  }
424 
425  // save information for this detiD into global map
426  SiRawDigis_.insert(SiGlobalRawIndex::value_type(detID, LocalRawMap));
427  }
428 
429  // If we are killing APVs, merge list of dead ones before we digitize
430 
431  int NumberOfBxBetweenHIPandEvent = 1e3;
432 
433  if (APVSaturationFromHIP_) {
434  // calculate affected BX parameter
435 
436  bool HasAtleastOneAffectedAPV = false;
437  while (!HasAtleastOneAffectedAPV) {
438  for (int bx = floor(300.0 / 25.0); bx > 0; bx--) { //Reminder: make these numbers not hard coded!!
439  float temp = CLHEP::RandFlat::shoot(engine) < 0.5 ? 1 : 0;
440  if (temp == 1 && bx < NumberOfBxBetweenHIPandEvent) {
441  NumberOfBxBetweenHIPandEvent = bx;
442  HasAtleastOneAffectedAPV = true;
443  }
444  }
445  }
446 
447  APVMap::const_iterator iAPVchk;
448  uint32_t formerID = 0;
449  uint32_t currentID;
450  std::bitset<6> NewAPVBits;
451 
452  for (APVMap::const_iterator iAPV = theAffectedAPVmap_.begin(); iAPV != theAffectedAPVmap_.end(); ++iAPV) {
453  currentID = iAPV->first;
454 
455  if (currentID == formerID) { // we have to OR these
456  for (int ibit = 0; ibit < 6; ++ibit) {
457  NewAPVBits[ibit] = NewAPVBits[ibit] || (iAPV->second)[ibit];
458  }
459  } else {
460  DeadAPVList[currentID] = NewAPVBits;
461  //save pointers for next iteration
462  formerID = currentID;
463  NewAPVBits = iAPV->second;
464  }
465 
466  iAPVchk = iAPV;
467  if ((++iAPVchk) == theAffectedAPVmap_.end()) { //make sure not to lose the last one
468  DeadAPVList[currentID] = NewAPVBits;
469  }
470  }
471  }
472  //
473 
474  // Ok, done with merging raw signals and APVs - now add signals on duplicate strips
475 
476  // collection of Digis to put in the event
477  std::vector<edm::DetSet<SiStripDigi>> vSiStripDigi;
478 
479  // loop through our collection of detectors, merging hits and making a new list of "signal" digis
480 
481  // clear some temporary storage for later digitization:
482 
483  signals_.clear();
484 
485  // big loop over Detector IDs:
486  for (SiGlobalRawIndex::const_iterator IDet = SiRawDigis_.begin(); IDet != SiRawDigis_.end(); IDet++) {
487  uint32_t detID = IDet->first;
488 
489  SignalMapType Signals;
490  Signals.clear();
491 
492  OneDetectorRawMap LocalMap = IDet->second;
493 
494  //counter variables
495  int formerStrip = -1;
496  int currentStrip;
497  float ADCSum = 0;
498 
499  //loop over hit strips for this DetId, add duplicates
500 
501  OneDetectorRawMap::const_iterator iLocalchk;
502  OneDetectorRawMap::const_iterator iLocal = LocalMap.begin();
503  for (; iLocal != LocalMap.end(); ++iLocal) {
504  currentStrip = iLocal->first; // strip is first element
505 
506  if (currentStrip == formerStrip) { // we have to add these digis together
507 
508  ADCSum += iLocal->second; // raw pulse height is second element.
509  } else {
510  if (formerStrip != -1) {
511  Signals.insert(std::make_pair(formerStrip, ADCSum));
512  }
513  // save pointers for next iteration
514  formerStrip = currentStrip;
515  ADCSum = iLocal->second; // lone ADC
516  }
517 
518  iLocalchk = iLocal;
519  if ((++iLocalchk) == LocalMap.end()) { //make sure not to lose the last one
520  Signals.insert(std::make_pair(formerStrip, ADCSum));
521  }
522  }
523  // save merged map:
524  signals_.insert(std::make_pair(detID, Signals));
525  }
526 
527  //Now, do noise, zero suppression, take into account bad channels, etc.
528  // This section stolen from SiStripDigitizerAlgorithm
529  // must loop over all detIds in the tracker to get all of the noise added properly.
530  for (const auto& iu : pDD->detUnits()) {
531  const StripGeomDetUnit* sgd = dynamic_cast<const StripGeomDetUnit*>(iu);
532  if (sgd != nullptr) {
533  uint32_t detID = sgd->geographicalId().rawId();
534 
535  edm::DetSet<SiStripDigi> SSD(detID); // Make empty collection with this detector ID
536 
537  int numStrips = (sgd->specificTopology()).nstrips();
538 
539  // see if there is some signal on this detector
540 
541  const SignalMapType* theSignal(getSignal(detID));
542 
543  std::vector<float> detAmpl(numStrips, 0.);
544  if (theSignal) {
545  for (const auto& amp : *theSignal) {
546  detAmpl[amp.first] = amp.second;
547  }
548  }
549 
550  //removing signal from the dead (and HIP effected) strips
551  std::vector<bool>& badChannels = allBadChannels[detID];
552 
553  for (int strip = 0; strip < numStrips; ++strip) {
554  if (badChannels[strip])
555  detAmpl[strip] = 0.;
556  }
557 
558  if (simulateAPVInThisEvent) {
559  // Get index in apv baseline distributions corresponding to z of detSet and PU
560  const StripTopology* topol = dynamic_cast<const StripTopology*>(&(sgd->specificTopology()));
561  LocalPoint localPos = topol->localPosition(0);
562  GlobalPoint globalPos = sgd->surface().toGlobal(Local3DPoint(localPos.x(), localPos.y(), localPos.z()));
563  float detSet_z = fabs(globalPos.z());
564  float detSet_r = globalPos.perp();
565 
566  const uint32_t SubDet = DetId(detID).subdetId();
567  // Simulate APV response for each strip
568  for (int strip = 0; strip < numStrips; ++strip) {
569  if (detAmpl[strip] > 0) {
570  // Convert charge from electrons to fC
571  double stripCharge = detAmpl[strip] * apv_fCPerElectron_;
572 
573  // Get APV baseline
574  double baselineV = 0;
576  baselineV = apvSimulationParametersHandle->sampleTIB(tTopo->tibLayer(detID), detSet_z, nTruePU, engine);
577  } else if (SubDet == SiStripSubdetector::TOB) {
578  baselineV = apvSimulationParametersHandle->sampleTOB(tTopo->tobLayer(detID), detSet_z, nTruePU, engine);
579  } else if (SubDet == SiStripSubdetector::TID) {
580  baselineV = apvSimulationParametersHandle->sampleTID(tTopo->tidWheel(detID), detSet_r, nTruePU, engine);
581  } else if (SubDet == SiStripSubdetector::TEC) {
582  baselineV = apvSimulationParametersHandle->sampleTEC(tTopo->tecWheel(detID), detSet_r, nTruePU, engine);
583  }
584  // Fitted parameters from G Hall/M Raymond
585  double maxResponse = apv_maxResponse_;
586  double rate = apv_rate_;
587 
588  double outputChargeInADC = 0;
589  if (baselineV < apv_maxResponse_) {
590  // Convert V0 into baseline charge
591  double baselineQ = -1.0 * rate * log(2 * maxResponse / (baselineV + maxResponse) - 1);
592 
593  // Add charge deposited in this BX
594  double newStripCharge = baselineQ + stripCharge;
595 
596  // Apply APV response
597  double signalV = 2 * maxResponse / (1 + exp(-1.0 * newStripCharge / rate)) - maxResponse;
598  double gain = signalV - baselineV;
599 
600  // Convert gain (mV) to charge (assuming linear region of APV) and then to electrons
601  double outputCharge = gain / apv_mVPerQ_;
602  outputChargeInADC = outputCharge / apv_fCPerElectron_;
603  }
604 
605  // Output charge back to original container
606  detAmpl[strip] = outputChargeInADC;
607  }
608  }
609  }
610 
611  if (APVSaturationFromHIP_) {
612  std::bitset<6>& bs = DeadAPVList[detID];
613 
614  if (bs.any()) {
615  // Here below is the scaling function which describes the evolution of the baseline (i.e. how the charge is suppressed).
616  // This must be replaced as soon as we have a proper modeling of the baseline evolution from VR runs
617  float Shift =
618  1 - NumberOfBxBetweenHIPandEvent / floor(300.0 / 25.0); //Reminder: make these numbers not hardcoded!!
619  float randomX = CLHEP::RandFlat::shoot(engine);
620  float scalingValue = (randomX - Shift) * 10.0 / 7.0 - 3.0 / 7.0;
621 
622  for (int strip = 0; strip < numStrips; ++strip) {
623  if (!badChannels[strip] && bs[strip / 128] == 1) {
624  detAmpl[strip] *= scalingValue > 0 ? scalingValue : 0.0;
625  }
626  }
627  }
628  }
629 
630  SiStripNoises::Range detNoiseRange = noiseHandle->getRange(detID);
631  SiStripApvGain::Range detGainRange = gainHandle->getRange(detID);
632 
633  // Gain conversion is already done during signal adding
634  //convert our signals back to raw counts so that we can add noise properly:
635 
636  /*
637  if(theSignal) {
638  for(unsigned int iv = 0; iv!=detAmpl.size(); iv++) {
639  float signal = detAmpl[iv];
640  if(signal > 0) {
641  float gainValue = gainHandle->getStripGain(iv, detGainRange);
642  signal *= theElectronPerADC/gainValue;
643  detAmpl[iv] = signal;
644  }
645  }
646  }
647  */
648 
649  //SiStripPedestals::Range detPedestalRange = pedestalHandle->getRange(detID);
650 
651  // -----------------------------------------------------------
652 
653  size_t firstChannelWithSignal = 0;
654  size_t lastChannelWithSignal = numStrips;
655 
656  if (SingleStripNoise) {
657  std::vector<float> noiseRMSv;
658  noiseRMSv.clear();
659  noiseRMSv.insert(noiseRMSv.begin(), numStrips, 0.);
660  for (int strip = 0; strip < numStrips; ++strip) {
661  if (!badChannels[strip]) {
662  float gainValue = gainHandle->getStripGain(strip, detGainRange);
663  noiseRMSv[strip] = (noiseHandle->getNoise(strip, detNoiseRange)) * theElectronPerADC / gainValue;
664  }
665  }
666  theSiNoiseAdder->addNoiseVR(detAmpl, noiseRMSv, engine);
667  } else {
668  int RefStrip = int(numStrips / 2.);
669  while (RefStrip < numStrips &&
670  badChannels[RefStrip]) { //if the refstrip is bad, I move up to when I don't find it
671  RefStrip++;
672  }
673  if (RefStrip < numStrips) {
674  float RefgainValue = gainHandle->getStripGain(RefStrip, detGainRange);
675  float RefnoiseRMS = noiseHandle->getNoise(RefStrip, detNoiseRange) * theElectronPerADC / RefgainValue;
676 
677  theSiNoiseAdder->addNoise(
678  detAmpl, firstChannelWithSignal, lastChannelWithSignal, numStrips, RefnoiseRMS, engine);
679  }
680  }
681 
682  DigitalVecType digis;
683  theSiZeroSuppress->suppress(
684  theSiDigitalConverter->convert(detAmpl, gainHandle, detID), digis, detID, noiseHandle, thresholdHandle);
685 
686  SSD.data = digis;
687 
688  // stick this into the global vector of detector info
689  vSiStripDigi.push_back(SSD);
690 
691  } // end of loop over one detector
692 
693  } // end of big loop over all detector IDs
694 
695  // put the collection of digis in the event
696  edm::LogInfo("PreMixingSiStripWorker") << "total # Merged strips: " << vSiStripDigi.size();
697 
698  // make new digi collection
699 
700  std::unique_ptr<edm::DetSetVector<SiStripDigi>> MySiStripDigis(new edm::DetSetVector<SiStripDigi>(vSiStripDigi));
701 
702  // put collection
703 
704  e.put(std::move(MySiStripDigis), SiStripDigiCollectionDM_);
705  e.put(std::make_unique<bool>(simulateAPVInThisEvent), SiStripDigiCollectionDM_ + "SimulatedAPVDynamicGain");
706 
707  // clear local storage for this event
708  SiHitStorage_.clear();
709  SiRawDigis_.clear();
710  signals_.clear();
711 }

References allBadChannels, apv_fCPerElectron_, apv_maxResponse_, apv_mVPerQ_, apv_rate_, APVSaturationFromHIP_, cms::cuda::bs, l1GtPatternGenerator_cfi::bx, edm::DetSet< T >::data, TrackerGeometry::detUnits(), MillePedeFileConverter_cfg::e, SiPixelPhase1Clusters_cfi::e3, mps_fire::end, JetChargeProducer_cfi::exp, dqmMemoryStats::float, fracOfEventsToSimAPV_, PedestalClient_cfi::gain, gainLabel, GeomDet::geographicalId(), edm::EventSetup::get(), get, PileupSummaryInfo::getBunchCrossing(), edm::RandomNumberGenerator::getEngine(), SiStripNoises::getNoise(), SiStripNoises::getRange(), SiStripGain::getRange(), getSignal(), SiStripGain::getStripGain(), includeAPVSimulation_, createfilelist::int, StripTopology::localPosition(), dqm-mbProfile::log, eostools::move(), pDD, PV3DBase< T, PVType, FrameType >::perp(), RPCpg::rate(), DetId::rawId(), SiStripApvSimulationParameters::sampleTEC(), SiStripApvSimulationParameters::sampleTIB(), SiStripApvSimulationParameters::sampleTID(), SiStripApvSimulationParameters::sampleTOB(), signals_, SiHitStorage_, SingleStripNoise, SiRawDigis_, SiStripDigiCollectionDM_, StripGeomDetUnit::specificTopology(), digitizers_cfi::strip, ntupleEnum::SubDet, DetId::subdetId(), GeomDet::surface(), SiStripSubdetector::TEC, TrackerTopology::tecWheel(), groupFilesInBlocks::temp, theAffectedAPVmap_, theElectronPerADC, theSiDigitalConverter, theSiNoiseAdder, theSiZeroSuppress, SiStripSubdetector::TIB, TrackerTopology::tibLayer(), SiStripSubdetector::TID, TrackerTopology::tidWheel(), SiStripSubdetector::TOB, TrackerTopology::tobLayer(), Surface::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Member Data Documentation

◆ allBadChannels

std::map<unsigned int, std::vector<bool> > PreMixingSiStripWorker::allBadChannels
private

Definition at line 119 of file PreMixingSiStripWorker.cc.

Referenced by DMinitializeDetUnit(), and put().

◆ allHIPChannels

std::map<unsigned int, std::vector<bool> > PreMixingSiStripWorker::allHIPChannels
private

Definition at line 121 of file PreMixingSiStripWorker.cc.

Referenced by DMinitializeDetUnit().

◆ apv_fCPerElectron_

const double PreMixingSiStripWorker::apv_fCPerElectron_
private

Definition at line 131 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ apv_maxResponse_

const double PreMixingSiStripWorker::apv_maxResponse_
private

Definition at line 128 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ apv_mVPerQ_

const double PreMixingSiStripWorker::apv_mVPerQ_
private

Definition at line 130 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ apv_rate_

const double PreMixingSiStripWorker::apv_rate_
private

Definition at line 129 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ APVSaturationFromHIP_

bool PreMixingSiStripWorker::APVSaturationFromHIP_
private

Definition at line 108 of file PreMixingSiStripWorker.cc.

Referenced by addPileups(), PreMixingSiStripWorker(), and put().

◆ firstChannelsWithSignal

std::map<unsigned int, size_t> PreMixingSiStripWorker::firstChannelsWithSignal
private

Definition at line 123 of file PreMixingSiStripWorker.cc.

Referenced by DMinitializeDetUnit().

◆ fracOfEventsToSimAPV_

const double PreMixingSiStripWorker::fracOfEventsToSimAPV_
private

Definition at line 127 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ gainLabel

std::string PreMixingSiStripWorker::gainLabel
private

Definition at line 103 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ geometryType

std::string PreMixingSiStripWorker::geometryType
private

Definition at line 110 of file PreMixingSiStripWorker.cc.

Referenced by initializeEvent().

◆ includeAPVSimulation_

bool PreMixingSiStripWorker::includeAPVSimulation_
private

Definition at line 126 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ lastChannelsWithSignal

std::map<unsigned int, size_t> PreMixingSiStripWorker::lastChannelsWithSignal
private

Definition at line 124 of file PreMixingSiStripWorker.cc.

Referenced by DMinitializeDetUnit().

◆ pDD

edm::ESHandle<TrackerGeometry> PreMixingSiStripWorker::pDD
private

Definition at line 116 of file PreMixingSiStripWorker.cc.

Referenced by initializeEvent(), and put().

◆ peakMode

bool PreMixingSiStripWorker::peakMode
private

Definition at line 105 of file PreMixingSiStripWorker.cc.

◆ signals_

signalMaps PreMixingSiStripWorker::signals_
private

Definition at line 94 of file PreMixingSiStripWorker.cc.

Referenced by getSignal(), and put().

◆ SiHitStorage_

SiGlobalIndex PreMixingSiStripWorker::SiHitStorage_
private

Definition at line 79 of file PreMixingSiStripWorker.cc.

Referenced by addPileups(), addSignals(), PreMixingSiStripWorker(), and put().

◆ SingleStripNoise

bool PreMixingSiStripWorker::SingleStripNoise
private

Definition at line 104 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ SiRawDigis_

SiGlobalRawIndex PreMixingSiStripWorker::SiRawDigis_
private

Definition at line 80 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ SistripAPVLabelSig_

edm::InputTag PreMixingSiStripWorker::SistripAPVLabelSig_
private

Definition at line 64 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker().

◆ SistripAPVListDM_

std::string PreMixingSiStripWorker::SistripAPVListDM_
private

Definition at line 66 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker().

◆ SiStripAPVPileInputTag_

edm::InputTag PreMixingSiStripWorker::SiStripAPVPileInputTag_
private

Definition at line 65 of file PreMixingSiStripWorker.cc.

Referenced by addPileups(), and PreMixingSiStripWorker().

◆ SiStripDigiCollectionDM_

std::string PreMixingSiStripWorker::SiStripDigiCollectionDM_
private

Definition at line 62 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker(), and put().

◆ SistripLabelSig_

edm::InputTag PreMixingSiStripWorker::SistripLabelSig_
private

Definition at line 60 of file PreMixingSiStripWorker.cc.

Referenced by addSignals(), and PreMixingSiStripWorker().

◆ SiStripPileInputTag_

edm::InputTag PreMixingSiStripWorker::SiStripPileInputTag_
private

Definition at line 61 of file PreMixingSiStripWorker.cc.

Referenced by addPileups(), and PreMixingSiStripWorker().

◆ theAffectedAPVmap_

APVMap PreMixingSiStripWorker::theAffectedAPVmap_
private

Definition at line 99 of file PreMixingSiStripWorker.cc.

Referenced by addPileups(), and put().

◆ theElectronPerADC

double PreMixingSiStripWorker::theElectronPerADC
private

Definition at line 107 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ theFedAlgo

int PreMixingSiStripWorker::theFedAlgo
private

Definition at line 109 of file PreMixingSiStripWorker.cc.

◆ theSiDigitalConverter

std::unique_ptr<SiTrivialDigitalConverter> PreMixingSiStripWorker::theSiDigitalConverter
private

Definition at line 114 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ theSiNoiseAdder

std::unique_ptr<SiGaussianTailNoiseAdder> PreMixingSiStripWorker::theSiNoiseAdder
private

Definition at line 112 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker(), and put().

◆ theSiZeroSuppress

std::unique_ptr<SiStripFedZeroSuppression> PreMixingSiStripWorker::theSiZeroSuppress
private

Definition at line 113 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ theThreshold

double PreMixingSiStripWorker::theThreshold
private

Definition at line 106 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker().

edm::DetSetVector< SiStripDigi >
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
PreMixingSiStripWorker::theSiNoiseAdder
std::unique_ptr< SiGaussianTailNoiseAdder > theSiNoiseAdder
Definition: PreMixingSiStripWorker.cc:112
input
static const std::string input
Definition: EdmProvDump.cc:48
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
SiStripBadStrip::getRange
const Range getRange(const uint32_t detID) const
Definition: SiStripBadStrip.cc:27
PreMixingSiStripWorker::theAffectedAPVmap_
APVMap theAffectedAPVmap_
Definition: PreMixingSiStripWorker.cc:99
PreMixingSiStripWorker::SiStripDigiCollectionDM_
std::string SiStripDigiCollectionDM_
Definition: PreMixingSiStripWorker.cc:62
PreMixingSiStripWorker::RawDigi
std::pair< uint16_t, Amplitude > RawDigi
Definition: PreMixingSiStripWorker.cc:71
SiStripBadChannelRcd
Definition: SiStripCondDataRecords.h:14
PreMixingSiStripWorker::SiStripAPVPileInputTag_
edm::InputTag SiStripAPVPileInputTag_
Definition: PreMixingSiStripWorker.cc:65
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::DetSet< SiStripDigi >
PreMixingSiStripWorker::theSiZeroSuppress
std::unique_ptr< SiStripFedZeroSuppression > theSiZeroSuppress
Definition: PreMixingSiStripWorker.cc:113
PreMixingSiStripWorker::getSignal
const SignalMapType * getSignal(uint32_t detID) const
Definition: PreMixingSiStripWorker.cc:86
StripTopology::localPosition
virtual LocalPoint localPosition(float strip) const =0
PreMixingSiStripWorker::OneDetectorRawMap
std::vector< RawDigi > OneDetectorRawMap
Definition: PreMixingSiStripWorker.cc:73
mps_splice.entry
entry
Definition: mps_splice.py:68
PreMixingSiStripWorker::theElectronPerADC
double theElectronPerADC
Definition: PreMixingSiStripWorker.cc:107
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
SiStripBadStrip::decode
data decode(const unsigned int &value) const
Definition: SiStripBadStrip.h:78
PreMixingSiStripWorker::apv_rate_
const double apv_rate_
Definition: PreMixingSiStripWorker.cc:129
edm::DetSetVector::reserve
void reserve(size_t s)
Definition: DetSetVector.h:147
cms::cuda::assert
assert(be >=bs)
PreMixingSiStripWorker::includeAPVSimulation_
bool includeAPVSimulation_
Definition: PreMixingSiStripWorker.cc:126
PreMixingSiStripWorker::StrictWeakOrdering
Definition: PreMixingSiStripWorker.cc:135
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiStripApvSimulationParametersRcd
Definition: SiStripCondDataRecords.h:58
PreMixingSiStripWorker::SistripAPVLabelSig_
edm::InputTag SistripAPVLabelSig_
Definition: PreMixingSiStripWorker.cc:64
SiStripNoises::getRange
const Range getRange(const uint32_t detID) const
Definition: SiStripNoises.cc:34
PreMixingSiStripWorker::theFedAlgo
int theFedAlgo
Definition: PreMixingSiStripWorker.cc:109
RPCpg::rate
double rate(double x)
Definition: Constants.cc:3
SiStripSubdetector::TEC
Definition: SiStripEnums.h:5
edm::Handle
Definition: AssociativeIterator.h:50
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
PreMixingSiStripWorker::apv_fCPerElectron_
const double apv_fCPerElectron_
Definition: PreMixingSiStripWorker.cc:131
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
SiStripPedestalsRcd
Definition: SiStripCondDataRecords.h:43
SiStripApvSimulationParameters::sampleTID
float sampleTID(layerid wheel, float r, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:57
SiStripNoisesRcd
Definition: SiStripCondDataRecords.h:40
PreMixingSiStripWorker::OneDetectorMap
std::vector< SiStripDigi > OneDetectorMap
Definition: PreMixingSiStripWorker.cc:72
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
SiStripGain::getStripGain
static float getStripGain(const uint16_t &strip, const SiStripApvGain::Range &range)
Definition: SiStripGain.h:73
SiStripSubdetector::TOB
Definition: SiStripEnums.h:5
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DetId
Definition: DetId.h:17
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
cms::cuda::bs
bs
Definition: HistoContainer.h:127
SiStripBadStrip::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripBadStrip.h:53
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
TrackerGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: TrackerGeometry.h:61
ntupleEnum.SubDet
SubDet
Definition: ntupleEnum.py:15
PreMixingSiStripWorker::SingleStripNoise
bool SingleStripNoise
Definition: PreMixingSiStripWorker.cc:104
SiStripNoises::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:47
SiStripGain::getRange
const SiStripApvGain::Range getRange(uint32_t detID) const
Definition: SiStripGain.h:71
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
SiStripFedZeroSuppression
Definition: SiStripFedZeroSuppression.h:16
mps_fire.end
end
Definition: mps_fire.py:242
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
edm::ESHandle
Definition: DTSurvey.h:22
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
PreMixingSiStripWorker::apv_mVPerQ_
const double apv_mVPerQ_
Definition: PreMixingSiStripWorker.cc:130
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
PreMixingSiStripWorker::theSiDigitalConverter
std::unique_ptr< SiTrivialDigitalConverter > theSiDigitalConverter
Definition: PreMixingSiStripWorker.cc:114
Point3DBase< float, LocalTag >
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
SiStripThresholdRcd
Definition: SiStripCondDataRecords.h:50
SiStripApvSimulationParameters::sampleTIB
float sampleTIB(layerid layer, float z, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:51
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PreMixingSiStripWorker::fracOfEventsToSimAPV_
const double fracOfEventsToSimAPV_
Definition: PreMixingSiStripWorker.cc:127
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
PreMixingSiStripWorker::DigitalVecType
SiDigitalConverter::DigitalVecType DigitalVecType
Definition: PreMixingSiStripWorker.cc:77
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
PreMixingSiStripWorker::theThreshold
double theThreshold
Definition: PreMixingSiStripWorker.cc:106
edm::DetSetVector::const_iterator
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
edm::Service< edm::RandomNumberGenerator >
createfilelist.int
int
Definition: createfilelist.py:10
SiStripBadStrip::data::firstStrip
unsigned short firstStrip
Definition: SiStripBadStrip.h:33
edm::ProducesCollector::produces
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
Definition: ProducesCollector.h:52
PileupSummaryInfo::getBunchCrossing
const int getBunchCrossing() const
Definition: PileupSummaryInfo.h:73
PreMixingSiStripWorker::firstChannelsWithSignal
std::map< unsigned int, size_t > firstChannelsWithSignal
Definition: PreMixingSiStripWorker.cc:123
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
PreMixingSiStripWorker::apv_maxResponse_
const double apv_maxResponse_
Definition: PreMixingSiStripWorker.cc:128
get
#define get
PreMixingSiStripWorker::allHIPChannels
std::map< unsigned int, std::vector< bool > > allHIPChannels
Definition: PreMixingSiStripWorker.cc:121
SiStripSubdetector::TIB
Definition: SiStripEnums.h:5
PreMixingSiStripWorker::SiHitStorage_
SiGlobalIndex SiHitStorage_
Definition: PreMixingSiStripWorker.cc:79
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
SiPixelPhase1Clusters_cfi.e3
e3
Definition: SiPixelPhase1Clusters_cfi.py:9
PreMixingSiStripWorker::signals_
signalMaps signals_
Definition: PreMixingSiStripWorker.cc:94
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
eostools.move
def move(src, dest)
Definition: eostools.py:511
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
PreMixingSiStripWorker::allBadChannels
std::map< unsigned int, std::vector< bool > > allBadChannels
Definition: PreMixingSiStripWorker.cc:119
PreMixingSiStripWorker::geometryType
std::string geometryType
Definition: PreMixingSiStripWorker.cc:110
PreMixingSiStripWorker::SignalMapType
std::map< int, Amplitude > SignalMapType
Definition: PreMixingSiStripWorker.cc:83
SiStripApvGain::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripApvGain.h:28
PreMixingSiStripWorker::lastChannelsWithSignal
std::map< unsigned int, size_t > lastChannelsWithSignal
Definition: PreMixingSiStripWorker.cc:124
PreMixingSiStripWorker::peakMode
bool peakMode
Definition: PreMixingSiStripWorker.cc:105
SiTrivialDigitalConverter
Definition: SiTrivialDigitalConverter.h:8
Exception
Definition: hltDiff.cc:245
PreMixingSiStripWorker::APVSaturationFromHIP_
bool APVSaturationFromHIP_
Definition: PreMixingSiStripWorker.cc:108
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
SiStripBadStrip::data::range
unsigned short range
Definition: SiStripBadStrip.h:34
StripGeomDetUnit::specificTopology
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
Definition: StripGeomDetUnit.cc:17
SiStripGainSimRcd
Definition: SiStripDependentRecords.h:32
SiStripApvSimulationParameters::sampleTEC
float sampleTEC(layerid wheel, float r, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:60
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
PreMixingSiStripWorker::gainLabel
std::string gainLabel
Definition: PreMixingSiStripWorker.cc:103
PreMixingSiStripWorker::SiStripPileInputTag_
edm::InputTag SiStripPileInputTag_
Definition: PreMixingSiStripWorker.cc:61
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
SiStripApvSimulationParameters::sampleTOB
float sampleTOB(layerid layer, float z, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:54
SiStripNoises::getNoise
static float getNoise(uint16_t strip, const Range &range)
Definition: SiStripNoises.h:73
PreMixingSiStripWorker::SistripAPVListDM_
std::string SistripAPVListDM_
Definition: PreMixingSiStripWorker.cc:66
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
PreMixingSiStripWorker::pDD
edm::ESHandle< TrackerGeometry > pDD
Definition: PreMixingSiStripWorker.cc:116
PreMixingSiStripWorker::SiRawDigis_
SiGlobalRawIndex SiRawDigis_
Definition: PreMixingSiStripWorker.cc:80
PreMixingSiStripWorker::SistripLabelSig_
edm::InputTag SistripLabelSig_
Definition: PreMixingSiStripWorker.cc:60
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
StripTopology
Definition: StripTopology.h:11
PreMixingSiStripWorker::DMinitializeDetUnit
void DMinitializeDetUnit(StripGeomDetUnit const *det, const edm::EventSetup &iSetup)
Definition: PreMixingSiStripWorker.cc:215
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
edm::InputTag
Definition: InputTag.h:15
SiStripBadStrip::ContainerIterator
std::vector< unsigned int >::const_iterator ContainerIterator
Definition: SiStripBadStrip.h:52
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
PileupSummaryInfo
Definition: PileupSummaryInfo.h:22
SiStripSubdetector::TID
Definition: SiStripEnums.h:5
Local3DPoint
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
SiStripBadStrip::data
Definition: SiStripBadStrip.h:32
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
StripGeomDetUnit
Definition: StripGeomDetUnit.h:15
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150