Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/cascade/cascade/include/G4InuclNuclei.hh

    r962 r1315  
     1#ifndef G4INUCL_NUCLEI_HH
     2#define G4INUCL_NUCLEI_HH
    13//
    24// ********************************************************************
     
    2325// * acceptance of all terms of the Geant4 Software license.          *
    2426// ********************************************************************
     27// $Id: G4InuclNuclei.hh,v 1.16 2010/04/09 19:33:11 mkelsey Exp $
     28// Geant4 tag: $Name: geant4-09-04-beta-cand-01 $
    2529//
    26 #ifndef G4INUCL_NUCLEI_HH
    27 #define G4INUCL_NUCLEI_HH
     30// 20100112  Michael Kelsey -- Replace G4CascadeMomentum with G4LorentzVector
     31// 20100301  M. Kelsey -- Add function to create unphysical nuclei for use
     32//           as temporary final-state fragments.
     33// 20100319  M. Kelsey -- Remove "using" directory and unnecessary #includes.
     34// 20100409  M. Kelsey -- Drop unused string argument from ctors.
    2835
    29 #ifndef G4INUCL_PARTICLE_HH
    3036#include "G4InuclParticle.hh"
    31 #endif
    3237#include "G4ExitonConfiguration.hh"
    33 #include "G4InuclSpecialFunctions.hh"
    3438
    35 using namespace G4InuclSpecialFunctions;
     39class G4ParticleDefinition;
    3640
    3741class G4InuclNuclei : public G4InuclParticle {
     42public:
     43  G4InuclNuclei() : G4InuclParticle() {}
    3844
    39 public:
     45  G4InuclNuclei(G4double a, G4double z)
     46    : G4InuclParticle(makeDefinition(a,z)),
     47      exitationEnergy(0.0) {}
    4048
    41   G4InuclNuclei() {};
     49  G4InuclNuclei(const G4LorentzVector& mom, G4double a, G4double z)
     50    : G4InuclParticle(makeDefinition(a,z), mom),
     51      exitationEnergy(0.0) {}
    4252
    43   G4InuclNuclei(G4double a,
    44                 G4double z)
    45     : A(a),
    46       Z(z) {
     53  G4InuclNuclei(G4double ekin, G4double a, G4double z)
     54    : G4InuclParticle(makeDefinition(a,z), ekin),
     55      exitationEnergy(0.0) {}
    4756
    48     setNucleiMass();
    49     exitationEnergy = 0.0;
    50   };
     57  virtual ~G4InuclNuclei() {}
    5158
    52   G4InuclNuclei(const G4CascadeMomentum& mom,
    53                 G4double a,
    54                 G4double z)
    55     : G4InuclParticle(mom),
    56       A(a),
    57       Z(z) {
     59  // Copy and assignment constructors for use with std::vector<>
     60  G4InuclNuclei(const G4InuclNuclei& right)
     61    : G4InuclParticle(right), exitationEnergy(right.exitationEnergy),
     62      theExitonConfiguration(right.theExitonConfiguration) {}
    5863
    59     setNucleiMass(); 
    60     exitationEnergy = 0.0;
    61   };
     64  G4InuclNuclei& operator=(const G4InuclNuclei& right);
    6265
    63   G4InuclNuclei(G4double ekin,
    64                 G4double a,
    65                 G4double z)
    66     : A(a),
    67     Z(z) {
    68 
    69     setNucleiMass();
    70     G4CascadeMomentum mom;
    71     mom[0] = ekin + nucleiMass;
    72     mom[3] = std::sqrt(mom[0] * mom[0] - nucleiMass * nucleiMass);
    73     G4InuclParticle::setMomentum(mom);
    74     exitationEnergy = 0.0;
    75   };
    76        
    77   void setA(G4double a) {
    78 
    79     A = a;
    80   };
    81 
    82   void setZ(G4double z) {
    83 
    84     Z = z;
    85   };
    86 
    87   void setExitationEnergy(G4double e) {
    88 
    89     exitationEnergy = e;
    90   };
    91 
    92   void setEnergy() {
    93 
    94     momentum[0] = std::sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
    95                        momentum[3] * momentum[3] + nucleiMass * nucleiMass); 
    96   };
    97 
    98   void setNucleiMass() {
    99 
    100     nucleiMass = 0.93827 * Z + 0.93957 * (A - Z) - 0.001 * bindingEnergy(A, Z);
    101   };
     66  void setExitationEnergy(G4double e) { exitationEnergy = e; }
    10267
    10368  void setExitonConfiguration(const G4ExitonConfiguration& config) {
     69    theExitonConfiguration = config;
     70  }
    10471
    105     theExitonConfiguration = config;
    106   };
     72  G4double getA() const { return getDefinition()->GetAtomicMass(); }
    10773
    108   G4double getA() const {
     74  G4double getZ() const { return getDefinition()->GetAtomicNumber(); }
    10975
    110     return A;
    111   };
    112 
    113   G4double getZ() const {
    114 
    115     return Z;
    116   };
    117 
    118   G4double getExitationEnergy() const {
    119 
    120     return exitationEnergy;
    121   };
     76  G4double getExitationEnergy() const { return exitationEnergy; }
    12277
    12378  G4double getExitationEnergyInGeV() const {
     79    return 0.001 * exitationEnergy;
     80  }
    12481
    125     return 0.001 * exitationEnergy;
    126   };
     82  const G4ExitonConfiguration& getExitonConfiguration() const {
     83    return theExitonConfiguration;
     84  }
    12785
    128   G4ExitonConfiguration getExitonConfiguration() const {
    129 
    130     return theExitonConfiguration;
    131   };
    132 
    133   G4double getMass() const {
    134 
    135     return nucleiMass;
    136   };
    137 
    138   G4double getKineticEnergy() const {
    139 
    140     return momentum[0] - nucleiMass;
    141   };
    142 
    143   G4double getNucleiMass(G4double a,
    144                          G4double z) const {
    145 
    146     return 0.93827 * z + 0.93957 * (a - z) - 0.001 * bindingEnergy(a, z);
    147   };
     86  static G4double getNucleiMass(G4double a, G4double z);
    14887
    14988  virtual void printParticle() const {
     89    G4cout << " A " << getA() << " Z " << getZ() << " mass "
     90           << getMass() << " Eex (MeV) " << exitationEnergy << G4endl;
     91    G4InuclParticle::printParticle();
     92  }
    15093
    151     G4cout << " A " << A << " Z " << Z << " mass " << nucleiMass <<
    152       " Eex (MeV) " << exitationEnergy << G4endl;
     94protected:
     95  // Convert nuclear configuration to standard GEANT4 pointer
     96  static G4ParticleDefinition*
     97  makeDefinition(G4double a, G4double z, G4double exc=0.);
    15398
    154     G4cout << " Px " << momentum[1] << " Py " << momentum[2] << " Pz " << 
    155         momentum[3] <<  " E " << momentum[0] << G4endl;
    156   };
     99  static G4ParticleDefinition*
     100  makeNuclearFragment(G4double a, G4double z, G4double exc=0.);
    157101
    158102private:
    159 
    160   G4double A;
    161   G4double Z;
    162103  G4double exitationEnergy;
    163   G4double nucleiMass;
    164104  G4ExitonConfiguration theExitonConfiguration;
    165 
    166105};       
    167106
Note: See TracChangeset for help on using the changeset viewer.