Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:53

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4ParticlePropertyData
0027 //
0028 // Class description:
0029 //
0030 // This class contains properties of a particle which are a subset
0031 // of properties in G4ParticleDefinition.
0032 // This class is used only for G4ParticlePropertyTable.
0033 
0034 // Author: H.Kurashige, 9 June 2003
0035 // --------------------------------------------------------------------
0036 #ifndef G4ParticlePropertyData_hh
0037 #define G4ParticlePropertyData_hh 1
0038 
0039 #include "G4ios.hh"
0040 #include "globals.hh"
0041 
0042 class G4ParticlePropertyTable;
0043 
0044 class G4ParticlePropertyData
0045 {
0046     friend class G4ParticlePropertyTable;
0047 
0048   public:
0049     // The particle name should be assigned
0050     // The name cannot be changed except by assignment operator
0051     G4ParticlePropertyData(const G4String& particleName = "");
0052 
0053     G4ParticlePropertyData(const G4ParticlePropertyData& right);
0054 
0055     virtual ~G4ParticlePropertyData() = default;
0056 
0057     G4ParticlePropertyData& operator=(const G4ParticlePropertyData& right);
0058 
0059     G4bool operator==(const G4ParticlePropertyData& right) const;
0060     G4bool operator!=(const G4ParticlePropertyData& right) const;
0061 
0062     // With the following accessors, one can get values
0063     // for members which cannot be changed
0064 
0065     const G4String& GetParticleName() const { return theParticleName; }
0066 
0067     G4double GetPDGMass() const { return thePDGMass; }
0068     G4double GetPDGWidth() const { return thePDGWidth; }
0069     G4double GetPDGCharge() const { return thePDGCharge; }
0070 
0071     G4int GetPDGiSpin() const { return thePDGiSpin; }
0072     G4int GetPDGiParity() const { return thePDGiParity; }
0073     G4int GetPDGiConjugation() const { return thePDGiConjugation; }
0074     G4int GetPDGiIsospin() const { return thePDGiIsospin; }
0075     G4int GetPDGiIsospin3() const { return thePDGiIsospin3; }
0076     G4int GetPDGiGParity() const { return thePDGiGParity; }
0077 
0078     G4double GetPDGMagneticMoment() const { return thePDGMagneticMoment; }
0079 
0080     G4int GetLeptonNumber() const { return theLeptonNumber; }
0081     G4int GetBaryonNumber() const { return theBaryonNumber; }
0082 
0083     G4int GetPDGEncoding() const { return thePDGEncoding; }
0084     G4int GetAntiPDGEncoding() const { return theAntiPDGEncoding; }
0085 
0086     // Return the number of quark with flavor contained in this particle.
0087     // The value of flavor is assigned as follows:
0088     // 1:d, 2:u, 3:s, 4:c, 5:b, 6:t
0089     inline G4int GetQuarkContent(G4int flavor) const;
0090     inline G4int GetAntiQuarkContent(G4int flavor) const;
0091 
0092     G4double GetPDGLifeTime() const { return thePDGLifeTime; }
0093 
0094     // Modifiers
0095 
0096     inline void SetPDGMass(G4double newMass);
0097     inline void SetPDGWidth(G4double newWidth);
0098     inline void SetPDGCharge(G4double newCharge);
0099 
0100     inline void SetPDGiSpin(G4int newSpin);
0101     inline void SetPDGiParity(G4int newParity);
0102     inline void SetPDGiConjugation(G4int newConjugation);
0103     inline void SetPDGiIsospin(G4int newIsospin);
0104     inline void SetPDGiIsospin3(G4int newIsospin3);
0105     inline void SetPDGiGParity(G4int newGParity);
0106 
0107     inline void SetPDGMagneticMoment(G4double magneticMoment);
0108 
0109     inline void SetLeptonNumber(G4int newLeptonNumber);
0110     inline void SetBaryonNumber(G4int newBaryonNumber);
0111 
0112     inline void SetPDGEncoding(G4int newEncoding);
0113     inline void SetAntiPDGEncoding(G4int newAntiEncoding);
0114 
0115     inline void SetQuarkContent(G4int flavor, G4int newContent);
0116     inline void SetAntiQuarkContent(G4int flavor, G4int newContent);
0117     inline void SetPDGLifeTime(G4double newLifeTime);
0118 
0119     // Prints information of data members
0120     void Print() const;
0121 
0122     // Control flag for output message
0123     //  0: Silent
0124     //  1: Warning message
0125     //  2: More
0126     inline void SetVerboseLevel(G4int value);
0127     inline G4int GetVerboseLevel() const;
0128 
0129   private:
0130     // The name of the particle.
0131     G4String theParticleName = "";
0132 
0133     // The mass of the particle, in units of equivalent energy.
0134     G4double thePDGMass = 0.0;
0135 
0136     // The decay width of the particle, usually the width of a
0137     // Breit-Wigner function, assuming that you are near the
0138     // mass center anyway (in units of equivalent energy).
0139     G4double thePDGWidth = 0.0;
0140 
0141     // The charge of the particle (in units of Coulomb).
0142     G4double thePDGCharge = 0.0;
0143 
0144     //   ---- following members are quantum number
0145     //        i.e. discrete numbers can be allowed
0146     //        So, you can define only by using integer in constructor
0147 
0148     // The total spin of the particle, also often denoted as
0149     // capital J, in units of 1/2.
0150     G4int thePDGiSpin = 0;
0151 
0152     // The parity quantum number, in units of 1. If the parity
0153     // is not defined for this particle, we will set this to 0.
0154     G4int thePDGiParity = 0;
0155 
0156     // This charge conjugation quantum number in units of 1.
0157     G4int thePDGiConjugation = 0;
0158 
0159     // The value of the G-parity quantum number.
0160     G4int thePDGiGParity = 0;
0161 
0162     // The isospin and its 3rd-component in units of 1/2.
0163     G4int thePDGiIsospin = 0;
0164     G4int thePDGiIsospin3 = 0;
0165 
0166     // The magnetic moment.
0167     G4double thePDGMagneticMoment = 0.0;
0168 
0169     // The lepton quantum number.
0170     G4int theLeptonNumber = 0;
0171 
0172     // The baryon quantum number.
0173     G4int theBaryonNumber = 0;
0174 
0175     // The Particle Data Group integer identifier of this particle
0176     G4int thePDGEncoding = 0;
0177 
0178     // The Particle Data Group integer identifier of the anti-particle
0179     G4int theAntiPDGEncoding = 0;
0180 
0181     // The Particle Life Time
0182     G4double thePDGLifeTime = -1.0;
0183 
0184     enum
0185     {
0186       NumberOfQuarkFlavor = 6
0187     };
0188 
0189     // The number of quark (minus Sign means anti-quark) contents
0190     G4int theQuarkContent[NumberOfQuarkFlavor];
0191     G4int theAntiQuarkContent[NumberOfQuarkFlavor];
0192 
0193   private:
0194     G4bool fPDGMassModified = false;
0195     G4bool fPDGWidthModified = false;
0196     G4bool fPDGChargeModified = false;
0197     G4bool fPDGiSpinModified = false;
0198     G4bool fPDGiParityModified = false;
0199     G4bool fPDGiConjugationModified = false;
0200     G4bool fPDGiGParityModified = false;
0201     G4bool fPDGiIsospinModified = false;
0202     G4bool fPDGiIsospin3Modified = false;
0203     G4bool fPDGIsospinModified = false;
0204     G4bool fPDGIsospin3Modified = false;
0205     G4bool fPDGMagneticMomentModified = false;
0206     G4bool fLeptonNumberModified = false;
0207     G4bool fBaryonNumberModified = false;
0208     G4bool fPDGEncodingModified = false;
0209     G4bool fAntiPDGEncodingModified = false;
0210     G4bool fQuarkContentModified = false;
0211     G4bool fAntiQuarkContentModified = false;
0212     G4bool fPDGLifeTimeModified = false;
0213 
0214     G4int verboseLevel = 1;
0215 };
0216 
0217 #include "G4ParticlePropertyData.icc"
0218 
0219 #endif