CMS 3D CMS Logo

Public Member Functions | Private Attributes

PVSelector Class Reference

#include <PVSelector.h>

Inheritance diagram for PVSelector:
Selector< edm::EventBase > binary_function

List of all members.

Public Member Functions

bool operator() (edm::EventBase const &event, pat::strbitset &ret)
 This provides the interface for base classes to select objects.
 PVSelector (edm::ParameterSet const &params)
 PVSelector ()
edm::Handle< std::vector
< reco::Vertex > > const & 
vertices () const

Private Attributes

edm::Handle< std::vector
< reco::Vertex > > 
h_primVtx
PVObjectSelector pvSel_
edm::InputTag pvSrc_

Detailed Description

Definition at line 12 of file PVSelector.h.


Constructor & Destructor Documentation

PVSelector::PVSelector ( ) [inline]

Definition at line 15 of file PVSelector.h.

{}
PVSelector::PVSelector ( edm::ParameterSet const &  params) [inline]

Definition at line 17 of file PVSelector.h.

References Selector< edm::EventBase >::getBitTemplate(), and Selector< edm::EventBase >::retInternal_.

                                              :
  pvSrc_ (params.getParameter<edm::InputTag>("pvSrc") ),
  pvSel_ (params) 
  {
    retInternal_ = getBitTemplate();
  }

Member Function Documentation

bool PVSelector::operator() ( edm::EventBase const &  t,
pat::strbitset ret 
) [inline, virtual]

This provides the interface for base classes to select objects.

Implements Selector< edm::EventBase >.

Definition at line 24 of file PVSelector.h.

References h_primVtx, pvSel_, and pvSrc_.

                                                                      {
    event.getByLabel(pvSrc_, h_primVtx);

    // check if there is a good primary vertex

    if ( h_primVtx->size() < 1 ) return false;

    reco::Vertex const & pv = h_primVtx->at(0);

    return pvSel_( pv );
  }
edm::Handle<std::vector<reco::Vertex> > const& PVSelector::vertices ( ) const [inline]

Definition at line 38 of file PVSelector.h.

References h_primVtx.

{ return h_primVtx; }

Member Data Documentation

Definition at line 43 of file PVSelector.h.

Referenced by operator()(), and vertices().

Definition at line 42 of file PVSelector.h.

Referenced by operator()().

Definition at line 41 of file PVSelector.h.

Referenced by operator()().