CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::isodeposit::OtherCandidatesDeltaRVeto Class Reference

#include <EventDependentAbsVetos.h>

Inheritance diagram for reco::isodeposit::OtherCandidatesDeltaRVeto:
reco::isodeposit::EventDependentAbsVeto reco::isodeposit::AbsVeto

Public Member Functions

void centerOn (double eta, double phi) override
 Nothing to do for this. More...
 
 OtherCandidatesDeltaRVeto (const edm::InputTag &candidates, double deltaR, edm::ConsumesCollector &iC)
 Create a veto specifying the input collection of the candidates, and the deltaR. More...
 
void setEvent (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 Picks up the directions of the given candidates. More...
 
bool veto (double eta, double phi, float value) const override
 
 ~OtherCandidatesDeltaRVeto () override
 
- Public Member Functions inherited from reco::isodeposit::EventDependentAbsVeto
 ~EventDependentAbsVeto () override
 
- Public Member Functions inherited from reco::isodeposit::AbsVeto
virtual ~AbsVeto ()
 

Private Attributes

float deltaR2_
 
std::vector< Directionitems_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
 

Detailed Description

Definition at line 14 of file EventDependentAbsVetos.h.

Constructor & Destructor Documentation

◆ OtherCandidatesDeltaRVeto()

reco::isodeposit::OtherCandidatesDeltaRVeto::OtherCandidatesDeltaRVeto ( const edm::InputTag candidates,
double  deltaR,
edm::ConsumesCollector iC 
)
inline

Create a veto specifying the input collection of the candidates, and the deltaR.

Definition at line 17 of file EventDependentAbsVetos.h.

◆ ~OtherCandidatesDeltaRVeto()

reco::isodeposit::OtherCandidatesDeltaRVeto::~OtherCandidatesDeltaRVeto ( )
inlineoverride

Definition at line 21 of file EventDependentAbsVetos.h.

21 {}

Member Function Documentation

◆ centerOn()

void reco::isodeposit::OtherCandidatesDeltaRVeto::centerOn ( double  eta,
double  phi 
)
inlineoverridevirtual

Nothing to do for this.

Reimplemented from reco::isodeposit::AbsVeto.

Definition at line 28 of file EventDependentAbsVetos.h.

28 {}

◆ setEvent()

void reco::isodeposit::OtherCandidatesDeltaRVeto::setEvent ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Picks up the directions of the given candidates.

Implements reco::isodeposit::EventDependentAbsVeto.

Definition at line 15 of file EventDependentAbsVetos.cc.

15  {
16  items_.clear();
18  iEvent.getByToken(src_, candidates);
19  for (edm::View<reco::Candidate>::const_iterator it = candidates->begin(), ed = candidates->end(); it != ed; ++it) {
20  items_.push_back(Direction(it->eta(), it->phi()));
21  }
22 }

References HLT_FULL_cff::candidates, and iEvent.

◆ veto()

bool reco::isodeposit::OtherCandidatesDeltaRVeto::veto ( double  eta,
double  phi,
float  value 
) const
overridevirtual

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 configured deltaR from any item of the source collection

Implements reco::isodeposit::AbsVeto.

Definition at line 7 of file EventDependentAbsVetos.cc.

7  {
8  for (std::vector<Direction>::const_iterator it = items_.begin(), ed = items_.end(); it != ed; ++it) {
9  if (::deltaR2(it->eta(), it->phi(), eta, phi) < deltaR2_)
10  return true;
11  }
12  return false;
13 }

References reco::deltaR2(), deltaR2_, PVValHelper::eta, and items_.

Member Data Documentation

◆ deltaR2_

float reco::isodeposit::OtherCandidatesDeltaRVeto::deltaR2_
private

Definition at line 35 of file EventDependentAbsVetos.h.

Referenced by veto().

◆ items_

std::vector<Direction> reco::isodeposit::OtherCandidatesDeltaRVeto::items_
private

Definition at line 36 of file EventDependentAbsVetos.h.

Referenced by veto().

◆ src_

edm::EDGetTokenT<edm::View<reco::Candidate> > reco::isodeposit::OtherCandidatesDeltaRVeto::src_
private

Definition at line 34 of file EventDependentAbsVetos.h.

reco::isodeposit::OtherCandidatesDeltaRVeto::src_
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
Definition: EventDependentAbsVetos.h:34
edm::Handle
Definition: AssociativeIterator.h:50
reco::isodeposit::OtherCandidatesDeltaRVeto::items_
std::vector< Direction > items_
Definition: EventDependentAbsVetos.h:36
reco::isodeposit::OtherCandidatesDeltaRVeto::deltaR2_
float deltaR2_
Definition: EventDependentAbsVetos.h:35
PVValHelper::eta
Definition: PVValidationHelpers.h:70
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
edm::View
Definition: CaloClusterFwd.h:14
PVValHelper::phi
Definition: PVValidationHelpers.h:69
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
iEvent
int iEvent
Definition: GenABIO.cc:224
Direction
HLT_FULL_cff.candidates
candidates
Definition: HLT_FULL_cff.py:54996
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86