ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4PDGCodeChecker.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4PDGCodeChecker.hh
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//
27
//
28
//
29
// ------------------------------------------------------------
30
// GEANT 4 class header file
31
//
32
// History: first implementation, based on object model of
33
// Hisaya Kurashige, 17 Aug. 1999
34
//
35
36
37
#ifndef G4PDGCodeChecker_h
38
#define G4PDGCodeChecker_h 1
39
40
#include "
globals.hh
"
41
#include "
G4ios.hh
"
42
43
class
G4PDGCodeChecker
44
{
45
46
public
:
47
G4PDGCodeChecker
();
48
~G4PDGCodeChecker
(){};
49
50
public
:
// With Description
51
G4int
CheckPDGCode
(
G4int
code
,
G4String
type);
52
53
G4int
GetQuarkContent
(
G4int
flavor)
const
;
54
G4int
GetAntiQuarkContent
(
G4int
flavor)
const
;
55
56
G4bool
IsAntiParticle
()
const
;
57
58
G4int
GetQuarkFlavor
(
G4int
idx
)
const
;
59
60
public
:
61
G4int
GetSpin
()
const
;
62
G4int
GetExotic
()
const
;
63
G4int
GetRadial
()
const
;
64
G4int
GetMultiplet
()
const
;
65
66
G4bool
CheckCharge
(
G4double
charge
)
const
;
67
68
G4int
GetVerboseLevel
()
const
;
69
void
SetVerboseLevel
(
G4int
verbose);
70
71
protected
:
72
enum
{
NumberOfQuarkFlavor
= 8};
73
74
private
:
75
void
GetDigits
(
G4int
code
);
76
G4int
CheckForQuarks
();
77
G4int
CheckForDiQuarks
();
78
G4int
CheckForMesons
();
79
G4int
CheckForBaryons
();
80
G4int
CheckForNuclei
();
81
82
83
private
:
84
G4int
verboseLevel
;
85
86
G4int
code
;
87
G4String
theParticleType
;
88
89
G4int
higherSpin
;
90
G4int
exotic
;
91
G4int
radial
;
92
G4int
multiplet
;
93
G4int
quark1
;
94
G4int
quark2
;
95
G4int
quark3
;
96
G4int
spin
;
97
98
G4int
theQuarkContent
[
NumberOfQuarkFlavor
];
99
G4int
theAntiQuarkContent
[
NumberOfQuarkFlavor
];
100
// the number of quark (minus Sign means anti-quark) contents
101
// The value of flavor is assigned as follows
102
// 0:d, 1:u, 2:s, 3:c,
103
// 4:b, 5:t, 6:l(down type quark) 7:h(up type quark)
104
105
};
106
107
inline
108
G4int
G4PDGCodeChecker::GetQuarkContent
(
G4int
flavor)
const
109
{
110
G4int
value
= 0;
111
if
((flavor>=0)&&(flavor<
NumberOfQuarkFlavor
)) {
112
value =
theQuarkContent
[flavor];
113
}
114
return
value
;
115
}
116
117
inline
118
G4int
G4PDGCodeChecker::GetAntiQuarkContent
(
G4int
flavor)
const
119
{
120
G4int
value
= 0;
121
if
((flavor>=0)&&(flavor<
NumberOfQuarkFlavor
)) {
122
value =
theAntiQuarkContent
[flavor];
123
}
124
return
value
;
125
}
126
127
128
inline
129
G4int
G4PDGCodeChecker::GetQuarkFlavor
(
G4int
idx
)
const
130
{
131
G4int
value
;
132
if
(idx ==0) value =
quark1
;
133
else
if
(idx ==1) value =
quark2
;
134
else
if
(idx ==2) value =
quark3
;
135
else
value = -1;
136
return
value
;
137
}
138
139
inline
140
G4int
G4PDGCodeChecker::GetExotic
()
const
141
{
142
return
exotic
;
143
}
144
145
inline
146
G4int
G4PDGCodeChecker::GetRadial
()
const
147
{
148
return
radial
;
149
}
150
151
inline
152
G4int
G4PDGCodeChecker::GetMultiplet
()
const
153
{
154
return
multiplet
;
155
}
156
157
inline
158
G4int
G4PDGCodeChecker::GetSpin
()
const
159
{
160
return
spin
;
161
}
162
163
inline
164
G4bool
G4PDGCodeChecker::IsAntiParticle
()
const
165
{
166
return
(
code
<0);
167
}
168
169
inline
170
void
G4PDGCodeChecker::SetVerboseLevel
(
G4int
value
)
171
{
172
verboseLevel
=
value
;
173
}
174
175
inline
176
G4int
G4PDGCodeChecker::GetVerboseLevel
()
const
177
{
178
return
verboseLevel
;
179
}
180
181
182
#endif
183
184
185
186
187
188
geant4
tree
geant4-10.6-release
source
particles
management
include
G4PDGCodeChecker.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:24
using
1.8.2 with
ECCE GitHub integration