Fork me on GitHub

Changeset 402 in svn for trunk


Ignore:
Timestamp:
May 20, 2009, 10:36:42 AM (15 years ago)
Author:
Xavier Rouby
Message:

move tau to ctau [m]

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/interface/PdgParticle.h

    r386 r402  
    77class PdgParticle {
    88  public:
    9         PdgParticle(): _pid(-999), _mass(0), _charge(0), _gamma_tot(0), _tau(0), _name("Unknown") {};
    10         PdgParticle(const int pid, const std::string& name, const float m, const float q, const float gamma, const float tau);
     9        PdgParticle(): _pid(-999), _mass(0), _charge(0), _gamma_tot(0), _ctau(0), _name("Unknown") {};
     10        PdgParticle(const int pid, const std::string& name, const float m, const float q, const float gamma, const float ctau);
    1111        PdgParticle(const PdgParticle& p);
    1212        PdgParticle& operator=(const PdgParticle& p);
     
    1616        float charge() const {return _charge;};
    1717        float gamma_tot() const {return _gamma_tot;};
    18         float tau() const {return _tau;};
     18        double ctau() const {return _ctau;};
    1919        std::string name() const {return _name;};
    2020
     
    2323        float _mass;       // GeV
    2424        float _charge;     // in e+
    25         float _gamma_tot; 
    26         float _tau;
     25        float _gamma_tot;  // GeV
     26        double _ctau;       // in m
    2727        std::string _name;
    2828};
  • trunk/src/PdgParticle.cc

    r386 r402  
    3737#include <string>
    3838#include <map>
     39#include <iomanip>
    3940
    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("") {}
    4142
    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) {}
     43PdgParticle::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) {}
    4445
    4546
    4647PdgParticle::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) {}
    4849
    4950PdgParticle& PdgParticle::operator=(const PdgParticle& p) {
    5051   if(this == &p) return *this;
    5152    _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;
    5354   return *this;
    5455}
     
    7576   std::map<int, PdgParticle>::const_iterator i;
    7677   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;
    8083}
    8184
Note: See TracChangeset for help on using the changeset viewer.