CMS 3D CMS Logo

Functions
ClusMultPlots.h File Reference

Go to the source code of this file.

Functions

void ClusMultCorrPlots (const char *fullname, const char *mod, const char *label, const char *postfix, const char *shortname, const char *outtrunk)
 
void ClusMultInvestPlots (const char *fullname, const char *mod, const char *label, const char *postfix, const char *subdet, const char *shortname, const char *outtrunk)
 
void ClusMultLumiCorrPlots (const char *fullname, const char *mod, const char *label, const char *postfix, const char *subdet, const char *shortname, const char *outtrunk)
 
void ClusMultPlots (const char *fullname, const char *pxmod, const char *strpmod, const char *corrmod, const char *pxlabel, const char *strplabel, const char *corrlabel, const char *postfix, const char *shortname, const char *outtrunk)
 
void ClusMultVtxCorrPlots (const char *fullname, const char *mod, const char *label, const char *postfix, const char *subdet, const char *shortname, const char *outtrunk)
 

Function Documentation

◆ ClusMultCorrPlots()

void ClusMultCorrPlots ( const char *  fullname,
const char *  mod,
const char *  label,
const char *  postfix,
const char *  shortname,
const char *  outtrunk 
)

Definition at line 244 of file ClusMultPlots.cc.

References alignCSCRings::ff, CommonAnalyzer::getObject(), label, mod(), and AlCaHLTBitMon_QueryRunRegistry::string.

249  {
250  char modfull[300];
251  sprintf(modfull, "%s%s", mod, postfix);
252  char labfull[300];
253  sprintf(labfull, "%s%s", label, postfix);
254 
255  // char fullname[300];
256  // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename);
257 
258  TFile ff(fullname);
259 
260  gStyle->SetOptStat(111111);
261 
262  CommonAnalyzer ca(&ff, "", modfull, "");
263 
264  TH1F* rat = (TH1F*)ca.getObject("PixelOverTK");
265  if (rat) {
266  rat->Draw();
267  gPad->SetLogy(1);
268  std::string plotfilename;
269  plotfilename += outtrunk;
270  plotfilename += shortname;
271  plotfilename += "/pixelovertk";
272  plotfilename += labfull;
273  plotfilename += "_";
274  plotfilename += shortname;
275  plotfilename += ".gif";
276  gPad->Print(plotfilename.c_str());
277  delete rat;
278  gPad->SetLogy(0);
279  }
280 
281  TH2F* mult2d = (TH2F*)ca.getObject("PixelVsTK");
282  if (mult2d) {
283  mult2d->Draw("colz");
284  gPad->SetLogz(1);
285  // mult2d->GetXaxis()->SetRangeUser(0.,30000);
286  // mult2d->GetYaxis()->SetRangeUser(0.,15000);
287  std::string plotfilename;
288  plotfilename += outtrunk;
289  plotfilename += shortname;
290  plotfilename += "/pixelvstk";
291  plotfilename += labfull;
292  plotfilename += "_";
293  plotfilename += shortname;
294  plotfilename += ".gif";
295  gPad->Print(plotfilename.c_str());
296  delete mult2d;
297  gPad->SetLogz(0);
298  }
299 
300  gStyle->SetOptStat(1111);
301 
302  ff.Close();
303 }
char const * label
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4

◆ ClusMultInvestPlots()

void ClusMultInvestPlots ( const char *  fullname,
const char *  mod,
const char *  label,
const char *  postfix,
const char *  subdet,
const char *  shortname,
const char *  outtrunk 
)

Definition at line 196 of file ClusMultPlots.cc.

References alignCSCRings::ff, CommonAnalyzer::getObject(), gpuVertexFinder::hist, label, mod(), and AlCaHLTBitMon_QueryRunRegistry::string.

202  {
203  char modfull[300];
204  sprintf(modfull, "%s%s", mod, postfix);
205  char labfull[300];
206  sprintf(labfull, "%s%s", label, postfix);
207 
208  // char fullname[300];
209  // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename);
210 
211  TFile ff(fullname);
212 
213  gStyle->SetOptStat(111111);
214 
215  char subdirname[300];
216  sprintf(subdirname, "EventProcs/%s", subdet);
217  char histname[300];
218  sprintf(histname, "n%sdigi", subdet);
219 
220  CommonAnalyzer ca(&ff, "", modfull, subdirname);
221 
222  TH1F* hist = (TH1F*)ca.getObject(histname);
223  if (hist) {
224  hist->Draw();
225  gPad->SetLogy(1);
226  std::string plotfilename;
227  plotfilename += outtrunk;
228  plotfilename += shortname;
229  plotfilename += "/";
230  plotfilename += subdet;
231  plotfilename += labfull;
232  plotfilename += "_";
233  plotfilename += shortname;
234  plotfilename += ".gif";
235  gPad->Print(plotfilename.c_str());
236  delete hist;
237  gPad->SetLogy(0);
238  }
239  gStyle->SetOptStat(1111);
240 
241  ff.Close();
242 }
char const * label
__shared__ Hist hist
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4

◆ ClusMultLumiCorrPlots()

void ClusMultLumiCorrPlots ( const char *  fullname,
const char *  mod,
const char *  label,
const char *  postfix,
const char *  subdet,
const char *  shortname,
const char *  outtrunk 
)

Definition at line 376 of file ClusMultPlots.cc.

References gather_cfg::cout, alignCSCRings::ff, CommonAnalyzer::getObject(), label, mod(), and AlCaHLTBitMon_QueryRunRegistry::string.

382  {
383  char modfull[300];
384  sprintf(modfull, "%s%s", mod, postfix);
385  char labfull[300];
386  sprintf(labfull, "%s%s", label, postfix);
387 
388  // char fullname[300];
389  // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename);
390 
391  TFile ff(fullname);
392 
393  gStyle->SetOptStat(111111);
394 
395  char subdirname[300];
396  sprintf(subdirname, "LumiCorr/%s", subdet);
397  char histname[300];
398  sprintf(histname, "n%sdigivslumi", subdet);
399  char profname[300];
400  sprintf(profname, "n%sdigivslumiprof", subdet);
401 
402  CommonAnalyzer ca(&ff, "", modfull, subdirname);
403 
404  TH2F* histlumi = (TH2F*)ca.getObject(histname);
405  if (histlumi) {
406  histlumi->Draw("colz");
407  // TProfile* histlumiprof = histlumi->ProfileY("prof",1,-1,"");
408  TProfile* histlumiprof = nullptr;
409  histlumiprof = (TProfile*)ca.getObject(profname);
410  if (histlumiprof == nullptr) {
411  std::cout << "TProfile " << profname << " missing!" << std::endl;
412  histlumiprof = histlumi->ProfileX("prof", 1, -1, "");
413  }
414  histlumiprof->SetMarkerStyle(20);
415  histlumiprof->SetMarkerSize(.4);
416  /*
417  TGraph tmp;
418  for(unsigned bin=1;bin<histlumiprof->GetNbinsX()+1;++bin) {
419  // tmp.SetPoint(tmp.GetN(),histlumiprof->GetBinContent(bin),histlumiprof->GetBinCenter(bin));
420  tmp.SetPoint(tmp.GetN(),histlumiprof->GetBinCenter(bin),histlumiprof->GetBinContent(bin));
421  }
422  tmp.SetMarkerStyle(20);
423  tmp.Draw("p");
424  */
425  histlumiprof->Draw("esame");
426  gPad->SetLogz(1);
427  std::string plotfilename;
428  plotfilename += outtrunk;
429  plotfilename += shortname;
430  plotfilename += "/";
431  plotfilename += subdet;
432  plotfilename += "lumi";
433  plotfilename += labfull;
434  plotfilename += "_";
435  plotfilename += shortname;
436  plotfilename += ".gif";
437  gPad->Print(plotfilename.c_str());
438  delete histlumi;
439  gPad->SetLogz(0);
440  }
441 
442  gStyle->SetOptStat(1111);
443 
444  ff.Close();
445 }
char const * label
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4

◆ ClusMultPlots()

void ClusMultPlots ( const char *  fullname,
const char *  pxmod,
const char *  strpmod,
const char *  corrmod,
const char *  pxlabel,
const char *  strplabel,
const char *  corrlabel,
const char *  postfix,
const char *  shortname,
const char *  outtrunk 
)

Definition at line 17 of file ClusMultPlots.cc.

References alignCSCRings::ff, CommonAnalyzer::getObject(), muonClassificationByHits_cfi::pixel, CommonAnalyzer::setPath(), and AlCaHLTBitMon_QueryRunRegistry::string.

26  {
27  char pxmodfull[300];
28  sprintf(pxmodfull, "%s%s", pxmod, postfix);
29  char pxlabfull[300];
30  sprintf(pxlabfull, "%s%s", pxlabel, postfix);
31 
32  char strpmodfull[300];
33  sprintf(strpmodfull, "%s%s", strpmod, postfix);
34  char strplabfull[300];
35  sprintf(strplabfull, "%s%s", strplabel, postfix);
36 
37  char corrmodfull[300];
38  sprintf(corrmodfull, "%s%s", corrmod, postfix);
39  char corrlabfull[300];
40  sprintf(corrlabfull, "%s%s", corrlabel, postfix);
41 
42  // char fullname[300];
43  // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename);
44 
45  TFile ff(fullname);
46 
47  gStyle->SetOptStat(111111);
48 
49  CommonAnalyzer capixel(&ff, "", pxmodfull, "EventProcs/Pixel");
50 
51  TH1F* pixel = (TH1F*)capixel.getObject("nPixeldigi");
52  if (pixel) {
53  pixel->Draw();
54  gPad->SetLogy(1);
55  std::string plotfilename;
56  plotfilename += outtrunk;
57  plotfilename += shortname;
58  plotfilename += "/pixel";
59  plotfilename += pxlabfull;
60  plotfilename += "_";
61  plotfilename += shortname;
62  plotfilename += ".gif";
63  gPad->Print(plotfilename.c_str());
64  delete pixel;
65  gPad->SetLogy(0);
66  }
67 
68  capixel.setPath("VtxCorr/Pixel");
69 
70  TH2F* pixelvtx = (TH2F*)capixel.getObject("nPixeldigivsnvtx");
71  if (pixelvtx) {
72  pixelvtx->Draw("colz");
73  // TProfile* pixelvtxprof = pixelvtx->ProfileY("prof",1,-1,"");
74  TProfile* pixelvtxprof = pixelvtx->ProfileX("prof", 1, -1, "");
75  pixelvtxprof->SetMarkerStyle(20);
76  pixelvtxprof->SetMarkerSize(.4);
77  /*
78  TGraph tmp;
79  for(unsigned bin=1;bin<pixelvtxprof->GetNbinsX()+1;++bin) {
80  // tmp.SetPoint(tmp.GetN(),pixelvtxprof->GetBinContent(bin),pixelvtxprof->GetBinCenter(bin));
81  tmp.SetPoint(tmp.GetN(),pixelvtxprof->GetBinCenter(bin),pixelvtxprof->GetBinContent(bin));
82  }
83  tmp.SetMarkerStyle(20);
84  tmp.Draw("p");
85  */
86  pixelvtxprof->Draw("esame");
87  gPad->SetLogz(1);
88  std::string plotfilename;
89  plotfilename += outtrunk;
90  plotfilename += shortname;
91  plotfilename += "/pixelvtx";
92  plotfilename += pxlabfull;
93  plotfilename += "_";
94  plotfilename += shortname;
95  plotfilename += ".gif";
96  gPad->Print(plotfilename.c_str());
97  delete pixelvtx;
98  gPad->SetLogz(0);
99  }
100 
101  CommonAnalyzer castrip(&ff, "", strpmodfull, "EventProcs/TK");
102 
103  TH1F* tk = (TH1F*)castrip.getObject("nTKdigi");
104  if (tk) {
105  tk->Draw();
106  gPad->SetLogy(1);
107  std::string plotfilename;
108  plotfilename += outtrunk;
109  plotfilename += shortname;
110  plotfilename += "/tk";
111  plotfilename += strplabfull;
112  plotfilename += "_";
113  plotfilename += shortname;
114  plotfilename += ".gif";
115  gPad->Print(plotfilename.c_str());
116  delete tk;
117  gPad->SetLogy(0);
118  }
119 
120  castrip.setPath("VtxCorr/TK");
121 
122  TH2F* tkvtx = (TH2F*)castrip.getObject("nTKdigivsnvtx");
123  if (tkvtx) {
124  tkvtx->Draw("colz");
125  // TProfile* tkvtxprof = tkvtx->ProfileY("prof2",1,-1,"");
126  TProfile* tkvtxprof = tkvtx->ProfileX("prof2", 1, -1, "");
127  tkvtxprof->SetMarkerStyle(20);
128  tkvtxprof->SetMarkerSize(.4);
129  /*
130  cout << tkvtxprof->GetNbinsX() << " " << tkvtxprof->GetSize() << " " << tkvtxprof->GetXaxis()->GetXbins()->GetSize() << endl;
131  TGraph tmp;
132  for(unsigned bin=1;bin<tkvtxprof->GetNbinsX()+1;++bin) {
133  tmp.SetPoint(tmp.GetN(),tkvtxprof->GetBinContent(bin),tkvtxprof->GetBinCenter(bin));
134  }
135  tmp.SetMarkerStyle(20);
136  tmp.Draw("p");
137  */
138  tkvtxprof->Draw("esame");
139  gPad->SetLogz(1);
140  std::string plotfilename;
141  plotfilename += outtrunk;
142  plotfilename += shortname;
143  plotfilename += "/tkvtx";
144  plotfilename += strplabfull;
145  plotfilename += "_";
146  plotfilename += shortname;
147  plotfilename += ".gif";
148  gPad->Print(plotfilename.c_str());
149  delete tkvtx;
150  gPad->SetLogz(0);
151  }
152 
153  CommonAnalyzer cacorr(&ff, "", corrmodfull, "");
154 
155  TH1F* rat = (TH1F*)cacorr.getObject("PixelOverTK");
156  if (rat) {
157  rat->Draw();
158  gPad->SetLogy(1);
159  std::string plotfilename;
160  plotfilename += outtrunk;
161  plotfilename += shortname;
162  plotfilename += "/pixelovertk";
163  plotfilename += corrlabfull;
164  plotfilename += "_";
165  plotfilename += shortname;
166  plotfilename += ".gif";
167  gPad->Print(plotfilename.c_str());
168  delete rat;
169  gPad->SetLogy(0);
170  }
171 
172  TH2F* mult2d = (TH2F*)cacorr.getObject("PixelVsTK");
173  if (mult2d) {
174  mult2d->Draw("colz");
175  gPad->SetLogz(1);
176  // mult2d->GetXaxis()->SetRangeUser(0.,30000);
177  // mult2d->GetYaxis()->SetRangeUser(0.,15000);
178  std::string plotfilename;
179  plotfilename += outtrunk;
180  plotfilename += shortname;
181  plotfilename += "/pixelvstk";
182  plotfilename += corrlabfull;
183  plotfilename += "_";
184  plotfilename += shortname;
185  plotfilename += ".gif";
186  gPad->Print(plotfilename.c_str());
187  delete mult2d;
188  gPad->SetLogz(0);
189  }
190 
191  gStyle->SetOptStat(1111);
192 
193  ff.Close();
194 }

◆ ClusMultVtxCorrPlots()

void ClusMultVtxCorrPlots ( const char *  fullname,
const char *  mod,
const char *  label,
const char *  postfix,
const char *  subdet,
const char *  shortname,
const char *  outtrunk 
)

Definition at line 305 of file ClusMultPlots.cc.

References gather_cfg::cout, alignCSCRings::ff, CommonAnalyzer::getObject(), label, mod(), and AlCaHLTBitMon_QueryRunRegistry::string.

311  {
312  char modfull[300];
313  sprintf(modfull, "%s%s", mod, postfix);
314  char labfull[300];
315  sprintf(labfull, "%s%s", label, postfix);
316 
317  // char fullname[300];
318  // sprintf(fullname,"rootfiles/Tracking_PFG_%s.root",filename);
319 
320  TFile ff(fullname);
321 
322  gStyle->SetOptStat(111111);
323 
324  char subdirname[300];
325  sprintf(subdirname, "VtxCorr/%s", subdet);
326  char histname[300];
327  sprintf(histname, "n%sdigivsnvtx", subdet);
328  char profname[300];
329  sprintf(profname, "n%sdigivsnvtxprof", subdet);
330 
331  CommonAnalyzer ca(&ff, "", modfull, subdirname);
332 
333  TH2F* histvtx = (TH2F*)ca.getObject(histname);
334  if (histvtx) {
335  histvtx->Draw("colz");
336  // TProfile* histvtxprof = histvtx->ProfileY("prof",1,-1,"");
337  TProfile* histvtxprof = nullptr;
338  histvtxprof = (TProfile*)ca.getObject(profname);
339  if (histvtxprof == nullptr) {
340  std::cout << "TProfile " << profname << " missing!" << std::endl;
341  histvtxprof = histvtx->ProfileX("prof", 1, -1, "");
342  }
343  histvtxprof->SetMarkerStyle(20);
344  histvtxprof->SetMarkerSize(.4);
345  /*
346  TGraph tmp;
347  for(unsigned bin=1;bin<histvtxprof->GetNbinsX()+1;++bin) {
348  // tmp.SetPoint(tmp.GetN(),histvtxprof->GetBinContent(bin),histvtxprof->GetBinCenter(bin));
349  tmp.SetPoint(tmp.GetN(),histvtxprof->GetBinCenter(bin),histvtxprof->GetBinContent(bin));
350  }
351  tmp.SetMarkerStyle(20);
352  tmp.Draw("p");
353  */
354  histvtxprof->Draw("esame");
355  gPad->SetLogz(1);
356  std::string plotfilename;
357  plotfilename += outtrunk;
358  plotfilename += shortname;
359  plotfilename += "/";
360  plotfilename += subdet;
361  plotfilename += "vtx";
362  plotfilename += labfull;
363  plotfilename += "_";
364  plotfilename += shortname;
365  plotfilename += ".gif";
366  gPad->Print(plotfilename.c_str());
367  delete histvtx;
368  gPad->SetLogz(0);
369  }
370 
371  gStyle->SetOptStat(1111);
372 
373  ff.Close();
374 }
char const * label
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4