CMS 3D CMS Logo

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

virtual void centerOn (double eta, double phi)
 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...
 
virtual void setEvent (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 Picks up the directions of the given candidates. More...
 
virtual bool veto (double eta, double phi, float value) const
 
virtual ~OtherCandVeto ()
 
- Public Member Functions inherited from reco::isodeposit::EventDependentAbsVeto
virtual ~EventDependentAbsVeto ()
 
- Public Member Functions inherited from reco::isodeposit::AbsVeto
virtual ~AbsVeto ()
 

Private Attributes

std::vector< Directionitems_
 
edm::EDGetTokenT< edm::View
< reco::Candidate > > 
src_
 
std::auto_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.

42  :
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_
virtual bool veto(double eta, double phi, float value) const
virtual reco::isodeposit::OtherCandVeto::~OtherCandVeto ( )
inlinevirtual

Definition at line 46 of file EventDependentAbsVetos.h.

46 {}

Member Function Documentation

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

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 
)
virtual

Picks up the directions of the given candidates.

Implements reco::isodeposit::EventDependentAbsVeto.

Definition at line 37 of file EventDependentAbsVetos.cc.

References objects.IsoTrackAnalyzer::candidates, and edm::Event::getByToken().

37  {
38  items_.clear();
40  iEvent.getByToken(src_, candidates);
41  for (edm::View<reco::Candidate>::const_iterator it = candidates->begin(), ed = candidates->end(); it != ed; ++it) {
42  items_.push_back(Direction(it->eta(), it->phi()));
43  }
44 }
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
bool reco::isodeposit::OtherCandVeto::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 27 of file EventDependentAbsVetos.cc.

28 {
29  for (std::vector<Direction>::const_iterator it = items_.begin(), ed = items_.end(); it != ed; ++it) {
30  veto_->centerOn(it->eta(), it->phi());
31  if ( veto_->veto(eta,phi,value) ) return true;
32  }
33  return false;
34 }
T eta() const
Definition: DDAxes.h:10

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::auto_ptr<AbsVeto> reco::isodeposit::OtherCandVeto::veto_
private

Definition at line 61 of file EventDependentAbsVetos.h.