CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
rootPlot.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_Utilities_rootPlot_h
2 #define PhysicsTools_Utilities_rootPlot_h
4 #include "TF1.h"
5 #include "TH1.h"
6 #include "TCanvas.h"
8 
9 namespace root {
10  namespace helper {
11  struct PlotNoArg { };
12  }
13 
14  inline void plotTF1(const char * name, TF1 & fun0, TF1 & fun1, TH1 & histo,
15  double min, double max,
16  Color_t lineColor0 = kRed, Width_t lineWidth0 = 1,
17  Style_t lineStyle0 = kDashed, Int_t npx0 = 1000,
18  Color_t lineColor1 = kGreen, Width_t lineWidth1 = 1,
19  Style_t lineStyle1 = kDashed, Int_t npx1 = 1000,
20  const char * title = "Histo Title", const char * xTitle = "X Title",
21  const char * yTitle = "Y Title") {
22  fun0.SetLineColor(lineColor0);
23  fun0.SetLineWidth(lineWidth0);
24  fun0.SetLineStyle(lineStyle0);
25  fun0.SetNpx(npx0);
26  fun1.SetLineColor(lineColor1);
27  fun1.SetLineWidth(lineWidth1);
28  fun1.SetLineStyle(lineStyle1);
29  fun1.SetNpx(npx1);
30  TCanvas *canvas = new TCanvas("canvas");
31  histo.SetTitle(title);
32  histo.SetXTitle(xTitle);
33  histo.SetYTitle(yTitle);
34  histo.Draw("e");
35  fun0.Draw("same");
36  fun1.Draw("same");
37  std::string plotName = name;
38  canvas->SaveAs(plotName.c_str());
39  canvas->SetLogy();
40  std::string logPlotName = "log_" + plotName;
41  canvas->SaveAs(logPlotName.c_str());
42  }
43 
44  inline void plotTF1(const char * name, TF1 & fun, TH1 & histo,
45  double min, double max,
46  Color_t lineColor = kRed, Width_t lineWidth = 1,
47  Style_t lineStyle = kDashed, Int_t npx = 1000,
48  const char * title = "Histo Title", const char * xTitle = "X Title",
49  const char * yTitle = "Y Title") {
50  fun.SetLineColor(lineColor);
51  fun.SetLineWidth(lineWidth);
52  fun.SetLineStyle(lineStyle);
53  fun.SetNpx(npx);
54  TCanvas *canvas = new TCanvas("canvas");
55  histo.SetTitle(title);
56  histo.SetXTitle(xTitle);
57  histo.SetYTitle(yTitle);
58  histo.Draw("e");
59  fun.Draw("same");
60  std::string plotName = name;
61  canvas->SaveAs(plotName.c_str());
62  canvas->SetLogy();
63  std::string logPlotName = "log_" + plotName;
64  canvas->SaveAs(logPlotName.c_str());
65  }
66 
67  template<typename F>
68  void plot(const char * name, TH1 & histo, F& f, double min, double max,
69  Color_t lineColor = kRed, Width_t lineWidth = 1,
70  Style_t lineStyle = kDashed, Int_t npx = 1000,
71  const char * title = "Histo Title", const char * xTitle = "X Title",
72  const char * yTitle = "Y Title") {
73  TF1 fun = root::tf1("fun", f, min, max);
74  plotTF1(name, fun, histo, min, max,
75  lineColor, lineWidth, lineStyle, npx,
76  title, xTitle, yTitle);
77  }
78 
79  template<typename F>
80  void plot(const char * name, TH1 & histo, F& f, double min, double max,
81  const funct::Parameter & p0,
82  Color_t lineColor = kRed, Width_t lineWidth = 1,
83  Style_t lineStyle = kDashed, Int_t npx = 1000,
84  const char * title = "Histo Title", const char * xTitle = "X Title",
85  const char * yTitle = "Y Title") {
86  TF1 fun = root::tf1("fun", f, min, max, p0);
87  plotTF1(name, fun, histo, min, max,
88  lineColor, lineWidth, lineStyle, npx,
89  title, xTitle, yTitle);
90  }
91 
92  template<typename F>
93  void plot(const char * name, TH1 & histo, F& f, double min, double max,
94  const funct::Parameter & p0,
95  const funct::Parameter & p1,
96  Color_t lineColor = kRed, Width_t lineWidth = 1,
97  Style_t lineStyle = kDashed, Int_t npx = 1000,
98  const char * title = "Histo Title", const char * xTitle = "X Title",
99  const char * yTitle = "Y Title") {
100  TF1 fun = root::tf1("fun", f, min, max, p0, p1);
101  plotTF1(name, fun, histo, min, max,
102  lineColor, lineWidth, lineStyle, npx,
103  title, xTitle, yTitle);
104  }
105 
106  template<typename F>
107  void plot(const char * name, TH1 & histo, F& f, double min, double max,
108  const funct::Parameter & p0,
109  const funct::Parameter & p1,
110  const funct::Parameter & p2,
111  Color_t lineColor = kRed, Width_t lineWidth = 1,
112  Style_t lineStyle = kDashed, Int_t npx = 1000,
113  const char * title = "Histo Title", const char * xTitle = "X Title",
114  const char * yTitle = "Y Title") {
115  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2);
116  plotTF1(name, fun, histo, min, max,
117  lineColor, lineWidth, lineStyle, npx,
118  title, xTitle, yTitle);
119  }
120 
121  template<typename F>
122  void plot(const char * name, TH1 & histo, F& f, double min, double max,
123  const funct::Parameter & p0,
124  const funct::Parameter & p1,
125  const funct::Parameter & p2,
126  const funct::Parameter & p3,
127  Color_t lineColor = kRed, Width_t lineWidth = 1,
128  Style_t lineStyle = kDashed, Int_t npx = 1000,
129  const char * title = "Histo Title", const char * xTitle = "X Title",
130  const char * yTitle = "Y Title") {
131  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3);
132  plotTF1(name, fun, histo, min, max,
133  lineColor, lineWidth, lineStyle, npx,
134  title, xTitle, yTitle);
135  }
136 
137  template<typename F>
138  void plot(const char * name, TH1 & histo, F& f, double min, double max,
139  const funct::Parameter & p0,
140  const funct::Parameter & p1,
141  const funct::Parameter & p2,
142  const funct::Parameter & p3,
143  const funct::Parameter & p4,
144  Color_t lineColor = kRed, Width_t lineWidth = 1,
145  Style_t lineStyle = kDashed, Int_t npx = 1000,
146  const char * title = "Histo Title", const char * xTitle = "X Title",
147  const char * yTitle = "Y Title") {
148  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4);
149  plotTF1(name, fun, histo, min, max,
150  lineColor, lineWidth, lineStyle, npx,
151  title, xTitle, yTitle);
152  }
153 
154  template<typename F>
155  void plot(const char * name, TH1 & histo, F& f, double min, double max,
156  const funct::Parameter & p0,
157  const funct::Parameter & p1,
158  const funct::Parameter & p2,
159  const funct::Parameter & p3,
160  const funct::Parameter & p4,
161  const funct::Parameter & p5,
162  Color_t lineColor = kRed, Width_t lineWidth = 1,
163  Style_t lineStyle = kDashed, Int_t npx = 1000,
164  const char * title = "Histo Title", const char * xTitle = "X Title",
165  const char * yTitle = "Y Title") {
166  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5);
167  plotTF1(name, fun, histo, min, max,
168  lineColor, lineWidth, lineStyle, npx,
169  title, xTitle, yTitle);
170  }
171 
172  template<typename F>
173  void plot(const char * name, TH1 & histo, F& f, double min, double max,
174  const funct::Parameter & p0,
175  const funct::Parameter & p1,
176  const funct::Parameter & p2,
177  const funct::Parameter & p3,
178  const funct::Parameter & p4,
179  const funct::Parameter & p5,
180  const funct::Parameter & p6,
181  Color_t lineColor = kRed, Width_t lineWidth = 1,
182  Style_t lineStyle = kDashed, Int_t npx = 1000,
183  const char * title = "Histo Title", const char * xTitle = "X Title",
184  const char * yTitle = "Y Title") {
185  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6);
186  plotTF1(name, fun, histo, min, max,
187  lineColor, lineWidth, lineStyle, npx,
188  title, xTitle, yTitle);
189  }
190 
191  template<typename F>
192  void plot(const char * name, TH1 & histo, F& f, double min, double max,
193  const funct::Parameter & p0,
194  const funct::Parameter & p1,
195  const funct::Parameter & p2,
196  const funct::Parameter & p3,
197  const funct::Parameter & p4,
198  const funct::Parameter & p5,
199  const funct::Parameter & p6,
200  const funct::Parameter & p7,
201  Color_t lineColor = kRed, Width_t lineWidth = 1,
202  Style_t lineStyle = kDashed, Int_t npx = 1000,
203  const char * title = "Histo Title", const char * xTitle = "X Title",
204  const char * yTitle = "Y Title") {
205  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7);
206  plotTF1(name, fun, histo, min, max,
207  lineColor, lineWidth, lineStyle, npx,
208  title, xTitle, yTitle);
209  }
210 
211  template<typename F>
212  void plot(const char * name, TH1 & histo, F& f, double min, double max,
213  const funct::Parameter & p0,
214  const funct::Parameter & p1,
215  const funct::Parameter & p2,
216  const funct::Parameter & p3,
217  const funct::Parameter & p4,
218  const funct::Parameter & p5,
219  const funct::Parameter & p6,
220  const funct::Parameter & p7,
221  const funct::Parameter & p8,
222  Color_t lineColor = kRed, Width_t lineWidth = 1,
223  Style_t lineStyle = kDashed, Int_t npx = 1000,
224  const char * title = "Histo Title", const char * xTitle = "X Title",
225  const char * yTitle = "Y Title") {
226  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8);
227  plotTF1(name, fun, histo, min, max,
228  lineColor, lineWidth, lineStyle, npx,
229  title, xTitle, yTitle);
230  }
231 
232  template<typename F>
233  void plot(const char * name, TH1 & histo, F& f, double min, double max,
234  const funct::Parameter & p0,
235  const funct::Parameter & p1,
236  const funct::Parameter & p2,
237  const funct::Parameter & p3,
238  const funct::Parameter & p4,
239  const funct::Parameter & p5,
240  const funct::Parameter & p6,
241  const funct::Parameter & p7,
242  const funct::Parameter & p8,
243  const funct::Parameter & p9,
244  Color_t lineColor = kRed, Width_t lineWidth = 1,
245  Style_t lineStyle = kDashed, Int_t npx = 1000,
246  const char * title = "Histo Title", const char * xTitle = "X Title",
247  const char * yTitle = "Y Title") {
248  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
249  plotTF1(name, fun, histo, min, max,
250  lineColor, lineWidth, lineStyle, npx,
251  title, xTitle, yTitle);
252  }
253 
254  template<typename F>
255  void plot(const char * name, TH1 & histo, F& f, double min, double max,
256  const funct::Parameter & p0,
257  const funct::Parameter & p1,
258  const funct::Parameter & p2,
259  const funct::Parameter & p3,
260  const funct::Parameter & p4,
261  const funct::Parameter & p5,
262  const funct::Parameter & p6,
263  const funct::Parameter & p7,
264  const funct::Parameter & p8,
265  const funct::Parameter & p9,
266  const funct::Parameter & p10,
267  Color_t lineColor = kRed, Width_t lineWidth = 1,
268  Style_t lineStyle = kDashed, Int_t npx = 1000,
269  const char * title = "Histo Title", const char * xTitle = "X Title",
270  const char * yTitle = "Y Title") {
271  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
272  p10);
273  plotTF1(name, fun, histo, min, max,
274  lineColor, lineWidth, lineStyle, npx,
275  title, xTitle, yTitle);
276  }
277 
278  template<typename F>
279  void plot(const char * name, TH1 & histo, F& f, double min, double max,
280  const funct::Parameter & p0,
281  const funct::Parameter & p1,
282  const funct::Parameter & p2,
283  const funct::Parameter & p3,
284  const funct::Parameter & p4,
285  const funct::Parameter & p5,
286  const funct::Parameter & p6,
287  const funct::Parameter & p7,
288  const funct::Parameter & p8,
289  const funct::Parameter & p9,
290  const funct::Parameter & p10,
291  const funct::Parameter & p11,
292  Color_t lineColor = kRed, Width_t lineWidth = 1,
293  Style_t lineStyle = kDashed, Int_t npx = 1000,
294  const char * title = "Histo Title", const char * xTitle = "X Title",
295  const char * yTitle = "Y Title") {
296  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
297  p10, p11);
298  plotTF1(name, fun, histo, min, max,
299  lineColor, lineWidth, lineStyle, npx,
300  title, xTitle, yTitle);
301  }
302 
303  template<typename F>
304  void plot(const char * name, TH1 & histo, F& f, double min, double max,
305  const funct::Parameter & p0,
306  const funct::Parameter & p1,
307  const funct::Parameter & p2,
308  const funct::Parameter & p3,
309  const funct::Parameter & p4,
310  const funct::Parameter & p5,
311  const funct::Parameter & p6,
312  const funct::Parameter & p7,
313  const funct::Parameter & p8,
314  const funct::Parameter & p9,
315  const funct::Parameter & p10,
316  const funct::Parameter & p11,
317  const funct::Parameter & p12,
318  Color_t lineColor = kRed, Width_t lineWidth = 1,
319  Style_t lineStyle = kDashed, Int_t npx = 1000,
320  const char * title = "Histo Title", const char * xTitle = "X Title",
321  const char * yTitle = "Y Title") {
322  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
323  p10, p11, p12);
324  plotTF1(name, fun, histo, min, max,
325  lineColor, lineWidth, lineStyle, npx,
326  title, xTitle, yTitle);
327  }
328 
329  template<typename F>
330  void plot(const char * name, TH1 & histo, F& f, double min, double max,
331  const funct::Parameter & p0,
332  const funct::Parameter & p1,
333  const funct::Parameter & p2,
334  const funct::Parameter & p3,
335  const funct::Parameter & p4,
336  const funct::Parameter & p5,
337  const funct::Parameter & p6,
338  const funct::Parameter & p7,
339  const funct::Parameter & p8,
340  const funct::Parameter & p9,
341  const funct::Parameter & p10,
342  const funct::Parameter & p11,
343  const funct::Parameter & p12,
344  const funct::Parameter & p13,
345  Color_t lineColor = kRed, Width_t lineWidth = 1,
346  Style_t lineStyle = kDashed, Int_t npx = 1000,
347  const char * title = "Histo Title", const char * xTitle = "X Title",
348  const char * yTitle = "Y Title") {
349  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
350  p10, p11, p12, p13);
351  plotTF1(name, fun, histo, min, max,
352  lineColor, lineWidth, lineStyle, npx,
353  title, xTitle, yTitle);
354  }
355 
356  template<typename F>
357  void plot(const char * name, TH1 & histo, F& f, double min, double max,
358  const funct::Parameter & p0,
359  const funct::Parameter & p1,
360  const funct::Parameter & p2,
361  const funct::Parameter & p3,
362  const funct::Parameter & p4,
363  const funct::Parameter & p5,
364  const funct::Parameter & p6,
365  const funct::Parameter & p7,
366  const funct::Parameter & p8,
367  const funct::Parameter & p9,
368  const funct::Parameter & p10,
369  const funct::Parameter & p11,
370  const funct::Parameter & p12,
371  const funct::Parameter & p13,
372  const funct::Parameter & p14,
373  Color_t lineColor = kRed, Width_t lineWidth = 1,
374  Style_t lineStyle = kDashed, Int_t npx = 1000,
375  const char * title = "Histo Title", const char * xTitle = "X Title",
376  const char * yTitle = "Y Title") {
377  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
378  p10, p11, p12, p13, p14);
379  plotTF1(name, fun, histo, min, max,
380  lineColor, lineWidth, lineStyle, npx,
381  title, xTitle, yTitle);
382  }
383 
384  template<typename F>
385  void plot(const char * name, TH1 & histo, F& f, double min, double max,
386  const funct::Parameter & p0,
387  const funct::Parameter & p1,
388  const funct::Parameter & p2,
389  const funct::Parameter & p3,
390  const funct::Parameter & p4,
391  const funct::Parameter & p5,
392  const funct::Parameter & p6,
393  const funct::Parameter & p7,
394  const funct::Parameter & p8,
395  const funct::Parameter & p9,
396  const funct::Parameter & p10,
397  const funct::Parameter & p11,
398  const funct::Parameter & p12,
399  const funct::Parameter & p13,
400  const funct::Parameter & p14,
401  const funct::Parameter & p15,
402  Color_t lineColor = kRed, Width_t lineWidth = 1,
403  Style_t lineStyle = kDashed, Int_t npx = 1000,
404  const char * title = "Histo Title", const char * xTitle = "X Title",
405  const char * yTitle = "Y Title") {
406  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
407  p10, p11, p12, p13, p14, p15);
408  plotTF1(name, fun, histo, min, max,
409  lineColor, lineWidth, lineStyle, npx,
410  title, xTitle, yTitle);
411  }
412 
413  template<typename F>
414  void plot(const char * name, TH1 & histo, F& f, double min, double max,
415  const funct::Parameter & p0,
416  const funct::Parameter & p1,
417  const funct::Parameter & p2,
418  const funct::Parameter & p3,
419  const funct::Parameter & p4,
420  const funct::Parameter & p5,
421  const funct::Parameter & p6,
422  const funct::Parameter & p7,
423  const funct::Parameter & p8,
424  const funct::Parameter & p9,
425  const funct::Parameter & p10,
426  const funct::Parameter & p11,
427  const funct::Parameter & p12,
428  const funct::Parameter & p13,
429  const funct::Parameter & p14,
430  const funct::Parameter & p15,
431  const funct::Parameter & p16,
432  Color_t lineColor = kRed, Width_t lineWidth = 1,
433  Style_t lineStyle = kDashed, Int_t npx = 1000,
434  const char * title = "Histo Title", const char * xTitle = "X Title",
435  const char * yTitle = "Y Title") {
436  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
437  p10, p11, p12, p13, p14, p15, p16);
438  plotTF1(name, fun, histo, min, max,
439  lineColor, lineWidth, lineStyle, npx,
440  title, xTitle, yTitle);
441  }
442 
443  template<typename F>
444  void plot(const char * name, TH1 & histo, F& f, double min, double max,
445  const funct::Parameter & p0,
446  const funct::Parameter & p1,
447  const funct::Parameter & p2,
448  const funct::Parameter & p3,
449  const funct::Parameter & p4,
450  const funct::Parameter & p5,
451  const funct::Parameter & p6,
452  const funct::Parameter & p7,
453  const funct::Parameter & p8,
454  const funct::Parameter & p9,
455  const funct::Parameter & p10,
456  const funct::Parameter & p11,
457  const funct::Parameter & p12,
458  const funct::Parameter & p13,
459  const funct::Parameter & p14,
460  const funct::Parameter & p15,
461  const funct::Parameter & p16,
462  const funct::Parameter & p17,
463  Color_t lineColor = kRed, Width_t lineWidth = 1,
464  Style_t lineStyle = kDashed, Int_t npx = 1000,
465  const char * title = "Histo Title", const char * xTitle = "X Title",
466  const char * yTitle = "Y Title") {
467  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
468  p10, p11, p12, p13, p14, p15, p16, p17);
469  plotTF1(name, fun, histo, min, max,
470  lineColor, lineWidth, lineStyle, npx,
471  title, xTitle, yTitle);
472  }
473 
474  template<typename F>
475  void plot(const char * name, TH1 & histo, F& f, double min, double max,
476  const funct::Parameter & p0,
477  const funct::Parameter & p1,
478  const funct::Parameter & p2,
479  const funct::Parameter & p3,
480  const funct::Parameter & p4,
481  const funct::Parameter & p5,
482  const funct::Parameter & p6,
483  const funct::Parameter & p7,
484  const funct::Parameter & p8,
485  const funct::Parameter & p9,
486  const funct::Parameter & p10,
487  const funct::Parameter & p11,
488  const funct::Parameter & p12,
489  const funct::Parameter & p13,
490  const funct::Parameter & p14,
491  const funct::Parameter & p15,
492  const funct::Parameter & p16,
493  const funct::Parameter & p17,
494  const funct::Parameter & p18,
495  Color_t lineColor = kRed, Width_t lineWidth = 1,
496  Style_t lineStyle = kDashed, Int_t npx = 1000,
497  const char * title = "Histo Title", const char * xTitle = "X Title",
498  const char * yTitle = "Y Title") {
499  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
500  p10, p11, p12, p13, p14, p15, p16, p17, p18);
501  plotTF1(name, fun, histo, min, max,
502  lineColor, lineWidth, lineStyle, npx,
503  title, xTitle, yTitle);
504  }
505 
506  template<typename F>
507  void plot(const char * name, TH1 & histo, F& f, double min, double max,
508  const funct::Parameter & p0,
509  const funct::Parameter & p1,
510  const funct::Parameter & p2,
511  const funct::Parameter & p3,
512  const funct::Parameter & p4,
513  const funct::Parameter & p5,
514  const funct::Parameter & p6,
515  const funct::Parameter & p7,
516  const funct::Parameter & p8,
517  const funct::Parameter & p9,
518  const funct::Parameter & p10,
519  const funct::Parameter & p11,
520  const funct::Parameter & p12,
521  const funct::Parameter & p13,
522  const funct::Parameter & p14,
523  const funct::Parameter & p15,
524  const funct::Parameter & p16,
525  const funct::Parameter & p17,
526  const funct::Parameter & p18,
527  const funct::Parameter & p19,
528  Color_t lineColor = kRed, Width_t lineWidth = 1,
529  Style_t lineStyle = kDashed, Int_t npx = 1000,
530  const char * title = "Histo Title", const char * xTitle = "X Title",
531  const char * yTitle = "Y Title") {
532  TF1 fun = root::tf1("fun", f, min, max, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9,
533  p10, p11, p12, p13, p14, p15, p16, p17, p18, p19);
534  plotTF1(name, fun, histo, min, max,
535  lineColor, lineWidth, lineStyle, npx,
536  title, xTitle, yTitle);
537  }
538 
539  template<typename F>
540  void plot(const char * name, TH1 & histo, F& f, double min, double max,
541  const std::vector<funct::Parameter> & p,
542  Color_t lineColor = kRed, Width_t lineWidth = 1,
543  Style_t lineStyle = kDashed, Int_t npx = 1000,
544  const char * title = "Histo Title", const char * xTitle = "X Title",
545  const char * yTitle = "Y Title") {
546  TF1 fun = root::tf1("fun", f, min, max, p);
547  plotTF1(name, fun, histo, min, max,
548  lineColor, lineWidth, lineStyle, npx,
549  title, xTitle, yTitle);
550  }
551 
552  template<typename F>
553  void plot(const char * name, TH1 & histo, F& f, double min, double max,
554  const std::vector<boost::shared_ptr<double> > & p,
555  Color_t lineColor = kRed, Width_t lineWidth = 1,
556  Style_t lineStyle = kDashed, Int_t npx = 1000,
557  const char * title = "Histo Title", const char * xTitle = "X Title",
558  const char * yTitle = "Y Title") {
559  TF1 fun = root::tf1("fun", f, min, max, p);
560  plotTF1(name, fun, histo, min, max,
561  lineColor, lineWidth, lineStyle, npx,
562  title, xTitle, yTitle);
563  }
564 }
565 
566 #endif
def canvas
Definition: svgfig.py:481
const T & max(const T &a, const T &b)
double p4[4]
Definition: TauolaWrapper.h:92
void plot(const char *name, TH1 &histo, F &f, double min, double max, Color_t lineColor=kRed, Width_t lineWidth=1, Style_t lineStyle=kDashed, Int_t npx=1000, const char *title="Histo Title", const char *xTitle="X Title", const char *yTitle="Y Title")
Definition: rootPlot.h:68
double f[11][100]
double p2[4]
Definition: TauolaWrapper.h:90
TF1 tf1(const char *name, F &f, double min, double max)
Definition: rootTf1.h:16
double p1[4]
Definition: TauolaWrapper.h:89
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
void plotTF1(const char *name, TF1 &fun0, TF1 &fun1, TH1 &histo, double min, double max, Color_t lineColor0=kRed, Width_t lineWidth0=1, Style_t lineStyle0=kDashed, Int_t npx0=1000, Color_t lineColor1=kGreen, Width_t lineWidth1=1, Style_t lineStyle1=kDashed, Int_t npx1=1000, const char *title="Histo Title", const char *xTitle="X Title", const char *yTitle="Y Title")
Definition: rootPlot.h:14
double p3[4]
Definition: TauolaWrapper.h:91
string root
initialization
Definition: dbtoconf.py:70