CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EventDependentAbsVetos.cc
Go to the documentation of this file.
1 
6 
7 bool
9 {
10  for (std::vector<Direction>::const_iterator it = items_.begin(), ed = items_.end(); it != ed; ++it) {
11  if (::deltaR2(it->eta(), it->phi(), eta, phi) < deltaR2_) return true;
12  }
13  return false;
14 }
15 
16 void
18  items_.clear();
20  iEvent.getByLabel(src_, candidates);
21  for (edm::View<reco::Candidate>::const_iterator it = candidates->begin(), ed = candidates->end(); it != ed; ++it) {
22  items_.push_back(Direction(it->eta(), it->phi()));
23  }
24 }
25 
26 bool
27 reco::isodeposit::OtherCandVeto::veto(double eta, double phi, float value) const
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 }
35 
36 void
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 }
45 
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
virtual bool veto(double eta, double phi, float value) const
virtual bool veto(double eta, double phi, float value) const
T eta() const
int iEvent
Definition: GenABIO.cc:243
virtual void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Picks up the directions of the given candidates.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
virtual void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Picks up the directions of the given candidates.
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
Definition: deltaR.h:58
Definition: DDAxes.h:10