CMS 3D CMS Logo

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

#include <EventDependentAbsVetos.h>

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

Public Member Functions

void centerOn (double eta, double phi) override
 Nothing to do for this. More...
 
 OtherCandVeto (const edm::InputTag &candidates, AbsVeto *veto, 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
 
 ~OtherCandVeto () override
 
- Public Member Functions inherited from reco::isodeposit::EventDependentAbsVeto
 ~EventDependentAbsVeto () override
 
- Public Member Functions inherited from reco::isodeposit::AbsVeto
virtual ~AbsVeto ()
 

Private Attributes

std::vector< Directionitems_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
 
std::unique_ptr< AbsVetoveto_
 

Detailed Description

Definition at line 39 of file EventDependentAbsVetos.h.

Constructor & Destructor Documentation

◆ OtherCandVeto()

reco::isodeposit::OtherCandVeto::OtherCandVeto ( const edm::InputTag candidates,
AbsVeto veto,
edm::ConsumesCollector iC 
)
inline

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

Definition at line 42 of file EventDependentAbsVetos.h.

EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
std::unique_ptr< AbsVeto > veto_
bool veto(double eta, double phi, float value) const override

◆ ~OtherCandVeto()

reco::isodeposit::OtherCandVeto::~OtherCandVeto ( )
inlineoverride

Definition at line 46 of file EventDependentAbsVetos.h.

46 {}

Member Function Documentation

◆ centerOn()

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

Nothing to do for this.

Reimplemented from reco::isodeposit::AbsVeto.

Definition at line 53 of file EventDependentAbsVetos.h.

53 {}

◆ setEvent()

void reco::isodeposit::OtherCandVeto::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 33 of file EventDependentAbsVetos.cc.

References HLT_2022v15_cff::candidates, and iEvent.

33  {
34  items_.clear();
36  iEvent.getByToken(src_, candidates);
37  for (edm::View<reco::Candidate>::const_iterator it = candidates->begin(), ed = candidates->end(); it != ed; ++it) {
38  items_.push_back(Direction(it->eta(), it->phi()));
39  }
40 }
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
int iEvent
Definition: GenABIO.cc:224
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86

◆ veto()

bool reco::isodeposit::OtherCandVeto::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 stored AbsVeto of any item of the source collection

Implements reco::isodeposit::AbsVeto.

Definition at line 24 of file EventDependentAbsVetos.cc.

References PVValHelper::eta.

24  {
25  for (std::vector<Direction>::const_iterator it = items_.begin(), ed = items_.end(); it != ed; ++it) {
26  veto_->centerOn(it->eta(), it->phi());
27  if (veto_->veto(eta, phi, value))
28  return true;
29  }
30  return false;
31 }
Definition: value.py:1
std::unique_ptr< AbsVeto > veto_

Member Data Documentation

◆ items_

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

Definition at line 60 of file EventDependentAbsVetos.h.

◆ src_

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

Definition at line 59 of file EventDependentAbsVetos.h.

◆ veto_

std::unique_ptr<AbsVeto> reco::isodeposit::OtherCandVeto::veto_
private

Definition at line 61 of file EventDependentAbsVetos.h.