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 |
|
} |
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 |
|
{ |