ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.cc
(Generate patch)

Comparing UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.cc (file contents):
Revision 1.102 by wulsin, Mon Jul 22 15:22:57 2013 UTC vs.
Revision 1.105 by wulsin, Mon Jul 22 16:33:25 2013 UTC

# Line 642 | Line 642 | OSUAnalysis::OSUAnalysis (const edm::Par
642      clog << "Listing run:lumi:event in file findEvents.txt for events that pass full selection (of any channel)." << endl;  
643    }
644  
645 +  isFirstEvent_ = true;  
646 +
647   } // end constructor OSUAnalysis::OSUAnalysis()
648  
649  
# Line 654 | Line 656 | OSUAnalysis::~OSUAnalysis ()
656      delete cutFlows_.at(currentChannel);
657    }
658  
659 <  if (findEventsLog) findEventsLog->close();  
659 >  if (printEventInfo_ && findEventsLog) findEventsLog->close();  
660  
661    clog << "=============================================" << endl;  
662    clog << "Successfully completed OSUAnalysis." << endl;  
# Line 730 | Line 732 | OSUAnalysis::produce (edm::Event &event,
732    //get pile-up event weight
733    if (doPileupReweighting_ && datasetType_ != "data") {
734      //for "data" datasets, the numTruePV is always set to -1
735 <    if (events->at(0).numTruePV < 0) clog << "WARNING[OSUAnalysis::analyze]: Event has numTruePV<0.  Turning off pile-up reweighting." << endl;
735 >    if (events->at(0).numTruePV < 0 && isFirstEvent_) clog << "WARNING[OSUAnalysis::analyze]: Event has numTruePV<0.  Turning off pile-up reweighting." << endl;
736      else masterScaleFactor *= puWeight_->at (events->at (0).numTruePV);
737    }
738  
# Line 1355 | Line 1357 | OSUAnalysis::produce (edm::Event &event,
1357  
1358    event.put (channelDecisions, "channelDecisions");
1359  
1360 < } // end void OSUAnalysis::analyze (const edm::Event &event, const edm::EventSetup &setup)
1360 >  isFirstEvent_ = false;  
1361 >
1362 > } // end void OSUAnalysis::produce (const edm::Event &event, const edm::EventSetup &setup)
1363  
1364  
1365  
# Line 2287 | Line 2291 | OSUAnalysis::valueLookup (const BNelectr
2291        }
2292    }
2293  
2294 <  else if(variable == "looseID"){
2294 >  else if(variable == "looseID_MVA"){
2295      value = object->pt > 10
2296        && object->mvaNonTrigV0 > 0;
2297        }
# Line 2789 | Line 2793 | OSUAnalysis::valueLookup (const BNtrack*
2793    else if(variable == "dZwrtBS") value = object->dZ - events->at(0).BSz;
2794    else if(variable == "depTrkRp5MinusPt"){
2795      if ( (object->depTrkRp5 - object->pt) < 0 ) {
2796 + //       cout << "Warning:  found track with depTrkRp5 < pt:  depTrkRp5=" << object->depTrkRp5
2797 + //         << "; pt=" << object->pt
2798 + //         << "; object->depTrkRp5 - object->pt = " << object->depTrkRp5 - object->pt
2799 + //         << endl;  
2800             value = 0;
2801           }
2802           else value =  (object->depTrkRp5 - object->pt);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines