153 |
|
for (int mlsp=mLSPstart;mlsp<=mLSPend&&mlsp<=mglu;mlsp+=mLSPstep) Npoints++; |
154 |
|
} |
155 |
|
|
156 |
+ |
// TH2F *mceff = (TH2F*)fsyst->Get((prefix+"efficiencymap"+any2string(jzb_cut[ibin])).c_str()); |
157 |
+ |
write_warning(__FUNCTION__,"Currently the efficiencymap name was switched to Pablo's convention. This NEEDS to be switched BACK!");TH2F *mceff = (TH2F*)fsyst->Get(("efficiency_jzbdiff"+any2string(jzb_cut[ibin])).c_str()); |
158 |
|
TH2F *fullerr = (TH2F*)fsyst->Get((prefix+"systotmap"+any2string(jzb_cut[ibin])).c_str()); |
157 |
– |
TH2F *mceff = (TH2F*)fsyst->Get((prefix+"efficiencymap"+any2string(jzb_cut[ibin])).c_str()); |
159 |
|
TH2F *NEvents = (TH2F*)fsyst->Get((prefix+"Neventsmap"+any2string(jzb_cut[ibin])).c_str()); |
160 |
|
|
161 |
|
TH2F *limitmap = new TH2F((prefix+"limitmap"+any2string(jzb_cut[ibin])).c_str(), "",(mgluend-mglustart)/mglustep+1,mglustart-0.5*mglustep,mgluend+0.5*mglustep,(mLSPend-mLSPstart)/mLSPstep+1,mLSPstart-0.5*mLSPstep,mLSPend+0.5*mLSPstep); |
164 |
|
|
165 |
|
if(!fullerr || !mceff || !NEvents) { |
166 |
|
write_error(__FUNCTION__,"The supplied systematics file did not contain the correct histograms - please check the file"); |
167 |
+ |
dout << "mc eff address: " << mceff << " , error address: " << fullerr << " , NEvents address: " << NEvents << endl; |
168 |
|
delete limcanvas; |
169 |
|
return; |
170 |
|
} |
178 |
|
float currmceff=mceff->GetBinContent(mceff->FindBin(mglu,mlsp)); |
179 |
|
float currtoterr=(fullerr->GetBinContent(fullerr->FindBin(mglu,mlsp)))*currmceff; |
180 |
|
float nevents=NEvents->GetBinContent(NEvents->FindBin(mglu,mlsp)); |
181 |
< |
dout << "Looking at point " << ipoint << " with masses " << massgluname << " = " << mglu << " and " << massLSPname << " = " << mlsp << endl; |
181 |
> |
dout << "Looking at point " << ipoint << " / " << Npoints << " with masses " << massgluname << " = " << mglu << " and " << massLSPname << " = " << mlsp << endl; |
182 |
|
dout << "Found : systerr=" << currtoterr << " and eff=" << currmceff << " and nevents=" << nevents << endl; |
183 |
|
string plotfilename=(string)(TString(massgluname)+TString(any2string(mglu))+TString("__")+TString(massLSPname)+TString(any2string(mlsp))+TString(".png")); |
184 |
< |
if(currmceff<=0||currtoterr<=0) continue; |
184 |
> |
if(currmceff<=0||currtoterr<=0||nevents==0) { |
185 |
> |
dout << " Nothing to work with, skipping this point." << endl; |
186 |
> |
continue; |
187 |
> |
} |
188 |
|
vector<float> sigmas; |
189 |
|
//do_limit_wrapper(currmceff,currtoterr,ibin,mcjzb,sigmas,plotfilename); // no threading right now. |
190 |
|
sigmas=compute_one_upper_limit(currmceff,currtoterr,ibin,mcjzb,plotfilename,true); |
191 |
< |
limitmap->Fill(mglu,mlsp,sigmas[0]); |
191 |
> |
if(sigmas[0]>0) limitmap->Fill(mglu,mlsp,sigmas[0]); //anything else is an error code |
192 |
|
dout << "An upper limit has been added for this point ( " << massgluname << " = " << mglu << " and " << massLSPname << " = " << mlsp << " )at " << sigmas[0] << endl; |
193 |
|
if(ismSUGRA) { |
194 |
|
dout << "Computing XS" << endl; |