ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Jeng/tools/plotXsec.C
(Generate patch)

Comparing UserCode/Jeng/tools/plotXsec.C (file contents):
Revision 1.2 by jengbou, Fri Jan 7 21:54:06 2011 UTC vs.
Revision 1.4 by jengbou, Thu Feb 24 00:15:04 2011 UTC

# Line 36 | Line 36 | void plotXsec() {
36  
37    int nbinsx_ = 35;
38    double xmin_ = 0., xmax_ = 350.;
39 <  double ymin_ = 0.5,ymax_ = 5.;
39 >  double ymin_ = 0.5,ymax_ = 6.1;
40  
41    TH2 *hr = new TH2F("frame","",nbinsx_,xmin_,xmax_,1,ymin_,ymax_);
42    hr->GetXaxis()->CenterTitle(kTRUE);
# Line 60 | Line 60 | void plotXsec() {
60    //   gmap["th_band"]->SetPoint(1,189.,4.5);
61    //   gmap["th_band"]->Draw("");
62  
63 <  const Int_t np = 4;
64 <  Int_t iColor[np]  = {1,2,9,4};
65 <  Int_t iMark [np]  = {20,21,22,23};
66 <
67 <  Float_t nexp[np]  = {1,2,3,4};
68 <  Float_t xsec[np]  = {157.5,145.0,194.0,158.1}; // x-sec
69 <  Float_t stath[np] = {  0. , 31. , 72. , 12. }; // stat err high
70 <  Float_t statl[np] = {  0. , 31. , 72. , 12. }; // stat err low
71 <  Float_t systh[np] = { 23.2, 42. , 24. , 35. }; // syst err high
72 <  Float_t systl[np] = { 24.4, 27. , 24. , 35. }; // syst err low
73 <  Float_t lumi[np]  = {  0. ,  0. , 21. , 17. }; // lumi err
63 >  const Int_t np = 5; // modify ymax_ accordingly
64 >  Int_t iColor[np]  = {1,28,9,4,2};
65 >  Int_t iMark [np]  = {20,21,22,23,20};
66 >
67 >  Float_t nexp[np]  = {1,2,3,4,5};
68 >  Float_t xsec[np]  = {157.5,145.0,194.0,156.0,153.7}; // x-sec
69 >  Float_t stath[np] = {  0. , 31. , 72. , 12. , 17. }; // stat err high
70 >  Float_t statl[np] = {  0. , 31. , 72. , 12. , 17. }; // stat err low
71 >  Float_t systh[np] = { 23.2, 42. , 24. , 28. , 28. }; // syst err high
72 >  Float_t systl[np] = { 24.4, 27. , 24. , 35. , 24. }; // syst err low
73 >  Float_t lumi[np]  = {  0. ,  0. , 21. , 17. , 19. }; // lumi err
74  
75    Float_t errh[np];
76    Float_t errl[np];
# Line 106 | Line 106 | void plotXsec() {
106    header0->SetTextSize(0.034);
107    header0->Draw();
108  
109 <  TLatex *header1 = new TLatex(0.8*xmax_,ymax_+0.1,"December 2010"); //header->SetTextColor(1);
109 >  TLatex *header1 = new TLatex(0.8*xmax_,ymax_+0.1,"February 2010"); //header->SetTextColor(1);
110    header1->SetTextSize(0.028);
111    header1->Draw();
112  
113 <  tvect.push_back(new TLatex(xmin_+10,nexp[0]+0.1,"Theory (MCFM)"));
114 <  tvect.push_back(new TLatex(xmin_+10,nexp[1]+0.1,"ATLAS Combined (L = 3 pb^{-1})"));
115 <  tvect.push_back(new TLatex(xmin_+10,nexp[2]+0.1,"CMS Dilepton (L = 3 pb^{-1})"));
116 <  TLatex* myTxt0 = new TLatex(xmin_+10,nexp[3]+0.1,"CMS #mu+Jets (L = 36 pb^{-1})");
117 <  myTxt0->SetTextColor(iColor[3]);  
113 >  tvect.push_back(new TLatex(xmin_+1,nexp[0]+0.1,"Theory (MCFM)"));
114 >  tvect.push_back(new TLatex(xmin_+1,nexp[1]+0.1,"ATLAS Combined (L = 3 pb^{-1})"));
115 >  tvect.push_back(new TLatex(xmin_+1,nexp[2]+0.1,"CMS Dilepton (L = 3 pb^{-1})"));
116 >  TLatex* myTxt0 = new TLatex(xmin_+1,nexp[3]+0.1,"CMS #mu+jets (L = 36 pb^{-1})");
117 >  TLatex* myTxt1 = new TLatex(xmin_+1,nexp[4]+0.1,"CMS #mu+jets+btag (L = 36 pb^{-1})");
118 >  myTxt0->SetTextColor(iColor[3]);
119 >  myTxt1->SetTextColor(iColor[4]);
120    tvect.push_back(myTxt0);
121 +  tvect.push_back(myTxt1);
122  
123    TString xsec_[np];
124    for (int i = 0; i < np; ++i){
# Line 157 | Line 160 | void plotXsec() {
160    tvect.push_back(new TLatex((xmax_-xmin_)*0.6,nexp[0]+0.1,xsec_[0]));
161    tvect.push_back(new TLatex((xmax_-xmin_)*0.6,nexp[1]+0.1,xsec_[1]));
162    tvect.push_back(new TLatex((xmax_-xmin_)*0.6,nexp[2]+0.1,xsec_[2]));
163 <  TLatex *myTxt1 = new TLatex((xmax_-xmin_)*0.6,nexp[3]+0.1,xsec_[3]);
164 <  myTxt1->SetTextColor(iColor[3]);
165 <  tvect.push_back(myTxt1);
163 >  TLatex *myTxt2 = new TLatex((xmax_-xmin_)*0.6,nexp[3]+0.1,xsec_[3]);
164 >  TLatex *myTxt3 = new TLatex((xmax_-xmin_)*0.6,nexp[4]+0.1,xsec_[4]);
165 >  myTxt2->SetTextColor(iColor[3]);
166 >  myTxt3->SetTextColor(iColor[4]);
167 >  tvect.push_back(myTxt2);
168 >  tvect.push_back(myTxt3);
169  
170    for (unsigned int i = 0; i < tvect.size(); i++) {
171      if (i < np) tvect[i]->SetX((xmax_-xmin_)*0.05);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines