source: trunk/source/particles/management/include/G4ParticleDefinition.hh @ 992

Last change on this file since 992 was 992, checked in by garnier, 15 years ago

fichiers oublies

File size: 12.4 KB
Line 
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,v 1.32 2008/03/22 06:03:40 kurasige Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30//
31// ------------------------------------------------------------
32//      GEANT 4 class header file
33//
34//      History: first implementation, based on object model of
35//      2nd December 1995, G.Cosmo
36// ---------------- G4ParticleDefinition ----------------
37// first implementation by Makoto Asai, 29 January 1996
38// revised by G.Cosmo, 29 February 1996
39// revised by H.Kurashige, 19 April 1996
40// revised by H.Kurashige, 4 July 1996
41// added GetEnergyCuts() and GetLengthCuts() by G.Cosmo, 11 July 1996
42// added Set/GetVerboseLevel()    H.Kurashige 11 Nov. 1997
43// added SetCuts() and ResetCuts  H.Kurashige 15 Nov.1996
44// change SetProcessManager as public H.Kurashige 06 June 1998
45// added  GetEnergyThreshold  H.Kurashige 08 June 1998
46// added  ShortLived flag and ApplyCuts flag  H.Kurashige 27  June 1998
47// fixed  some improper codings   H.Kurashige 08 Apr. 1999
48// added  sub-type  H.Kurashige 15 Feb. 2000
49// added  RestoreCuts  H.Kurashige 09 Mar. 2001
50// restructuring for Cuts per Region  by Hisaya    11 MAr.2003
51// added  MagneticMoment               Mar. 2007
52// ------------------------------------------------------------
53
54#ifndef G4ParticleDefinition_h
55#define G4ParticleDefinition_h 1
56
57#include "globals.hh"
58#include "G4ios.hh"
59#include <vector>
60
61class G4ProcessManager;
62class G4DecayTable;
63class G4ParticleTable;
64class G4ParticlePropertyTable;
65
66class G4ParticleDefinition 
67{
68  // Class Description
69  //  This class containes all the static data of a particle.
70  //  It also has uses a process manager in order to collect
71  //  all the processes this kind of particle can undertake.
72  //
73
74  friend class  G4ParticlePropertyTable;
75
76 public: // With Description
77  //  Only one type of constructor can be used for G4ParticleDefinition.
78  //  If you want to create new particle, you must set name of the particle
79  //  at construction. Most of members seen as arguments of the constructor
80  //  (except last 3 arguments concerning with decay ) are  "constant"
81  //  and can not be changed later. (No "SET" methods are available)
82  //  Each type of particle must be constructed as a unique object
83  //  of special class derived from G4ParticleDefinition.
84  //  see G4ParticleTypes for detail
85 
86      G4ParticleDefinition(const G4String&  aName, 
87                           G4double         mass,     
88                           G4double         width,
89                           G4double         charge,   
90                           G4int            iSpin,
91                           G4int            iParity,
92                           G4int            iConjugation,
93                           G4int            iIsospin,   
94                           G4int            iIsospinZ, 
95                           G4int            gParity,
96                           const G4String&  pType,
97                           G4int            lepton,
98                           G4int            baryon,
99                           G4int            encoding,
100                           G4bool           stable,
101                           G4double         lifetime,
102                           G4DecayTable     *decaytable,
103                           G4bool           shortlived = false,
104                           const G4String&  subType ="",
105                           G4int            anti_encoding =0,
106                           G4double         magneticMoment = 0.0);
107
108       virtual ~G4ParticleDefinition();
109     
110  public: // With Description
111  // By these following Getxxxx methods, you can get values
112  // for members which can not be changed
113  // 
114      const G4String& GetParticleName() const { return theParticleName; }
115
116      G4double GetPDGMass() const { return thePDGMass; }
117      G4double GetPDGWidth() const { return thePDGWidth; } 
118      G4double GetPDGCharge() const { return thePDGCharge; }
119
120      G4double GetPDGSpin() const { return thePDGSpin; }
121      G4int    GetPDGiSpin() const { return thePDGiSpin; }
122      G4int    GetPDGiParity() const { return thePDGiParity; }
123      G4int    GetPDGiConjugation() const { return thePDGiConjugation; }
124      G4double GetPDGIsospin() const { return thePDGIsospin; }
125      G4double GetPDGIsospin3() const { return thePDGIsospin3; }
126      G4int    GetPDGiIsospin() const { return thePDGiIsospin; }
127      G4int    GetPDGiIsospin3() const { return thePDGiIsospin3; }
128      G4int    GetPDGiGParity() const { return thePDGiGParity; }
129 
130      G4double GetPDGMagneticMoment() const { return thePDGMagneticMoment; }
131  void SetPDGMagneticMoment(G4double mageticMoment);
132
133      const G4String& GetParticleType() const { return theParticleType; }
134      const G4String& GetParticleSubType() const { return theParticleSubType; }
135      G4int    GetLeptonNumber() const { return theLeptonNumber; }
136      G4int    GetBaryonNumber() const { return theBaryonNumber; }
137
138      G4int    GetPDGEncoding() const { return thePDGEncoding; }
139      G4int    GetAntiPDGEncoding() const { return theAntiPDGEncoding; }
140      void     SetAntiPDGEncoding(G4int aEncoding);
141
142 
143      G4int    GetQuarkContent(G4int flavor) const;
144      G4int    GetAntiQuarkContent(G4int flavor) const;
145      //  return the number of quark with flavor contained in this particle.
146      //  The value of flavor is assigned as follows
147      // 1:d, 2:u, 3:s, 4:c, 5:b, 6:t
148 
149
150  public: // With Description
151      // ShortLived flag
152      G4bool   IsShortLived() const { return fShortLivedFlag; }
153
154      G4bool   GetPDGStable() const { return thePDGStable; }
155      void     SetPDGStable(const G4bool aFlag) { thePDGStable=aFlag; }
156
157      G4double GetPDGLifeTime() const { return thePDGLifeTime; }
158      void     SetPDGLifeTime(G4double aLifeTime) { thePDGLifeTime = aLifeTime; }
159
160  public:// With Description
161      G4DecayTable* GetDecayTable();
162      void          SetDecayTable(G4DecayTable* aDecayTable); 
163      // Set/Get Decay Table
164      //   !! Decay Table can be modified !! 
165
166  public: // With Description
167      G4ProcessManager* GetProcessManager() const; 
168      void SetProcessManager(G4ProcessManager* aProcessManager); 
169      // Set/Get Process Manager
170      //   !! Process Manager can be modified !! 
171
172      G4ParticleTable* GetParticleTable();
173      // get pointer to the particle table
174
175      void DumpTable() const;
176      //  Prints information of data members.
177
178  protected:
179      G4int   FillQuarkContents();
180      //  calculate quark and anti-quark contents
181      //  return value is PDG encoding for this particle.
182      //  It means error if the return value is deffernt from
183      //  this->thePDGEncoding.
184
185      void   SetParticleSubType(const G4String& subtype);
186
187  public: // With Description
188      // Get AtomicNumber and AtomicMass
189      // These properties are defined for nucleus
190      G4int GetAtomicNumber() const;
191      G4int GetAtomicMass() const;
192
193  protected:
194      void SetAtomicNumber(G4int );
195      void SetAtomicMass(G4int );
196
197 public:
198      void  SetVerboseLevel(G4int value);
199      G4int GetVerboseLevel() const;
200      // controle flag for output message
201      //  0: Silent
202      //  1: Warning message
203      //  2: More
204
205  protected:
206  //  !!!  can not use "copy constructor" nor "default constructor" !!!!
207       G4ParticleDefinition(const G4ParticleDefinition &right);
208       G4ParticleDefinition();
209
210  private: 
211  //  !!!  Assignment operation is forbidden !!!
212      const G4ParticleDefinition & operator=(const G4ParticleDefinition &right);
213
214  public:
215      G4int operator==(const G4ParticleDefinition &right) const;
216      G4int operator!=(const G4ParticleDefinition &right) const;
217
218  private:
219  //  Values following can not be changed
220  //  i.e. No Setxxxx Methods for them
221
222      G4String theParticleName;
223      //  The name of the particle.
224      //  Each object must have its specific name!!
225
226    //    --- following member values must be defined with Units
227      G4double thePDGMass;
228      //  The mass of the particle, in units of equivalent energy.
229
230      G4double thePDGWidth;
231      //  The decay width of the particle, usually the width of a
232      //  Breit-Wigner function, assuming that you are near the
233      //  mass center anyway. (in units of equivalent energy)
234
235      G4double thePDGCharge;
236      //  The charge of the particle.(in units of Coulomb)
237
238    //   ---- following members are quantum number
239    //         i.e. discrete numbers can be allowded
240    //        So, you can defined only by using integer in constructor
241      G4int thePDGiSpin;
242      //  The total spin of the particle, also often denoted as
243      //  capital J, in units of 1/2.
244      G4double thePDGSpin;
245      //  The total spin of the particle, in units of 1.
246
247      G4int thePDGiParity;
248      //  The parity quantum number, in units of 1. If the parity
249      //  is not defined for this particle, we will set this to 0.
250
251      G4int thePDGiConjugation;
252      //  This charge conjugation quantum number in units of 1.
253
254      G4int thePDGiGParity;
255      //  The value of the G-parity quantum number.
256
257      G4int thePDGiIsospin;
258      G4int thePDGiIsospin3;
259      //  The isospin and its 3rd-component in units of 1/2.
260      G4double thePDGIsospin;
261      G4double thePDGIsospin3;
262      //  The isospin quantum number in units of 1.
263 
264      G4double thePDGMagneticMoment;
265      //  The magnetic moment.
266
267      G4int theLeptonNumber;
268      //  The lepton quantum number.
269
270      G4int theBaryonNumber;
271      //  The baryon quantum number.
272
273      G4String theParticleType;
274      //  More general textual type description of the particle.
275
276      G4String theParticleSubType;
277      // Textual type description of the particle
278      // eg. pion, lamda etc.
279
280      G4int thePDGEncoding;
281      //  The Particle Data Group integer identifier of this particle
282 
283      G4int theAntiPDGEncoding;
284      //  The Particle Data Group integer identifier of the anti-particle
285
286  protected:
287      enum {NumberOfQuarkFlavor = 6};
288      G4int  theQuarkContent[NumberOfQuarkFlavor];
289      G4int  theAntiQuarkContent[NumberOfQuarkFlavor];
290      //  the number of quark (minus Sign means anti-quark) contents
291      //  The value of flavor is assigned as follows
292      //    0:d, 1:u, 2:s, 3:c, 4:b, 5:t
293
294  private:
295    // Following members can be changed after construction
296
297     G4bool fShortLivedFlag;
298      //  Particles which have true value of this flag
299      //  will not be tracked by TrackingManager
300
301     G4bool thePDGStable;
302      //  Is an indicator that this particle is stable. It must
303      //  not decay. If the user tries to assign a kind of decay
304      //  object to it, it will refuse to take it.
305
306      G4double thePDGLifeTime;
307      //  Is related to the decay width of the particle. The mean
308      //  life time is given in seconds.
309
310      class G4DecayTable *theDecayTable;
311      //  Points DecayTable
312 
313   private:
314      class G4ProcessManager *theProcessManager;
315      //  Points to G4ProcessManager
316
317      G4ParticleTable* theParticleTable;
318
319  private:
320    G4int theAtomicNumber;
321    G4int theAtomicMass;
322 
323  private:
324   G4int verboseLevel;
325
326  private:
327   G4bool fApplyCutsFlag;
328 public:
329
330   void SetApplyCutsFlag(G4bool);
331   G4bool GetApplyCutsFlag() const;
332
333};
334
335#include "G4ParticleDefinition.icc"
336
337#endif
Note: See TracBrowser for help on using the repository browser.