CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
pf2pat::GenericPFJetSelectorDefinition Struct Reference

#include <GenericPFJetSelectorDefinition.h>

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

Public Member Functions

 GenericPFJetSelectorDefinition (const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
 
void select (const HandleToCollection &hc, const edm::Event &e, const edm::EventSetup &s)
 
- Public Member Functions inherited from pf2pat::PFJetSelectorDefinition
const_iterator begin () const
 
const_iterator end () const
 
 PFJetSelectorDefinition ()
 
const containerselected () const
 
size_t size () const
 

Private Attributes

StringCutObjectSelector< reco::PFJetselector_
 

Additional Inherited Members

- Public Types inherited from pf2pat::PFJetSelectorDefinition
typedef reco::PFJetCollection collection
 
typedef boost::transform_iterator< Pointer, container::const_iterator > const_iterator
 
typedef std::vector< reco::PFJetcontainer
 
typedef edm::Handle< collectionHandleToCollection
 
- Protected Attributes inherited from pf2pat::PFJetSelectorDefinition
container selected_
 

Detailed Description

Definition at line 14 of file GenericPFJetSelectorDefinition.h.

Constructor & Destructor Documentation

◆ GenericPFJetSelectorDefinition()

pf2pat::GenericPFJetSelectorDefinition::GenericPFJetSelectorDefinition ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 15 of file GenericPFJetSelectorDefinition.h.

16  : selector_(cfg.getParameter<std::string>("cut")) {}
StringCutObjectSelector< reco::PFJet > selector_

Member Function Documentation

◆ select()

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

Definition at line 18 of file GenericPFJetSelectorDefinition.h.

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

18  {
19  selected_.clear();
20 
21  unsigned key = 0;
22  for (collection::const_iterator pfc = hc->begin(); pfc != hc->end(); ++pfc, ++key) {
23  if (selector_(*pfc)) {
24  selected_.push_back(reco::PFJet(*pfc));
25  reco::CandidatePtr ptrToMother(hc, key);
26  selected_.back().setSourceCandidatePtr(ptrToMother);
27  }
28  }
29  }
Jets made from PFObjects.
Definition: PFJet.h:20
StringCutObjectSelector< reco::PFJet > selector_

Member Data Documentation

◆ selector_

StringCutObjectSelector<reco::PFJet> pf2pat::GenericPFJetSelectorDefinition::selector_
private

Definition at line 32 of file GenericPFJetSelectorDefinition.h.

Referenced by select().