CMS 3D CMS Logo

EventDependentAbsVetos.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_IsolationAlgos_EventDependentAbsVetos_h
2 #define PhysicsTools_IsolationAlgos_EventDependentAbsVetos_h
3 
11 
12 namespace reco {
13  namespace isodeposit {
15  public:
18  : src_(iC.consumes<edm::View<reco::Candidate> >(candidates)), deltaR2_(deltaR * deltaR) {}
19 
20  // Virtual destructor (should always be there)
22 
25  bool veto(double eta, double phi, float value) const override;
26 
28  void centerOn(double eta, double phi) override {}
29 
31  void setEvent(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
32 
33  private:
35  float deltaR2_;
36  std::vector<Direction> items_;
37  };
38 
40  public:
43  : src_(iC.consumes<edm::View<reco::Candidate> >(candidates)), veto_(veto) {}
44 
45  // Virtual destructor (should always be there)
46  ~OtherCandVeto() override {}
47 
50  bool veto(double eta, double phi, float value) const override;
51 
53  void centerOn(double eta, double phi) override {}
54 
56  void setEvent(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
57 
58  private:
60  std::vector<Direction> items_;
61  std::unique_ptr<AbsVeto> veto_;
62  };
63 
65  public:
68  const edm::InputTag& jets,
69  double dRjet,
70  const edm::InputTag& pfCandAssocMap,
71  double dRconstituent,
73  : evt_(nullptr),
74  vetoDir_(dir),
75  srcJets_(iC.consumes<reco::PFJetCollection>(jets)),
76  dR2jet_(dRjet * dRjet),
77  srcPFCandAssocMap_(iC.consumes<JetToPFCandidateAssociation>(pfCandAssocMap)),
78  dR2constituent_(dRconstituent * dRconstituent) {
79  //std::cout << "<OtherJetConstituentsDeltaRVeto::OtherJetConstituentsDeltaRVeto>:" << std::endl;
80  //std::cout << " vetoDir: eta = " << vetoDir_.eta() << ", phi = " << vetoDir_.phi() << std::endl;
81  //std::cout << " srcJets = " << srcJets_.label() << ":" << srcJets_.instance() << std::endl;
82  //std::cout << " dRjet = " << sqrt(dR2jet_) << std::endl;
83  //std::cout << " srcPFCandAssocMap = " << srcPFCandAssocMap_.label() << ":" << srcPFCandAssocMap_.instance() << std::endl;
84  //std::cout << " dRconstituent = " << sqrt(dR2constituent_) << std::endl;
85  }
86 
87  // Virtual destructor (should always be there)
89 
92  bool veto(double eta, double phi, float value) const override;
93 
95  void centerOn(double eta, double phi) override;
96 
98  void setEvent(const edm::Event& evt, const edm::EventSetup& es) override;
99 
100  private:
101  typedef edm::AssociationMap<edm::OneToMany<std::vector<reco::PFJet>, std::vector<reco::PFCandidate>, unsigned int> >
103 
104  void initialize();
105 
106  const edm::Event* evt_;
107 
110  double dR2jet_;
113  std::vector<Direction> items_;
114  };
115  } // namespace isodeposit
116 } // namespace reco
117 #endif
edm::AssociationMap< edm::OneToMany< std::vector< reco::PFJet >, std::vector< reco::PFCandidate >, unsigned int > > JetToPFCandidateAssociation
static AlgebraicMatrix initialize()
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
void centerOn(double eta, double phi) override
Nothing to do for this.
#define nullptr
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
bool veto(double eta, double phi, float value) const override
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< JetToPFCandidateAssociation > srcPFCandAssocMap_
void centerOn(double eta, double phi) override
Nothing to do for this.
void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Picks up the directions of the given candidates.
OtherJetConstituentsDeltaRVeto(Direction dir, const edm::InputTag &jets, double dRjet, const edm::InputTag &pfCandAssocMap, double dRconstituent, edm::ConsumesCollector &iC)
Create a veto specifying the input collection of the jets, the candidates, and the deltaR...
Definition: value.py:1
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
std::unique_ptr< AbsVeto > veto_
edm::EDGetTokenT< reco::PFJetCollection > srcJets_
OtherCandidatesDeltaRVeto(const edm::InputTag &candidates, double deltaR, edm::ConsumesCollector &iC)
Create a veto specifying the input collection of the candidates, and the deltaR.
std::vector< PFJet > PFJetCollection
collection of PFJet objects
fixed size matrix
HLT enums.
OtherCandVeto(const edm::InputTag &candidates, AbsVeto *veto, edm::ConsumesCollector &iC)
Create a veto specifying the input collection of the candidates, and the deltaR.