Skip to content

Commit d3c11de

Browse files
author
ffrensch
committed
Merge pull request #624 from ffrensch/master
fix needed for htautau for mH260-350 plotting
2 parents 59463d5 + 85178d1 commit d3c11de

File tree

2 files changed

+58
-53
lines changed

2 files changed

+58
-53
lines changed

src/Tanb.cc

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,9 @@ PlotLimits::plotTanb(TCanvas& canv, const char* directory, std::string HIG)
411411
std::vector<TGraph*> gr_higgslow;
412412
std::vector<TGraph*> gr_higgshigh;
413413
std::vector<TGraph*> gr_higgsHlow;
414+
gr_higgsHlow.push_back(0);
414415
std::vector<TGraph*> gr_higgsHhigh;
416+
gr_higgsHhigh.push_back(0);
415417
std::vector<std::vector<TGraph*>> gr_higgsBands;
416418
std::vector<TH2D*> plane_higgsBands;
417419
if(higgs125_){
@@ -428,26 +430,27 @@ PlotLimits::plotTanb(TCanvas& canv, const char* directory, std::string HIG)
428430
for(int i=0; i<higgsband1.sum; i++) {gr_higgshigh.push_back((TGraph *)((TList *)contourFromTH2(plane_higgsBands[0], 128, 20, false, 200))->At(i));}
429431
gr_higgsBands.push_back(gr_higgshigh);
430432
// possible to push back more curves to gr_higgsBands for Hhh need to call different higgsConstraint with model "H"
431-
if(TString::Format(model)=="low-tb-high"){
432-
TH2D* plane_higgsHBand = higgsConstraint(model, "H");
433-
plane_higgsBands.push_back(plane_higgsHBand);
434-
//lower edge entry 0
435-
TIter iter_higgsHlow((TList *)contourFromTH2(plane_higgsBands[1], 260, 20, false));
436-
STestFunctor higgsHband0 = std::for_each( iter_higgsHlow.Begin(), TIter::End(), STestFunctor() );
437-
for(int i=0; i<higgsHband0.sum; i++) {gr_higgsHlow.push_back((TGraph *)((TList *)contourFromTH2(plane_higgsBands[1], 260, 20, false, 200))->At(i));}
438-
gr_higgsBands.push_back(gr_higgsHlow);
439-
//upper edge entry 1
440-
TIter iter_higgsHhigh((TList *)contourFromTH2(plane_higgsBands[1], 350, 20, false));
441-
STestFunctor higgsHband1 = std::for_each( iter_higgsHhigh.Begin(), TIter::End(), STestFunctor() );
442-
for(int i=0; i<higgsHband1.sum; i++) {gr_higgsHhigh.push_back((TGraph *)((TList *)contourFromTH2(plane_higgsBands[1], 350, 20, false, 200))->At(i));}
443433
gr_higgsBands.push_back(gr_higgsHhigh);
434+
gr_higgsBands.push_back(gr_higgsHhigh);
435+
if(TString::Format(model)=="low-tb-high"){
436+
gr_higgsHlow.pop_back(); gr_higgsHlow.pop_back(); gr_higgsBands.pop_back(); gr_higgsBands.pop_back();
437+
TH2D* plane_higgsHBand = higgsConstraint(model, "H");
438+
plane_higgsBands.push_back(plane_higgsHBand);
439+
//lower edge entry 2
440+
TIter iter_higgsHlow((TList *)contourFromTH2(plane_higgsBands[1], 260, 20, false));
441+
STestFunctor higgsHband0 = std::for_each( iter_higgsHlow.Begin(), TIter::End(), STestFunctor() );
442+
for(int i=0; i<higgsHband0.sum; i++) {gr_higgsHlow.push_back((TGraph *)((TList *)contourFromTH2(plane_higgsBands[1], 260, 20, false, 200))->At(i));}
443+
gr_higgsBands.push_back(gr_higgsHlow);
444+
//upper edge entry 3
445+
TIter iter_higgsHhigh((TList *)contourFromTH2(plane_higgsBands[1], 350, 20, false));
446+
STestFunctor higgsHband1 = std::for_each( iter_higgsHhigh.Begin(), TIter::End(), STestFunctor() );
447+
for(int i=0; i<higgsHband1.sum; i++) {gr_higgsHhigh.push_back((TGraph *)((TList *)contourFromTH2(plane_higgsBands[1], 350, 20, false, 200))->At(i));}
448+
gr_higgsBands.push_back(gr_higgsHhigh);
444449
}
445-
446450
}
447-
448-
451+
449452
// do the plotting
450-
plottingTanb(canv, plane_expected, gr_minus2sigma, gr_minus1sigma, gr_expected, gr_plus1sigma, gr_plus2sigma, gr_observed, gr_injected, gr_higgsBands, comparisons, xaxis_, yaxis_, theory_, min_, max_, log_, transparent_, expectedOnly_, MSSMvsSM_, HIG, Brazilian_,azh_);
453+
plottingTanb(canv, plane_expected, gr_minus2sigma, gr_minus1sigma, gr_expected, gr_plus1sigma, gr_plus2sigma, gr_observed, gr_injected, gr_higgsBands, comparisons, xaxis_, yaxis_, theory_, min_, max_, log_, transparent_, expectedOnly_, MSSMvsSM_, HIG, Brazilian_, azh_);
451454
/// setup the CMS Preliminary
452455
//TPaveText* cmsprel = new TPaveText(0.145, 0.835+0.06, 0.145+0.30, 0.835+0.16, "NDC");
453456
TPaveText* cmsprel = new TPaveText(0.135, 0.735, 0.145+0.30, 0.785, "NDC"); // for "unpublished" in header
@@ -480,7 +483,13 @@ PlotLimits::plotTanb(TCanvas& canv, const char* directory, std::string HIG)
480483
output->mkdir(output_.c_str());
481484
output->cd(output_.c_str());
482485
}
483-
plane_expected->Write("plane_expected");
486+
plane_expected->Write("plane_expected");
487+
for(unsigned int i=0; i<gr_higgslow.size(); i++){
488+
gr_higgslow[i] ->Write(TString::Format("gr_higgslow_%d", i) );
489+
}
490+
for(unsigned int i=0; i<gr_higgshigh.size(); i++){
491+
gr_higgshigh[i] ->Write(TString::Format("gr_higgshigh_%d", i) );
492+
}
484493
for(unsigned int i=0; i<gr_observed.size(); i++){
485494
gr_observed[i] ->Write(TString::Format("gr_observed_%d", i) );
486495
}

src/plottingTanb.cxx

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
22
#include <map>
33
#include <vector>
44
#include "TH1F.h"
@@ -74,14 +74,13 @@ plottingTanb(TCanvas& canv, TH2D* h2d, std::vector<TGraph*> minus2sigma, std::ve
7474
mHconstraint->SetLineStyle(3);
7575
mHconstraint->SetLineColor(kGreen+3);
7676

77-
TGraphAsymmErrors* emptybackground = new TGraphAsymmErrors();
78-
emptybackground->SetFillStyle(1001.);
79-
emptybackground->SetFillColor(kWhite);
80-
emptybackground->SetLineColor(kWhite);
81-
82-
83-
//exclusion graphs
84-
77+
TGraphAsymmErrors* emptybackground = new TGraphAsymmErrors();
78+
emptybackground->SetFillStyle(1001.);
79+
emptybackground->SetFillColor(kWhite);
80+
emptybackground->SetLineColor(kWhite);
81+
82+
83+
//exclusion graphs
8584
for(unsigned int i=0; i<minus2sigma.size(); i++){
8685
minus2sigma[i]->SetFillStyle(1001);
8786
minus2sigma[i]->SetFillColor(twosigma->GetNumber());
@@ -113,13 +112,12 @@ plottingTanb(TCanvas& canv, TH2D* h2d, std::vector<TGraph*> minus2sigma, std::ve
113112
plus2sigma[i]->SetLineWidth(1);
114113
plus2sigma[i]->Draw("F SAME");
115114
}
116-
117-
115+
118116
for(unsigned int i=0; i<expected.size(); i++){
119117
expected[i]->SetLineColor(kBlack);
120118
expected[i]->SetLineWidth(2);
121119
expected[i]->SetLineStyle(2);
122-
expected[i]->Draw("L SAME");
120+
expected[i]->Draw("L SAME"); //CONT
123121
}
124122

125123
if(injected[0]){
@@ -143,31 +141,31 @@ plottingTanb(TCanvas& canv, TH2D* h2d, std::vector<TGraph*> minus2sigma, std::ve
143141
if(Brazilian) observed[i]->SetFillColor(kBlack);
144142
if(Brazilian) observed[i]->SetFillStyle(3004);
145143
observed[i]->Draw("F SAME");
146-
observed[i]->Draw("L SAME");
144+
observed[i]->Draw("L SAME"); //CONT
147145
}
148146
}
149147

150-
if(theory!="2HDM type-I" && theory!="2HDM type-II"){
151-
if(!azh){
152-
for(unsigned int i=0; i<higgsBands[2].size(); i++){
153-
higgsBands[2][i]->SetLineWidth(9902);
154-
higgsBands[2][i]->SetFillStyle(1001);
155-
higgsBands[2][i]->SetFillColor(kWhite);
156-
higgsBands[2][i]->SetLineColor(kGreen+3);
157-
higgsBands[2][i]->SetLineStyle(3);
158-
higgsBands[2][i]->Draw("L SAME");
148+
//Constraint for Hhh
149+
if(theory!="2HDM type-I" && theory!="2HDM type-II"){
150+
if(!azh && higgsBands[2][0]!=0 && higgsBands[3][0]!=0){
151+
for(unsigned int i=0; i<higgsBands[2].size(); i++){
152+
higgsBands[2][i]->SetLineWidth(9902);
153+
higgsBands[2][i]->SetFillStyle(1001);
154+
higgsBands[2][i]->SetFillColor(kWhite);
155+
higgsBands[2][i]->SetLineColor(kGreen+3);
156+
higgsBands[2][i]->SetLineStyle(3);
157+
higgsBands[2][i]->Draw("L SAME");
158+
}
159+
for(unsigned int i=0; i<higgsBands[3].size(); i++){
160+
higgsBands[3][i]->SetLineWidth(-9902);
161+
higgsBands[3][i]->SetFillStyle(1001);
162+
higgsBands[3][i]->SetFillColor(kWhite);
163+
higgsBands[3][i]->SetLineColor(kGreen+3);
164+
higgsBands[3][i]->SetLineStyle(3);
165+
higgsBands[3][i]->Draw("L SAME");
166+
}
159167
}
160-
for(unsigned int i=0; i<higgsBands[3].size(); i++){
161-
higgsBands[3][i]->SetLineWidth(-9902);
162-
higgsBands[3][i]->SetFillStyle(1001);
163-
higgsBands[3][i]->SetFillColor(kWhite);
164-
higgsBands[3][i]->SetLineColor(kGreen+3);
165-
higgsBands[3][i]->SetLineStyle(3);
166-
higgsBands[3][i]->Draw("L SAME");
167-
}
168-
169-
170-
}
168+
//Mass constraint
171169
for(unsigned int i=0; i<higgsBands[0].size(); i++){
172170
higgsBands[0][i]->SetLineWidth(402);
173171
higgsBands[0][i]->SetFillStyle(3005);
@@ -184,8 +182,6 @@ if(theory!="2HDM type-I" && theory!="2HDM type-II"){
184182
}
185183
}
186184

187-
188-
189185
int idx=0;
190186
std::map<std::string,int> coloredComps;
191187
coloredComps["arXiv_1211_6956" ] = kOrange+3;
@@ -254,7 +250,7 @@ if(theory!="2HDM type-I" && theory!="2HDM type-II"){
254250
TLegend* leg2 = new TLegend(0.60, 0.79, 0.95, 0.945);
255251
leg2->SetBorderSize( 0 );
256252
leg2->SetFillStyle (1001);
257-
leg2->SetTextSize(0.03);
253+
leg2->SetTextSize (0.03);
258254
leg2->SetTextFont ( 62 );
259255
leg2->SetFillColor (kWhite);
260256
leg2->SetLineWidth (2);

0 commit comments

Comments
 (0)