ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitHzz4l/Selection/src/applySelection.cc
(Generate patch)

Comparing UserCode/MitHzz4l/Selection/src/applySelection.cc (file contents):
Revision 1.33 by khahn, Sun Jun 3 15:59:56 2012 UTC vs.
Revision 1.36 by khahn, Wed Jun 6 11:42:11 2012 UTC

# Line 225 | Line 225 | int main(int argc, char** argv)
225    TH1F * h_wf11_hpt;
226    if(ctrl.mc) {
227      nt.makeWeightBranch(weights);
228 <    //    nt.makeGenInfoBranch(geninfo);
228 >    if(ctrl.fillGen ) nt.makeGenInfoBranch(geninfo);
229      initEfficiencyWeights();
230      initPUWeights();
231  
# Line 328 | Line 328 | int main(int argc, char** argv)
328        chain->GetEntry(ientry);
329        if(!(ientry%1000)) cerr << "entry: " << ientry << endl;
330  
331 #ifdef HACKED_RHOS
332      float rho = evtrhoMap[info->EvtNum()];
333 #endif
331        string fname = string(chain->GetFile()->GetEndpointUrl()->GetFile());
332        setEra( fname, ctrl );
333  
# Line 389 | Line 386 | int main(int argc, char** argv)
386            fillTriggerNames(hltTable, hltTableStrings );
387          }
388          if( ctrl.debug ) cout << "file is : " << currentFile  << endl;
389 <        fillTriggerNames( hltTable, trigMask, triggerBits );
389 >        fillTriggerBits( hltTable, trigMask, triggerBits );
390          passes_HLT_MC = true; // passed to apply as extern global, just for sync
391          if( !passHLTMC(triggerBits, info->RunNum(), info->EvtNum(), k2012_MC ) ) {
392            passes_HLT_MC = false;
# Line 398 | Line 395 | int main(int argc, char** argv)
395          //
396          // JSON
397          //
398 <        /*
399 <        RunLumiRangeMap::RunLumiPairType rl(info->RunNum(), info->LumiSec());      
400 <        if( !(rlrm.HasRunLumi(rl)) )  {
401 <          if( ctrl.debug ) cout << "\tfails JSON" << endl;
402 <          continue;
398 >        if(!(ctrl.noJSON) ) {
399 >          RunLumiRangeMap::RunLumiPairType rl(info->RunNum(), info->LumiSec());      
400 >          if( !(rlrm.HasRunLumi(rl)) )  {
401 >            if( ctrl.debug ) cout << "\tfails JSON" << endl;
402 >            continue;
403 >          }
404          }
405 <        */
405 >
406          //
407          // trigger
408          //
# Line 417 | Line 415 | int main(int argc, char** argv)
415          }
416          if( ctrl.debug ) cout << "file is : " << currentFile  << endl;
417          /*
418 <        fillTriggerNames( hltTable, trigMask, triggerBits );
418 >        fillTriggerBits( hltTable, trigMask, triggerBits );
419          if( !passHLT(triggerBits, info->RunNum(), info->EvtNum() ) ) {
420            if( ctrl.debug ) cout << "\tfails trigger ... " << endl;
421            continue;
# Line 437 | Line 435 | int main(int argc, char** argv)
435          apply_HZZ4L_reference_selection(ctrl, info,
436                                          vtxArr,
437                                          pfArr,
440 #ifdef HACKED_RHOS
441                                        rho,
442 #else
438                                          puDArr,
444 #endif
439                                          electronArr,
440                                          &electronReferencePreSelection,
441                                          &electronReferenceIDMVASelectionV1,
# Line 500 | Line 494 | int main(int argc, char** argv)
494          //      if( pass > 3 ) break;
495  
496        } else if( ret4l.status.selectionBits.test(PASS_GOODZ1) &&
497 <                 ret4l.status.selectionBits.to_ulong() < PASS_4L) { // save for fakes ...
498 <        //      if(ctrl.debug) {
497 >                 ret4l.status.selectionBits.to_ulong() < (1UL<<PASS_4L)) { // save for fakes ...
498 >        if(ctrl.debug) {
499            cout << "failingLeptons : " << failingLeptons.size() << endl;
500            for( int f=0; f<failingLeptons.size(); f++ ) {
501              SimpleLepton  l = failingLeptons[f];
# Line 510 | Line 504 | int main(int argc, char** argv)
504                   << "pT: " << l.vec.Pt()  << "\t"
505                   << "eta: " << l.vec.Eta()
506                   << endl;
507 <            //    }
507 >          }
508          }
509          foTree.Fill();
510 +      } else {
511 +        cout << "failing with some other code : " << ret4l.status.selectionBits << endl;
512        }
513      }  
514  
# Line 607 | Line 603 | void initRunLumiRangeMap()
603    // r11b
604    rlrm.AddJSONFile(std::string("./data/Cert_160404-180252_7TeV_PromptReco_Collisions11_JSON.txt"));  
605    */
606 +
607 +  // 2012 only for now ...
608 +  rlrm.AddJSONFile(std::string("./data/Cert_190456-194479_8TeV_PromptReco_Collisions12_JSON.txt"));  
609 +
610   };
611  
612  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines