#include <G4QNGamma.hh>
Inheritance diagram for G4QNGamma:
Public Member Functions | |
G4QNGamma (const G4String &processName="CHIPS_N-Gamma") | |
~G4QNGamma () | |
G4bool | IsApplicable (const G4ParticleDefinition &particle) |
G4double | GetMeanFreePath (const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition) |
G4VParticleChange * | PostStepDoIt (const G4Track &aTrack, const G4Step &aStep) |
void | SetPhysicsTableBining (G4double, G4double, G4int) |
void | BuildPhysicsTable (const G4ParticleDefinition &) |
void | PrintInfoDefinition () |
G4LorentzVector | GetEnegryMomentumConservation () |
G4int | GetNumberOfNeutronsInTarget () |
Definition at line 66 of file G4QNGamma.hh.
G4QNGamma::G4QNGamma | ( | const G4String & | processName = "CHIPS_N-Gamma" |
) |
Definition at line 53 of file G4QNGamma.cc.
References G4cout, G4endl, G4HadronicDeprecate, G4VProcess::GetProcessName(), and G4VProcess::verboseLevel.
00054 : G4VDiscreteProcess(processName, fHadronic) 00055 { 00056 G4HadronicDeprecate("G4QNGamma"); 00057 00058 EnMomConservation = G4LorentzVector(0.,0.,0.,0.); 00059 nOfNeutrons = 0; 00060 #ifdef debug 00061 G4cout<<"G4QNGamma::Constructor is called"<<G4endl; 00062 #endif 00063 if (verboseLevel>0) G4cout << GetProcessName() << " process is created "<< G4endl; 00064 }
G4QNGamma::~G4QNGamma | ( | ) |
Definition at line 67 of file G4QNGamma.cc.
00068 { 00069 // The following is just a copy of what is done in PostStepDoIt every interaction ! 00070 // The correction is if(IPIE), so just for(...;ip<IPIE;...) does not work ! @@ 00071 G4int IPIE=IsoProbInEl.size(); // How many old elements? 00072 if(IPIE) for(G4int ip=0; ip<IPIE; ++ip) // Clean up the SumProb's of Isotopes (SPI) 00073 { 00074 std::vector<G4double>* SPI=IsoProbInEl[ip]; // Pointer to the SPI vector 00075 SPI->clear(); 00076 delete SPI; 00077 std::vector<G4int>* IsN=ElIsoN[ip]; // Pointer to the N vector 00078 IsN->clear(); 00079 delete IsN; 00080 } 00081 ElProbInMat.clear(); // Clean up the SumProb's of Elements (SPE) 00082 ElementZ.clear(); // Clear the body vector for Z of Elements 00083 IsoProbInEl.clear(); // Clear the body vector for SPI 00084 ElIsoN.clear(); // Clear the body vector for N of Isotopes 00085 }
void G4QNGamma::BuildPhysicsTable | ( | const G4ParticleDefinition & | ) | [inline, virtual] |
G4LorentzVector G4QNGamma::GetEnegryMomentumConservation | ( | ) |
G4double G4QNGamma::GetMeanFreePath | ( | const G4Track & | aTrack, | |
G4double | previousStepSize, | |||
G4ForceCondition * | condition | |||
) | [virtual] |
Implements G4VDiscreteProcess.
Definition at line 102 of file G4QNGamma.cc.
References DBL_MAX, G4cerr, G4cout, G4endl, G4QIsotope::Get(), G4VQCrossSection::GetCrossSection(), G4QIsotope::GetCSVector(), G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4Material::GetElementVector(), G4Track::GetMaterial(), G4QIsotope::GetMeanCrossSection(), G4Material::GetNumberOfElements(), G4ParticleDefinition::GetPDGEncoding(), G4QNeutronCaptureRatio::GetPointer(), G4QNeutronNuclearCrossSection::GetPointer(), G4QNeutronCaptureRatio::GetRatio(), G4DynamicParticle::GetTotalMomentum(), G4Material::GetVecNbOfAtomsPerVolume(), G4QIsotope::InitElement(), IsApplicable(), G4QIsotope::IsDefined(), G4Neutron::Neutron(), and NotForced.
Referenced by PostStepDoIt().
00103 { 00104 #ifdef debug 00105 G4cout<<"G4QNGamma::GetMeanFreePath: Called Fc="<<*Fc<<G4endl; 00106 #endif 00107 *Fc = NotForced; 00108 #ifdef debug 00109 G4cout<<"G4QNGamma::GetMeanFreePath: Before GetDynPart"<<G4endl; 00110 #endif 00111 const G4DynamicParticle* incidentParticle = aTrack.GetDynamicParticle(); 00112 #ifdef debug 00113 G4cout<<"G4QNGamma::GetMeanFreePath: Before GetDef"<<G4endl; 00114 #endif 00115 G4ParticleDefinition* incidentParticleDefinition=incidentParticle->GetDefinition(); 00116 G4double Momentum = incidentParticle->GetTotalMomentum(); // 3-momentum of the Particle 00117 if( !IsApplicable(*incidentParticleDefinition)) // @@ Unique for all QProcesses 00118 { 00119 G4cout<<"-W-G4QNGamma::GetMeanFreePath called for not implemented particle"<<G4endl; 00120 return DBL_MAX; 00121 } 00122 #ifdef debug 00123 G4cout<<"G4QNGamma::GetMeanFreePath: BeforeGetMaterial P="<<Momentum<<G4endl; 00124 #endif 00125 // @@ Can be additional condition internal function of G4VQProcess 00126 if(Momentum > 500.) return DBL_MAX; // @@ Temporary cut (QInternal=MeV -> IU!) 00127 // @@ This is a standard procedure, which can be moved to G4VQProcess (above is a funct) 00128 const G4Material* material = aTrack.GetMaterial(); // Get the current material 00129 const G4double* NOfNucPerVolume = material->GetVecNbOfAtomsPerVolume(); 00130 const G4ElementVector* theElementVector = material->GetElementVector(); 00131 G4int nE=material->GetNumberOfElements(); 00132 #ifdef debug 00133 G4cout<<"G4QNGamma::GetMeanFreePath:"<<nE<<" Elem's in theMaterial"<<G4endl; 00134 #endif 00135 // @@ Can be internal function called by GetMeanFreePath (above Isotope LOOP) 00136 G4VQCrossSection* CSmanager = 0; // @@ Reference modified in the function 00137 G4QNeutronCaptureRatio* capMan = 0; // @@ Reference modified in the function 00138 G4int pPDG =0; // @@ Reference modified in the function 00139 G4double sigma =0.; // CS mean over isotopes @@ Reference modified in the function 00140 if(incidentParticleDefinition == G4Neutron::Neutron()) 00141 { 00142 CSmanager=G4QNeutronNuclearCrossSection::GetPointer(); 00143 capMan=G4QNeutronCaptureRatio::GetPointer(); // @@ can be CSmanager2 00144 #ifdef debug 00145 G4cout<<"G4QNGamma::GetMeanFreePath: CSmanager is defined for neutrons"<<G4endl; 00146 #endif 00147 pPDG=2112; 00148 } 00149 else 00150 { 00151 G4cout<<"-Warning-G4QNGamma::GetMeanFreePath:Particle " 00152 <<incidentParticleDefinition->GetPDGEncoding()<<" isn't a neutron"<<G4endl; 00153 return DBL_MAX; // can be returned in sigma 00154 } 00155 // @@ End of possible internal function 00156 G4QIsotope* Isotopes = G4QIsotope::Get(); // Pointer to the G4QIsotopes singleton 00157 G4int IPIE=IsoProbInEl.size(); // How many old elements? 00158 if(IPIE) for(G4int ip=0; ip<IPIE; ++ip) // Clean up the SumProb's of Isotopes (SPI) 00159 { 00160 std::vector<G4double>* SPI=IsoProbInEl[ip]; // Pointer to the SPI vector 00161 SPI->clear(); 00162 delete SPI; 00163 std::vector<G4int>* IsN=ElIsoN[ip]; // Pointer to the N vector 00164 IsN->clear(); 00165 delete IsN; 00166 } 00167 ElProbInMat.clear(); // Clean up the SumProb's of Elements (SPE) 00168 ElementZ.clear(); // Clear the body vector for Z of Elements 00169 IsoProbInEl.clear(); // Clear the body vector for SPI 00170 ElIsoN.clear(); // Clear the body vector for N of Isotopes 00171 for(G4int i=0; i<nE; ++i) 00172 { 00173 G4Element* pElement=(*theElementVector)[i]; // Pointer to the current element 00174 G4int Z = static_cast<G4int>(pElement->GetZ()); // Z of the Element 00175 ElementZ.push_back(Z); // Remember Z of the Element 00176 G4int isoSize=0; // The default for the isoVectorLength is 0 00177 G4int indEl=0; // Index of non-trivial element or 0(default) 00178 G4IsotopeVector* isoVector=pElement->GetIsotopeVector(); // Get the predefined IsoVect 00179 if(isoVector) isoSize=isoVector->size();// Get size of the existing isotopeVector 00180 #ifdef debug 00181 G4cout<<"G4QNGamma::GetMeanFreePath: isovectorLength="<<isoSize<<G4endl; // Result 00182 #endif 00183 if(isoSize) // The Element has non-trivial abundance set 00184 { 00185 indEl=pElement->GetIndex()+1; // Index of the non-trivial element 00186 if(!Isotopes->IsDefined(Z,indEl)) // This index is not defined for this Z: define 00187 { 00188 std::vector<std::pair<G4int,G4double>*>* newAbund = 00189 new std::vector<std::pair<G4int,G4double>*>; 00190 G4double* abuVector=pElement->GetRelativeAbundanceVector(); 00191 for(G4int j=0; j<isoSize; j++) // Calculation of abundance vector for isotopes 00192 { 00193 G4int N=pElement->GetIsotope(j)->GetN()-Z; // N means A=N+Z ! 00194 if(pElement->GetIsotope(j)->GetZ()!=Z)G4cerr<<"G4QNGamma::GetMeanFreePath" 00195 <<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl; 00196 G4double abund=abuVector[j]; 00197 std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund); 00198 #ifdef debug 00199 G4cout<<"G4QNGamma::GetMeanFreePath: p#="<<j<<",N="<<N<<",ab="<<abund<<G4endl; 00200 #endif 00201 newAbund->push_back(pr); 00202 } 00203 #ifdef debug 00204 G4cout<<"G4QNGamma::GetMeanFreePath: pairVectLength="<<newAbund->size()<<G4endl; 00205 #endif 00206 indEl=G4QIsotope::Get()->InitElement(Z,indEl,newAbund); // definition of the newInd 00207 for(G4int k=0; k<isoSize; k++) delete (*newAbund)[k]; // Cleaning temporary 00208 delete newAbund; // Was "new" in the beginning of the name space 00209 } 00210 } 00211 std::vector<std::pair<G4int,G4double>*>* cs= Isotopes->GetCSVector(Z,indEl);//CSPointer 00212 std::vector<G4double>* SPI = new std::vector<G4double>; // Pointer to the SPI vector 00213 IsoProbInEl.push_back(SPI); 00214 std::vector<G4int>* IsN = new std::vector<G4int>; // Pointer to the N vector 00215 ElIsoN.push_back(IsN); 00216 G4int nIs=cs->size(); // A#Of Isotopes in the Element 00217 G4double susi=0.; // sum of CS over isotopes 00218 #ifdef debug 00219 G4cout<<"G4QNGamma::GetMeanFreePath: Before Loop nIs="<<nIs<<G4endl; 00220 #endif 00221 if(nIs) for(G4int j=0; j<nIs; j++) // Calculate CS for eachIsotope of El 00222 { 00223 std::pair<G4int,G4double>* curIs=(*cs)[j]; // A pointer, which is used twice 00224 G4int N=curIs->first; // #of Neuterons in the isotope j of El i 00225 IsN->push_back(N); // Remember Min N for the Element 00226 #ifdef debug 00227 G4cout<<"G4QNGam::GetMeanFrP: Before CS, P="<<Momentum<<",Z="<<Z<<",N="<<N<<G4endl; 00228 #endif 00229 // @@ Can be a function, depanding on CSm1, CSm2, Momentum, Z, N, pPDG 00230 G4double CSI=CSmanager->GetCrossSection(true, Momentum, Z, N, pPDG) * 00231 capMan->GetRatio(Momentum, Z, N); // CS(j,i) for the isotope 00232 #ifdef debug 00233 G4cout<<"GQC::GMF:X="<<CSI<<",M="<<Momentum<<",Z="<<Z<<",N="<<N<<",P="<<pPDG<<G4endl; 00234 #endif 00235 curIs->second = CSI; 00236 susi+=CSI; // Make a sum per isotopes 00237 SPI->push_back(susi); // Remember summed cross-section 00238 } // End of temporary initialization of the cross sections in the G4QIsotope singeltone 00239 sigma+=Isotopes->GetMeanCrossSection(Z,indEl)*NOfNucPerVolume[i];//SUM(MeanCS*NOfNperV) 00240 ElProbInMat.push_back(sigma); 00241 } // End of LOOP over Elements 00242 #ifdef debug 00243 G4cout<<"G4QNGam::GetMeanFrPa: Sigma="<<sigma<<G4endl; 00244 #endif 00245 if(sigma > 0.) return 1./sigma; // Mean path [distance] 00246 return DBL_MAX; 00247 }
G4int G4QNGamma::GetNumberOfNeutronsInTarget | ( | ) |
G4bool G4QNGamma::IsApplicable | ( | const G4ParticleDefinition & | particle | ) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 250 of file G4QNGamma.cc.
References G4cout, G4endl, G4ParticleDefinition::GetPDGEncoding(), and G4Neutron::Neutron().
Referenced by GetMeanFreePath(), and PostStepDoIt().
00251 { 00252 if ( particle == *( G4Neutron::Neutron() ) ) return true; 00253 #ifdef debug 00254 G4cout<<"***G4QNGamma::IsApplicable: PDG="<<particle.GetPDGEncoding()<<G4endl; 00255 #endif 00256 return false; 00257 }
G4VParticleChange * G4QNGamma::PostStepDoIt | ( | const G4Track & | aTrack, | |
const G4Step & | aStep | |||
) | [virtual] |
Reimplemented from G4VDiscreteProcess.
Definition at line 259 of file G4QNGamma.cc.
References G4ParticleChange::AddSecondary(), G4VProcess::aParticleChange, fAlive, G4ParticleTable::FindIon(), fStopAndKill, G4cerr, G4cout, G4endl, G4UniformRand, G4Gamma::Gamma(), G4DynamicParticle::Get4Momentum(), G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4Material::GetElementVector(), G4Track::GetGlobalTime(), G4DynamicParticle::GetKineticEnergy(), G4QPDGCode::GetMass(), G4Track::GetMaterial(), GetMeanFreePath(), G4DynamicParticle::GetMomentumDirection(), G4Material::GetNumberOfElements(), G4ParticleTable::GetParticleTable(), G4Track::GetPosition(), G4DynamicParticle::GetTotalMomentum(), G4Track::GetTouchableHandle(), G4Track::GetWeight(), G4Element::GetZ(), G4ParticleChange::Initialize(), IsApplicable(), G4Neutron::Neutron(), NotForced, position, G4VDiscreteProcess::PostStepDoIt(), G4ParticleChange::ProposeEnergy(), G4VParticleChange::ProposeLocalEnergyDeposit(), G4ParticleChange::ProposeMomentumDirection(), G4VParticleChange::ProposeTrackStatus(), G4Proton::Proton(), G4VParticleChange::SetNumberOfSecondaries(), G4Track::SetTouchableHandle(), and G4Track::SetWeight().
00260 { 00261 #ifdef debug 00262 static const G4double mNeut= G4QPDGCode(2112).GetMass(); 00263 #endif 00264 static const G4LorentzVector vacuum4M(0.,0.,0.,0.); 00265 //------------------------------------------------------------------------------------- 00266 const G4DynamicParticle* projHadron = track.GetDynamicParticle(); 00267 const G4ParticleDefinition* particle=projHadron->GetDefinition(); 00268 #ifdef debug 00269 G4cout<<"G4QNGamma::PostStepDoIt: Before the GetMeanFreePath is called"<<G4endl; 00270 #endif 00271 G4ForceCondition cond=NotForced; 00272 GetMeanFreePath(track, 1., &cond); 00273 #ifdef debug 00274 G4cout<<"G4QNGamma::PostStepDoIt: After the GetMeanFreePath is called"<<G4endl; 00275 #endif 00276 G4LorentzVector proj4M=projHadron->Get4Momentum(); // 4-momentum of the projectile (IU?) 00277 G4double momentum = projHadron->GetTotalMomentum(); // 3-momentum of the Particle 00278 G4double Momentum=proj4M.rho(); 00279 if(std::fabs(Momentum-momentum)>.001) 00280 G4cerr<<"*G4QNGamma::PostStepDoIt: P="<<Momentum<<"#"<<momentum<<G4endl; 00281 #ifdef debug 00282 G4double mp=proj4M.m(); // @@ must be just the neutron mass 00283 if(std::fabs(mp-mNeut)>.001)G4cerr<<"*G4QNGamma::PostStDoIt: M="<<mp<<"#"<<mNeut<<G4endl; 00284 G4cout<<"->G4QNGam::PostStDoIt:*called*,4M="<<proj4M<<",P="<<Momentum<<",m="<<mp<<G4endl; 00285 #endif 00286 // The same cut function can be used as in MeanFreePath (500) 00287 if (!IsApplicable(*particle) || Momentum > 500.) // Check applicability (@@ IU?) 00288 { 00289 G4cerr<<"G4QNGamma::PostStepDoIt: Only neutrons with P="<<Momentum<<" < 500"<<G4endl; 00290 return 0; 00291 } 00292 const G4Material* material = track.GetMaterial(); // Get the current material 00293 G4int Z=0; 00294 const G4ElementVector* theElementVector = material->GetElementVector(); 00295 G4int nE=material->GetNumberOfElements(); 00296 #ifdef debug 00297 G4cout<<"G4QNGamma::PostStepDoIt: "<<nE<<" elements in the material."<<G4endl; 00298 #endif 00299 G4int EPIM=ElProbInMat.size(); 00300 #ifdef debug 00301 G4cout<<"G4QNGam::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl; 00302 #endif 00303 G4int i=0; 00304 if(EPIM>1) 00305 { 00306 G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand(); 00307 for(i=0; i<nE; ++i) 00308 { 00309 #ifdef debug 00310 G4cout<<"G4QNGamma::PostStepDoIt:E["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl; 00311 #endif 00312 if (rnd<ElProbInMat[i]) break; 00313 } 00314 if(i>=nE) i=nE-1; // Top limit for the Element 00315 } 00316 G4Element* pElement=(*theElementVector)[i]; 00317 Z=static_cast<G4int>(pElement->GetZ()); 00318 #ifdef debug 00319 G4cout<<"G4QNGamma::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl; 00320 #endif 00321 if(Z <= 0) 00322 { 00323 G4cerr<<"---Warning---G4QNGamma::PostStepDoIt: Element with Z="<<Z<<G4endl; 00324 if(Z<0) return 0; 00325 } 00326 std::vector<G4double>* SPI = IsoProbInEl[i];// Vector of summedProbabilities for isotopes 00327 std::vector<G4int>* IsN = ElIsoN[i]; // Vector of "#of neutrons" in the isotope El[i] 00328 G4int nofIsot=SPI->size(); // #of isotopes in the element i 00329 #ifdef debug 00330 G4cout<<"G4QNGam::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<G4endl; 00331 #endif 00332 G4int j=0; 00333 if(nofIsot>1) 00334 { 00335 G4double rndI=(*SPI)[nofIsot-1]*G4UniformRand(); // Randomize the isotop of the Element 00336 for(j=0; j<nofIsot; ++j) 00337 { 00338 #ifdef debug 00339 G4cout<<"G4QNGamma::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rndI<<G4endl; 00340 #endif 00341 if(rndI < (*SPI)[j]) break; 00342 } 00343 if(j>=nofIsot) j=nofIsot-1; // Top limit for the isotope 00344 } 00345 G4int N =(*IsN)[j]; // Randomized number of neutrons 00346 #ifdef debug 00347 G4cout<<"G4QNGamma::PostStepDoIt: Z="<<Z<<", j="<<i<<", N(isotope)="<<N<<G4endl; 00348 #endif 00349 G4double kinEnergy= projHadron->GetKineticEnergy(); 00350 G4ParticleMomentum dir = projHadron->GetMomentumDirection(); 00351 //if() //DoNothing Action insead of the reaction 00352 //{ 00353 // aParticleChange.ProposeEnergy(kinEnergy); 00354 // aParticleChange.ProposeLocalEnergyDeposit(0.); 00355 // aParticleChange.ProposeMomentumDirection(dir); 00356 // aParticleChange.ProposeTrackStatus(fAlive); 00357 // return G4VDiscreteProcess::PostStepDoIt(track,step); 00358 //} 00359 if(N<0) 00360 { 00361 G4cerr<<"-Warning-G4QNGamma::PostStepDoIt: Isotope with Z="<<Z<<", 0>N="<<N<<G4endl; 00362 return 0; 00363 } 00364 nOfNeutrons=N; // Remember it for the energy-momentum check 00365 #ifdef debug 00366 G4cout<<"G4QNGamma::PostStepDoIt: N="<<N<<" for element with Z="<<Z<<G4endl; 00367 #endif 00368 aParticleChange.Initialize(track); 00369 G4double weight = track.GetWeight(); 00370 #ifdef debug 00371 G4cout<<"G4QNGamma::PostStepDoIt: weight="<<weight<<G4endl; 00372 #endif 00373 G4double localtime = track.GetGlobalTime(); 00374 #ifdef debug 00375 G4cout<<"G4QNGamma::PostStepDoIt: localtime="<<localtime<<G4endl; 00376 #endif 00377 G4ThreeVector position = track.GetPosition(); 00378 G4TouchableHandle trTouchable = track.GetTouchableHandle(); 00379 #ifdef debug 00380 G4cout<<"G4QNGamma::PostStepDoIt: position="<<position<<G4endl; 00381 #endif 00382 G4int targPDG = 90000000 + Z*1000 + N; // PDG Code of the target nucleus 00383 G4QPDGCode targQPDG(targPDG); 00384 G4double tM = targQPDG.GetMass(); // Target mass 00385 #ifdef debug 00386 G4cout<<"G4QNGamma::PostStepDoIt: n + targPDG="<<targPDG<<G4endl; 00387 #endif 00388 // @@ All above is universal for all processes except for the additional condition (500) 00389 G4LorentzVector tot4M=G4LorentzVector(0.,0.,0.,tM)+proj4M; 00390 G4double totM2=tot4M.m2(); 00391 G4int tZ=Z; 00392 G4int tN=N+1; 00393 G4int resPDG = targPDG + 1; // Final ++N nucleus PDG 00394 G4double rM=G4QPDGCode(resPDG).GetMass(); // Mass of the final nucleus 00395 G4LorentzVector r4M=G4LorentzVector(0.,0.,0.,rM); // 4mom of the final nucleus 00396 G4LorentzVector g4M=G4LorentzVector(0.,0.,0.,0.); // 4mom of the gamma 00397 #ifdef debug 00398 G4cout<<"G4QNGamma::PostStepDoIt: tM="<<tM << ", rM="<<rM << ", Q="<<tM+mNeut-rM<<G4endl; 00399 #endif 00400 if(!G4QHadron(tot4M).DecayIn2(r4M, g4M)) // The compoun decay din't succeed 00401 { 00402 //G4cerr<<"G4QNGamma::PostStDoIt: tM="<<std::sqrt(totM2)<<" < rM="<<rM<<G4endl; 00403 //G4Exception("G4QNGamma::PostStepDoIt()", "HAD_CHPS_0001", 00404 // FatalException, "Hadronize quasmon: Can't decay TotNuc->ResNuc+gam"); 00405 G4cerr<<"-Warning-G4QNGamma::PostStDoIt: tM="<<std::sqrt(totM2)<<" < rM="<<rM<<G4endl; 00406 aParticleChange.ProposeEnergy(kinEnergy); 00407 aParticleChange.ProposeLocalEnergyDeposit(0.); 00408 aParticleChange.ProposeMomentumDirection(dir); 00409 aParticleChange.ProposeTrackStatus(fAlive); 00410 return G4VDiscreteProcess::PostStepDoIt(track,step); 00411 } 00412 #ifdef debug 00413 G4cout<<"G4QNGam::PStDoIt: RA="<<r4M.rho()<<r4M<<", Gamma="<<g4M.rho()<<g4M<<G4endl; 00414 #endif 00415 EnMomConservation = tot4M - r4M - g4M; // EM conservation check 4mom 00416 aParticleChange.ProposeEnergy(0.); // A standard procedure of killing proj. 00417 aParticleChange.ProposeTrackStatus(fStopAndKill);// projectile neutron is killed 00418 aParticleChange.SetNumberOfSecondaries(2); // Fix a#of secondaries 00419 // Fill the gamma 00420 G4ParticleDefinition* theDefinition = G4Gamma::Gamma(); 00421 G4DynamicParticle* theGam = new G4DynamicParticle(theDefinition, g4M); 00422 G4Track* capGamma = new G4Track(theGam, localtime, position ); 00423 capGamma->SetWeight(weight); 00424 capGamma->SetTouchableHandle(trTouchable); 00425 aParticleChange.AddSecondary(capGamma); 00426 // ---------------------------------------------------- 00427 // Fill the final nucleus 00428 G4int tA=tZ+tN; 00429 if (resPDG==90000001) theDefinition = G4Neutron::Neutron(); 00430 else if(resPDG==90001000) theDefinition = G4Proton::Proton(); 00431 else theDefinition = G4ParticleTable::GetParticleTable()->FindIon(tZ, tA, 0, tZ); 00432 G4DynamicParticle* theReN = new G4DynamicParticle(theDefinition, r4M); 00433 G4Track* scatReN = new G4Track(theReN, localtime, position ); 00434 scatReN->SetWeight(weight); 00435 scatReN->SetTouchableHandle(trTouchable); 00436 aParticleChange.AddSecondary(scatReN); 00437 00438 return G4VDiscreteProcess::PostStepDoIt(track, step); 00439 }
void G4QNGamma::PrintInfoDefinition | ( | ) | [inline] |