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

update ti head

Location:
trunk/source/processes/hadronic/models/binary_cascade
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/binary_cascade/History

    r1228 r1340  
    1313     * Please list in reverse chronological order (last date on top)
    1414     ---------------------------------------------------------------
     15
     168 Sep 2010, G.Folger                     had-binary-V09-03-02
     17- Binary{LightIon}Cascade: use integer (A,Z) interface of nucleus
     18- *Field.cc: use integer A,Z from G4V3DNucleus, and for G4FermiMomentum
     19
     2031-Aug-2010, V.Ivanchenko                had-binary-V09-03-01
     21- G4GeneratorPrecompoundInterface - define default deexcitation with
     22                                    G4PreCompoundModel in the constructor
     23                                    of the class
     24
     2528-Aug-2010, V.Ivanchenko                had-binary-V09-03-00
     26- G4GeneratorPrecompoundInterface - minor cleanup as a part of PreCompound
     27                                    model cleanup: use integer Z and A,
     28                                    added pointers to proton and neutron
    1529
    16304-Dec-2009, Gunter Folger                had-binary-V09-02-06
  • trunk/source/processes/hadronic/models/binary_cascade/include/G4GeneratorPrecompoundInterface.hh

    r1196 r1340  
    2424// ********************************************************************
    2525//
    26 
    27 #ifndef G4GeneratorPrecompoundInterface_h
    28 #define G4GeneratorPrecompoundInterface_h 1
    29 
    30 #include "G4Fancy3DNucleus.hh"
    31 #include "G4Nucleon.hh"
    32 #include "G4Nucleus.hh"
    33 #include "G4VIntraNuclearTransportModel.hh"
    34 #include "G4KineticTrackVector.hh"
    35 #include "G4FragmentVector.hh"
    36 #include "G4ReactionProductVector.hh"
    37 #include "G4ReactionProduct.hh"
    38 
     26//
     27// $Id: G4GeneratorPrecompoundInterface.hh,v 1.6 2010/08/31 16:16:51 vnivanch Exp $
     28// GEANT4 tag $Name: had-binary-V09-03-03 $
     29//
     30// -----------------------------------------------------------------------------
     31//      GEANT 4 class header file
     32//
     33//      History: first implementation
     34//      HPW, 10DEC 98, the decay part originally written by Gunter Folger
     35//                in his FTF-test-program.
     36//
     37//
     38// -----------------------------------------------------------------------------
     39//
    3940// Class Description
    4041// Trivial implementation of an intra-nuclear transport. It pworvides coupling
     
    4344// Class Description - End
    4445
     46#ifndef G4GeneratorPrecompoundInterface_h
     47#define G4GeneratorPrecompoundInterface_h 1
     48
     49#include "G4VIntraNuclearTransportModel.hh"
     50#include "G4ReactionProductVector.hh"
     51#include "G4HadProjectile.hh"
     52#include "G4Nucleus.hh"
     53#include "globals.hh"
     54
     55class G4KineticTrackVector;
     56class G4V3DNucleus;
     57class G4ParticleDefinition;
     58
    4559class G4GeneratorPrecompoundInterface : public G4VIntraNuclearTransportModel
    4660{
    4761public:
    48    G4GeneratorPrecompoundInterface();   
    49    ~G4GeneratorPrecompoundInterface(){}
     62
     63  G4GeneratorPrecompoundInterface(G4VPreCompoundModel* p = 0);   
     64  virtual ~G4GeneratorPrecompoundInterface();
     65
     66  virtual G4HadFinalState*
     67  ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus );
     68
     69  virtual G4ReactionProductVector*
     70  Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
     71 
     72  inline void SetCaptureThreshold(G4double);
    5073
    5174private:
    52    G4int operator==(G4GeneratorPrecompoundInterface& right) {return (this == &right);}
    53    G4int operator!=(G4GeneratorPrecompoundInterface& right) {return (this != &right);}
    54      
    55 public:
    56    G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus );
    57    G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
    58    G4double SetCaptureThreshold(G4double);
    5975
    60 private:
    61    G4double CaptureThreshold;   
     76  G4GeneratorPrecompoundInterface(const G4GeneratorPrecompoundInterface& right);
     77  const G4GeneratorPrecompoundInterface& operator=(const G4GeneratorPrecompoundInterface &right);
     78  G4int operator==(G4GeneratorPrecompoundInterface& right) {return (this == &right);}
     79  G4int operator!=(G4GeneratorPrecompoundInterface& right) {return (this != &right);}
     80
     81  G4double CaptureThreshold;
     82  const G4ParticleDefinition* proton;
     83  const G4ParticleDefinition* neutron;
    6284};
     85
     86inline
     87void G4GeneratorPrecompoundInterface::SetCaptureThreshold(G4double value)
     88{
     89  CaptureThreshold=value;
     90}
    6391
    6492#endif // G4GeneratorPrecompoundInterface_h
  • trunk/source/processes/hadronic/models/binary_cascade/include/G4NeutronField.hh

    r819 r1340  
    7777
    7878  G4FermiMomentum theFermi;
    79   G4double theA;
    80   G4double theZ;
     79  G4int theA;
     80  G4int theZ;
    8181  const G4VNuclearDensity * theDensity;
    8282  G4double theR;
  • trunk/source/processes/hadronic/models/binary_cascade/include/G4ProtonField.hh

    r819 r1340  
    7676  }
    7777 
    78   G4double theA;
    79   G4double theZ;
     78  G4int theA;
     79  G4int theZ;
    8080  G4double theBarrier;
    8181  G4double theRadius;
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4AntiProtonField.cc

    r962 r1340  
    8585  G4double antiProtonMass = anAntiProton->GetPDGMass();
    8686
    87   G4double A = theNucleus->GetMassNumber();
    88   G4double Z = theNucleus->GetCharge();
    89   G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     87  G4int A = theNucleus->GetMassNumber();
     88  G4int Z = theNucleus->GetCharge();
     89  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
    9090  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
    9191  G4double reducedMass = antiProtonMass*nucleusMass/(antiProtonMass+nucleusMass);
     
    9999G4double G4AntiProtonField::GetBarrier()
    100100{
    101   G4double A = theNucleus->GetMassNumber();
    102   G4double Z = theNucleus->GetCharge();
     101  G4int A = theNucleus->GetMassNumber();
     102  G4int Z = theNucleus->GetCharge();
    103103  G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
    104104  return -coulombBarrier;
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4BinaryCascade.cc

    r1228 r1340  
    206206    }
    207207
    208     the3DNucleus->Init(aNucleus.GetN(), aNucleus.GetZ());
     208    the3DNucleus->Init(aNucleus.GetA_asInt(), aNucleus.GetZ_asInt());
    209209    thePropagator->Init(the3DNucleus);
    210210    //      GF Leak on kt??? but where to delete?
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4BinaryLightIonReaction.cc

    r1196 r1340  
    5353  if(getenv("BLICDEBUG") ) G4cerr << " ######### Binary Light Ion Reaction number starts ######### "<<eventcounter<<G4endl;
    5454    G4ping debug("debug_G4BinaryLightIonReaction");
    55     G4double a1=aTrack.GetDefinition()->GetBaryonNumber();
    56     G4double z1=aTrack.GetDefinition()->GetPDGCharge();
    57     G4double a2=targetNucleus.GetN();
    58     G4double z2=targetNucleus.GetZ();
     55    G4int a1=aTrack.GetDefinition()->GetBaryonNumber();
     56    G4int z1=G4lrint(aTrack.GetDefinition()->GetPDGCharge());
     57    G4int a2=targetNucleus.GetA_asInt();
     58    G4int z2=targetNucleus.GetZ_asInt();
    5959    debug.push_back(a1);
    6060    debug.push_back(z1);
     
    7070    if(a2<a1)
    7171    {
    72       debug.push_back("swapping....");
    7372      swapped = true;
    74       G4double tmp(0);
     73      G4int tmp(0);
    7574      tmp = a2; a2=a1; a1=tmp;
    7675      tmp = z2; z2=z1; z1=tmp;
    77       G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4lrint(z1),G4lrint(a1));
     76      G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(z1,a1);
    7877      G4LorentzVector it(m1, G4ThreeVector(0,0,0));
    7978      mom = toBreit*it;
    8079    }
    81     debug.push_back("After swap");
    82     debug.push_back(a1);
    83     debug.push_back(z1);
    84     debug.push_back(a2);
    85     debug.push_back(z2);
    86     debug.push_back(mom);
    87     debug.dump();
    8880
    8981    G4ReactionProductVector * result = NULL;
     
    9284
    9385
    94 //    G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4lrint(z1),G4lrint(a1));
     86//    G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(z1,a1);
    9587//    G4cout << "Entering the decision point "
    9688//           << (mom.t()-mom.mag())/a1 << " "
     
    10799      aPreFrag.SetA(a1+a2);
    108100      aPreFrag.SetZ(z1+z2);
    109       aPreFrag.SetNumberOfParticles(G4lrint(a1));
    110       aPreFrag.SetNumberOfCharged(G4lrint(z1));
     101      aPreFrag.SetNumberOfParticles(a1);
     102      aPreFrag.SetNumberOfCharged(z1);
    111103      aPreFrag.SetNumberOfHoles(0);
    112104      G4ThreeVector plop(0.,0., mom.vect().mag());
    113       G4double m2=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(G4lrint(z2),G4lrint(a2));
     105      G4double m2=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(z2,a2);
    114106      m_nucl=m2;
    115107      G4LorentzVector aL(mom.t()+m2, plop);
     
    117109      G4ParticleDefinition * preFragDef;
    118110      preFragDef = G4ParticleTable::GetParticleTable()
    119                       ->FindIon(G4lrint(z1+z2),G4lrint(a1+a2),0,G4lrint(z1+z2)); 
     111                      ->FindIon(z1+z2,a1+a2,0,z1+z2); 
    120112      aPreFrag.SetParticleDefinition(preFragDef);
    121113
     
    225217                       << ", kinetic energy " << aTrack.GetKineticEnergy()
    226218                       << G4endl;
    227               G4cerr << " Target nucleus (A,Z)=(" <<  targetNucleus.GetN()
    228                        << "," << targetNucleus.GetZ() << G4endl;
     219              G4cerr << " Target nucleus (A,Z)=(" <<  targetNucleus.GetA_asInt()
     220                       << "," << targetNucleus.GetZ_asInt() << G4endl;
    229221              G4cerr << " if frequent, please submit above information as bug report"
    230222                      << G4endl << G4endl;
     
    399391        aProRes.SetNumberOfParticles(0);
    400392        aProRes.SetNumberOfCharged(0);
    401         aProRes.SetNumberOfHoles(G4lrint(a1)-resA);
     393        aProRes.SetNumberOfHoles(a1-resA);
    402394        G4double mFragment=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(resZ,resA);
    403395        G4LorentzVector pFragment(0,0,0,mFragment+std::max(0.,theStatisticalExEnergy) );
     
    420412                    << ", kinetic energy " << aTrack.GetKineticEnergy()
    421413                    << G4endl;
    422            G4cerr << " Target nucleus (A,Z)=(" <<  targetNucleus.GetN()
    423                     << "," << targetNucleus.GetZ() << G4endl;
     414           G4cerr << " Target nucleus (A,Z)=(" <<  targetNucleus.GetA_asInt()
     415                    << "," << targetNucleus.GetZ_asInt() << G4endl;
    424416           G4cerr << " if frequent, please submit above information as bug report"
    425417                   << G4endl << G4endl;
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4GeneratorPrecompoundInterface.cc

    r1196 r1340  
    2424// ********************************************************************
    2525//
     26// $Id: G4GeneratorPrecompoundInterface.cc,v 1.10 2010/08/31 16:16:51 vnivanch Exp $
     27// GEANT4 tag $Name: had-binary-V09-03-03 $
     28//
     29// -----------------------------------------------------------------------------
     30//      GEANT 4 class file
     31//
     32//      History: first implementation
     33//      HPW, 10DEC 98, the decay part originally written by Gunter Folger
     34//                in his FTF-test-program.
     35//
     36//
     37// -----------------------------------------------------------------------------
     38
    2639#include "G4GeneratorPrecompoundInterface.hh"
    2740#include "G4DynamicParticleVector.hh"
    28 #include "G4IonTable.hh"
     41#include "G4KineticTrackVector.hh"
     42#include "G4Proton.hh"
     43#include "G4Neutron.hh"
     44#include "G4V3DNucleus.hh"
     45#include "G4Nucleon.hh"
     46#include "G4FragmentVector.hh"
     47#include "G4ReactionProduct.hh"
     48#include "G4PreCompoundModel.hh"
     49#include "G4ExcitationHandler.hh"
    2950
    30 //
    31 // HPW, 10DEC 98, the decay part originally written by Gunter Folger in his FTF-test-program.
    32 //
    33    
    34     G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface()
    35     : CaptureThreshold(80*MeV)
    36     {}
    37      
    38    G4HadFinalState* G4GeneratorPrecompoundInterface::
    39    ApplyYourself(const G4HadProjectile &, G4Nucleus & )
    40    {
    41      std::cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."<< G4endl;
    42      std::cout << "This class is only a mediator between generator and precompound"<<G4endl;
    43      std::cout << "Please remove from your physics list."<<G4endl;
    44      throw G4HadronicException(__FILE__, __LINE__, "SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
    45      return new G4HadFinalState;
    46    }
    47    
    48    G4ReactionProductVector* G4GeneratorPrecompoundInterface::
    49    Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
    50    {
    51      G4ReactionProductVector * theTotalResult = new G4ReactionProductVector;
     51G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface(G4VPreCompoundModel* p)
     52  : CaptureThreshold(80*MeV)
     53{
     54  proton = G4Proton::Proton();
     55  neutron = G4Neutron::Neutron();
     56  if(p) { SetDeExcitation(p); }
     57  else  { SetDeExcitation(new G4PreCompoundModel(new G4ExcitationHandler())); }
     58}
     59         
     60G4GeneratorPrecompoundInterface::~G4GeneratorPrecompoundInterface()
     61{}
     62         
     63G4ReactionProductVector* G4GeneratorPrecompoundInterface::
     64Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus)
     65{
     66  G4ReactionProductVector * theTotalResult = new G4ReactionProductVector;
    5267
    53      // decay the strong resonances
    54      G4KineticTrackVector *result1, *secondaries, *result;
    55      result1=theSecondaries;
    56      result=new G4KineticTrackVector();
    57 
    58      for (unsigned int aResult=0; aResult < result1->size(); aResult++)
    59      {
    60        G4ParticleDefinition * pdef;
    61        pdef=result1->operator[](aResult)->GetDefinition();
    62        secondaries=NULL;
    63        if ( pdef->IsShortLived() )
    64        {
     68  // decay the strong resonances
     69  G4KineticTrackVector *result1, *secondaries, *result;
     70  result1=theSecondaries;
     71  result=new G4KineticTrackVector();
     72  //G4cout << "### G4GeneratorPrecompoundInterface::Propagate "
     73  //     << result1->size() << " tracks " << theDeExcitation << G4endl;
     74  for (unsigned int aResult=0; aResult < result1->size(); ++aResult)
     75    {
     76      G4ParticleDefinition * pdef;
     77      pdef=result1->operator[](aResult)->GetDefinition();
     78      secondaries=0;
     79      if ( pdef->IsShortLived() )
     80        {
    6581          secondaries = result1->operator[](aResult)->Decay();
    66        }
    67        if ( secondaries == NULL )
    68        {
     82        }
     83      if ( 0 == secondaries )
     84        {
    6985          result->push_back(result1->operator[](aResult));
    7086          result1->operator[](aResult)=NULL;    //protect for clearAndDestroy
    71        }
    72        else
    73        {
    74          for (unsigned int aSecondary=0; aSecondary<secondaries->size(); aSecondary++)
     87        }
     88      else
     89        {
     90          unsigned int amax = secondaries->size();
     91          for (unsigned int aSecondary=0; aSecondary<amax; ++aSecondary)
     92            {
     93              result1->push_back(secondaries->operator[](aSecondary));
     94            }
     95          delete secondaries;
     96        }
     97    }
     98  //G4cout << "Delete tracks" << G4endl;
     99  std::for_each(result1->begin(), result1->end(), DeleteKineticTrack());
     100  delete result1;
     101     
     102  // prepare the fragment
     103  G4int anA=theNucleus->GetMassNumber();
     104  G4int aZ=theNucleus->GetCharge();
     105  G4int numberOfEx = 0;
     106  G4int numberOfCh = 0;
     107  G4int numberOfHoles = 0;
     108  G4double exEnergy = 0.0;
     109  G4double R = theNucleus->GetNuclearRadius();
     110  G4ThreeVector exciton3Momentum(0.,0.,0.);
     111
     112  // loop over secondaries
     113  unsigned int amax = result->size();
     114  for(unsigned int list=0; list<amax; ++list)
     115    {
     116      G4KineticTrack *aTrack = result->operator[](list);
     117      G4ParticleDefinition* part = aTrack->GetDefinition();
     118      G4double e = aTrack->Get4Momentum().e();
     119      G4double mass = aTrack->Get4Momentum().mag();
     120      G4ThreeVector mom = aTrack->Get4Momentum().vect();
     121      if((part != proton && part != neutron) ||
     122         (e > mass + CaptureThreshold) ||
     123         (aTrack->GetPosition().mag() > R))
     124        {
     125          G4ReactionProduct * theNew = new G4ReactionProduct(part);
     126          theNew->SetMomentum(mom);
     127          theNew->SetTotalEnergy(e);
     128          theTotalResult->push_back(theNew);           
     129        }
     130      else
     131        {
     132          // within the nucleus, neutron or proton
     133          // now calculate  A, Z of the fragment, momentum, number of exciton states
     134          ++anA;
     135          ++numberOfEx;
     136          G4int Z = G4int(part->GetPDGCharge()/eplus + 0.1);
     137          aZ += Z;
     138          numberOfCh += Z;
     139          exciton3Momentum += mom;
     140          exEnergy += (e - mass);
     141        }
     142    }
     143     
     144  // loop over wounded nucleus
     145  G4Nucleon * theCurrentNucleon =
     146    theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : 0;
     147  while(0 != theCurrentNucleon)
     148    {
     149      if(theCurrentNucleon->AreYouHit())
     150        {
     151          ++numberOfHoles;
     152          ++numberOfEx;
     153          --anA;
     154          aZ -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge()/eplus + 0.1);
     155          exciton3Momentum -= theCurrentNucleon->Get4Momentum().vect();
     156          exEnergy += theCurrentNucleon->GetBindingEnergy();
     157        }
     158      theCurrentNucleon = theNucleus->GetNextNucleon();
     159    }   
     160 
     161  if(0!=anA && 0!=aZ)
     162    {
     163      G4double fMass =  G4NucleiProperties::GetNuclearMass(anA, aZ);
     164      fMass += exEnergy;
     165
     166      G4LorentzVector exciton4Momentum(exciton3Momentum,
     167                                       std::sqrt(exciton3Momentum.mag2() + fMass*fMass));
     168   
     169      G4Fragment anInitialState(anA, aZ, exciton4Momentum);
     170      anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
     171      anInitialState.SetNumberOfCharged(numberOfCh);
     172      anInitialState.SetNumberOfHoles(numberOfHoles);
     173      G4ReactionProductVector * aPreResult = theDeExcitation->DeExcite(anInitialState);
     174
     175      // fill pre-compound part into the result, and return
     176      unsigned int amax = aPreResult->size();
     177       for(unsigned int ll=0; ll<amax; ++ll)
    75178         {
    76              result1->push_back(secondaries->operator[](aSecondary));
     179           theTotalResult->push_back(aPreResult->operator[](ll));
    77180         }
    78          delete secondaries;
    79        }
    80      }
    81      std::for_each(result1->begin(), result1->end(), DeleteKineticTrack());
    82      delete result1;
     181       delete aPreResult;
     182    }
    83183     
    84      
    85      
    86      // prepare the fragment
    87      G4Fragment anInitialState;
    88      G4int anA=theNucleus->GetMassNumber();
    89      G4int aZ=theNucleus->GetCharge();
    90      G4int numberOfEx = 0;
    91      G4int numberOfCh = 0;
    92      G4int numberOfHoles = 0;
    93      G4double exEnergy = 0;
    94      G4ThreeVector exciton3Momentum(0,0,0);
    95      // loop over secondaries
    96      for(unsigned int list=0; list < result->size(); list++)
    97      {
    98        G4KineticTrack *aTrack = result->operator[](list);
    99        if(aTrack->GetDefinition() != G4Proton::Proton() &&
    100           aTrack->GetDefinition() != G4Neutron::Neutron())
    101        {
    102          G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
    103          theNew->SetMomentum(aTrack->Get4Momentum().vect());
    104          theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
    105          theTotalResult->push_back(theNew);           
    106        }
    107        else if(aTrack->Get4Momentum().t() - aTrack->Get4Momentum().mag()>CaptureThreshold)
    108        {
    109          G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
    110          theNew->SetMomentum(aTrack->Get4Momentum().vect());
    111          theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
    112          theTotalResult->push_back(theNew);           
    113        }
    114        else if(aTrack->GetPosition().mag() > theNucleus->GetNuclearRadius())
    115        {
    116          G4ReactionProduct * theNew = new G4ReactionProduct(aTrack->GetDefinition());
    117          theNew->SetMomentum(aTrack->Get4Momentum().vect());
    118          theNew->SetTotalEnergy(aTrack->Get4Momentum().e());
    119          theTotalResult->push_back(theNew);           
    120        }
    121        else
    122        {
    123          // within the nucleus, neutron or proton
    124          // now calculate  A, Z of the fragment, momentum, number of exciton states
    125          anA++;;
    126          numberOfEx++;
    127          aZ += G4int(aTrack->GetDefinition()->GetPDGCharge());
    128          numberOfCh += G4int(aTrack->GetDefinition()->GetPDGCharge());
    129          exciton3Momentum += aTrack->Get4Momentum().vect();
    130          exEnergy += (aTrack->Get4Momentum().t()-aTrack->Get4Momentum().m());
    131        }
    132      }
    133      
    134      // loop over wounded nucleus
    135      G4Nucleon * theCurrentNucleon = theNucleus->StartLoop() ? theNucleus->GetNextNucleon() : NULL;
    136      while(theCurrentNucleon != NULL)
    137      {
    138        if(theCurrentNucleon->AreYouHit())
    139        {
    140          numberOfHoles++;
    141          numberOfEx++;
    142          anA--;
    143          aZ -= G4int(theCurrentNucleon->GetDefinition()->GetPDGCharge());
    144          exciton3Momentum -= theCurrentNucleon->Get4Momentum().vect();
    145          exEnergy+=theCurrentNucleon->GetBindingEnergy();
    146        }
    147        theCurrentNucleon = theNucleus->GetNextNucleon();
    148      }   
    149  
    150      if(!theDeExcitation)
    151      {
    152        // throw G4HadronicException(__FILE__, __LINE__, "Please register an evaporation phase with G4GeneratorPrecompoundInterface.");
    153      }
    154      else if(0!=anA && 0!=aZ)
    155      {
    156        G4double residualMass = 
    157                 G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(aZ ,anA);
    158          residualMass += exEnergy;
    159 
    160        G4LorentzVector exciton4Momentum(exciton3Momentum,
    161                                         std::sqrt(exciton3Momentum.mag2()+residualMass*residualMass));
    162    
    163        anInitialState.SetA(anA);
    164        anInitialState.SetZ(aZ);
    165        anInitialState.SetNumberOfParticles(numberOfEx-numberOfHoles);
    166        anInitialState.SetNumberOfCharged(numberOfCh);
    167        anInitialState.SetNumberOfHoles(numberOfHoles);
    168        anInitialState.SetMomentum(exciton4Momentum);
    169 //      anInitialState.SetExcitationEnergy(exEnergy); // now a redundant call.
    170 
    171      // call pre-compound
    172        const G4Fragment aFragment(anInitialState);
    173        G4ReactionProductVector * aPreResult = theDeExcitation->DeExcite(aFragment);
    174 
    175        // fill pre-compound part into the result, and return
    176        for(unsigned int ll=0; ll<aPreResult->size(); ll++)
    177        {
    178          theTotalResult->push_back(aPreResult->operator[](ll));
    179        }
    180        delete aPreResult;
    181      }
    182      else
    183      {
    184        // throw G4HadronicException(__FILE__, __LINE__, "Please register an evaporation phase with G4GeneratorPrecompoundInterface.");
    185      }
    186      // now return
    187      
    188      std::for_each(result->begin(), result->end(), DeleteKineticTrack());
    189      delete result;
    190      return theTotalResult;
    191    }
     184  std::for_each(result->begin(), result->end(), DeleteKineticTrack());
     185  delete result;
     186  return theTotalResult;
     187}
    192188 
    193 G4double G4GeneratorPrecompoundInterface::SetCaptureThreshold(G4double value)
     189G4HadFinalState* G4GeneratorPrecompoundInterface::
     190ApplyYourself(const G4HadProjectile &, G4Nucleus & )
    194191{
    195     G4double old=CaptureThreshold;
    196     CaptureThreshold=value;
    197     return old;
    198 
     192  G4cout << "G4GeneratorPrecompoundInterface: ApplyYourself interface called stand-allone."
     193         << G4endl;
     194  G4cout << "This class is only a mediator between generator and precompound"<<G4endl;
     195  G4cout << "Please remove from your physics list."<<G4endl;
     196  throw G4HadronicException(__FILE__, __LINE__, "SEVERE: G4GeneratorPrecompoundInterface model interface called stand-allone.");
     197  return new G4HadFinalState;
    199198}
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4KaonMinusField.cc

    r962 r1340  
    8383  G4double kaonMass = G4KaonMinus::KaonMinus()->GetPDGMass();
    8484
    85   G4double A = theNucleus->GetMassNumber();
    86   G4double Z = theNucleus->GetCharge();
    87   G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     85  G4int A = theNucleus->GetMassNumber();
     86  G4int Z = theNucleus->GetCharge();
     87  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
    8888  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
    8989  G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
     
    9797G4double G4KaonMinusField::GetBarrier()
    9898{
    99   G4double A = theNucleus->GetMassNumber();
    100   G4double Z = theNucleus->GetCharge();
     99  G4int A = theNucleus->GetMassNumber();
     100  G4int Z = theNucleus->GetCharge();
    101101  G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
    102102  return -coulombBarrier;
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4KaonPlusField.cc

    r962 r1340  
    8383  G4double kaonMass = G4KaonPlus::KaonPlus()->GetPDGMass();
    8484
    85   G4double A = theNucleus->GetMassNumber();
    86   G4double Z = theNucleus->GetCharge();
    87   G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     85  G4int A = theNucleus->GetMassNumber();
     86  G4int Z = theNucleus->GetCharge();
     87  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
    8888  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
    8989  G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
     
    9696G4double G4KaonPlusField::GetBarrier()
    9797{
    98   G4double A = theNucleus->GetMassNumber();
    99   G4double Z = theNucleus->GetCharge();
     98  G4int A = theNucleus->GetMassNumber();
     99  G4int Z = theNucleus->GetCharge();
    100100  G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
    101101  return coulombBarrier;
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4KaonZeroField.cc

    r962 r1340  
    8383  G4double kaonMass = G4KaonZero::KaonZero()->GetPDGMass();
    8484
    85   G4double A = theNucleus->GetMassNumber();
    86   G4double Z = theNucleus->GetCharge();
    87   G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     85  G4int A = theNucleus->GetMassNumber();
     86  G4int Z = theNucleus->GetCharge();
     87  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
    8888  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
    8989  G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass);
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4PionMinusField.cc

    r962 r1340  
    8080  if(aPosition.mag() >= radius) return 0.0;
    8181
    82   G4double A = theNucleus->GetMassNumber();
    83   G4double Z = theNucleus->GetCharge();
     82  G4int A = theNucleus->GetMassNumber();
     83  G4int Z = theNucleus->GetCharge();
    8484  G4double pionMinusMass = G4PionMinus::PionMinus()->GetPDGMass();
    8585  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     
    9696G4double G4PionMinusField::GetBarrier()
    9797{
    98   G4double A = theNucleus->GetMassNumber();
    99   G4double Z = theNucleus->GetCharge();
     98  G4int A = theNucleus->GetMassNumber();
     99  G4int Z = theNucleus->GetCharge();
    100100  G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
    101101  return -coulombBarrier;
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4PionPlusField.cc

    r962 r1340  
    8383  G4double pionPlusMass = G4PionPlus::PionPlus()->GetPDGMass();
    8484
    85   G4double A = theNucleus->GetMassNumber();
    86   G4double Z = theNucleus->GetCharge();
    87   G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     85  G4int A = theNucleus->GetMassNumber();
     86  G4int Z = theNucleus->GetCharge();
     87  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
    8888  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
    8989  G4double reducedMass = pionPlusMass*nucleusMass/(pionPlusMass+nucleusMass);
     
    9898G4double G4PionPlusField::GetBarrier()
    9999{
    100   G4double A = theNucleus->GetMassNumber();
    101   G4double Z = theNucleus->GetCharge();
     100  G4int A = theNucleus->GetMassNumber();
     101  G4int Z = theNucleus->GetCharge();
    102102  G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.));
    103103  return coulombBarrier;
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4PionZeroField.cc

    r962 r1340  
    8282
    8383  G4double pionZeroMass = G4PionZero::PionZero()->GetPDGMass();
    84   G4double A = theNucleus->GetMassNumber();
    85   G4double Z = theNucleus->GetCharge();
     84  G4int A = theNucleus->GetMassNumber();
     85  G4int Z = theNucleus->GetCharge();
    8686
    87   G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     87  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
    8888  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
    8989  G4double reducedMass = pionZeroMass*nucleusMass/(pionZeroMass+nucleusMass);
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4SigmaMinusField.cc

    r962 r1340  
    8282  G4double sigmaMinusMass = G4SigmaMinus::SigmaMinus()->GetPDGMass();
    8383
    84   G4double A = theNucleus->GetMassNumber();
    85   G4double Z = theNucleus->GetCharge();
    86   G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     84  G4int A = theNucleus->GetMassNumber();
     85  G4int Z = theNucleus->GetCharge();
     86  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
    8787  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
    8888  G4double reducedMass = sigmaMinusMass*nucleusMass/(sigmaMinusMass+nucleusMass);
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4SigmaPlusField.cc

    r962 r1340  
    8383  G4double sigmaPlusMass = G4SigmaPlus::SigmaPlus()->GetPDGMass();
    8484
    85   G4double A = theNucleus->GetMassNumber();
    86   G4double Z = theNucleus->GetCharge();
    87   G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     85  G4int A = theNucleus->GetMassNumber();
     86  G4int Z = theNucleus->GetCharge();
     87  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
    8888  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
    8989  G4double reducedMass = sigmaPlusMass*nucleusMass/(sigmaPlusMass+nucleusMass);
  • trunk/source/processes/hadronic/models/binary_cascade/src/G4SigmaZeroField.cc

    r962 r1340  
    8383  G4double sigmaZeroMass = G4SigmaZero::SigmaZero()->GetPDGMass();
    8484
    85   G4double A = theNucleus->GetMassNumber();
    86   G4double Z = theNucleus->GetCharge();
    87   G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z));
     85  G4int A = theNucleus->GetMassNumber();
     86  G4int Z = theNucleus->GetCharge();
     87  G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z);
    8888  G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy;
    8989  G4double reducedMass = sigmaZeroMass*nucleusMass/(sigmaZeroMass+nucleusMass);
Note: See TracChangeset for help on using the changeset viewer.