294 |
|
dout << "Running on the GRID (this is job " << jobnumber << "/" << njobs << ") for a jzb cut at " << jzb_cut[ibin] << endl; |
295 |
|
} else { |
296 |
|
dout << "Running locally " << endl; |
297 |
< |
dout << "This will take a really, really long time - if you want to see the results THIS week try running the LimitWorkerScript on the grid (DistributedModelCalculation/Limits/)" << endl; |
297 |
> |
dout << "This will take a really, really long time - if you want to see the results THIS month try running the LimitWorkerScript on the grid (DistributedModelCalculation/Limits/)" << endl; |
298 |
|
} |
299 |
|
|
300 |
– |
cout << "FILE USED: " << (scansample.collection)[0].filename << endl; |
301 |
– |
cout << "FILE USED (name): " << (scansample.collection)[0].samplename << endl; |
300 |
|
jzbSel=jzb_cut[ibin]; |
301 |
|
geqleq="geq"; |
302 |
|
automatized=true; |
377 |
|
ipoint++; |
378 |
|
if(!runninglocally&&!do_this_point(ipoint,Npoints,jobnumber,njobs)) continue; |
379 |
|
float result=-987,resulterr=-987; |
380 |
+ |
int scanfileindex=0; |
381 |
+ |
if(ismSUGRA) { |
382 |
+ |
// at the moment only the mSUGRA scan is split up into different zones, this is still pending for SMS |
383 |
+ |
int m0trees = PlottingSetup::m0end; |
384 |
+ |
int m12trees = PlottingSetup::m12end; |
385 |
+ |
|
386 |
+ |
int a = int((PlottingSetup::ScanXzones*mlsp)/(m12trees+1)); |
387 |
+ |
int b = int((PlottingSetup::ScanYzones*mglu)/(m0trees+1)); |
388 |
+ |
scanfileindex=10*a+b; |
389 |
+ |
} |
390 |
|
clock_t start,finish; |
391 |
|
start = clock(); // starting the clock to measure how long the computation takes! |
392 |
|
stringstream addcut; |
393 |
|
addcut << "(TMath::Abs("<<massgluname<<"-"<<mglu<<")<5)&&(TMath::Abs("<<massLSPname<<"-"<<mlsp<<")<5)"; |
394 |
< |
(scansample.collection)[0].events->Draw("eventNum",addcut.str().c_str(),"goff"); |
395 |
< |
float nevents = (scansample.collection)[0].events->GetSelectedRows(); |
394 |
> |
(scansample.collection)[scanfileindex].events->Draw("eventNum",addcut.str().c_str(),"goff"); |
395 |
> |
float nevents = (scansample.collection)[scanfileindex].events->GetSelectedRows(); |
396 |
|
vector<vector<float> > systematics; |
397 |
|
if(nevents<10) { |
398 |
< |
dout << "This point ("<<ipoint<<") with configuration ("<<massgluname<<"="<<mglu<<" , "<<massLSPname<<"="<<mlsp << ") does not contain enough events and will be skipped."<< endl; |
399 |
< |
continue; |
398 |
> |
dout << "This point ("<<ipoint<<") with configuration ("<<massgluname<<"="<<mglu<<" , "<<massLSPname<<"="<<mlsp << ") does not contain enough events and will be skipped."<< endl; |
399 |
> |
continue; |
400 |
|
} else { |
401 |
< |
dout << "OK! This point ("<<ipoint<<") with configuration ("<<massgluname<<"="<<mglu<<" , "<<massLSPname<<"="<<mlsp << ") contains " << nevents << " and will therefore not be skipped."<< endl; |
401 |
> |
dout << "OK! This point ("<<ipoint<<") with configuration ("<<massgluname<<"="<<mglu<<" , "<<massLSPname<<"="<<mlsp << ") contains " << nevents << " and will therefore not be skipped."<< endl; |
402 |
|
} |
403 |
|
if(nevents!=0&&efficiencyonly) { |
404 |
< |
Value effwosigcont = MCefficiency((scansample.collection)[0].events,result,resulterr,mcjzb,requireZ,nevents,addcut.str(),-1); |
404 |
> |
Value effwosigcont = MCefficiency((scansample.collection)[scanfileindex].events,result,resulterr,mcjzb,requireZ,nevents,addcut.str(),-1); |
405 |
|
efficiencymap->Fill(mglu,mlsp,result); |
406 |
|
noscefficiencymap->Fill(mglu,mlsp,effwosigcont.getValue()); |
407 |
|
noscefficiencymap->SetBinError(mglu,mlsp,effwosigcont.getError()); |
412 |
|
ipointmap->Fill(mglu,mlsp,ipoint); |
413 |
|
if(efficiencyonly) continue; |
414 |
|
|
415 |
< |
do_systematics_for_one_file((scansample.collection)[0].events,nevents,"SUSY SCAN", systematics,mcjzb,datajzb,peakerror,requireZ, addcut.str(),ismSUGRA); |
415 |
> |
do_systematics_for_one_file((scansample.collection)[scanfileindex].events,nevents,"SUSY SCAN", systematics,mcjzb,datajzb,peakerror,requireZ, addcut.str(),ismSUGRA); |
416 |
|
float JZBcutat = systematics[0][0]; |
417 |
|
float mceff = systematics[0][1]; |
418 |
|
float mcefferr = systematics[0][2];//MC stat error |
436 |
|
if(!systematicsonly&&!efficiencyonly) { |
437 |
|
dout << "Calculating limit now for "<<massgluname<<"="<<mglu<<" , "<<massLSPname<<"="<<mlsp <<endl; |
438 |
|
vector<float> sigmas; |
439 |
< |
string plotfilename=(string)(TString((scansample.collection)[0].samplename)+TString(massgluname)+TString(any2string(mglu))+TString("__")+TString(massLSPname)+TString(any2string(mlsp))+TString(".png")); |
439 |
> |
string plotfilename=(string)(TString((scansample.collection)[scanfileindex].samplename)+TString(massgluname)+TString(any2string(mglu))+TString("__")+TString(massLSPname)+TString(any2string(mlsp))+TString(".png")); |
440 |
|
do_limit_wrapper(mceff,toterr,ibin,mcjzb,sigmas,plotfilename); |
441 |
|
cout << "back in " << __FUNCTION__ << endl; |
442 |
|
if(sigmas[0]>-0.5) { // negative sigmas are the error signature of do_limit_wrapper, so we want to exclude them. |