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

Comparing UserCode/cbrown/AnalysisFramework/Plotting/Modules/SUSYScan.C (file contents):
Revision 1.35 by buchmann, Tue Sep 13 09:18:42 2011 UTC vs.
Revision 1.36 by buchmann, Thu Sep 22 14:41:00 2011 UTC

# Line 320 | Line 320 | cout << "FILE USED (name): " << (scansam
320    TH2F *systotmap = new TH2F((prefix+"systotmap"+any2string(jzbSel)).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);
321    TH2F *sysstatmap = new TH2F((prefix+"sysstatmap"+any2string(jzbSel)).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);
322  
323 <
324 <
323 >  TH2F *timemap = new TH2F((prefix+"timemap"+any2string(jzbSel)).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);
324 >  
325   write_warning(__FUNCTION__,"CURRENTLY SWITCHING AUTOMATIZED MODE OFF!");automatized=false;
326  
327    float rightmargin=gStyle->GetPadRightMargin();
# Line 341 | Line 341 | write_warning(__FUNCTION__,"CURRENTLY SW
341        ipoint++;
342        if(!runninglocally&&!do_this_point(ipoint,Npoints,jobnumber,njobs)) continue;
343        float result=-987,resulterr=-987;
344 +      clock_t start,finish;
345 +      start = clock(); // starting the clock to measure how long the computation takes!
346        stringstream addcut;
347        addcut << "(TMath::Abs("<<massgluname<<"-"<<mglu<<")<5)&&(TMath::Abs("<<massLSPname<<"-"<<mlsp<<")<5)";
348        (scansample.collection)[0].events->Draw("eventNum",addcut.str().c_str(),"goff");
# Line 353 | Line 355 | write_warning(__FUNCTION__,"CURRENTLY SW
355      dout << "OK! This point ("<<ipoint<<") with configuration ("<<massgluname<<"="<<mglu<<" , "<<massLSPname<<"="<<mlsp << ") contains " << nevents << " and will therefore not be skipped."<< endl;
356        }
357        if(nevents!=0&&efficiencyonly) {
358 <    MCefficiency((scansample.collection)[0].events,result,resulterr,mcjzb,requireZ,nevents,addcut.str(),-1);
359 <    efficiencymap->Fill(mglu,mlsp,result);
358 >          MCefficiency((scansample.collection)[0].events,result,resulterr,mcjzb,requireZ,nevents,addcut.str(),-1);
359 >          efficiencymap->Fill(mglu,mlsp,result);
360 >          finish = clock();
361 >          timemap->Fill(mglu,mlsp,((float(finish)-float(start))/CLOCKS_PER_SEC));
362        }
363        Neventsmap->Fill(mglu,mlsp,nevents);
364        ipointmap->Fill(mglu,mlsp,ipoint);
# Line 393 | Line 397 | write_warning(__FUNCTION__,"CURRENTLY SW
397          sysstatmap->Fill(mglu,mlsp,mcefferr);//total relative (!) error
398          dout << "A limit has been added at " << sigmas[0] << " for m_{glu}="<<mglu << " and m_{lsp}="<<mlsp<<endl;
399        } //end of if sigma is positive
400 +      finish = clock();
401 +      timemap->Fill(mglu,mlsp,((float(finish)-float(start))/CLOCKS_PER_SEC));
402 +
403      //end of not systematics only condition
404      }
405      if(systematicsonly) {
# Line 402 | Line 409 | write_warning(__FUNCTION__,"CURRENTLY SW
409          syspdfmap->Fill(mglu,mlsp,sys_pdf);
410          systotmap->Fill(mglu,mlsp,toterr/mceff);//total relative (!) error
411          sysstatmap->Fill(mglu,mlsp,mcefferr);//total relative (!) error
412 +        finish = clock();
413 +        timemap->Fill(mglu,mlsp,((float(finish)-float(start))/CLOCKS_PER_SEC));
414      }
415        }//efficiency is valid
416      }
# Line 414 | Line 423 | write_warning(__FUNCTION__,"CURRENTLY SW
423    prepare_scan_axis(syspdfmap,ismSUGRA);
424    prepare_scan_axis(systotmap,ismSUGRA);
425    prepare_scan_axis(sysstatmap,ismSUGRA);
426 +  prepare_scan_axis(timemap,ismSUGRA);
427  
428    if(!systematicsonly&&!efficiencyonly) {
429      limcanvas->cd();
# Line 438 | Line 448 | write_warning(__FUNCTION__,"CURRENTLY SW
448        sysstatmap->Write();
449        Neventsmap->Write();
450        ipointmap->Write();
451 +      timemap->Write();
452        outputfile->Close();
453      }
454    }
# Line 479 | Line 490 | write_warning(__FUNCTION__,"CURRENTLY SW
490        syspdfmap->Write();
491        systotmap->Write();
492        sysstatmap->Write();
493 +      timemap->Write();
494        outputfile->Close();
495      }
496    }//end of systematics only
# Line 506 | Line 518 | write_warning(__FUNCTION__,"CURRENTLY SW
518        ipointmap->Write();
519        Neventsmap->Write();
520        efficiencymap->Write();
521 +      timemap->Write();
522        outputfile->Close();
523      }
524    }//end of efficiencies only

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines