CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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.

43  : src_(iC.consumes<edm::View<reco::Candidate> >(candidates)), veto_(veto) {}
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
reco::isodeposit::OtherCandVeto::~OtherCandVeto ( )
inlineoverride

Definition at line 46 of file EventDependentAbsVetos.h.

46 {}

Member Function Documentation

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 {}
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_FULL_cff::candidates, and edm::Event::getByToken().

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_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
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.

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 }
std::unique_ptr< AbsVeto > veto_

Member Data Documentation

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

Definition at line 60 of file EventDependentAbsVetos.h.

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

Definition at line 59 of file EventDependentAbsVetos.h.

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

Definition at line 61 of file EventDependentAbsVetos.h.