CMS 3D CMS Logo

Public Member Functions | Private Attributes

PartonQualifier Class Reference

#include <PartonQualifier.h>

List of all members.

Public Member Functions

bool operator() (const reco::GenParticle &)
 PartonQualifier (const edm::ParameterSet &)
 ~PartonQualifier ()

Private Attributes

std::vector< int > partons_
int status_

Detailed Description

Definition at line 12 of file PartonQualifier.h.


Constructor & Destructor Documentation

PartonQualifier::PartonQualifier ( const edm::ParameterSet cfg) [inline]

Definition at line 26 of file PartonQualifier.h.

                                                          :
  status_ ( cfg.getParameter<int>( "status" ) ),
  partons_( cfg.getParameter<std::vector<int> >( "partons" ) )
{
}
PartonQualifier::~PartonQualifier ( ) [inline]

Definition at line 16 of file PartonQualifier.h.

{};

Member Function Documentation

bool PartonQualifier::operator() ( const reco::GenParticle part) [inline]

Definition at line 33 of file PartonQualifier.h.

References prof2calltree::count, partons_, reco::LeafCandidate::pdgId(), reco::LeafCandidate::status(), and status_.

{
  if( part.status()!=status_) 
    // does the particle have the correct status?
    return false;
  
  if( !(std::count(partons_.begin(), partons_.end(), fabs(part.pdgId()))>0) )
    // is the particle pdg contained in the list of partons?
    return false;
  
  return true;
}

Member Data Documentation

std::vector<int> PartonQualifier::partons_ [private]

Definition at line 22 of file PartonQualifier.h.

Referenced by operator()().

int PartonQualifier::status_ [private]

Definition at line 21 of file PartonQualifier.h.

Referenced by operator()().