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.14 by buchmann, Tue Aug 16 17:08:40 2011 UTC vs.
Revision 1.15 by buchmann, Wed Aug 17 11:06:50 2011 UTC

# Line 257 | Line 257 | void scan_SUSY_parameter_space(string mc
257        addcut << "(TMath::Abs("<<massgluname<<"-"<<mglu<<")<5)&&(TMath::Abs("<<massLSPname<<"-"<<mlsp<<")<5)";
258        (scansample.collection)[0].events->Draw("eventNum",addcut.str().c_str(),"goff");
259        float nevents = (scansample.collection)[0].events->GetSelectedRows();
260 +      if(nevents==0) continue;
261        vector<vector<float> > systematics;
262 <      MCefficiency((scansample.collection)[0].events,result,resulterr,mcjzb,requireZ,nevents,addcut.str());
263 <      if(result!=result||resulterr!=resulterr) {
264 <        dout << "Limits can't be calculated for this configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") as either the efficiency or its error are not numbers! (result="<<result<<" and resulterr="<<resulterr<<")"<< endl;
262 >      if(nevents!=0) MCefficiency((scansample.collection)[0].events,result,resulterr,mcjzb,requireZ,nevents,addcut.str());
263 >      if(nevents==0||result!=result||resulterr!=resulterr) {
264 >        dout << "Limits can't be calculated for this configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") as either the efficiency or its error are not numbers or the number of events is zero! (result="<<result<<" and resulterr="<<resulterr<<"; Nevents=" << nevents << ")"<< endl;
265          continue;
266        } else {
267          dout << "Configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") passed the mcefficiency test." << endl;
# Line 280 | Line 281 | void scan_SUSY_parameter_space(string mc
281        
282   //      cout << "EXTRACTED THE FOLLOWING INFORMATION: mceff=" << mceff << " , toterr=" << toterr << " , sys_jes=" << sys_jes << " , sys_jsu=" << sys_jsu << " , sys_res = " << sys_res << endl;
283        
284 <      if(mceff!=mceff||toterr!=toterr) {
285 <        dout << "Limits can't be calculated for this configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") as either the efficiency or its error are not numbers! (mceff="<<mceff<<" and toterr="<<toterr<<")"<< endl;
284 >      if(mceff!=mceff||toterr!=toterr||mceff<0) {
285 >        dout << "Limits can't be calculated for this configuration (mglu="<<mglu<<" , mlsp="<<mlsp << ") as either the efficiency or its error are not positive numbers! (mceff="<<mceff<<" and toterr="<<toterr<<")"<< endl;
286          continue;
287        } else {
288          if(!systematicsonly&&!efficiencyonly) {
# Line 300 | Line 301 | void scan_SUSY_parameter_space(string mc
301              sysjsumap->Fill(mglu,mlsp,sys_jsu);
302              sysresmap->Fill(mglu,mlsp,sys_res);
303          }
304 <      }
304 >      }//efficiency is valid
305      }
306    }
307    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines