test
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 #include <algorithm>
7 #include <boost/bind.hpp>
8 
9 using namespace pat;
10 
11 
13 Tau::Tau() :
14  Lepton<reco::BaseTau>()
15  ,embeddedIsolationTracks_(false)
16  ,embeddedLeadTrack_(false)
17  ,embeddedSignalTracks_(false)
18  ,embeddedLeadPFCand_(false)
19  ,embeddedLeadPFChargedHadrCand_(false)
20  ,embeddedLeadPFNeutralCand_(false)
21  ,embeddedSignalPFCands_(false)
22  ,embeddedSignalPFChargedHadrCands_(false)
23  ,embeddedSignalPFNeutralHadrCands_(false)
24  ,embeddedSignalPFGammaCands_(false)
25  ,embeddedIsolationPFCands_(false)
26  ,embeddedIsolationPFChargedHadrCands_(false)
27  ,embeddedIsolationPFNeutralHadrCands_(false)
28  ,embeddedIsolationPFGammaCands_(false)
29 {
30 }
31 
33 Tau::Tau(const reco::BaseTau & aTau) :
34  Lepton<reco::BaseTau>(aTau)
35  ,embeddedIsolationTracks_(false)
36  ,embeddedLeadTrack_(false)
37  ,embeddedSignalTracks_(false)
38  ,embeddedLeadPFCand_(false)
39  ,embeddedLeadPFChargedHadrCand_(false)
40  ,embeddedLeadPFNeutralCand_(false)
41  ,embeddedSignalPFCands_(false)
42  ,embeddedSignalPFChargedHadrCands_(false)
43  ,embeddedSignalPFNeutralHadrCands_(false)
44  ,embeddedSignalPFGammaCands_(false)
45  ,embeddedIsolationPFCands_(false)
46  ,embeddedIsolationPFChargedHadrCands_(false)
47  ,embeddedIsolationPFNeutralHadrCands_(false)
48  ,embeddedIsolationPFGammaCands_(false)
49 {
50  const reco::PFTau * pfTau = dynamic_cast<const reco::PFTau *>(&aTau);
51  if (pfTau != 0){
52  pfSpecific_.push_back(pat::tau::TauPFSpecific(*pfTau));
53  pfEssential_.push_back(pat::tau::TauPFEssential(*pfTau));
54  }
55  const reco::CaloTau * caloTau = dynamic_cast<const reco::CaloTau *>(&aTau);
56  if (caloTau != 0) caloSpecific_.push_back(pat::tau::TauCaloSpecific(*caloTau));
57 }
58 
60 Tau::Tau(const edm::RefToBase<reco::BaseTau> & aTauRef) :
61  Lepton<reco::BaseTau>(aTauRef)
62  ,embeddedIsolationTracks_(false)
63  ,embeddedLeadTrack_(false)
64  ,embeddedSignalTracks_(false)
65  ,embeddedLeadPFCand_(false)
66  ,embeddedLeadPFChargedHadrCand_(false)
67  ,embeddedLeadPFNeutralCand_(false)
68  ,embeddedSignalPFCands_(false)
69  ,embeddedSignalPFChargedHadrCands_(false)
70  ,embeddedSignalPFNeutralHadrCands_(false)
71  ,embeddedSignalPFGammaCands_(false)
72  ,embeddedIsolationPFCands_(false)
73  ,embeddedIsolationPFChargedHadrCands_(false)
74  ,embeddedIsolationPFNeutralHadrCands_(false)
75  ,embeddedIsolationPFGammaCands_(false)
76 {
77  const reco::PFTau * pfTau = dynamic_cast<const reco::PFTau *>(aTauRef.get());
78  if (pfTau != 0){
79  pfSpecific_.push_back(pat::tau::TauPFSpecific(*pfTau));
80  pfEssential_.push_back(pat::tau::TauPFEssential(*pfTau));
81  }
82  const reco::CaloTau * caloTau = dynamic_cast<const reco::CaloTau *>(aTauRef.get());
83  if (caloTau != 0) caloSpecific_.push_back(pat::tau::TauCaloSpecific(*caloTau));
84 }
85 
87 Tau::Tau(const edm::Ptr<reco::BaseTau> & aTauRef) :
88  Lepton<reco::BaseTau>(aTauRef)
89  ,embeddedIsolationTracks_(false)
90  ,embeddedLeadTrack_(false)
91  ,embeddedSignalTracks_(false)
92  ,embeddedLeadPFCand_(false)
93  ,embeddedLeadPFChargedHadrCand_(false)
94  ,embeddedLeadPFNeutralCand_(false)
95  ,embeddedSignalPFCands_(false)
96  ,embeddedSignalPFChargedHadrCands_(false)
97  ,embeddedSignalPFNeutralHadrCands_(false)
98  ,embeddedSignalPFGammaCands_(false)
99  ,embeddedIsolationPFCands_(false)
100  ,embeddedIsolationPFChargedHadrCands_(false)
101  ,embeddedIsolationPFNeutralHadrCands_(false)
102  ,embeddedIsolationPFGammaCands_(false)
103 {
104  const reco::PFTau * pfTau = dynamic_cast<const reco::PFTau *>(aTauRef.get());
105  if (pfTau != 0){
106  pfSpecific_.push_back(pat::tau::TauPFSpecific(*pfTau));
107  pfEssential_.push_back(pat::tau::TauPFEssential(*pfTau));
108  }
109  const reco::CaloTau * caloTau = dynamic_cast<const reco::CaloTau *>(aTauRef.get());
110  if (caloTau != 0) caloSpecific_.push_back(pat::tau::TauCaloSpecific(*caloTau));
111 }
112 
114 Tau::~Tau() {
115 }
116 
117 std::ostream&
118 reco::operator<<(std::ostream& out, const pat::Tau& obj)
119 {
120  if(!out) return out;
121 
122  out << "\tpat::Tau: ";
123  out << std::setiosflags(std::ios::right);
124  out << std::setiosflags(std::ios::fixed);
125  out << std::setprecision(3);
126  out << " E/pT/eta/phi "
127  << obj.energy()<<"/"
128  << obj.pt()<<"/"
129  << obj.eta()<<"/"
130  << obj.phi();
131  return out;
132 }
133 
138  std::unique_ptr<reco::TrackRefVector> trackRefVec{ new reco::TrackRefVector{}};
139  trackRefVec->reserve(isolationTracks_.size());
140  for (unsigned int i = 0; i < isolationTracks_.size(); i++) {
141  trackRefVec->push_back(reco::TrackRef(&isolationTracks_, i));
142  }
144  }
146  } else {
148  }
149 }
150 
151 
154  if (embeddedLeadTrack_) {
155  return reco::TrackRef(&leadTrack_, 0);
156  } else {
157  return reco::BaseTau::leadTrack();
158  }
159 }
160 
161 
163 const reco::TrackRefVector & Tau::signalTracks() const {
164  if (embeddedSignalTracks_) {
166  std::unique_ptr<reco::TrackRefVector> trackRefVec{ new reco::TrackRefVector{} };
167  trackRefVec->reserve(signalTracks_.size());
168  for (unsigned int i = 0; i < signalTracks_.size(); i++) {
169  trackRefVec->push_back(reco::TrackRef(&signalTracks_, i));
170  }
172  }
174  } else {
176  }
177 }
178 
179 
182  isolationTracks_.clear();
184  for (unsigned int i = 0; i < trackRefVec.size(); i++) {
185  isolationTracks_.push_back(*trackRefVec.at(i));
186  }
188 }
189 
190 
192 void Tau::embedLeadTrack() {
193  leadTrack_.clear();
194  if (reco::BaseTau::leadTrack().isNonnull()) {
195  leadTrack_.push_back(*reco::BaseTau::leadTrack());
196  embeddedLeadTrack_ = true;
197  }
198 }
199 
200 
203  signalTracks_.clear();
205  for (unsigned int i = 0; i < trackRefVec.size(); i++) {
206  signalTracks_.push_back(*trackRefVec.at(i));
207  }
208  embeddedSignalTracks_ = true;
209 }
210 
211 
213 void Tau::setGenJet(const reco::GenJetRef& gj) {
214  genJet_.clear();
215  genJet_.push_back(*gj);
216 }
217 
219 const reco::GenJet * Tau::genJet() const {
220  return (genJet_.size() > 0 ? &genJet_.front() : 0);
221 }
222 
223 
224 // method to retrieve a tau ID (or throw)
225 float Tau::tauID(const std::string & name) const {
226  for (std::vector<IdPair>::const_iterator it = tauIDs_.begin(), ed = tauIDs_.end(); it != ed; ++it) {
227  if (it->first == name) return it->second;
228  }
229  cms::Exception ex("Key not found");
230  ex << "pat::Tau: the ID " << name << " can't be found in this pat::Tau.\n";
231  ex << "The available IDs are: ";
232  for (std::vector<IdPair>::const_iterator it = tauIDs_.begin(), ed = tauIDs_.end(); it != ed; ++it) {
233  ex << "'" << it->first << "' ";
234  }
235  ex << ".\n";
236  throw ex;
237 }
238 // check if an ID is there
239 bool Tau::isTauIDAvailable(const std::string & name) const {
240  for (std::vector<IdPair>::const_iterator it = tauIDs_.begin(), ed = tauIDs_.end(); it != ed; ++it) {
241  if (it->first == name) return true;
242  }
243  return false;
244 }
245 
246 
248  if (!isPFTau()) throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't made from a PFTau.\n";
249  return pfSpecific_[0];
250 }
251 
253  if (pfEssential_.empty()) throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't made from a PFTau.\n";
254  return pfEssential_[0];
255 }
256 
257 
259  if (!isCaloTau()) throw cms::Exception("Type Error") << "Requesting a CaloTau-specific information from a pat::Tau which wasn't made from a CaloTau.\n";
260  return caloSpecific_[0];
261 }
262 
264 {
265  if ( isCaloTau() ) return caloSpecific().p4Jet_;
266  if ( isPFTau() ) return reco::Candidate::LorentzVector(pfEssential().p4Jet_);
267  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";
268 }
269 
270 float Tau::dxy_Sig() const
271 {
272  if ( pfEssential().dxy_error_ != 0 ) return (pfEssential().dxy_/pfEssential().dxy_error_);
273  else return 0.;
274 }
275 
277 {
281  for ( int i = 0; i < dimension; ++i ) {
282  for ( int j = 0; j < dimension; ++j ) {
283  cov(i,j) = sv(i,j) + pv(i,j);
284  }
285  }
286  return cov;
287 }
288 
289 float Tau::ip3d_Sig() const
290 {
291  if( pfEssential().ip3d_error_ != 0 ) return (pfEssential().ip3d_/pfEssential().ip3d_error_);
292  else return 0.;
293 }
294 
295 float Tau::etaetaMoment() const
296 {
297  if ( isCaloTau() ) return caloSpecific().etaetaMoment_;
298  if ( isPFTau() ) return pfSpecific().etaetaMoment_;
299  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";
300 }
301 
302 float Tau::phiphiMoment() const
303 {
304  if ( isCaloTau() ) return caloSpecific().phiphiMoment_;
305  if ( isPFTau() ) return pfSpecific().phiphiMoment_;
306  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";
307 }
308 
309 float Tau::etaphiMoment() const
310 {
311  if ( isCaloTau() ) return caloSpecific().etaphiMoment_;
312  if ( isPFTau() ) return pfSpecific().etaphiMoment_;
313  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";
314 }
315 
316 void Tau::setDecayMode(int decayMode)
317 {
318  if (!isPFTau()) throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't made from a PFTau.\n";
319  pfEssential_[0].decayMode_ = decayMode;
320 }
321 
323 void Tau::embedLeadPFCand() {
324  if (!isPFTau() ) {//additional check with warning in pat::tau producer
325  return;
326  }
327  leadPFCand_.clear();
328  if (pfSpecific_[0].leadPFCand_.isNonnull() ) {
329  leadPFCand_.push_back(*pfSpecific_[0].leadPFCand_); //already set in C-tor
330  embeddedLeadPFCand_ = true;
331  }
332 }
335  if (!isPFTau() ) {//additional check with warning in pat::tau producer
336  return;
337  }
338  leadPFChargedHadrCand_.clear();
339  if (pfSpecific_[0].leadPFChargedHadrCand_.isNonnull() ) {
340  leadPFChargedHadrCand_.push_back(*pfSpecific_[0].leadPFChargedHadrCand_); //already set in C-tor
342  }
343 }
346  if (!isPFTau() ) {//additional check with warning in pat::tau producer
347  return;
348  }
349  leadPFNeutralCand_.clear();
350  if (pfSpecific_[0].leadPFNeutralCand_.isNonnull() ) {
351  leadPFNeutralCand_.push_back(*pfSpecific_[0].leadPFNeutralCand_); //already set in C-tor
353  }
354 }
355 
357  if (!isPFTau() ) {//additional check with warning in pat::tau producer
358  return;
359  }
360  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFCands_;
361  for (unsigned int i = 0; i < candPtrs.size(); i++) {
362  signalPFCands_.push_back(*candPtrs.at(i));
363  }
364  embeddedSignalPFCands_ = true;
365 }
367  if (!isPFTau() ) {//additional check with warning in pat::tau producer
368  return;
369  }
370  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFChargedHadrCands_;
371  for (unsigned int i = 0; i < candPtrs.size(); i++) {
372  signalPFChargedHadrCands_.push_back(*candPtrs.at(i));
373  }
375 }
377  if (!isPFTau() ) {//additional check with warning in pat::tau producer
378  return;
379  }
380  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFNeutrHadrCands_;
381  for (unsigned int i = 0; i < candPtrs.size(); i++) {
382  signalPFNeutralHadrCands_.push_back(*candPtrs.at(i));
383  }
385 }
387  if (!isPFTau() ) {//additional check with warning in pat::tau producer
388  return;
389  }
390  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFGammaCands_;
391  for (unsigned int i = 0; i < candPtrs.size(); i++) {
392  signalPFGammaCands_.push_back(*candPtrs.at(i));
393  }
395 }
396 
398  if (!isPFTau() ) {//additional check with warning in pat::tau producer
399  return;
400  }
401  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFCands_;
402  for (unsigned int i = 0; i < candPtrs.size(); i++) {
403  isolationPFCands_.push_back(*candPtrs.at(i));
404  }
406 }
407 
409  if (!isPFTau() ) {//additional check with warning in pat::tau producer
410  return;
411  }
412  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFChargedHadrCands_;
413  for (unsigned int i = 0; i < candPtrs.size(); i++) {
414  isolationPFChargedHadrCands_.push_back(*candPtrs.at(i));
415  }
417 }
419  if (!isPFTau() ) {//additional check with warning in pat::tau producer
420  return;
421  }
422  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFNeutrHadrCands_;
423  for (unsigned int i = 0; i < candPtrs.size(); i++) {
424  isolationPFNeutralHadrCands_.push_back(*candPtrs.at(i));
425  }
427 }
429  if (!isPFTau() ) {//additional check with warning in pat::tau producer
430  return;
431  }
432  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFGammaCands_;
433  for (unsigned int i = 0; i < candPtrs.size(); i++) {
434  isolationPFGammaCands_.push_back(*candPtrs.at(i));
435  }
437 }
438 
440  if(!isPFTau() ) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
441  if ( pfSpecific().signalTauChargedHadronCandidates_.size() > 0 ) {
442  return reco::PFRecoTauChargedHadronRef(&pfSpecific().signalTauChargedHadronCandidates_,0);
443  } else {
445  }
446 }
447 
450  if(pfSpecific_.empty()) return reco::PFCandidatePtr();
451  else return pfSpecific().leadPFChargedHadrCand_;
452  }else
454 }
455 
458  if(pfSpecific_.empty()) return reco::PFCandidatePtr();
459  else return pfSpecific().leadPFNeutralCand_;
460  }else
462 }
463 
464 const reco::PFCandidatePtr Tau::leadPFCand() const {
465  if(!embeddedLeadPFCand_){
466  if(pfSpecific_.empty()) return reco::PFCandidatePtr();
467  return pfSpecific().leadPFCand_;
468  }else
470 }
471 
472 const std::vector<reco::PFCandidatePtr>& Tau::signalPFCands() const {
475  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
476  aPtrs->reserve(signalPFCands_.size());
477  for (unsigned int i = 0; i < signalPFCands_.size(); i++) {
478  aPtrs->push_back(reco::PFCandidatePtr(&signalPFCands_, i) );
479  }
481  }
483  } else {
484  if(pfSpecific_.empty() || pfSpecific().selectedSignalPFCands_.empty() || !pfSpecific().selectedSignalPFCands_.front().isAvailable()){
485  // this part of code is called when reading from patTuple or miniAOD
486  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
487  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
490  } else return pfSpecific().selectedSignalPFCands_;
491  }
492 }
493 
494 const std::vector<reco::PFCandidatePtr>& Tau::signalPFChargedHadrCands() const {
497  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
498  aPtrs->reserve(signalPFChargedHadrCands_.size());
499  for (unsigned int i = 0; i < signalPFChargedHadrCands_.size(); i++) {
500  aPtrs->push_back(reco::PFCandidatePtr(&signalPFChargedHadrCands_, i) );
501  }
503  }
505  } else {
506  if(pfSpecific_.empty() || pfSpecific().selectedSignalPFChargedHadrCands_.empty() || !pfSpecific().selectedSignalPFChargedHadrCands_.front().isAvailable()){
507  // this part of code is called when reading from patTuple or miniAOD
508  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
509  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
513  }
514 }
515 
516 const std::vector<reco::PFCandidatePtr>& Tau::signalPFNeutrHadrCands() const {
519  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
520  aPtrs->reserve(signalPFNeutralHadrCands_.size());
521  for (unsigned int i = 0; i < signalPFNeutralHadrCands_.size(); i++) {
522  aPtrs->push_back(reco::PFCandidatePtr(&signalPFNeutralHadrCands_, i) );
523  }
525  }
527  } else {
528  if(pfSpecific_.empty() || pfSpecific().selectedSignalPFNeutrHadrCands_.empty() || !pfSpecific().selectedSignalPFNeutrHadrCands_.front().isAvailable()){
529  // this part of code is called when reading from patTuple or miniAOD
530  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
531  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
535  }
536 }
537 
538 const std::vector<reco::PFCandidatePtr>& Tau::signalPFGammaCands() const {
541  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
542  aPtrs->reserve(signalPFGammaCands_.size());
543  for (unsigned int i = 0; i < signalPFGammaCands_.size(); i++) {
544  aPtrs->push_back(reco::PFCandidatePtr(&signalPFGammaCands_, i) );
545  }
547  }
549  } else {
550  if(pfSpecific_.empty() || pfSpecific().selectedSignalPFGammaCands_.empty() || !pfSpecific().selectedSignalPFGammaCands_.front().isAvailable()){
551  // this part of code is called when reading from patTuple or miniAOD
552  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
553  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
556  } else return pfSpecific().selectedSignalPFGammaCands_;
557  }
558 }
559 
560 const std::vector<reco::PFRecoTauChargedHadron> & Tau::signalTauChargedHadronCandidates() const {
561  if(pfSpecific_.empty()) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
563 }
564 
565 const std::vector<reco::RecoTauPiZero> & Tau::signalPiZeroCandidates() const {
566  if(pfSpecific_.empty()) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
568 }
569 
570 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFCands() const {
573  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
574  aPtrs->reserve(isolationPFCands_.size());
575  for (unsigned int i = 0; i < isolationPFCands_.size(); i++) {
576  aPtrs->push_back(reco::PFCandidatePtr(&isolationPFCands_, i) );
577  }
579  }
581  } else {
582  if(pfSpecific_.empty() || pfSpecific().selectedIsolationPFCands_.empty() || !pfSpecific().selectedIsolationPFCands_.front().isAvailable()){
583  // this part of code is called when reading from patTuple or miniAOD
584  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
585  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
588  } else return pfSpecific().selectedIsolationPFCands_;
589  }
590 }
591 
592 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFChargedHadrCands() const {
595  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
596  aPtrs->reserve(isolationPFChargedHadrCands_.size());
597  for (unsigned int i = 0; i < isolationPFChargedHadrCands_.size(); i++) {
599  }
601  }
603  } else {
605  // this part of code is called when reading from patTuple or miniAOD
606  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
607  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
611  }
612 }
613 
614 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFNeutrHadrCands() const {
617  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
618  aPtrs->reserve(isolationPFNeutralHadrCands_.size());
619  for (unsigned int i = 0; i < isolationPFNeutralHadrCands_.size(); i++) {
621  }
623  }
625  } else {
627  // this part of code is called when reading from patTuple or miniAOD
628  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
629  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
633  }
634 }
635 
636 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFGammaCands() const {
639  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
640  aPtrs->reserve(isolationPFGammaCands_.size());
641  for (unsigned int i = 0; i < isolationPFGammaCands_.size(); i++) {
642  aPtrs->push_back(reco::PFCandidatePtr(&isolationPFGammaCands_, i) );
643  }
645  }
647  } else {
648  if(pfSpecific_.empty() || pfSpecific().selectedIsolationPFGammaCands_.empty() || !pfSpecific().selectedIsolationPFGammaCands_.front().isAvailable()){
649  // this part of code is called when reading from patTuple or miniAOD
650  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
651  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
655  }
656 }
657 
658 const std::vector<reco::PFRecoTauChargedHadron> & Tau::isolationTauChargedHadronCandidates() const {
659  if(pfSpecific_.empty()) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
661 }
662 
663 const std::vector<reco::RecoTauPiZero> & Tau::isolationPiZeroCandidates() const {
664  if(pfSpecific_.empty()) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
666 }
667 
670 
671 // initialize the jet to a given JEC level during creation starting from Uncorrected
672 void Tau::initializeJEC(unsigned int level, unsigned int set)
673 {
674  currentJECSet(set);
675  currentJECLevel(level);
676  setP4(jec_[set].correction(level)*p4());
677 }
678 
680 int Tau::jecSet(const std::string& set) const
681 {
682  for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor = jec_.begin();
683  corrFactor != jec_.end(); ++corrFactor ) {
684  if ( corrFactor->jecSet() == set ) return corrFactor-jec_.begin();
685  }
686  return -1;
687 }
688 
690 const std::vector<std::string> Tau::availableJECSets() const
691 {
692  std::vector<std::string> sets;
693  for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor = jec_.begin();
694  corrFactor != jec_.end(); ++corrFactor ) {
695  sets.push_back(corrFactor->jecSet());
696  }
697  return sets;
698 }
699 
700 const std::vector<std::string> Tau::availableJECLevels(const int& set) const
701 {
702  return set>=0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
703 }
704 
707 float Tau::jecFactor(const std::string& level, const std::string& set) const
708 {
709  for ( unsigned int idx = 0; idx < jec_.size(); ++idx ) {
710  if ( set.empty() || jec_.at(idx).jecSet() == set ){
711  if ( jec_[idx].jecLevel(level) >= 0 )
712  return jecFactor(jec_[idx].jecLevel(level), idx);
713  else
714  throw cms::Exception("InvalidRequest")
715  << "This JEC level " << level << " does not exist. \n";
716  }
717  }
718  throw cms::Exception("InvalidRequest")
719  << "This jet does not carry any jet energy correction factor information \n"
720  << "for a jet energy correction set with label " << set << "\n";
721 }
722 
725 float Tau::jecFactor(const unsigned int& level, const unsigned int& set) const
726 {
727  if ( !jecSetsAvailable() )
728  throw cms::Exception("InvalidRequest")
729  << "This jet does not carry any jet energy correction factor information \n";
730  if ( !jecSetAvailable(set) )
731  throw cms::Exception("InvalidRequest")
732  << "This jet does not carry any jet energy correction factor information \n"
733  << "for a jet energy correction set with index " << set << "\n";
734  return jec_.at(set).correction(level)/jec_.at(currentJECSet_).correction(currentJECLevel_);
735 }
736 
739 Tau Tau::correctedTauJet(const std::string& level, const std::string& set) const
740 {
741  // rescale p4 of the jet; the update of current values is
742  // done within the called jecFactor function
743  for ( unsigned int idx = 0; idx < jec_.size(); ++idx ) {
744  if ( set.empty() || jec_.at(idx).jecSet() == set ) {
745  if ( jec_[idx].jecLevel(level) >= 0 )
746  return correctedTauJet(jec_[idx].jecLevel(level), idx);
747  else
748  throw cms::Exception("InvalidRequest")
749  << "This JEC level " << level << " does not exist. \n";
750  }
751  }
752  throw cms::Exception("InvalidRequest")
753  << "This JEC set " << set << " does not exist. \n";
754 }
755 
758 Tau Tau::correctedTauJet(const unsigned int& level, const unsigned int& set) const
759 {
760  Tau correctedTauJet(*this);
761  //rescale p4 of the jet
762  correctedTauJet.setP4(jecFactor(level, set)*p4());
763  // update current level and set
766  return correctedTauJet;
767 }
768 
769 
770 
773 // return the leading candidate from signal(PF)ChargedHadrCandPtrs_ collection
776  if (leadPF.isAvailable() || signalChargedHadrCandPtrs_.isNull()) return leadPF;
779  if (ret.isNull() || (p->pt() > ret->pt())) ret = p;
780  }
781  return ret;
782 
783 }
784 
787  const reco::PFCandidatePtr leadPF = leadPFNeutralCand();
788  if (leadPF.isAvailable() || signalNeutralHadrCandPtrs_.isNull()) return leadPF;
791  if (ret.isNull() || (p->pt() > ret->pt())) ret = p;
792  }
793  return ret;
794 
795 }
796 
798 const reco::CandidatePtr Tau::leadCand() const {
799  const reco::PFCandidatePtr leadPF = leadPFCand();
800  if (leadPF.isAvailable() || !Tau::ExistSignalCands()) return leadPF;
801  else return Tau::signalCands()[0];
802 }
803 
805 
806 bool Tau::ExistSignalCands() const {
807  return !(signalChargedHadrCandPtrs_.isNull() && signalNeutralHadrCandPtrs_.isNull() && signalGammaCandPtrs_.isNull());
808 }
809 
810 bool Tau::ExistIsolationCands() const {
812 }
813 
816 
818  std::vector<reco::PFCandidatePtr> r0 = signalPFCands();
820  if(!Tau::ExistSignalCands() || (!r0.empty() && r0.front().isAvailable())) {
821  for (const auto & p : r0) ret.push_back(p);
822  return ret;
823  } else {
826  std::vector<std::pair<float,size_t> > pt_index;
827  size_t index=0;
828  for (const auto & p : signalChargedHadrCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
829  for (const auto & p : signalNeutralHadrCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
830  for (const auto & p : signalGammaCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
831  std::sort(pt_index.begin(),pt_index.end(),
832  boost::bind(&std::pair<float,size_t>::first,_1) >
833  boost::bind(&std::pair<float,size_t>::first,_2));
834  for( const auto & p : pt_index){
835  ret.push_back(ret2[p.second]);
836  }
837  return ret;
838  }
839 }
840 
844  std::vector<reco::PFCandidatePtr> r0 = signalPFChargedHadrCands();
845  if(signalChargedHadrCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
847  for (const auto & p : r0) ret.push_back(p);
848  return ret;
849  } else {
851  }
852 }
853 
854 
858  std::vector<reco::PFCandidatePtr> r0 = signalPFNeutrHadrCands();
859  if(signalNeutralHadrCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
861  for (const auto & p : r0) ret.push_back(p);
862  return ret;
863  } else {
865  }
866 }
867 
871  std::vector<reco::PFCandidatePtr> r0 = signalPFGammaCands();
872  if(signalGammaCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
874  for (const auto & p : r0) ret.push_back(p);
875  return ret;
876  } else {
877  return signalGammaCandPtrs_;
878  }
879 }
880 
884  std::vector<reco::PFCandidatePtr> r0 = isolationPFCands();
886  if(!Tau::ExistIsolationCands() || (!r0.empty() && r0.front().isAvailable())) {
887  for (const auto & p : r0) ret.push_back(p);
888  return ret;
889  } else {
892  std::vector<std::pair<float,size_t> > pt_index;
893  size_t index=0;
894  for (const auto & p : isolationChargedHadrCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
895  for (const auto & p : isolationNeutralHadrCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
896  for (const auto & p : isolationGammaCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
897  std::sort(pt_index.begin(),pt_index.end(),
898  boost::bind(&std::pair<float,size_t>::first,_1) >
899  boost::bind(&std::pair<float,size_t>::first,_2));
900  for( const auto & p : pt_index){
901  ret.push_back(ret2[p.second]);
902  }
903  return ret;
904  }
905 }
906 
910  std::vector<reco::PFCandidatePtr> r0 = isolationPFChargedHadrCands();
911  if(isolationChargedHadrCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
913  for (const auto & p : r0) ret.push_back(p);
914  return ret;
915  } else {
917  }
918 }
919 
924  std::vector<reco::PFCandidatePtr> r0 = isolationPFNeutrHadrCands();
925  if(isolationNeutralHadrCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
927  for (const auto & p : r0) ret.push_back(p);
928  return ret;
929  } else {
931  }
932 }
933 
937  std::vector<reco::PFCandidatePtr> r0 = isolationPFGammaCands();
938  if(isolationGammaCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
940  for (const auto & p : r0) ret.push_back(p);
941  return ret;
942  } else {
944  }
945 }
946 
947 
948 
951 size_t Tau::numberOfSourceCandidatePtrs() const {
952  if (Tau::ExistSignalCands()) return Tau::signalCands().size();
953  else if(pfSpecific_.empty()) return 0;
954  else return pfSpecific().selectedSignalPFCands_.size();
955 }
958  if (Tau::ExistSignalCands()) return Tau::signalCands()[i];
959  else if(pfSpecific_.empty()) return reco::CandidatePtr();
960  else return pfSpecific().selectedSignalPFCands_[i];
961 }
962 
963 
964 
965 
bool embeddedLeadPFNeutralCand_
Definition: Tau.h:471
value_type const * get() const
Definition: RefToBase.h:234
virtual reco::TrackRef leadTrack() const
Definition: BaseTau.cc:26
int i
Definition: DBlmapReader.cc:9
tuple ret
prodAgent to be discontinued
edm::AtomicPtrCache< reco::TrackRefVector > signalTracksTransientRefVector_
Definition: Tau.h:464
const std::vector< reco::PFCandidatePtr > & isolationPFCands() const
const std::vector< std::string > availableJECSets() const
const pat::tau::TauCaloSpecific & caloSpecific() const
return CaloTau info or throw exception &#39;not CaloTau&#39;
reco::CandidatePtrVector isolationGammaCandPtrs_
Definition: Tau.h:530
pat::tau::TauPFEssential::CovMatrix flightLengthCov() const
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:74
const reco::CandidatePtr leadCand() const
return the PFCandidate if available (reference or embedded), or the PackedPFCandidate on miniAOD ...
const reco::TrackRefVector & isolationTracks() const
override the reco::BaseTau::isolationTracks method, to access the internal storage of the isolation t...
reco::CandidatePtrVector isolationChargedHadrCands() const
void embedIsolationPFCands()
method to store the isolation candidates internally
bool embeddedSignalPFChargedHadrCands_
Definition: Tau.h:477
std::vector< reco::PFCandidatePtr > selectedIsolationPFChargedHadrCands_
Definition: TauPFSpecific.h:39
virtual double energy() const final
energy
std::vector< reco::PFCandidate > leadPFNeutralCand_
Definition: Tau.h:470
void embedIsolationPFGammaCands()
method to store the isolation gamma candidates internally
bool isNull() const
Checks for null.
Definition: PtrVectorBase.h:49
reco::PFCandidatePtr leadPFCand_
Definition: TauPFSpecific.h:31
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFChargedHadrCandsTransientPtrs_
Definition: Tau.h:490
virtual const reco::TrackRefVector & isolationTracks() const
Definition: BaseTau.cc:30
std::vector< reco::PFCandidate > signalPFNeutralHadrCands_
Definition: Tau.h:479
std::vector< reco::PFCandidate > signalPFCands_
Definition: Tau.h:473
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:141
size_t numberOfSourceCandidatePtrs() const
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFNeutralHadrCandsTransientPtrs_
Definition: Tau.h:481
bool embeddedIsolationPFChargedHadrCands_
Definition: Tau.h:489
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:160
bool jecSetAvailable(const std::string &set) const
Definition: Tau.h:402
bool embeddedIsolationPFCands_
Definition: Tau.h:486
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
const pat::tau::TauPFEssential & pfEssential() const
bool isAvailable() const
Definition: Ptr.h:259
const reco::PFCandidatePtr leadPFChargedHadrCand() const
void embedLeadTrack()
method to store the leading track internally
reco::PFCandidatePtr leadPFChargedHadrCand_
Definition: TauPFSpecific.h:28
void embedSignalPFChargedHadrCands()
method to store the signal charged hadrons candidates internally
std::vector< reco::PFCandidate > isolationPFGammaCands_
Definition: Tau.h:494
std::vector< reco::PFCandidate > isolationPFNeutralHadrCands_
Definition: Tau.h:491
virtual double phi() const final
momentum azimuthal angle
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFGammaCandsTransientPtrs_
Definition: Tau.h:496
const reco::CandidatePtr leadNeutralCand() const
return the PFCandidate if available (reference or embedded), or the PackedPFCandidate on miniAOD ...
const std::vector< reco::PFRecoTauChargedHadron > & signalTauChargedHadronCandidates() const
std::vector< reco::GenJet > genJet_
Definition: Tau.h:499
void setDecayMode(int)
set decay mode
reco::CandidatePtr sourceCandidatePtr(size_type i) const
get the source candidate pointer with index i
float ip3d_Sig() const
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFCandsTransientPtrs_
Definition: Tau.h:475
float tauID(const std::string &name) const
bool embeddedIsolationPFNeutralHadrCands_
Definition: Tau.h:492
reco::CandidatePtrVector signalCands() const
bool embeddedLeadTrack_
Definition: Tau.h:460
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFGammaCandsTransientPtrs_
Definition: Tau.h:484
int jecSet(const std::string &label) const
float phiphiMoment() const
uint16_t size_type
std::vector< reco::PFCandidate > leadPFCand_
Definition: Tau.h:466
reco::CandidatePtrVector signalGammaCands() const
const pat::tau::TauPFEssential::CovMatrix & primaryVertexCov() const
Definition: Tau.h:322
bool isSet() const
std::vector< reco::PFCandidatePtr > selectedIsolationPFNeutrHadrCands_
Definition: TauPFSpecific.h:40
const std::vector< reco::PFRecoTauChargedHadron > & isolationTauChargedHadronCandidates() const
bool embeddedSignalPFGammaCands_
Definition: Tau.h:483
std::vector< reco::PFRecoTauChargedHadron > isolationTauChargedHadronCandidates_
Definition: TauPFSpecific.h:42
reco::CandidatePtrVector isolationNeutrHadrCands() const
unsigned int currentJECLevel_
Definition: Tau.h:521
edm::AtomicPtrCache< reco::TrackRefVector > isolationTracksTransientRefVector_
Definition: Tau.h:459
const std::vector< reco::PFCandidatePtr > & signalPFCands() const
reco::PFRecoTauChargedHadronRef leadTauChargedHadronCandidate() const
std::vector< reco::PFRecoTauChargedHadron > signalTauChargedHadronCandidates_
Definition: TauPFSpecific.h:36
void embedSignalPFCands()
method to store the signal candidates internally
reco::CandidatePtrVector isolationChargedHadrCandPtrs_
Definition: Tau.h:528
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:463
std::vector< IdPair > tauIDs_
Definition: Tau.h:502
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFChargedHadrCandsTransientPtrs_
Definition: Tau.h:478
std::vector< reco::RecoTauPiZero > signalPiZeroCandidates_
Definition: TauPFSpecific.h:37
bool embeddedIsolationPFGammaCands_
Definition: Tau.h:495
float etaetaMoment() const
std::vector< reco::PFCandidate > signalPFChargedHadrCands_
Definition: Tau.h:476
Tau()
default constructor
Analysis-level lepton class.
Definition: Lepton.h:30
def move
Definition: eostools.py:510
bool isNull() const
Checks for null.
Definition: Ptr.h:165
Tau correctedTauJet(const std::string &level, const std::string &set="") const
float jecFactor(const std::string &level, const std::string &set="") const
int j
Definition: DBlmapReader.cc:9
reco::CandidatePtrVector isolationNeutralHadrCandPtrs_
Definition: Tau.h:529
Jets made from MC generator particles.
Definition: GenJet.h:24
bool embeddedSignalTracks_
Definition: Tau.h:462
bool embeddedLeadPFCand_
Definition: Tau.h:467
reco::CandidatePtrVector signalNeutrHadrCands() const
std::vector< reco::PFCandidatePtr > selectedSignalPFChargedHadrCands_
Definition: TauPFSpecific.h:33
virtual const reco::TrackRefVector & signalTracks() const
Definition: BaseTau.cc:28
const reco::CandidatePtr leadChargedHadrCand() const
std::vector< pat::tau::TauPFEssential > pfEssential_
Definition: Tau.h:534
std::vector< reco::PFCandidatePtr > selectedSignalPFCands_
Definition: TauPFSpecific.h:32
void embedIsolationPFNeutralHadrCands()
method to store the isolation neutral hadrons candidates internally
const std::vector< reco::RecoTauPiZero > & signalPiZeroCandidates() const
unsigned int index
Definition: LeafCandidate.h:31
void reserve(size_type n)
Reserve space for RefVector.
Definition: RefVector.h:113
void embedLeadPFChargedHadrCand()
method to store the leading charged hadron candidate internally
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Definition: Tau.h:411
const reco::PFCandidatePtr leadPFCand() const
Analysis-level tau class.
Definition: Tau.h:58
const pat::tau::TauPFEssential::CovMatrix & secondaryVertexCov() const
Definition: Tau.h:329
bool embeddedLeadPFChargedHadrCand_
Definition: Tau.h:469
void embedIsolationPFChargedHadrCands()
method to store the isolation charged hadrons candidates internally
bool embeddedSignalPFNeutralHadrCands_
Definition: Tau.h:480
std::vector< reco::PFCandidate > isolationPFCands_
Definition: Tau.h:485
std::vector< reco::Track > isolationTracks_
Definition: Tau.h:458
void setGenJet(const reco::GenJetRef &ref)
set the matched GenJet
bool isTauIDAvailable(const std::string &name) const
Returns true if a specific ID is available in this pat::Tau.
const std::vector< reco::PFCandidatePtr > & signalPFChargedHadrCands() const
void embedLeadPFNeutralCand()
method to store the leading neutral candidate internally
std::vector< pat::tau::TauCaloSpecific > caloSpecific_
holder for CaloTau info, or empty vector if PFTau
Definition: Tau.h:510
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:127
const std::vector< reco::PFCandidatePtr > & signalPFNeutrHadrCands() const
std::vector< reco::PFCandidatePtr > selectedIsolationPFCands_
Definition: TauPFSpecific.h:38
reco::PFCandidatePtr leadPFNeutralCand_
Definition: TauPFSpecific.h:30
const std::vector< reco::PFCandidatePtr > & isolationPFGammaCands() const
reco::CandidatePtrVector signalGammaCandPtrs_
Definition: Tau.h:526
int decayMode() const
reconstructed tau decay mode (specific to PFTau)
Definition: Tau.h:366
bool set(std::unique_ptr< T > iNewValue) const
std::vector< reco::PFCandidatePtr > selectedSignalPFGammaCands_
Definition: TauPFSpecific.h:35
std::vector< pat::TauJetCorrFactors > jec_
Definition: Tau.h:516
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
float etaphiMoment() const
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFNeutralHadrCandsTransientPtrs_
Definition: Tau.h:493
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
std::vector< reco::PFCandidate > signalPFGammaCands_
Definition: Tau.h:482
std::vector< reco::Track > leadTrack_
Definition: Tau.h:461
edm::Ref< PFRecoTauChargedHadronCollection > PFRecoTauChargedHadronRef
presistent reference to a PFRecoTauChargedHadron
std::vector< reco::PFCandidate > isolationPFChargedHadrCands_
Definition: Tau.h:488
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
virtual double p() const final
magnitude of momentum vector
bool jecSetsAvailable() const
Definition: Tau.h:399
void initializeJEC(unsigned int level, const unsigned int set=0)
initialize the jet to a given JEC level during creation starting from Uncorrected ...
std::vector< reco::PFCandidatePtr > selectedSignalPFNeutrHadrCands_
Definition: TauPFSpecific.h:34
const pat::tau::TauPFSpecific & pfSpecific() const
return PFTau info or throw exception &#39;not PFTau&#39;
void embedSignalPFNeutralHadrCands()
method to store the signal neutral hadrons candidates internally
reco::CandidatePtrVector signalNeutralHadrCandPtrs_
Definition: Tau.h:525
const reco::GenJet * genJet() const
return matched GenJet, built from the visible particles of a generated tau
value_type const at(size_type idx) const
Retrieve an element of the RefVector.
Definition: RefVector.h:88
bool embeddedSignalPFCands_
Definition: Tau.h:474
float dxy_Sig() const
const reco::TrackRefVector & signalTracks() const
override the reco::BaseTau::signalTracks method, to access the internal storage of the signal tracks ...
reco::TrackRef leadTrack() const
override the reco::BaseTau::leadTrack method, to access the internal storage of the leading track ...
void embedSignalTracks()
method to store the signal tracks internally
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
reco::CandidatePtrVector isolationGammaCands() const
bool isPFTau() const
Returns true if this pat::Tau was made from a reco::PFTau.
Definition: Tau.h:160
const std::vector< std::string > availableJECLevels(const int &set=0) const
bool embeddedIsolationTracks_
Definition: Tau.h:457
reco::CandidatePtrVector signalChargedHadrCands() const
tuple level
Definition: testEve_cfg.py:34
virtual double eta() const final
momentum pseudorapidity
void embedSignalPFGammaCands()
method to store the signal gamma candidates internally
volatile std::atomic< bool > shutdown_flag false
const std::vector< reco::RecoTauPiZero > & isolationPiZeroCandidates() const
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFCandsTransientPtrs_
Definition: Tau.h:487
bool ExistIsolationCands() const
std::vector< reco::PFCandidate > leadPFChargedHadrCand_
Definition: Tau.h:468
std::string currentJECSet() const
returns the label of the current set of jet energy corrections
Definition: Tau.h:407
bool ExistSignalCands() const
const std::vector< reco::PFCandidatePtr > & signalPFGammaCands() const
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
reco::CandidatePtrVector isolationCands() const
void embedIsolationTracks()
method to store the isolation tracks internally
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
reco::Candidate::LorentzVector p4Jet() const
std::vector< pat::tau::TauPFSpecific > pfSpecific_
holder for PFTau info, or empty vector if CaloTau
Definition: Tau.h:506
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
reco::Candidate::LorentzVector p4Jet_
reco::CandidatePtrVector signalChargedHadrCandPtrs_
Definition: Tau.h:524
unsigned int currentJECSet_
Definition: Tau.h:519
virtual double pt() const final
transverse momentum
void embedLeadPFCand()
math::ErrorF< 3 >::type CovMatrix
const reco::PFCandidatePtr leadPFNeutralCand() const