CMS 3D CMS Logo

StripValidationPlots.cc
Go to the documentation of this file.
1 // system include files
2 #include <memory>
3 #include <sstream>
4 #include <iostream>
5 #include <vector>
6 
7 // user include files
19 
20 // ROOT includes
21 #include "TCanvas.h"
22 #include "TFile.h"
23 #include "TH1.h"
24 #include "TH1D.h"
25 #include "TH1F.h"
26 #include "TH2F.h"
27 #include "TProfile.h"
28 #include "TStyle.h"
29 #include "TTree.h"
30 
31 //
32 // class decleration
33 //
34 
36 public:
39 
40  explicit StripValidationPlots(const edm::ParameterSet&);
41  ~StripValidationPlots() override = default;
42 
43 private:
44  void beginJob() override;
45  void analyze(const edm::Event&, const edm::EventSetup&) override;
46  void endJob() override;
47 
48  std::ostringstream oss;
49 
51 
53  TProfile* tmp_prof;
54 
55  // Histograms
56  std::vector<TH2F*> distanceVsStripNumber;
57  std::vector<TProfile*> pfxDistanceVsStripNumber;
58  std::vector<TH1F*> projXDistanceVsStripNumber;
59  std::vector<TH1F*> projYDistanceVsStripNumber;
60 
61  std::vector<TH2F*> occupancyVsStripNumber;
62  std::vector<TProfile*> pfxOccupancyVsStripNumber;
63  std::vector<TH1F*> projYOccupancyVsStripNumber;
64  std::vector<TH2F*> occupancyHotStripsVsStripNumber;
65  std::vector<TProfile*> pfxOccupancyHotStripsVsStripNumber;
68  std::vector<TProfile*> pfxOccupancyGoodStripsVsStripNumber;
70 
71  std::vector<TH2F*> poissonProbVsStripNumber;
72  std::vector<TProfile*> pfxPoissonProbVsStripNumber;
73  std::vector<TH1F*> projYPoissonProbVsStripNumber;
75  std::vector<TProfile*> pfxPoissonProbHotStripsVsStripNumber;
78  std::vector<TProfile*> pfxPoissonProbGoodStripsVsStripNumber;
80 
81  std::vector<TH2F*> nHitsVsStripNumber;
82  std::vector<TProfile*> pfxNHitsVsStripNumber;
83  std::vector<TH1F*> projXNHitsVsStripNumber;
84  std::vector<TH1F*> projYNHitsVsStripNumber;
85  std::vector<TH2F*> nHitsHotStripsVsStripNumber;
86  std::vector<TProfile*> pfxNHitsHotStripsVsStripNumber;
89  std::vector<TH2F*> nHitsGoodStripsVsStripNumber;
90  std::vector<TProfile*> pfxNHitsGoodStripsVsStripNumber;
93 
94  std::vector<std::string> subDetName;
95 
98 
99  TFile* infile;
100  TTree* intree;
101 
102  // Declaration of leaf types
103  Int_t DetRawId;
104  Int_t SubDetId;
105  Int_t Layer_Ring;
106  Int_t Disc;
107  Int_t IsBack;
111  Int_t IsStereo;
114  Int_t StripNumber;
115  Int_t APVChannel;
119  Int_t IsHot;
122  Double_t StripOccupancy;
123  Int_t StripHits;
124  Double_t PoissonProb;
125 
129  Int_t firstEntry;
130  std::vector<unsigned int> vHotStripsInModule;
131  unsigned int distance;
132  unsigned int distanceR, distanceL;
133  unsigned int nReadStrips[768][5];
134 
135  // ----------member data ---------------------------
136 };
137 
138 //
139 // constructors and destructor
140 //
142  : infilename(iConfig.getUntrackedParameter<std::string>("inputFilename", "in.root")),
143  outfilename(iConfig.getUntrackedParameter<std::string>("outputFilename", "out.root"))
144 
145 {
146  //now do what ever initialization is needed
147 }
148 
149 //
150 // member functions
151 //
152 
153 // ------------ method called to for each event ------------
155 
156 // ------------ method called once each job just before starting event loop ------------
158  oss.str("");
159  oss << 1; //runNumber
160 
162  dqmStore_->setCurrentFolder("ChannelStatusPlots");
163 
164  for (int i = 0; i < 768; i++) {
165  for (int j = 0; j < 5; j++)
166  nReadStrips[i][j] = 0;
167  }
168 
169  // Initialize histograms
170  subDetName.push_back("");
171  subDetName.push_back("TIB");
172  subDetName.push_back("TID");
173  subDetName.push_back("TOB");
174  subDetName.push_back("TEC");
176  std::string histoTitle;
177  for (unsigned int i = 0; i < subDetName.size(); i++) {
178  histoName = "distanceVsStripNumber" + subDetName[i];
179  histoTitle = "Distance between hot strips vs. strip number";
180  if (i != 0)
181  histoTitle += " in " + subDetName[i];
182  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 999, 0.5, 999.5);
183  distanceVsStripNumber.push_back(tmp->getTH2F());
184 
185  histoName = "pfxDistanceVsStripNumber" + subDetName[i];
186  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
189  pfxDistanceVsStripNumber[i]->GetXaxis()->SetTitle("Strip");
190  pfxDistanceVsStripNumber[i]->GetYaxis()->SetTitle("Distance");
191 
192  histoName = "projXDistanceVsStripNumber" + subDetName[i];
193  histoTitle = "Number of hot strips vs. strip number";
194  if (i != 0)
195  histoTitle += " in " + subDetName[i];
196  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
197  projXDistanceVsStripNumber.push_back(tmp->getTH1F());
198  projXDistanceVsStripNumber[i]->GetXaxis()->SetTitle("Strip");
199  projXDistanceVsStripNumber[i]->GetYaxis()->SetTitle("N_{hot}");
200 
201  histoName = "projYDistanceVsStripNumber" + subDetName[i];
202  histoTitle = "Distribution of distance between hot strips";
203  if (i != 0)
204  histoTitle += " in " + subDetName[i];
205  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 999, 0.5, 999.5);
206  projYDistanceVsStripNumber.push_back(tmp->getTH1F());
207  projYDistanceVsStripNumber[i]->GetXaxis()->SetTitle("Distance");
208  projYDistanceVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
209 
210  //
211  histoName = "occupancyVsStripNumber" + subDetName[i];
212  histoTitle = "Occupancy of strips vs. strip number";
213  if (i != 0)
214  histoTitle += " in " + subDetName[i];
215  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 1000, -8., 0.);
216  occupancyVsStripNumber.push_back(tmp->getTH2F());
217 
218  histoName = "pfxOccupancyVsStripNumber" + subDetName[i];
219  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
222  pfxOccupancyVsStripNumber[i]->GetXaxis()->SetTitle("Strip");
223  pfxOccupancyVsStripNumber[i]->GetYaxis()->SetTitle("log_{10}(Occupancy)");
224 
225  histoName = "projYOccupancyVsStripNumber" + subDetName[i];
226  histoTitle = "Distribution of strip occupancy";
227  if (i != 0)
228  histoTitle += " in " + subDetName[i];
229  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 1000, -8., 0.);
231  projYOccupancyVsStripNumber[i]->GetXaxis()->SetTitle("log_{10}(Occupancy)");
232  projYOccupancyVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
233 
234  //
235  histoName = "occupancyHotStripsVsStripNumber" + subDetName[i];
236  histoTitle = "Occupancy of hot strips vs. strip number";
237  if (i != 0)
238  histoTitle += " in " + subDetName[i];
239  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 1000, -8., 0.);
241 
242  histoName = "pfxOccupancyHotStripsVsStripNumber" + subDetName[i];
243  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
246  pfxOccupancyHotStripsVsStripNumber[i]->GetXaxis()->SetTitle("Strip");
247  pfxOccupancyHotStripsVsStripNumber[i]->GetYaxis()->SetTitle("log_{10}(Occupancy)");
248 
249  histoName = "projYOccupancyHotStripsVsStripNumber" + subDetName[i];
250  histoTitle = "Distribution of hot strip occupancy";
251  if (i != 0)
252  histoTitle += " in " + subDetName[i];
253  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 1000, -8., 0.);
255  projYOccupancyHotStripsVsStripNumber[i]->GetXaxis()->SetTitle("log_{10}(Occupancy)");
256  projYOccupancyHotStripsVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
257 
258  //
259  histoName = "occupancyGoodStripsVsStripNumber" + subDetName[i];
260  histoTitle = "Occupancy of good strips vs. strip number";
261  if (i != 0)
262  histoTitle += " in " + subDetName[i];
263  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 1000, -8., 0.);
265 
266  histoName = "pfxOccupancyGoodStripsVsStripNumber" + subDetName[i];
267  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
270  pfxOccupancyGoodStripsVsStripNumber[i]->GetXaxis()->SetTitle("Strip");
271  pfxOccupancyGoodStripsVsStripNumber[i]->GetYaxis()->SetTitle("log_{10}(Occupancy)");
272 
273  histoName = "projYOccupancyGoodStripsVsStripNumber" + subDetName[i];
274  histoTitle = "Distribution of good strip occupancy";
275  if (i != 0)
276  histoTitle += " in " + subDetName[i];
277  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 1000, -8., 0.);
279  projYOccupancyGoodStripsVsStripNumber[i]->GetXaxis()->SetTitle("log_{10}(Occupancy)");
280  projYOccupancyGoodStripsVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
281 
282  //
283  histoName = "poissonProbVsStripNumber" + subDetName[i];
284  histoTitle = "Poisson probability of strips vs. strip number";
285  if (i != 0)
286  histoTitle += " in " + subDetName[i];
287  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 1000, -18., 0.);
288  poissonProbVsStripNumber.push_back(tmp->getTH2F());
289 
290  histoName = "pfxPoissonProbVsStripNumber" + subDetName[i];
291  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
294  pfxPoissonProbVsStripNumber[i]->GetXaxis()->SetTitle("Strip");
295  pfxPoissonProbVsStripNumber[i]->GetYaxis()->SetTitle("log_{10}(Probability)");
296 
297  histoName = "projYPoissonProbVsStripNumber" + subDetName[i];
298  histoTitle = "Distribution of strip Poisson probability";
299  if (i != 0)
300  histoTitle += " in " + subDetName[i];
301  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 1000, -18., 0.);
303  projYPoissonProbVsStripNumber[i]->GetXaxis()->SetTitle("log_{10}(Probability)");
304  projYPoissonProbVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
305 
306  //
307  histoName = "poissonProbHotStripsVsStripNumber" + subDetName[i];
308  histoTitle = "Poisson probability of hot strips vs. strip number";
309  if (i != 0)
310  histoTitle += " in " + subDetName[i];
311  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 1000, -18., 0.);
313 
314  histoName = "pfxPoissonProbHotStripsVsStripNumber" + subDetName[i];
315  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
318  pfxPoissonProbHotStripsVsStripNumber[i]->GetXaxis()->SetTitle("Strip");
319  pfxPoissonProbHotStripsVsStripNumber[i]->GetYaxis()->SetTitle("log_{10}(Probability)");
320 
321  histoName = "projYPoissonProbHotStripsVsStripNumber" + subDetName[i];
322  histoTitle = "Distribution of hot strip Poisson probability";
323  if (i != 0)
324  histoTitle += " in " + subDetName[i];
325  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 1000, -18., 0.);
327  projYPoissonProbHotStripsVsStripNumber[i]->GetXaxis()->SetTitle("log_{10}(Probability)");
328  projYPoissonProbHotStripsVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
329 
330  //
331  histoName = "poissonProbGoodStripsVsStripNumber" + subDetName[i];
332  histoTitle = "Poisson probability of good strips vs. strip number";
333  if (i != 0)
334  histoTitle += " in " + subDetName[i];
335  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 1000, -18., 0.);
337 
338  histoName = "pfxPoissonProbGoodStripsVsStripNumber" + subDetName[i];
339  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
342  pfxPoissonProbGoodStripsVsStripNumber[i]->GetXaxis()->SetTitle("Strip");
343  pfxPoissonProbGoodStripsVsStripNumber[i]->GetYaxis()->SetTitle("log_{10}(Probability)");
344 
345  histoName = "projYPoissonProbGoodStripsVsStripNumber" + subDetName[i];
346  histoTitle = "Distribution of good strip Poisson probability";
347  if (i != 0)
348  histoTitle += " in " + subDetName[i];
349  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 1000, -18., 0.);
351  projYPoissonProbGoodStripsVsStripNumber[i]->GetXaxis()->SetTitle("log_{10}(Probability)");
352  projYPoissonProbGoodStripsVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
353 
354  //
355  histoName = "nHitsVsStripNumber" + subDetName[i];
356  histoTitle = "NHits in strips vs. strip number";
357  if (i != 0)
358  histoTitle += " in " + subDetName[i];
359  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 10000, -0.5, 9999.5);
360  nHitsVsStripNumber.push_back(tmp->getTH2F());
361 
362  histoName = "pfxNHitsVsStripNumber" + subDetName[i];
363  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
365  pfxNHitsVsStripNumber.push_back(tmp->getTProfile());
366 
367  histoName = "projXNHitsVsStripNumber" + subDetName[i];
368  histoTitle = "Cumulative nHits in strips vs. strip number";
369  if (i != 0)
370  histoTitle += " in " + subDetName[i];
371  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
372  projXNHitsVsStripNumber.push_back(tmp->getTH1F());
373 
374  histoName = "projYNHitsVsStripNumber" + subDetName[i];
375  histoTitle = "Distribution of nHits for all strips";
376  if (i != 0)
377  histoTitle += " in " + subDetName[i];
378  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 10000, -0.5, 9999.5);
379  projYNHitsVsStripNumber.push_back(tmp->getTH1F());
380  projYNHitsVsStripNumber[i]->GetXaxis()->SetTitle("N_{hits}");
381  projYNHitsVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
382 
383  //
384  histoName = "nHitsHotStripsVsStripNumber" + subDetName[i];
385  histoTitle = "NHits in hot strips vs. strip number";
386  if (i != 0)
387  histoTitle += " in " + subDetName[i];
388  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 10000, -0.5, 9999.5);
390 
391  histoName = "pfxNHitsHotStripsVsStripNumber" + subDetName[i];
392  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
395 
396  histoName = "projXNHitsHotStripsVsStripNumber" + subDetName[i];
397  histoTitle = "Cumulative nHits in hot strips vs. strip number";
398  if (i != 0)
399  histoTitle += " in " + subDetName[i];
400  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
402 
403  histoName = "projYNHitsHotStripsVsStripNumber" + subDetName[i];
404  histoTitle = "Distribution of nHits for hot strips";
405  if (i != 0)
406  histoTitle += " in " + subDetName[i];
407  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 10000, -0.5, 9999.5);
409  projYNHitsHotStripsVsStripNumber[i]->GetXaxis()->SetTitle("N_{hits}");
410  projYNHitsHotStripsVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
411 
412  //
413  histoName = "nHitsGoodStripsVsStripNumber" + subDetName[i];
414  histoTitle = "NHits in good strips vs. strip number";
415  if (i != 0)
416  histoTitle += " in " + subDetName[i];
417  tmp = dqmStore_->book2D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5, 10000, -0.5, 9999.5);
419 
420  histoName = "pfxNHitsGoodStripsVsStripNumber" + subDetName[i];
421  tmp_prof = new TProfile(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
424 
425  histoName = "projXNHitsGoodStripsVsStripNumber" + subDetName[i];
426  histoTitle = "Cumulative nHits in good strips vs. strip number";
427  if (i != 0)
428  histoTitle += " in " + subDetName[i];
429  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 768, 0.5, 768.5);
431 
432  histoName = "projYNHitsGoodStripsVsStripNumber" + subDetName[i];
433  histoTitle = "Distribution of nHits for good strips";
434  if (i != 0)
435  histoTitle += " in " + subDetName[i];
436  tmp = dqmStore_->book1D(histoName.c_str(), histoTitle.c_str(), 10000, -0.5, 9999.5);
438  projYNHitsGoodStripsVsStripNumber[i]->GetXaxis()->SetTitle("N_{hits}");
439  projYNHitsGoodStripsVsStripNumber[i]->GetYaxis()->SetTitle("N_{strips}");
440  }
441 }
442 
443 // ------------ method called once each job just after ending the event loop ------------
445  infile = new TFile(infilename.c_str(), "READ");
446  intree = (TTree*)infile->Get("stripOccupancy");
447 
448  intree->SetBranchAddress("DetRawId", &DetRawId);
449  intree->SetBranchAddress("SubDetId", &SubDetId);
450  intree->SetBranchAddress("Layer_Ring", &Layer_Ring);
451  intree->SetBranchAddress("Disc", &Disc);
452  intree->SetBranchAddress("IsBack", &IsBack);
453  intree->SetBranchAddress("IsExternalString", &IsExternalString);
454  intree->SetBranchAddress("IsZMinusSide", &IsZMinusSide);
455  intree->SetBranchAddress("RodStringPetal", &RodStringPetal);
456  intree->SetBranchAddress("IsStereo", &IsStereo);
457  intree->SetBranchAddress("ModulePosition", &ModulePosition);
458  intree->SetBranchAddress("NumberOfStrips", &NumberOfStrips);
459  intree->SetBranchAddress("StripNumber", &StripNumber);
460  intree->SetBranchAddress("APVChannel", &APVChannel);
461  intree->SetBranchAddress("StripGlobalPositionX", &StripGlobalPositionX);
462  intree->SetBranchAddress("StripGlobalPositionY", &StripGlobalPositionY);
463  intree->SetBranchAddress("StripGlobalPositionZ", &StripGlobalPositionZ);
464  intree->SetBranchAddress("IsHot", &IsHot);
465  intree->SetBranchAddress("HotStripsPerAPV", &HotStripsPerAPV);
466  intree->SetBranchAddress("HotStripsPerModule", &HotStripsPerModule);
467  intree->SetBranchAddress("StripOccupancy", &StripOccupancy);
468  intree->SetBranchAddress("StripHits", &StripHits);
469  intree->SetBranchAddress("PoissonProb", &PoissonProb);
470 
471  for (int i = 0; i < intree->GetEntries(); /* */) {
472  intree->GetEntry(i);
473 
475  firstEntry = i;
478  vHotStripsInModule.clear();
479 
480  for (int j = firstEntry; j < firstEntry + savedNStrips; j++) {
481  intree->GetEntry(j);
482 
483  if (DetRawId != savedDetRawId) {
484  std::cout << "ERROR! DetRawId changed but I expected to be on the same module!\n";
485  return;
486  }
487 
488  double logStripOccupancy = log10(StripOccupancy);
489  double logPoissonProb = log10(fabs(PoissonProb));
490 
491  (nReadStrips[StripNumber - 1][0])++;
492  (nReadStrips[StripNumber - 1][SubDetId - 2])++;
493  //std::cout << "StripNumber = " << StripNumber << ", SubDetId = " << SubDetId << ", nReadStripsAll = " << nReadStrips[StripNumber-1][0] << ", nReadStripsSubDet = " << nReadStrips[StripNumber-1][SubDetId-2] << std::endl;
494  occupancyVsStripNumber[0]->Fill(StripNumber, logStripOccupancy);
495  occupancyVsStripNumber[SubDetId - 2]->Fill(StripNumber, logStripOccupancy);
496  poissonProbVsStripNumber[0]->Fill(StripNumber, logPoissonProb);
497  poissonProbVsStripNumber[SubDetId - 2]->Fill(StripNumber, logPoissonProb);
500 
501  if (IsHot) {
502  vHotStripsInModule.push_back(StripNumber);
503  // std::cout << "detId = " << DetRawId << ", StripN = " << StripNumber << ", StripOccupancy = " << StripOccupancy << " PoissonProb = " << PoissonProb << std::endl ;
504  occupancyHotStripsVsStripNumber[0]->Fill(StripNumber, logStripOccupancy);
505  occupancyHotStripsVsStripNumber[SubDetId - 2]->Fill(StripNumber, logStripOccupancy);
506  poissonProbHotStripsVsStripNumber[0]->Fill(StripNumber, logPoissonProb);
507  poissonProbHotStripsVsStripNumber[SubDetId - 2]->Fill(StripNumber, logPoissonProb);
510  } else {
511  occupancyGoodStripsVsStripNumber[0]->Fill(StripNumber, logStripOccupancy);
512  occupancyGoodStripsVsStripNumber[SubDetId - 2]->Fill(StripNumber, logStripOccupancy);
513  poissonProbGoodStripsVsStripNumber[0]->Fill(StripNumber, logPoissonProb);
514  poissonProbGoodStripsVsStripNumber[SubDetId - 2]->Fill(StripNumber, logPoissonProb);
517  }
518  }
519 
520  if (vHotStripsInModule.size() == 1) {
521  distance = 999;
524  } else if (vHotStripsInModule.size() > 1) {
525  for (unsigned int iVec = 0; iVec != vHotStripsInModule.size(); iVec++) {
526  if (iVec == 0)
528  else if (iVec == vHotStripsInModule.size() - 1) {
529  distance =
531  } else if (vHotStripsInModule.size() > 2) {
532  distanceR = vHotStripsInModule[iVec + 1] - vHotStripsInModule[iVec];
533  distanceL = vHotStripsInModule[iVec] - vHotStripsInModule[iVec - 1];
535  } else {
536  std::cout << "ERROR! distance is never computed!!!\n";
537  }
538  // std::cout << "detId = " << savedDetRawId << ", StripN = " << vHotStripsInModule[iVec] << ", distance = " << distance << std::endl;
541  }
542  }
543 
544  i += savedNStrips;
545  }
546 
548  std::string histoTitle;
549 
550  for (unsigned int i = 0; i < subDetName.size(); i++) {
551  projYDistanceVsStripNumber[i]->Add((TH1F*)distanceVsStripNumber[i]->ProjectionY());
553  distanceVsStripNumber[i]->ProfileX(pfxDistanceVsStripNumber[i]->GetName(), 1, 998));
554  projYNHitsVsStripNumber[i]->Add(nHitsVsStripNumber[i]->ProjectionY());
557  projYOccupancyVsStripNumber[i]->Add(occupancyVsStripNumber[i]->ProjectionY());
561  occupancyVsStripNumber[i]->ProfileX(pfxOccupancyVsStripNumber[i]->GetName(), -8., 0.));
565  occupancyHotStripsVsStripNumber[i]->ProfileX(pfxOccupancyHotStripsVsStripNumber[i]->GetName(), -8., 0.));
570  poissonProbVsStripNumber[i]->ProfileX(pfxPoissonProbVsStripNumber[i]->GetName(), -18., 0.));
576  distanceVsStripNumber[i]->ProjectionX(projXDistanceVsStripNumber[i]->GetName(), 1, 998));
577  }
578 
579  dqmStore_->cd();
580  dqmStore_->save(outfilename, "ChannelStatusPlots");
581 }
582 
583 //define this as a plug-in
std::vector< TH2F * > occupancyVsStripNumber
unsigned int nReadStrips[768][5]
std::vector< TProfile * > pfxNHitsVsStripNumber
virtual TProfile * getTProfile() const
std::vector< TH1F * > projXNHitsGoodStripsVsStripNumber
std::vector< TH2F * > poissonProbGoodStripsVsStripNumber
std::vector< TH2F * > poissonProbVsStripNumber
std::vector< TH2F * > nHitsHotStripsVsStripNumber
std::vector< TH1F * > projYPoissonProbHotStripsVsStripNumber
dqm::legacy::MonitorElement MonitorElement
std::vector< TH2F * > distanceVsStripNumber
std::vector< TProfile * > pfxNHitsGoodStripsVsStripNumber
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:656
std::vector< TProfile * > pfxPoissonProbVsStripNumber
std::vector< TH2F * > nHitsVsStripNumber
dqm::legacy::DQMStore DQMStore
std::vector< TProfile * > pfxPoissonProbGoodStripsVsStripNumber
std::vector< TH1F * > projYNHitsVsStripNumber
std::vector< TH2F * > nHitsGoodStripsVsStripNumber
std::vector< TH1F * > projXNHitsHotStripsVsStripNumber
virtual TH2F * getTH2F() const
std::vector< TH2F * > poissonProbHotStripsVsStripNumber
std::vector< TH1F * > projYNHitsHotStripsVsStripNumber
int iEvent
Definition: GenABIO.cc:224
std::vector< TH2F * > occupancyHotStripsVsStripNumber
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:408
std::vector< TH1F * > projXDistanceVsStripNumber
std::vector< TH1F * > projYPoissonProbGoodStripsVsStripNumber
std::vector< TH1F * > projYOccupancyVsStripNumber
std::vector< TH1F * > projYNHitsGoodStripsVsStripNumber
std::vector< TH1F * > projYPoissonProbVsStripNumber
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< TH1F * > projXNHitsVsStripNumber
std::vector< TProfile * > pfxNHitsHotStripsVsStripNumber
std::vector< std::string > subDetName
~StripValidationPlots() override=default
std::vector< TProfile * > pfxOccupancyHotStripsVsStripNumber
std::vector< TProfile * > pfxPoissonProbHotStripsVsStripNumber
std::vector< TProfile * > pfxDistanceVsStripNumber
std::vector< TProfile * > pfxOccupancyVsStripNumber
StripValidationPlots(const edm::ParameterSet &)
std::vector< TProfile * > pfxOccupancyGoodStripsVsStripNumber
virtual TH1F * getTH1F() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:221
void analyze(const edm::Event &, const edm::EventSetup &) override
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:824
std::ostringstream oss
std::vector< unsigned int > vHotStripsInModule
std::vector< TH1F * > projYDistanceVsStripNumber
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
std::vector< TH1F * > projYOccupancyGoodStripsVsStripNumber
std::vector< TH2F * > occupancyGoodStripsVsStripNumber
std::vector< TH1F * > projYOccupancyHotStripsVsStripNumber