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_
 
edm::ESGetToken< SiStripApvSimulationParameters, SiStripApvSimulationParametersRcdapvSimulationParametersToken_
 
const edm::ESGetToken< SiStripBadStrip, SiStripBadChannelRcddeadChannelToken_
 
std::map< unsigned int, size_t > firstChannelsWithSignal
 
const double fracOfEventsToSimAPV_
 
const edm::ESGetToken< SiStripGain, SiStripGainSimRcdgainToken_
 
bool includeAPVSimulation_
 
std::map< unsigned int, size_t > lastChannelsWithSignal
 
const edm::ESGetToken< SiStripNoises, SiStripNoisesRcdnoiseToken_
 
const TrackerGeometrypDD
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordpDDToken_
 
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
 
const edm::ESGetToken< SiStripThreshold, SiStripThresholdRcdthresholdToken_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 

Detailed Description

Definition at line 45 of file PreMixingSiStripWorker.cc.

Member Typedef Documentation

◆ Amplitude

typedef float PreMixingSiStripWorker::Amplitude
private

Definition at line 79 of file PreMixingSiStripWorker.cc.

◆ APVMap

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

Definition at line 106 of file PreMixingSiStripWorker.cc.

◆ DigitalVecType

Definition at line 86 of file PreMixingSiStripWorker.cc.

◆ OneDetectorMap

Definition at line 81 of file PreMixingSiStripWorker.cc.

◆ OneDetectorRawMap

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

Definition at line 82 of file PreMixingSiStripWorker.cc.

◆ RawDigi

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

Definition at line 80 of file PreMixingSiStripWorker.cc.

◆ SiGlobalIndex

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

Definition at line 83 of file PreMixingSiStripWorker.cc.

◆ SiGlobalRawIndex

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

Definition at line 84 of file PreMixingSiStripWorker.cc.

◆ signalMaps

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

Definition at line 93 of file PreMixingSiStripWorker.cc.

◆ SignalMapType

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

Definition at line 92 of file PreMixingSiStripWorker.cc.

Constructor & Destructor Documentation

◆ PreMixingSiStripWorker()

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

Definition at line 153 of file PreMixingSiStripWorker.cc.

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

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

◆ ~PreMixingSiStripWorker()

PreMixingSiStripWorker::~PreMixingSiStripWorker ( )
overridedefault

Member Function Documentation

◆ addPileups()

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

Implements PreMixingWorker.

Definition at line 292 of file PreMixingSiStripWorker.cc.

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

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 254 of file PreMixingSiStripWorker.cc.

254  {
255  // fill in maps of hits
256 
258 
259  if (e.getByLabel(SistripLabelSig_, input)) {
260  OneDetectorMap LocalMap;
261 
262  //loop on all detsets (detectorIDs) inside the input collection
264  for (; DSViter != input->end(); DSViter++) {
265 #ifdef DEBUG
266  LogDebug("PreMixingSiStripWorker") << "Processing DetID " << DSViter->id;
267 #endif
268 
269  LocalMap.clear();
270  LocalMap.reserve((DSViter->data).size());
271  LocalMap.insert(LocalMap.end(), (DSViter->data).begin(), (DSViter->data).end());
272 
273  SiHitStorage_.insert(SiGlobalIndex::value_type(DSViter->id, LocalMap));
274  }
275  }
276 
277  // keep here for future reference. In current implementation, HIP killing is done once in PU file
278  /* if(APVSaturationFromHIP_) {
279  edm::Handle<std::vector<std::pair<int,std::bitset<6>> > > APVinput;
280 
281  if( e.getByLabel(SistripAPVLabelSig_,APVinput) ) {
282 
283  std::vector<std::pair<int,std::bitset<6>> >::const_iterator entry = APVinput->begin();
284  for( ; entry != APVinput->end(); entry++) {
285  theAffectedAPVmap_.insert(APVMap::value_type(entry->first, entry->second));
286  }
287  }
288  } */
289 
290 } // 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 230 of file PreMixingSiStripWorker.cc.

230  {
231  SiStripBadStrip const& deadChannel = iSetup.getData(deadChannelToken_);
232 
233  unsigned int detId = det->geographicalId().rawId();
234  int numStrips = (det->specificTopology()).nstrips();
235 
236  SiStripBadStrip::Range detBadStripRange = deadChannel.getRange(detId);
237  //storing the bad strip of the the module. the module is not removed but just signal put to 0
238  std::vector<bool>& badChannels = allBadChannels[detId];
239  std::vector<bool>& hipChannels = allHIPChannels[detId];
240  badChannels.clear();
241  badChannels.insert(badChannels.begin(), numStrips, false);
242  hipChannels.clear();
243  hipChannels.insert(hipChannels.begin(), numStrips, false);
244 
245  for (SiStripBadStrip::ContainerIterator it = detBadStripRange.first; it != detBadStripRange.second; ++it) {
246  SiStripBadStrip::data fs = deadChannel.decode(*it);
247  for (int strip = fs.firstStrip; strip < fs.firstStrip + fs.range; ++strip)
248  badChannels[strip] = true;
249  }
250  firstChannelsWithSignal[detId] = numStrips;
251  lastChannelsWithSignal[detId] = 0;
252 }

References allBadChannels, allHIPChannels, deadChannelToken_, SiStripBadStrip::decode(), firstChannelsWithSignal, SiStripBadStrip::data::firstStrip, GeomDet::geographicalId(), edm::EventSetup::getData(), 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 95 of file PreMixingSiStripWorker.cc.

95  {
96  auto where = signals_.find(detID);
97  if (where == signals_.end()) {
98  return nullptr;
99  }
100  return &where->second;
101  }

References signals_.

Referenced by put().

◆ initializeEvent()

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

Implements PreMixingWorker.

Definition at line 212 of file PreMixingSiStripWorker.cc.

212  {
213  // initialize individual detectors so we can copy real digitization code:
214 
215  pDD = &iSetup.getData(pDDToken_);
216 
217  for (auto iu = pDD->detUnits().begin(); iu != pDD->detUnits().end(); ++iu) {
218  unsigned int detId = (*iu)->geographicalId().rawId();
219  DetId idet = DetId(detId);
220  unsigned int isub = idet.subdetId();
221  if ((isub == StripSubdetector::TIB) || (isub == StripSubdetector::TID) || (isub == StripSubdetector::TOB) ||
222  (isub == StripSubdetector::TEC)) {
223  auto stripdet = dynamic_cast<StripGeomDetUnit const*>((*iu));
224  assert(stripdet != nullptr);
225  DMinitializeDetUnit(stripdet, iSetup);
226  }
227  }
228 }

References cms::cuda::assert(), TrackerGeometry::detUnits(), DMinitializeDetUnit(), edm::EventSetup::getData(), pDD, pDDToken_, 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 354 of file PreMixingSiStripWorker.cc.

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

References allBadChannels, apv_fCPerElectron_, apv_maxResponse_, apv_mVPerQ_, apv_rate_, APVSaturationFromHIP_, apvSimulationParametersToken_, 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, gainToken_, GeomDet::geographicalId(), PileupSummaryInfo::getBunchCrossing(), edm::EventSetup::getData(), edm::RandomNumberGenerator::getEngine(), getSignal(), includeAPVSimulation_, createfilelist::int, StripTopology::localPosition(), dqm-mbProfile::log, eostools::move(), gpuVertexFinder::noise, noiseToken_, 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, remoteMonitoring_LED_IterMethod_cfg::threshold, thresholdToken_, SiStripSubdetector::TIB, TrackerTopology::tibLayer(), SiStripSubdetector::TID, TrackerTopology::tidWheel(), SiStripSubdetector::TOB, TrackerTopology::tobLayer(), Surface::toGlobal(), tTopoToken_, 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 126 of file PreMixingSiStripWorker.cc.

Referenced by DMinitializeDetUnit(), and put().

◆ allHIPChannels

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

Definition at line 128 of file PreMixingSiStripWorker.cc.

Referenced by DMinitializeDetUnit().

◆ apv_fCPerElectron_

const double PreMixingSiStripWorker::apv_fCPerElectron_
private

Definition at line 138 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ apv_maxResponse_

const double PreMixingSiStripWorker::apv_maxResponse_
private

Definition at line 135 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ apv_mVPerQ_

const double PreMixingSiStripWorker::apv_mVPerQ_
private

Definition at line 137 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ apv_rate_

const double PreMixingSiStripWorker::apv_rate_
private

Definition at line 136 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ APVSaturationFromHIP_

bool PreMixingSiStripWorker::APVSaturationFromHIP_
private

Definition at line 116 of file PreMixingSiStripWorker.cc.

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

◆ apvSimulationParametersToken_

edm::ESGetToken<SiStripApvSimulationParameters, SiStripApvSimulationParametersRcd> PreMixingSiStripWorker::apvSimulationParametersToken_
private

Definition at line 74 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker(), and put().

◆ deadChannelToken_

const edm::ESGetToken<SiStripBadStrip, SiStripBadChannelRcd> PreMixingSiStripWorker::deadChannelToken_
private

Definition at line 69 of file PreMixingSiStripWorker.cc.

Referenced by DMinitializeDetUnit().

◆ firstChannelsWithSignal

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

Definition at line 130 of file PreMixingSiStripWorker.cc.

Referenced by DMinitializeDetUnit().

◆ fracOfEventsToSimAPV_

const double PreMixingSiStripWorker::fracOfEventsToSimAPV_
private

Definition at line 134 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ gainToken_

const edm::ESGetToken<SiStripGain, SiStripGainSimRcd> PreMixingSiStripWorker::gainToken_
private

Definition at line 70 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ includeAPVSimulation_

bool PreMixingSiStripWorker::includeAPVSimulation_
private

Definition at line 133 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker(), and put().

◆ lastChannelsWithSignal

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

Definition at line 131 of file PreMixingSiStripWorker.cc.

Referenced by DMinitializeDetUnit().

◆ noiseToken_

const edm::ESGetToken<SiStripNoises, SiStripNoisesRcd> PreMixingSiStripWorker::noiseToken_
private

Definition at line 71 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ pDD

const TrackerGeometry* PreMixingSiStripWorker::pDD
private

Definition at line 123 of file PreMixingSiStripWorker.cc.

Referenced by initializeEvent(), and put().

◆ pDDToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> PreMixingSiStripWorker::pDDToken_
private

Definition at line 68 of file PreMixingSiStripWorker.cc.

Referenced by initializeEvent().

◆ peakMode

bool PreMixingSiStripWorker::peakMode
private

Definition at line 113 of file PreMixingSiStripWorker.cc.

◆ signals_

signalMaps PreMixingSiStripWorker::signals_
private

Definition at line 103 of file PreMixingSiStripWorker.cc.

Referenced by getSignal(), and put().

◆ SiHitStorage_

SiGlobalIndex PreMixingSiStripWorker::SiHitStorage_
private

Definition at line 88 of file PreMixingSiStripWorker.cc.

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

◆ SingleStripNoise

bool PreMixingSiStripWorker::SingleStripNoise
private

Definition at line 112 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ SiRawDigis_

SiGlobalRawIndex PreMixingSiStripWorker::SiRawDigis_
private

Definition at line 89 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 108 of file PreMixingSiStripWorker.cc.

Referenced by addPileups(), and put().

◆ theElectronPerADC

double PreMixingSiStripWorker::theElectronPerADC
private

Definition at line 115 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ theFedAlgo

int PreMixingSiStripWorker::theFedAlgo
private

Definition at line 117 of file PreMixingSiStripWorker.cc.

◆ theSiDigitalConverter

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

Definition at line 121 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ theSiNoiseAdder

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

Definition at line 119 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker(), and put().

◆ theSiZeroSuppress

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

Definition at line 120 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ theThreshold

double PreMixingSiStripWorker::theThreshold
private

Definition at line 114 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker().

◆ thresholdToken_

const edm::ESGetToken<SiStripThreshold, SiStripThresholdRcd> PreMixingSiStripWorker::thresholdToken_
private

Definition at line 72 of file PreMixingSiStripWorker.cc.

Referenced by put().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> PreMixingSiStripWorker::tTopoToken_
private

Definition at line 75 of file PreMixingSiStripWorker.cc.

Referenced by PreMixingSiStripWorker(), and put().

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:119
edm::ESInputTag
Definition: ESInputTag.h:87
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:108
PreMixingSiStripWorker::SiStripDigiCollectionDM_
std::string SiStripDigiCollectionDM_
Definition: PreMixingSiStripWorker.cc:62
PreMixingSiStripWorker::RawDigi
std::pair< uint16_t, Amplitude > RawDigi
Definition: PreMixingSiStripWorker.cc:80
PreMixingSiStripWorker::SiStripAPVPileInputTag_
edm::InputTag SiStripAPVPileInputTag_
Definition: PreMixingSiStripWorker.cc:65
SiStripNoises
Definition: SiStripNoises.h:25
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::DetSet< SiStripDigi >
SiStripGain
Definition: SiStripGain.h:45
PreMixingSiStripWorker::theSiZeroSuppress
std::unique_ptr< SiStripFedZeroSuppression > theSiZeroSuppress
Definition: PreMixingSiStripWorker.cc:120
PreMixingSiStripWorker::getSignal
const SignalMapType * getSignal(uint32_t detID) const
Definition: PreMixingSiStripWorker.cc:95
StripTopology::localPosition
virtual LocalPoint localPosition(float strip) const =0
PreMixingSiStripWorker::OneDetectorRawMap
std::vector< RawDigi > OneDetectorRawMap
Definition: PreMixingSiStripWorker.cc:82
mps_splice.entry
entry
Definition: mps_splice.py:68
PreMixingSiStripWorker::theElectronPerADC
double theElectronPerADC
Definition: PreMixingSiStripWorker.cc:115
TrackerTopology
Definition: TrackerTopology.h:16
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:136
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:133
PreMixingSiStripWorker::StrictWeakOrdering
Definition: PreMixingSiStripWorker.cc:142
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
PreMixingSiStripWorker::SistripAPVLabelSig_
edm::InputTag SistripAPVLabelSig_
Definition: PreMixingSiStripWorker.cc:64
PreMixingSiStripWorker::theFedAlgo
int theFedAlgo
Definition: PreMixingSiStripWorker.cc:117
RPCpg::rate
double rate(double x)
Definition: Constants.cc:3
SiStripSubdetector::TEC
Definition: SiStripEnums.h:5
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
edm::Handle
Definition: AssociativeIterator.h:50
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
PreMixingSiStripWorker::apv_fCPerElectron_
const double apv_fCPerElectron_
Definition: PreMixingSiStripWorker.cc:138
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
SiStripApvSimulationParameters::sampleTID
float sampleTID(layerid wheel, float r, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:57
PreMixingSiStripWorker::OneDetectorMap
std::vector< SiStripDigi > OneDetectorMap
Definition: PreMixingSiStripWorker.cc:81
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
SiStripBadStrip
Definition: SiStripBadStrip.h:30
SiStripSubdetector::TOB
Definition: SiStripEnums.h:5
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
PreMixingSiStripWorker::apvSimulationParametersToken_
edm::ESGetToken< SiStripApvSimulationParameters, SiStripApvSimulationParametersRcd > apvSimulationParametersToken_
Definition: PreMixingSiStripWorker.cc:74
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:76
SiStripBadStrip::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripBadStrip.h:53
PreMixingSiStripWorker::thresholdToken_
const edm::ESGetToken< SiStripThreshold, SiStripThresholdRcd > thresholdToken_
Definition: PreMixingSiStripWorker.cc:72
TrackerGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: TrackerGeometry.h:61
ntupleEnum.SubDet
SubDet
Definition: ntupleEnum.py:14
PreMixingSiStripWorker::SingleStripNoise
bool SingleStripNoise
Definition: PreMixingSiStripWorker.cc:112
SiStripNoises::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:47
SiStripFedZeroSuppression
Definition: SiStripFedZeroSuppression.h:20
mps_fire.end
end
Definition: mps_fire.py:242
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
PreMixingSiStripWorker::apv_mVPerQ_
const double apv_mVPerQ_
Definition: PreMixingSiStripWorker.cc:137
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
PreMixingSiStripWorker::theSiDigitalConverter
std::unique_ptr< SiTrivialDigitalConverter > theSiDigitalConverter
Definition: PreMixingSiStripWorker.cc:121
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
SiStripApvSimulationParameters::sampleTIB
float sampleTIB(layerid layer, float z, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:51
PreMixingSiStripWorker::fracOfEventsToSimAPV_
const double fracOfEventsToSimAPV_
Definition: PreMixingSiStripWorker.cc:134
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
PreMixingSiStripWorker::DigitalVecType
SiDigitalConverter::DigitalVecType DigitalVecType
Definition: PreMixingSiStripWorker.cc:86
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
PreMixingSiStripWorker::tTopoToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: PreMixingSiStripWorker.cc:75
PreMixingSiStripWorker::theThreshold
double theThreshold
Definition: PreMixingSiStripWorker.cc:114
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:130
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
PreMixingSiStripWorker::apv_maxResponse_
const double apv_maxResponse_
Definition: PreMixingSiStripWorker.cc:135
gpuVertexFinder::noise
__shared__ int noise
Definition: gpuFitVertices.h:50
PreMixingSiStripWorker::gainToken_
const edm::ESGetToken< SiStripGain, SiStripGainSimRcd > gainToken_
Definition: PreMixingSiStripWorker.cc:70
PreMixingSiStripWorker::allHIPChannels
std::map< unsigned int, std::vector< bool > > allHIPChannels
Definition: PreMixingSiStripWorker.cc:128
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripSubdetector::TIB
Definition: SiStripEnums.h:5
PreMixingSiStripWorker::SiHitStorage_
SiGlobalIndex SiHitStorage_
Definition: PreMixingSiStripWorker.cc:88
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
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:103
SiStripThreshold
Definition: __init__.py:1
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:126
PreMixingSiStripWorker::SignalMapType
std::map< int, Amplitude > SignalMapType
Definition: PreMixingSiStripWorker.cc:92
SiStripApvGain::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripApvGain.h:28
PreMixingSiStripWorker::lastChannelsWithSignal
std::map< unsigned int, size_t > lastChannelsWithSignal
Definition: PreMixingSiStripWorker.cc:131
PreMixingSiStripWorker::peakMode
bool peakMode
Definition: PreMixingSiStripWorker.cc:113
SiTrivialDigitalConverter
Definition: SiTrivialDigitalConverter.h:8
Exception
Definition: hltDiff.cc:245
PreMixingSiStripWorker::APVSaturationFromHIP_
bool APVSaturationFromHIP_
Definition: PreMixingSiStripWorker.cc:116
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
PreMixingSiStripWorker::pDDToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pDDToken_
Definition: PreMixingSiStripWorker.cc:68
PreMixingSiStripWorker::pDD
const TrackerGeometry * pDD
Definition: PreMixingSiStripWorker.cc:123
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
PreMixingSiStripWorker::deadChannelToken_
const edm::ESGetToken< SiStripBadStrip, SiStripBadChannelRcd > deadChannelToken_
Definition: PreMixingSiStripWorker.cc:69
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
SiStripApvSimulationParameters::sampleTEC
float sampleTEC(layerid wheel, float r, float pu, CLHEP::HepRandomEngine *engine) const
Definition: SiStripApvSimulationParameters.h:60
PreMixingSiStripWorker::SiStripPileInputTag_
edm::InputTag SiStripPileInputTag_
Definition: PreMixingSiStripWorker.cc:61
PreMixingSiStripWorker::noiseToken_
const edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noiseToken_
Definition: PreMixingSiStripWorker.cc:71
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
PreMixingSiStripWorker::SistripAPVListDM_
std::string SistripAPVListDM_
Definition: PreMixingSiStripWorker.cc:66
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:430
PreMixingSiStripWorker::SiRawDigis_
SiGlobalRawIndex SiRawDigis_
Definition: PreMixingSiStripWorker.cc:89
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:230
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
SiStripApvSimulationParameters
Definition: SiStripApvSimulationParameters.h:17
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