G4ParticleDefinition.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // 
00030 // ------------------------------------------------------------
00031 //      GEANT 4 class header file 
00032 //
00033 //      History: first implementation, based on object model of
00034 //      2nd December 1995, G.Cosmo
00035 // ---------------- G4ParticleDefinition ----------------
00036 // first implementation by Makoto Asai, 29 January 1996
00037 // revised by G.Cosmo, 29 February 1996
00038 // revised by H.Kurashige, 19 April 1996
00039 // revised by H.Kurashige, 4 July 1996
00040 // added GetEnergyCuts() and GetLengthCuts() by G.Cosmo, 11 July 1996
00041 // added Set/GetVerboseLevel()    H.Kurashige 11 Nov. 1997
00042 // added SetCuts() and ResetCuts  H.Kurashige 15 Nov.1996
00043 // change SetProcessManager as public H.Kurashige 06 June 1998
00044 // added  GetEnergyThreshold  H.Kurashige 08 June 1998
00045 // added  ShortLived flag and ApplyCuts flag  H.Kurashige 27  June 1998
00046 // fixed  some improper codings   H.Kurashige 08 Apr. 1999
00047 // added  sub-type  H.Kurashige 15 Feb. 2000
00048 // added  RestoreCuts  H.Kurashige 09 Mar. 2001
00049 // restructuring for Cuts per Region  by Hisaya    11 MAr.2003 
00050 // added  MagneticMoment               Mar. 2007
00051 // ------------------------------------------------------------
00052 
00053 #ifndef G4ParticleDefinition_h
00054 #define G4ParticleDefinition_h 1
00055 
00056 #include <vector>
00057 #include <CLHEP/Units/PhysicalConstants.h>
00058 
00059 #include "globals.hh"
00060 #include "G4ios.hh"
00061 
00062 class G4ProcessManager;
00063 class G4DecayTable;
00064 class G4ParticleTable;
00065 class G4ParticlePropertyTable;
00066 
00067 class G4ParticleDefinition 
00068 {
00069   // Class Description
00070   //  This class containes all the static data of a particle.
00071   //  It also has uses a process manager in order to collect
00072   //  all the processes this kind of particle can undertake.
00073   //
00074 
00075   friend class  G4ParticlePropertyTable;
00076 
00077  public: // With Description
00078   //  Only one type of constructor can be used for G4ParticleDefinition.
00079   //  If you want to create new particle, you must set name of the particle 
00080   //  at construction. Most of members seen as arguments of the constructor 
00081   //  (except last 3 arguments concerning with decay ) are  "constant" 
00082   //  and can not be changed later. (No "SET" methods are available)
00083   //  Each type of particle must be constructed as a unique object
00084   //  of special class derived from G4ParticleDefinition.
00085   //  see G4ParticleTypes for detail 
00086  
00087       G4ParticleDefinition(const G4String&  aName,  
00088                            G4double         mass,     
00089                            G4double         width,
00090                            G4double         charge,   
00091                            G4int            iSpin,
00092                            G4int            iParity,
00093                            G4int            iConjugation,
00094                            G4int            iIsospin,   
00095                            G4int            iIsospinZ, 
00096                            G4int            gParity,
00097                            const G4String&  pType,
00098                            G4int            lepton,
00099                            G4int            baryon,
00100                            G4int            encoding,
00101                            G4bool           stable,
00102                            G4double         lifetime,
00103                            G4DecayTable     *decaytable,
00104                            G4bool           shortlived = false,
00105                            const G4String&  subType ="",
00106                            G4int            anti_encoding =0,
00107                            G4double         magneticMoment = 0.0);
00108 
00109        virtual ~G4ParticleDefinition();
00110       
00111   public: // With Description
00112   // By these following Getxxxx methods, you can get values 
00113   // for members which can not be changed
00114   //  
00115       const G4String& GetParticleName() const { return theParticleName; }
00116 
00117       G4double GetPDGMass() const { return thePDGMass; }
00118       G4double GetPDGWidth() const { return thePDGWidth; } 
00119       G4double GetPDGCharge() const { return thePDGCharge; }
00120 
00121       G4double GetPDGSpin() const { return thePDGSpin; }
00122       G4int    GetPDGiSpin() const { return thePDGiSpin; }
00123       G4int    GetPDGiParity() const { return thePDGiParity; }
00124       G4int    GetPDGiConjugation() const { return thePDGiConjugation; }
00125       G4double GetPDGIsospin() const { return thePDGIsospin; }
00126       G4double GetPDGIsospin3() const { return thePDGIsospin3; }
00127       G4int    GetPDGiIsospin() const { return thePDGiIsospin; }
00128       G4int    GetPDGiIsospin3() const { return thePDGiIsospin3; }
00129       G4int    GetPDGiGParity() const { return thePDGiGParity; }
00130  
00131       G4double GetPDGMagneticMoment() const { return thePDGMagneticMoment; }
00132       void     SetPDGMagneticMoment(G4double mageticMoment); 
00133       G4double CalculateAnomaly()  const;
00134       // gives the anomaly of magnetic moment for spin 1/2 particles 
00135 
00136       const G4String& GetParticleType() const { return theParticleType; }
00137       const G4String& GetParticleSubType() const { return theParticleSubType; }
00138       G4int    GetLeptonNumber() const { return theLeptonNumber; }
00139       G4int    GetBaryonNumber() const { return theBaryonNumber; }
00140 
00141       G4int    GetPDGEncoding() const { return thePDGEncoding; }
00142       G4int    GetAntiPDGEncoding() const { return theAntiPDGEncoding; }
00143       void     SetAntiPDGEncoding(G4int aEncoding);
00144 
00145  
00146       G4int    GetQuarkContent(G4int flavor) const;
00147       G4int    GetAntiQuarkContent(G4int flavor) const;
00148       //  return the number of quark with flavor contained in this particle. 
00149       //  The value of flavor is assigned as follows 
00150       // 1:d, 2:u, 3:s, 4:c, 5:b, 6:t
00151  
00152 
00153   public: // With Description
00154       // ShortLived flag
00155       G4bool   IsShortLived() const { return fShortLivedFlag; }
00156 
00157       G4bool   GetPDGStable() const { return thePDGStable; }
00158       void     SetPDGStable(const G4bool aFlag) { thePDGStable=aFlag; }
00159 
00160       G4double GetPDGLifeTime() const { return thePDGLifeTime; }
00161       void     SetPDGLifeTime(G4double aLifeTime) { thePDGLifeTime = aLifeTime; }
00162 
00163   public:// With Description
00164       G4DecayTable* GetDecayTable() const;
00165       void          SetDecayTable(G4DecayTable* aDecayTable); 
00166       // Set/Get Decay Table
00167       //   !! Decay Table can be modified !!  
00168 
00169   public: // With Description
00170       G4ProcessManager* GetProcessManager() const; 
00171       void SetProcessManager(G4ProcessManager* aProcessManager); 
00172       // Set/Get Process Manager
00173       //   !! Process Manager can be modified !!  
00174 
00175       G4ParticleTable* GetParticleTable() const;
00176       // get pointer to the particle table
00177 
00178       void DumpTable() const;
00179       //  Prints information of data members.
00180 
00181   protected:
00182       G4int   FillQuarkContents();
00183       //  calculate quark and anti-quark contents
00184       //  return value is PDG encoding for this particle.
00185       //  It means error if the return value is deffernt from
00186       //  this->thePDGEncoding.
00187 
00188       void   SetParticleSubType(const G4String& subtype);
00189 
00190   public: // With Description
00191       // Get AtomicNumber and AtomicMass
00192       // These properties are defined for nucleus
00193       G4int GetAtomicNumber() const;
00194       G4int GetAtomicMass() const;
00195 
00196   protected:
00197       void SetAtomicNumber(G4int );
00198       void SetAtomicMass(G4int );
00199 
00200  public:
00201       void  SetVerboseLevel(G4int value);
00202       G4int GetVerboseLevel() const;
00203       // controle flag for output message
00204       //  0: Silent
00205       //  1: Warning message
00206       //  2: More
00207 
00208   protected:
00209   //  !!!  can not use "copy constructor" nor "default constructor" !!!!
00210        G4ParticleDefinition(const G4ParticleDefinition &right);
00211        G4ParticleDefinition();
00212 
00213   private:  
00214   //  !!!  Assignment operation is forbidden !!!
00215       const G4ParticleDefinition & operator=(const G4ParticleDefinition &right);
00216 
00217   public:
00218       G4int operator==(const G4ParticleDefinition &right) const;
00219       G4int operator!=(const G4ParticleDefinition &right) const;
00220 
00221   private:
00222   //  Values following can not be changed
00223   //  i.e. No Setxxxx Methods for them 
00224 
00225       G4String theParticleName;
00226       //  The name of the particle.
00227       //  Each object must have its specific name!!
00228 
00229     //    --- following member values must be defined with Units
00230       G4double thePDGMass;
00231       //  The mass of the particle, in units of equivalent energy.
00232 
00233       G4double thePDGWidth;
00234       //  The decay width of the particle, usually the width of a
00235       //  Breit-Wigner function, assuming that you are near the
00236       //  mass center anyway. (in units of equivalent energy)
00237 
00238       G4double thePDGCharge;
00239       //  The charge of the particle.(in units of Coulomb)
00240 
00241     //   ---- following members are quantum number
00242     //         i.e. discrete numbers can be allowded
00243     //        So, you can defined only by using integer in constructor 
00244       G4int thePDGiSpin;
00245       //  The total spin of the particle, also often denoted as
00246       //  capital J, in units of 1/2.
00247       G4double thePDGSpin;
00248       //  The total spin of the particle, in units of 1.
00249 
00250       G4int thePDGiParity;
00251       //  The parity quantum number, in units of 1. If the parity
00252       //  is not defined for this particle, we will set this to 0.
00253 
00254       G4int thePDGiConjugation;
00255       //  This charge conjugation quantum number in units of 1.
00256 
00257       G4int thePDGiGParity;
00258       //  The value of the G-parity quantum number.
00259 
00260       G4int thePDGiIsospin;
00261       G4int thePDGiIsospin3;
00262       //  The isospin and its 3rd-component in units of 1/2.
00263       G4double thePDGIsospin;
00264       G4double thePDGIsospin3;
00265       //  The isospin quantum number in units of 1.
00266  
00267       G4double thePDGMagneticMoment;
00268       //  The magnetic moment.
00269 
00270       G4int theLeptonNumber;
00271       //  The lepton quantum number.
00272 
00273       G4int theBaryonNumber;
00274       //  The baryon quantum number.
00275 
00276       G4String theParticleType;
00277       //  More general textual type description of the particle.
00278 
00279       G4String theParticleSubType;
00280       // Textual type description of the particle
00281       // eg. pion, lamda etc.
00282 
00283       G4int thePDGEncoding;
00284       //  The Particle Data Group integer identifier of this particle
00285  
00286       G4int theAntiPDGEncoding;
00287       //  The Particle Data Group integer identifier of the anti-particle
00288 
00289   protected:
00290       enum {NumberOfQuarkFlavor = 6};
00291       G4int  theQuarkContent[NumberOfQuarkFlavor];
00292       G4int  theAntiQuarkContent[NumberOfQuarkFlavor];
00293       //  the number of quark (minus Sign means anti-quark) contents
00294       //  The value of flavor is assigned as follows 
00295       //    0:d, 1:u, 2:s, 3:c, 4:b, 5:t
00296 
00297   private:
00298     // Following members can be changed after construction
00299 
00300      G4bool fShortLivedFlag;
00301       //  Particles which have true value of this flag 
00302       //  will not be tracked by TrackingManager 
00303 
00304      G4bool thePDGStable;
00305       //  Is an indicator that this particle is stable. It must
00306       //  not decay. If the user tries to assign a kind of decay
00307       //  object to it, it will refuse to take it.
00308 
00309       G4double thePDGLifeTime;
00310       //  Is related to the decay width of the particle. The mean
00311       //  life time is given in seconds.
00312 
00313       class G4DecayTable *theDecayTable;
00314       //  Points DecayTable 
00315  
00316    private:
00317       class G4ProcessManager *theProcessManager;
00318       //  Points to G4ProcessManager
00319 
00320       G4ParticleTable* theParticleTable;
00321 
00322   private:
00323     G4int theAtomicNumber;
00324     G4int theAtomicMass;
00325  
00326   private:
00327    G4int verboseLevel;
00328 
00329   private:
00330    G4bool fApplyCutsFlag;
00331  public:
00332 
00333    void SetApplyCutsFlag(G4bool);
00334    G4bool GetApplyCutsFlag() const;
00335 
00336 };
00337 
00338 #include "G4ParticleDefinition.icc"
00339 
00340 #endif

Generated on Mon May 27 17:49:16 2013 for Geant4 by  doxygen 1.4.7