ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/Development/Plotting/Modules/ExclusionPlot.C
(Generate patch)

Comparing UserCode/cbrown/Development/Plotting/Modules/ExclusionPlot.C (file contents):
Revision 1.5 by buchmann, Tue Apr 10 13:44:59 2012 UTC vs.
Revision 1.7 by buchmann, Wed Apr 18 12:46:00 2012 UTC

# Line 48 | Line 48 | string xsecfilename;
48  
49   void set_range(TH2F *histo, int scantype, bool pushoutlabels);
50   void smooth_line(TGraph *gr);
51 + void draw_diagonal_xchange(int scantype, std::string scanx);
52   TH2F* adjust_histo(TH2F *oldhist, TH2F *refhisto);
53   TGraph* get_mSUGRA_exclusion_line(TH2F *exclusionhisto, int scantype);
54   TGraph* thin_line(TGraph *gr);
# Line 76 | Line 77 | void write_SMS_text(int scantype, std::s
77    //  if(scantype==PlottingSetup::GMSB) title3->Draw("same");
78   }
79  
80 + void draw_diagonal_xchange(int scantype, std::string scanx = "" ) {
81 +  // Line marking the diagonal
82 +  TLine *line;
83 +  float verticaloffset=0.0;
84 +  if(scantype==PlottingSetup::GMSB) verticaloffset=75.0;
85 +  line = new TLine(50.+75.0, 50.0+verticaloffset, 1200., 1200.0-75.0+verticaloffset);
86 +  line->SetLineStyle(7);
87 +  line->SetLineWidth(4);
88 +  //line->Draw("same"); // Do not draw: draw the other one instead
89 +  
90 +  // Add a dashed line to indicate where x changes
91 +  float offset = 0.;
92 +  if ( 0 == scanx.compare("0.5") ) { offset = 91.2/0.5; }
93 +  else if ( 0 == scanx.compare("0.25") ) { offset = 91.2/0.25; }
94 +  else if ( 0 == scanx.compare("0.75") ) { offset = 91.2/0.75; }
95 +  else if ( scantype==PlottingSetup::GMSB) { offset = 0; };
96 +  
97 +  if ( offset>0. ) {
98 +    line->DrawLine(50+offset, 50.0, 1175., 1175.0-offset);
99 +  }else if ( scantype==PlottingSetup::GMSB ) {
100 +    line->DrawLine(100, 100, 1175., 1175.0-offset);
101 + }
102 + }
103 +
104   void fill_with_text(TGraph *real, TGraph *down, TGraph *up, TVirtualPad *can, int scantype, std::string scanx = "") {
105    can->cd();
106    float xpos_of_text = 0.22;
107    TLegend* this_leg = new TLegend(xpos_of_text,0.6,0.38,0.75);
108 +  //TLegend* this_leg = new TLegend(xpos_of_text,0.55,0.45,0.75,"n_{jets} #geq 3"); // this was the style of the paper.
109    this_leg->SetFillColor(0);
110    this_leg->SetBorderSize(0);
111    this_leg->SetTextSize(0.035);
112 +  //this_leg->SetTextSize(0.04); // paper style.
113    if(scantype==PlottingSetup::SMS||scantype==PlottingSetup::GMSB) {
114      //this_leg->AddEntry(real,"#sigma^{prod} = #sigma^{NLO-QCD}" , "l");
115      //this_leg->AddEntry(up,"#sigma^{prod} = 3 #times #sigma^{NLO-QCD}" , "l");
# Line 95 | Line 122 | void fill_with_text(TGraph *real, TGraph
122    }
123      
124    this_leg->Draw();
125 <
125 >  TText *title = write_text(xpos_of_text+0.005,0.52,"JZB");
126 >  title->SetTextSize(0.04);
127 >  title->SetTextAlign(13);
128 >  title->SetTextFont(62);
129 >  title->Draw();
130 >  
131    write_SMS_text( scantype, scanx, xpos_of_text );
132    
133   //  //string legT5zz="pp #rightarrow  #tilde{g} #tilde{g}, #tilde{g} #rightarrow 2j + #chi^{0}_{1}, #chi^{0}_{1} #rightarrow Z + #tilde{G}";
# Line 116 | Line 148 | void fill_with_text(TGraph *real, TGraph
148   //  title3->SetTextColor(kRed);
149   ////  if(scantype==PlottingSetup::GMSB) title3->Draw("same");
150    DrawPrelim();
151 <  TLine *line;
120 <  float verticaloffset=0.0;
121 <  if(scantype==PlottingSetup::GMSB) verticaloffset=75.0;
122 <  line = new TLine(50.+75.0, 50.0+verticaloffset, 1200., 1200.0-75.0+verticaloffset);
123 <  line->SetLineStyle(2);
124 <  line->SetLineWidth(2);
125 <  //line->Draw("same");
126 <   // Add a dashed line to indicate where x changes
127 <  float offset = 0.;
128 <  if ( 0 == scanx.compare("0.5") ) { offset = 91.2/0.5; }
129 <  else if ( 0 == scanx.compare("0.25") ) { offset = 91.2/0.25; }
130 <  else if ( 0 == scanx.compare("0.75") ) { offset = 91.2/0.75; }
131 <
132 <  if ( offset>0 ) {
133 <    line->DrawLine(50+offset, 50.0, 1200., 1200.0-offset);
134 <  }
151 >  draw_diagonal_xchange( scantype, scanx );
152   }
153  
154   TH2F* prep_histo(TH2F *oldhist, int scantype) {///DONE
# Line 170 | Line 187 | TH2F* make_exclusion_shape(TH2F *excl, i
187    }
188    exclusion->SetLineColor(kBlue);
189    exclusion->SetLineWidth(2);
190 +  //exclusion->SetLineWidth(4); // paper style
191    exclusion->SetLineStyle(isprimary);
192    return exclusion;
193   }
# Line 361 | Line 379 | TGraph *MarcosExclusionLine(TH2F *exclus
379    }
380    realgraph->SetLineColor(TColor::GetColor("#151515")); //nice black
381    realgraph->SetLineWidth(2);
382 +  //realgraph->SetLineWidth(4);//paper style
383  
384    return realgraph;
385   }
# Line 428 | Line 447 | void make_SMS_exclusion(TH2F *rawlimits,
447    if(drawefficiencydesertline) {
448          desertline = new TLine(375,50,1200,875);
449          desertline->SetLineWidth(3);
450 +        //desertline->SetLineWidth(4); // paper style
451          desertline->SetLineColor(kBlack);
452          desertline->Draw("same");
453    }
# Line 1052 | Line 1072 | void smooth_line(TGraph *gr) {
1072   void set_range(TH2F *histo, int scantype, bool pushoutyz=false) {
1073    gStyle->SetPadLeftMargin(0.18);
1074    gStyle->SetPadRightMargin(0.19);
1075 +  // histo->GetXaxis()->SetLabelSize(0.035); //paper style
1076 +  // histo->GetYaxis()->SetLabelSize(0.035); //paper style
1077    if(scantype==PlottingSetup::mSUGRA) {
1078      histo->GetXaxis()->SetRangeUser(0,PlottingSetup::m0end);
1079      histo->GetYaxis()->SetRangeUser(0,PlottingSetup::m12end);
# Line 1160 | Line 1182 | void process_syst_plot(TH2F *rhisto,stri
1182      TPRegexp pat("\\d+$");
1183      size_t index = name.Index(pat,0);
1184      string cut = string("JZB > ")+(name(index,name.Length()-index).Data())+" GeV";
1185 +    //string cut = string("#splitline{JZB > ")+(name(index,name.Length()-index).Data())+" GeV}{n_{jets} #geq 3}"; //paper style
1186      TText *text = write_text(xpos_of_text,0.73,cut);
1187      text->SetTextAlign(11);
1188      text->SetTextSize(0.035);
1189      text->Draw();
1190 +    draw_diagonal_xchange( scantype, scanx );
1191    }
1192    
1193    CompleteSave(can,(saveto+(string)histo->GetName()));
# Line 1182 | Line 1206 | void make_all_syst_plots(vector<TH2F*> a
1206  
1207   void process_file(TFile* file, float stdmargin) {
1208    standardmargin=stdmargin;
1209 <  xsecfilename="reference_xSec_SMS-new.root";
1209 >  xsecfilename=PlottingSetup::cbafbasedir+"/"+PlottingSetup::SMSReferenceXSFile;
1210  
1211    // can receive a file with systematics and limits mixed, or a file with systematics only , or a file with limits only.
1212    TIter nextkey(file->GetListOfKeys());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines