]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/GammaConv/macros/PlottingGammaConversionAdditional.h
Coding violations fixed
[u/mrichter/AliRoot.git] / PWG4 / GammaConv / macros / PlottingGammaConversionAdditional.h
1 /***********************************************************************************************
2 *** provided by Gamma Conversion Group, PWG4,                                                                   ******
3 ***         Friederike Bock, fbock@physi.uni-heidelberg.de ***                                                  ******
4 ************************************************************************************************/
5
6 /************************************************************************************************
7 /************************************************************************************************
8         This header contains the functions to plot additional things, like logos and Lines 
9         in your histograms
10 /************************************************************************************************
11 /************************************************************************************************
12
13   The functions are 
14         - DrawAliceLogo
15         - DrawAliceLogo1D
16         - DrawAliceLogoPerformance
17         - DrawAliceLogoPerformance2D
18         - DrawAliceText
19         
20         - DrawStructure
21         - DrawArmenteros
22         - DrawdEdxLabels
23         
24         - DrawGammaLines
25 // */
26
27 #include <Riostream.h>
28
29 /*********************************************************************************************************
30         DrawAliceLogoPi0Performace 
31                 * will draw you the ALICE Logo as well the text "ALICE Performance", "pp @ 7 TeV" and the date
32                   which you can hand over
33                   Float_t start_text_x, Float_t start_text_y, Float_t start_pi0_text_x, Float_t difference_text,
34                   Float_t start_logo_x, Float_t start_logo_y, Float_t width_logo, 
35                   Float_t text_size, 
36                   Bool_t LowEnergy, Bool_t MCfile
37                 * float_t start_x, float_t start_y - give starting Point of Logo
38                 * float_t width_logo - gives the width of the logo
39                 * float_t text_height - gives you the heigth of the text
40                 * char * date - date handed over
41 **********************************************************************************************************
42 **********************************************************************************************************/
43
44 void DrawAliceLogoPi0Performance(Float_t start_text_x, Float_t start_text_y, Float_t start_pi0_text_x, Float_t difference_text,
45                                                    Float_t start_logo_x, Float_t start_logo_y, Float_t width_logo, 
46                                                    Float_t text_size, 
47                                                    Bool_t LowEnergy, Bool_t MCfile , Bool_t RawData){
48
49                 string alicetext = "ALICE Performance";
50                 if(RawData) alicetext = "RAW DATA";
51                 
52                 TLatex *alice = new TLatex(start_text_x,(start_text_y+(2*difference_text)),Form("%s",alicetext.c_str())); // Bo: this was modified
53                 TLatex *energy = new TLatex(start_text_x,(start_text_y+difference_text),"pp @ 7TeV"); // Bo: this was modified
54                 TLatex *process = new TLatex(start_pi0_text_x, (start_text_y + (4* difference_text)), "#pi^{0} #rightarrow #gamma #gamma #rightarrow e^{+}e^{-}  e^{+}e^{-}");
55                 TLatex *events = new TLatex(start_text_x,start_text_y,"1.233 x 10^{8} MinBias events"); // Bo: this was modified
56                 TPad *myPadLogo = new TPad("myPadLogo", "Pad for ALICE Logo",start_logo_x,start_logo_y,(start_logo_x + width_logo),(start_logo_y + (width_logo*0.975)));
57                 
58                 
59                 if(LowEnergy){
60                         TLatex *alice = new TLatex(start_text_x,0.8,Form("%s",alicetext.c_str())); // Bo: this was modified
61                         TLatex *energy = new TLatex(start_text_x,0.75,"pp @ 7TeV"); // Bo: this was modified
62                         TLatex *process = new TLatex(0.35, 0.9, "#pi^{0} #rightarrow #gamma #gamma #rightarrow e^{+}e^{-}  e^{+}e^{-}");
63                         TPad *myPadLogo = new TPad("myPadLogo", "Pad for ALICE Logo",start_logo_x,start_logo_y,(start_logo_x + width_logo),(start_logo_y + (width_logo*0.975)));
64                 }
65                 
66                 if(MCfile != "") {
67                         TLatex *alice = new TLatex(start_text_x,0.8,Form("%s",alicetext.c_str())); // Bo: this was modified
68                         TLatex *energy = new TLatex(start_text_x,0.75,"pp @ 7TeV"); // Bo: this was modified
69                         TLatex *process = new TLatex(0.35, 0.9, "#pi^{0} #rightarrow #gamma #gamma #rightarrow e^{+}e^{-}  e^{+}e^{-}");
70                         TPad *myPadLogo = new TPad("myPadLogo", "Pad for ALICE Logo",start_logo_x,start_logo_y,(start_logo_x + width_logo),(start_logo_y + (width_logo*0.975)));
71                 }
72                 
73                 
74                 alice->SetNDC();
75                 alice->SetTextColor(2);
76                 alice->SetTextSize(text_size);
77                 alice->Draw();
78                 
79                 energy->SetNDC();
80                 energy->SetTextColor(2);
81                 energy->SetTextSize(text_size);
82                 energy->Draw();
83                 
84                 process->SetNDC(kTRUE); // <- use NDC coordinate
85                 process->SetTextSize(text_size);
86                 process->Draw();
87                 
88                 events->SetNDC();
89                 events->SetTextColor(2);
90                 events->SetTextSize(text_size);
91                 events->Draw();
92                 
93                 //myPadLogo->SetFillStyle(2000); // color to first figure out where is the pad then comment !
94                 myPadLogo->SetBorderMode(0);
95                 myPadLogo->SetBorderSize(2);
96                 myPadLogo->SetFrameBorderMode(0);
97                 myPadLogo->SetLeftMargin(0.0);
98                 myPadLogo->SetTopMargin(0.0);
99                 myPadLogo->SetBottomMargin(0.0);
100                 myPadLogo->SetRightMargin(0.0);
101                 TASImage *myAliceLogo = new TASImage("/home/fredi/Dokumente/CERN/ALICE/Photon/ALICE_logo.eps");
102                 myPadLogo->Draw();  // to take out for not using a logo.
103                 myPadLogo->cd();
104                 myAliceLogo->Draw();
105 }
106
107
108 /*************************************************************************************************
109  DrawAliceLogo draws you the Alice logo + "work in progress" and " ALICE Performance" 
110    be careful you have to set the path of the alice-logo for    your system
111         * float_t start_x, float_t start_y - give starting Point of Logo
112         * float_t width_logo - gives the width of the logo
113         * float_t text_height - gives you the heigth of the text
114 **************************************************************************************************
115 **************************************************************************************************/
116
117 void DrawAliceLogo(Float_t start_x, Float_t start_y, Float_t width_logo, Float_t text_height){
118                 
119                 Float_t aliceStartY = start_y - text_height * 1.1;  
120                 TLatex *alice = new TLatex(start_x-0.0225,aliceStartY,"ALICE Performance"); // Bo: this was modified
121                     alice->SetNDC();
122                     alice->SetTextColor(2);
123                     alice->SetTextFont(42);
124                     alice->SetTextSize(text_height);
125                     alice->SetLineWidth(2);
126                   alice->Draw("same");
127                  
128                 Float_t wipStartY = start_y - text_height *(1 + 1.1);           
129                     TLatex *wip = new TLatex((start_x-0.011),wipStartY,"work in progress"); // Bo: this was modified
130                     wip->SetNDC();
131                     wip->SetTextColor(2);
132                     wip->SetTextFont(51);
133                     wip->SetTextSize(text_height);
134                     wip->SetLineWidth(2);
135                   wip->Draw("same");
136                 Float_t endX = start_x + width_logo;
137                 Float_t endY = start_y + width_logo;
138
139                     TPad *myPadLogo = new TPad("myPadLogo", "Pad for ALICE Logo",start_x,start_y,endX,endY);
140                     //  myPadLogo->SetFillColor(2); // color to first figure out where is the pad then comment !
141                     myPadLogo->SetBorderMode(0);
142                     myPadLogo->SetBorderSize(2);
143                     myPadLogo->SetFrameBorderMode(0);
144                     myPadLogo->SetLeftMargin(0.0);
145                     myPadLogo->SetTopMargin(0.0);
146                     myPadLogo->SetBottomMargin(0.0);
147                     myPadLogo->SetRightMargin(0.0);
148                     TASImage *myAliceLogo = new TASImage("/home/fredi/Dokumente/CERN/ALICE/Photon/ALICE_logo.eps");
149                   myPadLogo->Draw();  // to take out for not using a logo.
150                     myPadLogo->cd();
151                     myAliceLogo->Draw("same");
152
153 }
154
155 /*************************************************************************************************
156  DrawAliceLogo1D draws you the Alice logo + "work in progress" and " ALICE Performance" 
157    be careful you have to set the path of the alice-logo for    your system
158         * float_t start_x, float_t start_y - give starting Point of Logo
159         * float_t width_logo - gives the width of the logo
160         * float_t text_height - gives you the heigth of the text
161 **************************************************************************************************
162 **************************************************************************************************/
163
164 void DrawAliceLogo1D(Float_t start_x, Float_t start_y, Float_t width_logo, Float_t text_height){
165                 
166                 Float_t aliceStartY = start_y - text_height * 1.1;  
167                 TLatex *alice = new TLatex(start_x+0.008,aliceStartY,"ALICE Performance"); // Bo: this was modified
168                     alice->SetNDC();
169                     alice->SetTextColor(2);
170                     alice->SetTextFont(42);
171                     alice->SetTextSize(text_height);
172                     alice->SetLineWidth(2);
173                   alice->Draw("same");
174                  
175                 Float_t wipStartY = start_y - text_height *(1 + 1.1);           
176                     TLatex *wip = new TLatex((start_x+0.022),wipStartY,"work in progress"); // Bo: this was modified
177                     wip->SetNDC();
178                     wip->SetTextColor(2);
179                     wip->SetTextFont(51);
180                     wip->SetTextSize(text_height);
181                     wip->SetLineWidth(2);
182                   wip->Draw("same");
183                 Float_t endX = start_x + width_logo;
184                 Float_t endY = start_y + width_logo;
185
186                     TPad *myPadLogo = new TPad("myPadLogo", "Pad for ALICE Logo",start_x,start_y,endX,endY);
187                     //  myPadLogo->SetFillColor(2); // color to first figure out where is the pad then comment !
188                     myPadLogo->SetBorderMode(0);
189                     myPadLogo->SetBorderSize(2);
190                     myPadLogo->SetFrameBorderMode(0);
191                     myPadLogo->SetLeftMargin(0.0);
192                     myPadLogo->SetTopMargin(0.0);
193                     myPadLogo->SetBottomMargin(0.0);
194                     myPadLogo->SetRightMargin(0.0);
195                     TASImage *myAliceLogo = new TASImage("/home/fredi/Dokumente/CERN/ALICE/Photon/ALICE_logo.eps");
196                   myPadLogo->Draw();  // to take out for not using a logo.
197                     myPadLogo->cd();
198                     myAliceLogo->Draw("same");
199 }
200
201
202 /*********************************************************************************************************
203         DrawAliceLogoPerformace 
204                 * will draw you the ALICE Logo as well the text "ALICE Performance", "pp @ 7 TeV" and the date
205                   which you can hand over
206                 * float_t start_x, float_t start_y - give starting Point of Logo
207                 * float_t width_logo - gives the width of the logo
208                 * float_t text_height - gives you the heigth of the text
209                 * char * date - date handed over
210 **********************************************************************************************************
211 **********************************************************************************************************/
212
213 void DrawAliceLogoPerformance(Float_t start_x, Float_t start_y, Float_t width_logo, Float_t text_height, Float_t decrease, char *date){
214                 
215                 Float_t aliceStartY = start_y - text_height * 1.1;  
216                 TLatex *alice = new TLatex((start_x-decrease),aliceStartY,"ALICE Performance"); // Bo: this was modified
217                     alice->SetNDC();
218                     alice->SetTextColor(2);
219                     alice->SetTextFont(62);
220                     alice->SetTextSize(text_height);
221                     alice->SetLineWidth(2);
222                   alice->Draw("same");
223                 TLatex *pp7 = new TLatex((start_x+decrease*0.3),(aliceStartY-text_height*1.1),"pp @ 7 TeV"); // Bo: this was modified
224                     pp7->SetNDC();
225                     pp7->SetTextColor(2);
226                     pp7->SetTextFont(62);       
227                     pp7->SetTextSize(text_height);
228                     pp7->SetLineWidth(2);
229                   pp7->Draw("same");
230                 TLatex *today = new TLatex((start_x-decrease*0),(aliceStartY-2*text_height*1.1),date); // Bo: this was modified
231                     today->SetNDC();
232                     today->SetTextColor(2);
233                     today->SetTextFont(62);
234                     today->SetTextSize(text_height);
235                     today->SetLineWidth(2);
236                   today->Draw("same");
237                 
238                  
239                 Float_t endX = start_x + width_logo;
240                 Float_t endY = start_y + width_logo;
241
242                     TPad *myPadLogo = new TPad("myPadLogo", "Pad for ALICE Logo",start_x,start_y,endX,endY);
243                     //  myPadLogo->SetFillColor(2); // color to first figure out where is the pad then comment !
244                     myPadLogo->SetBorderMode(0);
245                     myPadLogo->SetBorderSize(2);
246                     myPadLogo->SetFrameBorderMode(0);
247                     myPadLogo->SetLeftMargin(0.0);
248                     myPadLogo->SetTopMargin(0.0);
249                     myPadLogo->SetBottomMargin(0.0);
250                     myPadLogo->SetRightMargin(0.0);
251                     TASImage *myAliceLogo = new TASImage("/home/fredi/Dokumente/CERN/ALICE/Photon/ALICE_logo.eps");
252                   myPadLogo->Draw();  // to take out for not using a logo.
253                     myPadLogo->cd();
254                     myAliceLogo->Draw("same");
255
256 }
257 /*********************************************************************************************************
258         DrawAliceLogoPerformace2D 
259                 * will draw you the ALICE Logo as well the text "ALICE Performance", "pp @ 7 TeV" and the date
260                   which you can hand over
261                 * float_t start_x, float_t start_y - give starting Point of Logo
262                 * float_t width_logo - gives the width of the logo
263                 * float_t text_height - gives you the heigth of the text
264                 * float_t decrease - gives percentage in the canvas to which the text should be decreased in y 
265                                                 compared to the logo
266                 * char * date - date handed over
267 **********************************************************************************************************
268 **********************************************************************************************************/
269
270 void DrawAliceLogoPerformance2D(Float_t start_x, Float_t start_y, Float_t width_logo, Float_t text_height, Float_t decrease, char *date){
271                 
272                 Float_t aliceStartY = start_y + 3* text_height * 1.1;  
273                 TLatex *alice = new TLatex((start_x-decrease),aliceStartY,"ALICE Performance"); // Bo: this was modified
274                     alice->SetNDC();
275                     alice->SetTextColor(2);
276                     alice->SetTextFont(62);
277                     alice->SetTextSize(text_height);
278                     alice->SetLineWidth(2);
279                   alice->Draw("same");
280                 TLatex *pp7 = new TLatex((start_x+decrease*0.3),(aliceStartY-text_height*1.1),"pp @ 7 TeV"); // Bo: this was modified
281                     pp7->SetNDC();
282                     pp7->SetTextColor(2);
283                     pp7->SetTextFont(62);       
284                     pp7->SetTextSize(text_height);
285                     pp7->SetLineWidth(2);
286                   pp7->Draw("same");
287                 TLatex *today = new TLatex((start_x-decrease*0),(aliceStartY-2*text_height*1.1),date); // Bo: this was modified
288                     today->SetNDC();
289                     today->SetTextColor(2);
290                     today->SetTextFont(62);
291                     today->SetTextSize(text_height);
292                     today->SetLineWidth(2);
293                   today->Draw("same");
294                 
295                  
296                 Float_t endX = start_x + width_logo;
297                 Float_t endY = start_y + width_logo;
298
299                     TPad *myPadLogo = new TPad("myPadLogo", "Pad for ALICE Logo",start_x , (start_y - width_logo), endX,start_y);
300                     //  myPadLogo->SetFillColor(2); // color to first figure out where is the pad then comment !
301                     myPadLogo->SetBorderMode(0);
302                     myPadLogo->SetBorderSize(2);
303                     myPadLogo->SetFrameBorderMode(0);
304                     myPadLogo->SetLeftMargin(0.0);
305                     myPadLogo->SetTopMargin(0.0);
306                     myPadLogo->SetBottomMargin(0.0);
307                     myPadLogo->SetRightMargin(0.0);
308                     TASImage *myAliceLogo = new TASImage("/home/fredi/Dokumente/CERN/ALICE/Photon/ALICE_logo.eps");
309                   myPadLogo->Draw();  // to take out for not using a logo.
310                     myPadLogo->cd();
311                     myAliceLogo->Draw("same");
312
313 }
314
315
316 //***********************************************************************************************************
317 /* DrawAliceText draws you the "work in progress" and " ALICE Performance" 
318         * float_t start_x, float_t start_y - give starting Point of Logo
319         * float_t text_height - gives you the heigth of the text
320 //***********************************************************************************************************/
321 //***********************************************************************************************************/
322
323 void DrawAliceText(Float_t start_x, Float_t start_y, Float_t text_height){
324                 Float_t aliceStartY = start_y - text_height * 1.1;  
325                 TLatex *alice = new TLatex(start_x,aliceStartY,"ALICE Performance"); // Bo: this was modified
326                     alice->SetNDC();
327                     alice->SetTextColor(2);
328                     alice->SetTextFont(42);
329                     alice->SetTextSize(text_height);
330                     alice->SetLineWidth(2);
331                   alice->Draw();
332                  
333                 Float_t wipStartY = start_y - text_height *(1 + 1.1);           
334                     TLatex *wip = new TLatex(start_x,wipStartY,"work in progress"); // Bo: this was modified
335                     wip->SetNDC();
336                     wip->SetTextColor(2);
337                     wip->SetTextFont(51);
338                     wip->SetTextSize(text_height);
339                     wip->SetLineWidth(2);
340                   wip->Draw();
341 }
342
343 /***************************************************************************************************** 
344         DrawStructure() draws the structure of the Inner Alice Detectors labeled for a xy - Plot
345
346 ******************************************************************************************************
347 ******************************************************************************************************/
348
349 void DrawStructure(){
350   TLatex *ssdText = new TLatex(0.16,0.78,"SSD");
351   ssdText->SetNDC();
352   ssdText->SetTextFont(72);
353   ssdText->SetTextSize(0.03);
354   ssdText->SetLineWidth(4);
355   ssdText->Draw();
356
357   TLatex *sddText = new TLatex(0.14,0.7,"SDD");
358   sddText->SetNDC();
359   sddText->SetTextFont(72);
360   sddText->SetTextSize(0.03);
361   sddText->SetLineWidth(4);
362   sddText->Draw();
363
364   TLatex *spdText = new TLatex(0.14,0.25,"SPD");
365   spdText->SetNDC();
366   spdText->SetTextFont(72);
367   spdText->SetTextSize(0.03);
368   spdText->SetLineWidth(4);
369   spdText->Draw();
370
371   TLatex *tpcRText = new TLatex(0.52,0.115,"TPC Rods");
372   tpcRText->SetNDC();
373   tpcRText->SetTextFont(72);
374   tpcRText->SetTextSize(0.03);
375   tpcRText->SetLineWidth(4);
376   tpcRText->Draw();
377
378   TLatex *tpcIText = new TLatex(0.14,0.20,"TPC inner");
379   tpcIText->SetNDC();
380   tpcIText->SetTextFont(72);
381   tpcIText->SetTextSize(0.03);
382   tpcIText->SetLineWidth(4);
383   tpcIText->Draw();
384
385   TLatex *tpcIFText = new TLatex(0.14,0.17,"field cage");
386   tpcIFText->SetNDC();
387   tpcIFText->SetTextFont(72);
388   tpcIFText->SetTextSize(0.03);
389   tpcIFText->SetLineWidth(4);
390   tpcIFText->Draw();
391
392   TLatex *tpcIFVText = new TLatex(0.16,0.14,"vessel");
393   tpcIFVText->SetNDC();
394   tpcIFVText->SetTextFont(72);
395   tpcIFVText->SetTextSize(0.03);
396   tpcIFVText->SetLineWidth(4);
397   tpcIFVText->Draw();
398
399   TLatex *tpc1IText = new TLatex(0.705,0.20,"TPC inner");
400   tpc1IText->SetNDC();
401   tpc1IText->SetTextFont(72);
402   tpc1IText->SetTextSize(0.03);
403   tpc1IText->SetLineWidth(4);
404   tpc1IText->Draw();
405
406   TLatex *tpcICText = new TLatex(0.69,0.17,"containment");
407   tpcICText->SetNDC();
408   tpcICText->SetTextFont(72);
409   tpcICText->SetTextSize(0.03);
410   tpcICText->SetLineWidth(4);
411   tpcICText->Draw();
412
413   TLatex *tpcICVText = new TLatex(0.72,0.14,"vessel");
414   tpcICVText->SetNDC();
415   tpcICVText->SetTextFont(72);
416   tpcICVText->SetTextSize(0.03);
417   tpcICVText->SetLineWidth(10);
418   tpcICVText->Draw();
419
420   TLatex *tpcGasText = new TLatex(0.78,0.28,"TPC");
421   tpcGasText->SetNDC();
422   tpcGasText->SetTextFont(72);
423   tpcGasText->SetTextSize(0.03);
424   tpcGasText->SetLineWidth(10);
425   tpcGasText->Draw();
426
427   TLatex *tpcGas2Text = new TLatex(0.76,0.25,"drift gas");
428   tpcGas2Text->SetNDC();
429   tpcGas2Text->SetTextFont(72);
430   tpcGas2Text->SetTextSize(0.03);
431   tpcGas2Text->SetLineWidth(10);
432   tpcGas2Text->Draw();
433
434
435    TArrow * arrow = new TArrow(-150.8049,145.,-11.99843,38.629599,0.02,">"); //SSD arrow
436    arrow->SetFillColor(1);
437    arrow->SetFillStyle(1001);
438    arrow->SetLineWidth(2.);
439    arrow->Draw();
440
441    TArrow * arrow1 = new TArrow(-160.,105.,-11.99843,25.,0.02,">"); //SDD arrow
442    arrow1->SetFillColor(1);
443    arrow1->SetFillStyle(1001);
444    arrow1->SetLineWidth(2.);
445    arrow1->Draw();
446
447
448    TArrow * arrow2 = new TArrow(-150,-108.,-7.,2.,0.02,">");  //SPD arrow
449    arrow2->SetFillColor(1);
450    arrow2->SetFillStyle(1001);
451    arrow2->SetLineWidth(2.);
452   arrow2->Draw();
453
454    TArrow * arrow3 = new TArrow(-105.,-160.,-30.,-75.,0.02,">"); //TPC field cage vessel arrow
455    arrow3->SetFillColor(1);
456    arrow3->SetFillStyle(1001);
457    arrow3->SetLineWidth(2.);
458   arrow3->Draw();
459
460
461   TArrow * arrow4 = new TArrow(50.,-178.,15.,-88.,0.02,">"); //TPC rods arrow
462    arrow4->SetFillColor(1);
463    arrow4->SetFillStyle(1001);
464  arrow4->SetLineWidth(2.);
465   arrow4->Draw();
466
467   TArrow * arrow5 = new TArrow(130.,-130.,50.,-38.,0.02,">");// TPC inner constainment vessel arrow
468    arrow5->SetFillColor(1);
469    arrow5->SetFillStyle(1001);
470  arrow5->SetLineWidth(2.);
471   arrow5->Draw();
472
473
474   TArrow * arrow6 = new TArrow(160.,-90.,130.,-70.,0.02,">");// TPC gas
475    arrow6->SetFillColor(1);
476    arrow6->SetFillStyle(1001);
477  arrow6->SetLineWidth(2.);
478   arrow6->Draw();
479
480 }
481 /*************************************************************************************************************
482         DrawArmenteros() draws the labels for the particles in the Armenteros plot
483 **************************************************************************************************************/
484
485 void DrawArmenteros(){
486   TLatex *k0s = new TLatex(0.45,0.87,"K^{0}_{s}");
487   k0s->SetNDC();
488   k0s->SetTextFont(62);
489   k0s->SetTextSize(0.05);
490   k0s->SetLineWidth(4);
491   k0s->Draw();
492
493   TLatex *lambda = new TLatex(0.71,0.47,"#Lambda");
494   lambda->SetNDC();
495   lambda->SetTextFont(62);
496   lambda->SetTextSize(0.05);
497   lambda->SetLineWidth(4);
498   lambda->Draw();
499
500   TLatex *lambdabar = new TLatex(0.22,0.48,"#bar{#Lambda}");
501   lambdabar->SetNDC();
502   lambdabar->SetTextFont(62);
503   lambdabar->SetTextSize(0.05);
504   lambdabar->SetLineWidth(4);
505   lambdabar->Draw();
506
507   TLatex *gamma = new TLatex(0.49,0.18,"#gamma");
508   gamma->SetNDC();
509   gamma->SetTextFont(62);
510   gamma->SetTextSize(0.05);
511   gamma->SetLineWidth(4);
512   gamma->Draw();
513
514 }
515
516
517 /************************************************************************************************
518         DrawdEdxLabels()
519                 * Float_t linewidth - will give the final linewidth in the plot
520
521 *************************************************************************************************
522 *************************************************************************************************/
523 void DrawdEdxLabel(){
524                 TLatex *pion = new TLatex(0.23,0.7,"#pi"); //text at pion line
525                      pion->SetNDC();
526                      pion->SetTextColor(2);
527                      pion->SetTextFont(62);
528                      pion->SetTextSize(0.03);
529                      pion->SetLineWidth(2);     
530
531                 TLatex *kaon = new TLatex(0.375,0.7,"K"); //text at kaon line
532                      kaon->SetNDC();
533                      kaon->SetTextColor(4);
534                      kaon->SetTextFont(62);
535                      kaon->SetTextSize(0.03);
536                      kaon->SetLineWidth(2);     
537
538                 TLatex *proton = new TLatex(0.455,0.7,"p"); //text at proton line
539                      proton->SetNDC();
540                      proton->SetTextColor(kGreen+3);
541                      proton->SetTextFont(62);
542                      proton->SetTextSize(0.03);
543                      proton->SetLineWidth(2);   
544                 
545                 TLatex *electron = new TLatex(0.72,0.50,"e"); //text at electron line
546                      electron->SetNDC();
547                      electron->SetTextColor(1);
548                      electron->SetTextFont(62);
549                      electron->SetTextSize(0.03);
550                      electron->SetLineWidth(2); 
551                 
552                 electron->Draw("same");
553                 kaon->Draw("same");
554                 proton->Draw("same");
555                 pion->Draw("same");
556 }
557
558 /* // DrawGammaLines will draw the lines in the histogram for you
559                 * start_x - starting point of drawing in x
560                 * endX - end point of drawing in x
561                 * start_y -starting point of drawing in y
562                 * endY - end point of drawing in y
563                 * linew - line width
564 */
565 void DrawGammaLines(Float_t start_x, Float_t endX,
566                                  Float_t start_y, Float_t endY,
567                                 Float_t linew){
568                         TLine * l1 = new TLine (start_x,start_y,endX,endY);
569                         l1->SetLineColor(4);
570                         l1->SetLineWidth(linew);
571                         l1->Draw("same");
572 }
573