![]() |
![]() |
#include <PFCandWithSuperClusterExtractor.h>
Definition at line 19 of file PFCandWithSuperClusterExtractor.h.
PFCandWithSuperClusterExtractor::PFCandWithSuperClusterExtractor | ( | ) | [inline] |
Definition at line 23 of file PFCandWithSuperClusterExtractor.h.
{};
PFCandWithSuperClusterExtractor::PFCandWithSuperClusterExtractor | ( | const edm::ParameterSet & | par | ) |
Definition at line 12 of file PFCandWithSuperClusterExtractor.cc.
: thePFCandTag(par.getParameter<edm::InputTag>("inputCandView")), theDepositLabel(par.getUntrackedParameter<std::string>("DepositLabel")), theVetoSuperClusterMatch(par.getParameter<bool>("SCMatch_Veto")), theDiff_r(par.getParameter<double>("Diff_r")), theDiff_z(par.getParameter<double>("Diff_z")), theDR_Max(par.getParameter<double>("DR_Max")), theDR_Veto(par.getParameter<double>("DR_Veto")) { // std::cout << " Loading PFCandWithSuperClusterExtractor " << std::endl; }
virtual PFCandWithSuperClusterExtractor::~PFCandWithSuperClusterExtractor | ( | ) | [inline, virtual] |
Definition at line 26 of file PFCandWithSuperClusterExtractor.h.
{}
virtual reco::IsoDeposit PFCandWithSuperClusterExtractor::deposit | ( | const edm::Event & | ev, |
const edm::EventSetup & | evSetup, | ||
const reco::Track & | track | ||
) | const [inline, virtual] |
make single IsoDeposit based on track as input purely virtual: have to implement in concrete implementations
Implements reco::isodeposit::IsoDepositExtractor.
Definition at line 32 of file PFCandWithSuperClusterExtractor.h.
References depositFromObject().
Referenced by depositFromObject().
{ return depositFromObject(ev, evSetup, muon); }
virtual reco::IsoDeposit PFCandWithSuperClusterExtractor::deposit | ( | const edm::Event & | ev, |
const edm::EventSetup & | evSetup, | ||
const reco::Candidate & | track | ||
) | const [inline, virtual] |
make single IsoDeposit based on a candidate as input purely virtual: have to implement in concrete implementations
Reimplemented from reco::isodeposit::IsoDepositExtractor.
Definition at line 37 of file PFCandWithSuperClusterExtractor.h.
References depositFromObject().
{ const reco::Photon * myPhoton= dynamic_cast<const reco::Photon*>(&photon); if(myPhoton) return depositFromObject(ev, evSetup,*myPhoton); const reco::PFCandidate * myPFCand = dynamic_cast<const reco::PFCandidate*>(&photon); return depositFromObject(ev, evSetup,*myPFCand); }
IsoDeposit PFCandWithSuperClusterExtractor::depositFromObject | ( | const edm::Event & | ev, |
const edm::EventSetup & | evSetup, | ||
const reco::Track & | cand | ||
) | const [private] |
Definition at line 69 of file PFCandWithSuperClusterExtractor.cc.
References abs, deltaR(), deposit(), eta(), reco::TrackBase::eta(), phi, reco::TrackBase::phi(), reco::TrackBase::pt(), theDiff_r, theDiff_z, theDR_Max, theDR_Veto, thePFCandTag, reco::TrackBase::vertex(), veto(), and reco::TrackBase::vz().
{ reco::isodeposit::Direction candDir(cand.eta(), cand.phi()); IsoDeposit deposit(candDir ); deposit.setVeto( veto(candDir) ); deposit.addCandEnergy(cand.pt()); Handle< PFCandidateCollection > PFCandH; event.getByLabel(thePFCandTag, PFCandH); double eta = cand.eta(), phi = cand.phi(); reco::Particle::Point vtx = cand.vertex(); for (PFCandidateCollection::const_iterator it = PFCandH->begin(), ed = PFCandH->end(); it != ed; ++it) { double dR = deltaR(it->eta(), it->phi(), eta, phi); if ( (dR < theDR_Max) && (dR > theDR_Veto) && (std::abs(it->vz() - cand.vz()) < theDiff_z) && ((it->vertex() - vtx).Rho() < theDiff_r)) { // ok reco::isodeposit::Direction dirTrk(it->eta(), it->phi()); deposit.addDeposit(dirTrk, it->pt()); } } return deposit; }
IsoDeposit PFCandWithSuperClusterExtractor::depositFromObject | ( | const edm::Event & | ev, |
const edm::EventSetup & | evSetup, | ||
const reco::Photon & | cand | ||
) | const [private] |
Definition at line 41 of file PFCandWithSuperClusterExtractor.cc.
References abs, deltaR(), deposit(), eta(), reco::LeafCandidate::eta(), edm::Ref< C, T, F >::isNonnull(), reco::LeafCandidate::phi(), phi, reco::LeafCandidate::pt(), reco::Photon::superCluster(), theDiff_r, theDiff_z, theDR_Max, theDR_Veto, thePFCandTag, theVetoSuperClusterMatch, reco::LeafCandidate::vertex(), veto(), and reco::LeafCandidate::vz().
Referenced by deposit().
{ reco::isodeposit::Direction candDir(cand.eta(), cand.phi()); IsoDeposit deposit(candDir ); deposit.setVeto( veto(candDir) ); deposit.addCandEnergy(cand.pt()); Handle< PFCandidateCollection > PFCandH; event.getByLabel(thePFCandTag, PFCandH); double eta = cand.eta(), phi = cand.phi(); reco::Particle::Point vtx = cand.vertex(); for (PFCandidateCollection::const_iterator it = PFCandH->begin(), ed = PFCandH->end(); it != ed; ++it) { double dR = deltaR(it->eta(), it->phi(), eta, phi); // veto SC if (theVetoSuperClusterMatch && cand.superCluster().isNonnull() && it->superClusterRef().isNonnull() && cand.superCluster() == it->superClusterRef()) continue; if ( (dR < theDR_Max) && (dR > theDR_Veto) && (std::abs(it->vz() - cand.vz()) < theDiff_z) && ((it->vertex() - vtx).Rho() < theDiff_r)) { // ok reco::isodeposit::Direction dirTrk(it->eta(), it->phi()); deposit.addDeposit(dirTrk, it->pt()); } } return deposit; }
IsoDeposit PFCandWithSuperClusterExtractor::depositFromObject | ( | const edm::Event & | ev, |
const edm::EventSetup & | evSetup, | ||
const reco::PFCandidate & | cand | ||
) | const [private] |
Definition at line 96 of file PFCandWithSuperClusterExtractor.cc.
References abs, deltaR(), deposit(), eta(), reco::LeafCandidate::eta(), edm::Ref< C, T, F >::isNonnull(), reco::LeafCandidate::phi(), phi, reco::LeafCandidate::pt(), reco::PFCandidate::superClusterRef(), theDiff_r, theDiff_z, theDR_Max, theDR_Veto, thePFCandTag, theVetoSuperClusterMatch, reco::PFCandidate::vertex(), veto(), and reco::PFCandidate::vz().
{ reco::isodeposit::Direction candDir(cand.eta(), cand.phi()); IsoDeposit deposit(candDir ); deposit.setVeto( veto(candDir) ); deposit.addCandEnergy(cand.pt()); Handle< PFCandidateCollection > PFCandH; event.getByLabel(thePFCandTag, PFCandH); double eta = cand.eta(), phi = cand.phi(); reco::Particle::Point vtx = cand.vertex(); for (PFCandidateCollection::const_iterator it = PFCandH->begin(), ed = PFCandH->end(); it != ed; ++it) { // veto SC if (theVetoSuperClusterMatch && cand.superClusterRef().isNonnull() && it->superClusterRef().isNonnull() && cand.superClusterRef() == it->superClusterRef()) continue; double dR = deltaR(it->eta(), it->phi(), eta, phi); if ( (dR < theDR_Max) && (dR > theDR_Veto) && (std::abs(it->vz() - cand.vz()) < theDiff_z) && ((it->vertex() - vtx).Rho() < theDiff_r)) { // ok reco::isodeposit::Direction dirTrk(it->eta(), it->phi()); deposit.addDeposit(dirTrk, it->pt()); } } return deposit; }
virtual void PFCandWithSuperClusterExtractor::fillVetos | ( | const edm::Event & | ev, |
const edm::EventSetup & | evSetup, | ||
const reco::TrackCollection & | tracks | ||
) | [inline, virtual] |
fill vetoes: to exclude deposits at IsoDeposit creation stage check concrete extractors if it's no-op !
Implements reco::isodeposit::IsoDepositExtractor.
Definition at line 28 of file PFCandWithSuperClusterExtractor.h.
{ }
reco::IsoDeposit::Veto PFCandWithSuperClusterExtractor::veto | ( | const reco::IsoDeposit::Direction & | dir | ) | const [private] |
Definition at line 32 of file PFCandWithSuperClusterExtractor.cc.
References dir, reco::IsoDeposit::Veto::dR, query::result, theDR_Veto, and reco::IsoDeposit::Veto::vetoDir.
Referenced by depositFromObject().
{ reco::IsoDeposit::Veto result; result.vetoDir = dir; result.dR = theDR_Veto; return result; }
std::string PFCandWithSuperClusterExtractor::theDepositLabel [private] |
Definition at line 62 of file PFCandWithSuperClusterExtractor.h.
double PFCandWithSuperClusterExtractor::theDiff_r [private] |
Definition at line 64 of file PFCandWithSuperClusterExtractor.h.
Referenced by depositFromObject().
double PFCandWithSuperClusterExtractor::theDiff_z [private] |
Definition at line 65 of file PFCandWithSuperClusterExtractor.h.
Referenced by depositFromObject().
double PFCandWithSuperClusterExtractor::theDR_Max [private] |
Definition at line 66 of file PFCandWithSuperClusterExtractor.h.
Referenced by depositFromObject().
double PFCandWithSuperClusterExtractor::theDR_Veto [private] |
Definition at line 67 of file PFCandWithSuperClusterExtractor.h.
Referenced by depositFromObject(), and veto().
Definition at line 61 of file PFCandWithSuperClusterExtractor.h.
Referenced by depositFromObject().
bool PFCandWithSuperClusterExtractor::theVetoSuperClusterMatch [private] |
Definition at line 63 of file PFCandWithSuperClusterExtractor.h.
Referenced by depositFromObject().