CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
JetIDStudiesSelector Class Reference
Inheritance diagram for JetIDStudiesSelector:

Public Member Functions

vector< pat::Jet > const & allCaloJets () const
 
vector< pat::Jet > const & allPFJets () const
 
index_type const & caloCuts () const
 
index_type const & caloDeltaPhi () const
 
pat::Jet const & caloJet0 () const
 
pat::Jet const & caloJet1 () const
 
index_type const & caloJetID () const
 
index_type const & caloKin () const
 
 JetIDStudiesSelector (edm::ParameterSet const &caloJetIdParams, edm::ParameterSet const &pfJetIdParams, edm::ParameterSet const &params)
 
std::shared_ptr< JetIDSelectionFunctor > const & jetSel () const
 
bool operator() (edm::EventBase const &event, pat::strbitset &ret) override
 
index_type const & pfCuts () const
 
index_type const & pfDeltaPhi () const
 
pat::Jet const & pfJet0 () const
 
pat::Jet const & pfJet1 () const
 
index_type const & pfJetID () const
 
std::shared_ptr< PFJetIDSelectionFunctor > const & pfJetSel () const
 
index_type const & pfKin () const
 
 ~JetIDStudiesSelector () override
 

Protected Attributes

index_type caloCuts_
 
index_type caloDeltaPhi_
 
edm::Ptr< pat::JetcaloJet0_
 
edm::Ptr< pat::JetcaloJet1_
 
index_type caloJetID_
 
index_type caloKin_
 
edm::Handle< vector< pat::Jet > > h_jets_
 
edm::Handle< vector< pat::Jet > > h_pfjets_
 
std::shared_ptr< JetIDSelectionFunctorjetSel_
 
edm::InputTag jetSrc_
 
index_type pfCuts_
 
index_type pfDeltaPhi_
 
edm::Ptr< pat::JetpfJet0_
 
edm::Ptr< pat::JetpfJet1_
 
index_type pfJetID_
 
std::shared_ptr< PFJetIDSelectionFunctorpfJetSel_
 
edm::InputTag pfJetSrc_
 
index_type pfKin_
 

Detailed Description

Definition at line 55 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Constructor & Destructor Documentation

◆ JetIDStudiesSelector()

JetIDStudiesSelector::JetIDStudiesSelector ( edm::ParameterSet const &  caloJetIdParams,
edm::ParameterSet const &  pfJetIdParams,
edm::ParameterSet const &  params 
)
inline

Definition at line 57 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

60  : jetSel_(new JetIDSelectionFunctor(caloJetIdParams)),
61  pfJetSel_(new PFJetIDSelectionFunctor(pfJetIdParams)),
62  jetSrc_(params.getParameter<edm::InputTag>("jetSrc")),
63  pfJetSrc_(params.getParameter<edm::InputTag>("pfJetSrc")) {
64  bool useCalo = params.getParameter<bool>("useCalo");
65 
66  push_back("Calo Cuts");
67  push_back("Calo Kin Cuts");
68  push_back("Calo Delta Phi");
69  push_back("Calo Jet ID");
70  push_back("PF Cuts");
71  push_back("PF Kin Cuts");
72  push_back("PF Delta Phi");
73  push_back("PF Jet ID");
74 
75  set("Calo Cuts", useCalo);
76  set("Calo Kin Cuts", useCalo);
77  set("Calo Delta Phi", useCalo);
78  set("Calo Jet ID", useCalo);
79  set("PF Cuts", !useCalo);
80  set("PF Kin Cuts", !useCalo);
81  set("PF Delta Phi", !useCalo);
82  set("PF Jet ID", !useCalo);
83 
84  // Indices for fast caching
85  caloCuts_ = index_type(&bits_, std::string("Calo Cuts"));
86  caloKin_ = index_type(&bits_, std::string("Calo Kin Cuts"));
87  caloDeltaPhi_ = index_type(&bits_, std::string("Calo Delta Phi"));
88  caloJetID_ = index_type(&bits_, std::string("Calo Jet ID"));
89  pfCuts_ = index_type(&bits_, std::string("PF Cuts"));
90  pfKin_ = index_type(&bits_, std::string("PF Kin Cuts"));
91  pfDeltaPhi_ = index_type(&bits_, std::string("PF Delta Phi"));
92  pfJetID_ = index_type(&bits_, std::string("PF Jet ID"));
93  }

References CalibrationSummaryClient_cfi::params, AlCaHLTBitMon_QueryRunRegistry::string, and distMuonMETValueMapProducer_cff::useCalo.

◆ ~JetIDStudiesSelector()

JetIDStudiesSelector::~JetIDStudiesSelector ( )
inlineoverride

Definition at line 95 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

95 {}

Member Function Documentation

◆ allCaloJets()

vector<pat::Jet> const& JetIDStudiesSelector::allCaloJets ( ) const
inline

Definition at line 165 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

165 { return *h_jets_; }

Referenced by main().

◆ allPFJets()

vector<pat::Jet> const& JetIDStudiesSelector::allPFJets ( ) const
inline

Definition at line 166 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

166 { return *h_pfjets_; }

Referenced by main().

◆ caloCuts()

index_type const& JetIDStudiesSelector::caloCuts ( ) const
inline

Definition at line 175 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

175 { return caloCuts_; }

◆ caloDeltaPhi()

index_type const& JetIDStudiesSelector::caloDeltaPhi ( ) const
inline

Definition at line 177 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

177 { return caloDeltaPhi_; }

Referenced by main().

◆ caloJet0()

pat::Jet const& JetIDStudiesSelector::caloJet0 ( ) const
inline

Definition at line 168 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

168 { return *caloJet0_; }

Referenced by main().

◆ caloJet1()

pat::Jet const& JetIDStudiesSelector::caloJet1 ( ) const
inline

Definition at line 169 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

169 { return *caloJet1_; }

Referenced by main().

◆ caloJetID()

index_type const& JetIDStudiesSelector::caloJetID ( ) const
inline

Definition at line 178 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

178 { return caloJetID_; }

Referenced by main().

◆ caloKin()

index_type const& JetIDStudiesSelector::caloKin ( ) const
inline

Definition at line 176 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

176 { return caloKin_; }

Referenced by main().

◆ jetSel()

std::shared_ptr<JetIDSelectionFunctor> const& JetIDStudiesSelector::jetSel ( ) const
inline

Definition at line 162 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

162 { return jetSel_; }

◆ operator()()

bool JetIDStudiesSelector::operator() ( edm::EventBase const &  event,
pat::strbitset ret 
)
inlineoverride

Definition at line 97 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

97  {
98  pat::strbitset retCaloJet = jetSel_->getBitTemplate();
99  pat::strbitset retPFJet = pfJetSel_->getBitTemplate();
100 
101  if (considerCut(caloCuts_)) {
102  passCut(ret, caloCuts_);
103  event.getByLabel(jetSrc_, h_jets_);
104  // Calo Cuts
105  if (h_jets_->size() >= 2 || ignoreCut(caloKin_)) {
106  passCut(ret, caloKin_);
107  pat::Jet const& jet0 = h_jets_->at(0);
108  pat::Jet const& jet1 = h_jets_->at(1);
109  double dphi = fabs(deltaPhi<double>(jet0.phi(), jet1.phi()));
110 
111  if (fabs(dphi - TMath::Pi()) < 1.0 || ignoreCut(caloDeltaPhi_)) {
112  passCut(ret, caloDeltaPhi_);
113 
114  retCaloJet.set(false);
115  bool pass0 = (*jetSel_)(jet0, retCaloJet);
116  retCaloJet.set(false);
117  bool pass1 = (*jetSel_)(jet1, retCaloJet);
118  if ((pass0 && pass1) || ignoreCut(caloJetID_)) {
119  passCut(ret, caloJetID_);
122 
123  return (bool)ret;
124  } // end if found 2 "loose" jet ID jets
125  } // end if delta phi
126  } // end calo kin cuts
127  } // end if calo cuts
128 
129  if (considerCut(pfCuts_)) {
130  passCut(ret, pfCuts_);
131  event.getByLabel(pfJetSrc_, h_pfjets_);
132  // PF Cuts
133  if (h_pfjets_->size() >= 2 || ignoreCut(pfKin_)) {
134  passCut(ret, pfKin_);
135  pat::Jet const& jet0 = h_pfjets_->at(0);
136  pat::Jet const& jet1 = h_pfjets_->at(1);
137  double dphi = fabs(deltaPhi<double>(jet0.phi(), jet1.phi()));
138 
139  if (fabs(dphi - TMath::Pi()) < 1.0 || ignoreCut(pfDeltaPhi_)) {
140  passCut(ret, pfDeltaPhi_);
141 
142  retPFJet.set(false);
143  bool pass0 = (*pfJetSel_)(jet0, retPFJet);
144  retPFJet.set(false);
145  bool pass1 = (*pfJetSel_)(jet1, retPFJet);
146  if ((pass0 && pass1) || ignoreCut(pfJetID_)) {
147  passCut(ret, pfJetID_);
150 
151  return (bool)ret;
152  } // end if found 2 "loose" jet ID jets
153  } // end if delta phi
154  } // end pf kin cuts
155  } // end if pf cuts
156 
157  setIgnored(ret);
158 
159  return false;
160  } // end of method

References reco::LeafCandidate::phi(), Pi, runTheMatrix::ret, and pat::strbitset::set().

◆ pfCuts()

index_type const& JetIDStudiesSelector::pfCuts ( ) const
inline

Definition at line 179 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

179 { return pfCuts_; }

◆ pfDeltaPhi()

index_type const& JetIDStudiesSelector::pfDeltaPhi ( ) const
inline

Definition at line 181 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

181 { return pfDeltaPhi_; }

Referenced by main().

◆ pfJet0()

pat::Jet const& JetIDStudiesSelector::pfJet0 ( ) const
inline

Definition at line 171 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

171 { return *pfJet0_; }

Referenced by main().

◆ pfJet1()

pat::Jet const& JetIDStudiesSelector::pfJet1 ( ) const
inline

Definition at line 172 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

172 { return *pfJet1_; }

Referenced by main().

◆ pfJetID()

index_type const& JetIDStudiesSelector::pfJetID ( ) const
inline

Definition at line 182 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

182 { return pfJetID_; }

Referenced by main().

◆ pfJetSel()

std::shared_ptr<PFJetIDSelectionFunctor> const& JetIDStudiesSelector::pfJetSel ( ) const
inline

Definition at line 163 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

163 { return pfJetSel_; }

◆ pfKin()

index_type const& JetIDStudiesSelector::pfKin ( ) const
inline

Definition at line 180 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

180 { return pfKin_; }

Member Data Documentation

◆ caloCuts_

index_type JetIDStudiesSelector::caloCuts_
protected

Definition at line 200 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ caloDeltaPhi_

index_type JetIDStudiesSelector::caloDeltaPhi_
protected

Definition at line 202 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ caloJet0_

edm::Ptr<pat::Jet> JetIDStudiesSelector::caloJet0_
protected

Definition at line 193 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ caloJet1_

edm::Ptr<pat::Jet> JetIDStudiesSelector::caloJet1_
protected

Definition at line 194 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ caloJetID_

index_type JetIDStudiesSelector::caloJetID_
protected

Definition at line 203 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ caloKin_

index_type JetIDStudiesSelector::caloKin_
protected

Definition at line 201 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ h_jets_

edm::Handle<vector<pat::Jet> > JetIDStudiesSelector::h_jets_
protected

Definition at line 190 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ h_pfjets_

edm::Handle<vector<pat::Jet> > JetIDStudiesSelector::h_pfjets_
protected

Definition at line 191 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ jetSel_

std::shared_ptr<JetIDSelectionFunctor> JetIDStudiesSelector::jetSel_
protected

Definition at line 185 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ jetSrc_

edm::InputTag JetIDStudiesSelector::jetSrc_
protected

Definition at line 187 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ pfCuts_

index_type JetIDStudiesSelector::pfCuts_
protected

Definition at line 204 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ pfDeltaPhi_

index_type JetIDStudiesSelector::pfDeltaPhi_
protected

Definition at line 206 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ pfJet0_

edm::Ptr<pat::Jet> JetIDStudiesSelector::pfJet0_
protected

Definition at line 196 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ pfJet1_

edm::Ptr<pat::Jet> JetIDStudiesSelector::pfJet1_
protected

Definition at line 197 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ pfJetID_

index_type JetIDStudiesSelector::pfJetID_
protected

Definition at line 207 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ pfJetSel_

std::shared_ptr<PFJetIDSelectionFunctor> JetIDStudiesSelector::pfJetSel_
protected

Definition at line 186 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ pfJetSrc_

edm::InputTag JetIDStudiesSelector::pfJetSrc_
protected

Definition at line 188 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

◆ pfKin_

index_type JetIDStudiesSelector::pfKin_
protected

Definition at line 205 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:373
JetIDStudiesSelector::pfCuts_
index_type pfCuts_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:204
JetIDStudiesSelector::caloJet0_
edm::Ptr< pat::Jet > caloJet0_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:193
JetIDStudiesSelector::pfKin_
index_type pfKin_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:205
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
pat::strbitset::set
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:126
JetIDStudiesSelector::caloDeltaPhi_
index_type caloDeltaPhi_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:202
JetIDStudiesSelector::jetSrc_
edm::InputTag jetSrc_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:187
JetIDStudiesSelector::pfDeltaPhi_
index_type pfDeltaPhi_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:206
JetIDStudiesSelector::caloKin_
index_type caloKin_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:201
JetIDStudiesSelector::pfJetID_
index_type pfJetID_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:207
PFJetIDSelectionFunctor
PF Jet selector for pat::Jets.
Definition: PFJetIDSelectionFunctor.h:25
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
JetIDSelectionFunctor
Jet selector for pat::Jets and for CaloJets.
Definition: JetIDSelectionFunctor.h:28
JetIDStudiesSelector::jetSel_
std::shared_ptr< JetIDSelectionFunctor > jetSel_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:185
JetIDStudiesSelector::caloCuts_
index_type caloCuts_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:200
distMuonMETValueMapProducer_cff.useCalo
useCalo
Definition: distMuonMETValueMapProducer_cff.py:25
JetIDStudiesSelector::caloJetID_
index_type caloJetID_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:203
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
JetIDStudiesSelector::caloJet1_
edm::Ptr< pat::Jet > caloJet1_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:194
JetIDStudiesSelector::pfJet1_
edm::Ptr< pat::Jet > pfJet1_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:197
JetIDStudiesSelector::pfJet0_
edm::Ptr< pat::Jet > pfJet0_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:196
JetIDStudiesSelector::pfJetSrc_
edm::InputTag pfJetSrc_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:188
edm::Ptr< pat::Jet >
pat::strbitset
Definition: strbitset.h:23
JetIDStudiesSelector::h_pfjets_
edm::Handle< vector< pat::Jet > > h_pfjets_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:191
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
JetIDStudiesSelector::pfJetSel_
std::shared_ptr< PFJetIDSelectionFunctor > pfJetSel_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:186
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
JetIDStudiesSelector::h_jets_
edm::Handle< vector< pat::Jet > > h_jets_
Definition: PatBasicFWLiteJetAnalyzer_Selector.cc:190
edm::InputTag
Definition: InputTag.h:15