17 #include <TDatabasePDG.h>
18 #include <TParticlePDG.h>
25 std::string particleName(
int pdg) {
26 std::stringstream stream;
27 TParticlePDG*
p = TDatabasePDG::Instance()->GetParticle(pdg);
29 stream << p->GetName();
41 : mPdg(pdg.begin(), pdg.end()) {
61 std::stringstream stream;
62 stream <<
"Copies PDG ID for ";
64 stream <<
"all particles";
69 std::set<Int_t>::const_iterator iter =
mPdg.begin();
70 stream << particleName(*iter);
71 for (++iter; iter !=
mPdg.end(); ++iter) {
72 stream <<
", " << particleName(*iter);
75 std::cout << stream.str() << std::endl;