CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Tau.cc
Go to the documentation of this file.
1 //
2 //
3 
6 
7 
8 using namespace pat;
9 
10 
13  Lepton<reco::BaseTau>()
14  ,embeddedIsolationTracks_(false)
15  ,embeddedLeadTrack_(false)
16  ,embeddedSignalTracks_(false)
17  ,embeddedLeadPFCand_(false)
18  ,embeddedLeadPFChargedHadrCand_(false)
19  ,embeddedLeadPFNeutralCand_(false)
20  ,embeddedSignalPFCands_(false)
21  ,embeddedSignalPFChargedHadrCands_(false)
22  ,embeddedSignalPFNeutralHadrCands_(false)
23  ,embeddedSignalPFGammaCands_(false)
24  ,embeddedIsolationPFCands_(false)
25  ,embeddedIsolationPFChargedHadrCands_(false)
26  ,embeddedIsolationPFNeutralHadrCands_(false)
27  ,embeddedIsolationPFGammaCands_(false)
28 {
29 }
30 
32 Tau::Tau(const reco::BaseTau & aTau) :
33  Lepton<reco::BaseTau>(aTau)
34  ,embeddedIsolationTracks_(false)
35  ,embeddedLeadTrack_(false)
36  ,embeddedSignalTracks_(false)
37  ,embeddedLeadPFCand_(false)
38  ,embeddedLeadPFChargedHadrCand_(false)
39  ,embeddedLeadPFNeutralCand_(false)
40  ,embeddedSignalPFCands_(false)
41  ,embeddedSignalPFChargedHadrCands_(false)
42  ,embeddedSignalPFNeutralHadrCands_(false)
43  ,embeddedSignalPFGammaCands_(false)
44  ,embeddedIsolationPFCands_(false)
45  ,embeddedIsolationPFChargedHadrCands_(false)
46  ,embeddedIsolationPFNeutralHadrCands_(false)
47  ,embeddedIsolationPFGammaCands_(false)
48 {
49  const reco::PFTau * pfTau = dynamic_cast<const reco::PFTau *>(&aTau);
50  if (pfTau != 0) pfSpecific_.push_back(pat::tau::TauPFSpecific(*pfTau));
51  const reco::CaloTau * caloTau = dynamic_cast<const reco::CaloTau *>(&aTau);
52  if (caloTau != 0) caloSpecific_.push_back(pat::tau::TauCaloSpecific(*caloTau));
53 }
54 
57  Lepton<reco::BaseTau>(aTauRef)
58  ,embeddedIsolationTracks_(false)
59  ,embeddedLeadTrack_(false)
60  ,embeddedSignalTracks_(false)
61  ,embeddedLeadPFCand_(false)
62  ,embeddedLeadPFChargedHadrCand_(false)
63  ,embeddedLeadPFNeutralCand_(false)
64  ,embeddedSignalPFCands_(false)
65  ,embeddedSignalPFChargedHadrCands_(false)
66  ,embeddedSignalPFNeutralHadrCands_(false)
67  ,embeddedSignalPFGammaCands_(false)
68  ,embeddedIsolationPFCands_(false)
69  ,embeddedIsolationPFChargedHadrCands_(false)
70  ,embeddedIsolationPFNeutralHadrCands_(false)
71  ,embeddedIsolationPFGammaCands_(false)
72 {
73  const reco::PFTau * pfTau = dynamic_cast<const reco::PFTau *>(aTauRef.get());
74  if (pfTau != 0) pfSpecific_.push_back(pat::tau::TauPFSpecific(*pfTau));
75  const reco::CaloTau * caloTau = dynamic_cast<const reco::CaloTau *>(aTauRef.get());
76  if (caloTau != 0) caloSpecific_.push_back(pat::tau::TauCaloSpecific(*caloTau));
77 }
78 
81  Lepton<reco::BaseTau>(aTauRef)
82  ,embeddedIsolationTracks_(false)
83  ,embeddedLeadTrack_(false)
84  ,embeddedSignalTracks_(false)
85  ,embeddedLeadPFCand_(false)
86  ,embeddedLeadPFChargedHadrCand_(false)
87  ,embeddedLeadPFNeutralCand_(false)
88  ,embeddedSignalPFCands_(false)
89  ,embeddedSignalPFChargedHadrCands_(false)
90  ,embeddedSignalPFNeutralHadrCands_(false)
91  ,embeddedSignalPFGammaCands_(false)
92  ,embeddedIsolationPFCands_(false)
93  ,embeddedIsolationPFChargedHadrCands_(false)
94  ,embeddedIsolationPFNeutralHadrCands_(false)
95  ,embeddedIsolationPFGammaCands_(false)
96 {
97  const reco::PFTau * pfTau = dynamic_cast<const reco::PFTau *>(aTauRef.get());
98  if (pfTau != 0) pfSpecific_.push_back(pat::tau::TauPFSpecific(*pfTau));
99  const reco::CaloTau * caloTau = dynamic_cast<const reco::CaloTau *>(aTauRef.get());
100  if (caloTau != 0) caloSpecific_.push_back(pat::tau::TauCaloSpecific(*caloTau));
101 }
102 
105 }
106 
107 std::ostream&
108 reco::operator<<(std::ostream& out, const pat::Tau& obj)
109 {
110  if(!out) return out;
111 
112  out << "\tpat::Tau: ";
113  out << std::setiosflags(std::ios::right);
114  out << std::setiosflags(std::ios::fixed);
115  out << std::setprecision(3);
116  out << " E/pT/eta/phi "
117  << obj.energy()<<"/"
118  << obj.pt()<<"/"
119  << obj.eta()<<"/"
120  << obj.phi();
121  return out;
122 }
123 
128  std::unique_ptr<reco::TrackRefVector> trackRefVec{ new reco::TrackRefVector{}};
129  trackRefVec->reserve(isolationTracks_.size());
130  for (unsigned int i = 0; i < isolationTracks_.size(); i++) {
131  trackRefVec->push_back(reco::TrackRef(&isolationTracks_, i));
132  }
133  isolationTracksTransientRefVector_.set(std::move(trackRefVec));
134  }
136  } else {
138  }
139 }
140 
141 
144  if (embeddedLeadTrack_) {
145  return reco::TrackRef(&leadTrack_, 0);
146  } else {
147  return reco::BaseTau::leadTrack();
148  }
149 }
150 
151 
154  if (embeddedSignalTracks_) {
156  std::unique_ptr<reco::TrackRefVector> trackRefVec{ new reco::TrackRefVector{} };
157  trackRefVec->reserve(signalTracks_.size());
158  for (unsigned int i = 0; i < signalTracks_.size(); i++) {
159  trackRefVec->push_back(reco::TrackRef(&signalTracks_, i));
160  }
161  signalTracksTransientRefVector_.set(std::move(trackRefVec));
162  }
164  } else {
166  }
167 }
168 
169 
172  isolationTracks_.clear();
174  for (unsigned int i = 0; i < trackRefVec.size(); i++) {
175  isolationTracks_.push_back(*trackRefVec.at(i));
176  }
178 }
179 
180 
183  leadTrack_.clear();
184  if (reco::BaseTau::leadTrack().isNonnull()) {
185  leadTrack_.push_back(*reco::BaseTau::leadTrack());
186  embeddedLeadTrack_ = true;
187  }
188 }
189 
190 
193  signalTracks_.clear();
195  for (unsigned int i = 0; i < trackRefVec.size(); i++) {
196  signalTracks_.push_back(*trackRefVec.at(i));
197  }
198  embeddedSignalTracks_ = true;
199 }
200 
201 
204  genJet_.clear();
205  genJet_.push_back(*gj);
206 }
207 
209 const reco::GenJet * Tau::genJet() const {
210  return (genJet_.size() > 0 ? &genJet_.front() : 0);
211 }
212 
213 
214 // method to retrieve a tau ID (or throw)
215 float Tau::tauID(const std::string & name) const {
216  for (std::vector<IdPair>::const_iterator it = tauIDs_.begin(), ed = tauIDs_.end(); it != ed; ++it) {
217  if (it->first == name) return it->second;
218  }
219  cms::Exception ex("Key not found");
220  ex << "pat::Tau: the ID " << name << " can't be found in this pat::Tau.\n";
221  ex << "The available IDs are: ";
222  for (std::vector<IdPair>::const_iterator it = tauIDs_.begin(), ed = tauIDs_.end(); it != ed; ++it) {
223  ex << "'" << it->first << "' ";
224  }
225  ex << ".\n";
226  throw ex;
227 }
228 // check if an ID is there
230  for (std::vector<IdPair>::const_iterator it = tauIDs_.begin(), ed = tauIDs_.end(); it != ed; ++it) {
231  if (it->first == name) return true;
232  }
233  return false;
234 }
235 
236 
238  if (!isPFTau()) throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't made from a PFTau.\n";
239  return pfSpecific_[0];
240 }
241 
243  if (!isCaloTau()) throw cms::Exception("Type Error") << "Requesting a CaloTau-specific information from a pat::Tau which wasn't made from a CaloTau.\n";
244  return caloSpecific_[0];
245 }
246 
248 {
249  if ( isCaloTau() ) return caloSpecific().p4Jet_;
250  if ( isPFTau() ) return pfSpecific().p4Jet_;
251  throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
252 }
253 
254 double Tau::dxy_Sig() const
255 {
256  if ( pfSpecific().dxy_error_ != 0 ) return (pfSpecific().dxy_/pfSpecific().dxy_error_);
257  else return 0.;
258 }
259 
261 {
265  for ( int i = 0; i < dimension; ++i ) {
266  for ( int j = 0; j < dimension; ++j ) {
267  cov(i,j) = sv(i,j) + pv(i,j);
268  }
269  }
270  return cov;
271 }
272 
273 float Tau::etaetaMoment() const
274 {
275  if ( isCaloTau() ) return caloSpecific().etaetaMoment_;
276  if ( isPFTau() ) return pfSpecific().etaetaMoment_;
277  throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
278 }
279 
280 float Tau::phiphiMoment() const
281 {
282  if ( isCaloTau() ) return caloSpecific().phiphiMoment_;
283  if ( isPFTau() ) return pfSpecific().phiphiMoment_;
284  throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
285 }
286 
287 float Tau::etaphiMoment() const
288 {
289  if ( isCaloTau() ) return caloSpecific().etaphiMoment_;
290  if ( isPFTau() ) return pfSpecific().etaphiMoment_;
291  throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't made from either a CaloTau or a PFTau.\n";
292 }
293 
294 void Tau::setDecayMode(int decayMode)
295 {
296  if (!isPFTau()) throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't made from a PFTau.\n";
297  pfSpecific_[0].decayMode_ = decayMode;
298 }
299 
302  if (!isPFTau() ) {//additional check with warning in pat::tau producer
303  return;
304  }
305  leadPFCand_.clear();
306  if (pfSpecific_[0].leadPFCand_.isNonnull() ) {
307  leadPFCand_.push_back(*pfSpecific_[0].leadPFCand_); //already set in C-tor
308  embeddedLeadPFCand_ = true;
309  }
310 }
313  if (!isPFTau() ) {//additional check with warning in pat::tau producer
314  return;
315  }
316  leadPFChargedHadrCand_.clear();
317  if (pfSpecific_[0].leadPFChargedHadrCand_.isNonnull() ) {
318  leadPFChargedHadrCand_.push_back(*pfSpecific_[0].leadPFChargedHadrCand_); //already set in C-tor
320  }
321 }
324  if (!isPFTau() ) {//additional check with warning in pat::tau producer
325  return;
326  }
327  leadPFNeutralCand_.clear();
328  if (pfSpecific_[0].leadPFNeutralCand_.isNonnull() ) {
329  leadPFNeutralCand_.push_back(*pfSpecific_[0].leadPFNeutralCand_); //already set in C-tor
331  }
332 }
333 
335  if (!isPFTau() ) {//additional check with warning in pat::tau producer
336  return;
337  }
338  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFCands_;
339  for (unsigned int i = 0; i < candPtrs.size(); i++) {
340  signalPFCands_.push_back(*candPtrs.at(i));
341  }
342  embeddedSignalPFCands_ = true;
343 }
345  if (!isPFTau() ) {//additional check with warning in pat::tau producer
346  return;
347  }
348  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFChargedHadrCands_;
349  for (unsigned int i = 0; i < candPtrs.size(); i++) {
350  signalPFChargedHadrCands_.push_back(*candPtrs.at(i));
351  }
353 }
355  if (!isPFTau() ) {//additional check with warning in pat::tau producer
356  return;
357  }
358  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFNeutrHadrCands_;
359  for (unsigned int i = 0; i < candPtrs.size(); i++) {
360  signalPFNeutralHadrCands_.push_back(*candPtrs.at(i));
361  }
363 }
365  if (!isPFTau() ) {//additional check with warning in pat::tau producer
366  return;
367  }
368  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFGammaCands_;
369  for (unsigned int i = 0; i < candPtrs.size(); i++) {
370  signalPFGammaCands_.push_back(*candPtrs.at(i));
371  }
373 }
374 
376  if (!isPFTau() ) {//additional check with warning in pat::tau producer
377  return;
378  }
379  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFCands_;
380  for (unsigned int i = 0; i < candPtrs.size(); i++) {
381  isolationPFCands_.push_back(*candPtrs.at(i));
382  }
384 }
385 
387  if (!isPFTau() ) {//additional check with warning in pat::tau producer
388  return;
389  }
390  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFChargedHadrCands_;
391  for (unsigned int i = 0; i < candPtrs.size(); i++) {
392  isolationPFChargedHadrCands_.push_back(*candPtrs.at(i));
393  }
395 }
397  if (!isPFTau() ) {//additional check with warning in pat::tau producer
398  return;
399  }
400  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFNeutrHadrCands_;
401  for (unsigned int i = 0; i < candPtrs.size(); i++) {
402  isolationPFNeutralHadrCands_.push_back(*candPtrs.at(i));
403  }
405 }
407  if (!isPFTau() ) {//additional check with warning in pat::tau producer
408  return;
409  }
410  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFGammaCands_;
411  for (unsigned int i = 0; i < candPtrs.size(); i++) {
412  isolationPFGammaCands_.push_back(*candPtrs.at(i));
413  }
415 }
416 
418  if ( pfSpecific().signalTauChargedHadronCandidates_.size() > 0 ) {
419  return reco::PFRecoTauChargedHadronRef(&pfSpecific().signalTauChargedHadronCandidates_,0);
420  } else {
422  }
423 }
424 
428  else
430 }
431 
435  else
437 }
438 
441  return pfSpecific().leadPFCand_;
442  else
444 }
445 
446 const std::vector<reco::PFCandidatePtr>& Tau::signalPFCands() const {
449  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
450  aPtrs->reserve(signalPFCands_.size());
451  for (unsigned int i = 0; i < signalPFCands_.size(); i++) {
452  aPtrs->push_back(reco::PFCandidatePtr(&signalPFCands_, i) );
453  }
454  signalPFCandsTransientPtrs_.set(std::move(aPtrs));
455  }
457  } else
459 }
460 
461 const std::vector<reco::PFCandidatePtr>& Tau::signalPFChargedHadrCands() const {
464  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
465  aPtrs->reserve(signalPFChargedHadrCands_.size());
466  for (unsigned int i = 0; i < signalPFChargedHadrCands_.size(); i++) {
467  aPtrs->push_back(reco::PFCandidatePtr(&signalPFChargedHadrCands_, i) );
468  }
470  }
472  } else
474 }
475 
476 const std::vector<reco::PFCandidatePtr>& Tau::signalPFNeutrHadrCands() const {
479  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
480  aPtrs->reserve(signalPFNeutralHadrCands_.size());
481  for (unsigned int i = 0; i < signalPFNeutralHadrCands_.size(); i++) {
482  aPtrs->push_back(reco::PFCandidatePtr(&signalPFNeutralHadrCands_, i) );
483  }
485  }
487  } else
489 }
490 
491 const std::vector<reco::PFCandidatePtr>& Tau::signalPFGammaCands() const {
494  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
495  aPtrs->reserve(signalPFGammaCands_.size());
496  for (unsigned int i = 0; i < signalPFGammaCands_.size(); i++) {
497  aPtrs->push_back(reco::PFCandidatePtr(&signalPFGammaCands_, i) );
498  }
499  signalPFGammaCandsTransientPtrs_.set(std::move(aPtrs));
500  }
502  } else
504 }
505 
506 const std::vector<reco::PFRecoTauChargedHadron> & Tau::signalTauChargedHadronCandidates() const {
508 }
509 
510 const std::vector<reco::RecoTauPiZero> & Tau::signalPiZeroCandidates() const {
512 }
513 
514 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFCands() const {
517  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
518  aPtrs->reserve(isolationPFCands_.size());
519  for (unsigned int i = 0; i < isolationPFCands_.size(); i++) {
520  aPtrs->push_back(reco::PFCandidatePtr(&isolationPFCands_, i) );
521  }
523  }
525  } else
527 }
528 
529 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFChargedHadrCands() const {
532  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
533  aPtrs->reserve(isolationPFChargedHadrCands_.size());
534  for (unsigned int i = 0; i < isolationPFChargedHadrCands_.size(); i++) {
536  }
538  }
540  } else
542 }
543 
544 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFNeutrHadrCands() const {
547  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
548  aPtrs->reserve(isolationPFNeutralHadrCands_.size());
549  for (unsigned int i = 0; i < isolationPFNeutralHadrCands_.size(); i++) {
551  }
552  isolationPFGammaCandsTransientPtrs_.set(std::move(aPtrs));
553  }
555  } else
557 }
558 
559 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFGammaCands() const {
562  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
563  aPtrs->reserve(isolationPFGammaCands_.size());
564  for (unsigned int i = 0; i < isolationPFGammaCands_.size(); i++) {
565  aPtrs->push_back(reco::PFCandidatePtr(&isolationPFGammaCands_, i) );
566  }
567  isolationPFGammaCandsTransientPtrs_.set(std::move(aPtrs));
568  }
570  } else
572 }
573 
574 const std::vector<reco::PFRecoTauChargedHadron> & Tau::isolationTauChargedHadronCandidates() const {
576 }
577 
578 const std::vector<reco::RecoTauPiZero> & Tau::isolationPiZeroCandidates() const {
580 }
581 
584 
585 // initialize the jet to a given JEC level during creation starting from Uncorrected
586 void Tau::initializeJEC(unsigned int level, unsigned int set)
587 {
588  currentJECSet(set);
589  currentJECLevel(level);
590  setP4(jec_[set].correction(level)*p4());
591 }
592 
594 int Tau::jecSet(const std::string& set) const
595 {
596  for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor = jec_.begin();
597  corrFactor != jec_.end(); ++corrFactor ) {
598  if ( corrFactor->jecSet() == set ) return corrFactor-jec_.begin();
599  }
600  return -1;
601 }
602 
604 const std::vector<std::string> Tau::availableJECSets() const
605 {
606  std::vector<std::string> sets;
607  for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor = jec_.begin();
608  corrFactor != jec_.end(); ++corrFactor ) {
609  sets.push_back(corrFactor->jecSet());
610  }
611  return sets;
612 }
613 
614 const std::vector<std::string> Tau::availableJECLevels(const int& set) const
615 {
616  return set>=0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
617 }
618 
621 float Tau::jecFactor(const std::string& level, const std::string& set) const
622 {
623  for ( unsigned int idx = 0; idx < jec_.size(); ++idx ) {
624  if ( set.empty() || jec_.at(idx).jecSet() == set ){
625  if ( jec_[idx].jecLevel(level) >= 0 )
626  return jecFactor(jec_[idx].jecLevel(level), idx);
627  else
628  throw cms::Exception("InvalidRequest")
629  << "This JEC level " << level << " does not exist. \n";
630  }
631  }
632  throw cms::Exception("InvalidRequest")
633  << "This jet does not carry any jet energy correction factor information \n"
634  << "for a jet energy correction set with label " << set << "\n";
635 }
636 
639 float Tau::jecFactor(const unsigned int& level, const unsigned int& set) const
640 {
641  if ( !jecSetsAvailable() )
642  throw cms::Exception("InvalidRequest")
643  << "This jet does not carry any jet energy correction factor information \n";
644  if ( !jecSetAvailable(set) )
645  throw cms::Exception("InvalidRequest")
646  << "This jet does not carry any jet energy correction factor information \n"
647  << "for a jet energy correction set with index " << set << "\n";
648  return jec_.at(set).correction(level)/jec_.at(currentJECSet_).correction(currentJECLevel_);
649 }
650 
654 {
655  // rescale p4 of the jet; the update of current values is
656  // done within the called jecFactor function
657  for ( unsigned int idx = 0; idx < jec_.size(); ++idx ) {
658  if ( set.empty() || jec_.at(idx).jecSet() == set ) {
659  if ( jec_[idx].jecLevel(level) >= 0 )
660  return correctedTauJet(jec_[idx].jecLevel(level), idx);
661  else
662  throw cms::Exception("InvalidRequest")
663  << "This JEC level " << level << " does not exist. \n";
664  }
665  }
666  throw cms::Exception("InvalidRequest")
667  << "This JEC set " << set << " does not exist. \n";
668 }
669 
672 Tau Tau::correctedTauJet(const unsigned int& level, const unsigned int& set) const
673 {
674  Tau correctedTauJet(*this);
675  //rescale p4 of the jet
676  correctedTauJet.setP4(jecFactor(level, set)*p4());
677  // update current level and set
678  correctedTauJet.currentJECSet(set);
679  correctedTauJet.currentJECLevel(level);
680  return correctedTauJet;
681 }
682 
const std::vector< reco::RecoTauPiZero > & signalPiZeroCandidates() const
Definition: Tau.cc:510
bool embeddedLeadPFNeutralCand_
Definition: Tau.h:383
virtual double energy() const GCC11_FINAL
energy
virtual reco::TrackRef leadTrack() const
Definition: BaseTau.cc:26
int i
Definition: DBlmapReader.cc:9
edm::AtomicPtrCache< reco::TrackRefVector > signalTracksTransientRefVector_
Definition: Tau.h:376
reco::Candidate::LorentzVector p4Jet_
Definition: TauPFSpecific.h:62
reco::PFTauTransverseImpactParameter::CovMatrix flightLengthCov() const
Definition: Tau.cc:260
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
bool embeddedSignalPFChargedHadrCands_
Definition: Tau.h:389
std::vector< reco::PFCandidatePtr > selectedIsolationPFChargedHadrCands_
Definition: TauPFSpecific.h:39
std::vector< reco::PFCandidate > leadPFNeutralCand_
Definition: Tau.h:382
reco::PFCandidatePtr leadPFCand_
Definition: TauPFSpecific.h:31
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFChargedHadrCandsTransientPtrs_
Definition: Tau.h:402
virtual const reco::TrackRefVector & isolationTracks() const
Definition: BaseTau.cc:30
std::vector< reco::PFCandidate > signalPFNeutralHadrCands_
Definition: Tau.h:391
const pat::tau::TauCaloSpecific & caloSpecific() const
return CaloTau info or throw exception &#39;not CaloTau&#39;
Definition: Tau.cc:242
std::vector< reco::PFCandidate > signalPFCands_
Definition: Tau.h:385
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFNeutralHadrCandsTransientPtrs_
Definition: Tau.h:393
bool embeddedIsolationPFChargedHadrCands_
Definition: Tau.h:401
bool jecSetAvailable(const std::string &set) const
Definition: Tau.h:318
bool embeddedIsolationPFCands_
Definition: Tau.h:398
void embedLeadPFChargedHadrCand()
method to store the leading charged hadron candidate internally
Definition: Tau.cc:312
reco::PFCandidatePtr leadPFChargedHadrCand_
Definition: TauPFSpecific.h:28
std::vector< reco::PFCandidate > isolationPFGammaCands_
Definition: Tau.h:406
std::vector< reco::PFCandidate > isolationPFNeutralHadrCands_
Definition: Tau.h:403
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFGammaCandsTransientPtrs_
Definition: Tau.h:408
const reco::PFCandidatePtr leadPFCand() const
Definition: Tau.cc:439
void embedSignalPFGammaCands()
method to store the signal gamma candidates internally
Definition: Tau.cc:364
std::vector< reco::GenJet > genJet_
Definition: Tau.h:411
void embedIsolationPFCands()
method to store the isolation candidates internally
Definition: Tau.cc:375
void embedIsolationPFGammaCands()
method to store the isolation gamma candidates internally
Definition: Tau.cc:406
const reco::GenJet * genJet() const
return matched GenJet, built from the visible particles of a generated tau
Definition: Tau.cc:209
const reco::Candidate::LorentzVector & p4Jet() const
Definition: Tau.cc:247
const std::vector< std::string > availableJECSets() const
all available label-names of all sets of jet energy corrections
Definition: Tau.cc:604
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFCandsTransientPtrs_
Definition: Tau.h:387
reco::TrackRef leadTrack() const
override the reco::BaseTau::leadTrack method, to access the internal storage of the leading track ...
Definition: Tau.cc:143
bool embeddedIsolationPFNeutralHadrCands_
Definition: Tau.h:404
void embedSignalTracks()
method to store the signal tracks internally
Definition: Tau.cc:192
bool embeddedLeadTrack_
Definition: Tau.h:372
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFGammaCandsTransientPtrs_
Definition: Tau.h:396
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
Definition: Tau.cc:529
const pat::tau::TauPFSpecific & pfSpecific() const
return PFTau info or throw exception &#39;not PFTau&#39;
Definition: Tau.cc:237
float phiphiMoment() const
Definition: Tau.cc:280
std::vector< reco::PFCandidate > leadPFCand_
Definition: Tau.h:378
bool isSet() const
std::vector< reco::PFCandidatePtr > selectedIsolationPFNeutrHadrCands_
Definition: TauPFSpecific.h:40
bool embeddedSignalPFGammaCands_
Definition: Tau.h:395
float etaetaMoment() const
Definition: Tau.cc:273
int jecSet(const std::string &label) const
return true if this jet carries the jet correction factors of a different set, for systematic studies...
Definition: Tau.cc:594
std::vector< reco::PFRecoTauChargedHadron > isolationTauChargedHadronCandidates_
Definition: TauPFSpecific.h:42
void initializeJEC(unsigned int level, const unsigned int set=0)
initialize the jet to a given JEC level during creation starting from Uncorrected ...
Definition: Tau.cc:586
Tau correctedTauJet(const std::string &level, const std::string &set="") const
Definition: Tau.cc:653
unsigned int currentJECLevel_
Definition: Tau.h:433
edm::AtomicPtrCache< reco::TrackRefVector > isolationTracksTransientRefVector_
Definition: Tau.h:371
void embedSignalPFChargedHadrCands()
method to store the signal charged hadrons candidates internally
Definition: Tau.cc:344
std::vector< reco::PFRecoTauChargedHadron > signalTauChargedHadronCandidates_
Definition: TauPFSpecific.h:36
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
void embedSignalPFCands()
method to store the signal candidates internally
Definition: Tau.cc:334
std::vector< reco::RecoTauPiZero > isolationPiZeroCandidates_
Definition: TauPFSpecific.h:43
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
std::vector< reco::Track > signalTracks_
Definition: Tau.h:375
std::vector< IdPair > tauIDs_
Definition: Tau.h:414
double dxy_Sig() const
Definition: Tau.cc:254
const std::vector< reco::PFRecoTauChargedHadron > & isolationTauChargedHadronCandidates() const
Definition: Tau.cc:574
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:143
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFChargedHadrCandsTransientPtrs_
Definition: Tau.h:390
std::vector< reco::RecoTauPiZero > signalPiZeroCandidates_
Definition: TauPFSpecific.h:37
bool embeddedIsolationPFGammaCands_
Definition: Tau.h:407
std::vector< reco::PFCandidate > signalPFChargedHadrCands_
Definition: Tau.h:388
Tau()
default constructor
Definition: Tau.cc:12
const reco::PFTauTransverseImpactParameter::CovMatrix & secondaryVertexCov() const
Definition: Tau.h:272
void embedLeadTrack()
method to store the leading track internally
Definition: Tau.cc:182
Analysis-level lepton class.
Definition: Lepton.h:30
const std::vector< reco::RecoTauPiZero > & isolationPiZeroCandidates() const
Definition: Tau.cc:578
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
Definition: Tau.cc:544
const reco::PFTauTransverseImpactParameter::CovMatrix & primaryVertexCov() const
Definition: Tau.h:265
int j
Definition: DBlmapReader.cc:9
Jets made from MC generator particles.
Definition: GenJet.h:24
bool embeddedSignalTracks_
Definition: Tau.h:374
bool embeddedLeadPFCand_
Definition: Tau.h:379
std::vector< reco::PFCandidatePtr > selectedSignalPFChargedHadrCands_
Definition: TauPFSpecific.h:33
virtual const reco::TrackRefVector & signalTracks() const
Definition: BaseTau.cc:28
std::vector< reco::PFCandidatePtr > selectedSignalPFCands_
Definition: TauPFSpecific.h:32
void reserve(size_type n)
Reserve space for RefVector.
Definition: RefVector.h:95
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Definition: Tau.h:327
Analysis-level tau class.
Definition: Tau.h:51
bool embeddedLeadPFChargedHadrCand_
Definition: Tau.h:381
void embedIsolationPFNeutralHadrCands()
method to store the isolation neutral hadrons candidates internally
Definition: Tau.cc:396
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
Definition: Tau.cc:461
bool embeddedSignalPFNeutralHadrCands_
Definition: Tau.h:392
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< reco::PFCandidate > isolationPFCands_
Definition: Tau.h:397
std::vector< reco::Track > isolationTracks_
Definition: Tau.h:370
bool isTauIDAvailable(const std::string &name) const
Returns true if a specific ID is available in this pat::Tau.
Definition: Tau.cc:229
tuple out
Definition: dbtoconf.py:99
void embedLeadPFNeutralCand()
method to store the leading neutral candidate internally
Definition: Tau.cc:323
std::vector< pat::tau::TauCaloSpecific > caloSpecific_
holder for CaloTau info, or empty vector if PFTau
Definition: Tau.h:418
std::vector< reco::PFCandidatePtr > selectedIsolationPFGammaCands_
Definition: TauPFSpecific.h:41
bool isCaloTau() const
Returns true if this pat::Tau was made from a reco::CaloTau.
Definition: Tau.h:120
std::vector< reco::PFCandidatePtr > selectedIsolationPFCands_
Definition: TauPFSpecific.h:38
reco::PFCandidatePtr leadPFNeutralCand_
Definition: TauPFSpecific.h:30
int decayMode() const
reconstructed tau decay mode (specific to PFTau)
Definition: Tau.h:282
bool set(std::unique_ptr< T > iNewValue) const
const std::vector< reco::PFCandidatePtr > & isolationPFGammaCands() const
Definition: Tau.cc:559
std::vector< reco::PFCandidatePtr > selectedSignalPFGammaCands_
Definition: TauPFSpecific.h:35
const std::vector< reco::PFRecoTauChargedHadron > & signalTauChargedHadronCandidates() const
Definition: Tau.cc:506
std::vector< pat::TauJetCorrFactors > jec_
Definition: Tau.h:428
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:14
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFNeutralHadrCandsTransientPtrs_
Definition: Tau.h:405
std::vector< reco::PFCandidate > signalPFGammaCands_
Definition: Tau.h:394
void embedSignalPFNeutralHadrCands()
method to store the signal neutral hadrons candidates internally
Definition: Tau.cc:354
std::vector< reco::Track > leadTrack_
Definition: Tau.h:373
edm::Ref< PFRecoTauChargedHadronCollection > PFRecoTauChargedHadronRef
presistent reference to a PFRecoTauChargedHadron
std::vector< reco::PFCandidate > isolationPFChargedHadrCands_
Definition: Tau.h:400
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:41
float jecFactor(const std::string &level, const std::string &set="") const
Definition: Tau.cc:621
bool jecSetsAvailable() const
Definition: Tau.h:315
void setDecayMode(int)
set decay mode
Definition: Tau.cc:294
float etaphiMoment() const
Definition: Tau.cc:287
std::vector< reco::PFCandidatePtr > selectedSignalPFNeutrHadrCands_
Definition: TauPFSpecific.h:34
reco::PFRecoTauChargedHadronRef leadTauChargedHadronCandidate() const
Definition: Tau.cc:417
void embedIsolationPFChargedHadrCands()
method to store the isolation charged hadrons candidates internally
Definition: Tau.cc:386
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
Definition: RefVector.h:76
bool embeddedSignalPFCands_
Definition: Tau.h:386
const reco::PFCandidatePtr leadPFChargedHadrCand() const
Definition: Tau.cc:425
const std::vector< reco::PFCandidatePtr > & signalPFCands() const
Definition: Tau.cc:446
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
const std::vector< std::string > availableJECLevels(const int &set=0) const
Definition: Tau.cc:614
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
Definition: Tau.cc:491
const std::vector< reco::PFCandidatePtr > & signalPFNeutrHadrCands() const
Definition: Tau.cc:476
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
bool isPFTau() const
Returns true if this pat::Tau was made from a reco::PFTau.
Definition: Tau.h:153
float tauID(const std::string &name) const
Definition: Tau.cc:215
void setGenJet(const reco::GenJetRef &ref)
set the matched GenJet
Definition: Tau.cc:203
bool embeddedIsolationTracks_
Definition: Tau.h:369
const reco::PFCandidatePtr leadPFNeutralCand() const
Definition: Tau.cc:432
tuple level
Definition: testEve_cfg.py:34
void embedIsolationTracks()
method to store the isolation tracks internally
Definition: Tau.cc:171
volatile std::atomic< bool > shutdown_flag false
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFCandsTransientPtrs_
Definition: Tau.h:399
const reco::TrackRefVector & signalTracks() const
override the reco::BaseTau::signalTracks method, to access the internal storage of the signal tracks ...
Definition: Tau.cc:153
std::vector< reco::PFCandidate > leadPFChargedHadrCand_
Definition: Tau.h:380
std::string currentJECSet() const
returns the label of the current set of jet energy corrections
Definition: Tau.h:323
virtual float pt() const GCC11_FINAL
transverse momentum
virtual ~Tau()
destructor
Definition: Tau.cc:104
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
void embedLeadPFCand()
method to store the leading candidate internally
Definition: Tau.cc:301
value_type const * get() const
Definition: RefToBase.h:212
const std::vector< reco::PFCandidatePtr > & isolationPFCands() const
Definition: Tau.cc:514
std::vector< pat::tau::TauPFSpecific > pfSpecific_
holder for PFTau info, or empty vector if CaloTau
Definition: Tau.h:422
const reco::TrackRefVector & isolationTracks() const
override the reco::BaseTau::isolationTracks method, to access the internal storage of the isolation t...
Definition: Tau.cc:125
reco::Candidate::LorentzVector p4Jet_
unsigned int currentJECSet_
Definition: Tau.h:431