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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 3.2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
 25 //                                                 22 //
 26 // G4Ions                                      << 
 27 //                                                 23 //
 28 // Class Description:                          <<  24 // $Id: G4Ions.hh,v 1.7.2.2 2001/06/28 20:19:08 gunter Exp $
                                                   >>  25 // GEANT4 tag $Name:  $
                                                   >>  26 //
                                                   >>  27 // 
                                                   >>  28 // ------------------------------------------------------------
                                                   >>  29 //      GEANT 4 class header file
                                                   >>  30 //
                                                   >>  31 //      History: first implementation, based on object model of
                                                   >>  32 //      Hisaya Kurashige, 27 June 1998
                                                   >>  33 // ----------------------------------------------------------------
                                                   >>  34 //      Add excitation energy         17 Aug. 1999 H.Kurashige
 29 //                                                 35 //
 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                                                    36 
 43 #include "G4ParticleDefinition.hh"             <<  37 
 44 #include "G4ios.hh"                            <<  38 #ifndef G4Ions_h
                                                   >>  39 #define G4Ions_h 1
                                                   >>  40 
 45 #include "globals.hh"                              41 #include "globals.hh"
                                                   >>  42 #include "G4ios.hh"
                                                   >>  43 #include "G4ParticleWithCuts.hh"
 46                                                    44 
 47 class G4Ions : public G4ParticleDefinition     <<  45 // ######################################################################
                                                   >>  46 // ###                          Ions                                 ###
                                                   >>  47 // ######################################################################
                                                   >>  48 
                                                   >>  49 class G4Ions : public G4ParticleWithCuts
 48 {                                                  50 {
 49   public:                                      <<  51  // Class Description
 50     // clang-format off                        <<  52  //  All nuclei/ions created on the fly are objects of this class
 51     G4Ions(                                    <<  53  //  This class has Excitation Energy in addition to the normal particle
                                                   >>  54  //
                                                   >>  55 
                                                   >>  56  private:
                                                   >>  57    G4double  theIonsLengthCut;
                                                   >>  58    G4double* theIonsKineticEnergyCuts;
                                                   >>  59 
                                                   >>  60  public: //With Description
                                                   >>  61    G4Ions(
 52        const G4String&     aName,        G4dou     62        const G4String&     aName,        G4double            mass,
 53        G4double            width,        G4dou     63        G4double            width,        G4double            charge,   
 54        G4int               iSpin,        G4int     64        G4int               iSpin,        G4int               iParity,    
 55        G4int               iConjugation, G4int     65        G4int               iConjugation, G4int               iIsospin,   
 56        G4int               iIsospin3,    G4int     66        G4int               iIsospin3,    G4int               gParity,
 57        const G4String&     pType,        G4int     67        const G4String&     pType,        G4int               lepton,      
 58        G4int               baryon,       G4int     68        G4int               baryon,       G4int               encoding,
 59        G4bool              stable,       G4dou     69        G4bool              stable,       G4double            lifetime,
 60        G4DecayTable*       decaytable,   G4boo <<  70        G4DecayTable        *decaytable
 61        const G4String&     subType ="",        <<  71    );
 62        G4int               anti_encoding =0,   << 
 63        G4double            excitation = 0.0,   << 
 64        G4int               isomer = 0          << 
 65     );                                         << 
 66     // clang-format on                         << 
 67                                                << 
 68     ~G4Ions() override = default;              << 
 69                                                << 
 70     inline G4Ions* IonsDefinition();           << 
 71     inline G4Ions* Ions();                     << 
 72                                                << 
 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                                                    72 
110   protected:                                   <<  73  public:
111     G4Ions() = default;                        <<  74    virtual          ~G4Ions(){};
                                                   >>  75    G4Ions*          IonsDefinition();
                                                   >>  76    G4Ions*          Ions();
112                                                    77 
113   private:                                     <<  78  public: //With Description
114     G4double theExcitationEnergy = 0.0;        <<  79    virtual G4double       GetCuts() {return theIonsLengthCut;}   
115     G4int theIsomerLevel = 0;                  <<  80    virtual const G4double*  GetCutsInEnergy() {return theIonsKineticEnergyCuts;};
116     G4FloatLevelBase floatLevelBase = G4FloatL << 
117 };                                             << 
118                                                    81 
119 #define noFloat G4Ions::G4FloatLevelBase::no_F <<  82    virtual void     SetCuts(G4double aCut); 
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                                                    83 
139 inline G4Ions* G4Ions::IonsDefinition()        << 
140 {                                              << 
141   return this;                                 << 
142 }                                              << 
143                                                    84 
144 inline G4Ions* G4Ions::Ions()                  <<  85  public:  //With Description
145 {                                              <<  86    G4int    GetAtomicNumber() const;
146   return this;                                 <<  87    G4int    GetAtomicMass() const;
147 }                                              << 
148                                                    88 
149 inline G4double G4Ions::GetExcitationEnergy()  <<  89    G4double GetExcitationEnergy() const ; 
150 {                                              <<  90    void     SetExcitationEnergy(G4double value);
151   return theExcitationEnergy;                  <<  91   
152 }                                              <<  92   private:
153                                                <<  93    G4double theExcitationEnergy; 
154 inline G4int G4Ions::GetIsomerLevel() const    << 
155 {                                              << 
156   return theIsomerLevel;                       << 
157 }                                              << 
158                                                    94 
159 inline G4Ions::G4FloatLevelBase G4Ions::GetFlo <<  95 };
160 {                                              << 
161   return floatLevelBase;                       << 
162 }                                              << 
163                                                    96 
164 inline G4int G4Ions::GetFloatLevelBaseIndex()  <<  97 inline
                                                   >>  98  G4Ions* G4Ions::Ions() 
165 {                                                  99 {
166   return static_cast<G4int>(floatLevelBase);   << 100   return this;
167 }                                                 101 }
168                                                   102 
169 inline void G4Ions::SetFloatLevelBase(G4Ions:: << 103 inline
                                                   >> 104  G4double G4Ions::GetExcitationEnergy() const 
170 {                                                 105 {
171   floatLevelBase = flb;                        << 106   return theExcitationEnergy;
172 }                                                 107 }
173                                                   108 
174 inline void G4Ions::SetFloatLevelBase(char flb << 109 inline
                                                   >> 110  void G4Ions::SetExcitationEnergy(G4double value) 
175 {                                                 111 {
176   floatLevelBase = FloatLevelBase(flbChar);    << 112   theExcitationEnergy = value;
177 }                                                 113 }
178                                                   114 
179 inline void G4Ions::SetFloatLevelBase(G4int fl << 115 inline 
                                                   >> 116  void G4Ions::SetCuts(G4double aCut)
180 {                                                 117 {
181   floatLevelBase = FloatLevelBase(flbIdx);     << 118   CalcEnergyCuts(aCut);
                                                   >> 119   theIonsLengthCut = theCutInMaxInteractionLength;  
                                                   >> 120   theIonsKineticEnergyCuts = theKineticEnergyCuts;
182 }                                                 121 }
183                                                   122 
184 #endif                                            123 #endif
185                                                   124