#include <SignPFSpecificAlgo.h>
Public Member Functions | |
void | addPFCandidate (reco::PFCandidatePtr pf) |
void | addPFJets (edm::Handle< edm::View< reco::PFJet > > PFJets) |
TMatrixD | getSignifMatrix () const |
void | setResolutions (metsig::SignAlgoResolutions *resolutions) |
SignPFSpecificAlgo () | |
void | useOriginalPtrs (const edm::ProductID &productID) |
~SignPFSpecificAlgo () | |
Private Attributes | |
metsig::significanceAlgo | algo_ |
std::set< reco::CandidatePtr > | clusteredParticlePtrs_ |
metsig::SignAlgoResolutions * | resolutions_ |
Definition at line 17 of file SignPFSpecificAlgo.h.
metsig::SignPFSpecificAlgo::SignPFSpecificAlgo | ( | ) |
Definition at line 10 of file SignPFSpecificAlgo.cc.
References clusteredParticlePtrs_.
: resolutions_(0), algo_() {clusteredParticlePtrs_.clear();}
metsig::SignPFSpecificAlgo::~SignPFSpecificAlgo | ( | ) |
Definition at line 15 of file SignPFSpecificAlgo.cc.
{}
void metsig::SignPFSpecificAlgo::addPFCandidate | ( | reco::PFCandidatePtr | pf | ) |
Definition at line 57 of file SignPFSpecificAlgo.cc.
{ if(clusteredParticlePtrs_.find(pf) != clusteredParticlePtrs_.end()) { return; //pf candidate already added in jet collection } std::vector<metsig::SigInputObj> vobj; vobj.push_back(resolutions_->evalPF(&(*pf))); algo_.addObjects(vobj); }
void metsig::SignPFSpecificAlgo::addPFJets | ( | edm::Handle< edm::View< reco::PFJet > > | PFJets | ) |
Definition at line 24 of file SignPFSpecificAlgo.cc.
References metsig::jet.
{ std::vector<metsig::SigInputObj> vobj; for(edm::View<reco::PFJet>::const_iterator jet = PFJets->begin(); jet != PFJets->end(); ++jet){ vobj.push_back(resolutions_->evalPFJet(&(*jet))); std::vector<reco::PFCandidatePtr> pfs = jet->getPFConstituents(); for(std::vector<reco::PFCandidatePtr>::const_iterator it=pfs.begin(); it!=pfs.end(); ++it){ reco::CandidatePtr ptr(*it); clusteredParticlePtrs_.insert(ptr); } } algo_.addObjects(vobj); }
TMatrixD metsig::SignPFSpecificAlgo::getSignifMatrix | ( | ) | const [inline] |
Definition at line 28 of file SignPFSpecificAlgo.h.
References algo_, and metsig::significanceAlgo::getSignifMatrix().
{return algo_.getSignifMatrix();}
void metsig::SignPFSpecificAlgo::setResolutions | ( | metsig::SignAlgoResolutions * | resolutions | ) |
Definition at line 18 of file SignPFSpecificAlgo.cc.
{ resolutions_ = resolutions; }
void metsig::SignPFSpecificAlgo::useOriginalPtrs | ( | const edm::ProductID & | productID | ) |
Definition at line 38 of file SignPFSpecificAlgo.cc.
References edm::Ptr< T >::id(), edm::Ptr< T >::isNull(), and cond::rpcobtemp::temp.
{ std::set<reco::CandidatePtr>::const_iterator it=clusteredParticlePtrs_.begin(); reco::CandidatePtr ptr(*it); if(ptr.id()==productID) return; //If the first element is from the right product, return std::set<reco::CandidatePtr> temp; for(; it!=clusteredParticlePtrs_.end(); ++it){ reco::CandidatePtr ptr(*it); while(ptr.id()!=productID){ ptr = ptr->sourceCandidatePtr(0); if(ptr.isNull()) return; //if it does not get to the correct product, return } temp.insert(ptr); } clusteredParticlePtrs_.clear(); clusteredParticlePtrs_ = temp; }
Definition at line 34 of file SignPFSpecificAlgo.h.
Referenced by getSignifMatrix().
std::set<reco::CandidatePtr> metsig::SignPFSpecificAlgo::clusteredParticlePtrs_ [private] |
Definition at line 33 of file SignPFSpecificAlgo.h.
Referenced by SignPFSpecificAlgo().
Definition at line 32 of file SignPFSpecificAlgo.h.