| 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.34 2010/08/10 15:47:42 kurasige Exp $
|
|---|
| 28 | // GEANT4 tag $Name: particles-V09-03-15 $
|
|---|
| 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 |
|
|---|
| 61 | class G4ProcessManager;
|
|---|
| 62 | class G4DecayTable;
|
|---|
| 63 | class G4ParticleTable;
|
|---|
| 64 | class G4ParticlePropertyTable;
|
|---|
| 65 |
|
|---|
| 66 | class 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 | G4double CalculateAnomaly() const;
|
|---|
| 133 | // gives the anomaly of magnetic moment for spin 1/2 particles
|
|---|
| 134 |
|
|---|
| 135 | const G4String& GetParticleType() const { return theParticleType; }
|
|---|
| 136 | const G4String& GetParticleSubType() const { return theParticleSubType; }
|
|---|
| 137 | G4int GetLeptonNumber() const { return theLeptonNumber; }
|
|---|
| 138 | G4int GetBaryonNumber() const { return theBaryonNumber; }
|
|---|
| 139 |
|
|---|
| 140 | G4int GetPDGEncoding() const { return thePDGEncoding; }
|
|---|
| 141 | G4int GetAntiPDGEncoding() const { return theAntiPDGEncoding; }
|
|---|
| 142 | void SetAntiPDGEncoding(G4int aEncoding);
|
|---|
| 143 |
|
|---|
| 144 |
|
|---|
| 145 | G4int GetQuarkContent(G4int flavor) const;
|
|---|
| 146 | G4int GetAntiQuarkContent(G4int flavor) const;
|
|---|
| 147 | // return the number of quark with flavor contained in this particle.
|
|---|
| 148 | // The value of flavor is assigned as follows
|
|---|
| 149 | // 1:d, 2:u, 3:s, 4:c, 5:b, 6:t
|
|---|
| 150 |
|
|---|
| 151 |
|
|---|
| 152 | public: // With Description
|
|---|
| 153 | // ShortLived flag
|
|---|
| 154 | G4bool IsShortLived() const { return fShortLivedFlag; }
|
|---|
| 155 |
|
|---|
| 156 | G4bool GetPDGStable() const { return thePDGStable; }
|
|---|
| 157 | void SetPDGStable(const G4bool aFlag) { thePDGStable=aFlag; }
|
|---|
| 158 |
|
|---|
| 159 | G4double GetPDGLifeTime() const { return thePDGLifeTime; }
|
|---|
| 160 | void SetPDGLifeTime(G4double aLifeTime) { thePDGLifeTime = aLifeTime; }
|
|---|
| 161 |
|
|---|
| 162 | public:// With Description
|
|---|
| 163 | G4DecayTable* GetDecayTable() const;
|
|---|
| 164 | void SetDecayTable(G4DecayTable* aDecayTable);
|
|---|
| 165 | // Set/Get Decay Table
|
|---|
| 166 | // !! Decay Table can be modified !!
|
|---|
| 167 |
|
|---|
| 168 | public: // With Description
|
|---|
| 169 | G4ProcessManager* GetProcessManager() const;
|
|---|
| 170 | void SetProcessManager(G4ProcessManager* aProcessManager);
|
|---|
| 171 | // Set/Get Process Manager
|
|---|
| 172 | // !! Process Manager can be modified !!
|
|---|
| 173 |
|
|---|
| 174 | G4ParticleTable* GetParticleTable() const;
|
|---|
| 175 | // get pointer to the particle table
|
|---|
| 176 |
|
|---|
| 177 | void DumpTable() const;
|
|---|
| 178 | // Prints information of data members.
|
|---|
| 179 |
|
|---|
| 180 | protected:
|
|---|
| 181 | G4int FillQuarkContents();
|
|---|
| 182 | // calculate quark and anti-quark contents
|
|---|
| 183 | // return value is PDG encoding for this particle.
|
|---|
| 184 | // It means error if the return value is deffernt from
|
|---|
| 185 | // this->thePDGEncoding.
|
|---|
| 186 |
|
|---|
| 187 | void SetParticleSubType(const G4String& subtype);
|
|---|
| 188 |
|
|---|
| 189 | public: // With Description
|
|---|
| 190 | // Get AtomicNumber and AtomicMass
|
|---|
| 191 | // These properties are defined for nucleus
|
|---|
| 192 | G4int GetAtomicNumber() const;
|
|---|
| 193 | G4int GetAtomicMass() const;
|
|---|
| 194 |
|
|---|
| 195 | protected:
|
|---|
| 196 | void SetAtomicNumber(G4int );
|
|---|
| 197 | void SetAtomicMass(G4int );
|
|---|
| 198 |
|
|---|
| 199 | public:
|
|---|
| 200 | void SetVerboseLevel(G4int value);
|
|---|
| 201 | G4int GetVerboseLevel() const;
|
|---|
| 202 | // controle flag for output message
|
|---|
| 203 | // 0: Silent
|
|---|
| 204 | // 1: Warning message
|
|---|
| 205 | // 2: More
|
|---|
| 206 |
|
|---|
| 207 | protected:
|
|---|
| 208 | // !!! can not use "copy constructor" nor "default constructor" !!!!
|
|---|
| 209 | G4ParticleDefinition(const G4ParticleDefinition &right);
|
|---|
| 210 | G4ParticleDefinition();
|
|---|
| 211 |
|
|---|
| 212 | private:
|
|---|
| 213 | // !!! Assignment operation is forbidden !!!
|
|---|
| 214 | const G4ParticleDefinition & operator=(const G4ParticleDefinition &right);
|
|---|
| 215 |
|
|---|
| 216 | public:
|
|---|
| 217 | G4int operator==(const G4ParticleDefinition &right) const;
|
|---|
| 218 | G4int operator!=(const G4ParticleDefinition &right) const;
|
|---|
| 219 |
|
|---|
| 220 | private:
|
|---|
| 221 | // Values following can not be changed
|
|---|
| 222 | // i.e. No Setxxxx Methods for them
|
|---|
| 223 |
|
|---|
| 224 | G4String theParticleName;
|
|---|
| 225 | // The name of the particle.
|
|---|
| 226 | // Each object must have its specific name!!
|
|---|
| 227 |
|
|---|
| 228 | // --- following member values must be defined with Units
|
|---|
| 229 | G4double thePDGMass;
|
|---|
| 230 | // The mass of the particle, in units of equivalent energy.
|
|---|
| 231 |
|
|---|
| 232 | G4double thePDGWidth;
|
|---|
| 233 | // The decay width of the particle, usually the width of a
|
|---|
| 234 | // Breit-Wigner function, assuming that you are near the
|
|---|
| 235 | // mass center anyway. (in units of equivalent energy)
|
|---|
| 236 |
|
|---|
| 237 | G4double thePDGCharge;
|
|---|
| 238 | // The charge of the particle.(in units of Coulomb)
|
|---|
| 239 |
|
|---|
| 240 | // ---- following members are quantum number
|
|---|
| 241 | // i.e. discrete numbers can be allowded
|
|---|
| 242 | // So, you can defined only by using integer in constructor
|
|---|
| 243 | G4int thePDGiSpin;
|
|---|
| 244 | // The total spin of the particle, also often denoted as
|
|---|
| 245 | // capital J, in units of 1/2.
|
|---|
| 246 | G4double thePDGSpin;
|
|---|
| 247 | // The total spin of the particle, in units of 1.
|
|---|
| 248 |
|
|---|
| 249 | G4int thePDGiParity;
|
|---|
| 250 | // The parity quantum number, in units of 1. If the parity
|
|---|
| 251 | // is not defined for this particle, we will set this to 0.
|
|---|
| 252 |
|
|---|
| 253 | G4int thePDGiConjugation;
|
|---|
| 254 | // This charge conjugation quantum number in units of 1.
|
|---|
| 255 |
|
|---|
| 256 | G4int thePDGiGParity;
|
|---|
| 257 | // The value of the G-parity quantum number.
|
|---|
| 258 |
|
|---|
| 259 | G4int thePDGiIsospin;
|
|---|
| 260 | G4int thePDGiIsospin3;
|
|---|
| 261 | // The isospin and its 3rd-component in units of 1/2.
|
|---|
| 262 | G4double thePDGIsospin;
|
|---|
| 263 | G4double thePDGIsospin3;
|
|---|
| 264 | // The isospin quantum number in units of 1.
|
|---|
| 265 |
|
|---|
| 266 | G4double thePDGMagneticMoment;
|
|---|
| 267 | // The magnetic moment.
|
|---|
| 268 |
|
|---|
| 269 | G4int theLeptonNumber;
|
|---|
| 270 | // The lepton quantum number.
|
|---|
| 271 |
|
|---|
| 272 | G4int theBaryonNumber;
|
|---|
| 273 | // The baryon quantum number.
|
|---|
| 274 |
|
|---|
| 275 | G4String theParticleType;
|
|---|
| 276 | // More general textual type description of the particle.
|
|---|
| 277 |
|
|---|
| 278 | G4String theParticleSubType;
|
|---|
| 279 | // Textual type description of the particle
|
|---|
| 280 | // eg. pion, lamda etc.
|
|---|
| 281 |
|
|---|
| 282 | G4int thePDGEncoding;
|
|---|
| 283 | // The Particle Data Group integer identifier of this particle
|
|---|
| 284 |
|
|---|
| 285 | G4int theAntiPDGEncoding;
|
|---|
| 286 | // The Particle Data Group integer identifier of the anti-particle
|
|---|
| 287 |
|
|---|
| 288 | protected:
|
|---|
| 289 | enum {NumberOfQuarkFlavor = 6};
|
|---|
| 290 | G4int theQuarkContent[NumberOfQuarkFlavor];
|
|---|
| 291 | G4int theAntiQuarkContent[NumberOfQuarkFlavor];
|
|---|
| 292 | // the number of quark (minus Sign means anti-quark) contents
|
|---|
| 293 | // The value of flavor is assigned as follows
|
|---|
| 294 | // 0:d, 1:u, 2:s, 3:c, 4:b, 5:t
|
|---|
| 295 |
|
|---|
| 296 | private:
|
|---|
| 297 | // Following members can be changed after construction
|
|---|
| 298 |
|
|---|
| 299 | G4bool fShortLivedFlag;
|
|---|
| 300 | // Particles which have true value of this flag
|
|---|
| 301 | // will not be tracked by TrackingManager
|
|---|
| 302 |
|
|---|
| 303 | G4bool thePDGStable;
|
|---|
| 304 | // Is an indicator that this particle is stable. It must
|
|---|
| 305 | // not decay. If the user tries to assign a kind of decay
|
|---|
| 306 | // object to it, it will refuse to take it.
|
|---|
| 307 |
|
|---|
| 308 | G4double thePDGLifeTime;
|
|---|
| 309 | // Is related to the decay width of the particle. The mean
|
|---|
| 310 | // life time is given in seconds.
|
|---|
| 311 |
|
|---|
| 312 | class G4DecayTable *theDecayTable;
|
|---|
| 313 | // Points DecayTable
|
|---|
| 314 |
|
|---|
| 315 | private:
|
|---|
| 316 | class G4ProcessManager *theProcessManager;
|
|---|
| 317 | // Points to G4ProcessManager
|
|---|
| 318 |
|
|---|
| 319 | G4ParticleTable* theParticleTable;
|
|---|
| 320 |
|
|---|
| 321 | private:
|
|---|
| 322 | G4int theAtomicNumber;
|
|---|
| 323 | G4int theAtomicMass;
|
|---|
| 324 |
|
|---|
| 325 | private:
|
|---|
| 326 | G4int verboseLevel;
|
|---|
| 327 |
|
|---|
| 328 | private:
|
|---|
| 329 | G4bool fApplyCutsFlag;
|
|---|
| 330 | public:
|
|---|
| 331 |
|
|---|
| 332 | void SetApplyCutsFlag(G4bool);
|
|---|
| 333 | G4bool GetApplyCutsFlag() const;
|
|---|
| 334 |
|
|---|
| 335 | };
|
|---|
| 336 |
|
|---|
| 337 | #include "G4ParticleDefinition.icc"
|
|---|
| 338 |
|
|---|
| 339 | #endif
|
|---|