![]() |
![]() |
#include <EventDependentAbsVetos.h>
Public Member Functions | |
virtual void | centerOn (double eta, double phi) |
Set axis for matching jets. | |
OtherJetConstituentsDeltaRVeto (Direction dir, const edm::InputTag &jets, double dRjet, const edm::InputTag &pfCandAssocMap, double dRconstituent) | |
Create a veto specifying the input collection of the jets, the candidates, and the deltaR. | |
virtual void | setEvent (const edm::Event &evt, const edm::EventSetup &es) |
Picks up the directions of the given candidates. | |
virtual bool | veto (double eta, double phi, float value) const |
virtual | ~OtherJetConstituentsDeltaRVeto () |
Private Member Functions | |
void | initialize () |
Private Attributes | |
double | dR2constituent_ |
double | dR2jet_ |
const edm::Event * | evt_ |
std::vector< Direction > | items_ |
edm::InputTag | srcJets_ |
edm::InputTag | srcPFCandAssocMap_ |
Direction | vetoDir_ |
Definition at line 59 of file EventDependentAbsVetos.h.
reco::isodeposit::OtherJetConstituentsDeltaRVeto::OtherJetConstituentsDeltaRVeto | ( | Direction | dir, |
const edm::InputTag & | jets, | ||
double | dRjet, | ||
const edm::InputTag & | pfCandAssocMap, | ||
double | dRconstituent | ||
) | [inline] |
Create a veto specifying the input collection of the jets, the candidates, and the deltaR.
Definition at line 62 of file EventDependentAbsVetos.h.
: evt_(0), vetoDir_(dir), srcJets_(jets), dR2jet_(dRjet*dRjet), srcPFCandAssocMap_(pfCandAssocMap), dR2constituent_(dRconstituent*dRconstituent) { //std::cout << "<OtherJetConstituentsDeltaRVeto::OtherJetConstituentsDeltaRVeto>:" << std::endl; //std::cout << " vetoDir: eta = " << vetoDir_.eta() << ", phi = " << vetoDir_.phi() << std::endl; //std::cout << " srcJets = " << srcJets_.label() << ":" << srcJets_.instance() << std::endl; //std::cout << " dRjet = " << sqrt(dR2jet_) << std::endl; //std::cout << " srcPFCandAssocMap = " << srcPFCandAssocMap_.label() << ":" << srcPFCandAssocMap_.instance() << std::endl; //std::cout << " dRconstituent = " << sqrt(dR2constituent_) << std::endl; }
virtual reco::isodeposit::OtherJetConstituentsDeltaRVeto::~OtherJetConstituentsDeltaRVeto | ( | ) | [inline, virtual] |
Definition at line 79 of file EventDependentAbsVetos.h.
{}
void reco::isodeposit::OtherJetConstituentsDeltaRVeto::centerOn | ( | double | eta, |
double | phi | ||
) | [virtual] |
Set axis for matching jets.
Reimplemented from reco::isodeposit::AbsVeto.
Definition at line 102 of file EventDependentAbsVetos.cc.
{ //std::cout << "<OtherJetConstituentsDeltaRVeto::centerOn>:" << std::endl; //std::cout << " eta = " << eta << std::endl; //std::cout << " phi = " << phi << std::endl; vetoDir_ = Direction(eta,phi); initialize(); }
void reco::isodeposit::OtherJetConstituentsDeltaRVeto::initialize | ( | ) | [private] |
Definition at line 66 of file EventDependentAbsVetos.cc.
References edm::RefVector< C, T, F >::begin(), reco::deltaR2(), edm::RefVector< C, T, F >::end(), customizeTrackingMonitorSeedNumber::idx, edm::Ref< C, T, F >::isNonnull(), metsig::jet, and fwrapper::jets.
{ //std::cout << "<OtherJetConstituentsDeltaRVeto::initialize>:" << std::endl; //std::cout << " vetoDir: eta = " << vetoDir_.eta() << ", phi = " << vetoDir_.phi() << std::endl; assert(evt_); items_.clear(); edm::Handle<reco::PFJetCollection> jets; evt_->getByLabel(srcJets_, jets); typedef edm::AssociationMap<edm::OneToMany<std::vector<reco::PFJet>, std::vector<reco::PFCandidate>, unsigned int> > JetToPFCandidateAssociation; edm::Handle<JetToPFCandidateAssociation> jetToPFCandMap; evt_->getByLabel(srcPFCandAssocMap_, jetToPFCandMap); double dR2min = dR2jet_; reco::PFJetRef matchedJet; size_t numJets = jets->size(); for ( size_t jetIndex = 0; jetIndex < numJets; ++jetIndex ) { reco::PFJetRef jet(jets, jetIndex); double dR2 = ::deltaR2(vetoDir_.eta(), vetoDir_.phi(), jet->eta(), jet->phi()); //std::cout << "jet #" << jetIndex << ": Pt = " << jet->pt() << ", eta = " << jet->eta() << ", phi = " << jet->phi() << " (dR = " << sqrt(dR2) << ")" << std::endl; if ( dR2 < dR2min ) { matchedJet = jet; dR2min = dR2; } } if ( matchedJet.isNonnull() ) { edm::RefVector<reco::PFCandidateCollection> pfCandsMappedToJet = (*jetToPFCandMap)[matchedJet]; int idx = 0; for ( edm::RefVector<reco::PFCandidateCollection>::const_iterator pfCand = pfCandsMappedToJet.begin(); pfCand != pfCandsMappedToJet.end(); ++pfCand ) { //std::cout << "pfCand #" << idx << ": Pt = " << (*pfCand)->pt() << ", eta = " << (*pfCand)->eta() << ", phi = " << (*pfCand)->phi() << std::endl; items_.push_back(Direction((*pfCand)->eta(), (*pfCand)->phi())); ++idx; } } }
void reco::isodeposit::OtherJetConstituentsDeltaRVeto::setEvent | ( | const edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [virtual] |
Picks up the directions of the given candidates.
Implements reco::isodeposit::EventDependentAbsVeto.
Definition at line 60 of file EventDependentAbsVetos.cc.
{ //std::cout << "<OtherJetConstituentsDeltaRVeto::setEvent>:" << std::endl; evt_ = &evt; }
bool reco::isodeposit::OtherJetConstituentsDeltaRVeto::veto | ( | double | eta, |
double | phi, | ||
float | value | ||
) | const [virtual] |
Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum This is true if the deposit is within the stored AbsVeto of any item of the source collection
Implements reco::isodeposit::AbsVeto.
Definition at line 51 of file EventDependentAbsVetos.cc.
References reco::deltaR2(), eta(), and phi.
double reco::isodeposit::OtherJetConstituentsDeltaRVeto::dR2constituent_ [private] |
Definition at line 100 of file EventDependentAbsVetos.h.
double reco::isodeposit::OtherJetConstituentsDeltaRVeto::dR2jet_ [private] |
Definition at line 98 of file EventDependentAbsVetos.h.
const edm::Event* reco::isodeposit::OtherJetConstituentsDeltaRVeto::evt_ [private] |
Definition at line 94 of file EventDependentAbsVetos.h.
std::vector<Direction> reco::isodeposit::OtherJetConstituentsDeltaRVeto::items_ [private] |
Definition at line 101 of file EventDependentAbsVetos.h.
Definition at line 97 of file EventDependentAbsVetos.h.
Definition at line 99 of file EventDependentAbsVetos.h.
Definition at line 96 of file EventDependentAbsVetos.h.