Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QPDGCode.cc File Reference
#include <cmath>
#include <cstdlib>
#include "G4QPDGCodeVector.hh"

Go to the source code of this file.

Functions

ostream & operator<< (ostream &lhs, G4QPDGCode &rhs)
 
ostream & operator<< (ostream &lhs, const G4QPDGCode &rhs)
 
G4int operator+ (const G4QPDGCode &lhs, const G4QPDGCode &rhs)
 
G4int operator+ (const G4QPDGCode &lhs, const G4int &rhs)
 
G4int operator+ (const G4int &lhs, const G4QPDGCode &rhs)
 
G4int operator- (const G4QPDGCode &lhs, const G4QPDGCode &rhs)
 
G4int operator- (const G4QPDGCode &lhs, const G4int &rhs)
 
G4int operator- (const G4int &lhs, const G4QPDGCode &rhs)
 
G4int operator* (const G4QPDGCode &lhs, const G4QPDGCode &rhs)
 
G4int operator* (const G4QPDGCode &lhs, const G4int &rhs)
 
G4int operator* (const G4int &lhs, const G4QPDGCode &rhs)
 
G4int operator/ (const G4QPDGCode &lhs, const G4QPDGCode &rhs)
 
G4int operator/ (const G4QPDGCode &lhs, const G4int &rhs)
 
G4int operator/ (const G4int &lhs, const G4QPDGCode &rhs)
 
G4int operator% (const G4QPDGCode &lhs, const G4int &rhs)
 

Function Documentation

◆ operator%()

G4int operator% ( const G4QPDGCode lhs,
const G4int rhs 
)

Definition at line 204 of file G4QPDGCode.cc.

205{
206 G4int s_value = lhs.GetPDGCode();
207 return s_value %= rhs;
208}
int G4int
Definition: G4Types.hh:66
G4int GetPDGCode() const
Definition: G4QPDGCode.hh:326

◆ operator*() [1/3]

G4int operator* ( const G4int lhs,
const G4QPDGCode rhs 
)

Definition at line 178 of file G4QPDGCode.cc.

179{
180 G4int s_value = lhs;
181 return s_value *= rhs.GetPDGCode();
182}

◆ operator*() [2/3]

G4int operator* ( const G4QPDGCode lhs,
const G4int rhs 
)

Definition at line 172 of file G4QPDGCode.cc.

173{
174 G4int s_value = lhs.GetPDGCode();
175 return s_value *= rhs;
176}

◆ operator*() [3/3]

G4int operator* ( const G4QPDGCode lhs,
const G4QPDGCode rhs 
)

Definition at line 166 of file G4QPDGCode.cc.

167{
168 G4int s_value = lhs.GetPDGCode();
169 return s_value *= rhs.GetPDGCode();
170}

◆ operator+() [1/3]

G4int operator+ ( const G4int lhs,
const G4QPDGCode rhs 
)

Definition at line 142 of file G4QPDGCode.cc.

143{
144 G4int s_value = lhs;
145 return s_value += rhs.GetPDGCode();
146}

◆ operator+() [2/3]

G4int operator+ ( const G4QPDGCode lhs,
const G4int rhs 
)

Definition at line 137 of file G4QPDGCode.cc.

138{
139 G4int s_value = lhs.GetPDGCode();
140 return s_value += rhs;
141}

◆ operator+() [3/3]

G4int operator+ ( const G4QPDGCode lhs,
const G4QPDGCode rhs 
)

Definition at line 132 of file G4QPDGCode.cc.

133{
134 G4int s_value = lhs.GetPDGCode();
135 return s_value += rhs.GetPDGCode();
136}

◆ operator-() [1/3]

G4int operator- ( const G4int lhs,
const G4QPDGCode rhs 
)

Definition at line 159 of file G4QPDGCode.cc.

160{
161 G4int s_value = lhs;
162 return s_value -= rhs.GetPDGCode();
163}

◆ operator-() [2/3]

G4int operator- ( const G4QPDGCode lhs,
const G4int rhs 
)

Definition at line 154 of file G4QPDGCode.cc.

155{
156 G4int s_value = lhs.GetPDGCode();
157 return s_value -= rhs;
158}

◆ operator-() [3/3]

G4int operator- ( const G4QPDGCode lhs,
const G4QPDGCode rhs 
)

Definition at line 149 of file G4QPDGCode.cc.

150{
151 G4int s_value = lhs.GetPDGCode();
152 return s_value -= rhs.GetPDGCode();
153}

◆ operator/() [1/3]

G4int operator/ ( const G4int lhs,
const G4QPDGCode rhs 
)

Definition at line 197 of file G4QPDGCode.cc.

198{
199 G4int s_value = lhs;
200 return s_value /= rhs.GetPDGCode();
201}

◆ operator/() [2/3]

G4int operator/ ( const G4QPDGCode lhs,
const G4int rhs 
)

Definition at line 191 of file G4QPDGCode.cc.

192{
193 G4int s_value = lhs.GetPDGCode();
194 return s_value /= rhs;
195}

◆ operator/() [3/3]

G4int operator/ ( const G4QPDGCode lhs,
const G4QPDGCode rhs 
)

Definition at line 185 of file G4QPDGCode.cc.

186{
187 G4int s_value = lhs.GetPDGCode();
188 return s_value /= rhs.GetPDGCode();
189}

◆ operator<<() [1/2]

ostream & operator<< ( ostream &  lhs,
const G4QPDGCode rhs 
)

Definition at line 125 of file G4QPDGCode.cc.

126{
127 lhs << "[ PDG=" << rhs.GetPDGCode() << ", Q=" << rhs.GetQCode() << "]";
128 return lhs;
129}
G4int GetQCode() const
Definition: G4QPDGCode.hh:327

◆ operator<<() [2/2]

ostream & operator<< ( ostream &  lhs,
G4QPDGCode rhs 
)

Definition at line 118 of file G4QPDGCode.cc.

119{
120 lhs << "[ PDG=" << rhs.GetPDGCode() << ", Q=" << rhs.GetQCode() << "]";
121 return lhs;
122}