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::etaetaMoment() const
290 {
291  if ( isCaloTau() ) return caloSpecific().etaetaMoment_;
292  if ( isPFTau() ) return pfSpecific().etaetaMoment_;
293  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";
294 }
295 
296 float Tau::phiphiMoment() const
297 {
298  if ( isCaloTau() ) return caloSpecific().phiphiMoment_;
299  if ( isPFTau() ) return pfSpecific().phiphiMoment_;
300  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";
301 }
302 
303 float Tau::etaphiMoment() const
304 {
305  if ( isCaloTau() ) return caloSpecific().etaphiMoment_;
306  if ( isPFTau() ) return pfSpecific().etaphiMoment_;
307  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";
308 }
309 
310 void Tau::setDecayMode(int decayMode)
311 {
312  if (!isPFTau()) throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't made from a PFTau.\n";
313  pfEssential_[0].decayMode_ = decayMode;
314 }
315 
317 void Tau::embedLeadPFCand() {
318  if (!isPFTau() ) {//additional check with warning in pat::tau producer
319  return;
320  }
321  leadPFCand_.clear();
322  if (pfSpecific_[0].leadPFCand_.isNonnull() ) {
323  leadPFCand_.push_back(*pfSpecific_[0].leadPFCand_); //already set in C-tor
324  embeddedLeadPFCand_ = true;
325  }
326 }
329  if (!isPFTau() ) {//additional check with warning in pat::tau producer
330  return;
331  }
332  leadPFChargedHadrCand_.clear();
333  if (pfSpecific_[0].leadPFChargedHadrCand_.isNonnull() ) {
334  leadPFChargedHadrCand_.push_back(*pfSpecific_[0].leadPFChargedHadrCand_); //already set in C-tor
336  }
337 }
340  if (!isPFTau() ) {//additional check with warning in pat::tau producer
341  return;
342  }
343  leadPFNeutralCand_.clear();
344  if (pfSpecific_[0].leadPFNeutralCand_.isNonnull() ) {
345  leadPFNeutralCand_.push_back(*pfSpecific_[0].leadPFNeutralCand_); //already set in C-tor
347  }
348 }
349 
351  if (!isPFTau() ) {//additional check with warning in pat::tau producer
352  return;
353  }
354  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFCands_;
355  for (unsigned int i = 0; i < candPtrs.size(); i++) {
356  signalPFCands_.push_back(*candPtrs.at(i));
357  }
358  embeddedSignalPFCands_ = true;
359 }
361  if (!isPFTau() ) {//additional check with warning in pat::tau producer
362  return;
363  }
364  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFChargedHadrCands_;
365  for (unsigned int i = 0; i < candPtrs.size(); i++) {
366  signalPFChargedHadrCands_.push_back(*candPtrs.at(i));
367  }
369 }
371  if (!isPFTau() ) {//additional check with warning in pat::tau producer
372  return;
373  }
374  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFNeutrHadrCands_;
375  for (unsigned int i = 0; i < candPtrs.size(); i++) {
376  signalPFNeutralHadrCands_.push_back(*candPtrs.at(i));
377  }
379 }
381  if (!isPFTau() ) {//additional check with warning in pat::tau producer
382  return;
383  }
384  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedSignalPFGammaCands_;
385  for (unsigned int i = 0; i < candPtrs.size(); i++) {
386  signalPFGammaCands_.push_back(*candPtrs.at(i));
387  }
389 }
390 
392  if (!isPFTau() ) {//additional check with warning in pat::tau producer
393  return;
394  }
395  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFCands_;
396  for (unsigned int i = 0; i < candPtrs.size(); i++) {
397  isolationPFCands_.push_back(*candPtrs.at(i));
398  }
400 }
401 
403  if (!isPFTau() ) {//additional check with warning in pat::tau producer
404  return;
405  }
406  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFChargedHadrCands_;
407  for (unsigned int i = 0; i < candPtrs.size(); i++) {
408  isolationPFChargedHadrCands_.push_back(*candPtrs.at(i));
409  }
411 }
413  if (!isPFTau() ) {//additional check with warning in pat::tau producer
414  return;
415  }
416  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFNeutrHadrCands_;
417  for (unsigned int i = 0; i < candPtrs.size(); i++) {
418  isolationPFNeutralHadrCands_.push_back(*candPtrs.at(i));
419  }
421 }
423  if (!isPFTau() ) {//additional check with warning in pat::tau producer
424  return;
425  }
426  std::vector<reco::PFCandidatePtr> candPtrs = pfSpecific_[0].selectedIsolationPFGammaCands_;
427  for (unsigned int i = 0; i < candPtrs.size(); i++) {
428  isolationPFGammaCands_.push_back(*candPtrs.at(i));
429  }
431 }
432 
434  if(!isPFTau() ) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
435  if ( pfSpecific().signalTauChargedHadronCandidates_.size() > 0 ) {
436  return reco::PFRecoTauChargedHadronRef(&pfSpecific().signalTauChargedHadronCandidates_,0);
437  } else {
439  }
440 }
441 
444  if(pfSpecific_.empty()) return reco::PFCandidatePtr();
445  else return pfSpecific().leadPFChargedHadrCand_;
446  }else
448 }
449 
452  if(pfSpecific_.empty()) return reco::PFCandidatePtr();
453  else return pfSpecific().leadPFNeutralCand_;
454  }else
456 }
457 
458 const reco::PFCandidatePtr Tau::leadPFCand() const {
459  if(!embeddedLeadPFCand_){
460  if(pfSpecific_.empty()) return reco::PFCandidatePtr();
461  return pfSpecific().leadPFCand_;
462  }else
464 }
465 
466 const std::vector<reco::PFCandidatePtr>& Tau::signalPFCands() const {
469  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
470  aPtrs->reserve(signalPFCands_.size());
471  for (unsigned int i = 0; i < signalPFCands_.size(); i++) {
472  aPtrs->push_back(reco::PFCandidatePtr(&signalPFCands_, i) );
473  }
475  }
477  } else {
478  if(pfSpecific_.empty() || pfSpecific().selectedSignalPFCands_.empty() || !pfSpecific().selectedSignalPFCands_.front().isAvailable()){
479  // this part of code is called when reading from patTuple or miniAOD
480  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
481  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
484  } else return pfSpecific().selectedSignalPFCands_;
485  }
486 }
487 
488 const std::vector<reco::PFCandidatePtr>& Tau::signalPFChargedHadrCands() const {
491  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
492  aPtrs->reserve(signalPFChargedHadrCands_.size());
493  for (unsigned int i = 0; i < signalPFChargedHadrCands_.size(); i++) {
494  aPtrs->push_back(reco::PFCandidatePtr(&signalPFChargedHadrCands_, i) );
495  }
497  }
499  } else {
500  if(pfSpecific_.empty() || pfSpecific().selectedSignalPFChargedHadrCands_.empty() || !pfSpecific().selectedSignalPFChargedHadrCands_.front().isAvailable()){
501  // this part of code is called when reading from patTuple or miniAOD
502  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
503  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
507  }
508 }
509 
510 const std::vector<reco::PFCandidatePtr>& Tau::signalPFNeutrHadrCands() const {
513  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
514  aPtrs->reserve(signalPFNeutralHadrCands_.size());
515  for (unsigned int i = 0; i < signalPFNeutralHadrCands_.size(); i++) {
516  aPtrs->push_back(reco::PFCandidatePtr(&signalPFNeutralHadrCands_, i) );
517  }
519  }
521  } else {
522  if(pfSpecific_.empty() || pfSpecific().selectedSignalPFNeutrHadrCands_.empty() || !pfSpecific().selectedSignalPFNeutrHadrCands_.front().isAvailable()){
523  // this part of code is called when reading from patTuple or miniAOD
524  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
525  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
529  }
530 }
531 
532 const std::vector<reco::PFCandidatePtr>& Tau::signalPFGammaCands() const {
535  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
536  aPtrs->reserve(signalPFGammaCands_.size());
537  for (unsigned int i = 0; i < signalPFGammaCands_.size(); i++) {
538  aPtrs->push_back(reco::PFCandidatePtr(&signalPFGammaCands_, i) );
539  }
541  }
543  } else {
544  if(pfSpecific_.empty() || pfSpecific().selectedSignalPFGammaCands_.empty() || !pfSpecific().selectedSignalPFGammaCands_.front().isAvailable()){
545  // this part of code is called when reading from patTuple or miniAOD
546  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
547  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
550  } else return pfSpecific().selectedSignalPFGammaCands_;
551  }
552 }
553 
554 const std::vector<reco::PFRecoTauChargedHadron> & Tau::signalTauChargedHadronCandidates() const {
555  if(pfSpecific_.empty()) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
557 }
558 
559 const std::vector<reco::RecoTauPiZero> & Tau::signalPiZeroCandidates() const {
560  if(pfSpecific_.empty()) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
562 }
563 
564 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFCands() const {
567  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
568  aPtrs->reserve(isolationPFCands_.size());
569  for (unsigned int i = 0; i < isolationPFCands_.size(); i++) {
570  aPtrs->push_back(reco::PFCandidatePtr(&isolationPFCands_, i) );
571  }
573  }
575  } else {
576  if(pfSpecific_.empty() || pfSpecific().selectedIsolationPFCands_.empty() || !pfSpecific().selectedIsolationPFCands_.front().isAvailable()){
577  // this part of code is called when reading from patTuple or miniAOD
578  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
579  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
582  } else return pfSpecific().selectedIsolationPFCands_;
583  }
584 }
585 
586 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFChargedHadrCands() const {
589  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
590  aPtrs->reserve(isolationPFChargedHadrCands_.size());
591  for (unsigned int i = 0; i < isolationPFChargedHadrCands_.size(); i++) {
593  }
595  }
597  } else {
599  // this part of code is called when reading from patTuple or miniAOD
600  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
601  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
605  }
606 }
607 
608 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFNeutrHadrCands() const {
611  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{ new std::vector<reco::PFCandidatePtr>{}};
612  aPtrs->reserve(isolationPFNeutralHadrCands_.size());
613  for (unsigned int i = 0; i < isolationPFNeutralHadrCands_.size(); i++) {
615  }
617  }
619  } else {
621  // this part of code is called when reading from patTuple or miniAOD
622  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
623  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
627  }
628 }
629 
630 const std::vector<reco::PFCandidatePtr>& Tau::isolationPFGammaCands() const {
633  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
634  aPtrs->reserve(isolationPFGammaCands_.size());
635  for (unsigned int i = 0; i < isolationPFGammaCands_.size(); i++) {
636  aPtrs->push_back(reco::PFCandidatePtr(&isolationPFGammaCands_, i) );
637  }
639  }
641  } else {
642  if(pfSpecific_.empty() || pfSpecific().selectedIsolationPFGammaCands_.empty() || !pfSpecific().selectedIsolationPFGammaCands_.front().isAvailable()){
643  // this part of code is called when reading from patTuple or miniAOD
644  // it returns empty collection in correct format so it can be substituted by reco::Candidates if available
645  std::unique_ptr<std::vector<reco::PFCandidatePtr> > aPtrs{new std::vector<reco::PFCandidatePtr>{}};
649  }
650 }
651 
652 const std::vector<reco::PFRecoTauChargedHadron> & Tau::isolationTauChargedHadronCandidates() const {
653  if(pfSpecific_.empty()) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
655 }
656 
657 const std::vector<reco::RecoTauPiZero> & Tau::isolationPiZeroCandidates() const {
658  if(pfSpecific_.empty()) throw cms::Exception("Type Error") << "Requesting content that is not stored in miniAOD.\n";
660 }
661 
664 
665 // initialize the jet to a given JEC level during creation starting from Uncorrected
666 void Tau::initializeJEC(unsigned int level, unsigned int set)
667 {
668  currentJECSet(set);
669  currentJECLevel(level);
670  setP4(jec_[set].correction(level)*p4());
671 }
672 
674 int Tau::jecSet(const std::string& set) const
675 {
676  for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor = jec_.begin();
677  corrFactor != jec_.end(); ++corrFactor ) {
678  if ( corrFactor->jecSet() == set ) return corrFactor-jec_.begin();
679  }
680  return -1;
681 }
682 
684 const std::vector<std::string> Tau::availableJECSets() const
685 {
686  std::vector<std::string> sets;
687  for ( std::vector<pat::TauJetCorrFactors>::const_iterator corrFactor = jec_.begin();
688  corrFactor != jec_.end(); ++corrFactor ) {
689  sets.push_back(corrFactor->jecSet());
690  }
691  return sets;
692 }
693 
694 const std::vector<std::string> Tau::availableJECLevels(const int& set) const
695 {
696  return set>=0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
697 }
698 
701 float Tau::jecFactor(const std::string& level, const std::string& set) const
702 {
703  for ( unsigned int idx = 0; idx < jec_.size(); ++idx ) {
704  if ( set.empty() || jec_.at(idx).jecSet() == set ){
705  if ( jec_[idx].jecLevel(level) >= 0 )
706  return jecFactor(jec_[idx].jecLevel(level), idx);
707  else
708  throw cms::Exception("InvalidRequest")
709  << "This JEC level " << level << " does not exist. \n";
710  }
711  }
712  throw cms::Exception("InvalidRequest")
713  << "This jet does not carry any jet energy correction factor information \n"
714  << "for a jet energy correction set with label " << set << "\n";
715 }
716 
719 float Tau::jecFactor(const unsigned int& level, const unsigned int& set) const
720 {
721  if ( !jecSetsAvailable() )
722  throw cms::Exception("InvalidRequest")
723  << "This jet does not carry any jet energy correction factor information \n";
724  if ( !jecSetAvailable(set) )
725  throw cms::Exception("InvalidRequest")
726  << "This jet does not carry any jet energy correction factor information \n"
727  << "for a jet energy correction set with index " << set << "\n";
728  return jec_.at(set).correction(level)/jec_.at(currentJECSet_).correction(currentJECLevel_);
729 }
730 
733 Tau Tau::correctedTauJet(const std::string& level, const std::string& set) const
734 {
735  // rescale p4 of the jet; the update of current values is
736  // done within the called jecFactor function
737  for ( unsigned int idx = 0; idx < jec_.size(); ++idx ) {
738  if ( set.empty() || jec_.at(idx).jecSet() == set ) {
739  if ( jec_[idx].jecLevel(level) >= 0 )
740  return correctedTauJet(jec_[idx].jecLevel(level), idx);
741  else
742  throw cms::Exception("InvalidRequest")
743  << "This JEC level " << level << " does not exist. \n";
744  }
745  }
746  throw cms::Exception("InvalidRequest")
747  << "This JEC set " << set << " does not exist. \n";
748 }
749 
752 Tau Tau::correctedTauJet(const unsigned int& level, const unsigned int& set) const
753 {
754  Tau correctedTauJet(*this);
755  //rescale p4 of the jet
756  correctedTauJet.setP4(jecFactor(level, set)*p4());
757  // update current level and set
760  return correctedTauJet;
761 }
762 
763 
764 
767 // return the leading candidate from signal(PF)ChargedHadrCandPtrs_ collection
770  if (leadPF.isAvailable() || signalChargedHadrCandPtrs_.isNull()) return leadPF;
773  if (ret.isNull() || (p->pt() > ret->pt())) ret = p;
774  }
775  return ret;
776 
777 }
778 
781  const reco::PFCandidatePtr leadPF = leadPFNeutralCand();
782  if (leadPF.isAvailable() || signalNeutralHadrCandPtrs_.isNull()) return leadPF;
785  if (ret.isNull() || (p->pt() > ret->pt())) ret = p;
786  }
787  return ret;
788 
789 }
790 
792 const reco::CandidatePtr Tau::leadCand() const {
793  const reco::PFCandidatePtr leadPF = leadPFCand();
794  if (leadPF.isAvailable() || !Tau::ExistSignalCands()) return leadPF;
795  else return Tau::signalCands()[0];
796 }
797 
799 
800 bool Tau::ExistSignalCands() const {
801  return !(signalChargedHadrCandPtrs_.isNull() && signalNeutralHadrCandPtrs_.isNull() && signalGammaCandPtrs_.isNull());
802 }
803 
804 bool Tau::ExistIsolationCands() const {
806 }
807 
810 
812  std::vector<reco::PFCandidatePtr> r0 = signalPFCands();
814  if(!Tau::ExistSignalCands() || (!r0.empty() && r0.front().isAvailable())) {
815  for (const auto & p : r0) ret.push_back(p);
816  return ret;
817  } else {
820  std::vector<std::pair<float,size_t> > pt_index;
821  size_t index=0;
822  for (const auto & p : signalChargedHadrCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
823  for (const auto & p : signalNeutralHadrCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
824  for (const auto & p : signalGammaCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
825  std::sort(pt_index.begin(),pt_index.end(),
826  boost::bind(&std::pair<float,size_t>::first,_1) >
827  boost::bind(&std::pair<float,size_t>::first,_2));
828  for( const auto & p : pt_index){
829  ret.push_back(ret2[p.second]);
830  }
831  return ret;
832  }
833 }
834 
838  std::vector<reco::PFCandidatePtr> r0 = signalPFChargedHadrCands();
839  if(signalChargedHadrCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
841  for (const auto & p : r0) ret.push_back(p);
842  return ret;
843  } else {
845  }
846 }
847 
848 
852  std::vector<reco::PFCandidatePtr> r0 = signalPFNeutrHadrCands();
853  if(signalNeutralHadrCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
855  for (const auto & p : r0) ret.push_back(p);
856  return ret;
857  } else {
859  }
860 }
861 
865  std::vector<reco::PFCandidatePtr> r0 = signalPFGammaCands();
866  if(signalGammaCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
868  for (const auto & p : r0) ret.push_back(p);
869  return ret;
870  } else {
871  return signalGammaCandPtrs_;
872  }
873 }
874 
878  std::vector<reco::PFCandidatePtr> r0 = isolationPFCands();
880  if(!Tau::ExistIsolationCands() || (!r0.empty() && r0.front().isAvailable())) {
881  for (const auto & p : r0) ret.push_back(p);
882  return ret;
883  } else {
886  std::vector<std::pair<float,size_t> > pt_index;
887  size_t index=0;
888  for (const auto & p : isolationChargedHadrCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
889  for (const auto & p : isolationNeutralHadrCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
890  for (const auto & p : isolationGammaCandPtrs_){ ret2.push_back(p); pt_index.push_back(std::make_pair(p->pt(),index)); index++;}
891  std::sort(pt_index.begin(),pt_index.end(),
892  boost::bind(&std::pair<float,size_t>::first,_1) >
893  boost::bind(&std::pair<float,size_t>::first,_2));
894  for( const auto & p : pt_index){
895  ret.push_back(ret2[p.second]);
896  }
897  return ret;
898  }
899 }
900 
904  std::vector<reco::PFCandidatePtr> r0 = isolationPFChargedHadrCands();
905  if(isolationChargedHadrCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
907  for (const auto & p : r0) ret.push_back(p);
908  return ret;
909  } else {
911  }
912 }
913 
918  std::vector<reco::PFCandidatePtr> r0 = isolationPFNeutrHadrCands();
919  if(isolationNeutralHadrCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
921  for (const auto & p : r0) ret.push_back(p);
922  return ret;
923  } else {
925  }
926 }
927 
931  std::vector<reco::PFCandidatePtr> r0 = isolationPFGammaCands();
932  if(isolationGammaCandPtrs_.isNull() || (!r0.empty() && r0.front().isAvailable())) {
934  for (const auto & p : r0) ret.push_back(p);
935  return ret;
936  } else {
938  }
939 }
940 
941 
942 
945 size_t Tau::numberOfSourceCandidatePtrs() const {
946  if (Tau::ExistSignalCands()) return Tau::signalCands().size();
947  else if(pfSpecific_.empty()) return 0;
948  else return pfSpecific().selectedSignalPFCands_.size();
949 }
952  if (Tau::ExistSignalCands()) return Tau::signalCands()[i];
953  else if(pfSpecific_.empty()) return reco::CandidatePtr();
954  else return pfSpecific().selectedSignalPFCands_[i];
955 }
956 
957 
958 
959 
bool embeddedLeadPFNeutralCand_
Definition: Tau.h:442
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:435
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:501
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:448
std::vector< reco::PFCandidatePtr > selectedIsolationPFChargedHadrCands_
Definition: TauPFSpecific.h:39
virtual double energy() const final
energy
std::vector< reco::PFCandidate > leadPFNeutralCand_
Definition: Tau.h:441
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:461
virtual const reco::TrackRefVector & isolationTracks() const
Definition: BaseTau.cc:30
std::vector< reco::PFCandidate > signalPFNeutralHadrCands_
Definition: Tau.h:450
std::vector< reco::PFCandidate > signalPFCands_
Definition: Tau.h:444
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:452
bool embeddedIsolationPFChargedHadrCands_
Definition: Tau.h:460
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:160
bool jecSetAvailable(const std::string &set) const
Definition: Tau.h:373
bool embeddedIsolationPFCands_
Definition: Tau.h:457
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:465
std::vector< reco::PFCandidate > isolationPFNeutralHadrCands_
Definition: Tau.h:462
virtual double phi() const final
momentum azimuthal angle
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > isolationPFGammaCandsTransientPtrs_
Definition: Tau.h:467
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:470
void setDecayMode(int)
set decay mode
reco::CandidatePtr sourceCandidatePtr(size_type i) const
get the source candidate pointer with index i
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFCandsTransientPtrs_
Definition: Tau.h:446
float tauID(const std::string &name) const
bool embeddedIsolationPFNeutralHadrCands_
Definition: Tau.h:463
reco::CandidatePtrVector signalCands() const
bool embeddedLeadTrack_
Definition: Tau.h:431
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFGammaCandsTransientPtrs_
Definition: Tau.h:455
int jecSet(const std::string &label) const
float phiphiMoment() const
uint16_t size_type
std::vector< reco::PFCandidate > leadPFCand_
Definition: Tau.h:437
reco::CandidatePtrVector signalGammaCands() const
const pat::tau::TauPFEssential::CovMatrix & primaryVertexCov() const
Definition: Tau.h:320
bool isSet() const
std::vector< reco::PFCandidatePtr > selectedIsolationPFNeutrHadrCands_
Definition: TauPFSpecific.h:40
const std::vector< reco::PFRecoTauChargedHadron > & isolationTauChargedHadronCandidates() const
bool embeddedSignalPFGammaCands_
Definition: Tau.h:454
std::vector< reco::PFRecoTauChargedHadron > isolationTauChargedHadronCandidates_
Definition: TauPFSpecific.h:42
reco::CandidatePtrVector isolationNeutrHadrCands() const
unsigned int currentJECLevel_
Definition: Tau.h:492
edm::AtomicPtrCache< reco::TrackRefVector > isolationTracksTransientRefVector_
Definition: Tau.h:430
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:499
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:434
std::vector< IdPair > tauIDs_
Definition: Tau.h:473
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > signalPFChargedHadrCandsTransientPtrs_
Definition: Tau.h:449
std::vector< reco::RecoTauPiZero > signalPiZeroCandidates_
Definition: TauPFSpecific.h:37
bool embeddedIsolationPFGammaCands_
Definition: Tau.h:466
float etaetaMoment() const
std::vector< reco::PFCandidate > signalPFChargedHadrCands_
Definition: Tau.h:447
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:500
Jets made from MC generator particles.
Definition: GenJet.h:24
bool embeddedSignalTracks_
Definition: Tau.h:433
bool embeddedLeadPFCand_
Definition: Tau.h:438
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:505
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:382
const reco::PFCandidatePtr leadPFCand() const
Analysis-level tau class.
Definition: Tau.h:56
const pat::tau::TauPFEssential::CovMatrix & secondaryVertexCov() const
Definition: Tau.h:327
bool embeddedLeadPFChargedHadrCand_
Definition: Tau.h:440
void embedIsolationPFChargedHadrCands()
method to store the isolation charged hadrons candidates internally
bool embeddedSignalPFNeutralHadrCands_
Definition: Tau.h:451
std::vector< reco::PFCandidate > isolationPFCands_
Definition: Tau.h:456
std::vector< reco::Track > isolationTracks_
Definition: Tau.h:429
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:481
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:125
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:497
int decayMode() const
reconstructed tau decay mode (specific to PFTau)
Definition: Tau.h:337
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:487
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:464
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
std::vector< reco::PFCandidate > signalPFGammaCands_
Definition: Tau.h:453
std::vector< reco::Track > leadTrack_
Definition: Tau.h:432
edm::Ref< PFRecoTauChargedHadronCollection > PFRecoTauChargedHadronRef
presistent reference to a PFRecoTauChargedHadron
std::vector< reco::PFCandidate > isolationPFChargedHadrCands_
Definition: Tau.h:459
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
virtual double p() const final
magnitude of momentum vector
bool jecSetsAvailable() const
Definition: Tau.h:370
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:496
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:445
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:158
const std::vector< std::string > availableJECLevels(const int &set=0) const
bool embeddedIsolationTracks_
Definition: Tau.h:428
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:458
bool ExistIsolationCands() const
std::vector< reco::PFCandidate > leadPFChargedHadrCand_
Definition: Tau.h:439
std::string currentJECSet() const
returns the label of the current set of jet energy corrections
Definition: Tau.h:378
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:477
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
reco::Candidate::LorentzVector p4Jet_
reco::CandidatePtrVector signalChargedHadrCandPtrs_
Definition: Tau.h:495
unsigned int currentJECSet_
Definition: Tau.h:490
virtual double pt() const final
transverse momentum
void embedLeadPFCand()
math::ErrorF< 3 >::type CovMatrix
const reco::PFCandidatePtr leadPFNeutralCand() const