CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1HPSPFTauBuilder.cc
Go to the documentation of this file.
2 #include "FWCore/Utilities/interface/Exception.h" // cms::Exception
3 #include "DataFormats/Math/interface/deltaR.h" // reco::deltaR
4 #include <regex> // sd::regex_replace
5 #include <TMath.h> // TMath::Pi()
6 #include <string> // std::string
7 #include <algorithm> // std::max(), std::sort()
8 #include <cmath> // std::fabs
9 
11  : signalConeSizeFormula_(
12  std::regex_replace(cfg.getParameter<std::string>("signalConeSize"), std::regex("pt"), "x")),
13  minSignalConeSize_(cfg.getParameter<double>("minSignalConeSize")),
14  maxSignalConeSize_(cfg.getParameter<double>("maxSignalConeSize")),
15  useStrips_(cfg.getParameter<bool>("useStrips")),
16  stripSizeEta_(cfg.getParameter<double>("stripSizeEta")),
17  stripSizePhi_(cfg.getParameter<double>("stripSizePhi")),
18  isolationConeSize_(cfg.getParameter<double>("isolationConeSize")),
19  debug_(cfg.getUntrackedParameter<bool>("debug", false)) {
21 
23 
24  if (debug_) {
25  std::cout << "setting Quality cuts for signal PFCands:" << std::endl;
26  }
27  edm::ParameterSet cfg_signalQualityCuts = cfg.getParameter<edm::ParameterSet>("signalQualityCuts");
28  signalQualityCutsDzCutDisabled_ = readL1PFTauQualityCuts(cfg_signalQualityCuts, "disabled", debug_);
29  signalQualityCutsDzCutEnabledPrimary_ = readL1PFTauQualityCuts(cfg_signalQualityCuts, "enabled_primary", debug_);
30  if (debug_) {
31  std::cout << "setting Quality cuts for isolation PFCands:" << std::endl;
32  }
33  edm::ParameterSet cfg_isolationQualityCuts = cfg.getParameter<edm::ParameterSet>("isolationQualityCuts");
34  isolationQualityCutsDzCutDisabled_ = readL1PFTauQualityCuts(cfg_isolationQualityCuts, "disabled", debug_);
36  readL1PFTauQualityCuts(cfg_isolationQualityCuts, "enabled_primary", debug_);
37  isolationQualityCutsDzCutEnabledPileup_ = readL1PFTauQualityCuts(cfg_isolationQualityCuts, "enabled_pileup", debug_);
38 }
39 
41  signalConeSize_ = 0.;
42  signalConeSize2_ = 0.;
43 
45  isPFCandSeeded_ = false;
47  isJetSeeded_ = false;
49  l1PFTauSeedEta_ = 0.;
50  l1PFTauSeedPhi_ = 0.;
51  l1PFTauSeedZVtx_ = 0.;
55 
56  stripP4_ = reco::Particle::LorentzVector(0., 0., 0., 0.);
57 
59  signalChargedHadrons_.clear();
60  signalElectrons_.clear();
61  signalNeutralHadrons_.clear();
62  signalPhotons_.clear();
63  signalMuons_.clear();
64 
66  stripElectrons_.clear();
67  stripPhotons_.clear();
68 
69  isoAllL1PFCandidates_.clear();
70  isoChargedHadrons_.clear();
71  isoElectrons_.clear();
72  isoNeutralHadrons_.clear();
73  isoPhotons_.clear();
74  isoMuons_.clear();
75 
76  sumAllL1PFCandidates_.clear();
77  sumChargedHadrons_.clear();
78  sumElectrons_.clear();
79  sumNeutralHadrons_.clear();
80  sumPhotons_.clear();
81  sumMuons_.clear();
82 
84 }
85 
87  l1PFCandProductID_ = l1PFCandProductID;
88 }
89 
91 
93  if (debug_) {
94  std::cout << "<L1HPSPFTauBuilder::setL1PFTauSeed>:" << std::endl;
95  std::cout << "seeding HPSPFTau with ChargedPFCand:";
96  printPFCand(std::cout, *l1PFCandSeed, primaryVertex_);
97  }
98 
99  l1PFCandSeed_ = l1PFCandSeed;
100  l1PFTauSeedEta_ = l1PFCandSeed->eta();
101  l1PFTauSeedPhi_ = l1PFCandSeed->phi();
102  if (l1PFCandSeed->charge() != 0 && l1PFCandSeed->pfTrack().isNonnull()) {
103  l1PFTauSeedZVtx_ = l1PFCandSeed->pfTrack()->vertex().z();
104  isPFCandSeeded_ = true;
105  }
106 }
107 // This is commented as l1JetSeed->numberOfDaughters() = 0
108 // Alternative way is used below for the moment
109 /*
110 void L1HPSPFTauBuilder::setL1PFTauSeed(const reco::CaloJetRef& l1JetSeed) {
111  if (debug_) {
112  std::cout << "<L1HPSPFTauBuilder::setL1PFTauSeed>:" << std::endl;
113  std::cout << "seeding HPSPFTau with Jet:";
114  std::cout << " pT = " << l1JetSeed->pt() << ", eta = " << l1JetSeed->eta() << ", phi = " << l1JetSeed->phi()
115  << std::endl;
116  }
117 
118  l1JetSeed_ = l1JetSeed;
119  reco::Candidate::LorentzVector l1PFTauSeed_p4;
120  float l1PFTauSeedZVtx = 0.;
121  bool l1PFTauSeed_hasVtx = false;
122  float max_chargedPFCand_pt = -1.;
123  size_t numConstituents = l1JetSeed->numberOfDaughters();
124  for (size_t idxConstituent = 0; idxConstituent < numConstituents; ++idxConstituent) {
125  const l1t::PFCandidate* l1PFCand = dynamic_cast<const l1t::PFCandidate*>(l1JetSeed->daughter(idxConstituent));
126  if (!l1PFCand) {
127  throw cms::Exception("L1HPSPFTauBuilder") << "Jet was not built from l1t::PFCandidates !!\n";
128  }
129  if (l1PFCand->id() == l1t::PFCandidate::ChargedHadron || l1PFCand->id() == l1t::PFCandidate::Electron ||
130  l1PFCand->id() == l1t::PFCandidate::Photon || l1PFCand->id() == l1t::PFCandidate::Muon) {
131  l1PFTauSeed_p4 += l1PFCand->p4();
132  if (l1PFCand->charge() != 0 && l1PFCand->pfTrack().isNonnull() && l1PFCand->pt() > max_chargedPFCand_pt) {
133  l1PFTauSeedZVtx = l1PFCand->pfTrack()->vertex().z();
134  l1PFTauSeed_hasVtx = true;
135  max_chargedPFCand_pt = l1PFCand->pt();
136  }
137  }
138  }
139  if (l1PFTauSeed_p4.pt() > 1. && l1PFTauSeed_hasVtx) {
140  l1PFTauSeedEta_ = l1PFTauSeed_p4.eta();
141  l1PFTauSeedPhi_ = l1PFTauSeed_p4.phi();
142  l1PFTauSeedZVtx_ = l1PFTauSeedZVtx;
143  isJetSeeded_ = true;
144  }
145 }
146 */
148  const std::vector<l1t::PFCandidateRef>& l1PFCands) {
149  if (debug_) {
150  std::cout << "<L1HPSPFTauBuilder::setL1PFTauSeed>:" << std::endl;
151  std::cout << "seeding HPSPFTau with Jet:";
152  std::cout << " pT = " << l1JetSeed->pt() << ", eta = " << l1JetSeed->eta() << ", phi = " << l1JetSeed->phi()
153  << std::endl;
154  }
155 
156  l1JetSeed_ = l1JetSeed;
157  reco::Candidate::LorentzVector l1PFTauSeed_p4;
158  float l1PFTauSeedZVtx = 0.;
159  bool l1PFTauSeed_hasVtx = false;
160  float max_chargedPFCand_pt = -1.;
161  for (const auto& l1PFCand : l1PFCands) {
162  double dR = reco::deltaR(l1PFCand->eta(), l1PFCand->phi(), l1JetSeed->eta(), l1JetSeed->phi());
163  if (dR > 0.4)
164  continue;
165  if (l1PFCand->id() == l1t::PFCandidate::ChargedHadron || l1PFCand->id() == l1t::PFCandidate::Electron ||
166  l1PFCand->id() == l1t::PFCandidate::Photon || l1PFCand->id() == l1t::PFCandidate::Muon) {
167  l1PFTauSeed_p4 += l1PFCand->p4();
168  if (l1PFCand->charge() != 0 && l1PFCand->pfTrack().isNonnull() && l1PFCand->pt() > max_chargedPFCand_pt) {
169  l1PFTauSeedZVtx = l1PFCand->pfTrack()->vertex().z();
170  l1PFTauSeed_hasVtx = true;
171  max_chargedPFCand_pt = l1PFCand->pt();
172  }
173  }
174  }
175  if (l1PFTauSeed_p4.pt() > 1. && l1PFTauSeed_hasVtx) {
176  l1PFTauSeedEta_ = l1PFTauSeed_p4.eta();
177  l1PFTauSeedPhi_ = l1PFTauSeed_p4.phi();
178  l1PFTauSeedZVtx_ = l1PFTauSeedZVtx;
179  isJetSeeded_ = true;
180  }
181 }
182 
183 void L1HPSPFTauBuilder::addL1PFCandidates(const std::vector<l1t::PFCandidateRef>& l1PFCands) {
184  if (debug_) {
185  std::cout << "<L1HPSPFTauBuilder::addL1PFCandidates>:" << std::endl;
186  }
187 
188  // do not build tau candidates for which no reference z-position exists,
189  // as in this case charged PFCands originating from the primary (hard-scatter) interaction
190  // cannot be distinguished from charged PFCands originating from pileup
191  if (!(isPFCandSeeded_ || isJetSeeded_))
192  return;
193 
194  for (const auto& l1PFCand : l1PFCands) {
195  if (!isWithinIsolationCone(*l1PFCand))
196  continue;
197  sumAllL1PFCandidates_.push_back(l1PFCand);
198  if (l1PFCand->id() == l1t::PFCandidate::ChargedHadron) {
199  sumChargedHadrons_.push_back(l1PFCand);
200  } else if (l1PFCand->id() == l1t::PFCandidate::Electron) {
201  sumElectrons_.push_back(l1PFCand);
202  } else if (l1PFCand->id() == l1t::PFCandidate::NeutralHadron) {
203  sumNeutralHadrons_.push_back(l1PFCand);
204  } else if (l1PFCand->id() == l1t::PFCandidate::Photon) {
205  sumPhotons_.push_back(l1PFCand);
206  } else if (l1PFCand->id() == l1t::PFCandidate::Muon) {
207  sumMuons_.push_back(l1PFCand);
208  }
209  }
210 
211  for (const auto& l1PFCand : sumAllL1PFCandidates_) {
212  sumAllL1PFCandidatesPt_ += l1PFCand->pt();
213  }
214  std::vector<double> emptyV;
215  std::vector<double> sumAllL1PFCandidatesPt(1);
216  sumAllL1PFCandidatesPt[0] = sumAllL1PFCandidatesPt_;
217 
218  signalConeSize_ = signalConeSizeFormula_.evaluate(sumAllL1PFCandidatesPt, emptyV);
219 
225 
226  for (const auto& l1PFCand : sumAllL1PFCandidates_) {
227  if (debug_) {
228  printPFCand(std::cout, *l1PFCand, primaryVertex_);
229  }
230 
231  bool isSignalPFCand = false;
232  bool isStripPFCand = false;
233  bool isElectron_or_Photon =
234  l1PFCand->id() == l1t::PFCandidate::Electron || l1PFCand->id() == l1t::PFCandidate::Photon;
235  bool isChargedHadron = l1PFCand->id() == l1t::PFCandidate::ChargedHadron;
236  if (isWithinSignalCone(*l1PFCand) && !(isChargedHadron && signalChargedHadrons_.size() > 3)) {
237  isSignalPFCand = true;
238  }
239  if (isElectron_or_Photon && isWithinStrip(*l1PFCand)) {
240  if (useStrips_) {
241  isSignalPFCand = true;
242  }
243  isStripPFCand = true;
244  }
245  bool passesSignalQualityCuts = isSelected(signalQualityCutsDzCutEnabledPrimary_, *l1PFCand, l1PFTauSeedZVtx_);
246  if (isSignalPFCand && passesSignalQualityCuts) {
247  signalAllL1PFCandidates_.push_back(l1PFCand);
248  if (l1PFCand->id() == l1t::PFCandidate::ChargedHadron) {
249  signalChargedHadrons_.push_back(l1PFCand);
250  } else if (l1PFCand->id() == l1t::PFCandidate::Electron) {
251  signalElectrons_.push_back(l1PFCand);
252  } else if (l1PFCand->id() == l1t::PFCandidate::NeutralHadron) {
253  signalNeutralHadrons_.push_back(l1PFCand);
254  } else if (l1PFCand->id() == l1t::PFCandidate::Photon) {
255  signalPhotons_.push_back(l1PFCand);
256  } else if (l1PFCand->id() == l1t::PFCandidate::Muon) {
257  signalMuons_.push_back(l1PFCand);
258  }
259  }
260  if (isStripPFCand && passesSignalQualityCuts) {
261  stripAllL1PFCandidates_.push_back(l1PFCand);
262  if (l1PFCand->id() == l1t::PFCandidate::Electron) {
263  stripElectrons_.push_back(l1PFCand);
264  stripP4_ += l1PFCand->p4();
265  } else if (l1PFCand->id() == l1t::PFCandidate::Photon) {
266  stripPhotons_.push_back(l1PFCand);
267  stripP4_ += l1PFCand->p4();
268  } else
269  assert(0);
270  }
271 
272  bool isIsolationPFCand = isWithinIsolationCone(*l1PFCand) && !isSignalPFCand;
273  bool passesIsolationQualityCuts = isSelected(isolationQualityCutsDzCutEnabledPrimary_, *l1PFCand, l1PFTauSeedZVtx_);
274  if (isIsolationPFCand && passesIsolationQualityCuts) {
275  isoAllL1PFCandidates_.push_back(l1PFCand);
276  if (l1PFCand->id() == l1t::PFCandidate::ChargedHadron) {
277  isoChargedHadrons_.push_back(l1PFCand);
278  } else if (l1PFCand->id() == l1t::PFCandidate::Electron) {
279  isoElectrons_.push_back(l1PFCand);
280  } else if (l1PFCand->id() == l1t::PFCandidate::NeutralHadron) {
281  isoNeutralHadrons_.push_back(l1PFCand);
282  } else if (l1PFCand->id() == l1t::PFCandidate::Photon) {
283  isoPhotons_.push_back(l1PFCand);
284  } else if (l1PFCand->id() == l1t::PFCandidate::Muon) {
285  isoMuons_.push_back(l1PFCand);
286  }
287  }
288 
289  if (debug_) {
290  std::cout << "dR = " << reco::deltaR(l1PFCand->eta(), l1PFCand->phi(), l1PFTauSeedEta_, l1PFTauSeedPhi_) << ":"
291  << " isSignalPFCand = " << isSignalPFCand << ", isStripPFCand = " << isStripPFCand
292  << " (passesSignalQualityCuts = " << passesSignalQualityCuts << "),"
293  << " isIsolationPFCand = " << isIsolationPFCand
294  << " (passesIsolationQualityCuts = " << passesIsolationQualityCuts << ")" << std::endl;
295  }
296  }
297 
298  for (const auto& l1PFCand : l1PFCands) {
299  if (!isWithinIsolationCone(*l1PFCand))
300  continue;
301 
302  if (l1PFCand->charge() != 0 && isSelected(isolationQualityCutsDzCutEnabledPileup_, *l1PFCand, l1PFTauSeedZVtx_)) {
303  sumChargedIsoPileup_ += l1PFCand->pt();
304  }
305  }
306 }
307 
308 //void L1HPSPFTauBuilder::setRho(double rho) { rho_ = rho; }
309 
311  if (isPFCandSeeded_ || isJetSeeded_) {
312  double deltaEta = l1PFCand.eta() - l1PFTauSeedEta_;
313  double deltaPhi = l1PFCand.phi() - l1PFTauSeedPhi_;
314  if ((deltaEta * deltaEta + deltaPhi * deltaPhi) < signalConeSize2_)
315  return true;
316  }
317  return false;
318 }
319 
321  if (isPFCandSeeded_ || isJetSeeded_) {
322  double deltaEta = l1PFCand.eta() - l1PFTauSeedEta_;
323  double deltaPhi = l1PFCand.phi() - l1PFTauSeedPhi_;
324  if (std::fabs(deltaEta) < stripSizeEta_ && std::fabs(deltaPhi) < stripSizePhi_)
325  return true;
326  }
327  return false;
328 }
329 
331  double deltaEta = l1PFCand.eta() - l1PFTauSeedEta_;
332  double deltaPhi = l1PFCand.phi() - l1PFTauSeedPhi_;
333  if ((deltaEta * deltaEta + deltaPhi * deltaPhi) < isolationConeSize2_)
334  return true;
335  else
336  return false;
337 }
338 
341  for (const auto& l1PFCand : signalAllL1PFCandidates_) {
342  if (l1PFCand->id() == l1t::PFCandidate::ChargedHadron || l1PFCand->id() == l1t::PFCandidate::Electron ||
343  l1PFCand->id() == l1t::PFCandidate::Photon) {
344  l1PFTau_p4 += l1PFCand->p4();
345  if (l1PFCand->charge() != 0 &&
346  (l1PFTau_.leadChargedPFCand().isNull() || l1PFCand->pt() > l1PFTau_.leadChargedPFCand()->pt())) {
347  l1PFTau_.setLeadChargedPFCand(l1PFCand);
348  }
349  }
350  }
351  l1PFTau_.setP4(l1PFTau_p4);
352 
355 
356  l1PFTau_.setSignalAllL1PFCandidates(convertToRefVector(signalAllL1PFCandidates_));
362 
366 
373 
380 
382 
383  if (l1PFTau_.signalChargedHadrons().size() > 1) {
384  if (stripP4_.pt() < 5.)
386  else
388  } else {
389  if (stripP4_.pt() < 5.)
391  else
393  }
394 
396 
400 
401  double sumChargedIso = 0.;
402  double sumNeutralIso = 0.;
403  for (const auto& l1PFCand : isoAllL1PFCandidates_) {
404  if (l1PFCand->charge() != 0) {
405  sumChargedIso += l1PFCand->pt();
406  } else if (l1PFCand->id() == l1t::PFCandidate::Photon) {
407  sumNeutralIso += l1PFCand->pt();
408  }
409  }
410  l1PFTau_.setSumChargedIso(sumChargedIso);
411  l1PFTau_.setSumNeutralIso(sumNeutralIso);
412  const double weightNeutralIso = 1.;
413  const double offsetNeutralIso = 0.;
414  l1PFTau_.setSumCombinedIso(sumChargedIso + weightNeutralIso * (sumNeutralIso - offsetNeutralIso));
416 
417  if (l1PFTau_.sumChargedIso() < 20.0) {
419  }
420  if (l1PFTau_.sumChargedIso() < 10.0) {
422  }
423  if (l1PFTau_.sumChargedIso() < 5.0) {
425  }
426  if (l1PFTau_.sumChargedIso() < 2.5) {
428  }
429 }
430 
431 l1t::PFCandidateRefVector L1HPSPFTauBuilder::convertToRefVector(const std::vector<l1t::PFCandidateRef>& l1PFCands) {
432  l1t::PFCandidateRefVector l1PFCandsRefVector(l1PFCandProductID_);
433  for (const auto& l1PFCand : l1PFCands) {
434  l1PFCandsRefVector.push_back(l1PFCand);
435  }
436  return l1PFCandsRefVector;
437 }
std::vector< l1t::PFCandidateRef > signalAllL1PFCandidates_
void setVertex(const l1t::TkPrimaryVertexRef &primaryVertex)
std::vector< L1HPSPFTauQualityCut > isolationQualityCutsDzCutDisabled_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
tuple cfg
Definition: looper.py:296
bool isWithinSignalCone(const l1t::PFCandidate &l1PFCand)
void setSumChargedHadrons(l1t::PFCandidateRefVector sumChargedHadrons)
Definition: HPSPFTau.h:116
edm::ProductID l1PFCandProductID_
const l1t::PFCandidateRef & leadChargedPFCand() const
Definition: HPSPFTau.h:28
void setIsoElectrons(l1t::PFCandidateRefVector isoElectrons)
Definition: HPSPFTau.h:108
std::vector< l1t::PFCandidateRef > isoMuons_
void setLeadChargedPFCand(l1t::PFCandidateRef leadChargedPFCand)
Definition: HPSPFTau.h:83
void setPrimaryVertex(l1t::TkPrimaryVertexRef primaryVertex)
Definition: HPSPFTau.h:122
void setL1PFCandProductID(const edm::ProductID &l1PFCandProductID)
std::vector< L1HPSPFTauQualityCut > isolationQualityCutsDzCutEnabledPrimary_
reco::Particle::LorentzVector stripP4_
std::vector< l1t::PFCandidateRef > sumChargedHadrons_
std::vector< L1HPSPFTauQualityCut > signalQualityCutsDzCutEnabledPrimary_
void setSignalNeutralHadrons(l1t::PFCandidateRefVector signalNeutralHadrons)
Definition: HPSPFTau.h:92
void addL1PFCandidates(const std::vector< l1t::PFCandidateRef > &l1PFCands)
void setIsoPhotons(l1t::PFCandidateRefVector isoPhotons)
Definition: HPSPFTau.h:110
std::vector< l1t::PFCandidateRef > stripAllL1PFCandidates_
std::vector< l1t::PFCandidateRef > signalChargedHadrons_
void setIsoNeutralHadrons(l1t::PFCandidateRefVector isoNeutralHadrons)
Definition: HPSPFTau.h:109
void setStripAllL1PFCandidates(l1t::PFCandidateRefVector stripAllL1PFCandidates)
Definition: HPSPFTau.h:98
const l1t::PFCandidateRefVector & signalChargedHadrons() const
Definition: HPSPFTau.h:31
std::vector< l1t::PFCandidateRef > signalNeutralHadrons_
assert(be >=bs)
reco::FormulaEvaluator signalConeSizeFormula_
void setSignalElectrons(l1t::PFCandidateRefVector signalElectrons)
Definition: HPSPFTau.h:91
std::vector< l1t::PFCandidateRef > isoNeutralHadrons_
L1HPSPFTauBuilder(const edm::ParameterSet &cfg)
static const double deltaEta
Definition: CaloConstants.h:8
std::vector< l1t::PFCandidateRef > sumAllL1PFCandidates_
void setSumChargedIso(float sumChargedIso)
Definition: HPSPFTau.h:132
void setStripElectrons(l1t::PFCandidateRefVector stripElectrons)
Definition: HPSPFTau.h:101
std::vector< l1t::PFCandidateRef > stripPhotons_
void setSumElectrons(l1t::PFCandidateRefVector sumElectrons)
Definition: HPSPFTau.h:117
std::vector< l1t::PFCandidateRef > isoAllL1PFCandidates_
void setSumNeutralHadrons(l1t::PFCandidateRefVector sumNeutralHadrons)
Definition: HPSPFTau.h:118
void setIsoMuons(l1t::PFCandidateRefVector isoMuons)
Definition: HPSPFTau.h:111
std::vector< L1HPSPFTauQualityCut > isolationQualityCutsDzCutEnabledPileup_
void setL1PFTauSeed(const l1t::PFCandidateRef &l1PFCandSeed)
void setIsoChargedHadrons(l1t::PFCandidateRefVector isoChargedHadrons)
Definition: HPSPFTau.h:107
double evaluate(V const &iVariables, P const &iParameters) const
bool isWithinIsolationCone(const l1t::PFCandidate &l1PFCand)
std::vector< l1t::PFCandidateRef > stripElectrons_
l1t::HPSPFTau l1PFTau_
void setTauType(Kind tauType)
Definition: HPSPFTau.h:124
std::vector< L1HPSPFTauQualityCut > readL1PFTauQualityCuts(const edm::ParameterSet &cfg, const std::string &dzCut, bool debug=false)
bool isWithinStrip(const l1t::PFCandidate &l1PFCand)
std::vector< l1t::PFCandidateRef > signalElectrons_
void setPassTightIso(bool passTightIso)
Definition: HPSPFTau.h:137
std::vector< l1t::PFCandidateRef > isoElectrons_
bool isNull() const
Checks for null.
Definition: Ref.h:235
void setSumChargedIsoPileup(float sumChargedIsoPileup)
Definition: HPSPFTau.h:135
void setSumCombinedIso(float sumCombinedIso)
Definition: HPSPFTau.h:134
std::vector< l1t::PFCandidateRef > sumPhotons_
l1t::PFCandidateRefVector convertToRefVector(const std::vector< l1t::PFCandidateRef > &l1PFCands)
edm::Ref< CaloJetCollection > CaloJetRef
edm references
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
void setSumMuons(l1t::PFCandidateRefVector sumMuons)
Definition: HPSPFTau.h:120
void setIsoAllL1PFCandidates(l1t::PFCandidateRefVector isoAllL1PFCandidates)
Definition: HPSPFTau.h:104
void setPassVLooseIso(bool passVLooseIso)
Definition: HPSPFTau.h:140
std::vector< l1t::PFCandidateRef > isoChargedHadrons_
void setSignalChargedHadrons(l1t::PFCandidateRefVector signalChargedHadrons)
Definition: HPSPFTau.h:88
void setStripP4(reco::Particle::LorentzVector &stripP4)
Definition: HPSPFTau.h:126
void setSumPhotons(l1t::PFCandidateRefVector sumPhotons)
Definition: HPSPFTau.h:119
void setSeedChargedPFCand(l1t::PFCandidateRef seedChargedPFCand)
Definition: HPSPFTau.h:81
std::vector< L1HPSPFTauQualityCut > signalQualityCutsDzCutDisabled_
reco::CaloJetRef l1JetSeed_
std::vector< l1t::PFCandidateRef > isoPhotons_
std::vector< l1t::PFCandidateRef > sumElectrons_
void setPassMediumIso(bool passMediumIso)
Definition: HPSPFTau.h:138
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
bool isSelected(const std::vector< L1HPSPFTauQualityCut > &qualityCuts, const l1t::PFCandidate &pfCand, float_t primaryVertexZ)
void setSignalPhotons(l1t::PFCandidateRefVector signalPhotons)
Definition: HPSPFTau.h:95
void setSignalAllL1PFCandidates(l1t::PFCandidateRefVector signalAllL1PFCandidates)
Definition: HPSPFTau.h:85
void setSumAllL1PFCandidatesPt(float sumAllL1PFCandidatesPt)
Definition: HPSPFTau.h:128
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
void setPassLooseIso(bool passLooseIso)
Definition: HPSPFTau.h:139
void setStripPhotons(l1t::PFCandidateRefVector stripPhotons)
Definition: HPSPFTau.h:102
void setSeedJet(reco::CaloJetRef seedJet)
Definition: HPSPFTau.h:82
void setSignalMuons(l1t::PFCandidateRefVector signalMuons)
Definition: HPSPFTau.h:96
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:67
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
std::vector< l1t::PFCandidateRef > signalPhotons_
tuple cout
Definition: gather_cfg.py:144
float sumChargedIso() const
Definition: HPSPFTau.h:66
std::vector< l1t::PFCandidateRef > sumMuons_
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
Definition: PFCandidate.h:58
std::vector< l1t::PFCandidateRef > signalMuons_
double phi() const final
momentum azimuthal angle
void setSignalConeSize(float signalConeSize)
Definition: HPSPFTau.h:129
l1t::PFCandidateRef l1PFCandSeed_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
l1t::TkPrimaryVertexRef primaryVertex_
void printPFCand(ostream &os, const l1t::PFCandidate &l1PFCand, const l1t::TkPrimaryVertexRef &primaryVertex)
Definition: HPSPFTau.cc:63
void setP4(const LorentzVector &p4) final
set 4-momentum
edm::Ref< TkPrimaryVertexCollection > TkPrimaryVertexRef
void setSumNeutralIso(float sumNeutralIso)
Definition: HPSPFTau.h:133
std::vector< l1t::PFCandidateRef > sumNeutralHadrons_
void setSumAllL1PFCandidates(l1t::PFCandidateRefVector sumAllL1PFCandidates)
Definition: HPSPFTau.h:113
void setisolationConeSize(float isolationConeSize)
Definition: HPSPFTau.h:130
double eta() const final
momentum pseudorapidity