CMS 3D CMS Logo

Functions
HPSPFTau.cc File Reference
#include "DataFormats/L1TParticleFlow/interface/HPSPFTau.h"
#include "FWCore/Utilities/interface/Exception.h"

Go to the source code of this file.

Functions

ostream & operator<< (ostream &os, const l1t::HPSPFTau &l1PFTau)
 

Function Documentation

◆ operator<<()

ostream& operator<< ( ostream &  os,
const l1t::HPSPFTau l1PFTau 
)

Definition at line 25 of file HPSPFTau.cc.

25  {
26  os << "pT = " << l1PFTau.pt() << ", eta = " << l1PFTau.eta() << ", phi = " << l1PFTau.phi()
27  << " (type = " << l1PFTau.tauType() << ")" << std::endl;
28  os << "lead. ChargedPFCand:" << std::endl;
29  if (l1PFTau.leadChargedPFCand().isNonnull()) {
30  printPFCand(os, *l1PFTau.leadChargedPFCand(), l1PFTau.primaryVertex());
31  } else {
32  os << " N/A" << std::endl;
33  }
34  os << "seed:";
35  if (l1PFTau.isChargedPFCandSeeded()) {
36  os << " chargedPFCand";
37  } else if (l1PFTau.isPFJetSeeded()) {
38  os << " PFJet";
39  } else {
40  cms::Exception ex("InconsistentTau");
41  ex.addContext("Calling HPSPFTau::operator <<");
42  ex.addAdditionalInfo("This tau is not seed by either a chargedPFCand or a PFJet!");
43  throw ex;
44  }
45  os << std::endl;
46  os << "signalPFCands:" << std::endl;
47  for (const auto& l1PFCand : l1PFTau.signalAllL1PFCandidates()) {
48  printPFCand(os, *l1PFCand, l1PFTau.primaryVertex());
49  }
50  os << "stripPFCands:" << std::endl;
51  for (const auto& l1PFCand : l1PFTau.stripAllL1PFCandidates()) {
52  printPFCand(os, *l1PFCand, l1PFTau.primaryVertex());
53  }
54  os << "strip pT = " << l1PFTau.strip_p4().pt() << std::endl;
55  os << "isolationPFCands:" << std::endl;
56  for (const auto& l1PFCand : l1PFTau.isoAllL1PFCandidates()) {
57  printPFCand(os, *l1PFCand, l1PFTau.primaryVertex());
58  }
59  os << "isolation pT-sum: charged = " << l1PFTau.sumChargedIso() << ", neutral = " << l1PFTau.sumNeutralIso()
60  << " (charged from pileup = " << l1PFTau.sumChargedIsoPileup() << ")" << std::endl;
61  return os;
62 }

References cms::Exception::addAdditionalInfo(), cms::Exception::addContext(), reco::LeafCandidate::eta(), l1t::HPSPFTau::isChargedPFCandSeeded(), edm::Ref< C, T, F >::isNonnull(), l1t::HPSPFTau::isoAllL1PFCandidates(), l1t::HPSPFTau::isPFJetSeeded(), l1t::HPSPFTau::leadChargedPFCand(), reco::LeafCandidate::phi(), l1t::HPSPFTau::primaryVertex(), l1t::printPFCand(), reco::LeafCandidate::pt(), l1t::HPSPFTau::signalAllL1PFCandidates(), l1t::HPSPFTau::strip_p4(), l1t::HPSPFTau::stripAllL1PFCandidates(), l1t::HPSPFTau::sumChargedIso(), l1t::HPSPFTau::sumChargedIsoPileup(), l1t::HPSPFTau::sumNeutralIso(), and l1t::HPSPFTau::tauType().

l1t::HPSPFTau::strip_p4
const reco::Particle::LorentzVector & strip_p4() const
Definition: HPSPFTau.h:60
l1t::HPSPFTau::sumNeutralIso
float sumNeutralIso() const
Definition: HPSPFTau.h:67
l1t::HPSPFTau::stripAllL1PFCandidates
const l1t::PFCandidateRefVector & stripAllL1PFCandidates() const
Definition: HPSPFTau.h:37
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
l1t::HPSPFTau::isPFJetSeeded
bool isPFJetSeeded() const
Definition: HPSPFTau.h:24
l1t::printPFCand
void printPFCand(ostream &os, const l1t::PFCandidate &l1PFCand, const l1t::TkPrimaryVertexRef &primaryVertex)
Definition: HPSPFTau.cc:64
l1t::HPSPFTau::sumChargedIso
float sumChargedIso() const
Definition: HPSPFTau.h:66
l1t::HPSPFTau::isoAllL1PFCandidates
const l1t::PFCandidateRefVector & isoAllL1PFCandidates() const
Definition: HPSPFTau.h:41
l1t::HPSPFTau::tauType
Kind tauType() const
Definition: HPSPFTau.h:58
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
l1t::HPSPFTau::signalAllL1PFCandidates
const l1t::PFCandidateRefVector & signalAllL1PFCandidates() const
Definition: HPSPFTau.h:30
l1t::HPSPFTau::sumChargedIsoPileup
float sumChargedIsoPileup() const
Definition: HPSPFTau.h:69
l1t::HPSPFTau::primaryVertex
const l1t::TkPrimaryVertexRef & primaryVertex() const
Definition: HPSPFTau.h:55
l1t::HPSPFTau::isChargedPFCandSeeded
bool isChargedPFCandSeeded() const
accessor functions for reco level quantities
Definition: HPSPFTau.h:23
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
l1t::HPSPFTau::leadChargedPFCand
const l1t::PFCandidateRef & leadChargedPFCand() const
Definition: HPSPFTau.h:28
cms::Exception
Definition: Exception.h:70