Geant4 Cross Reference |
>> 1 // This code implementation is the intellectual property of >> 2 // the GEANT4 collaboration. 1 // 3 // 2 // ******************************************* << 4 // By copying, distributing or modifying the Program (or any work 3 // * License and Disclaimer << 5 // based on the Program) you indicate your acceptance of this statement, 4 // * << 6 // and all its terms. 5 // * The Geant4 software is copyright of th << 6 // * the Geant4 Collaboration. It is provided << 7 // * conditions of the Geant4 Software License << 8 // * LICENSE and available at http://cern.ch/ << 9 // * include a list of copyright holders. << 10 // * << 11 // * Neither the authors of this software syst << 12 // * institutes,nor the agencies providing fin << 13 // * work make any representation or warran << 14 // * regarding this software system or assum << 15 // * use. Please see the license in the file << 16 // * for the full disclaimer and the limitatio << 17 // * << 18 // * This code implementation is the result << 19 // * technical work of the GEANT4 collaboratio << 20 // * By using, copying, modifying or distri << 21 // * any work based on the software) you ag << 22 // * use in resulting scientific publicati << 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* << 25 // 7 // 26 // G4Ions << 8 // $Id: G4Ions.hh,v 1.5.4.1 1999/12/07 20:49:50 gunter Exp $ >> 9 // GEANT4 tag $Name: geant4-01-00 $ 27 // 10 // 28 // Class Description: << 11 // >> 12 // ------------------------------------------------------------ >> 13 // GEANT 4 class header file >> 14 // >> 15 // For information related to this code contact: >> 16 // CERN, CN Division, ASD group >> 17 // History: first implementation, based on object model of >> 18 // Hisaya Kurashige, 27 June 1998 >> 19 // ---------------------------------------------------------------- >> 20 // Add excitation energy 17 Aug. 1999 H.Kurashige 29 // 21 // 30 // This is the base class for all nuclei inclu << 31 // light nuclei such as deuteron, alpha, and p << 32 // All nuclei/ions created on the fly are obje << 33 // Atomic number and atomic mass are valid onl << 34 // from this class. This class has Excitation << 35 // the normal particle properties. << 36 << 37 // Authors: G.Cosmo, 4 April 1996 - Design bas << 38 // H.Kurashige, 27 June 1998 - First << 39 // ------------------------------------------- << 40 #ifndef G4Ions_hh << 41 #define G4Ions_hh 1 << 42 22 43 #include "G4ParticleDefinition.hh" << 23 44 #include "G4ios.hh" << 24 #ifndef G4Ions_h >> 25 #define G4Ions_h 1 >> 26 45 #include "globals.hh" 27 #include "globals.hh" >> 28 #include "G4ios.hh" >> 29 #include "G4ParticleWithCuts.hh" >> 30 >> 31 // ###################################################################### >> 32 // ### Ions ### >> 33 // ###################################################################### 46 34 47 class G4Ions : public G4ParticleDefinition << 35 class G4Ions : public G4ParticleWithCuts 48 { 36 { 49 public: << 37 // Class Description 50 // clang-format off << 38 // All nuclei/ions created on the fly are objects of this class 51 G4Ions( << 39 // This class has Excitation Energy in addition to the normal particle >> 40 // >> 41 >> 42 private: >> 43 G4double theIonsLengthCut; >> 44 G4double* theIonsKineticEnergyCuts; >> 45 >> 46 public: //With Description >> 47 G4Ions( 52 const G4String& aName, G4dou 48 const G4String& aName, G4double mass, 53 G4double width, G4dou 49 G4double width, G4double charge, 54 G4int iSpin, G4int 50 G4int iSpin, G4int iParity, 55 G4int iConjugation, G4int 51 G4int iConjugation, G4int iIsospin, 56 G4int iIsospin3, G4int 52 G4int iIsospin3, G4int gParity, 57 const G4String& pType, G4int 53 const G4String& pType, G4int lepton, 58 G4int baryon, G4int 54 G4int baryon, G4int encoding, 59 G4bool stable, G4dou 55 G4bool stable, G4double lifetime, 60 G4DecayTable* decaytable, G4boo << 56 G4DecayTable *decaytable 61 const G4String& subType ="", << 57 ); 62 G4int anti_encoding =0, << 58 63 G4double excitation = 0.0, << 59 public: 64 G4int isomer = 0 << 60 virtual ~G4Ions(){}; 65 ); << 61 G4Ions* IonsDefinition(); 66 // clang-format on << 62 G4Ions* Ions(); 67 << 63 68 ~G4Ions() override = default; << 64 public: //With Description 69 << 65 virtual G4double GetCuts() {return theIonsLengthCut;} 70 inline G4Ions* IonsDefinition(); << 66 virtual const G4double* GetCutsInEnergy() {return theIonsKineticEnergyCuts;}; 71 inline G4Ions* Ions(); << 67 72 << 68 virtual void SetCuts(G4double aCut); 73 // Get excitation energy of nucleus << 74 inline G4double GetExcitationEnergy() cons << 75 << 76 // Get Isomer level (=0 for ground state) << 77 inline G4int GetIsomerLevel() const; << 78 << 79 enum class G4FloatLevelBase // enumerator << 80 { << 81 no_Float = 0, << 82 plus_X, << 83 plus_Y, << 84 plus_Z, << 85 plus_U, << 86 plus_V, << 87 plus_W, << 88 plus_R, << 89 plus_S, << 90 plus_T, << 91 plus_A, << 92 plus_B, << 93 plus_C, << 94 plus_D, << 95 plus_E << 96 }; << 97 << 98 static G4Ions::G4FloatLevelBase FloatLevel << 99 static G4Ions::G4FloatLevelBase FloatLevel << 100 static char FloatLevelBaseChar(G4Ions::G4F << 101 << 102 // Set/Get methods for floating level base << 103 // << 104 inline G4Ions::G4FloatLevelBase GetFloatLe << 105 inline G4int GetFloatLevelBaseIndex() cons << 106 inline void SetFloatLevelBase(G4Ions::G4Fl << 107 inline void SetFloatLevelBase(char flbChar << 108 inline void SetFloatLevelBase(G4int flbIdx << 109 69 110 protected: << 111 G4Ions() = default; << 112 70 >> 71 public: //With Description >> 72 G4int GetAtomicNumber() const; >> 73 G4int GetAtomicMass() const; >> 74 >> 75 G4double GetExcitationEnergy() const ; >> 76 void SetExcitationEnergy(G4double value); >> 77 113 private: 78 private: 114 G4double theExcitationEnergy = 0.0; << 79 G4double theExcitationEnergy; 115 G4int theIsomerLevel = 0; << 116 G4FloatLevelBase floatLevelBase = G4FloatL << 117 }; << 118 80 119 #define noFloat G4Ions::G4FloatLevelBase::no_F << 81 }; 120 #define plusU G4Ions::G4FloatLevelBase::plus_U << 121 #define plusV G4Ions::G4FloatLevelBase::plus_V << 122 #define plusW G4Ions::G4FloatLevelBase::plus_W << 123 #define plusX G4Ions::G4FloatLevelBase::plus_X << 124 #define plusY G4Ions::G4FloatLevelBase::plus_Y << 125 #define plusZ G4Ions::G4FloatLevelBase::plus_Z << 126 #define plusR G4Ions::G4FloatLevelBase::plus_R << 127 #define plusS G4Ions::G4FloatLevelBase::plus_S << 128 #define plusT G4Ions::G4FloatLevelBase::plus_T << 129 #define plusA G4Ions::G4FloatLevelBase::plus_A << 130 #define plusB G4Ions::G4FloatLevelBase::plus_B << 131 #define plusC G4Ions::G4FloatLevelBase::plus_C << 132 #define plusD G4Ions::G4FloatLevelBase::plus_D << 133 #define plusE G4Ions::G4FloatLevelBase::plus_E << 134 << 135 // ------------------------ << 136 // Inline methods << 137 // ------------------------ << 138 82 139 inline G4Ions* G4Ions::IonsDefinition() << 83 inline >> 84 G4Ions* G4Ions::Ions() 140 { 85 { 141 return this; 86 return this; 142 } 87 } 143 88 144 inline G4Ions* G4Ions::Ions() << 89 inline >> 90 G4int G4Ions::GetAtomicNumber() const 145 { 91 { 146 return this; << 92 return int(GetPDGCharge()/eplus); 147 } 93 } 148 94 149 inline G4double G4Ions::GetExcitationEnergy() << 95 inline >> 96 G4int G4Ions::GetAtomicMass() const 150 { 97 { 151 return theExcitationEnergy; << 98 return GetBaryonNumber(); 152 } 99 } 153 100 154 inline G4int G4Ions::GetIsomerLevel() const << 101 inline >> 102 G4double G4Ions::GetExcitationEnergy() const 155 { 103 { 156 return theIsomerLevel; << 104 return theExcitationEnergy; 157 } 105 } 158 106 159 inline G4Ions::G4FloatLevelBase G4Ions::GetFlo << 107 inline >> 108 void G4Ions::SetExcitationEnergy(G4double value) 160 { 109 { 161 return floatLevelBase; << 110 theExcitationEnergy = value; 162 } 111 } 163 112 164 inline G4int G4Ions::GetFloatLevelBaseIndex() << 113 inline >> 114 void G4Ions::SetCuts(G4double aCut) 165 { 115 { 166 return static_cast<G4int>(floatLevelBase); << 116 CalcEnergyCuts(aCut); >> 117 theIonsLengthCut = theCutInMaxInteractionLength; >> 118 theIonsKineticEnergyCuts = theKineticEnergyCuts; 167 } 119 } 168 120 169 inline void G4Ions::SetFloatLevelBase(G4Ions:: << 121 #endif 170 { << 122 171 floatLevelBase = flb; << 123 172 } << 124 173 125 174 inline void G4Ions::SetFloatLevelBase(char flb << 175 { << 176 floatLevelBase = FloatLevelBase(flbChar); << 177 } << 178 126 179 inline void G4Ions::SetFloatLevelBase(G4int fl << 180 { << 181 floatLevelBase = FloatLevelBase(flbIdx); << 182 } << 183 127 184 #endif << 185 128