Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4ParticleDefinition.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 // $Id: G4ParticleDefinition.hh 106143 2017-09-14 06:34:42Z gcosmo $
28 //
29 //
30 // ------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 // History: first implementation, based on object model of
34 // 2nd December 1995, G.Cosmo
35 // ---------------- G4ParticleDefinition ----------------
36 // first implementation by Makoto Asai - 29 January 1996
37 // revised - G.Cosmo - 29 February 1996
38 // revised - H.Kurashige - 19 April 1996
39 // revised - H.Kurashige - 4 July 1996
40 // added GetEnergyCuts() and GetLengthCuts() - G.Cosmo - 11 July 1996
41 // added Set/GetVerboseLevel() - H.Kurashige - 11 November 1997
42 // added SetCuts() and ResetCuts - H.Kurashige - 15 November 1996
43 // change SetProcessManager as public - H.Kurashige - 06 June 1998
44 // added GetEnergyThreshold - H.Kurashige - 08 June 1998
45 // added ShortLived flag and ApplyCuts flag - H.Kurashige - 27 June 1998
46 // fixed some improper codings - H.Kurashige - 08 April 1999
47 // added sub-type - H.Kurashige - 15 February 2000
48 // added RestoreCuts - H.Kurashige - 09 March 2001
49 // restructuring for Cuts per Region - H.Kurashige - 11 March 2003
50 // added MagneticMoment - H.Kurashige - March 2007
51 // modified for thread-safety for MT - G.Cosmo, A.Dotti - January 2013
52 // added support for MuonicAtom - K.L.Genser - September 2017
53 // ------------------------------------------------------------
54 
55 #ifndef G4ParticleDefinition_h
56 #define G4ParticleDefinition_h 1
57 
58 #include <vector>
60 
61 #include "globals.hh"
62 #include "G4ios.hh"
63 #include "G4PDefManager.hh"
64 
65 class G4ProcessManager;
66 class G4DecayTable;
67 class G4ParticleTable;
69 
70 //typedef G4PDefSplitter<G4PDefData> G4PDefManager;
72 
74 {
75  // Class Description:
76  //
77  // This class containes all the static data of a particle.
78  // It also has uses a process manager in order to collect
79  // all the processes this kind of particle can undertake.
80 
82 
83  public: // With Description
84 
85  // Only one type of constructor can be used for G4ParticleDefinition.
86  // If you want to create new particle, you must set name of the particle
87  // at construction. Most of members seen as arguments of the constructor
88  // (except last 3 arguments concerning with decay ) are "constant"
89  // and can not be changed later. (No "SET" methods are available)
90  // Each type of particle must be constructed as a unique object
91  // of special class derived from G4ParticleDefinition.
92  // see G4ParticleTypes for detail
93 
94  G4ParticleDefinition(const G4String& aName,
95  G4double mass,
97  G4double charge,
98  G4int iSpin,
99  G4int iParity,
100  G4int iConjugation,
101  G4int iIsospin,
102  G4int iIsospinZ,
103  G4int gParity,
104  const G4String& pType,
105  G4int lepton,
106  G4int baryon,
107  G4int encoding,
108  G4bool stable,
109  G4double lifetime,
110  G4DecayTable *decaytable,
111  G4bool shortlived = false,
112  const G4String& subType ="",
113  G4int anti_encoding =0,
114  G4double magneticMoment = 0.0);
115 
116  virtual ~G4ParticleDefinition();
117 
118  // With the following Getxxxx methods, one can get values
119  // for members which can not be changed
120 
121  const G4String& GetParticleName() const { return theParticleName; }
122 
123  G4double GetPDGMass() const { return thePDGMass; }
124  G4double GetPDGWidth() const { return thePDGWidth; }
125  G4double GetPDGCharge() const { return thePDGCharge; }
126 
127  G4double GetPDGSpin() const { return thePDGSpin; }
128  G4int GetPDGiSpin() const { return thePDGiSpin; }
129  G4int GetPDGiParity() const { return thePDGiParity; }
133  G4int GetPDGiIsospin() const { return thePDGiIsospin; }
135  G4int GetPDGiGParity() const { return thePDGiGParity; }
136 
138  void SetPDGMagneticMoment(G4double mageticMoment);
139  G4double CalculateAnomaly() const;
140  // Gives the anomaly of magnetic moment for spin 1/2 particles
141 
142  const G4String& GetParticleType() const { return theParticleType; }
143  const G4String& GetParticleSubType() const { return theParticleSubType; }
146 
147  G4int GetPDGEncoding() const { return thePDGEncoding; }
149  void SetAntiPDGEncoding(G4int aEncoding);
150 
151 
152  G4int GetQuarkContent(G4int flavor) const;
153  G4int GetAntiQuarkContent(G4int flavor) const;
154  // Returns the number of quark with flavor contained in this particle.
155  // The value of flavor is assigned as follows
156  // 1:d, 2:u, 3:s, 4:c, 5:b, 6:t
157 
158  G4bool IsShortLived() const { return fShortLivedFlag; }
159 
160  G4bool GetPDGStable() const;
161  void SetPDGStable(const G4bool aFlag) { thePDGStable=aFlag; }
162 
163  G4double GetPDGLifeTime() const;
164  void SetPDGLifeTime(G4double aLifeTime) { thePDGLifeTime=aLifeTime; }
165 
166  G4double GetIonLifeTime() const;
167  // Get life time of a generic ion through G4NuclideTable.
168 
169  G4DecayTable* GetDecayTable() const;
170  void SetDecayTable(G4DecayTable* aDecayTable);
171  // Set/Get Decay Table
172  // !! Decay Table can be modified !!
173 
175  void SetProcessManager(G4ProcessManager* aProcessManager);
176  // Set/Get Process Manager
177  // !! Process Manager can be modified !!
178 
180  // Get pointer to the particle table
181 
182  G4int GetAtomicNumber() const;
183  G4int GetAtomicMass() const;
184  // Get AtomicNumber and AtomicMass
185  // These properties are defined for nucleus
186 
187  void DumpTable() const;
188  // Prints information of data members.
189 
191  G4int GetVerboseLevel() const;
192  // controle flag for output message
193  // 0: Silent
194  // 1: Warning message
195  // 2: More
196 
197  void SetApplyCutsFlag(G4bool);
198  G4bool GetApplyCutsFlag() const;
199 
200  G4bool IsGeneralIon() const;
201  // true only if the particle is G4Ions
202  // (it means that theProcessManager is same as one for G4GenricIon)
203 
204  G4bool IsMuonicAtom() const;
205  // true only if the particle is a G4MuonicAtom
206  // (it means that theProcessManager is same as the one for G4GenricMuonicAtom)
207 
210 
211  public : // without description
212 
214  // Returns the process manager master pointer.
215  inline void SetMasterProcessManager(G4ProcessManager* aNewPM);
216  // Sets the shadow master pointer (not to be used by user)
217 
218  inline G4int GetInstanceID() const;
219  // Returns the instance ID.
220 
221  static const G4PDefManager& GetSubInstanceManager();
222  // Returns the private data instance manager.
223 
224  static void Clean();
225  // Clear memory allocated by sub-instance manager.
226 
227  private:
228  // --- Shadow of master pointers.
229 
231  // Each worker thread can access this field from the master thread
232  // through this pointer.
233 
235  // This field is used as instance ID.
236 
238  // This field helps to use the class G4PDefManager introduced above.
239 
240  protected:
241 
243  // Calculates quark and anti-quark contents
244  // return value is PDG encoding for this particle.
245  // It means error if the return value is deffernt from
246  // this->thePDGEncoding.
247 
248  void SetParticleSubType(const G4String& subtype);
249 
250  void SetAtomicNumber(G4int );
251  void SetAtomicMass(G4int );
252 
253  // !!! can not use "copy constructor" nor "default constructor" !!!!
254  //
257 
258  private:
259 
260  // !!! Assignment operation is forbidden !!!
261  //
263 
264  protected:
265 
269  // the number of quark (minus Sign means anti-quark) contents
270  // The value of flavor is assigned as follows
271  // 0:d, 1:u, 2:s, 3:c, 4:b, 5:t
272 
273  private:
274 
275  // --- Following values can not be changed
276  // --- i.e. No Setxxxx Methods for them
277 
279  // The name of the particle.
280  // Each object must have its specific name!!
281 
282  // --- Following member values must be defined with Units
283 
285  // The mass of the particle, in units of equivalent energy.
286 
288  // The decay width of the particle, usually the width of a
289  // Breit-Wigner function, assuming that you are near the
290  // mass center anyway. (in units of equivalent energy)
291 
293  // The charge of the particle.(in units of Coulomb)
294 
295  // --- Following members are quantum number
296  // i.e. discrete numbers can be allowded
297  // So, you can defined only by using integer in constructor
298 
300  // The total spin of the particle, also often denoted as
301  // capital J, in units of 1/2.
303  // The total spin of the particle, in units of 1.
304 
306  // The parity quantum number, in units of 1. If the parity
307  // is not defined for this particle, we will set this to 0.
308 
310  // This charge conjugation quantum number in units of 1.
311 
313  // The value of the G-parity quantum number.
314 
317  // The isospin and its 3rd-component in units of 1/2.
320  // The isospin quantum number in units of 1.
321 
323  // The magnetic moment.
324 
326  // The lepton quantum number.
327 
329  // The baryon quantum number.
330 
332  // More general textual type description of the particle.
333 
335  // Textual type description of the particle
336  // eg. pion, lamda etc.
337 
339  // The Particle Data Group integer identifier of this particle
340 
342  // The Particle Data Group integer identifier of the anti-particle
343 
344  // --- Following members can be changed after construction
345 
347  // Particles which have true value of this flag
348  // will not be tracked by TrackingManager
349 
351  // Is an indicator that this particle is stable. It must
352  // not decay. If the user tries to assign a kind of decay
353  // object to it, it will refuse to take it.
354 
356  // Is related to the decay width of the particle. The mean
357  // life time is given in seconds.
358 
360  // Points DecayTable
361 
362  private:
363 
365 
368 
371 
372  protected:
375 
376  public:
377  void SetParticleDefinitionID(G4int id=-1);
379 };
380 
381 #include "G4ParticleDefinition.icc"
382 
383 #endif
G4ProcessManager * GetMasterProcessManager() const
G4double GetPDGWidth() const
void SetMasterProcessManager(G4ProcessManager *aNewPM)
G4int GetAtomicNumber() const
G4DecayTable * GetDecayTable() const
G4double CalculateAnomaly() const
G4bool IsGeneralIon() const
G4double GetPDGLifeTime() const
void SetDecayTable(G4DecayTable *aDecayTable)
const G4String & GetParticleSubType() const
void SetParticleDefinitionID(G4int id=-1)
const G4String & GetParticleName() const
const G4String & GetParticleType() const
void SetPDGLifeTime(G4double aLifeTime)
G4double GetPDGCharge() const
G4bool IsMuonicAtom() const
G4int GetPDGiConjugation() const
void SetAtomicMass(G4int)
G4int operator!=(const G4ParticleDefinition &right) const
G4double GetPDGMass() const
G4ParticleTable * GetParticleTable() const
G4PDefManager G4ParticleDefinitionSubInstanceManager
void SetAtomicNumber(G4int)
G4double GetPDGSpin() const
G4int GetParticleDefinitionID() const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
const G4ParticleDefinition & operator=(const G4ParticleDefinition &r)
#define width
void SetProcessManager(G4ProcessManager *aProcessManager)
static G4PART_DLL G4PDefManager subInstanceManager
const XML_Char int const XML_Char * value
Definition: expat.h:331
G4int theAntiQuarkContent[NumberOfQuarkFlavor]
G4int GetAntiPDGEncoding() const
G4int GetQuarkContent(G4int flavor) const
G4int GetInstanceID() const
G4ProcessManager * theProcessManagerShadow
void SetAntiPDGEncoding(G4int aEncoding)
G4double GetPDGMagneticMoment() const
G4bool GetPDGStable() const
G4double GetIonLifeTime() const
G4double GetPDGIsospin() const
int G4int
Definition: G4Types.hh:78
G4int theQuarkContent[NumberOfQuarkFlavor]
G4ProcessManager * GetProcessManager() const
void SetPDGStable(const G4bool aFlag)
G4int GetAtomicMass() const
G4int operator==(const G4ParticleDefinition &right) const
static const G4PDefManager & GetSubInstanceManager()
G4bool GetApplyCutsFlag() const
#define G4PART_DLL
Definition: pwdefs.hh:48
G4ParticleTable * theParticleTable
void SetPDGMagneticMoment(G4double mageticMoment)
void SetVerboseLevel(G4int value)
G4double GetPDGIsospin3() const
void SetParticleSubType(const G4String &subtype)
G4int GetAntiQuarkContent(G4int flavor) const
G4int GetVerboseLevel() const