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5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /particles/management/include/G4Ions.hh (Version 11.3.0) and /particles/management/include/G4Ions.hh (Version 11.0)


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