CMS 3D CMS Logo

Public Member Functions | Private Attributes

pf2pat::GenericPFJetSelectorDefinition Struct Reference

#include <GenericPFJetSelectorDefinition.h>

Inheritance diagram for pf2pat::GenericPFJetSelectorDefinition:
pf2pat::PFJetSelectorDefinition

List of all members.

Public Member Functions

 GenericPFJetSelectorDefinition (const edm::ParameterSet &cfg)
void select (const HandleToCollection &hc, const edm::Event &e, const edm::EventSetup &s)

Private Attributes

StringCutObjectSelector
< reco::PFJet
selector_

Detailed Description

Definition at line 12 of file GenericPFJetSelectorDefinition.h.


Constructor & Destructor Documentation

pf2pat::GenericPFJetSelectorDefinition::GenericPFJetSelectorDefinition ( const edm::ParameterSet cfg) [inline]

Definition at line 14 of file GenericPFJetSelectorDefinition.h.

                                                                   :
      selector_( cfg.getParameter< std::string >( "cut" ) ) { }

Member Function Documentation

void pf2pat::GenericPFJetSelectorDefinition::select ( const HandleToCollection hc,
const edm::Event e,
const edm::EventSetup s 
) [inline]

Definition at line 17 of file GenericPFJetSelectorDefinition.h.

References combine::key, pf2pat::PFJetSelectorDefinition::selected_, and selector_.

                                         {
      selected_.clear();
      
      unsigned key=0;
      for( collection::const_iterator pfc = hc->begin(); 
           pfc != hc->end(); ++pfc, ++key) {
        
        if( selector_(*pfc) ) {
          selected_.push_back( reco::PFJet(*pfc) );
          reco::CandidatePtr ptrToMother( hc, key );
          selected_.back().setSourceCandidatePtr( ptrToMother );
          
        }
      }
    }

Member Data Documentation

Definition at line 36 of file GenericPFJetSelectorDefinition.h.

Referenced by select().