StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
plPRL_Cuts.C
1 TString dataPath="sortMarch22/";
2 TString mcPath="MC-setC-5.9.10/";
3 
4 TString dataFinalRoot=dataPath+"run9setP1234.wana.hist.root";
5 TString mcFinalRoot=mcPath+"rcn10010.wana.hist.root";
6 
7 TFile* fd=0;
8 
9 //============================================
10 //============================================
11 void plPRL_Cuts(TString cCore="WAL_PRL_Cuts"){
12  gStyle->SetFillStyle(0);
13  fd=new TFile( dataFinalRoot); assert(fd->IsOpen()); assert(fd->IsOpen());
14  fdmc=new TFile( mcFinalRoot); assert(fd->IsOpen()); assert(fdmc->IsOpen());
15  gStyle->SetPalette(1,0);
16  gStyle->SetOptStat(0);
17  const Char_t *title = "Selection of W events";
18  c=new TCanvas(cCore,title,500,300);
19  setPadPaperSize(245.0); // column width, approx. 3.4 in = 245 pt
20 
21  TPad *cL = new TPad("padD", "apdD",0.55,0,1.,1.); cL->Draw();
22  float yy1=0.60;
23  TPad *cT = new TPad("padT", "apdT",0,yy1,0.55,1.); cT->Draw();
24  TPad *cB = new TPad("padB", "apdB",0,0.0,0.55,yy1); cB->Draw();
25 
26  cL->cd();
27  gPad->SetRightMargin(0.01); gPad->SetTopMargin(0.01);
28  gPad->SetBottomMargin(0.19);
29  gPad->SetLeftMargin(0.24);
30 
31 
32  h2=(TH2F*)fd->Get("musPtBalance_clust");
33  h2->Draw("col");
34  h2->Rebin2D();
35  h2->SetAxisRange(8,70,"x");h2->SetAxisRange(-40,60,"y");
36  h2->GetXaxis()->SetNdivisions(5);
37  h2->SetTitle("; E^{e}_{T} (GeV); signed P_{T} balance (GeV) ");
38  h2->GetXaxis()->CenterTitle(true);
39  h2->GetYaxis()->CenterTitle(true);
40 
41  stripCmdHist(h2);
42  setHistFontSize(h2, 10.0);
43  setLineWidthPoint(h2, 0.5);
44  setMarkerSizePoint(h2, 3.5);
45  setHistTickLength(h2, 4.0, 4.0);
46  setHistTitleLabelOffset(h2, 2.0*12.0 - 2.0, 18, 15.0 - 2.0, 4.5 - 2.0);
47  TList *list=h2->GetListOfFunctions(); // to capture old
48  TLine* ln = (TLine*)list->At(0);
49  ln->SetX1(8);ln->SetX2(72); ln->SetLineColor(45); setLineWidthPoint(ln, 1);
50 
51  ln=new TLine(25,15.,25,63); ln->SetLineColor(kRed); ln->SetLineStyle(2);
52  setLineWidthPoint(ln, 1); ln->Draw();
53 
54  ln=new TLine(50,15.,50,63); ln->SetLineColor(kRed); ln->SetLineStyle(2);
55  setLineWidthPoint(ln, 1); ln->Draw();
56 
57  ln=new TLine(25,15.,50,15); ln->SetLineColor(kRed); ln->SetLineStyle(2);
58  setLineWidthPoint(ln, 1); ln->Draw();
59 
60  tx=new TLatex(16,55,"c)"); tx->Draw();
61  tx->SetTextAlign(21); stripCmdLatex(tx); setTextFontSize(tx, 10);
62 
63 
64  //====================== 2x2/4x4
65  float xx3=0.25;
66  cT->cd();
67  gPad->SetBottomMargin(0.);gPad->SetTopMargin(0.02);
68  gPad->SetLeftMargin(xx3); gPad->SetRightMargin(0.01);
69  h=(TH1F*)fd->Get("muBclET24R"); h->Draw();
70  hmc=(TH1F*)fdmc->Get("muBclET24R"); hmc->Draw("same");
71  hmc->SetFillColor(93); hmc->Scale(3.);
72 
73  h->SetTitle("; ;Counts ");
74  h->GetYaxis()->SetNdivisions(0); h->GetYaxis()->CenterTitle(true);
75  h->GetXaxis()->SetNdivisions(3);
76  stripCmdHist(h);
77  setHistFontSize(h, 10.0);
78  setLineWidthPoint(h, 0.5);
79  setMarkerSizePoint(h, 3.5);
80  setHistTickLength(h, 4.0, 4.0);
81  setHistTitleLabelOffset(h, 2.0*12.0 - 2.0, 23, 15.0 - 2.0, 4.5 - 2.0);
82  list=h->GetListOfFunctions(); // to capture old
83  ln = (TLine*)list->At(0);
84  ln->SetY2(3500);ln->SetLineStyle(2); setLineWidthPoint(ln, 1);
85 
86  tx=new TLatex(0.4,500," E^{e}_{T} / E^{4#times 4}_{T} "); tx->Draw();
87  tx->SetTextAlign(21); stripCmdLatex(tx); setTextFontSize(tx, 10);
88 
89  tx=new TLatex(-0.04,15,"0"); tx->Draw();
90  tx->SetTextAlign(21); stripCmdLatex(tx); setTextFontSize(tx, 10);
91 
92  tx=new TLatex(-0.13,3000,"3000"); tx->Draw();
93  tx->SetTextAlign(21); stripCmdLatex(tx); setTextFontSize(tx, 10);
94 
95  tx=new TLatex(0.125,2960,"a)"); tx->Draw();
96  tx->SetTextAlign(21); stripCmdLatex(tx); setTextFontSize(tx, 10);
97 
98  //====================== 2x2/near
99  cB->cd();
100  gPad->SetBottomMargin(0.35); gPad->SetTopMargin(0.02);
101  gPad->SetLeftMargin(xx3); gPad->SetRightMargin(0.01);
102  h=(TH1F*)fd->Get("muBjetETR"); h->Draw();
103  hmc=(TH1F*)fdmc->Get("muBjetETR"); hmc->Draw("same");
104  hmc->SetFillColor(93); hmc->Scale(.35);
105 
106  h->SetTitle("; E^{e}_{T} / E^{R<0.7}_{T} ;Counts");
107  h->GetXaxis()->SetNdivisions(3); h->GetXaxis()->CenterTitle(true);
108  h->GetYaxis()->SetNdivisions(4); h->GetYaxis()->CenterTitle(true);
109 
110  stripCmdHist(h);
111  setHistFontSize(h, 10.0);
112  setLineWidthPoint(h, 0.5);
113  setMarkerSizePoint(h, 3.5);
114  setHistTickLength(h, 4.0, 4.0);
115  setHistTitleLabelOffset(h, 2.0*12.0 - 2.0, 22, 15.0 - 2.0, 4.5 - 2.0);
116  list=h->GetListOfFunctions(); // to capture old
117  ln = (TLine*)list->At(0);
118  ln->SetY2(320);ln->SetLineStyle(2); setLineWidthPoint(ln, 1);
119 
120  tx=new TLatex(0.125,275,"b)"); tx->Draw();
121  tx->SetTextAlign(21); stripCmdLatex(tx); setTextFontSize(tx, 10);
122 
123 }
124