CMS 3D CMS Logo

WPlusJetsEventSelector.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatExamples_interface_WPlusJetsEventSelector_h
2 #define PhysicsTools_PatExamples_interface_WPlusJetsEventSelector_h
3 
4 #ifndef __GCCXML__
6 #endif
21 
23 public:
25 #ifndef __GCCXML__
28  muonToken_ = iC.mayConsume<std::vector<pat::Muon> >(muonTag_);
29  electronToken_ = iC.mayConsume<std::vector<pat::Electron> >(electronTag_);
30  jetToken_ = iC.mayConsume<std::vector<pat::Jet> >(jetTag_);
31  metToken_ = iC.mayConsume<std::vector<pat::MET> >(metTag_);
32  trigToken_ = iC.mayConsume<pat::TriggerEvent>(trigTag_);
33  muonIdTight_ = MuonVPlusJetsIDSelectionFunctor(params.getParameter<edm::ParameterSet>("muonIdTight"), iC);
35  ElectronVPlusJetsIDSelectionFunctor(params.getParameter<edm::ParameterSet>("electronIdTight"), iC);
36  muonIdLoose_ = MuonVPlusJetsIDSelectionFunctor(params.getParameter<edm::ParameterSet>("muonIdLoose"), iC);
38  ElectronVPlusJetsIDSelectionFunctor(params.getParameter<edm::ParameterSet>("electronIdLoose"), iC);
39  jetIdLoose_ = JetIDSelectionFunctor(params.getParameter<edm::ParameterSet>("jetIdLoose"), iC);
40  pfjetIdLoose_ = PFJetIDSelectionFunctor(params.getParameter<edm::ParameterSet>("pfjetIdLoose"), iC);
41  }
42 #endif
44 
45  virtual void scaleJets(double scale) { jetScale_ = scale; }
46 
47  bool operator()(edm::EventBase const& t, pat::strbitset& ret) override;
49 
50  std::vector<reco::ShallowClonePtrCandidate> const& selectedJets() const { return selectedJets_; }
51  std::vector<reco::ShallowClonePtrCandidate> const& cleanedJets() const { return cleanedJets_; }
52  std::vector<reco::ShallowClonePtrCandidate> const& selectedElectrons() const { return selectedElectrons_; }
53  std::vector<reco::ShallowClonePtrCandidate> const& selectedMuons() const { return selectedMuons_; }
54  reco::ShallowClonePtrCandidate const& selectedMET() const { return met_; }
55 
56  void printSelectors(std::ostream& out) const {
57  out << "PV Selector: " << std::endl;
59  out << "Muon ID Tight Selector: " << std::endl;
61  out << "Electron ID Tight Selector: " << std::endl;
63  out << "Muon ID Loose Selector: " << std::endl;
65  out << "Electron ID Loose Selector: " << std::endl;
67  out << "Calo Jet Selector: " << std::endl;
69  out << "PF Jet Selector: " << std::endl;
71  }
72 
73 protected:
75 #ifndef __GCCXML__
77 #endif
79 #ifndef __GCCXML__
81 #endif
83 #ifndef __GCCXML__
85 #endif
87 #ifndef __GCCXML__
89 #endif
91 #ifndef __GCCXML__
93 #endif
94 
97 
98  std::vector<reco::ShallowClonePtrCandidate> selectedJets_;
99  std::vector<reco::ShallowClonePtrCandidate> selectedMuons_;
100  std::vector<reco::ShallowClonePtrCandidate> selectedElectrons_;
101  std::vector<reco::ShallowClonePtrCandidate> looseMuons_;
102  std::vector<reco::ShallowClonePtrCandidate> looseElectrons_;
103  std::vector<reco::ShallowClonePtrCandidate> selectedMETs_;
104  std::vector<reco::ShallowClonePtrCandidate> cleanedJets_;
105  std::vector<reco::ShallowClonePtrCandidate> selectedElectrons2_;
107 
115 
116  int minJets_;
117 
118  double muJetDR_;
119  double eleJetDR_;
120 
123 
124  double muPtMin_;
125  double muEtaMax_;
126  double eleEtMin_;
127  double eleEtaMax_;
128 
133 
134  double jetPtMin_;
135  double jetEtaMax_;
136 
137  double jetScale_;
138 
139  double metMin_;
140 
141  index_type inclusiveIndex_;
142  index_type triggerIndex_;
143  index_type pvIndex_;
144  index_type lep1Index_;
145  index_type lep2Index_;
146  index_type lep3Index_;
147  index_type lep4Index_;
148  index_type metIndex_;
149  index_type zvetoIndex_;
150  index_type conversionIndex_;
151  index_type cosmicIndex_;
152  index_type jet1Index_;
153  index_type jet2Index_;
154  index_type jet3Index_;
155  index_type jet4Index_;
156  index_type jet5Index_;
157 };
158 
159 #endif
std::vector< reco::ShallowClonePtrCandidate > selectedElectrons_
edm::EDGetTokenT< std::vector< pat::Jet > > jetToken_
ElectronVPlusJetsIDSelectionFunctor electronIdLoose_
ElectronVPlusJetsIDSelectionFunctor electronIdTight_
PFJetIDSelectionFunctor pfjetIdLoose_
ret
prodAgent to be discontinued
reco::ShallowClonePtrCandidate met_
std::vector< reco::ShallowClonePtrCandidate > const & cleanedJets() const
void print(std::ostream &out) const
Print the cut flow.
Definition: Selector.h:191
JetIDSelectionFunctor jetIdLoose_
edm::EDGetTokenT< std::vector< pat::Electron > > electronToken_
std::vector< reco::ShallowClonePtrCandidate > const & selectedMuons() const
std::vector< reco::ShallowClonePtrCandidate > selectedElectrons2_
std::vector< reco::ShallowClonePtrCandidate > selectedJets_
void printSelectors(std::ostream &out) const
std::vector< reco::ShallowClonePtrCandidate > selectedMuons_
edm::EDGetTokenT< std::vector< pat::MET > > metToken_
bool operator()(edm::EventBase const &t, pat::strbitset &ret) override
PF Jet selector for pat::Jets.
edm::EDGetTokenT< std::vector< pat::Muon > > muonToken_
Analysis-level trigger event class.
Definition: TriggerEvent.h:39
Jet selector for pat::Jets and for CaloJets.
reco::ShallowClonePtrCandidate const & selectedMET() const
std::vector< reco::ShallowClonePtrCandidate > const & selectedJets() const
WPlusJetsEventSelector(edm::ParameterSet const &params, edm::ConsumesCollector &&iC)
A selector of events.
Definition: EventSelector.h:16
std::vector< reco::ShallowClonePtrCandidate > looseElectrons_
virtual void scaleJets(double scale)
std::vector< reco::ShallowClonePtrCandidate > selectedMETs_
std::vector< reco::ShallowClonePtrCandidate > const & selectedElectrons() const
std::vector< reco::ShallowClonePtrCandidate > cleanedJets_
MuonVPlusJetsIDSelectionFunctor muonIdLoose_
MuonVPlusJetsIDSelectionFunctor muonIdTight_
edm::EDGetTokenT< pat::TriggerEvent > trigToken_
std::vector< reco::ShallowClonePtrCandidate > looseMuons_