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.3 by jengbou, Fri Feb 18 16:18:42 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 + <<<<<<< plotXsec.C
64 +  const Int_t np = 5; // modify ymax_ accordingly
65 +  Int_t iColor[np]  = {1,28,9,4,2};
66 +  Int_t iMark [np]  = {20,21,22,23,20};
67 +
68 +  Float_t nexp[np]  = {1,2,3,4,5};
69 +  Float_t xsec[np]  = {157.5,145.0,194.0,156.0,167.3}; // x-sec
70 +  Float_t stath[np] = {  0. , 31. , 72. , 12. , 17. }; // stat err high
71 +  Float_t statl[np] = {  0. , 31. , 72. , 12. , 17. }; // stat err low
72 +  Float_t systh[np] = { 23.2, 42. , 24. , 28. , 28. }; // syst err high
73 +  Float_t systl[np] = { 24.4, 27. , 24. , 35. , 25. }; // syst err low
74 +  Float_t lumi[np]  = {  0. ,  0. , 21. , 17. , 19. }; // lumi err
75 + =======
76    const Int_t np = 4;
77    Int_t iColor[np]  = {1,2,9,4};
78    Int_t iMark [np]  = {20,21,22,23};
# Line 71 | Line 84 | void plotXsec() {
84    Float_t systh[np] = { 23.2, 42. , 24. , 35. }; // syst err high
85    Float_t systl[np] = { 24.4, 27. , 24. , 35. }; // syst err low
86    Float_t lumi[np]  = {  0. ,  0. , 21. , 17. }; // lumi err
87 + >>>>>>> 1.2
88  
89    Float_t errh[np];
90    Float_t errl[np];
# Line 106 | Line 120 | void plotXsec() {
120    header0->SetTextSize(0.034);
121    header0->Draw();
122  
123 + <<<<<<< plotXsec.C
124 +  TLatex *header1 = new TLatex(0.8*xmax_,ymax_+0.1,"February 2010"); //header->SetTextColor(1);
125 + =======
126    TLatex *header1 = new TLatex(0.8*xmax_,ymax_+0.1,"December 2010"); //header->SetTextColor(1);
127 + >>>>>>> 1.2
128    header1->SetTextSize(0.028);
129    header1->Draw();
130  
131 + <<<<<<< plotXsec.C
132 +  tvect.push_back(new TLatex(xmin_+1,nexp[0]+0.1,"Theory (MCFM)"));
133 +  tvect.push_back(new TLatex(xmin_+1,nexp[1]+0.1,"ATLAS Combined (L = 3 pb^{-1})"));
134 +  tvect.push_back(new TLatex(xmin_+1,nexp[2]+0.1,"CMS Dilepton (L = 3 pb^{-1})"));
135 +  TLatex* myTxt0 = new TLatex(xmin_+1,nexp[3]+0.1,"CMS #mu+jets (L = 36 pb^{-1})");
136 +  TLatex* myTxt1 = new TLatex(xmin_+1,nexp[4]+0.1,"CMS #mu+jets+btag (L = 36 pb^{-1})");
137 +  myTxt0->SetTextColor(iColor[3]);
138 +  myTxt1->SetTextColor(iColor[4]);
139 + =======
140    tvect.push_back(new TLatex(xmin_+10,nexp[0]+0.1,"Theory (MCFM)"));
141    tvect.push_back(new TLatex(xmin_+10,nexp[1]+0.1,"ATLAS Combined (L = 3 pb^{-1})"));
142    tvect.push_back(new TLatex(xmin_+10,nexp[2]+0.1,"CMS Dilepton (L = 3 pb^{-1})"));
143    TLatex* myTxt0 = new TLatex(xmin_+10,nexp[3]+0.1,"CMS #mu+Jets (L = 36 pb^{-1})");
144    myTxt0->SetTextColor(iColor[3]);  
145 + >>>>>>> 1.2
146    tvect.push_back(myTxt0);
147 +  tvect.push_back(myTxt1);
148  
149    TString xsec_[np];
150    for (int i = 0; i < np; ++i){
# Line 157 | Line 186 | void plotXsec() {
186    tvect.push_back(new TLatex((xmax_-xmin_)*0.6,nexp[0]+0.1,xsec_[0]));
187    tvect.push_back(new TLatex((xmax_-xmin_)*0.6,nexp[1]+0.1,xsec_[1]));
188    tvect.push_back(new TLatex((xmax_-xmin_)*0.6,nexp[2]+0.1,xsec_[2]));
189 <  TLatex *myTxt1 = new TLatex((xmax_-xmin_)*0.6,nexp[3]+0.1,xsec_[3]);
190 <  myTxt1->SetTextColor(iColor[3]);
191 <  tvect.push_back(myTxt1);
189 >  TLatex *myTxt2 = new TLatex((xmax_-xmin_)*0.6,nexp[3]+0.1,xsec_[3]);
190 >  TLatex *myTxt3 = new TLatex((xmax_-xmin_)*0.6,nexp[4]+0.1,xsec_[4]);
191 >  myTxt2->SetTextColor(iColor[3]);
192 >  myTxt3->SetTextColor(iColor[4]);
193 >  tvect.push_back(myTxt2);
194 >  tvect.push_back(myTxt3);
195  
196    for (unsigned int i = 0; i < tvect.size(); i++) {
197      if (i < np) tvect[i]->SetX((xmax_-xmin_)*0.05);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines