CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
ttevent Namespace Reference

Functions

void printParticle (edm::LogInfo &log, const char *name, const reco::Candidate *cand)
 print pt, eta, phi, mass of a given candidate into an existing LogInfo More...
 

Detailed Description

ttevent::printParticle printParticle.h "AnalysisDataFormats/TopObjects/interface/printParticle.h"

Description: [one line class summary]

Usage: <usage>

Function Documentation

void ttevent::printParticle ( edm::LogInfo log,
const char *  name,
const reco::Candidate cand 
)

print pt, eta, phi, mass of a given candidate into an existing LogInfo

Definition at line 20 of file printParticle.cc.

References reco::Candidate::eta(), reco::Candidate::mass(), reco::Candidate::phi(), and reco::Candidate::pt().

Referenced by TtSemiLeptonicEvent::print(), TtFullLeptonicEvent::print(), and TtFullHadronicEvent::print().

20  {
21  if (!cand) {
22  log << std::setw(15) << name << ": not available!\n";
23  return;
24  }
25  log << std::setprecision(3) << setiosflags(std::ios::fixed | std::ios::showpoint);
26  log << std::setw(15) << name << ": " << std::setw(7) << cand->pt() << "; " << std::setw(7) << cand->eta() << "; "
27  << std::setw(7) << cand->phi() << "; " << resetiosflags(std::ios::fixed | std::ios::showpoint)
28  << setiosflags(std::ios::scientific) << std::setw(10) << cand->mass() << "\n";
29  log << resetiosflags(std::ios::scientific);
30  }
virtual double pt() const =0
transverse momentum
virtual double mass() const =0
mass
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity