Belle II Software development
EvtGenParticlePDG.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <framework/particledb/EvtGenParticlePDG.h>
10#include <sstream>
11#include <iomanip>
12
13namespace Belle2 {
18 std::string EvtGenParticlePDG::__repr__() const
19 {
20 std::stringstream buf;
21 buf << "<Particle " << std::quoted(GetName());
22 buf << " mass=" << Mass() << " width=" << Width();
23 buf << std::setprecision(2) << " charge=" << (Charge() / 3.);
24 buf << " pdg=" << PdgCode() << ">";
25 return buf.str();
26 }
28}
std::string __repr__() const
Return a string repesentation of this particle to be used when printing the particle in python.
Abstract base class for different kinds of events.