CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
RecoTrackSelector Class Reference

#include <RecoTrackSelector.h>

Inheritance diagram for RecoTrackSelector:
RecoTrackSelectorBase

Public Types

typedef reco::TrackCollection collection
 
typedef container::const_iterator const_iterator
 
typedef std::vector< const reco::Track * > container
 
typedef reco::TrackRef reference_type
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
 RecoTrackSelector ()
 Constructors. More...
 
 RecoTrackSelector (const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
 
void select (const edm::Handle< collection > &c, const edm::Event &event, const edm::EventSetup &es)
 
size_t size () const
 
- Public Member Functions inherited from RecoTrackSelectorBase
void init (const edm::Event &event, const edm::EventSetup &es)
 
bool operator() (const reco::TrackRef &tref) const
 
bool operator() (const reco::Track &t) const
 
bool operator() (const reco::Track &t, const reco::Track::Point &vertex) const
 
 RecoTrackSelectorBase ()
 
 RecoTrackSelectorBase (const edm::ParameterSet &cfg)
 
 RecoTrackSelectorBase (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 

Private Attributes

container selected_
 

Detailed Description

Definition at line 10 of file RecoTrackSelector.h.

Member Typedef Documentation

◆ collection

Definition at line 13 of file RecoTrackSelector.h.

◆ const_iterator

typedef container::const_iterator RecoTrackSelector::const_iterator

Definition at line 15 of file RecoTrackSelector.h.

◆ container

typedef std::vector<const reco::Track*> RecoTrackSelector::container

Definition at line 14 of file RecoTrackSelector.h.

◆ reference_type

Definition at line 12 of file RecoTrackSelector.h.

Constructor & Destructor Documentation

◆ RecoTrackSelector() [1/2]

RecoTrackSelector::RecoTrackSelector ( )
inline

Constructors.

Definition at line 18 of file RecoTrackSelector.h.

18 {}

◆ RecoTrackSelector() [2/2]

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

Definition at line 19 of file RecoTrackSelector.h.

Member Function Documentation

◆ begin()

const_iterator RecoTrackSelector::begin ( void  ) const
inline

Definition at line 21 of file RecoTrackSelector.h.

References selected_.

21 { return selected_.begin(); }

◆ end()

const_iterator RecoTrackSelector::end ( void  ) const
inline

Definition at line 22 of file RecoTrackSelector.h.

References selected_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

22 { return selected_.end(); }

◆ select()

void RecoTrackSelector::select ( const edm::Handle< collection > &  c,
const edm::Event event,
const edm::EventSetup es 
)
inline

Definition at line 24 of file RecoTrackSelector.h.

References HltBtagPostValidation_cff::c, HLT_2024v14_cff::distance, RecoTrackSelectorBase::init(), and selected_.

24  {
25  init(event, es);
26  selected_.clear();
27  for (reco::TrackCollection::const_iterator trk = c->begin(); trk != c->end(); ++trk) {
28  reference_type tkref(c, std::distance(c->begin(), trk));
29  if (operator()(*tkref)) {
30  selected_.push_back(&*trk);
31  }
32  }
33  }
void init(const edm::Event &event, const edm::EventSetup &es)
reco::TrackRef reference_type
Definition: event.py:1

◆ size()

size_t RecoTrackSelector::size ( void  ) const
inline

Definition at line 35 of file RecoTrackSelector.h.

References selected_.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

35 { return selected_.size(); }

Member Data Documentation

◆ selected_

container RecoTrackSelector::selected_
private

Definition at line 38 of file RecoTrackSelector.h.

Referenced by begin(), end(), select(), and size().