CMS 3D CMS Logo

BTrackingParticleSelector Class Reference

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

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

List of all members.

Public Types

typedef TrackingParticleCollection collection
typedef container::const_iterator const_iterator
typedef std::vector< const
TrackingParticle * > 
container

Public Member Functions

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

Public Attributes

TrackClassifier classifier_
container selected_


Detailed Description

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

Definition at line 13 of file BTrackingParticleSelector.h.


Member Typedef Documentation

typedef TrackingParticleCollection BTrackingParticleSelector::collection

Definition at line 18 of file BTrackingParticleSelector.h.

typedef container::const_iterator BTrackingParticleSelector::const_iterator

Definition at line 25 of file BTrackingParticleSelector.h.

typedef std::vector<const TrackingParticle*> BTrackingParticleSelector::container

Definition at line 22 of file BTrackingParticleSelector.h.


Constructor & Destructor Documentation

BTrackingParticleSelector::BTrackingParticleSelector ( const edm::ParameterSet iConfig  )  [inline]

Definition at line 28 of file BTrackingParticleSelector.h.

00028 : classifier_(iConfig) {};


Member Function Documentation

const_iterator BTrackingParticleSelector::begin ( void   )  const [inline]

Definition at line 51 of file BTrackingParticleSelector.h.

References selected_.

00052     {
00053         return selected_.begin();
00054     }

const_iterator BTrackingParticleSelector::end ( void   )  const [inline]

Definition at line 57 of file BTrackingParticleSelector.h.

References selected_.

00058     {
00059         return selected_.end();
00060     }

void BTrackingParticleSelector::select ( const edm::Handle< collection > &  TPCH,
const edm::Event iEvent,
const edm::EventSetup iSetup 
) [inline]

Definition at line 32 of file BTrackingParticleSelector.h.

References TrackCategories::BWeakDecay, classifier_, TrackClassifier::evaluate(), i, TrackClassifier::is(), edm::Handle< T >::product(), selected_, and tp.

00033     {
00034         selected_.clear();
00035 
00036         const collection & tpc = *(TPCH.product());
00037 
00038         for (TrackingParticleCollection::size_type i=0; i<tpc.size(); i++)
00039         {
00040             TrackingParticleRef tp(TPCH, i);
00041 
00042             if ( classifier_.evaluate(tp).is(TrackCategories::BWeakDecay) )
00043             {
00044                 const TrackingParticle * trap = &(tpc[i]);
00045                 selected_.push_back(trap);
00046             }
00047         }
00048     }

size_t BTrackingParticleSelector::size ( void   )  const [inline]

Definition at line 63 of file BTrackingParticleSelector.h.

References selected_.

00064     {
00065         return selected_.size();
00066     }


Member Data Documentation

TrackClassifier BTrackingParticleSelector::classifier_

Definition at line 71 of file BTrackingParticleSelector.h.

Referenced by select().

container BTrackingParticleSelector::selected_

Definition at line 70 of file BTrackingParticleSelector.h.

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


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