- Timestamp:
- Jul 13, 2009, 9:40:57 AM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PdgParticle.cc
r443 r469 43 43 //PdgParticle::PdgParticle() : _pid(1), _mass(-1), _charge(-999), _gamma_tot(-1), _ctau(-1), _name("") {} 44 44 45 PdgParticle::PdgParticle(const int pid, const std::string& name, const float m, const float q, const float gamma, const float ctau) : 46 _pid(pid), _mass(m), _charge(q), _gamma_tot(gamma), _ctau(ctau), _name(name) {} 45 PdgParticle::PdgParticle(const long int pid, const std::string& name, const float m, const float q, const float gamma, const float ctau) : 46 _pid(pid), _mass(m), _charge(q), _gamma_tot(gamma), _ctau(ctau), _name(name) { 47 if( (abs(pid) == 12) || (abs(pid) == 14) || (abs(pid) == 16) || 48 (abs(pid) == 1000022 ) || (abs(pid) == 1000023 ) || (abs(pid) == 1000025) || 49 (abs(pid) == 1000035 ) || (abs(pid) == 1000045 ) ) { /*std::cout << "invisible : " << pid << std::endl;*/ _isInvisible = true; } 50 else _isInvisible = false; 51 } 47 52 48 53 49 54 PdgParticle::PdgParticle(const PdgParticle& p) : 50 _pid(p._pid), _mass(p._mass), _charge(p._charge), _gamma_tot(p._gamma_tot), _ctau(p._ctau), _name(p._name) {}55 _pid(p._pid), _mass(p._mass), _charge(p._charge), _gamma_tot(p._gamma_tot), _ctau(p._ctau), _name(p._name), _isInvisible(p._isInvisible) {} 51 56 52 57 PdgParticle& PdgParticle::operator=(const PdgParticle& p) { … … 54 59 _pid = p._pid; _name= p._name; _mass=p._mass; 55 60 _charge=p._charge; _gamma_tot=p._gamma_tot; _ctau = p._ctau; 61 _isInvisible = p._isInvisible; 56 62 return *this; 57 63 } … … 71 77 } 72 78 73 void PdgTable::insert(const int pid, const PdgParticle &p) {79 void PdgTable::insert(const long int pid, const PdgParticle &p) { 74 80 _table.insert(std::map<int,PdgParticle>::value_type(pid,p)); 75 81 } … … 77 83 void PdgTable::print() const { 78 84 std::map<int, PdgParticle>::const_iterator i; 79 for(i = _table.begin(); i != _table.end(); i++) 85 for(i = _table.begin(); i != _table.end(); i++) { 80 86 std::cout << "name = " << std::setw(20) << std::left << i->second.name() 81 87 << "pid = " << std::setw(10) << i->first 82 88 << "\t M=" << std::setw(10) << i->second.mass() << "GeV/c^2" 83 89 << "\t Q=" << std::setw(6) << i->second.charge() << "e+" 84 << "\t ctau=" << i->second.ctau() << " m" << std::endl; 90 << "\t ctau=" << i->second.ctau() << " m"; 91 if(i->second.invisible()) std::cout << "\t invisible"; 92 std::cout << std::endl; 93 } 85 94 } 86 95 -
trunk/src/SmearUtil.cc
r465 r469 1467 1467 curstring.clear(); // needed when using several times istringstream::str(string) 1468 1468 curstring.str(temp_string); 1469 int ID;string name; int charge; float mass; float width; float lifetime;1469 long int ID; std::string name; int charge; float mass; float width; float lifetime; 1470 1470 // ID name chg mass total width lifetime 1471 1471 // 1 d -1 0.33000 0.00000 0.00000E+00
Note:
See TracChangeset
for help on using the changeset viewer.