Belle II Software  release-05-01-25
EvtGenParticlePDG.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <framework/particledb/EvtGenParticlePDG.h>
12 #include <sstream>
13 #include <iomanip>
14 
15 namespace Belle2 {
20  std::string EvtGenParticlePDG::__repr__() const
21  {
22  std::stringstream buf;
23  buf << "<Particle " << std::quoted(GetName());
24  buf << " mass=" << Mass() << " width=" << Width();
25  buf << std::setprecision(2) << " charge=" << (Charge() / 3.);
26  buf << " pdg=" << PdgCode() << ">";
27  return buf.str();
28  }
30 }
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::EvtGenParticlePDG::__repr__
std::string __repr__() const
Return a string repesentation of this particle to be used when printing the particle in python.
Definition: EvtGenParticlePDG.cc:28