CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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

Public Member Functions

 SelectZmumuevents (const edm::ParameterSet &)
 
 ~SelectZmumuevents ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

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
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
typedef WorkerT< EDFilterWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDFilter
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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.

67  : _etaMax(iConfig.getUntrackedParameter<double>("etaMax")),
68  _ptMin(iConfig.getUntrackedParameter<double>("ptMin")),
70 {
71 
72 }
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag _pfColl
SelectZmumuevents::~SelectZmumuevents ( )

Definition at line 75 of file SelectZmumuevents.cc.

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

Member Function Documentation

void SelectZmumuevents::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDFilter.

Definition at line 111 of file SelectZmumuevents.cc.

112 {
113 }
void SelectZmumuevents::endJob ( void  )
privatevirtual

Reimplemented from edm::EDFilter.

Definition at line 117 of file SelectZmumuevents.cc.

117  {
118 }
bool SelectZmumuevents::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDFilter.

Definition at line 89 of file SelectZmumuevents.cc.

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

90 {
91  using namespace edm;
93  iEvent.getByLabel(_pfColl, genParts);
94 
95  int cnt = 0;
96  for( edm::View<reco::Candidate>::const_iterator it = genParts->begin(); it != genParts->end(); it++ )
97  {
98  if (std::abs(it->pdgId()) == 13
99  && std::abs(it->eta()) < _etaMax
100  && it->pt() > _ptMin )
101  {
102  ++cnt;
103  }
104  }
105 
106  return cnt>1;
107 }
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
#define abs(x)
Definition: mlp_lapack.h:159
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
edm::InputTag _pfColl

Member Data Documentation

double SelectZmumuevents::_etaMax
private

Definition at line 50 of file SelectZmumuevents.cc.

Referenced by filter().

edm::InputTag SelectZmumuevents::_pfColl
private

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().