CMS 3D CMS Logo

TrackParticleSelector< Collection, Category > Class Template Reference

Selector to select only tracking particles originating from a B-hadron decay. More...

#include <SimTracker/TrackHistory/plugins/TrackParticleSelector.h>

List of all members.

Public Types

typedef Collection collection
typedef container::const_iterator const_iterator
typedef std::vector< const type * > container
typedef Collection::value_type type

Public Member Functions

const_iterator begin () const
const_iterator end () const
void select (const edm::Handle< collection > &TPCH, const edm::Event &iEvent, const edm::EventSetup &iSetup)
size_t size () const
 TrackParticleSelector (const edm::ParameterSet &pset)

Public Attributes

container selected_

Private Attributes

TrackClassifier classifier_


Detailed Description

template<typename Collection, TrackCategories::Category Category>
class TrackParticleSelector< Collection, Category >

Selector to select only tracking particles originating from a B-hadron decay.

Definition at line 17 of file TrackParticleSelector.h.


Member Typedef Documentation

template<typename Collection, TrackCategories::Category Category>
typedef Collection TrackParticleSelector< Collection, Category >::collection

Definition at line 23 of file TrackParticleSelector.h.

template<typename Collection, TrackCategories::Category Category>
typedef container::const_iterator TrackParticleSelector< Collection, Category >::const_iterator

Definition at line 32 of file TrackParticleSelector.h.

template<typename Collection, TrackCategories::Category Category>
typedef std::vector<const type *> TrackParticleSelector< Collection, Category >::container

Definition at line 29 of file TrackParticleSelector.h.

template<typename Collection, TrackCategories::Category Category>
typedef Collection::value_type TrackParticleSelector< Collection, Category >::type

Definition at line 26 of file TrackParticleSelector.h.


Constructor & Destructor Documentation

template<typename Collection, TrackCategories::Category Category>
TrackParticleSelector< Collection, Category >::TrackParticleSelector ( const edm::ParameterSet pset  )  [inline]

Definition at line 35 of file TrackParticleSelector.h.

00035 : classifier_(pset) {}


Member Function Documentation

template<typename Collection, TrackCategories::Category Category>
const_iterator TrackParticleSelector< Collection, Category >::begin ( void   )  const [inline]

Definition at line 60 of file TrackParticleSelector.h.

References TrackParticleSelector< Collection, Category >::selected_.

00061     {
00062         return selected_.begin();
00063     }

template<typename Collection, TrackCategories::Category Category>
const_iterator TrackParticleSelector< Collection, Category >::end ( void   )  const [inline]

Definition at line 66 of file TrackParticleSelector.h.

References TrackParticleSelector< Collection, Category >::selected_.

00067     {
00068         return selected_.end();
00069     }

template<typename Collection, TrackCategories::Category Category>
void TrackParticleSelector< Collection, Category >::select ( const edm::Handle< collection > &  TPCH,
const edm::Event iEvent,
const edm::EventSetup iSetup 
) [inline]

Definition at line 39 of file TrackParticleSelector.h.

References TrackParticleSelector< Collection, Category >::classifier_, TrackClassifier::evaluate(), i, TrackClassifier::is(), TrackClassifier::newEvent(), edm::Handle< T >::product(), TrackParticleSelector< Collection, Category >::selected_, and tp.

00040     {
00041         selected_.clear();
00042 
00043         const collection & tpc = *(TPCH.product());
00044 
00045         classifier_.newEvent(iEvent, iSetup);
00046 
00047         for (typename collection::size_type i=0; i<tpc.size(); i++)
00048         {
00049             edm::Ref<Collection> tp(TPCH, i);
00050 
00051             if ( classifier_.evaluate(tp).is(Category) )
00052             {
00053                 const type * trap = &(tpc[i]);
00054                 selected_.push_back(trap);
00055             }
00056         }
00057     }

template<typename Collection, TrackCategories::Category Category>
size_t TrackParticleSelector< Collection, Category >::size ( void   )  const [inline]

Definition at line 72 of file TrackParticleSelector.h.

References TrackParticleSelector< Collection, Category >::selected_.

00073     {
00074         return selected_.size();
00075     }


Member Data Documentation

template<typename Collection, TrackCategories::Category Category>
TrackClassifier TrackParticleSelector< Collection, Category >::classifier_ [private]

Definition at line 83 of file TrackParticleSelector.h.

Referenced by TrackParticleSelector< Collection, Category >::select().

template<typename Collection, TrackCategories::Category Category>
container TrackParticleSelector< Collection, Category >::selected_

Definition at line 79 of file TrackParticleSelector.h.

Referenced by TrackParticleSelector< Collection, Category >::begin(), TrackParticleSelector< Collection, Category >::end(), TrackParticleSelector< Collection, Category >::select(), and TrackParticleSelector< Collection, Category >::size().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:34:17 2009 for CMSSW by  doxygen 1.5.4