CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

SelectZmumuevents Class Reference

#include <MyAna/SelectZmumuevents/src/SelectZmumuevents.cc>

Inheritance diagram for SelectZmumuevents:
edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 SelectZmumuevents (const edm::ParameterSet &)
 ~SelectZmumuevents ()

Private Member Functions

virtual void beginJob ()
virtual void endJob ()
virtual bool filter (edm::Event &, const edm::EventSetup &)

Private Attributes

double _etaMax
edm::InputTag _pfColl
double _ptMin

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 39 of file SelectZmumuevents.cc.


Constructor & Destructor Documentation

SelectZmumuevents::SelectZmumuevents ( const edm::ParameterSet iConfig) [explicit]

Definition at line 66 of file SelectZmumuevents.cc.

  : _etaMax(iConfig.getUntrackedParameter<double>("etaMax")),
    _ptMin(iConfig.getUntrackedParameter<double>("ptMin")),
    _pfColl(iConfig.getUntrackedParameter<edm::InputTag>("pfCol"))
{

}
SelectZmumuevents::~SelectZmumuevents ( )

Definition at line 75 of file SelectZmumuevents.cc.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)
}

Member Function Documentation

void SelectZmumuevents::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDFilter.

Definition at line 111 of file SelectZmumuevents.cc.

{
}
void SelectZmumuevents::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDFilter.

Definition at line 117 of file SelectZmumuevents.cc.

                          {
}
bool SelectZmumuevents::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDFilter.

Definition at line 89 of file SelectZmumuevents.cc.

References _etaMax, _pfColl, _ptMin, abs, and edm::Event::getByLabel().

{
  using namespace edm;
  Handle< View<reco::Candidate> > genParts;
  iEvent.getByLabel(_pfColl, genParts);
  
  int cnt = 0;
  for( edm::View<reco::Candidate>::const_iterator it = genParts->begin(); it != genParts->end(); it++ ) 
  {
    if (std::abs(it->pdgId()) == 13 
        && std::abs(it->eta()) < _etaMax
        && it->pt() > _ptMin ) 
    {
      ++cnt; 
    }
  }

   return cnt>1;
}

Member Data Documentation

double SelectZmumuevents::_etaMax [private]

Definition at line 50 of file SelectZmumuevents.cc.

Referenced by filter().

Definition at line 52 of file SelectZmumuevents.cc.

Referenced by filter().

double SelectZmumuevents::_ptMin [private]

Definition at line 51 of file SelectZmumuevents.cc.

Referenced by filter().