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.6 by buchmann, Wed Apr 18 09:21:36 2012 UTC vs.
Revision 1.11 by buchmann, Mon May 14 07:07:03 2012 UTC

# Line 46 | Line 46 | bool wrongwaytodothis=true;
46  
47   string xsecfilename;
48  
49 +
50   void set_range(TH2F *histo, int scantype, bool pushoutlabels);
51   void smooth_line(TGraph *gr);
52 + void draw_diagonal_xchange(int scantype, std::string scanx);
53   TH2F* adjust_histo(TH2F *oldhist, TH2F *refhisto);
54   TGraph* get_mSUGRA_exclusion_line(TH2F *exclusionhisto, int scantype);
55   TGraph* thin_line(TGraph *gr);
56   TGraph *MarcosExclusionLine(TH2F *exclusionshape, int scantype);
57 + TH2F* get_XS(string filename, string mass, TH2F *histo);
58 +
59 + float getSMSxs(float mlsp,float mglu) {
60 +  TH2F *refh  =  new TH2F("ReferenceHisto","ReferenceHisto",(int)((mgluend-mglustart)/mglustep+1),mglustart-0.5*mglustep,mgluend+0.5*mglustep,int((mLSPend-mLSPstart)/mLSPstep+1),mLSPstart-0.5*mLSPstep,mLSPend+0.5*mLSPstep);
61 +  refh->SetBinContent(refh->FindBin(mglu,mlsp),1);//only compute the cross section for our point
62 +  TFile *xsecfile = new TFile((PlottingSetup::cbafbasedir+"/"+PlottingSetup::SMSReferenceXSFile).c_str());
63 +  if(xsecfile->IsZombie()) {
64 +      write_error(__FUNCTION__,"Cross section file is invalid!!!!");
65 +      return -1;
66 +  }
67 +  xsecfile->Close();
68 +  delete xsecfile;
69 +  TH2F *xsec = adjust_histo(get_XS(PlottingSetup::cbafbasedir+"/"+PlottingSetup::SMSReferenceXSFile,"gluino",refh),refh);
70 +  int GlobalBin = xsec->FindBin(mglu,mlsp);
71 +  float refxs=xsec->GetBinContent(GlobalBin);
72 +  delete refh;
73 +  delete xsec;
74 +  return refxs;
75 + }
76  
77   void write_SMS_text(int scantype, std::string& scanx, float xpos = 0.22 ) {
78    string legT5zz="pp #rightarrow  #tilde{g} #tilde{g}, #tilde{g} #rightarrow 2j + #chi^{0}_{2}, #chi^{0}_{2} #rightarrow Z #chi^{0}_{1}";
# Line 76 | Line 97 | void write_SMS_text(int scantype, std::s
97    //  if(scantype==PlottingSetup::GMSB) title3->Draw("same");
98   }
99  
100 + void draw_diagonal_xchange(int scantype, std::string scanx = "" ) {
101 +  // Line marking the diagonal
102 +  TLine *line;
103 +  float verticaloffset=0.0;
104 +  if(scantype==PlottingSetup::GMSB) verticaloffset=75.0;
105 +  line = new TLine(50.+75.0, 50.0+verticaloffset, 1200., 1200.0-75.0+verticaloffset);
106 +  line->SetLineStyle(7);
107 +  line->SetLineWidth(4);
108 +  //line->Draw("same"); // Do not draw: draw the other one instead
109 +  
110 +  // Add a dashed line to indicate where x changes
111 +  float offset = 0.;
112 +  if ( 0 == scanx.compare("0.5") ) { offset = 91.2/0.5; }
113 +  else if ( 0 == scanx.compare("0.25") ) { offset = 91.2/0.25; }
114 +  else if ( 0 == scanx.compare("0.75") ) { offset = 91.2/0.75; }
115 +  else if ( scantype==PlottingSetup::GMSB) { offset = 0; };
116 +  
117 +  if ( offset>0. ) {
118 +    line->DrawLine(50+offset, 50.0, 1175., 1175.0-offset);
119 +  }else if ( scantype==PlottingSetup::GMSB ) {
120 +    line->DrawLine(100, 100, 1175., 1175.0-offset);
121 + }
122 + }
123 +
124   void fill_with_text(TGraph *real, TGraph *down, TGraph *up, TVirtualPad *can, int scantype, std::string scanx = "") {
125    can->cd();
126    float xpos_of_text = 0.22;
127    TLegend* this_leg = new TLegend(xpos_of_text,0.6,0.38,0.75);
128 +  //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.
129    this_leg->SetFillColor(0);
130    this_leg->SetBorderSize(0);
131    this_leg->SetTextSize(0.035);
132 +  //this_leg->SetTextSize(0.04); // paper style.
133    if(scantype==PlottingSetup::SMS||scantype==PlottingSetup::GMSB) {
134      //this_leg->AddEntry(real,"#sigma^{prod} = #sigma^{NLO-QCD}" , "l");
135      //this_leg->AddEntry(up,"#sigma^{prod} = 3 #times #sigma^{NLO-QCD}" , "l");
# Line 95 | Line 142 | void fill_with_text(TGraph *real, TGraph
142    }
143      
144    this_leg->Draw();
145 <
145 >  TText *title = write_text(xpos_of_text+0.005,0.52,"JZB");
146 >  title->SetTextSize(0.04);
147 >  title->SetTextAlign(13);
148 >  title->SetTextFont(62);
149 >  title->Draw();
150 >  
151    write_SMS_text( scantype, scanx, xpos_of_text );
152    
153   //  //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 168 | void fill_with_text(TGraph *real, TGraph
168   //  title3->SetTextColor(kRed);
169   ////  if(scantype==PlottingSetup::GMSB) title3->Draw("same");
170    DrawPrelim();
171 <  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 <  }
171 >  draw_diagonal_xchange( scantype, scanx );
172   }
173  
174   TH2F* prep_histo(TH2F *oldhist, int scantype) {///DONE
# Line 170 | Line 207 | TH2F* make_exclusion_shape(TH2F *excl, i
207    }
208    exclusion->SetLineColor(kBlue);
209    exclusion->SetLineWidth(2);
210 +  //exclusion->SetLineWidth(4); // paper style
211    exclusion->SetLineStyle(isprimary);
212    return exclusion;
213   }
# Line 228 | Line 266 | void produce_extensive_plots(TH2F *xsec,
266    stringstream partial;
267    partial << "Limits/exclusion__" << limits->GetName();
268    fill_with_text(exclline,excllined3,excllinet3,ca->cd(4),scantype);
269 <  CompleteSave(ca,partial.str());
269 > //  CompleteSave(ca,partial.str());
270  
271    ca->cd(5);
272    (hardlimit(rellimits))->Draw("COL");
273    exclline->Draw("same");
274 +  TText *a = write_title("Exclusion shape for 3x#sigma_{ref}");
275 +  a->Draw();
276    ca->cd(6);
277    (hardlimit(rellimitst3))->Draw("COL");
278    excllinet3->Draw("same");
279 +  TText *b = write_title("Exclusion shape for #sigma_{ref}");
280 +  b->Draw();
281    ca->cd(7);
282    (hardlimit(rellimitsd3))->Draw("COLZ");
283 +  TText *c = write_title("Exclusion shape for #sigma_{ref}/3");
284 +  c->Draw();
285    excllined3->Draw("same");
286    
287    CompleteSave(ca,partial.str()+"__PlusInfo");
# Line 248 | Line 292 | bool fail(double xs, double xsLimit) {re
292  
293   void get_Marias_exclusion_line(TH2F *limit_ref, float pointsX[200], float pointsY[200], int &ixNew, int &counter, int &foundDiag) {
294   // part of Mariarosaria's getRefXsecGraph function
251  double refMult = 3.0;
295    bool enough = false;
296    Int_t  nBinX= limit_ref->GetXaxis()->GetNbins();
297    Int_t  nBinY= limit_ref->GetYaxis()->GetNbins();
# Line 259 | Line 302 | void get_Marias_exclusion_line(TH2F *lim
302        if(limit_ref->GetBinContent(i,j)==0) continue;
303        if( limit_ref->GetBinContent(i,j)>0. && limit_ref->GetBinContent(i,j)<=1.) {
304          double xsLimitAbove = limit_ref->GetBinContent(i, j+1);
262        double xsLimitBelow = limit_ref->GetBinContent(i, j-1);
305  
306          double xsLimit = limit_ref->GetBinContent(i, j);
307          if((fail(1.0,xsLimitAbove)) && (!fail(1.0,xsLimit)) ) {
# Line 361 | Line 403 | TGraph *MarcosExclusionLine(TH2F *exclus
403    }
404    realgraph->SetLineColor(TColor::GetColor("#151515")); //nice black
405    realgraph->SetLineWidth(2);
406 +  //realgraph->SetLineWidth(4);//paper style
407  
408    return realgraph;
409   }
# Line 372 | Line 415 | TGraph* thin_line(TGraph *gr) {
415    return thin;
416   }
417  
418 < void make_SMS_exclusion(TH2F *rawlimits,TH2F *xsec,int scantype,std::string& scanx) {
418 > void make_SMS_exclusion(TH2F *rawlimits,TH2F *xsec,int scantype,std::string& scanx, bool isobserved) {
419 >  write_warning(__FUNCTION__,"DEBUGGING THIS FUNCTION"); cout << "Working on : " << rawlimits->GetName() << endl; if(!Contains(rawlimits->GetName(),"map0")) return;
420    TH2F *limits = prep_histo(rawlimits,scantype); // this is to be independent of the style used at creation time
421    //here we get some limits and the cross section; we want to make an exclusion plot!
422    TH2F *rellimits = (TH2F*)limits->Clone("rellimits");
# Line 428 | Line 472 | void make_SMS_exclusion(TH2F *rawlimits,
472    if(drawefficiencydesertline) {
473          desertline = new TLine(375,50,1200,875);
474          desertline->SetLineWidth(3);
475 +        //desertline->SetLineWidth(4); // paper style
476          desertline->SetLineColor(kBlack);
477          desertline->Draw("same");
478    }
479  
435  TH2F *emptyh = new TH2F("emptyh","emptyh",1,1,2,1,1,2);
436  
437  
480    exclline->Draw("c");
481  
482   //  fill_with_text(exclline,excllined3,excllinet3,finalcanvas,scantype,scanx);
483    stringstream real;
484 <  real << "Limits/final_exclusion__" << limits->GetName();
484 >  real << "Limits/";
485 >  if(!isobserved) real << "expected/expected_";
486 >  real << "final_exclusion__" << limits->GetName();
487    
488    if(Contains(limits->GetName(),"bestlimits")) {
489      cout << "----------> " << limits->GetName() << endl;
# Line 470 | Line 514 | TH1* getHisto(char * filename, char* his
514    if(!file0) return hpt_;
515    TDirectory *dir;
516    TH2D * hMuPt;
473  TH1* H;
517  
518    if(dirName == "0") {
519      hMuPt = (TH2D*) file0->Get(histoName);
# Line 603 | Line 646 | TGraph* get_mSUGRA_exclusion_line(TH2F *
646    for(int i=1;i<exclusionhisto->GetNbinsX();i++) {
647      pair<float,float> anything = find_point(exclusionhisto,i);
648      pair<float,float> intthing = find_interpolated_point(exclusionhisto,i);
606    float value=anything.second;
649      if(intthing.second>anything.second) anything.second=intthing.second;
650      if(anything.second>100&&anything.second<1500) points.push_back(anything);
651    }
# Line 621 | Line 663 | TGraph* get_mSUGRA_exclusion_line(TH2F *
663    float lastx2=0;
664    float lasty2=0;
665    
666 <  for(int i=0;i<points.size();i++) {
666 >  for(int i=0;i<(int)points.size();i++) {
667      xpoints[i]=points[i].first;
668      spoints[i]=points[i].second;
669      if(scantype==PlottingSetup::mSUGRA) {
670 <        if(i>1&&i<points.size()-1) spoints[i]=(1.0/3.0)*(points[i-1].second+points[i].second+points[i+1].second);
671 <        if(i>2&&i<points.size()-2) spoints[i]=(1.0/5.0)*(points[i-2].second+points[i-1].second+points[i].second+points[i+1].second+points[i+2].second);
672 <        if(i>3&&i<points.size()-3) spoints[i]=(1.0/7.0)*(points[i-3].second+points[i-2].second+points[i-1].second+points[i].second+points[i+1].second+points[i+2].second+points[i+3].second);
670 >        if(i>1&&i<(int)points.size()-1) spoints[i]=(1.0/3.0)*(points[i-1].second+points[i].second+points[i+1].second);
671 >        if(i>2&&i<(int)points.size()-2) spoints[i]=(1.0/5.0)*(points[i-2].second+points[i-1].second+points[i].second+points[i+1].second+points[i+2].second);
672 >        if(i>3&&i<(int)points.size()-3) spoints[i]=(1.0/7.0)*(points[i-3].second+points[i-2].second+points[i-1].second+points[i].second+points[i+1].second+points[i+2].second+points[i+3].second);
673      }
674  
675      bool usethispoint=true;
# Line 645 | Line 687 | TGraph* get_mSUGRA_exclusion_line(TH2F *
687          pointcounter++;
688      }
689    }
690 <  for(int i=pointcounter;i<=points.size();i++) graph->SetPoint(i,lastx,lasty);
690 >  for(int i=pointcounter;i<=(int)points.size();i++) graph->SetPoint(i,lastx,lasty);
691    if(scantype==PlottingSetup::GMSB||scantype==PlottingSetup::SMS) {
692          //The final point will be a continuation of the last one, towards the diagonal
693          float x,y;
# Line 668 | Line 710 | TH2F* cast_into_shape(TH2F *origin, TH2F
710    return newh;
711   }
712  
713 < void draw_mSUGRA_exclusion(TH2F *ocrosssection, TH2F *oFilterEfficiency, TH2F *oabsXS, TH2F *limitmap, TH2F *expmap, TH2F *expplusmap, TH2F *expminusmap, TH2F *exp2plusmap, TH2F *exp2minusmap) {
713 > void draw_mSUGRA_exclusion(TH2F *ocrosssection, TH2F *oFilterEfficiency, TH2F *oabsXS, TH2F *limitmap, TH2F *expmap, TH2F *expplusmap, TH2F *expminusmap, TH2F *exp2plusmap, TH2F *exp2minusmap, bool isobserved) {
714    TH2F *crosssection = (TH2F*)ocrosssection->Clone("crosssection");
715   //  TH2F *limitmap = (TH2F*)olimitmap->Clone(((string)olimitmap->GetName()+"clone").c_str());
716    TH2F *cleanhisto = (TH2F*)limitmap->Clone("clean");
# Line 759 | Line 801 | void draw_mSUGRA_exclusion(TH2F *ocrosss
801   //  expected->Draw("c");
802   //  observed->Draw("c");
803    stringstream saveas;
804 <  if((int)((string)limitmap->GetName()).find("limitmap")>0) saveas << "Limits/final_exclusion_for_JZB_geq_" << ((string)limitmap->GetName()).substr(((string)limitmap->GetName()).find("limitmap")+8,10);
805 <  else saveas << "Limits/final_exclusion_for_bestlimits";
804 >  if((int)((string)limitmap->GetName()).find("limitmap")>0) {
805 >    saveas << "Limits/";
806 >    if(!isobserved) saveas << "expected/expected_";
807 >    saveas << "final_exclusion_for_JZB_geq_" << ((string)limitmap->GetName()).substr(((string)limitmap->GetName()).find("limitmap")+8,10);
808 >  } else {
809 >    saveas << "Limits/";
810 >    if(!isobserved) saveas << "expected/expected";
811 >    saveas << "final_exclusion_for_bestlimits";
812 >  }
813    CompleteSave(te,saveas.str());
814    delete te;
815    
# Line 770 | Line 819 | void draw_mSUGRA_exclusion(TH2F *ocrosss
819    set_range(limits,true,false);
820    set_range(limitmap,true,false);
821    
773  TGraph *emptygraph = new TGraph(0);
774  
822    overview->Divide(3,2);
823    overview->cd(1);
824    overview->cd(1)->SetLogz(1);
# Line 808 | Line 855 | void draw_mSUGRA_exclusion(TH2F *ocrosss
855    SugarCoatThis(overview->cd(6),10,noh,observed);
856   //  observed->Draw("c");
857    stringstream saveas2;
858 <  if((int)((string)limitmap->GetName()).find("limitmap")>0) saveas2 << "Limits/exclusion_overview_for_JZB_geq_" << ((string)limitmap->GetName()).substr(((string)limitmap->GetName()).find("limitmap")+8,10);
859 <  else saveas2 << "Limits/exclusion_overview_for_bestlimits";
858 >  if((int)((string)limitmap->GetName()).find("limitmap")>0) {
859 >    saveas2 << "Limits/";
860 >    if(!isobserved) saveas << "expected/expected_";
861 >    saveas2 << "exclusion_overview_for_JZB_geq_" << ((string)limitmap->GetName()).substr(((string)limitmap->GetName()).find("limitmap")+8,10);
862 >  } else {
863 >    saveas2 << "Limits/";
864 >    if(!isobserved) saveas << "expected/expected_";
865 >    saveas2 << "exclusion_overview_for_bestlimits";
866 >  }
867    CompleteSave(overview,saveas2.str());
868    delete overview;
869    delete noh;
# Line 834 | Line 888 | string give_nice_source_label(string nam
888    int mappoint=name.find("map");
889    if(mappoint<0||mappoint>500) return name; // this mean that something weird is happening
890    stringstream nice_label;
891 <  nice_label << "JZB > " << name.substr(mappoint+3,name.size()) << " GeV";
891 >  string identifier=name.substr(mappoint+3,name.size());
892 >  if(identifier!="0") nice_label << "JZB > " << name.substr(mappoint+3,name.size()) << " GeV";
893 >  else nice_label << "JZB shape";
894    return nice_label.str();
895   }
896  
# Line 862 | Line 918 | Int_t get_exclusion_region_color(double
918  
919   float findmaxentry(vector<TH2F*> histos, int i, int j) {
920    float max = histos[0]->GetBinContent(i,j);
921 <  for(int k=0;k<histos.size();k++) {
921 >  for(int k=0;k<(int)histos.size();k++) {
922      float entry = histos[k]->GetBinContent(i,j);
923      if(entry>=max) max=entry;
924    }
# Line 878 | Line 934 | TH2F *make_best_limits(vector<TH2F*> exp
934    }
935    if(explimits.size()==0) {
936      write_warning(__FUNCTION__,"There are no expected limits! Will compute best limits based on observed limits! (WATCH OUT THIS IS DISCOURAGED!");
937 <    for(int i=0;i<obslimits.size();i++) explimits.push_back(obslimits[i]);
937 >    for(int i=0;i<(int)obslimits.size();i++) explimits.push_back(obslimits[i]);
938    }
939    TH2F *bestlimit=(TH2F*)obslimits[0]->Clone("bestlimits");
940    TH2F *bestexplimit=(TH2F*)obslimits[0]->Clone("bestexplimits");
# Line 893 | Line 949 | TH2F *make_best_limits(vector<TH2F*> exp
949        float min=findmaxentry(explimits,i,j);
950        float omin=obslimits[0]->GetBinContent(i,j);
951        int source=0;
952 <      for(int k=0;k<explimits.size();k++) {
952 >      for(int k=0;k<(int)explimits.size();k++) {
953          float currlim=explimits[k]->GetBinContent(i,j);
954          if(currlim<=min&&currlim>0) {
955            min=currlim;
# Line 926 | Line 982 | TH2F *make_best_limits(vector<TH2F*> exp
982    bestlimitsource->Draw("COL");
983    gPad->Update();
984    TLegend *sourceleg = new TLegend(0.2,0.5,0.55,0.75);
985 <  for(int i=0;i<explimits.size();i++) {
985 >  for(int i=0;i<(int)explimits.size();i++) {
986      stringstream legendentry;
987 <    legendentry << i+1 << " = " << give_nice_source_label(explimits[i]->GetName());
987 >    legendentry << give_nice_source_label(explimits[i]->GetName());
988      Int_t currcol=get_exclusion_region_color(i+1,bestlimitsource);
989      explimits[i]->SetFillColor(currcol);
990      explimits[i]->SetLineColor(currcol);
# Line 964 | Line 1020 | void create_exclusion_plots(vector<TH2F*
1020      }
1021      xsecfile->Close();
1022    }
1023 <  if(scantype!=PlottingSetup::mSUGRA) for(int i=0;i<limits.size();i++) limits[i]->Scale(1./0.19); // because for T5zz we forced one z to decay leptonically
1023 >  if(scantype!=PlottingSetup::mSUGRA) for(int i=0;i<(int)limits.size();i++) limits[i]->Scale(1./0.19); // because for T5zz we forced one z to decay leptonically
1024      
1025    vector<TH2F*> explimits;
1026    vector<TH2F*> exp1mlimits;
# Line 976 | Line 1032 | void create_exclusion_plots(vector<TH2F*
1032    vector<TH2F*> crosssections;
1033    vector<TH2F*> AbsCrossSection;
1034    vector<TH2F*> FilterEfficiencies;
1035 <  for(int ilim=0;ilim<limits.size();ilim++) {
1035 >  for(int ilim=0;ilim<(int)limits.size();ilim++) {
1036      if(TString(limits[ilim]->GetName()).Contains("_explimitmap")) explimits.push_back(limits[ilim]);
1037      if(scantype==PlottingSetup::mSUGRA && TString(limits[ilim]->GetName()).Contains("_exp1plimitmap")) exp1plimits.push_back(limits[ilim]);
1038      if(scantype==PlottingSetup::mSUGRA && TString(limits[ilim]->GetName()).Contains("_exp1mlimitmap")) exp1mlimits.push_back(limits[ilim]);
# Line 1001 | Line 1057 | cout << "Size: " << AbsCrossSection.size
1057    TH2F *bestlimits = make_best_limits(explimits,obslimits,scantype, scanx, exp1mlimits, exp1plimits, exp2mlimits, exp2plimits, bestexplimits);
1058    bestlimits->GetZaxis()->SetRangeUser(limits_lower_bound,limits_upper_bound);
1059  
1060 <  for(int ilim=0;ilim<limits.size();ilim++) {
1060 >  for(int ilim=0;ilim<(int)limits.size();ilim++) {
1061      limits[ilim]->GetZaxis()->SetRangeUser(limits_lower_bound,limits_upper_bound);
1062    }
1063    
1064    if(scantype!=PlottingSetup::mSUGRA) {
1065 <    for(int ilim=0;ilim<obslimits.size();ilim++) make_SMS_exclusion(obslimits[ilim],xsec,scantype,scanx);
1066 <    make_SMS_exclusion(bestlimits,xsec,scantype,scanx);
1065 >    for(int ilim=0;ilim<(int)obslimits.size();ilim++) make_SMS_exclusion(obslimits[ilim],xsec,scantype,scanx,true);
1066 >    for(int ilim=0;ilim<(int)obslimits.size();ilim++) make_SMS_exclusion(explimits[ilim],xsec,scantype,scanx,false);//plotting expected limits
1067 >    make_SMS_exclusion(bestlimits,xsec,scantype,scanx,true);
1068    } else {
1069 <    for(int ilim=0;ilim<obslimits.size();ilim++) {
1070 <      draw_mSUGRA_exclusion(crosssections[0],FilterEfficiencies[0],AbsCrossSection[0],obslimits[ilim], explimits[ilim], exp1mlimits[ilim], exp1plimits[ilim], exp2mlimits[ilim], exp2plimits[ilim]);
1069 >    for(int ilim=0;ilim<(int)obslimits.size();ilim++) {
1070 >      draw_mSUGRA_exclusion(crosssections[0],FilterEfficiencies[0],AbsCrossSection[0],obslimits[ilim], explimits[ilim], exp1mlimits[ilim], exp1plimits[ilim], exp2mlimits[ilim], exp2plimits[ilim],true);
1071 >      draw_mSUGRA_exclusion(crosssections[0],FilterEfficiencies[0],AbsCrossSection[0],explimits[ilim], explimits[ilim], exp1mlimits[ilim], exp1plimits[ilim], exp2mlimits[ilim], exp2plimits[ilim],false);
1072      }
1073 <    draw_mSUGRA_exclusion(crosssections[0],FilterEfficiencies[0],AbsCrossSection[0],bestlimits, bestexplimits[0], bestexplimits[1], bestexplimits[2], bestexplimits[3], bestexplimits[4]);
1073 >    draw_mSUGRA_exclusion(crosssections[0],FilterEfficiencies[0],AbsCrossSection[0],bestlimits, bestexplimits[0], bestexplimits[1], bestexplimits[2], bestexplimits[3], bestexplimits[4],true);
1074    }
1075    delete bestlimits;
1076   }
# Line 1025 | Line 1083 | void smooth_line_once(TGraph *gr) {
1083    int sign=1;
1084    for(int i=0;i<gr->GetN();i++) {
1085      Double_t x,y,x1,y1,x2,y2;
1028    bool turning=false;
1086      gr->GetPoint(i,x,y);
1087      gr->GetPoint(i+1,x1,y1);//need to handle exception here
1088      gr->GetPoint(i-1,x2,y2);//need to handle exception here
# Line 1052 | Line 1109 | void smooth_line(TGraph *gr) {
1109   void set_range(TH2F *histo, int scantype, bool pushoutyz=false) {
1110    gStyle->SetPadLeftMargin(0.18);
1111    gStyle->SetPadRightMargin(0.19);
1112 +  // histo->GetXaxis()->SetLabelSize(0.035); //paper style
1113 +  // histo->GetYaxis()->SetLabelSize(0.035); //paper style
1114    if(scantype==PlottingSetup::mSUGRA) {
1115      histo->GetXaxis()->SetRangeUser(0,PlottingSetup::m0end);
1116      histo->GetYaxis()->SetRangeUser(0,PlottingSetup::m12end);
# Line 1160 | Line 1219 | void process_syst_plot(TH2F *rhisto,stri
1219      TPRegexp pat("\\d+$");
1220      size_t index = name.Index(pat,0);
1221      string cut = string("JZB > ")+(name(index,name.Length()-index).Data())+" GeV";
1222 +    //string cut = string("#splitline{JZB > ")+(name(index,name.Length()-index).Data())+" GeV}{n_{jets} #geq 3}"; //paper style
1223      TText *text = write_text(xpos_of_text,0.73,cut);
1224      text->SetTextAlign(11);
1225      text->SetTextSize(0.035);
1226      text->Draw();
1227 +    draw_diagonal_xchange( scantype, scanx );
1228    }
1229    
1230    CompleteSave(can,(saveto+(string)histo->GetName()));
# Line 1175 | Line 1236 | void process_syst_plot(TH2F *rhisto,stri
1236  
1237   void make_all_syst_plots(vector<TH2F*> all_histos,int scantype,std::string& scanx) {
1238    string saveto="Systematics/";
1239 <  for(int iplot=0;iplot<all_histos.size();iplot++) {
1239 >  for(int iplot=0;iplot<(int)all_histos.size();iplot++) {
1240        process_syst_plot(all_histos[iplot],saveto,scantype,scanx);
1241    }
1242   }
1243  
1244 + string IdentifyScan(TString histoname) {
1245 +  cout << "We are dealing with a histo called " << histoname << endl;
1246 +  if (histoname.Contains("T5zzl")) return "0.75";
1247 +  if(histoname.Contains("T5zzh")) return "0.25";
1248 +  if(histoname.Contains("T5zz")) return "0.5";
1249 +  
1250 +  return "IdentifyScanError"+string(histoname.Data());
1251 + }
1252 +
1253   void process_file(TFile* file, float stdmargin) {
1254    standardmargin=stdmargin;
1255    xsecfilename=PlottingSetup::cbafbasedir+"/"+PlottingSetup::SMSReferenceXSFile;
# Line 1190 | Line 1260 | void process_file(TFile* file, float std
1260    
1261    int scantype=PlottingSetup::SMS;
1262    std::string scanx = "0"; // Just for the legend
1193  if (TString(file->GetName()).Contains("T5zzl")) scanx = "0.75";
1194  else  if(TString(file->GetName()).Contains("T5zzh")) scanx = "0.25";
1195  else if(TString(file->GetName()).Contains("T5zz")) scanx = "0.5";
1263    
1264    vector<TH2F*> systematics_histos;
1265    vector<TH2F*> limits_histos;
# Line 1237 | Line 1304 | void process_file(TFile* file, float std
1304        else if(is_systematic) systematics_histos.push_back((TH2F*) obj);
1305        if(name.Contains("mSUGRA")) scantype=PlottingSetup::mSUGRA;
1306        if(name.Contains("GMSB")) scantype=PlottingSetup::GMSB;
1307 +      if(name.Contains("ScanIdentifier")) scanx=IdentifyScan(name);
1308      }
1309 + //  if (TString(file->GetName()).Contains("T5zzl")) scanx = "0.75";
1310 + //  else  if(TString(file->GetName()).Contains("T5zzh")) scanx = "0.25";
1311 + //  else if(TString(file->GetName()).Contains("T5zz")) scanx = "0.5";
1312      write_warning(__FUNCTION__,"Deactivated systematics plots");
1313   //  if(systematics_histos.size()>0) make_all_syst_plots(systematics_histos,scantype,scanx);
1314    if(limits_histos.size()>0) create_exclusion_plots(limits_histos,scantype,scanx);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines