Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4VPreCompoundFragment.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VPreCompoundFragment.cc,v 1.12 2009/02/10 16:01:37 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4VPreCompoundFragment.cc,v 1.13 2010/08/28 15:16:55 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2828//
    29 // J. M. Quesada (August 2008). 
    30 // Based  on previous work by V. Lara
     29// J. M. Quesada (August 2008).  Based  on previous work by V. Lara
    3130//
    32  
     31// Modified:
     32// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
     33//                         use int Z and A and cleanup
     34
    3335#include "G4VPreCompoundFragment.hh"
    3436#include "G4PreCompoundParameters.hh"
     37#include "G4NucleiProperties.hh"
    3538
    36 G4VPreCompoundFragment::
    37 G4VPreCompoundFragment(const G4VPreCompoundFragment & right)
     39G4VPreCompoundFragment::G4VPreCompoundFragment(
     40  const G4ParticleDefinition* part, G4VCoulombBarrier* aCoulombBarrier)
     41  : particle(part), theCoulombBarrierPtr(aCoulombBarrier),
     42    theRestNucleusA(0),theRestNucleusZ(0),theBindingEnergy(0.0),
     43    theMaximalKineticEnergy(-MeV),theRestNucleusMass(0.0),
     44    theReducedMass(0.0),theMomentum(0.,0.,0.,0.),
     45    theEmissionProbability(0.0),theCoulombBarrier(0.0)
    3846{
    39   theA = right.theA;
    40   theZ = right.theZ;
    41   theRestNucleusA = right.theRestNucleusA;
    42   theRestNucleusZ = right.theRestNucleusZ;
    43   theCoulombBarrier = right.theCoulombBarrier;
    44   theCoulombBarrierPtr = right.theCoulombBarrierPtr;
    45   theMaximalKineticEnergy = right.theMaximalKineticEnergy;
    46   theEmissionProbability = right.theEmissionProbability;
    47   theMomentum = right.theMomentum;
    48   theFragmentName = right.theFragmentName;
    49   theStage = right.theStage;
     47  theA = particle->GetBaryonNumber();
     48  theZ = G4int(particle->GetPDGCharge()/eplus + 0.1);
     49  theMass = particle->GetPDGMass();
     50  theParameters = G4PreCompoundParameters::GetAddress();
     51  g4pow = G4Pow::GetInstance();
    5052}
    5153
    52 G4VPreCompoundFragment::
    53 G4VPreCompoundFragment(const G4double anA,
    54                        const G4double aZ,
    55                        G4VCoulombBarrier* aCoulombBarrier,
    56                        const G4String & aName):
    57   theA(anA),theZ(aZ),
    58   theRestNucleusA(0.0),theRestNucleusZ(0.0),theCoulombBarrier(0.0),
    59   theCoulombBarrierPtr(aCoulombBarrier),
    60   theBindingEnergy(0.0), theMaximalKineticEnergy(-1.0),
    61   theEmissionProbability(0.0), theMomentum(0.0,0.0,0.0,0.0),
    62   theFragmentName(aName),theStage(0)
     54G4VPreCompoundFragment::~G4VPreCompoundFragment()
    6355{}
    64 
    65 
    66 
    67 G4VPreCompoundFragment::~G4VPreCompoundFragment()
    68 {
    69 }
    70 
    71 
    72 const G4VPreCompoundFragment & G4VPreCompoundFragment::
    73 operator= (const G4VPreCompoundFragment & right)
    74 {
    75   if (this != &right) {
    76     theA = right.theA;
    77     theZ = right.theZ;
    78     theRestNucleusA = right.theRestNucleusA;
    79     theRestNucleusZ = right.theRestNucleusZ;
    80     theCoulombBarrier = right.theCoulombBarrier;
    81     theCoulombBarrierPtr = right.theCoulombBarrierPtr;
    82     theMaximalKineticEnergy = right.theMaximalKineticEnergy;
    83     theEmissionProbability = right.theEmissionProbability;
    84     theMomentum = right.theMomentum;
    85     theFragmentName = right.theFragmentName;
    86     theStage = right.theStage;
    87   }
    88   return *this;
    89 }
    90 
    91 G4int G4VPreCompoundFragment::operator==(const G4VPreCompoundFragment & right) const
    92 {
    93   return (this == (G4VPreCompoundFragment *) &right);
    94 }
    95 
    96 G4int G4VPreCompoundFragment::operator!=(const G4VPreCompoundFragment & right) const
    97 {
    98   return (this != (G4VPreCompoundFragment *) &right);
    99 }
    100 
    10156
    10257std::ostream&
     
    10762}
    10863
    109 
    11064std::ostream&
    11165operator << (std::ostream &out, const G4VPreCompoundFragment *theFragment)
     
    11569   
    11670  out
    117     << "PreCompound Model Emitted Fragment: A = "
     71    << "PreCompoundModel Emitted Fragment: A = "
    11872    << std::setprecision(3) << theFragment->theA
    11973    << ", Z = " << std::setprecision(3) << theFragment->theZ;
     
    13084   
    13185    out.setf(old_floatfield,std::ios::floatfield);
    132    
    13386    return out;
    13487}
    135 
    13688
    13789void G4VPreCompoundFragment::
    13890Initialize(const G4Fragment & aFragment)
    13991{
    140   theRestNucleusA = aFragment.GetA() - theA;
    141   theRestNucleusZ = aFragment.GetZ() - theZ;
     92  theRestNucleusA = aFragment.GetA_asInt() - theA;
     93  theRestNucleusZ = aFragment.GetZ_asInt() - theZ;
     94  theRestNucleusA13 = g4pow->Z13(theRestNucleusA);
    14295
    14396  if ((theRestNucleusA < theRestNucleusZ) ||
     
    149102      return;
    150103    }
    151  
    152  
     104   
    153105  // Calculate Coulomb barrier
    154106  theCoulombBarrier = theCoulombBarrierPtr->
    155     GetCoulombBarrier(static_cast<G4int>(theRestNucleusA),static_cast<G4int>(theRestNucleusZ),
     107    GetCoulombBarrier(theRestNucleusA,theRestNucleusZ,
    156108                      aFragment.GetExcitationEnergy());
    157109
     110  // Calculate masses
     111  theRestNucleusMass =
     112    G4NucleiProperties::GetNuclearMass(theRestNucleusA, theRestNucleusZ);
     113  theReducedMass = theRestNucleusMass*theMass/(theRestNucleusMass + theMass);
    158114
    159115  // Compute Binding Energies for fragments
    160116  // (needed to separate a fragment from the nucleus)
     117  theBindingEnergy = theRestNucleusMass + theMass - aFragment.GetGroundStateMass();
    161118 
    162   theBindingEnergy = G4NucleiProperties::GetMassExcess(static_cast<G4int>(theA),static_cast<G4int>(theZ)) +
    163     G4NucleiProperties::GetMassExcess(static_cast<G4int>(theRestNucleusA),static_cast<G4int>(theRestNucleusZ)) -
    164     G4NucleiProperties::GetMassExcess(static_cast<G4int>(aFragment.GetA()),static_cast<G4int>(aFragment.GetZ()));
     119  //theBindingEnergy = G4NucleiProperties::GetMassExcess(static_cast<G4int>(theA),static_cast<G4int>(theZ)) +
     120  //G4NucleiProperties::GetMassExcess(static_cast<G4int>(theRestNucleusA),static_cast<G4int>(theRestNucleusZ)) -
     121  //G4NucleiProperties::GetMassExcess(static_cast<G4int>(aFragment.GetA()),static_cast<G4int>(aFragment.GetZ()));
    165122 
    166123  // Compute Maximal Kinetic Energy which can be carried by fragments after separation
    167124  // This is the true (assimptotic) maximal kinetic energy
    168   G4double m = aFragment.GetMomentum().m();
    169   G4double rm = GetRestNuclearMass();
    170   G4double em = GetNuclearMass();
     125  G4double m  = aFragment.GetMomentum().m();
     126  G4double rm = theRestNucleusMass;
     127  G4double em = theMass;
    171128  theMaximalKineticEnergy = ((m - rm)*(m + rm) + em*em)/(2.0*m) - em;
    172129 
    173  
    174130  return;
    175131}
    176 
    177 
    178 
    179 
Note: See TracChangeset for help on using the changeset viewer.