ATLAS Offline Software
Loading...
Searching...
No Matches
particleType Class Reference

#include <particleType.h>

Inheritance diagram for particleType:
Collaboration diagram for particleType:

Public Member Functions

 particleType ()
 ~particleType ()
std::string type (int id) const
double charge (int id) const

Private Attributes

keys
 STL member.
elements
 STL member.

Detailed Description

Definition at line 29 of file particleType.h.

Constructor & Destructor Documentation

◆ particleType()

particleType::particleType ( )
inline

strange baryons - will decay weakly

Sigma

Xi, Omega etc

Definition at line 38 of file particleType.h.

38 {
39
40 std::map<int, std::string>& ptype = *this;
41
42 ptype[22] = "gamma";
43
44 ptype[111] = "pi0";
45 ptype[211] = "pi+";
46 ptype[-211] = "pi-";
47 ptype[310] = "K0";
48 ptype[-310] = "K0 bar";
49 ptype[321] = "K+";
50 ptype[-321] = "K-";
51 ptype[130] = "K0L";
52 // ptype[-130] = "K0L bar ???";
53 ptype[310] = "K0S";
54 // ptype[-310] = "K0S bar ???";
55 // ptype[311] = "K0";
56 // ptype[-311] = "K0 bar";
57 ptype[113] = "rho0";
58 ptype[213] = "rho+";
59 ptype[-213] = "rho-";
60
61 ptype[-20213] = "a1(1260)-";
62 ptype[20213] = "a1(1260)+";
63
64
65 ptype[11] = "e-";
66 ptype[-11] = "e+";
67 ptype[12] = "nue";
68 ptype[-12] = "nue bar";
69 ptype[13] = "mu-";
70 ptype[-13] = "mu+";
71 ptype[14] = "numu";
72 ptype[-14] = "numu bar";
73 ptype[15] = "tau-";
74 ptype[-15] = "tau+";
75 ptype[16] = "nutau";
76 ptype[-16] = "nutau bar";
77 ptype[17] = "tau'";
78 ptype[-17] = "tau'-";
79 ptype[18] = "nutau' bar";
80
81
82 ptype[2212] = "p+";
83 ptype[-2212] = "p-";
84 ptype[2112] = "n";
85 ptype[-2112] = "nbar";
86
87 ptype[221] = "eta";
88 ptype[-221] = "eta bar";
89
90
91 ptype[3122] = "lambda";
92 ptype[-3122] = "lambda bar";
93
94 ptype[3112] = "Sigma-";
95 ptype[-3112] = "Sigmabar+";
96 ptype[3222] = "Sigma+";
97 ptype[-3222] = "Sigmabar-";
98 ptype[3312] = "Xi-";
99 ptype[-3312] = "Xbar+";
100 ptype[3322] = "Xi0";
101 ptype[-3322] = "Xi0bar";
102 ptype[3334] = "Omega-";
103 ptype[-3334] = "Omegabar+";
104
105 // ptype[25] = "h0";
106
107 ptype[-1] = "offline";
108 }

◆ ~particleType()

particleType::~particleType ( )
inline

Definition at line 110 of file particleType.h.

110{ }

Member Function Documentation

◆ charge()

double particleType::charge ( int id) const
inline

Definition at line 121 of file particleType.h.

121 {
122 if ( id>1000000000 ) return 0; // "nucleus" - don't care about charge in this context
123 const_iterator ptype = find( id );
124 if ( ptype==end() ) return 0; // "unknown" - don't care about charge in this context
125 else {
126 if ( ptype->second.find("-")!=std::string::npos ) return -1;
127 if ( ptype->second.find("+")!=std::string::npos ) return +1;
128 }
129 return 0;
130 }
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:138

◆ type()

std::string particleType::type ( int id) const
inline

Definition at line 112 of file particleType.h.

112 {
113 if ( id>1000000000 ) return "nucleus";
114 const_iterator ptype = find( id );
115 if ( ptype==end() ) return "unknown";
116 else return ptype->second;
117 }

Member Data Documentation

◆ elements

T std::map< K, T >::elements
inherited

STL member.

◆ keys

K std::map< K, T >::keys
inherited

STL member.


The documentation for this class was generated from the following file: