CMS 3D CMS Logo

SiStripMonitorPedestals.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiStripMonitorPedestals
4 // Class: SiStripMonitorPedestals
5 //
14 //
15 // Original Author: Simone Gennai and Suchandra Dutta
16 // Created: Sat Feb 4 20:49:10 CET 2006
17 //
18 //
19 
22 
25 
28 
30 
33 
42 
43 #include "TProfile.h"
44 // std
45 #include <algorithm>
46 #include <cmath>
47 #include <cstdlib>
48 #include <numeric>
49 
50 const std::string SiStripMonitorPedestals::RunMode1 = "ConDBPlotsOnly";
51 const std::string SiStripMonitorPedestals::RunMode2 = "CalculatedPlotsOnly";
53 
55  : dqmStore_(edm::Service<DQMStore>().operator->()),
56  conf_(iConfig),
57  pedsPSet_(iConfig.getParameter<edm::ParameterSet>("PedestalsPSet")),
58  analyzed(false),
59  firstEvent(true),
60  signalCutPeds_(4),
61  nEvTot_(0),
62  nIteration_(0),
63  apvFactory_(nullptr),
64  m_cacheID_(0) {
65  // retrieve producer name of input StripDigiCollection
67  std::string digiType = "VirginRaw";
68  digiToken_ = consumes<edm::DetSetVector<SiStripRawDigi>>(edm::InputTag(digiProducer, digiType));
69 
70  edm::LogInfo("SiStripMonitorPedestals") << "SiStripMonitorPedestals "
71  << " Constructing....... ";
72 
73  theEventInitNumber_ = pedsPSet_.getParameter<int>("NumberOfEventsForInit");
74  theEventIterNumber_ = pedsPSet_.getParameter<int>("NumberOfEventsForIteration");
75  NumCMstripsInGroup_ = pedsPSet_.getParameter<int>("NumCMstripsInGroup");
76  runTypeFlag_ = conf_.getParameter<std::string>("RunTypeFlag");
77 }
78 //
79 // -- Destructor
80 //
82  edm::LogInfo("SiStripMonitorPedestals") << "SiStripMonitorPedestals "
83  << " Destructing...... ";
84  if (apvFactory_) {
85  delete apvFactory_;
86  }
87 }
88 //
89 // -- BeginRun
90 //
91 
93  const edm::Run &run,
94  const edm::EventSetup &eSetup) {
95  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
96  if (m_cacheID_ != cacheID) {
97  m_cacheID_ = cacheID;
98  eSetup.get<SiStripDetCablingRcd>().get(detcabling);
99  edm::LogInfo("SiStripMonitorPedestals") << "SiStripMonitorPedestals::bookHistograms: "
100  << " Creating MEs for new Cabling ";
101  createMEs(ibooker, eSetup);
102  }
103 
105  fillCondDBMEs(eSetup);
106 }
107 
108 //
109 // -- Create Monitor Elements
110 //
112  // Retrieve tracker topology from geometry
113  edm::ESHandle<TrackerTopology> tTopoHandle;
114  es.get<TrackerTopologyRcd>().get(tTopoHandle);
115  const TrackerTopology *const tTopo = tTopoHandle.product();
116 
117  std::vector<uint32_t> SelectedDetIds;
118 
119  // ApvAnalysisFactory
120  if (apvFactory_) {
121  delete apvFactory_;
122  }
124 
125  detcabling->addActiveDetectorsRawIds(SelectedDetIds);
126 
127  // use SistripHistoId for producing histogram id (and title)
128  SiStripHistoId hidmanager;
129  // create SiStripFolderOrganizer
130  SiStripFolderOrganizer folder_organizer;
131 
132  edm::LogInfo("SiStripMonitorPedestals") << "SiStripMonitorPedestals::createMEs: "
133  << "Number of Detector Present in cabling " << SelectedDetIds.size();
134 
135  for (std::vector<uint32_t>::const_iterator idetid = SelectedDetIds.begin(), iEnd = SelectedDetIds.end();
136  idetid != iEnd;
137  ++idetid) {
138  uint32_t detid = *idetid;
139 
140  // Check consistency in DetId
141  if (detid == 0 || detid == 0xFFFFFFFF) {
142  edm::LogError("SiStripMonitorPedestals") << "SiStripMonitorPedestals::createMEs: "
143  << "Wrong DetId !!!!!! " << detid << " Neglecting !!!!!! ";
144  continue;
145  }
146 
147  unsigned int apv_pairs = detcabling->nApvPairs(detid);
148 
149  // Check consistency in Apv numbers
150  if (apv_pairs < 1 || apv_pairs > 3) {
151  edm::LogError("SiStripMonitorPedestals") << "SiStripMonitorPedestals::createMEs: Wrong APV Pairs => detId "
152  << detid << " APV pairs " << apv_pairs << " Neglecting !!!!!! ";
153  continue;
154  }
155  unsigned int napvs = apv_pairs * 2;
156  unsigned int nStrip = napvs * 128;
157 
158  bool newDetId = apvFactory_->instantiateApvs(detid, napvs);
159 
160  if (newDetId) {
161  ModMEs local_modmes;
162  local_modmes.PedsPerStrip = nullptr;
163  local_modmes.PedsDistribution = nullptr;
164  local_modmes.PedsEvolution = nullptr;
165  local_modmes.CMSubNoisePerStrip = nullptr;
166  local_modmes.RawNoisePerStrip = nullptr;
167  local_modmes.CMSubNoiseProfile = nullptr;
168  local_modmes.RawNoiseProfile = nullptr;
169  local_modmes.NoisyStrips = nullptr;
170  local_modmes.NoisyStripDistribution = nullptr;
171  local_modmes.CMDistribution = nullptr;
172  local_modmes.CMSlopeDistribution = nullptr;
173  local_modmes.PedsPerStripDB = nullptr;
174  local_modmes.CMSubNoisePerStripDB = nullptr;
175  local_modmes.BadStripsDB = nullptr;
176 
177  std::string hid;
178  // set appropriate folder using SiStripFolderOrganizer
179  folder_organizer.setDetectorFolder(detid, tTopo); // pass the detid to this method
180 
181  // if the deid already exists in the map, then reset MEs otherwise create
182  // them
183  resetMEs(detid);
184 
186  // Pedestals histos
187  hid = hidmanager.createHistoId("PedestalFromCondDB", "det", detid);
188  local_modmes.PedsPerStripDB =
189  ibooker.book1D(hid, hid, nStrip, 0.5, nStrip + 0.5); // to modify the size binning
190  ibooker.tag(local_modmes.PedsPerStripDB, detid);
191  (local_modmes.PedsPerStripDB)->setAxisTitle("Pedestal from CondDB(ADC) vs Strip Number", 1);
192 
193  hid = hidmanager.createHistoId("NoiseFromCondDB", "det", detid);
194  local_modmes.CMSubNoisePerStripDB = ibooker.book1D(hid, hid, nStrip, 0.5, nStrip + 0.5);
195  ibooker.tag(local_modmes.CMSubNoisePerStripDB, detid);
196  (local_modmes.CMSubNoisePerStripDB)->setAxisTitle("CMSubNoise from CondDB(ADC) vs Strip Number", 1);
197 
198  hid = hidmanager.createHistoId("BadStripFlagCondDB", "det", detid);
199  local_modmes.BadStripsDB = ibooker.book2D(hid, hid, nStrip, 0.5, nStrip + 0.5, 6, -0.5, 5.5);
200  ibooker.tag(local_modmes.BadStripsDB, detid);
201  (local_modmes.BadStripsDB)->setAxisTitle("Strip Flag from CondDB(ADC) vs Strip Number", 1);
202  }
204  // Pedestals histos
205  hid = hidmanager.createHistoId("PedsPerStrip", "det", detid);
206  local_modmes.PedsPerStrip = ibooker.book1D(hid, hid, nStrip, 0.5, nStrip + 0.5); // to modify the size binning
207  ibooker.tag(local_modmes.PedsPerStrip, detid);
208  (local_modmes.PedsPerStrip)->setAxisTitle("Pedestal (ADC) vs Strip Number ", 1);
209 
210  hid = hidmanager.createHistoId("PedsDistribution", "det", detid);
211  local_modmes.PedsDistribution = ibooker.book2D(hid,
212  hid,
213  napvs,
214  -0.5,
215  napvs - 0.5,
216  300,
217  200,
218  500); // to modify the size binning
219  ibooker.tag(local_modmes.PedsDistribution, detid);
220  (local_modmes.PedsDistribution)->setAxisTitle("Apv Number", 1);
221  (local_modmes.PedsDistribution)->setAxisTitle("Mean Pedestal Value (ADC)", 2);
222 
223  hid = hidmanager.createHistoId("PedsEvolution", "det", detid);
224  local_modmes.PedsEvolution = ibooker.book2D(hid,
225  hid,
226  napvs,
227  -0.5,
228  napvs - 0.5,
229  50,
230  0.,
231  50.); // to modify the size binning
232  ibooker.tag(local_modmes.PedsEvolution, detid);
233  (local_modmes.PedsEvolution)->setAxisTitle("Apv Number", 1);
234  (local_modmes.PedsEvolution)->setAxisTitle("Iteration Number", 2);
235 
236  // Noise histos
237  hid = hidmanager.createHistoId("CMSubNoisePerStrip", "det", detid);
238  local_modmes.CMSubNoisePerStrip = ibooker.book1D(hid, hid, nStrip, 0.5, nStrip + 0.5);
239  ibooker.tag(local_modmes.CMSubNoisePerStrip, detid);
240  (local_modmes.CMSubNoisePerStrip)->setAxisTitle("CMSubNoise (ADC) vs Strip Number", 1);
241 
242  hid = hidmanager.createHistoId("RawNoisePerStrip", "det", detid);
243  local_modmes.RawNoisePerStrip = ibooker.book1D(hid, hid, nStrip, 0.5, nStrip + 0.5);
244  ibooker.tag(local_modmes.RawNoisePerStrip, detid);
245  (local_modmes.RawNoisePerStrip)->setAxisTitle("RawNoise(ADC) vs Strip Number", 1);
246 
247  hid = hidmanager.createHistoId("CMSubNoiseProfile", "det", detid);
248  local_modmes.CMSubNoiseProfile = ibooker.bookProfile(hid, hid, nStrip, 0.5, nStrip + 0.5, 100, 0., 100.);
249  ibooker.tag(local_modmes.CMSubNoiseProfile, detid);
250  (local_modmes.CMSubNoiseProfile)->setAxisTitle("Mean of CMSubNoise (ADC) vs Strip Number", 1);
251 
252  hid = hidmanager.createHistoId("RawNoiseProfile", "det", detid);
253  local_modmes.RawNoiseProfile = ibooker.bookProfile(hid, hid, nStrip, 0.5, nStrip + 0.5, 100, 0., 100.);
254  ibooker.tag(local_modmes.RawNoiseProfile, detid);
255  (local_modmes.RawNoiseProfile)->setAxisTitle("Mean of RawNoise (ADC) vs Strip Number", 1);
256 
257  hid = hidmanager.createHistoId("NoisyStrips", "det", detid);
258  local_modmes.NoisyStrips = ibooker.book2D(hid, hid, nStrip, 0.5, nStrip + 0.5, 6, -0.5, 5.5);
259  ibooker.tag(local_modmes.NoisyStrips, detid);
260  (local_modmes.NoisyStrips)->setAxisTitle("Strip Number", 1);
261  (local_modmes.NoisyStrips)->setAxisTitle("Flag Value", 2);
262 
263  hid = hidmanager.createHistoId("NoisyStripDistribution", "det", detid);
264  local_modmes.NoisyStripDistribution = ibooker.book1D(hid, hid, 11, -0.5, 10.5);
265  ibooker.tag(local_modmes.NoisyStripDistribution, detid);
266  (local_modmes.NoisyStripDistribution)->setAxisTitle("Flag Value", 1);
267 
268  // Common Mode histos
269  hid = hidmanager.createHistoId("CMDistribution", "det", detid);
270  local_modmes.CMDistribution = ibooker.book2D(hid, hid, napvs, -0.5, napvs - 0.5, 150, -15., 15.);
271  ibooker.tag(local_modmes.CMDistribution, detid);
272  (local_modmes.CMDistribution)->setAxisTitle("Common Mode (ADC) vs APV Number", 1);
273 
274  hid = hidmanager.createHistoId("CMSlopeDistribution", "det", detid);
275  local_modmes.CMSlopeDistribution = ibooker.book2D(hid, hid, napvs, -0.5, napvs - 0.5, 100, -0.05, 0.05);
276  ibooker.tag(local_modmes.CMSlopeDistribution, detid);
277  (local_modmes.CMSlopeDistribution)->setAxisTitle("Common Mode Slope vs APV Number", 1);
278  }
279  // data from CondDB
280  // append to PedMEs
281  PedMEs.insert(std::make_pair(detid, local_modmes));
282  } // newDetId
283  }
284  edm::LogInfo("SiStripMonitorPedestals")
285  << "SiStripMonitorPedestals::createMEs: Number of DETS used " << PedMEs.size();
286 }
287 // ------------ method called to produce the data ------------
289  edm::LogInfo("SiStripMonitorPedestals")
290  << "SiStripMonitorPedestals::analyze: Run " << iEvent.id().run() << " Event " << iEvent.id().event();
291 
292  eSetup.get<SiStripDetCablingRcd>().get(detcabling);
293 
295  return;
296 
297  // Increment # of Events
298  nEvTot_++;
299 
300  // get DigiCollection object from Event
302  // you have a collection as there are all the digis for the event for every
303  // detector
304  iEvent.getByToken(digiToken_, digi_collection);
305 
306  // Increase the number of iterations ...
308  nIteration_++;
309 
310  // loop over all MEs
311  for (std::map<uint32_t, ModMEs>::const_iterator i = PedMEs.begin(); i != PedMEs.end(); i++) {
312  uint32_t detid = i->first;
313  ModMEs local_modmes = i->second;
314  // get iterators for digis belonging to one DetId, it is an iterator, i.e.
315  // one element of the vector
316  std::vector<edm::DetSet<SiStripRawDigi>>::const_iterator digis = digi_collection->find(detid);
317  if (digis == digi_collection->end() || digis->data.empty() || digis->data.size() > 768) {
318  if (digis == digi_collection->end()) {
319  edm::LogError("SiStripMonitorPedestals") << " SiStripMonitorPedestals::analyze: Event " << nEvTot_ << " DetId "
320  << detid << " at the end of Digi Collection!!!";
321  } else {
322  edm::LogError("SiStripMonitorPedestals") << " [SiStripMonitorPedestals::analyze: Event " << nEvTot_ << " DetId "
323  << detid << " # of Digis " << digis->data.size();
324  }
325  std::vector<const FedChannelConnection *> fed_conns = detcabling->getConnections(detid);
326  bool firstchannel(true);
327  for (unsigned int k = 0; k < fed_conns.size(); k++) {
328  if (fed_conns[k] && fed_conns[k]->isConnected()) {
329  if (firstchannel) {
330  edm::LogError("SiStripMonitorPedestals") << " SiStripMonitorPedestals::analyze: Fed Id "
331  << fed_conns[k]->fedId() << " Channel " << fed_conns[k]->fedCh();
332  firstchannel = false;
333  } else
334  edm::LogError("SiStripMonitorPedestals")
335  << " SiStripMonitorPedestals::analyze: Channel " << fed_conns[k]->fedCh();
336  }
337  }
338  std::cout << std::endl;
339  continue;
340  }
341 
342  if (digis->data.empty()) {
343  edm::LogError("MonitorDigi_tmp") << "[SiStripRawDigiToRaw::createFedBuffers] Zero digis found!";
344  }
345  uint32_t id = detid;
346  // cout <<"Data size "<<digis->data.size()<<endl;
347  apvFactory_->update(id, (*digis));
348 
350  if (local_modmes.CMDistribution != nullptr) {
351  std::vector<float> tmp;
352  tmp.clear();
353  apvFactory_->getCommonMode(id, tmp);
354  // unpacking the info looking at the right topology
355  int numberCMBlocks = int(128. / NumCMstripsInGroup_);
356  int ibin = 0;
357  for (std::vector<float>::const_iterator iped = tmp.begin(); iped != tmp.end(); iped++) {
358  int iapv = int(ibin / numberCMBlocks);
359  (local_modmes.CMDistribution)->Fill(iapv, static_cast<float>(*iped));
360  ibin++;
361  }
362  }
363  if (local_modmes.CMSlopeDistribution != nullptr) {
364  std::vector<float> tmp;
365  tmp.clear();
366  int iapv = 0;
368  for (std::vector<float>::const_iterator it = tmp.begin(); it != tmp.end(); it++) {
369  (local_modmes.CMSlopeDistribution)->Fill(iapv, static_cast<float>(*it));
370  iapv++;
371  }
372  }
373  }
374 
375  // asking for the status
377  std::vector<float> tmp;
378  tmp.clear();
379  apvFactory_->getPedestal(id, tmp);
380  if (local_modmes.PedsPerStrip != nullptr) {
381  int numberOfApvs = int(tmp.size() / 128.);
382  for (int i = 0; i < numberOfApvs; i++) {
383  std::vector<float> myPedPerApv;
384  apvFactory_->getPedestal(id, i, myPedPerApv);
385  float avarage = 0;
386  avarage = std::accumulate(myPedPerApv.begin(), myPedPerApv.end(), avarage);
387  avarage = avarage / 128.;
388  (local_modmes.PedsEvolution)->setBinContent(i + 1, nIteration_, avarage);
389  }
390  int ibin = 0;
391 
392  for (std::vector<float>::const_iterator iped = tmp.begin(); iped != tmp.end(); iped++) {
393  int napv = int(ibin / 128.);
394  ibin++;
395  float last_value = (local_modmes.PedsPerStrip)->getBinContent(ibin);
396  if (last_value != 0.) {
397  (local_modmes.PedsPerStrip)->setBinContent(ibin, (static_cast<float>(*iped) + last_value) / 2.);
398  } else {
399  (local_modmes.PedsPerStrip)->setBinContent(ibin, static_cast<float>(*iped));
400  }
401  (local_modmes.PedsDistribution)->Fill(napv, static_cast<float>(*iped));
402  }
403  }
404 
405  if (local_modmes.CMSubNoisePerStrip != nullptr && local_modmes.CMSubNoiseProfile != nullptr) {
406  tmp.clear();
407  apvFactory_->getNoise(id, tmp);
408  int ibin = 0;
409  for (std::vector<float>::const_iterator iped = tmp.begin(); iped != tmp.end(); iped++) {
410  ibin++;
411  (local_modmes.CMSubNoiseProfile)->Fill(static_cast<double>(ibin * 1.), static_cast<float>(*iped));
412 
413  float last_value = (local_modmes.CMSubNoisePerStrip)->getBinContent(ibin);
414  if (last_value != 0.) {
415  (local_modmes.CMSubNoisePerStrip)->setBinContent(ibin, (static_cast<float>(*iped) + last_value) / 2.);
416  } else {
417  (local_modmes.CMSubNoisePerStrip)->setBinContent(ibin, static_cast<float>(*iped));
418  }
419  }
420  }
421 
422  if (local_modmes.RawNoisePerStrip != nullptr && local_modmes.RawNoiseProfile != nullptr) {
423  tmp.clear();
424  apvFactory_->getRawNoise(id, tmp);
425  int ibin = 0;
426  for (std::vector<float>::const_iterator iped = tmp.begin(); iped != tmp.end(); iped++) {
427  ibin++;
428  (local_modmes.RawNoiseProfile)->Fill(static_cast<double>(ibin * 1.), static_cast<float>(*iped));
429  float last_value = (local_modmes.RawNoisePerStrip)->getBinContent(ibin);
430  if (last_value != 0.) {
431  (local_modmes.RawNoisePerStrip)->setBinContent(ibin, (static_cast<float>(*iped) + last_value) / 2.);
432  } else {
433  (local_modmes.RawNoisePerStrip)->setBinContent(ibin, static_cast<float>(*iped));
434  }
435  }
436  }
437 
438  if (local_modmes.NoisyStrips != nullptr) {
440  apvFactory_->getMask(id, temp);
441  int ibin = 0;
442  for (TkApvMask::MaskType::const_iterator iped = temp.begin(); iped != temp.end(); iped++) {
443  ibin++;
444 
445  if (nIteration_ < 2) {
446  if (*iped == 1)
447  (local_modmes.NoisyStrips)->Fill(ibin, 3.);
448  if (*iped == 2)
449  (local_modmes.NoisyStrips)->Fill(ibin, 4.);
450  if (*iped == 0)
451  (local_modmes.NoisyStrips)->Fill(ibin, 0.);
452  } else {
453  (local_modmes.NoisyStrips)->Fill(ibin, static_cast<float>(*iped));
454  (local_modmes.NoisyStripDistribution)->Fill(static_cast<float>(*iped));
455  }
456  }
457  }
458  }
459  }
460  if (firstEvent)
461  firstEvent = false;
462 }
463 //
464 // -- End Run
465 //
467  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
468  if (outputMEsInRootFile) {
470  // dqmStore_->showDirStructure();
471  dqmStore_->save(outPutFileName);
472  }
473 }
474 //
475 // -- End Job
476 //
478  edm::LogInfo("SiStripMonitorPedestals") << "SiStripMonitorPedestals::EndJob: "
479  << " Finishing!! ";
480 }
481 //
482 // -- Reset Monitor Elements corresponding to a detetor
483 //
485  std::map<uint32_t, ModMEs>::iterator pos = PedMEs.find(idet);
486  if (pos != PedMEs.end()) {
487  ModMEs mod_me = pos->second;
488 
490  mod_me.PedsPerStripDB->Reset();
491  mod_me.CMSubNoisePerStripDB->Reset();
492  mod_me.BadStripsDB->Reset();
493  }
495  mod_me.PedsPerStrip->Reset();
496  mod_me.PedsDistribution->Reset();
497  mod_me.PedsEvolution->Reset();
498  mod_me.CMSubNoisePerStrip->Reset();
499  mod_me.RawNoisePerStrip->Reset();
500  mod_me.CMSubNoiseProfile->Reset();
501  mod_me.RawNoiseProfile->Reset();
502  mod_me.NoisyStrips->Reset();
503  mod_me.CMDistribution->Reset();
504  mod_me.CMSlopeDistribution->Reset();
505  }
506  }
507 }
508 //
509 // -- Fill CondDB Monitoring Elements
510 //
512  // get Pedestal and Noise ES handle
513  edm::ESHandle<SiStripPedestals> pedestalHandle;
514  edm::ESHandle<SiStripNoises> noiseHandle;
515  edm::ESHandle<SiStripQuality> qualityHandle;
516 
517  eSetup.get<SiStripPedestalsRcd>().get(pedestalHandle);
518  eSetup.get<SiStripNoisesRcd>().get(noiseHandle);
519  std::string quality_label = conf_.getParameter<std::string>("StripQualityLabel");
520  eSetup.get<SiStripQualityRcd>().get(quality_label, qualityHandle);
521 
522  for (std::map<uint32_t, ModMEs>::const_iterator i = PedMEs.begin(); i != PedMEs.end(); i++) {
523  uint32_t detid = i->first;
524  ModMEs local_modmes = i->second;
525  edm::LogInfo("SiStripMonitorPedestals") << " SiStripMonitorPedestals::analyze: "
526  << " Get Ped/Noise/Bad Strips from CondDb for DetId " << detid;
527  int nStrip = detcabling->nApvPairs(detid) * 256;
528  // Get range of pedestal and noise for the detid
529  SiStripNoises::Range noiseRange = noiseHandle->getRange(detid);
530  SiStripPedestals::Range pedRange = pedestalHandle->getRange(detid);
531  SiStripQuality::Range qualityRange = qualityHandle->getRange(detid);
532 
533  for (int istrip = 0; istrip < nStrip; ++istrip) {
534  try {
535  // Fill Pedestals
536  (local_modmes.PedsPerStripDB)->Fill(istrip + 1, pedestalHandle->getPed(istrip, pedRange));
537  } catch (cms::Exception &e) {
538  edm::LogError("SiStripMonitorPedestals") << "[SiStripMonitorPedestals::analyze] cms::Exception accessing "
539  "SiStripPedestalsService_.getPedestal("
540  << detid << "," << istrip << ") : "
541  << " " << e.what();
542  }
543  try {
544  // Fill Noises
545  (local_modmes.CMSubNoisePerStripDB)->Fill(istrip + 1, noiseHandle->getNoise(istrip, noiseRange));
546 
547  } catch (cms::Exception &e) {
548  edm::LogError("SiStripMonitorPedestals") << "[SiStripMonitorPedestals::analyze] cms::Exception accessing "
549  "SiStripNoiseService_.getNoise("
550  << detid << "," << istrip << ") : "
551  << " " << e.what();
552  }
553  try {
554  // Fill BadStripsNoise
555  (local_modmes.BadStripsDB)->Fill(istrip + 1, qualityHandle->IsStripBad(qualityRange, istrip) ? 1. : 0.);
556 
557  } catch (cms::Exception &e) {
558  edm::LogError("SiStripMonitorPedestals") << "[SiStripMonitorPedestals::analyze] cms::Exception accessing "
559  "SiStripNoiseService_.getDisable("
560  << detid << "," << istrip << ") : "
561  << " " << e.what();
562  }
563  } // close istrip loop
564  }
565 }
std::vector< StripMaskType > MaskType
Definition: TkApvMask.h:17
RunNumber_t run() const
Definition: EventID.h:39
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:41
void fillCondDBMEs(edm::EventSetup const &eSetup)
edm::ESHandle< SiStripDetCabling > detcabling
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
void getPedestal(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &peds)
bool IsStripBad(const uint32_t &detid, const short &strip) const
void getCommonModeSlope(uint32_t det_id, ApvAnalysis::PedestalType &tmp)
void getNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
void update(uint32_t det_id, const edm::DetSet< SiStripRawDigi > &in)
void getMask(uint32_t det_id, TkApvMask::MaskType &tmp)
#define nullptr
char const * what() const override
Definition: Exception.cc:103
std::pair< ContainerIterator, ContainerIterator > Range
static const std::string RunMode1
void getRawNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
float getPed(const uint16_t &strip, const Range &range) const
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
edm::EDGetTokenT< edm::DetSetVector< SiStripRawDigi > > digiToken_
static float getNoise(uint16_t strip, const Range &range)
Definition: SiStripNoises.h:74
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void analyze(const edm::Event &, const edm::EventSetup &) override
static const std::string RunMode3
bool instantiateApvs(uint32_t det_id, int numberOfApvs)
SiStripMonitorPedestals(const edm::ParameterSet &)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:283
ApvAnalysisFactory * apvFactory_
void Reset()
reset ME (ie. contents, errors, etc)
void getCommonMode(uint32_t det_id, ApvAnalysis::PedestalType &tmp)
int k[5][pyjets_maxn]
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
Definition: DQMStore.cc:2465
const uint16_t nApvPairs(uint32_t det_id) const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
edm::EventID id() const
Definition: EventBase.h:59
const Range getRange(const uint32_t detID) const
HLT enums.
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
const Range getRange(const uint32_t detID) const
std::pair< ContainerIterator, ContainerIterator > Range
T get() const
Definition: EventSetup.h:71
static const std::string RunMode2
const Range getRange(const uint32_t &detID) const
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:50
void createMEs(DQMStore::IBooker &, edm::EventSetup const &eSetup)
T const * product() const
Definition: ESHandle.h:86
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::map< uint32_t, ModMEs > PedMEs
Definition: Run.h:45