CMS 3D CMS Logo

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

◆ printParticle()

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 alignBH_cfg::fixed, CrabHelper::log, and mergeVDriftHistosByStation::name.

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  }