CMS 3D CMS Logo

IsolatedPFCandidateSelectorDefinition Struct Reference

#include <PhysicsTools/PFCandProducer/interface/IsolatedPFCandidateSelectorDefinition.h>

List of all members.

Public Types

typedef reco::PFCandidateCollection collection
typedef container::const_iterator const_iterator
typedef std::vector
< reco::PFCandidate * > 
container
typedef edm::Handle< collectionHandleToCollection
typedef edm::ValueMap< double > isoFromDepositsMap

Public Member Functions

const_iterator begin () const
const_iterator end () const
 IsolatedPFCandidateSelectorDefinition (const edm::ParameterSet &cfg)
void select (const HandleToCollection &hc, const edm::Event &e, const edm::EventSetup &s)
size_t size () const

Private Attributes

edm::InputTag isoDepositMap_
double isolCut_
container selected_


Detailed Description

Definition at line 7 of file IsolatedPFCandidateSelectorDefinition.h.


Member Typedef Documentation

typedef reco::PFCandidateCollection IsolatedPFCandidateSelectorDefinition::collection

Definition at line 9 of file IsolatedPFCandidateSelectorDefinition.h.

typedef container::const_iterator IsolatedPFCandidateSelectorDefinition::const_iterator

Definition at line 12 of file IsolatedPFCandidateSelectorDefinition.h.

typedef std::vector< reco::PFCandidate *> IsolatedPFCandidateSelectorDefinition::container

Definition at line 11 of file IsolatedPFCandidateSelectorDefinition.h.

typedef edm::Handle< collection > IsolatedPFCandidateSelectorDefinition::HandleToCollection

Definition at line 10 of file IsolatedPFCandidateSelectorDefinition.h.

typedef edm::ValueMap<double> IsolatedPFCandidateSelectorDefinition::isoFromDepositsMap

Definition at line 13 of file IsolatedPFCandidateSelectorDefinition.h.


Constructor & Destructor Documentation

IsolatedPFCandidateSelectorDefinition::IsolatedPFCandidateSelectorDefinition ( const edm::ParameterSet cfg  )  [inline]

Definition at line 15 of file IsolatedPFCandidateSelectorDefinition.h.

00015                                                                         :
00016     isoDepositMap_(cfg.getParameter<edm::InputTag>("IsoDeposit") ),
00017     isolCut_(cfg.getParameter<double>("IsolationCut")) { }


Member Function Documentation

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

Definition at line 19 of file IsolatedPFCandidateSelectorDefinition.h.

References selected_.

00019 { return selected_.begin(); }

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

Definition at line 21 of file IsolatedPFCandidateSelectorDefinition.h.

References selected_.

00021 { return selected_.end(); }

void IsolatedPFCandidateSelectorDefinition::select ( const HandleToCollection hc,
const edm::Event e,
const edm::EventSetup s 
) [inline]

Definition at line 23 of file IsolatedPFCandidateSelectorDefinition.h.

References c, edm::Event::getByLabel(), isoDepositMap_, isolCut_, edm::Handle< T >::isValid(), getDQMSummary::key, and selected_.

00025                                        {
00026     selected_.clear();
00027     
00028     assert( hc.isValid() );
00029 
00030     edm::Handle<isoFromDepositsMap  > iso;
00031     e.getByLabel(isoDepositMap_,iso);
00032     const isoFromDepositsMap & qq= *(iso);
00033     
00034     unsigned key=0;
00035     //    for( unsigned i=0; i<collection->size(); i++ ) {
00036     for( collection::const_iterator pfc = hc->begin(); 
00037          pfc != hc->end(); ++pfc, ++key) {
00038       reco::PFCandidateRef c(hc,key);
00039       float val = qq[c];
00040   
00041     
00042       if (val<isolCut_) {
00043 
00044         selected_.push_back( new reco::PFCandidate(*pfc) );
00045         reco::PFCandidatePtr ptrToMother( hc, key );
00046 
00047         selected_.back()->setSourcePtr( ptrToMother );
00048       }
00049     }
00050   }

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

Definition at line 52 of file IsolatedPFCandidateSelectorDefinition.h.

References selected_.

00052 { return selected_.size(); }


Member Data Documentation

edm::InputTag IsolatedPFCandidateSelectorDefinition::isoDepositMap_ [private]

Definition at line 55 of file IsolatedPFCandidateSelectorDefinition.h.

Referenced by select().

double IsolatedPFCandidateSelectorDefinition::isolCut_ [private]

Definition at line 56 of file IsolatedPFCandidateSelectorDefinition.h.

Referenced by select().

container IsolatedPFCandidateSelectorDefinition::selected_ [private]

Definition at line 57 of file IsolatedPFCandidateSelectorDefinition.h.

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


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:25:55 2009 for CMSSW by  doxygen 1.5.4