Garfield++ 5.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
particle_def.h
Go to the documentation of this file.
1#ifndef PARTICLE_DEF_H
2#define PARTICLE_DEF_H
3
4#include <string>
5#include <list>
6
7namespace Heed {
8
9/// Definition of particles. Only the basic information: the name, the notation,
10/// the mass, the charge, and other auxiliary data.
11///
12/// 1999 - 2004, I. Smirnov
13
15 public:
16 std::string name = "none";
17 /// Short name to make data summary files short.
18 std::string notation = "none";
19 double mass = 0.;
20 double charge = 0.;
21 float spin = 0.;
22 /// Default constructor.
23 particle_def() = default;
24 /// Constructor.
25 particle_def(const std::string& fname, const std::string& fnotation,
26 double fmass, double fcharge, float fspin);
27 /// Constructor to create an anti-particle.
28 particle_def(const std::string& fname, const std::string& fnotation,
29 particle_def& p);
30 /// Copy constructor.
32 : name(f.name), notation(f.notation), mass(f.mass), charge(f.charge),
33 spin(f.spin) {
34 }
35 /// Assignment operator.
37
38 /// Destructor.
39 ~particle_def() = default;
40
41 /// Function for making an anti-particle.
43 void print(std::ostream& file, int l) const;
44
45 void set_mass(const double m);
46 void set_charge(const double z);
47};
48std::ostream& operator<<(std::ostream& file, const particle_def& f);
49
56
57// light unflavored mesons
62
65
66}
67
68#endif
~particle_def()=default
Destructor.
void print(std::ostream &file, int l) const
particle_def(const particle_def &f)
Copy constructor.
void set_mass(const double m)
particle_def()=default
Default constructor.
particle_def anti_particle(const particle_def &p)
Function for making an anti-particle.
particle_def & operator=(const particle_def &)=default
Assignment operator.
void set_charge(const double z)
std::string notation
Short name to make data summary files short.
Definition BGMesh.cpp:6
particle_def K_plus_meson_def("K_plus", "K+", 493.677 *MeV/c_squared, 1, 0.0)
particle_def alpha_particle_def("alpha_particle", "alpha", 3727.417 *MeV/c_squared, 2 *eplus, 0.)
particle_def anti_proton_def("", "p-", proton_def)
std::ostream & operator<<(std::ostream &file, const BGMesh &bgm)
Definition BGMesh.cpp:37
particle_def deuteron_def("deuteron", "d", 1875.613 *MeV/c_squared, eplus, 0.0)
particle_def electron_def("electron", "e-", electron_mass_c2/c_squared, electron_charge, 0.5)
particle_def muon_minus_def("muon_minus", "mu-", 105.658367 *MeV/c_squared, electron_charge, 0.5)
particle_def pi_plus_meson_def("pi_plus", "pi+", 139.56755 *MeV/c_squared, eplus, 0.0)
particle_def muon_plus_def("muon_plus", "mu+", muon_minus_def)
particle_def positron_def("positron", "e+", electron_def)
particle_def K_minus_meson_def("K_minus", "K-", K_plus_meson_def)
particle_def pi_minus_meson_def("pi_minus", "pi-", 139.56755 *MeV/c_squared, -eplus, 0.0)
particle_def proton_def("proton", "p+", proton_mass_c2/c_squared, eplus, 0.5)