CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
pf2pat::PtMinPFCandidateSelectorDefinition Class Reference

#include <PtMinPFCandidateSelectorDefinition.h>

Inheritance diagram for pf2pat::PtMinPFCandidateSelectorDefinition:
pf2pat::PFCandidateSelectorDefinition

Public Member Functions

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

Private Attributes

double ptMin_
 

Additional Inherited Members

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

Detailed Description

Definition at line 11 of file PtMinPFCandidateSelectorDefinition.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file PtMinPFCandidateSelectorDefinition.h.

14  :
15  ptMin_( cfg.getParameter< double >( "ptMin" ) ) { }
T getParameter(std::string const &) const

Member Function Documentation

void pf2pat::PtMinPFCandidateSelectorDefinition::select ( const HandleToCollection hc,
const edm::EventBase e,
const edm::EventSetup s 
)
inline

Definition at line 18 of file PtMinPFCandidateSelectorDefinition.h.

References assert(), edm::HandleBase::isValid(), relval_steps::key, ptMin_, and pf2pat::PFCandidateSelectorDefinition::selected_.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), and Vispa.Views.AbstractView.AbstractView::restoreSelection().

21  {
22  selected_.clear();
23 
24  assert( hc.isValid() );
25 
26 
27  unsigned key=0;
28  for( collection::const_iterator pfc = hc->begin();
29  pfc != hc->end(); ++pfc, ++key) {
30 
31  if( pfc->pt() > ptMin_ ) {
32  selected_.push_back( reco::PFCandidate(*pfc) );
33  reco::PFCandidatePtr ptrToMother( hc, key );
34  selected_.back().setSourceCandidatePtr( ptrToMother );
35 
36  }
37  }
38  }
assert(m_qm.get())
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
susybsm::HSCParticleCollection hc
Definition: classes.h:25

Member Data Documentation

double pf2pat::PtMinPFCandidateSelectorDefinition::ptMin_
private

Definition at line 43 of file PtMinPFCandidateSelectorDefinition.h.

Referenced by select().