CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DiagMaker.cc
Go to the documentation of this file.
1 // A comparison analyzer which analyzes the //
3 // output of two emulators, each of which perform //
4 // trackfinding for the upgrades endcap muon //
5 // trackfinder. Graphical and text comparions //
6 // are done. //
7 // //
8 // Author: G. Brown (UF) //
9 // //
11 #include <memory>
12 #include <map>
13 
14 #include <stdio.h>
15 #include <stdlib.h>
16 #include "Riostream.h"
17 
23 
26 #include "L1Trigger/L1TMuonEndCap/interface/SubsystemCollectorFactory.h"
27 
30 #include <TMath.h>
31 #include <TCanvas.h>
32 #include <TLorentzVector.h>
33 
34 #include "TTree.h"
35 #include "TNtuple.h"
36 #include "TImage.h"
37 #include "TSystem.h"
38 
39 #include <TStyle.h>
40 #include <TLegend.h>
41 #include <TF1.h>
42 #include <TH2.h>
43 #include <TH1F.h>
44 #include <TFile.h>
45 #include "L1Trigger/L1TMuonEndCap/interface/GeometryTranslator.h"
46 
47 #include "L1Trigger/L1TMuonEndCap/interface/MuonTriggerPrimitive.h"
48 #include "L1Trigger/L1TMuonEndCap/interface/MuonTriggerPrimitiveFwd.h"
49 
53 
54 #include "TFile.h"
55 #include "TH1.h"
57 
58 #include <vector>
59 #include <iostream>
63 
64 #include "TGaxis.h"
65 #include "TCanvas.h"
66 #include "TGraphErrors.h"
67 #include "string.h"
68 
69 using namespace L1TMuon;
70 using namespace edm;
71 using namespace reco;
72 using namespace std;
73 
75 
76 
77 class WordHist
78 {
79  public:
80  WordHist(string theVarName,int theNBits, double theXCornerVal, double theYCornerVal);
81  void setPad();
82  bool fillWord(int, int);
83  void formatWordHist();
84  TPad *pad;
85  private:
86  string varName;
87  const int nBits;
88  double xCornerVal; // x value of bottom-left corner of pad
89  double yCornerVal; // y value of the bottom-left corner of pad
90  int lineColor;
91  int fillColor;
92  double tPadLength;
93  double tPadHeight;
94  double leftMargin;
95  double rightMargin;
98  //TPad *pad;
99  TH2F *hist;
100 
101  // Private member functions
102  void setFormatValues();
103 };
104 
105 
107 {
108  public:
109  DiagMaker(const PSet&);
110  void analyze(const edm::Event&, const edm::EventSetup&);
111  void beginJob();
112  void endJob();
114  int evCntr;
115  private:
116  TCanvas *c1, *c2;
117 
133  WordHist *wordPHD1, *wordPHD2;
134  WordHist *wordTHD1, *wordTHD2;
135 
136 };
137 
138 
139 void formatHist(TH2F* hist, string histTitle, int nXBins, int xLow, int xHigh, string xTitle,
140  int nYBins, int yLow, int yHigh, string yTitle);
141 void pad2png(TH2F *h, string imgName);
142 
143 
145 {
146 evCntr = 0;
147 
148 }
149 
150 
152 {
153 
154 
155  cout<<"Begin DiagMaker Analyzer:::::::::::::::::::::::::::::::::::::\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n\n";
156 
157  cout << "Reached analyze part of DiagMaker.\n";
158 
161 
162  ev.getByLabel( "sptf" , "EmuITC" , emuITC );
163  ev.getByLabel( "L1TMuonTrkFinder" , "DataITC" , dataITC );
164 
165  int trknmbData, validData, qualityData, keywireData, stripData, patternData;
166  int bendData, bxData, mpclinkData, bx0Data, syncErrData, cscIDData;
167  int trknmbEmu, validEmu, qualityEmu, keywireEmu, stripEmu, patternEmu;
168  int bendEmu, bxEmu, mpclinkEmu, bx0Emu, syncErrEmu, cscIDEmu;
169 
170  auto itEmu = emuITC->cbegin();
171  auto itendEmu = emuITC->cend();
172 
173  auto itData = dataITC->cbegin();
174  auto itendData = dataITC->cend();
175  int trkCntr = 0;
176  // Loop over all tracks in the collection
177  for( ; (itEmu != itendEmu) && (itData != itendData) ; ++itEmu, ++itData)
178  {
179  trkCntr++;
180  cout << "TRACK(Emu) " << trkCntr << " Phi: " << itEmu->phi << ", Theta: " << itEmu ->theta << endl;
181  cout << "TRACK(Data) " << trkCntr << " Phi: " << itData->phi << ", Theta: " << itData->theta << endl;
182  cout << "Track(Emu) " << trkCntr << " Rank: " << itEmu->rank << endl;
183  cout << "Track(Data) " << trkCntr << " Rank: " << itData->rank<< endl;
184  cout << "Emu:\n dp1- "<<itEmu->deltas[0][0]<<" dp2- "<<itEmu->deltas[0][1]<<" dt1- "<<itEmu->deltas[1][0]<<" dt2- "<<itEmu->deltas[1][1]<<endl;
185  cout << "Data:\n dp1- "<<itData->deltas[0][0]<<" dp2- "<<itData->deltas[0][1]<<" dt1- "<<itData->deltas[1][0]<<" dt2- "<<itData->deltas[1][1]<<endl;
186 
187  wordTrkPhi -> fillWord( itData->phi , itEmu->phi );
188  wordTrkTheta -> fillWord( itData->theta , itEmu->theta );
189  wordRank -> fillWord( itData->rank , itEmu->rank );
190  wordPHD1 -> fillWord( fabs(itData->deltas[0][0]) , fabs(itEmu->deltas[0][0]));
191  wordPHD2 -> fillWord( fabs(itData->deltas[0][1]) , fabs(itEmu->deltas[0][1]));
192  wordTHD1 -> fillWord( fabs(itData->deltas[1][0]) , fabs(itEmu->deltas[1][0]));
193  wordTHD2 -> fillWord( fabs(itData->deltas[1][1]) , fabs(itEmu->deltas[1][1]));
194 
195  if(itData->phi != itEmu->phi){std::cout<<"Track Phi Mismatch\n\n";}
196  if(itData->theta != itEmu->theta){std::cout<<"Track Theta Mismatch\n\n";}
197  if(itData->rank != itEmu->rank){std::cout<<"Track Rank Mismatch\n\n";}
198  if(fabs(itData->deltas[0][0]) != fabs(itEmu->deltas[0][0])){std::cout<<"00 D Mismatch\n";}
199  if(fabs(itData->deltas[0][1]) != fabs(itEmu->deltas[0][1])){std::cout<<"01 D Mismatch\n";}
200  if(fabs(itData->deltas[1][0]) != fabs(itEmu->deltas[1][0])){std::cout<<"10 D Mismatch\n";}
201  if(fabs(itData->deltas[1][1]) != fabs(itEmu->deltas[1][1])){std::cout<<"11 D Mismatch\n";}
202 
203 
204 
205 
206 
207  // Creating station maps for this track
208  TriggerPrimitiveStationMap tpsmData = itData->getStubs();
209  TriggerPrimitiveStationMap tpsmEmu = itEmu->getStubs();
210 
211  // Getting the unique station ID number for ME1
212  const unsigned id = 4*L1TMuon::InternalTrack::kCSC;
213 
214  // Looping over all four stations
215  for(unsigned meNum=id; meNum<(id+4); meNum++)
216  {
217  // Getting the trig prim lists for this station
218  //TriggerPrimitiveList tplData = tpsmData[meNum];
219  //TriggerPrimitiveList tplEmu = tpsmEmu[meNum];
220  std::vector<TriggerPrimitive> tplData = tpsmData[meNum];
221  std::vector<TriggerPrimitive> tplEmu = tpsmEmu[meNum];
222 
223  cout << "ME " << meNum-id+1 << " - # Trig Prims = " << tplData.size() << endl;
224 
225  // Looping over all the trigger primitives in the lists
226  for(unsigned tpNum = 0; (tpNum < tplData.size()) && (tpNum < tplEmu.size()) ; tpNum++)
227  {
228  cout << " ----- tp #" << tpNum << endl;
229  // Creating references to the trig prim info
230  TriggerPrimitive tprData = tplData.at(tpNum);
231  TriggerPrimitive tprEmu = tplEmu.at(tpNum);
232 
233  trknmbData = (tprData).getCSCData().trknmb;
234  validData = (tprData).getCSCData().valid;
235  qualityData = (tprData).getCSCData().quality;
236  keywireData = (tprData).getCSCData().keywire;
237  stripData = (tprData).getCSCData().strip;
238  patternData = (tprData).getCSCData().pattern;
239  bendData = (tprData).getCSCData().bend;
240  bxData = (tprData).getCSCData().bx;
241  mpclinkData = (tprData).getCSCData().mpclink;
242  bx0Data = (tprData).getCSCData().bx0;
243  syncErrData = (tprData).getCSCData().syncErr;
244  cscIDData = (tprData).getCSCData().cscID;
245 
246  trknmbEmu = (tprEmu).getCSCData().trknmb;
247  validEmu = (tprEmu).getCSCData().valid;
248  qualityEmu = (tprEmu).getCSCData().quality;
249  keywireEmu = (tprEmu).getCSCData().keywire;
250  stripEmu = (tprEmu).getCSCData().strip;
251  patternEmu = (tprEmu).getCSCData().pattern;
252  bendEmu = (tprEmu).getCSCData().bend;
253  bxEmu = (tprEmu).getCSCData().bx;
254  mpclinkEmu = (tprEmu).getCSCData().mpclink;
255  bx0Emu = (tprEmu).getCSCData().bx0;
256  syncErrEmu = (tprEmu).getCSCData().syncErr;
257  cscIDEmu = (tprEmu).getCSCData().cscID;
258 
259  cout << "trknmb: " << "data=" << trknmbData << ", emu=" << trknmbEmu << endl;
260  cout << "valid: " << "data=" << validData << ", emu=" << validEmu << endl;
261  cout << "quality: " << "data=" << qualityData << ", emu=" << qualityEmu << endl;
262  cout << "keywire: " << "data=" << keywireData << ", emu=" << keywireEmu << endl;
263  cout << "strip: " << "data=" << stripData << ", emu=" << stripEmu << endl;
264  cout << "pattern: " << "data=" << patternData << ", emu=" << patternEmu << endl;
265  cout << "bend: " << "data=" << bendData << ", emu=" << bendEmu << endl;
266  cout << "bx: " << "data=" << bxData << ", emu=" << bxEmu << endl;
267  cout << "mpclink: " << "data=" << mpclinkData << ", emu=" << mpclinkEmu << endl;
268  cout << "bx0: " << "data=" << bx0Data << ", emu=" << bx0Emu << endl;
269  cout << "syncErr: " << "data=" << syncErrData << ", emu=" << syncErrEmu << endl;
270  cout << "cscID: " << "data=" << cscIDData << ", emu=" << cscIDEmu << endl;
271  cout << "--------------------------------\n";
272 
273  // Filling the word histograms
274  wordTrknmb -> fillWord( trknmbData , trknmbEmu );
275  wordValid -> fillWord( validData , validEmu );
276  wordQuality -> fillWord( qualityData , qualityEmu );
277  wordKeywire -> fillWord( keywireData , keywireEmu );
278  wordStrip -> fillWord( stripData , stripEmu );
279  wordPattern -> fillWord( patternData , patternEmu );
280  wordBend -> fillWord( bendData , bendEmu );
281  wordBx -> fillWord( bxData , bxEmu );
282  wordMpclink -> fillWord( mpclinkData , mpclinkEmu );
283  wordBx0 -> fillWord( bx0Data , bx0Emu );
284  wordSyncErr -> fillWord( syncErrData , syncErrEmu );
285  wordCscID -> fillWord( cscIDData , cscIDEmu );
286 
287  if(keywireData != keywireEmu){std::cout<<"Wire Mismatch\n\n";}
288  if(stripData != stripEmu){std::cout<<"Strip Mismatch\n\n";}
289 
290 
291  }
292  }
293  }
294 
295  cout<<"End DiagMaker Analyzer:::::::::::::::::::::::::::::::::::::\n:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n\n";
296 
297 }
298 
299 
301 {
302 
303 
304 
305 
306  // Constructing all the word objects
307  c1 = new TCanvas();
308  c1 -> cd();
309 
310  wordTrkPhi = new WordHist( "Phi" , 12 , 0 , 0 );
311  c1 -> cd();
312  wordTrkTheta = new WordHist( "Theta" , 6 , 0 , 0.2 );
313  c1 -> cd();
314  wordTrknmb = new WordHist( "Phhit" , 6 , 0 , 0.4 );
315  c1 -> cd();
316  wordValid = new WordHist( "Valid" , 12 , 0 , 0.6 );
317  c1 -> cd();
318  wordQuality = new WordHist( "Quality" , 7 , 0 , 0.8 );
319  c1 -> cd();
320  wordKeywire = new WordHist( "Keywire" , 12 , 0.5 , 0 );
321  c1 -> cd();
322  wordStrip = new WordHist( "Strip" , 7 , 0.5 , 0.2 );
323  c1 -> cd();
324  wordPattern = new WordHist( "Pattern" , 12 , 0.5 , 0.4 );
325  c1 -> cd();
326  wordBend = new WordHist( "Bend" , 12 , 0.5 , 0.6 );
327  c1 -> cd();
328  wordBx = new WordHist( "Bx" , 12 , 0.5 , 0.8 );
329 
330  c2 = new TCanvas();
331  c2 -> cd();
332  wordMpclink = new WordHist( "Mpclink" , 12 , 0 , 0 );
333  c2 -> cd();
334  wordBx0 = new WordHist( "Bx" , 12 , 0 , 0.2 );
335  c2 -> cd();
336  wordSyncErr = new WordHist( "SyncErr" , 12 , 0 , 0.4 );
337  c2 -> cd();
338  wordCscID = new WordHist( "CscID" , 12 , 0 , 0.6 );
339  c2 -> cd();
340  wordRank = new WordHist( "Rank" , 12 , 0.5 , 0 );
341  c2 -> cd();
342  wordPHD1 = new WordHist( "PHD1" , 12 , 0.5 , 0.2 );
343  c2 ->cd();
344  wordPHD2 = new WordHist( "PHD2" , 12 , 0.5 , 0.4 );
345  c2 ->cd();
346  wordTHD1 = new WordHist( "THD1" , 12 , 0.5 , 0.6 );
347  c2 ->cd();
348  wordTHD2 = new WordHist( "THD2" , 12 , 0.5 , 0.8 );
349 
350 }
351 
353 {
354 
355  c1 -> cd();
356 
357  wordTrkPhi -> pad -> cd();
358  wordTrkPhi -> formatWordHist();
359  wordTrkTheta -> pad -> cd();
360  wordTrkTheta -> formatWordHist();
361  wordTrknmb -> pad -> cd();
362  wordTrknmb -> formatWordHist();
363  wordValid -> pad -> cd();
364  wordValid -> formatWordHist();
365  wordQuality -> pad -> cd();
366  wordQuality -> formatWordHist();
367  wordKeywire -> pad -> cd();
368  wordKeywire -> formatWordHist();
369  wordStrip -> pad -> cd();
370  wordStrip -> formatWordHist();
371  wordPattern -> pad -> cd();
372  wordPattern -> formatWordHist();
373  wordBend -> pad -> cd();
374  wordBend -> formatWordHist();
375  wordBx -> pad -> cd();
376  wordBx -> formatWordHist();
377 
378  gSystem->ProcessEvents();
379  TImage *img1 = TImage::Create();
380  img1 -> FromPad(c1);
381  img1 -> WriteImage("wordHist1.png");
382  delete c1;
383  delete img1;
384 
385  c2 -> cd();
386 
387  wordMpclink -> pad -> cd();
388  wordMpclink -> formatWordHist();
389  wordBx0 -> pad -> cd();
390  wordBx0 -> formatWordHist();
391  wordSyncErr -> pad -> cd();
392  wordSyncErr -> formatWordHist();
393  wordCscID -> pad -> cd();
394  wordCscID -> formatWordHist();
395  wordRank -> pad -> cd();
396  wordRank -> formatWordHist();
397  wordPHD1 -> pad -> cd();
398  wordPHD1 -> formatWordHist();
399  wordPHD2 -> pad -> cd();
400  wordPHD2 -> formatWordHist();
401  wordTHD1 -> pad -> cd();
402  wordTHD1 -> formatWordHist();
403  wordTHD2 -> pad -> cd();
404  wordTHD2 -> formatWordHist();
405 
406  gSystem->ProcessEvents();
407  TImage *img2 = TImage::Create();
408  img2->FromPad(c2);
409  img2->WriteImage("wordHist2.png");
410  delete c2;
411  delete img2;
412 
413 
414 
415 }
416 
417 void formatHist(TH2F* hist, string histTitle, int nXBins, int xLow, int xHigh, string xTitle,
418  int nYBins, int yLow, int yHigh, string yTitle)
419 {
420  TAxis *xaxis = hist->GetXaxis();
421  xaxis -> SetTitle(xTitle.c_str());
422  xaxis -> CenterTitle();
423  xaxis -> SetNdivisions(nXBins,kFALSE);
424  xaxis -> SetTickLength(1.0);
425  xaxis -> CenterLabels();
426 
427  TAxis *yaxis = hist->GetYaxis();
428  yaxis -> SetTitle(yTitle.c_str());
429  yaxis -> CenterTitle();
430  yaxis -> SetNdivisions(nYBins,kFALSE);
431  yaxis -> SetTickLength(1.0);
432  yaxis -> CenterLabels();
433 
434  hist -> SetTitle(histTitle.c_str());
435  hist -> SetStats(0);
436 
437 }
438 
439 void pad2png(TH2F *h, string imgName)
440 {
441  TCanvas *c = new TCanvas;
442  h->Draw("colz");
443  gSystem->ProcessEvents();
444  TImage *img = TImage::Create();
445  img->FromPad(c);
446  img->WriteImage(imgName.c_str());
447  delete c;
448  delete img;
449 }
450 
451 
452 bool WordHist::fillWord(int wordData, int wordEmu)
453 {
454  int lowBit = -1;
455  int numBits = 0;
456  if (lowBit < 0)
457  lowBit = hist -> GetBinError(0);
458 
459  if (numBits < 1)
460  numBits = hist -> GetNbinsX();
461 
462  wordData = wordData >> lowBit;
463  wordEmu = wordEmu >> lowBit;
464 
465  int yFill;
466 
467  bool matchFlag = true;
468 
469  for (int i = 0; i < numBits; i++)
470  {
471 
472  yFill = (wordData & 0x1) - (wordEmu & 0x1);
473 
474  matchFlag |= (yFill == 0);
475 
476  hist -> Fill (numBits - i - 0.5, yFill);
477 
478  wordData = wordData >> 1;
479  wordEmu = wordEmu >> 1;
480 
481  }
482 
483  return matchFlag;
484 }
485 
486 
487 
488 // WordHist Constructor for 1D files
489 WordHist::WordHist(string theVarName, int theNBits, double theXCornerVal, double theYCornerVal) : nBits(theNBits)
490 {
491  varName = theVarName;
492  xCornerVal = theXCornerVal;
493  yCornerVal = theYCornerVal;
494  tPadHeight = 0.15;
495  lineColor = kBlack;
496  fillColor = kWhite;
497  setFormatValues();
498 
499  if(tPadLength + xCornerVal > 1.0)
500  {
501  cout << "Error: pad length is too long for x corner value.\n";
502  exit(1);
503  }
504 
506  hist = new TH2F("hist","",nBits,0,nBits,3,-1.5,1.5);
507 
508  pad -> SetFillColor(fillColor);
509  pad -> SetLineColor(lineColor);
510  pad -> SetBottomMargin(0.4);
511  pad -> SetRightMargin(rightMargin);
512  pad -> SetLeftMargin(leftMargin);
513  pad -> Draw();
514  pad -> cd();
515 
516 }
517 
519 {
521  TF1 *f1 = new TF1("f1","12-x",1,nBits+1);
522  TF1 *f2 = new TF1("f2","x",-1,2);
523 
525  hist -> SetAxisColor(lineColor);
526  hist -> SetStats(kFALSE);
527  hist -> Draw("ah col");
528 
530  TGaxis *xtick = new TGaxis(0, -1.5,nBits,-1.5,
531  "f1",nBits+1,"US");
532 
533  xtick -> SetLineWidth(2.5);
534  xtick -> SetTickSize(0.12);
535  xtick -> Draw("same");
536 
538  TGaxis *xaxis = new TGaxis(-1, -1.5,nBits-1,-1.5,
539  "f1",nBits+1,"MNIBS");
540 
541  xaxis -> SetTickSize(0);
542  xaxis -> SetLabelSize(0.14);
543  xaxis -> SetLabelColor(lineColor);
544 
545  if(nBits > 3) xaxis -> SetTitle((varName + " word bit").c_str());
546  if(nBits == 3) xaxis -> SetTitle((" " + varName + " word bit").c_str());
547  if(nBits == 2) xaxis -> SetTitle((" " + varName + " word bit").c_str());
548  if(nBits == 1) xaxis -> SetTitle((" " + varName + " word bit").c_str());
549 
550  xaxis -> SetTitleColor(lineColor);
551  xaxis -> SetTitleSize(0.16);
552  xaxis -> CenterTitle();
553 
554  xaxis -> Draw("same");
555 
557  TGaxis *yaxis = new TGaxis(0, -1.5,0,1.5,
558  "f2",4,"MNI");
559 
560  yaxis -> SetTickSize(-1);
561 
562  yaxis -> SetLabelColor(lineColor);
563  yaxis -> SetLineWidth(2.5);
564  yaxis -> SetLabelSize(0.14);
565  yaxis -> SetLabelOffset(yaxisLabelOffset);
566 
567  yaxis -> SetTitle("data - emul");
568  yaxis -> SetTitleColor(lineColor);
569  yaxis -> SetTitleSize(0.15);
570  yaxis -> SetTitleOffset(yaxisTitleOffset);
571 
572  yaxis -> Draw("same");
573 
575  TGaxis *xtop = new TGaxis(0,1.5,nBits,1.5,"f1",nBits+1,"US-");
576  xtop -> SetLineColor(lineColor);
577  xtop -> SetTickSize(0.12);
578  xtop -> SetLineWidth(2.5);
579  xtop -> Draw("same");
580 
582  TGaxis *yright = new TGaxis(nBits,-1.5,nBits,1.5,"f2",4,"+US");
583  yright -> SetLineColor(lineColor);
584  yright -> SetLineWidth(2.5);
585  yright -> Draw("same");
586 
588  double xPoints[(nBits-1)*2];
589  double yPoints[(nBits-1)*2];
590  double ex[(nBits-1)*2];
591  double ey[(nBits-1)*2];
592 
593  for (int i = 0; i < nBits-1; i++){
594 
595  xPoints[2*i] = i+1;
596  xPoints[2*i+1] = i+1;
597 
598  yPoints[2*i] = -0.5;
599  yPoints[2*i+1] = 0.5;
600 
601  }
602 
603  for (int i = 0; i < (nBits-1)*2; i++){
604 
605  ex[i] = 0.25;
606  ey[i] = 0.25;
607  }
609  TGraphErrors *gridGraph;
610 
611  gridGraph = new TGraphErrors((nBits-1)*2, xPoints, yPoints, ex, ey);
612 
613  gridGraph -> SetLineColor(lineColor);
614  gridGraph -> SetLineWidth(0.4);
615 
616  gridGraph -> Draw("pz same");
618  //pad -> Update();
620  delete f1;
621  delete f2;
622 
623 }
624 
625 
626 
627 
629 {
630 
631  // Setting the nBits-dependent histogram format values
632  if (nBits > 3)
633  {
634  tPadLength = 0.0206*nBits + 0.046;
635  leftMargin = 1.0 / (0.5542*nBits + 1.23);
636  rightMargin = 1.0 / (2.624*nBits + 0.113);
637  yaxisTitleOffset = 1.0 / (0.1942*nBits + 0.3902);
638  yaxisLabelOffset = 1.0 / (4.0931*nBits + 1.732);
639  }
640  else
641  {
642  switch(nBits)
643  {
644  case 3:
645  {
646  tPadLength = 0.1274;
647  leftMargin = 0.292;
648  rightMargin = 0.225;
649  yaxisTitleOffset = 0.80;
650  yaxisLabelOffset = 0.05;
651  }
652  break;
653  case 2:
654  {
655  tPadLength = 0.1274;
656  leftMargin = 0.3708;
657  rightMargin = 0.3034;
658  yaxisTitleOffset = 1.0;
659  yaxisLabelOffset = 0.05;
660  }
661  break;
662  case 1:
663  {
664  tPadLength = 0.1274;
665  leftMargin = 0.4494;
666  rightMargin = 0.3820;
667  yaxisTitleOffset = 1.50;
668  yaxisLabelOffset = 0.05;
669  }
670  break;
671  }
672  }
673 }
674 
675 
678 
679 
680 
681 
682 
void formatHist(TH2F *hist, string histTitle, int nXBins, int xLow, int xHigh, string xTitle, int nYBins, int yLow, int yHigh, string yTitle)
Definition: DiagMaker.cc:417
double xCornerVal
Definition: DiagMaker.cc:88
int i
Definition: DBlmapReader.cc:9
WordHist * wordBx0
Definition: DiagMaker.cc:129
double yaxisTitleOffset
Definition: DiagMaker.cc:96
double leftMargin
Definition: DiagMaker.cc:94
double tPadHeight
Definition: DiagMaker.cc:93
WordHist * wordSyncErr
Definition: DiagMaker.cc:130
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void endJob()
Definition: DiagMaker.cc:352
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
WordHist * wordStrip
Definition: DiagMaker.cc:124
int evCntr
Definition: DiagMaker.cc:114
bool ev
const int nBits
Definition: DiagMaker.cc:87
void formatWordHist()
Definition: DiagMaker.cc:518
double yaxisLabelOffset
Definition: DiagMaker.cc:97
WordHist * wordTrknmb
Definition: DiagMaker.cc:120
void beginJob()
Definition: Breakpoints.cc:15
WordHist * wordTrkTheta
Definition: DiagMaker.cc:118
WordHist * wordCscID
Definition: DiagMaker.cc:131
void analyze(const edm::Event &, const edm::EventSetup &)
Definition: DiagMaker.cc:151
bool fillWord(int, int)
Definition: DiagMaker.cc:452
WordHist * wordMpclink
Definition: DiagMaker.cc:128
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::ParameterSet PSet
Definition: DiagMaker.cc:74
WordHist * wordBend
Definition: DiagMaker.cc:126
double tPadLength
Definition: DiagMaker.cc:92
double rightMargin
Definition: DiagMaker.cc:95
void setFormatValues()
Definition: DiagMaker.cc:628
double yCornerVal
Definition: DiagMaker.cc:89
int fillColor
Definition: DiagMaker.cc:91
WordHist * wordRank
Definition: DiagMaker.cc:132
void pad2png(TH2F *h, string imgName)
Definition: DiagMaker.cc:439
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:418
TPad * pad
Definition: DiagMaker.cc:84
int delayCount
Definition: DiagMaker.cc:113
TH2F * hist
Definition: DiagMaker.cc:99
WordHist * wordPattern
Definition: DiagMaker.cc:125
WordHist * wordKeywire
Definition: DiagMaker.cc:123
WordHist * wordBx
Definition: DiagMaker.cc:127
WordHist * wordQuality
Definition: DiagMaker.cc:122
string varName
Definition: DiagMaker.cc:86
WordHist(string theVarName, int theNBits, double theXCornerVal, double theYCornerVal)
Definition: DiagMaker.cc:489
WordHist * wordTHD2
Definition: DiagMaker.cc:134
void beginJob()
Definition: DiagMaker.cc:300
DiagMaker(const PSet &)
Definition: DiagMaker.cc:144
tuple cout
Definition: gather_cfg.py:145
TCanvas * c2
Definition: DiagMaker.cc:116
int lineColor
Definition: DiagMaker.cc:90
std::map< unsigned, TriggerPrimitiveCollection > TriggerPrimitiveStationMap
WordHist * wordPHD2
Definition: DiagMaker.cc:133
WordHist * wordTrkPhi
Definition: DiagMaker.cc:119
WordHist * wordValid
Definition: DiagMaker.cc:121