Changeset 402 in svn for trunk/src/PdgParticle.cc
- Timestamp:
- May 20, 2009, 10:36:42 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PdgParticle.cc
r386 r402 37 37 #include <string> 38 38 #include <map> 39 #include <iomanip> 39 40 40 //PdgParticle::PdgParticle() : _pid(1), _mass(-1), _charge(-999), _gamma_tot(-1), _ tau(-1), _name("") {}41 //PdgParticle::PdgParticle() : _pid(1), _mass(-1), _charge(-999), _gamma_tot(-1), _ctau(-1), _name("") {} 41 42 42 PdgParticle::PdgParticle(const int pid, const std::string& name, const float m, const float q, const float gamma, const float tau) :43 _pid(pid), _mass(m), _charge(q), _gamma_tot(gamma), _ tau(tau), _name(name) {}43 PdgParticle::PdgParticle(const int pid, const std::string& name, const float m, const float q, const float gamma, const float ctau) : 44 _pid(pid), _mass(m), _charge(q), _gamma_tot(gamma), _ctau(ctau), _name(name) {} 44 45 45 46 46 47 PdgParticle::PdgParticle(const PdgParticle& p) : 47 _pid(p._pid), _mass(p._mass), _charge(p._charge), _gamma_tot(p._gamma_tot), _ tau(p._tau), _name(p._name) {}48 _pid(p._pid), _mass(p._mass), _charge(p._charge), _gamma_tot(p._gamma_tot), _ctau(p._ctau), _name(p._name) {} 48 49 49 50 PdgParticle& PdgParticle::operator=(const PdgParticle& p) { 50 51 if(this == &p) return *this; 51 52 _pid = p._pid; _name= p._name; _mass=p._mass; 52 _charge=p._charge; _gamma_tot=p._gamma_tot; _ tau = p._tau;53 _charge=p._charge; _gamma_tot=p._gamma_tot; _ctau = p._ctau; 53 54 return *this; 54 55 } … … 75 76 std::map<int, PdgParticle>::const_iterator i; 76 77 for(i = _table.begin(); i != _table.end(); i++) 77 std::cout << "name = " << i->second.name() << "\t\tpid = " 78 << i->first << "\t M=" << i->second.mass() << "\t Q=" 79 << i->second.charge() << std::endl; 78 std::cout << "name = " << std::setw(20) << std::left << i->second.name() 79 << "pid = " << std::setw(10) << i->first 80 << "\t M=" << std::setw(10) << i->second.mass() << "GeV/c^2" 81 << "\t Q=" << std::setw(6) << i->second.charge() << "e+" 82 << "\t ctau=" << i->second.ctau() << " m" << std::endl; 80 83 } 81 84
Note:
See TracChangeset
for help on using the changeset viewer.