CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
virtual 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
 
virtual ~JetIDStudiesSelector ()
 

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
< JetIDSelectionFunctor
jetSel_
 
edm::InputTag jetSrc_
 
index_type pfCuts_
 
index_type pfDeltaPhi_
 
edm::Ptr< pat::JetpfJet0_
 
edm::Ptr< pat::JetpfJet1_
 
index_type pfJetID_
 
std::shared_ptr
< PFJetIDSelectionFunctor
pfJetSel_
 
edm::InputTag pfJetSrc_
 
index_type pfKin_
 

Detailed Description

Definition at line 58 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Constructor & Destructor Documentation

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

Definition at line 60 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

References edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, and PatBasicFWLiteJetAnalyzer_Selector_cfg::useCalo.

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

Definition at line 100 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

100 {}

Member Function Documentation

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

Definition at line 179 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

179 { return *h_jets_; }
edm::Handle< vector< pat::Jet > > h_jets_
vector<pat::Jet> const& JetIDStudiesSelector::allPFJets ( ) const
inline

Definition at line 180 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

180 { return *h_pfjets_; }
edm::Handle< vector< pat::Jet > > h_pfjets_
index_type const& JetIDStudiesSelector::caloCuts ( ) const
inline
index_type const& JetIDStudiesSelector::caloDeltaPhi ( ) const
inline

Definition at line 192 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

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

Definition at line 182 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

182 { return *caloJet0_; }
pat::Jet const& JetIDStudiesSelector::caloJet1 ( ) const
inline

Definition at line 183 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

183 { return *caloJet1_; }
index_type const& JetIDStudiesSelector::caloJetID ( ) const
inline

Definition at line 193 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

index_type const& JetIDStudiesSelector::caloKin ( ) const
inline

Definition at line 191 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

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

Definition at line 176 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

176 { return jetSel_;}
std::shared_ptr< JetIDSelectionFunctor > jetSel_
virtual bool JetIDStudiesSelector::operator() ( edm::EventBase const &  event,
pat::strbitset ret 
)
inlineoverridevirtual

Definition at line 102 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

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

102  {
103 
104  pat::strbitset retCaloJet = jetSel_->getBitTemplate();
105  pat::strbitset retPFJet = pfJetSel_->getBitTemplate();
106 
107 
108  if ( considerCut(caloCuts_) ) {
109  passCut(ret, caloCuts_);
110  event.getByLabel( jetSrc_, h_jets_ );
111  // Calo Cuts
112  if ( h_jets_->size() >= 2 || ignoreCut(caloKin_) ) {
113  passCut(ret, caloKin_);
114  pat::Jet const & jet0 = h_jets_->at(0);
115  pat::Jet const & jet1 = h_jets_->at(1);
116  double dphi = fabs(deltaPhi<double>( jet0.phi(),
117  jet1.phi() ) );
118 
119  if ( fabs(dphi - TMath::Pi()) < 1.0 || ignoreCut(caloDeltaPhi_) ) {
120  passCut(ret, caloDeltaPhi_);
121 
122 
123  retCaloJet.set(false);
124  bool pass0 = (*jetSel_)( jet0, retCaloJet );
125  retCaloJet.set(false);
126  bool pass1 = (*jetSel_)( jet1, retCaloJet );
127  if ( (pass0 && pass1) || ignoreCut(caloJetID_) ) {
128  passCut(ret, caloJetID_);
131 
132  return (bool)ret;
133  }// end if found 2 "loose" jet ID jets
134  }// end if delta phi
135  }// end calo kin cuts
136  }// end if calo cuts
137 
138 
139  if ( considerCut(pfCuts_) ) {
140 
141  passCut(ret, pfCuts_);
142  event.getByLabel( pfJetSrc_, h_pfjets_ );
143  // PF Cuts
144  if ( h_pfjets_->size() >= 2 || ignoreCut(pfKin_) ) {
145  passCut( ret, pfKin_);
146  pat::Jet const & jet0 = h_pfjets_->at(0);
147  pat::Jet const & jet1 = h_pfjets_->at(1);
148  double dphi = fabs(deltaPhi<double>( jet0.phi(),
149  jet1.phi() ) );
150 
151  if ( fabs(dphi - TMath::Pi()) < 1.0 || ignoreCut(pfDeltaPhi_) ) {
152  passCut(ret, pfDeltaPhi_);
153 
154 
155  retPFJet.set(false);
156  bool pass0 = (*pfJetSel_)( jet0, retPFJet );
157  retPFJet.set(false);
158  bool pass1 = (*pfJetSel_)( jet1, retPFJet );
159  if ( (pass0 && pass1) || ignoreCut(pfJetID_) ) {
160  passCut(ret, pfJetID_);
163 
164  return (bool)ret;
165  }// end if found 2 "loose" jet ID jets
166  }// end if delta phi
167  }// end pf kin cuts
168  }// end if pf cuts
169 
170 
171  setIgnored(ret);
172 
173  return false;
174  }// end of method
const double Pi
tuple ret
prodAgent to be discontinued
virtual double phi() const final
momentum azimuthal angle
edm::Handle< vector< pat::Jet > > h_jets_
std::shared_ptr< JetIDSelectionFunctor > jetSel_
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
Analysis-level calorimeter jet class.
Definition: Jet.h:77
std::shared_ptr< PFJetIDSelectionFunctor > pfJetSel_
edm::Handle< vector< pat::Jet > > h_pfjets_
index_type const& JetIDStudiesSelector::pfCuts ( ) const
inline

Definition at line 194 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

index_type const& JetIDStudiesSelector::pfDeltaPhi ( ) const
inline

Definition at line 196 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

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

Definition at line 185 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

185 { return *pfJet0_; }
pat::Jet const& JetIDStudiesSelector::pfJet1 ( ) const
inline

Definition at line 186 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

186 { return *pfJet1_; }
index_type const& JetIDStudiesSelector::pfJetID ( ) const
inline

Definition at line 197 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Referenced by main().

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

Definition at line 177 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

177 { return pfJetSel_;}
std::shared_ptr< PFJetIDSelectionFunctor > pfJetSel_
index_type const& JetIDStudiesSelector::pfKin ( ) const
inline

Definition at line 195 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

Member Data Documentation

index_type JetIDStudiesSelector::caloCuts_
protected

Definition at line 216 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

index_type JetIDStudiesSelector::caloDeltaPhi_
protected

Definition at line 218 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

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

Definition at line 209 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

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

Definition at line 210 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

index_type JetIDStudiesSelector::caloJetID_
protected

Definition at line 219 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

index_type JetIDStudiesSelector::caloKin_
protected

Definition at line 217 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

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

Definition at line 206 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

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

Definition at line 207 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

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

Definition at line 201 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

edm::InputTag JetIDStudiesSelector::jetSrc_
protected

Definition at line 203 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

index_type JetIDStudiesSelector::pfCuts_
protected

Definition at line 220 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

index_type JetIDStudiesSelector::pfDeltaPhi_
protected

Definition at line 222 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

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

Definition at line 212 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

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

Definition at line 213 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

index_type JetIDStudiesSelector::pfJetID_
protected

Definition at line 223 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

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

Definition at line 202 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

edm::InputTag JetIDStudiesSelector::pfJetSrc_
protected

Definition at line 204 of file PatBasicFWLiteJetAnalyzer_Selector.cc.

index_type JetIDStudiesSelector::pfKin_
protected

Definition at line 221 of file PatBasicFWLiteJetAnalyzer_Selector.cc.