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::OtherCandidatesDeltaRVeto Class Reference

#include <EventDependentAbsVetos.h>

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

Public Member Functions

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

Private Attributes

float deltaR2_
 
std::vector< Directionitems_
 
edm::InputTag src_
 

Detailed Description

Definition at line 9 of file EventDependentAbsVetos.h.

Constructor & Destructor Documentation

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

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

Definition at line 12 of file EventDependentAbsVetos.h.

12  :
13  src_(candidates), deltaR2_(deltaR*deltaR) { }
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
virtual reco::isodeposit::OtherCandidatesDeltaRVeto::~OtherCandidatesDeltaRVeto ( )
inlinevirtual

Definition at line 16 of file EventDependentAbsVetos.h.

16 {}

Member Function Documentation

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

Nothing to do for this.

Reimplemented from reco::isodeposit::AbsVeto.

Definition at line 23 of file EventDependentAbsVetos.h.

23 { }
void reco::isodeposit::OtherCandidatesDeltaRVeto::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 21 of file EventDependentAbsVetos.cc.

References edm::Event::getByLabel().

21  {
22  items_.clear();
24  iEvent.getByLabel(src_, candidates);
25  for (edm::View<reco::Candidate>::const_iterator it = candidates->begin(), ed = candidates->end(); it != ed; ++it) {
26  items_.push_back(Direction(it->eta(), it->phi()));
27  }
28 }
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
bool reco::isodeposit::OtherCandidatesDeltaRVeto::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 configured deltaR from any item of the source collection

Implements reco::isodeposit::AbsVeto.

Definition at line 12 of file EventDependentAbsVetos.cc.

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

13 {
14  for (std::vector<Direction>::const_iterator it = items_.begin(), ed = items_.end(); it != ed; ++it) {
15  if (::deltaR2(it->eta(), it->phi(), eta, phi) < deltaR2_) return true;
16  }
17  return false;
18 }
T eta() const
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
Definition: deltaR.h:58
Definition: DDAxes.h:10

Member Data Documentation

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

Definition at line 30 of file EventDependentAbsVetos.h.

Referenced by veto().

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

Definition at line 31 of file EventDependentAbsVetos.h.

Referenced by veto().

edm::InputTag reco::isodeposit::OtherCandidatesDeltaRVeto::src_
private

Definition at line 29 of file EventDependentAbsVetos.h.