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
reco::isodeposit::OtherCandVeto::veto
bool veto(double eta, double phi, float value) const override
Definition: EventDependentAbsVetos.cc:24
reco::isodeposit::OtherJetConstituentsDeltaRVeto::dR2constituent_
double dR2constituent_
Definition: EventDependentAbsVetos.h:112
reco::isodeposit::OtherCandVeto::items_
std::vector< Direction > items_
Definition: EventDependentAbsVetos.h:60
sistrip::View
View
Definition: ConstantsForView.h:26
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
AssociationMap.h
reco::isodeposit::AbsVeto
Definition: IsoDeposit.h:32
PFJet.h
reco::isodeposit::OtherJetConstituentsDeltaRVeto::srcJets_
edm::EDGetTokenT< reco::PFJetCollection > srcJets_
Definition: EventDependentAbsVetos.h:109
reco::isodeposit::OtherCandidatesDeltaRVeto::centerOn
void centerOn(double eta, double phi) override
Nothing to do for this.
Definition: EventDependentAbsVetos.h:28
reco::isodeposit::OtherCandVeto::src_
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
Definition: EventDependentAbsVetos.h:59
reco::isodeposit::OtherCandidatesDeltaRVeto::src_
edm::EDGetTokenT< edm::View< reco::Candidate > > src_
Definition: EventDependentAbsVetos.h:34
reco::isodeposit::OtherJetConstituentsDeltaRVeto::initialize
void initialize()
Definition: EventDependentAbsVetos.cc:54
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
EventDependentAbsVeto.h
reco::isodeposit::OtherCandidatesDeltaRVeto::items_
std::vector< Direction > items_
Definition: EventDependentAbsVetos.h:36
reco::isodeposit::OtherCandidatesDeltaRVeto::deltaR2_
float deltaR2_
Definition: EventDependentAbsVetos.h:35
reco::isodeposit::OtherCandVeto::centerOn
void centerOn(double eta, double phi) override
Nothing to do for this.
Definition: EventDependentAbsVetos.h:53
reco::isodeposit::OtherCandVeto::~OtherCandVeto
~OtherCandVeto() override
Definition: EventDependentAbsVetos.h:46
PVValHelper::eta
Definition: PVValidationHelpers.h:70
reco::isodeposit::OtherJetConstituentsDeltaRVeto::centerOn
void centerOn(double eta, double phi) override
Set axis for matching jets.
Definition: EventDependentAbsVetos.cc:88
reco::isodeposit::OtherJetConstituentsDeltaRVeto::setEvent
void setEvent(const edm::Event &evt, const edm::EventSetup &es) override
Picks up the directions of the given candidates.
Definition: EventDependentAbsVetos.cc:50
reco::isodeposit::OtherJetConstituentsDeltaRVeto::JetToPFCandidateAssociation
edm::AssociationMap< edm::OneToMany< std::vector< reco::PFJet >, std::vector< reco::PFCandidate >, unsigned int > > JetToPFCandidateAssociation
Definition: EventDependentAbsVetos.h:102
reco::isodeposit::OtherCandVeto::veto_
std::unique_ptr< AbsVeto > veto_
Definition: EventDependentAbsVetos.h:61
edm::AssociationMap
Definition: AssociationMap.h:48
reco::isodeposit::OtherJetConstituentsDeltaRVeto::vetoDir_
Direction vetoDir_
Definition: EventDependentAbsVetos.h:108
reco::isodeposit::OtherJetConstituentsDeltaRVeto::~OtherJetConstituentsDeltaRVeto
~OtherJetConstituentsDeltaRVeto() override
Definition: EventDependentAbsVetos.h:88
reco::isodeposit::OtherCandidatesDeltaRVeto::setEvent
void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Picks up the directions of the given candidates.
Definition: EventDependentAbsVetos.cc:15
iEvent
int iEvent
Definition: GenABIO.cc:224
value
Definition: value.py:1
reco::isodeposit::OtherJetConstituentsDeltaRVeto
Definition: EventDependentAbsVetos.h:64
edm::EventSetup
Definition: EventSetup.h:58
InputTag.h
reco::Candidate
Definition: Candidate.h:27
reco::isodeposit::OtherCandidatesDeltaRVeto::veto
bool veto(double eta, double phi, float value) const override
Definition: EventDependentAbsVetos.cc:7
reco::PFJetCollection
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Definition: PFJetCollection.h:14
reco::isodeposit::OtherCandVeto::OtherCandVeto
OtherCandVeto(const edm::InputTag &candidates, AbsVeto *veto, edm::ConsumesCollector &iC)
Create a veto specifying the input collection of the candidates, and the deltaR.
Definition: EventDependentAbsVetos.h:42
HLT_FULL_cff.candidates
candidates
Definition: HLT_FULL_cff.py:54992
reco::isodeposit::Direction
Definition: IsoDepositDirection.h:19
reco::isodeposit::OtherJetConstituentsDeltaRVeto::veto
bool veto(double eta, double phi, float value) const override
Definition: EventDependentAbsVetos.cc:42
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
reco::isodeposit::OtherCandidatesDeltaRVeto::~OtherCandidatesDeltaRVeto
~OtherCandidatesDeltaRVeto() override
Definition: EventDependentAbsVetos.h:21
ConsumesCollector.h
Candidate.h
reco::isodeposit::OtherCandVeto
Definition: EventDependentAbsVetos.h:39
View.h
reco::isodeposit::OtherCandidatesDeltaRVeto::OtherCandidatesDeltaRVeto
OtherCandidatesDeltaRVeto(const edm::InputTag &candidates, double deltaR, edm::ConsumesCollector &iC)
Create a veto specifying the input collection of the candidates, and the deltaR.
Definition: EventDependentAbsVetos.h:17
edm::Event
Definition: Event.h:73
reco::isodeposit::OtherJetConstituentsDeltaRVeto::items_
std::vector< Direction > items_
Definition: EventDependentAbsVetos.h:113
reco::isodeposit::OtherCandidatesDeltaRVeto
Definition: EventDependentAbsVetos.h:14
reco::isodeposit::EventDependentAbsVeto
Definition: EventDependentAbsVeto.h:10
reco::isodeposit::OtherJetConstituentsDeltaRVeto::dR2jet_
double dR2jet_
Definition: EventDependentAbsVetos.h:110
reco::isodeposit::OtherCandVeto::setEvent
void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Picks up the directions of the given candidates.
Definition: EventDependentAbsVetos.cc:33
edm::InputTag
Definition: InputTag.h:15
reco::isodeposit::OtherJetConstituentsDeltaRVeto::evt_
const edm::Event * evt_
Definition: EventDependentAbsVetos.h:106
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
reco::isodeposit::OtherJetConstituentsDeltaRVeto::srcPFCandAssocMap_
edm::EDGetTokenT< JetToPFCandidateAssociation > srcPFCandAssocMap_
Definition: EventDependentAbsVetos.h:111
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
reco::isodeposit::OtherJetConstituentsDeltaRVeto::OtherJetConstituentsDeltaRVeto
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: EventDependentAbsVetos.h:67