Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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: G4PDGCodeChecker.hh 67971 2013-03-13 10:13:24Z gcosmo $
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
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:
73  enum {NumberOfQuarkFlavor = 8};
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 
90  G4int higherSpin;
91  G4int exotic;
92  G4int radial;
93  G4int multiplet;
94  G4int quark1;
95  G4int quark2;
96  G4int quark3;
97  G4int spin;
98 
99  G4int theQuarkContent[NumberOfQuarkFlavor];
100  G4int theAntiQuarkContent[NumberOfQuarkFlavor];
101  // the number of quark (minus Sign means anti-quark) contents
102  // The value of flavor is assigned as follows
103  // 0:d, 1:u, 2:s, 3:c,
104  // 4:b, 5:t, 6:l(down type quark) 7:h(up type quark)
105 
106 };
107 
108 inline
110 {
111  G4int value = 0;
112  if ((flavor>=0)&&(flavor<NumberOfQuarkFlavor)) {
113  value = theQuarkContent[flavor];
114  }
115  return value;
116 }
117 
118 inline
120 {
121  G4int value = 0;
122  if ((flavor>=0)&&(flavor<NumberOfQuarkFlavor)) {
123  value = theAntiQuarkContent[flavor];
124  }
125  return value;
126 }
127 
128 
129 inline
131 {
132  G4int value;
133  if (idx ==0) value = quark1;
134  else if (idx ==1) value = quark2;
135  else if (idx ==2) value = quark3;
136  else value = -1;
137  return value;
138 }
139 
140 inline
142 {
143  return exotic;
144 }
145 
146 inline
148 {
149  return radial;
150 }
151 
152 inline
154 {
155  return multiplet;
156 }
157 
158 inline
160 {
161  return spin;
162 }
163 
164 inline
166 {
167  return (code <0);
168 }
169 
170 inline
172 {
173  verboseLevel = value;
174 }
175 
176 inline
178 {
179  return verboseLevel;
180 }
181 
182 
183 #endif
184 
185 
186 
187 
188 
189 
G4bool CheckCharge(G4double charge) const
G4int GetQuarkContent(G4int flavor) const
G4int GetMultiplet() const
G4int GetRadial() const
G4int GetSpin() const
int G4int
Definition: G4Types.hh:78
G4int CheckPDGCode(G4int code, G4String type)
G4int GetVerboseLevel() const
G4int GetExotic() const
const XML_Char int const XML_Char * value
Definition: expat.h:331
bool G4bool
Definition: G4Types.hh:79
G4int GetQuarkFlavor(G4int idx) const
G4int GetAntiQuarkContent(G4int flavor) const
Definition: inftrees.h:24
void SetVerboseLevel(G4int verbose)
G4bool IsAntiParticle() const
double G4double
Definition: G4Types.hh:76