Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PDGCodeChecker.hh
Go to the documentation of this file.
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// $Id$
28//
29//
30// ------------------------------------------------------------
31// GEANT 4 class header file
32//
33// History: first implementation, based on object model of
34// Hisaya Kurashige, 17 Aug. 1999
35//
36
37
38#ifndef G4PDGCodeChecker_h
39#define G4PDGCodeChecker_h 1
40
41#include "globals.hh"
42#include "G4ios.hh"
43
45{
46
47 public:
50
51 public: // With Description
52 G4int CheckPDGCode(G4int code, G4String type);
53
54 G4int GetQuarkContent(G4int flavor) const ;
55 G4int GetAntiQuarkContent(G4int flavor) const;
56
57 G4bool IsAntiParticle() const;
58
59 G4int GetQuarkFlavor(G4int idx) const;
60
61 public:
62 G4int GetSpin() const;
63 G4int GetExotic() const;
64 G4int GetRadial() const;
65 G4int GetMultiplet() const;
66
67 G4bool CheckCharge(G4double charge) const;
68
69 G4int GetVerboseLevel() const;
70 void SetVerboseLevel(G4int verbose);
71
72 protected:
74
75 private:
76 void GetDigits(G4int code);
77 G4int CheckForQuarks();
78 G4int CheckForDiQuarks();
79 G4int CheckForMesons();
80 G4int CheckForBaryons();
81 G4int CheckForNuclei();
82
83
84 private:
85 G4int verboseLevel;
86
87 G4int code;
88 G4String theParticleType;
89 G4int thePDGiSpin;
90
91 G4int higherSpin;
92 G4int exotic;
93 G4int radial;
94 G4int multiplet;
95 G4int quark1;
96 G4int quark2;
97 G4int quark3;
98 G4int spin;
99
100 G4int theQuarkContent[NumberOfQuarkFlavor];
101 G4int theAntiQuarkContent[NumberOfQuarkFlavor];
102 // the number of quark (minus Sign means anti-quark) contents
103 // The value of flavor is assigned as follows
104 // 0:d, 1:u, 2:s, 3:c,
105 // 4:b, 5:t, 6:l(down type quark) 7:h(up type quark)
106
107};
108
109inline
111{
112 G4int value = 0;
113 if ((flavor>=0)&&(flavor<NumberOfQuarkFlavor)) {
114 value = theQuarkContent[flavor];
115 }
116 return value;
117}
118
119inline
121{
122 G4int value = 0;
123 if ((flavor>=0)&&(flavor<NumberOfQuarkFlavor)) {
124 value = theAntiQuarkContent[flavor];
125 }
126 return value;
127}
128
129
130inline
132{
133 G4int value;
134 if (idx ==0) value = quark1;
135 else if (idx ==1) value = quark2;
136 else if (idx ==2) value = quark3;
137 else value = -1;
138 return value;
139}
140
141inline
143{
144 return exotic;
145}
146
147inline
149{
150 return radial;
151}
152
153inline
155{
156 return multiplet;
157}
158
159inline
161{
162 return spin;
163}
164
165inline
167{
168 return (code <0);
169}
170
171inline
173{
174 verboseLevel = value;
175}
176
177inline
179{
180 return verboseLevel;
181}
182
183
184#endif
185
186
187
188
189
190
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4bool IsAntiParticle() const
G4int GetSpin() const
G4int GetVerboseLevel() const
G4int GetQuarkContent(G4int flavor) const
G4int GetQuarkFlavor(G4int idx) const
G4bool CheckCharge(G4double charge) const
G4int GetExotic() const
G4int GetAntiQuarkContent(G4int flavor) const
void SetVerboseLevel(G4int verbose)
G4int GetRadial() const
G4int CheckPDGCode(G4int code, G4String type)
G4int GetMultiplet() const