Changeset 1340 for trunk/source/processes/hadronic/models/binary_cascade
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- 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 13 13 * Please list in reverse chronological order (last date on top) 14 14 --------------------------------------------------------------- 15 16 8 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 20 31-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 25 28-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 15 29 16 30 4-Dec-2009, Gunter Folger had-binary-V09-02-06 -
trunk/source/processes/hadronic/models/binary_cascade/include/G4GeneratorPrecompoundInterface.hh
r1196 r1340 24 24 // ******************************************************************** 25 25 // 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 // 39 40 // Class Description 40 41 // Trivial implementation of an intra-nuclear transport. It pworvides coupling … … 43 44 // Class Description - End 44 45 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 55 class G4KineticTrackVector; 56 class G4V3DNucleus; 57 class G4ParticleDefinition; 58 45 59 class G4GeneratorPrecompoundInterface : public G4VIntraNuclearTransportModel 46 60 { 47 61 public: 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); 50 73 51 74 private: 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);59 75 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; 62 84 }; 85 86 inline 87 void G4GeneratorPrecompoundInterface::SetCaptureThreshold(G4double value) 88 { 89 CaptureThreshold=value; 90 } 63 91 64 92 #endif // G4GeneratorPrecompoundInterface_h -
trunk/source/processes/hadronic/models/binary_cascade/include/G4NeutronField.hh
r819 r1340 77 77 78 78 G4FermiMomentum theFermi; 79 G4 doubletheA;80 G4 doubletheZ;79 G4int theA; 80 G4int theZ; 81 81 const G4VNuclearDensity * theDensity; 82 82 G4double theR; -
trunk/source/processes/hadronic/models/binary_cascade/include/G4ProtonField.hh
r819 r1340 76 76 } 77 77 78 G4 doubletheA;79 G4 doubletheZ;78 G4int theA; 79 G4int theZ; 80 80 G4double theBarrier; 81 81 G4double theRadius; -
trunk/source/processes/hadronic/models/binary_cascade/src/G4AntiProtonField.cc
r962 r1340 85 85 G4double antiProtonMass = anAntiProton->GetPDGMass(); 86 86 87 G4 doubleA = theNucleus->GetMassNumber();88 G4 doubleZ = 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); 90 90 G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy; 91 91 G4double reducedMass = antiProtonMass*nucleusMass/(antiProtonMass+nucleusMass); … … 99 99 G4double G4AntiProtonField::GetBarrier() 100 100 { 101 G4 doubleA = theNucleus->GetMassNumber();102 G4 doubleZ = theNucleus->GetCharge();101 G4int A = theNucleus->GetMassNumber(); 102 G4int Z = theNucleus->GetCharge(); 103 103 G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.)); 104 104 return -coulombBarrier; -
trunk/source/processes/hadronic/models/binary_cascade/src/G4BinaryCascade.cc
r1228 r1340 206 206 } 207 207 208 the3DNucleus->Init(aNucleus.Get N(), aNucleus.GetZ());208 the3DNucleus->Init(aNucleus.GetA_asInt(), aNucleus.GetZ_asInt()); 209 209 thePropagator->Init(the3DNucleus); 210 210 // GF Leak on kt??? but where to delete? -
trunk/source/processes/hadronic/models/binary_cascade/src/G4BinaryLightIonReaction.cc
r1196 r1340 53 53 if(getenv("BLICDEBUG") ) G4cerr << " ######### Binary Light Ion Reaction number starts ######### "<<eventcounter<<G4endl; 54 54 G4ping debug("debug_G4BinaryLightIonReaction"); 55 G4 doublea1=aTrack.GetDefinition()->GetBaryonNumber();56 G4 double z1=aTrack.GetDefinition()->GetPDGCharge();57 G4 double a2=targetNucleus.GetN();58 G4 double 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(); 59 59 debug.push_back(a1); 60 60 debug.push_back(z1); … … 70 70 if(a2<a1) 71 71 { 72 debug.push_back("swapping....");73 72 swapped = true; 74 G4 doubletmp(0);73 G4int tmp(0); 75 74 tmp = a2; a2=a1; a1=tmp; 76 75 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); 78 77 G4LorentzVector it(m1, G4ThreeVector(0,0,0)); 79 78 mom = toBreit*it; 80 79 } 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();88 80 89 81 G4ReactionProductVector * result = NULL; … … 92 84 93 85 94 // G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( G4lrint(z1),G4lrint(a1));86 // G4double m1=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(z1,a1); 95 87 // G4cout << "Entering the decision point " 96 88 // << (mom.t()-mom.mag())/a1 << " " … … 107 99 aPreFrag.SetA(a1+a2); 108 100 aPreFrag.SetZ(z1+z2); 109 aPreFrag.SetNumberOfParticles( G4lrint(a1));110 aPreFrag.SetNumberOfCharged( G4lrint(z1));101 aPreFrag.SetNumberOfParticles(a1); 102 aPreFrag.SetNumberOfCharged(z1); 111 103 aPreFrag.SetNumberOfHoles(0); 112 104 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); 114 106 m_nucl=m2; 115 107 G4LorentzVector aL(mom.t()+m2, plop); … … 117 109 G4ParticleDefinition * preFragDef; 118 110 preFragDef = G4ParticleTable::GetParticleTable() 119 ->FindIon( G4lrint(z1+z2),G4lrint(a1+a2),0,G4lrint(z1+z2));111 ->FindIon(z1+z2,a1+a2,0,z1+z2); 120 112 aPreFrag.SetParticleDefinition(preFragDef); 121 113 … … 225 217 << ", kinetic energy " << aTrack.GetKineticEnergy() 226 218 << G4endl; 227 G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.Get N()228 << "," << targetNucleus.GetZ () << G4endl;219 G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.GetA_asInt() 220 << "," << targetNucleus.GetZ_asInt() << G4endl; 229 221 G4cerr << " if frequent, please submit above information as bug report" 230 222 << G4endl << G4endl; … … 399 391 aProRes.SetNumberOfParticles(0); 400 392 aProRes.SetNumberOfCharged(0); 401 aProRes.SetNumberOfHoles( G4lrint(a1)-resA);393 aProRes.SetNumberOfHoles(a1-resA); 402 394 G4double mFragment=G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(resZ,resA); 403 395 G4LorentzVector pFragment(0,0,0,mFragment+std::max(0.,theStatisticalExEnergy) ); … … 420 412 << ", kinetic energy " << aTrack.GetKineticEnergy() 421 413 << G4endl; 422 G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.Get N()423 << "," << targetNucleus.GetZ () << G4endl;414 G4cerr << " Target nucleus (A,Z)=(" << targetNucleus.GetA_asInt() 415 << "," << targetNucleus.GetZ_asInt() << G4endl; 424 416 G4cerr << " if frequent, please submit above information as bug report" 425 417 << G4endl << G4endl; -
trunk/source/processes/hadronic/models/binary_cascade/src/G4GeneratorPrecompoundInterface.cc
r1196 r1340 24 24 // ******************************************************************** 25 25 // 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 26 39 #include "G4GeneratorPrecompoundInterface.hh" 27 40 #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" 29 50 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; 51 G4GeneratorPrecompoundInterface::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 60 G4GeneratorPrecompoundInterface::~G4GeneratorPrecompoundInterface() 61 {} 62 63 G4ReactionProductVector* G4GeneratorPrecompoundInterface:: 64 Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus) 65 { 66 G4ReactionProductVector * theTotalResult = new G4ReactionProductVector; 52 67 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 { 65 81 secondaries = result1->operator[](aResult)->Decay(); 66 67 if ( secondaries == NULL)68 82 } 83 if ( 0 == secondaries ) 84 { 69 85 result->push_back(result1->operator[](aResult)); 70 86 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) 75 178 { 76 result1->push_back(secondaries->operator[](aSecondary));179 theTotalResult->push_back(aPreResult->operator[](ll)); 77 180 } 78 delete secondaries; 79 } 80 } 81 std::for_each(result1->begin(), result1->end(), DeleteKineticTrack()); 82 delete result1; 181 delete aPreResult; 182 } 83 183 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 } 192 188 193 G4double G4GeneratorPrecompoundInterface::SetCaptureThreshold(G4double value) 189 G4HadFinalState* G4GeneratorPrecompoundInterface:: 190 ApplyYourself(const G4HadProjectile &, G4Nucleus & ) 194 191 { 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; 199 198 } -
trunk/source/processes/hadronic/models/binary_cascade/src/G4KaonMinusField.cc
r962 r1340 83 83 G4double kaonMass = G4KaonMinus::KaonMinus()->GetPDGMass(); 84 84 85 G4 doubleA = theNucleus->GetMassNumber();86 G4 doubleZ = 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); 88 88 G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy; 89 89 G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass); … … 97 97 G4double G4KaonMinusField::GetBarrier() 98 98 { 99 G4 doubleA = theNucleus->GetMassNumber();100 G4 doubleZ = theNucleus->GetCharge();99 G4int A = theNucleus->GetMassNumber(); 100 G4int Z = theNucleus->GetCharge(); 101 101 G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.)); 102 102 return -coulombBarrier; -
trunk/source/processes/hadronic/models/binary_cascade/src/G4KaonPlusField.cc
r962 r1340 83 83 G4double kaonMass = G4KaonPlus::KaonPlus()->GetPDGMass(); 84 84 85 G4 doubleA = theNucleus->GetMassNumber();86 G4 doubleZ = 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); 88 88 G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy; 89 89 G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass); … … 96 96 G4double G4KaonPlusField::GetBarrier() 97 97 { 98 G4 doubleA = theNucleus->GetMassNumber();99 G4 doubleZ = theNucleus->GetCharge();98 G4int A = theNucleus->GetMassNumber(); 99 G4int Z = theNucleus->GetCharge(); 100 100 G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.)); 101 101 return coulombBarrier; -
trunk/source/processes/hadronic/models/binary_cascade/src/G4KaonZeroField.cc
r962 r1340 83 83 G4double kaonMass = G4KaonZero::KaonZero()->GetPDGMass(); 84 84 85 G4 doubleA = theNucleus->GetMassNumber();86 G4 doubleZ = 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); 88 88 G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy; 89 89 G4double reducedMass = kaonMass*nucleusMass/(kaonMass+nucleusMass); -
trunk/source/processes/hadronic/models/binary_cascade/src/G4PionMinusField.cc
r962 r1340 80 80 if(aPosition.mag() >= radius) return 0.0; 81 81 82 G4 doubleA = theNucleus->GetMassNumber();83 G4 doubleZ = theNucleus->GetCharge();82 G4int A = theNucleus->GetMassNumber(); 83 G4int Z = theNucleus->GetCharge(); 84 84 G4double pionMinusMass = G4PionMinus::PionMinus()->GetPDGMass(); 85 85 G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(G4lrint(A), G4lrint(Z)); … … 96 96 G4double G4PionMinusField::GetBarrier() 97 97 { 98 G4 doubleA = theNucleus->GetMassNumber();99 G4 doubleZ = theNucleus->GetCharge();98 G4int A = theNucleus->GetMassNumber(); 99 G4int Z = theNucleus->GetCharge(); 100 100 G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.)); 101 101 return -coulombBarrier; -
trunk/source/processes/hadronic/models/binary_cascade/src/G4PionPlusField.cc
r962 r1340 83 83 G4double pionPlusMass = G4PionPlus::PionPlus()->GetPDGMass(); 84 84 85 G4 doubleA = theNucleus->GetMassNumber();86 G4 doubleZ = 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); 88 88 G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy; 89 89 G4double reducedMass = pionPlusMass*nucleusMass/(pionPlusMass+nucleusMass); … … 98 98 G4double G4PionPlusField::GetBarrier() 99 99 { 100 G4 doubleA = theNucleus->GetMassNumber();101 G4 doubleZ = theNucleus->GetCharge();100 G4int A = theNucleus->GetMassNumber(); 101 G4int Z = theNucleus->GetCharge(); 102 102 G4double coulombBarrier = (1.44/1.14) * MeV * Z / (1.0 + std::pow(A,1./3.)); 103 103 return coulombBarrier; -
trunk/source/processes/hadronic/models/binary_cascade/src/G4PionZeroField.cc
r962 r1340 82 82 83 83 G4double pionZeroMass = G4PionZero::PionZero()->GetPDGMass(); 84 G4 doubleA = theNucleus->GetMassNumber();85 G4 doubleZ = theNucleus->GetCharge();84 G4int A = theNucleus->GetMassNumber(); 85 G4int Z = theNucleus->GetCharge(); 86 86 87 G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy( G4lrint(A), G4lrint(Z));87 G4double bindingEnergy = G4NucleiProperties::GetBindingEnergy(A, Z); 88 88 G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy; 89 89 G4double reducedMass = pionZeroMass*nucleusMass/(pionZeroMass+nucleusMass); -
trunk/source/processes/hadronic/models/binary_cascade/src/G4SigmaMinusField.cc
r962 r1340 82 82 G4double sigmaMinusMass = G4SigmaMinus::SigmaMinus()->GetPDGMass(); 83 83 84 G4 doubleA = theNucleus->GetMassNumber();85 G4 doubleZ = 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); 87 87 G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy; 88 88 G4double reducedMass = sigmaMinusMass*nucleusMass/(sigmaMinusMass+nucleusMass); -
trunk/source/processes/hadronic/models/binary_cascade/src/G4SigmaPlusField.cc
r962 r1340 83 83 G4double sigmaPlusMass = G4SigmaPlus::SigmaPlus()->GetPDGMass(); 84 84 85 G4 doubleA = theNucleus->GetMassNumber();86 G4 doubleZ = 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); 88 88 G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy; 89 89 G4double reducedMass = sigmaPlusMass*nucleusMass/(sigmaPlusMass+nucleusMass); -
trunk/source/processes/hadronic/models/binary_cascade/src/G4SigmaZeroField.cc
r962 r1340 83 83 G4double sigmaZeroMass = G4SigmaZero::SigmaZero()->GetPDGMass(); 84 84 85 G4 doubleA = theNucleus->GetMassNumber();86 G4 doubleZ = 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); 88 88 G4double nucleusMass = Z*proton_mass_c2+(A-Z)*neutron_mass_c2+bindingEnergy; 89 89 G4double reducedMass = sigmaZeroMass*nucleusMass/(sigmaZeroMass+nucleusMass);
Note: See TracChangeset
for help on using the changeset viewer.