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)
 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::InputTag src_
 
std::auto_ptr< AbsVetoveto_
 

Detailed Description

Definition at line 34 of file EventDependentAbsVetos.h.

Constructor & Destructor Documentation

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

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

Definition at line 37 of file EventDependentAbsVetos.h.

37  :
38  src_(candidates), veto_(veto) { }
virtual bool veto(double eta, double phi, float value) const
virtual reco::isodeposit::OtherCandVeto::~OtherCandVeto ( )
inlinevirtual

Definition at line 41 of file EventDependentAbsVetos.h.

41 {}

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 48 of file EventDependentAbsVetos.h.

48 { }
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 edm::Event::getByLabel().

37  {
38  items_.clear();
40  iEvent.getByLabel(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 }
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
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 55 of file EventDependentAbsVetos.h.

edm::InputTag reco::isodeposit::OtherCandVeto::src_
private

Definition at line 54 of file EventDependentAbsVetos.h.

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

Definition at line 56 of file EventDependentAbsVetos.h.