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

Comparing UserCode/OSUT3Analysis/AnaTools/src/OSUAnalysis.cc (file contents):
Revision 1.4 by ahart, Mon Aug 27 18:19:37 2012 UTC vs.
Revision 1.5 by ahart, Tue Aug 28 13:54:58 2012 UTC

# Line 20 | Line 20 | OSUAnalysis::OSUAnalysis (const edm::Par
20  
21   OSUAnalysis::~OSUAnalysis ()
22   {
23 <  // Destroying the CutFlow objects causes the cut flow numbers to be printed
24 <  // to standard output, as well as time information.
23 >  // Destroying the CutFlow objects causes the cut flow numbers and time
24 >  // information to be printed to standard output.
25    delete cuts_;
26    delete muonCuts_;
27   }
# Line 33 | Line 33 | OSUAnalysis::analyze (const edm::Event &
33    edm::Handle<BNmuonCollection> muons;
34    event.getByLabel (muons_, muons);
35  
36 <  // Perform selection on objects within the event. The full collection should
37 <  // only be gone through once.
36 >  // Perform selection on objects within the event while filling the cut flow
37 >  // object specific to this collection.
38    GoodMuonCollection goodMuons (muonCfg_, muons, muonCuts_);
39  
40    // Calculate cut decisions and store the results in the CutFlow object, just
41    // like a map.
42 <  cuts_->at ("minMuons") = goodMuons.size () > 1;
43 <  cuts_->at ("oppositeSign") = cuts_->at ("minMuons") && goodMuons.leadMuon ()->charge * goodMuons.nextToLeadMuon ()->charge < 0;
42 >  cuts_->at ("maxEta") = goodMuons.goodEtaSize () > 1;
43 >  cuts_->at ("minPt") = goodMuons.goodPtSize () > 1;
44 >  cuts_->at ("oppositeSign") = goodMuons.goodSize () > 1 && goodMuons.leadMuon ()->charge * goodMuons.nextToLeadMuon ()->charge < 0;
45  
46    // This causes the cut flow histograms to be filled.
47    cuts_->fillCutFlow ();
48  
49    // Fill additional histograms while applying desired cuts.
50 <  if (cuts_->at ("minMuons") && cuts_->at ("oppositeSign"))
50 >  if (cuts_->at ("oppositeSign"))
51      {
52        for (GoodMuonCollection::const_iterator goodMuon = goodMuons.begin (); goodMuon != goodMuons.end (); goodMuon++)
53          {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines