CMS 3D CMS Logo

Public Member Functions | Private Attributes

PVObjectSelector Class Reference

#include <PVObjectSelector.h>

Inheritance diagram for PVObjectSelector:
Selector< reco::Vertex > binary_function

List of all members.

Public Member Functions

bool operator() (reco::Vertex const &pv, pat::strbitset &ret)
 This provides the interface for base classes to select objects.
 PVObjectSelector ()
 PVObjectSelector (edm::ParameterSet const &params)

Private Attributes

index_type indexNDOF_
index_type indexRho_
index_type indexZ_

Detailed Description

Definition at line 14 of file PVObjectSelector.h.


Constructor & Destructor Documentation

PVObjectSelector::PVObjectSelector ( ) [inline]

Definition at line 17 of file PVObjectSelector.h.

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

Definition at line 19 of file PVObjectSelector.h.

References Selector< reco::Vertex >::bits_, edm::ParameterSet::exists(), Selector< reco::Vertex >::getBitTemplate(), edm::ParameterSet::getParameter(), indexNDOF_, indexRho_, indexZ_, Selector< reco::Vertex >::push_back(), Selector< reco::Vertex >::retInternal_, and Selector< reco::Vertex >::setIgnoredCuts().

                                                     {
    push_back("PV NDOF", params.getParameter<double>("minNdof") );
    push_back("PV Z", params.getParameter<double>("maxZ") );
    push_back("PV RHO", params.getParameter<double>("maxRho") );
    set("PV NDOF");
    set("PV Z");
    set("PV RHO");

    indexNDOF_ = index_type (&bits_, "PV NDOF");
    indexZ_    = index_type (&bits_, "PV Z");
    indexRho_  = index_type (&bits_, "PV RHO");
    
    if ( params.exists("cutsToIgnore") )
      setIgnoredCuts( params.getParameter<std::vector<std::string> >("cutsToIgnore") );

    retInternal_ = getBitTemplate();
  }

Member Function Documentation

bool PVObjectSelector::operator() ( reco::Vertex const &  t,
pat::strbitset ret 
) [inline, virtual]

This provides the interface for base classes to select objects.

Implements Selector< reco::Vertex >.

Definition at line 37 of file PVObjectSelector.h.

References Selector< reco::Vertex >::cut(), Selector< reco::Vertex >::ignoreCut(), indexNDOF_, indexRho_, indexZ_, reco::Vertex::isFake(), reco::Vertex::ndof(), Selector< reco::Vertex >::passCut(), reco::Vertex::position(), runTheMatrix::ret, Selector< reco::Vertex >::setIgnored(), and reco::Vertex::z().

                                                                {
    if ( pv.isFake() ) return false;

    if ( pv.ndof() >= cut(indexNDOF_, double() )
         || ignoreCut(indexNDOF_)    ) {
      passCut(ret, indexNDOF_ );
      if ( fabs(pv.z()) <= cut(indexZ_, double()) 
           || ignoreCut(indexZ_)    ) {
        passCut(ret, indexZ_ );
        if ( fabs(pv.position().Rho()) <= cut(indexRho_, double() )
             || ignoreCut(indexRho_) ) {
          passCut( ret, indexRho_);
        }
      }
    }

    setIgnored(ret);
  
    return (bool)ret;
  }

Member Data Documentation

Definition at line 61 of file PVObjectSelector.h.

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

Definition at line 63 of file PVObjectSelector.h.

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

Definition at line 62 of file PVObjectSelector.h.

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