#include <PhysicsTools/PFCandProducer/interface/IsolatedPFCandidateSelectorDefinition.h>
Public Types | |
typedef reco::PFCandidateCollection | collection |
typedef container::const_iterator | const_iterator |
typedef std::vector < reco::PFCandidate * > | container |
typedef edm::Handle< collection > | HandleToCollection |
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_ |
Definition at line 7 of file IsolatedPFCandidateSelectorDefinition.h.
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.
Definition at line 10 of file IsolatedPFCandidateSelectorDefinition.h.
Definition at line 13 of file IsolatedPFCandidateSelectorDefinition.h.
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")) { }
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(); }
double IsolatedPFCandidateSelectorDefinition::isolCut_ [private] |