#include <G4QEnvironment.hh>
Definition at line 50 of file G4QEnvironment.hh.
G4QEnvironment::G4QEnvironment | ( | const G4QNucleus & | theEnv | ) |
Definition at line 69 of file G4QEnvironment.cc.
References G4cout, G4endl, G4QPDGCode::GetBaryNum(), G4QPDGCode::GetCharge(), G4QPDGCode::GetMass(), G4QNucleus::GetPDG(), and G4QFreeScattering::GetPointer().
00070 : theEnvironment(theEnv) 00071 { 00072 theQFScat = G4QFreeScattering::GetPointer(); 00073 G4int envPDG = theEnv.GetPDG(); 00074 G4QPDGCode envQPDG(envPDG); 00075 G4int envA = envQPDG.GetBaryNum(); 00076 G4double envM = envQPDG.GetMass(); 00077 theWorld = 0; 00078 nBarClust = 0; 00079 f2all = 0; 00080 totCharge = envQPDG.GetCharge(); 00081 totBaryoN = envA; 00082 tot4Mom = G4LorentzVector(0.,0.,0.,envM); 00083 theTargetPDG = 0; 00084 #ifdef debug 00085 G4cout << "G4QEnviron::Const: t4M=" << tot4Mom << ",tC=" << totCharge 00086 << ",tB=" << totBaryoN << G4endl; 00087 #endif 00088 }
G4QEnvironment::G4QEnvironment | ( | const G4QHadronVector & | projHadrons, | |
const G4int | targPDG | |||
) |
Definition at line 91 of file G4QEnvironment.cc.
References FatalException, G4cout, G4endl, G4Exception(), G4UniformRand, G4QCHIPSWorld::Get(), G4QHadron::Get4Momentum(), G4QNucleus::GetA(), G4QPDGCode::GetBaryNum(), G4QHadron::GetCharge(), G4QPDGCode::GetCharge(), G4QHadron::GetMass(), G4QPDGCode::GetMass(), G4QNucleus::GetMZNS(), G4QNucleus::GetPDG(), G4QHadron::GetPDGCode(), G4QPDGCode::GetPDGCode(), G4QFreeScattering::GetPointer(), G4QHadron::GetQC(), G4QPDGCode::GetQCode(), G4QHadron::GetQCode(), G4QChipolino::GetQPDG1(), G4QChipolino::GetQPDG2(), G4QCHIPSWorld::GetQPEntries(), G4QPDGCode::GetQuarkContent(), G4QNucleus::InitByPDG(), photon, G4InuclParticleNames::proton, G4QHadron::Set4Momentum(), G4QHadron::SetQPDG(), G4QNucleus::SplitBaryon(), and sqr().
00093 : theEnvironment(90000000) // User is responsible for projHadrons(Vector) 00094 { 00095 //static const G4double mNeut= G4QPDGCode(2112).GetMass(); 00096 //static const G4QContent neutQC(2,1,0,0,0,0); 00097 static const G4QPDGCode pimQPDG(-211); 00098 theQFScat = G4QFreeScattering::GetPointer(); 00099 theWorld = G4QCHIPSWorld::Get(); // Get a pointer to the CHIPS World 00100 nBarClust = 0; 00101 totCharge = 0; 00102 totBaryoN = 0; 00103 f2all = 0; 00104 G4bool fake=false; // At present only fake pi- 00105 theTargetPDG=targPDG; // Remenber it for error message 00106 G4int nHadrons=projHadrons.size(); // A#of hadrons in the input Vector 00107 00108 #ifdef debug 00109 G4cout<<"--->>G4QE::Const: Called targPDG="<<targPDG<<", nInpHadr="<<nHadrons<<G4endl; 00110 #endif 00111 if(nHadrons<1 || targPDG==90000000) // No projectile Hadrons or no target Nucleus 00112 { 00113 G4cout << "---Warning---G4QEnv::Const:a#ofINPHadr=" << nHadrons 00114 << ",tPDG=" << targPDG << G4endl; 00115 //throw G4QException("***G4QEnvironment: There is no one projectile or vacuum target"); 00116 if(nHadrons) // The projectiles are copied to the output 00117 { 00118 for (G4int ih=0; ih<nHadrons; ih++) 00119 { 00120 G4QHadron* curQH = new G4QHadron(projHadrons[ih]); 00121 #ifdef debug 00122 G4cout << "*G4QE::Const:iH#" << ih << "," << curQH->GetQC() 00123 << curQH->Get4Momentum() << G4endl; 00124 #endif 00125 00126 if (curQH->GetPDGCode() == 10) { 00127 // Chipolino is found in the input -> Decay 00128 00129 G4QContent chQC=curQH->GetQC(); 00130 // Quark content of the Hadron-Chipolino 00131 G4QChipolino QCh(chQC); 00132 // Define a Chipolino instance for the Hadron 00133 00134 G4LorentzVector ch4M=curQH->Get4Momentum(); // 4Mom of the Hadron-Chipolino 00135 G4QPDGCode h1QPDG=QCh.GetQPDG1(); // QPDG of the first hadron 00136 G4double h1M =h1QPDG.GetMass();// Mass of the first hadron 00137 G4QPDGCode h2QPDG=QCh.GetQPDG2(); // QPDG of the second hadron 00138 G4double h2M =h2QPDG.GetMass();// Mass of the second hadron 00139 G4double chM2 =ch4M.m2(); // Squared Mass of the Chipolino 00140 if( sqr(h1M+h2M) < chM2 ) // Decay is possible 00141 { 00142 G4LorentzVector h14M(0.,0.,0.,h1M); 00143 G4LorentzVector h24M(0.,0.,0.,h2M); 00144 if(!G4QHadron(ch4M).DecayIn2(h14M,h24M)) 00145 { 00146 G4ExceptionDescription ed; 00147 ed << "QChip DecIn2 error: CM=" << std::sqrt(chM2) << " -> h1=" 00148 << h1QPDG << "(" << h1M << ") + h2=" << h1QPDG << "(" << h2M 00149 << ") = " << h1M+h2M << " **Failed**" << G4endl; 00150 G4Exception("G4QEnvironment::G4QEnvironment()", "HAD_CHPS_0000", 00151 FatalException, ed); 00152 } 00153 delete curQH; // Kill the primary Chipolino 00154 G4QHadron* h1H = new G4QHadron(h1QPDG.GetPDGCode(),h14M); 00155 theQHadrons.push_back(h1H); // (delete equivalent) 00156 curQH = new G4QHadron(h1H); // ... just to remember independently 00157 theProjectiles.push_back(curQH); // Remember it for the error message 00158 00159 #ifdef debug 00160 G4cout<<"G4QE::Constr: QChipolino -> H1="<<h1QPDG<<h14M<<G4endl; 00161 #endif 00162 curQH = new G4QHadron(h2QPDG.GetPDGCode(),h24M); 00163 theQHadrons.push_back(curQH); // (delete equivalent) 00164 #ifdef debug 00165 G4cout<<"G4QE::Constr: QChipolino -> H2="<<h2QPDG<<h24M<<G4endl; 00166 #endif 00167 } 00168 else 00169 { 00170 G4ExceptionDescription ed; 00171 ed << "LowMassChipolino in Input: " << ih << "," << curQH->GetQC() 00172 << curQH->Get4Momentum() << ", chipoM=" << std::sqrt(chM2) << " < m1=" 00173 << h1M << "(" << h1QPDG << ") + m2=" << h2M << "(" << h2QPDG << ") = " 00174 << h1M+h2M << G4endl; 00175 G4Exception("G4QEnvironment::G4QEnvironment()", "HAD_CHPS_0001", 00176 FatalException, ed); 00177 } 00178 } 00179 theQHadrons.push_back(curQH); // (delete equivalent) 00180 curQH = new G4QHadron(curQH); // ... just to remember independently 00181 theProjectiles.push_back(curQH); // Remenber it for the error message 00182 } 00183 } 00184 else if(targPDG!=90000000) // No projHadrons,fill targetNucleus to output 00185 { 00186 G4QHadron* curQH = new G4QHadron(targPDG); 00187 #ifdef debug 00188 G4cout<<"**G4QE::Const:No iHad,eH="<<curQH->GetQC()<<curQH->Get4Momentum()<<G4endl; 00189 #endif 00190 theQHadrons.push_back(curQH); // (delete equivalent) 00191 } 00192 if (nHadrons<0) G4cout<<"***Warning****G4QE::Const:NH="<<nHadrons<<" < 0 !"<<G4endl; 00193 return; 00194 } 00195 G4QPDGCode targQPDG(targPDG); 00196 #ifdef debug 00197 G4cout<<"G4QE::C:targQPDG="<<targQPDG<<G4endl; 00198 #endif 00199 G4int targA=targQPDG.GetBaryNum(); 00200 G4double targM=targQPDG.GetMass(); 00201 totCharge=targQPDG.GetCharge(); 00202 totBaryoN=targA; 00203 tot4Mom=G4LorentzVector(0.,0.,0.,targM); 00204 // === Print out of the input information at Creation time & tot 4-mom Calculation === 00205 #ifdef debug 00206 G4cout<<"G4QE::C:PDG="<<targPDG<<",C="<<totCharge<<",M="<<targM<<",n="<<nHadrons<<G4endl; 00207 #endif 00208 for(G4int ipr=0; ipr<nHadrons; ipr++)// LOOP is used for the tot4Mom calc. & for printing 00209 { 00210 G4QHadron* prHadr = projHadrons[ipr]; 00211 G4QHadron* curQH = new G4QHadron(prHadr);// Remenber it for _ 00212 theProjectiles.push_back(curQH); // the error message 00213 G4LorentzVector h4Mom = prHadr->Get4Momentum(); 00214 tot4Mom += h4Mom; 00215 totCharge += prHadr->GetCharge(); 00216 totBaryoN += prHadr->GetBaryonNumber(); 00217 #ifdef debug 00218 G4int hPDG = prHadr->GetPDGCode(); 00219 G4int hNFrag= prHadr->GetNFragments(); 00220 G4QContent hQC = prHadr->GetQC(); 00221 G4cout<<"G4QE::C:#"<<ipr<<",PDG="<<hPDG<<hQC<<",4M="<<h4Mom<<",hNFr="<<hNFrag<<G4endl; 00222 #endif 00223 } 00224 #ifdef debug 00225 G4cout<<"G4QEnv::Const:tC="<<totCharge<<",tB="<<totBaryoN<<",tot4M="<<tot4Mom<<G4endl; 00226 #endif 00227 #ifdef debug 00228 G4cout<<"G4QEnv::Const: --> tC="<<totCharge<<",tB="<<totBaryoN<<G4endl; 00229 #endif 00230 G4int nP=theWorld->GetQPEntries(); // A#of init'ed particles in CHIPS World 00231 //G4int nCl=nP-90; // A#of init'ed clusters in CHIPS World 00232 G4int nCl=nP-53; // @@ A#ofClusters in CHIPSWorld (53=nQHM in G4QPDGCode.hh) 00233 #ifdef debug 00234 G4cout<<"G4QEnv:Const:Before NCI:n="<<nP<<",F="<<projHadrons[0]->GetNFragments()<<",tC=" 00235 <<totCharge<<",tB="<<totBaryoN<<", nCl="<<nCl<<G4endl; 00236 #endif 00237 InitClustersVector(nCl,targA); // Init Clusters as Particles (to interact) 00238 #ifdef debug 00239 G4cout<<"G4QEnv::Const:NucClust,n="<<nCl<<",F="<<projHadrons[0]->GetNFragments()<<",tC=" 00240 <<totCharge<<",tB="<<totBaryoN<<G4endl; 00241 #endif 00242 if(targPDG>80000000) // ==> Nuclear target (including NUCPDG) 00243 { 00244 theEnvironment.InitByPDG(targPDG); // Create nuclear environment 00245 #ifdef debug 00246 G4cout<<"G4QEnv::Const:nH="<<nHadrons<<",PDG="<<projHadrons[0]->GetPDGCode()<<",tC=" 00247 <<totCharge<<",tB="<<totBaryoN<<G4endl; 00248 #endif 00249 if(nHadrons==1) 00250 { 00251 G4QHadron* opHad=projHadrons[0]; 00252 G4int opPDG=opHad->GetPDGCode(); 00253 #ifdef debug 00254 G4cout<<"G4QEnviron::Constructor: *** Only one input hadron*** PDG="<<opPDG<<G4endl; 00255 #endif 00256 if(opPDG==22) // *** Check photon's NuclearSplitThreshold 00257 { 00258 G4double exMass=tot4Mom.m(); 00259 #ifdef debug 00260 G4cout<<"G4QEnvironment::Const: exM="<<exMass-targM<<" > mPi0 ?"<<G4endl; 00261 #endif 00262 if(exMass<targM+135.977) // Nucleus is below the pion production threshold 00263 { 00264 G4QNucleus exEnviron(tot4Mom,targPDG); 00265 // @@ One can put here the pbpt= (M.K.) @@ What about d,t,alpha splitting? 00266 if(targM>999.&&!exEnviron.SplitBaryon())//Nucleus is below SplitFragmentThreshold 00267 { 00268 #ifdef debug 00269 G4cout<<"G4QEnv::Const:Photon's added to Output, Env="<<theEnvironment<<G4endl; 00270 #endif 00271 G4QHadron* photon = new G4QHadron(opHad); // Fill projPhoton to Output 00272 #ifdef debug 00273 G4cout<<"**G4QE::Const:Phot="<<photon->GetQC()<<photon->Get4Momentum()<<G4endl; 00274 #endif 00275 theQHadrons.push_back(photon); // (delete equivalent) 00276 return; 00277 } 00278 else if(targM<=999.) // Target is a nucleon 00279 { 00280 G4LorentzVector prot4m(0.,0.,0.,targM); // Prototype of secondary proton 4mom 00281 G4LorentzVector gam4m(0.,0.,0.,0.); // Prototype for secondary gamma 4mom 00282 if(!G4QHadron(tot4Mom).DecayIn2(prot4m,gam4m)) 00283 { 00284 #ifdef debug 00285 G4cout<<"*War*G4QEnv::Const:(P)Photon->Output, Env="<<theEnvironment<<G4endl; 00286 #endif 00287 G4QHadron* photon = new G4QHadron(opHad); // Fill projPhoton to Output 00288 #ifdef debug 00289 G4cout<<"**G4QE::Const:Ph="<<photon->GetQC()<<photon->Get4Momentum()<<G4endl; 00290 #endif 00291 theQHadrons.push_back(photon); // (delete equivalent) 00292 return; 00293 } 00294 G4QHadron* proton = new G4QHadron(targPDG,prot4m); // Fill tgProton to Output 00295 theQHadrons.push_back(proton); // (delete equivalent) 00296 G4QHadron* photon = new G4QHadron(22,gam4m); // Fill prPhoton to Output 00297 theQHadrons.push_back(photon); // (delete equivalent) 00298 theEnvironment.InitByPDG(90000000); // Create nuclear environment 00299 #ifdef debug 00300 G4cout<<"G4QEnv::Const:Fill gamma and N from gam+N"<<targPDG<<prot4m<<G4endl; 00301 #endif 00302 return; 00303 } 00304 } 00305 } 00306 else if(opPDG==13 || opPDG==15) 00307 { 00308 G4int nuPDG=14; 00309 if(opPDG==15) nuPDG=16; 00310 G4LorentzVector mu4m=opHad->Get4Momentum(); 00311 //G4double qpen=-180.*log(G4UniformRand()); // Energy of target-quark-parton(T=180) 00312 G4double qpen=465.*sqrt(sqrt(G4UniformRand())); // UniformDistr for 3-q nucleon 00313 G4double qpct=2*G4UniformRand()-1.; // Cos(thet) of target-quark-parton 00314 G4double qpst=sqrt(1.-qpct*qpct); // Sin(theta) of target-quark-parton 00315 G4double qppt=qpen*qpst; // PT of target-quark-parton 00316 G4double qphi=twopi*G4UniformRand(); // Phi of target-quark-parton 00317 G4LorentzVector qi4m(qppt*sin(qphi),qppt*cos(qphi),qpen*qpct,qpen); // quark-parton 00318 G4LorentzVector qt4m=mu4m+qi4m; // Total 4mom (iniQP+lepton) 00319 G4LorentzVector nu4m(0.,0.,0.,0.); // Prototype of secondary neutrino 4mom 00320 G4LorentzVector qf4m(0.,0.,0.,0.); // Prototype for secondary quark-parton 00321 G4QContent targQC=targQPDG.GetQuarkContent(); // QC of the target nucleus (local!) 00322 targQC+=G4QContent(1,0,0,0,1,0); // Make iso-shift with fake pi- is added 00323 G4LorentzVector fn4m=G4LorentzVector(0.,0.,0.,0.); // Prototype of the residual 4M 00324 G4QNucleus fnN(targQC,fn4m); // Define the final state nucleus 00325 G4double fnm=fnN.GetMZNS(); // GS Mass of the final state nucleus 00326 //G4QContent resiQC=targQC-neutQC; // QC of resid nucleus (-neutron) 00327 //G4QNucleus rsN(resiQC,fn4m); // Define the final state nucleus 00328 //G4double rsm=rsN.GetMZNS()+mNeut; // GS Mass of residual nucleus w/o neutron 00329 G4double tm=0.; // Prototype of RealMass of the final nucleus 00330 G4LorentzVector tg4m=G4LorentzVector(0.,0.,0.,targM); // 4mom of all target nucleus 00331 G4LorentzVector fd4m=tg4m-qi4m; // 4mom of the residual coloured nuclear sys. 00332 #ifdef debug 00333 //G4cout<<"-->>G4QEnv::Const:rM="<<rsm<<",fM="<<fnm<<",tM="<<targM<<G4endl; 00334 G4cout<<"G4QEnvironment::Const:mu4M="<<mu4m<<",t4M="<<qt4m<<",tgQP="<<qi4m<<G4endl; 00335 #endif 00336 while (tm<=fnm) 00337 { 00338 if(!G4QHadron(qt4m).DecayIn2(nu4m,qf4m)) 00339 { 00340 G4cout<<"***G4QE::Constr:Muon error (1) 4M="<<mu4m<<". Fill as it is."<<G4endl; 00341 G4QHadron* lepton = new G4QHadron(opHad); // Fill projMuon to Output 00342 theQHadrons.push_back(lepton); // (delete equivalent) 00343 return; 00344 } 00345 #ifdef mudebug 00346 G4cout<<"G4QEnv::Const:i="<<qi4m<<",t="<<qt4m<<"->n="<<nu4m<<"+q="<<qf4m<<G4endl; 00347 #endif 00348 fn4m=fd4m+qf4m; 00349 tm=fn4m.m(); // Real mass of the final nucleus 00350 #ifdef mudebug 00351 G4cout<<"--G4QEnv::Const:M="<<tm<<",GSM=="<<fnm<<G4endl; 00352 #endif 00353 } 00354 fnN.Set4Momentum(fn4m); 00355 // (mu,q->nu,q) reaction succeded and Neutrino can be pushed to Output 00356 G4QHadron* neutrino = 0; // NeutrinoPrototype to be filled to Output 00357 #ifdef mudebug 00358 G4cout<<"G4QEnv::Const:fM="<<tm<<fn4m<<",GSM="<<fnm<<G4endl; 00359 #endif 00360 if(tm<fnm) // Final Nucleus is below the GS threshold 00361 { 00362 qf4m=G4LorentzVector(0.,0.,0.,fnm); // Final nucleus 4M for the final decay 00363 qt4m=tg4m+mu4m; 00364 if(!G4QHadron(qt4m).DecayIn2(nu4m,qf4m)) // Decay in Nucleus+nu_mu 00365 { 00366 G4cout<<"***G4QE::Constr:Muon error (2) 4M="<<mu4m<<". Fill as it is."<<G4endl; 00367 G4QHadron* muon = new G4QHadron(opHad); // Fill projMuon to Output 00368 theQHadrons.push_back(muon); // (delete equivalent) 00369 return; 00370 } 00371 G4QHadron* fnuc = new G4QHadron(targQC,qf4m); // Fill Final Nucleus to Output 00372 //theQHadrons.push_back(fnuc); // (delete equivalent) 00373 EvaporateResidual(fnuc); // Try to evaporate residual (del. equiv.) 00374 neutrino = new G4QHadron(nuPDG,nu4m);// Fill Neutrino to Output 00375 theEnvironment.InitByPDG(90000000); // Create nuclear environment 00376 #ifdef debug 00377 G4cout<<"G4QEnv::Const:Fill neutrino (1) "<<nuPDG<<nu4m<<G4endl; 00378 #endif 00379 theQHadrons.push_back(neutrino); // (delete equivalent) 00380 return; 00381 } 00382 neutrino = new G4QHadron(nuPDG,nu4m); // Fill Neutrino to Output 00383 #ifdef debug 00384 G4cout<<"G4QEnv::Const:Fill neutrino (2) "<<nuPDG<<nu4m<<G4endl; 00385 #endif 00386 theQHadrons.push_back(neutrino); // (delete equivalent) 00387 if(tm<fnm+135.98) // FinalNucleus is below thePionThreshold(HE) 00388 { 00389 if(!fnN.SplitBaryon()) // Final Nucleus is below the splittingFragmentThreshold 00390 { 00391 #ifdef mudebug 00392 G4cout<<"G4QEnv::Const: impossible to split nucleon after mu->nu"<<G4endl; 00393 #endif 00394 G4LorentzVector ga4m(0.,0.,0.,0.); 00395 qf4m=G4LorentzVector(0.,0.,0.,fnm);// Final nucleus 4M for the final decay 00396 if(!G4QHadron(fn4m).DecayIn2(ga4m,qf4m)) // Decay in Nucleus+photon 00397 { 00398 G4cout<<"***G4QE::Constr:LepCapError(3),M="<<fn4m.m()<<"<"<<fnm<<G4endl; 00399 G4QHadron* resid = new G4QHadron(targQC,qt4m); // Fill ResidNucleus to Output 00400 theQHadrons.push_back(resid); // (delete equivalent) 00401 theEnvironment.InitByPDG(90000000);// Create nuclear environment 00402 return; 00403 } 00404 G4QHadron* photon = new G4QHadron(22,ga4m); // Fill projPhoton to Output 00405 #ifdef debug 00406 G4cout<<"G4QEnv::Const:Fill photon "<<ga4m<<G4endl; 00407 #endif 00408 theQHadrons.push_back(photon); // (delete equivalent) 00409 G4QHadron* fnuc = new G4QHadron(targQC,qf4m); // Fill Final Nucleus to Output 00410 #ifdef debug 00411 G4cout<<"G4QEnv::Const:Fill target "<<targQC<<qf4m<<" in any form"<<G4endl; 00412 #endif 00413 EvaporateResidual(fnuc); // Try to evaporate residual (del. equiv.) 00414 theEnvironment.InitByPDG(90000000);// Create nuclear environment 00415 return; 00416 } 00417 } 00418 // At this poin it is possible to convert mu- to pi- 00419 fn4m=qf4m-qi4m; 00420 opHad->SetQPDG(pimQPDG); //Convert (mu-)u->d to (virt pi-)u->d capture 00421 fake=false; // normal pi- for q-muon scattering 00422 //fake=true; // fake pi- for q-muon scattering ***** 00423 //if(G4UniformRand()>.5) fake=false; // normal pi- for q-muon scattering ***** 00424 opHad->Set4Momentum(fn4m); 00425 } 00426 } 00427 for(G4int ih=0; ih<nHadrons; ih++) // ==> The main LOOP over projQHadrons 00428 { 00429 G4QHadron* curHadr=projHadrons[ih]; // Pointer to current projectile Hadron 00430 G4int hNFrag = curHadr->GetNFragments();// #0 means intermediate (skip) 00431 G4LorentzVector ch4M=curHadr->Get4Momentum(); // 4-momenyum of the current projectile 00432 #ifdef debug 00433 G4cout<<"G4QE:C:"<<ih<<",F="<<hNFrag<<",0="<<projHadrons[0]->GetNFragments()<<G4endl; 00434 #endif 00435 if(!hNFrag&&ch4M.e()>0.) // => "Final hadron" case 00436 { 00437 G4int envPDG=theEnvironment.GetPDG(); 00438 if(envPDG==90000000||(theEnvironment.Get4Momentum().m2())<1.) // ==>"Vacuum" 00439 { 00440 G4int hPDG = curHadr->GetPDGCode();// A PDG Code of the projQHadron 00441 //if(!hPDG||hPDG==10) // Check for the validity of the QHadron (@@ 10 OK?) 00442 if(!hPDG) // Check for the validity of the QHadron 00443 { 00444 //G4cerr<<"--Warning--G4QEnvironment::Constructor: wrong PDG("<<ih<<")="<<hPDG 00445 // <<", HQC="<<curHadr->GetQC()<<", HM="<<curHadr->GetMass()<<G4endl; 00446 //throw G4QException("***G4QEnvironment::Constructor: theInputHadron is Chip"); 00447 } 00448 else 00449 { 00450 G4int hQ = curHadr->GetQCode(); // One more check for valid of the QHadron 00451 if(hQ<0) 00452 { 00453 //G4cerr<<"--Warning--G4QEnv::Constructor:Q<0, PDG=("<<ih<<")"<<hPDG<<G4endl; 00454 //throw G4QException("***G4QEnvironment::Constructor:theInputHadron is bad"); 00455 } 00456 else 00457 { 00458 G4QHadron* newHadr = new G4QHadron(curHadr); 00459 #ifdef debug 00460 G4cout<<"*G4QE::Const:H="<<newHadr->GetQC()<<newHadr->Get4Momentum()<<G4endl; 00461 #endif 00462 theQHadrons.push_back(newHadr); // Fill existing hadron (delete equivalent) 00463 #ifdef debug 00464 G4cout<<"G4QEnviron::Constructor: Fill h="<<hPDG<<ch4M<<G4endl; 00465 for(unsigned ipo=0; ipo<theQHadrons.size(); ipo++) // LOOP just for printing 00466 { 00467 G4int hPDG = theQHadrons[ipo]->GetPDGCode(); 00468 G4LorentzVector h4Mom = theQHadrons[ipo]->Get4Momentum(); 00469 G4int hNFrag= theQHadrons[ipo]->GetNFragments(); 00470 G4QContent hQC = theQHadrons[ipo]->GetQC(); 00471 G4cout<<"h#"<<ipo<<": "<<hPDG<<hQC<<",4M="<<h4Mom<<",nFr="<<hNFrag<<G4endl; 00472 } 00473 #endif 00474 } // End of Q-Code check 00475 } // End of proper PDG for i-th Hadron 00476 } 00477 else // Nuclear Environment still exists 00478 { 00479 G4QContent hQC = curHadr->GetQC(); 00480 #ifdef debug 00481 G4cout<<"G4QE::Const:CreateQuasm, 4M="<<ch4M<<",QC="<<hQC<<",E="<<envPDG<<",tC=" 00482 <<totCharge<<",tB="<<totBaryoN<<G4endl; 00483 #endif 00484 CreateQuasmon(hQC, ch4M, fake); 00485 } // End of Existing Nuclear Environment case 00486 } // End of final hadron case 00487 } // End of the LOOP over input hadrons 00488 } // End of nuclear target case (including neutron=90000001 & proton=90001000) 00489 else // => "Unique hadron" case 00490 { 00491 // the nuclEnviron is already init'ed as vacuum + get the first hadron for interaction 00492 G4QHadron* curHadr=projHadrons[0]; // Pointer to the firstProjecHadron (checked) 00493 G4int hPDG = curHadr->GetPDGCode(); // A PDG Code of the projQHadron 00494 if(!hPDG||hPDG==10) // Check for the validity of the QHadron 00495 { 00496 G4cout<<"---Warning---G4QEnvironment::Constructor:Vacuum,1st Hadron wrong PDG="<<hPDG 00497 <<", HQC="<<curHadr->GetQC()<<", HM="<<curHadr->GetMass()<<G4endl; 00498 //throw G4QException("***G4QEnvironment::Constructor: Fiest input Hadron is wrong"); 00499 } 00500 else 00501 { 00502 G4int hQ = curHadr->GetQCode(); // One more check for valid of the QHadron 00503 if(hQ<0) 00504 { 00505 G4cout<<"---Warning---G4QEnviron::Constructor:Vacuum,Q<0, 1st HPDG="<<hPDG<<G4endl; 00506 //throw G4QException("***G4QEnvironment::Constructor:theFirstInputHadron's wrong"); 00507 } 00508 else // Now we can get 4Mom & QC of incedent particle 00509 { 00510 G4LorentzVector h4Mom = curHadr->Get4Momentum(); 00511 G4QContent hQC = curHadr->GetQC(); 00512 if(!targPDG||targPDG==10) G4cout<<"G4QEnv::CreateQ; (1) PDG="<<targPDG<<G4endl; 00513 G4QPDGCode tQPDG(targPDG); 00514 G4int tQ = tQPDG.GetQCode(); 00515 if(tQ<0||targPDG==10) 00516 { 00517 G4cout<<"---Warning---G4QEnv::Constructor:TrgQC<0, Chipo?,PDG="<<targPDG<<G4endl; 00518 //throw G4QException("***G4QEnvironment::Constructor: Target is wrong"); 00519 } 00520 else // Now we can create a unique Quasmon 00521 { 00522 h4Mom+=G4LorentzVector(0.,0.,0.,tQPDG.GetMass()); //Projectile + TargetHadron 00523 hQC+=tQPDG.GetQuarkContent(); 00524 #ifdef debug 00525 G4cout<<"G4QEnv::Const:VacHadrTarg="<<h4Mom<<hQC<<",E="<<theEnvironment<<G4endl; 00526 #endif 00527 G4Quasmon* curQuasmon = new G4Quasmon(hQC, h4Mom); 00528 theQuasmons.push_back(curQuasmon); // Insert Quasmon or hadron/gamma (del. eq.) 00529 } 00530 } // End of Q-Code check 00531 } // End of proper PDG for i-th Hadron 00532 if(nHadrons>1) for(G4int ih=0; ih<nHadrons; ih++) // fill other Hadrons to Output 00533 { 00534 G4QHadron* newHadr = new G4QHadron(curHadr); 00535 #ifdef debug 00536 G4cout<<"*G4QE::Const:#"<<ih<<","<<curHadr->GetQC()<<curHadr->Get4Momentum()<<G4endl; 00537 #endif 00538 theQHadrons.push_back(newHadr); // Fill existing hadron (delete equivalent) 00539 } 00540 } // End of Unique Hadron target treatment 00541 #ifdef chdebug 00542 G4int finCharge=theEnvironment.GetCharge(); 00543 G4int finBaryoN=theEnvironment.GetA(); 00544 G4int nHad=theQHadrons.size(); 00545 if(nHad) for(G4int ih=0; ih<nHad; ih++) 00546 { 00547 finCharge+=theQHadrons[ih]->GetCharge(); 00548 finBaryoN+=theQHadrons[ih]->GetBaryonNumber(); 00549 } 00550 G4int nQuas=theQuasmons.size(); 00551 if(nQuas) for(G4int iq=0; iq<nQuas; iq++) 00552 { 00553 finCharge+=theQuasmons[iq]->GetCharge(); 00554 finBaryoN+=theQuasmons[iq]->GetBaryonNumber(); 00555 } 00556 if(finCharge!=totCharge || finBaryoN!=totBaryoN) 00557 { 00558 G4cout<<"*::*G4QEnv::C:(0) tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryoN 00559 <<",B="<<finBaryoN<<",E="<<theEnvironment<<G4endl; 00560 if(nHad) for(G4int h=0; h<nHad; h++) 00561 { 00562 G4QHadron* cH = theQHadrons[h]; 00563 G4cout<<"*:*G4QE::C:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl; 00564 } 00565 if(nQuas) for(G4int q=0; q<nQuas; q++) 00566 { 00567 G4Quasmon* cQ = theQuasmons[q]; 00568 G4cout<<"::G4QE::C:q#"<<q<<",C="<<cQ->GetCharge()<<",QuarkCon="<<cQ->GetQC()<<G4endl; 00569 } 00570 } 00571 #endif 00572 } // End of the G4QEnvironment constructor
G4QEnvironment::G4QEnvironment | ( | const G4QEnvironment & | right | ) |
Definition at line 575 of file G4QEnvironment.cc.
References f2all, G4cout, G4endl, G4QFreeScattering::GetPointer(), nBarClust, theEnvironment, theProjectiles, theQCandidates, theQHadrons, theQuasmons, theTargetPDG, theWorld, tot4Mom, totBaryoN, and totCharge.
00576 { 00577 // theQHadrons (Vector) 00578 theQFScat = G4QFreeScattering::GetPointer(); 00579 G4int nQH = right.theQHadrons.size(); 00580 if(nQH) for(G4int ih=0; ih<nQH; ih++) 00581 { 00582 G4QHadron* curQH = new G4QHadron(right.theQHadrons[ih]); 00583 #ifdef debug 00584 G4cout<<"G4QE::CopyByVal:cH#"<<ih<<","<<curQH->GetQC()<<curQH->Get4Momentum()<<G4endl; 00585 #endif 00586 theQHadrons.push_back(curQH); // (delete equivalent) 00587 } 00588 // theProjectiles (Vector) 00589 G4int nP = right.theProjectiles.size(); 00590 if(nP) for(G4int ip=0; ip<nP; ip++) 00591 { 00592 G4QHadron* curP = new G4QHadron(right.theProjectiles[ip]); 00593 theProjectiles.push_back(curP); // (delete equivalent) 00594 } 00595 theTargetPDG = right.theTargetPDG; 00596 theWorld = right.theWorld; 00597 nBarClust = right.nBarClust; 00598 f2all = right.f2all; 00599 tot4Mom = right.tot4Mom; 00600 totCharge = right.totCharge; 00601 totBaryoN = right.totBaryoN; 00602 00603 // theQuasmons (Vector) 00604 G4int nQ = right.theQuasmons.size(); 00605 if(nQ) for(G4int iq=0; iq<nQ; iq++) 00606 { 00607 G4Quasmon* curQ = new G4Quasmon(right.theQuasmons[iq]); 00608 theQuasmons.push_back(curQ); // (delete equivalent) 00609 } 00610 00611 // theQCandidates (Vector) 00612 G4int nQC = right.theQCandidates.size(); 00613 if(nQC) for(G4int ic=0; ic<nQC; ic++) 00614 { 00615 G4QCandidate* curQC = new G4QCandidate(right.theQCandidates[ic]); 00616 theQCandidates.push_back(curQC); // (delete equivalent) 00617 } 00618 00619 theEnvironment = right.theEnvironment; 00620 }
G4QEnvironment::G4QEnvironment | ( | G4QEnvironment * | right | ) |
Definition at line 622 of file G4QEnvironment.cc.
References f2all, G4cout, G4endl, G4QFreeScattering::GetPointer(), nBarClust, theEnvironment, theProjectiles, theQCandidates, theQHadrons, theQuasmons, theTargetPDG, theWorld, tot4Mom, totBaryoN, and totCharge.
00623 { 00624 // theQHadrons (Vector) 00625 theQFScat = G4QFreeScattering::GetPointer(); 00626 G4int nQH = right->theQHadrons.size(); 00627 if(nQH) for(G4int ih=0; ih<nQH; ih++) 00628 { 00629 G4QHadron* curQH = new G4QHadron(right->theQHadrons[ih]); 00630 #ifdef debug 00631 G4cout<<"G4QE::CopyByPtr:cH#"<<ih<<","<<curQH->GetQC()<<curQH->Get4Momentum()<<G4endl; 00632 #endif 00633 theQHadrons.push_back(curQH); // (delete equivalent) 00634 } 00635 00636 // theProjectiles (Vector) 00637 G4int nP = right->theProjectiles.size(); 00638 if(nP) for(G4int ip=0; ip<nP; ip++) 00639 { 00640 G4QHadron* curP = new G4QHadron(right->theProjectiles[ip]); 00641 theProjectiles.push_back(curP); // (delete equivalent) 00642 } 00643 theTargetPDG = right->theTargetPDG; 00644 theWorld = right->theWorld; 00645 nBarClust = right->nBarClust; 00646 f2all = right->f2all; 00647 tot4Mom = right->tot4Mom; 00648 totCharge = right->totCharge; 00649 totBaryoN = right->totBaryoN; 00650 00651 // theQuasmons (Vector) 00652 G4int nQ = right->theQuasmons.size(); 00653 if(nQ) for(G4int iq=0; iq<nQ; iq++) 00654 { 00655 G4Quasmon* curQ = new G4Quasmon(right->theQuasmons[iq]); 00656 theQuasmons.push_back(curQ); // (delete equivalent) 00657 } 00658 00659 // theQCandidates (Vector) 00660 G4int nQC = right->theQCandidates.size(); 00661 if(nQC) for(G4int ic=0; ic<nQC; ic++) 00662 { 00663 G4QCandidate* curQC = new G4QCandidate(right->theQCandidates[ic]); 00664 theQCandidates.push_back(curQC); // (delete equivalent) 00665 } 00666 00667 theEnvironment = right->theEnvironment; 00668 }
G4QEnvironment::~G4QEnvironment | ( | ) |
Definition at line 670 of file G4QEnvironment.cc.
References G4cout, and G4endl.
00671 { 00672 #ifdef debug 00673 G4cout<<"~G4QEnvironment: before theQCandidates nC="<<theQCandidates.size()<<G4endl; 00674 #endif 00675 for_each(theQCandidates.begin(), theQCandidates.end(), DeleteQCandidate()); 00676 #ifdef debug 00677 G4cout<<"~G4QEnvironment: before theQuasmons nQ="<<theQuasmons.size()<<G4endl; 00678 #endif 00679 for_each(theQuasmons.begin(), theQuasmons.end(), DeleteQuasmon()); 00680 #ifdef debug 00681 G4cout<<"~G4QEnvironment: before theQHadrons nH="<<theQHadrons.size()<<G4endl; 00682 #endif 00683 for_each(theQHadrons.begin(), theQHadrons.end(), DeleteQHadron()); 00684 #ifdef debug 00685 G4cout<<"~G4QEnvironment: before theProjectiles nP="<<theProjectiles.size()<<G4endl; 00686 #endif 00687 for_each(theProjectiles.begin(), theProjectiles.end(), DeleteQHadron()); 00688 #ifdef debug 00689 G4cout<<"~G4QEnvironment: === DONE ==="<<G4endl; 00690 #endif 00691 }
void G4QEnvironment::AddQuasmon | ( | G4Quasmon * | Q | ) |
Definition at line 10522 of file G4QEnvironment.cc.
References G4cout, G4Quasmon::Get4Momentum(), G4Quasmon::GetBaryonNumber(), and G4Quasmon::GetCharge().
Referenced by G4QIonIonCollision::Fragment(), G4QFragmentation::Fragment(), and G4QDiffractionRatio::TargFragment().
10523 { 10524 theQuasmons.push_back(Q); 10525 totCharge+=Q->GetCharge(); 10526 totBaryoN+=Q->GetBaryonNumber(); 10527 tot4Mom +=Q->Get4Momentum(); 10528 #ifdef debug 10529 G4cout<<"G4QEnv::AddQuasmon:t4M="<<tot4Mom<<",tC="<<totCharge<<",tB="<<totBaryoN<<G4endl; 10530 #endif 10531 }
void G4QEnvironment::CheckMassShell | ( | G4QHadronVector * | HV | ) |
Definition at line 10534 of file G4QEnvironment.cc.
References G4cout, G4QHadron::Get4Momentum(), G4QPDGCode::GetMass(), G4QHadron::GetQPDG(), and G4QHadron::Set4Momentum().
Referenced by Fragment().
10535 { 10536 static const G4double eps=.003; 10537 G4int nHadrons = HV->size(); 10538 if(nHadrons) 10539 { 10540 for(G4int ih=0; ih<nHadrons; ++ih) // LOOP over output QHadrons 10541 { 10542 G4QHadron* inH = (*HV)[ih]; // Pointer to the i-th QHadron 10543 G4int hNF = inH->GetNFragments(); // A#of secondary fragments 10544 if(!hNF) // Fill only final hadrons 10545 { 10546 G4LorentzVector q4M = inH->Get4Momentum(); // Get 4-momentum of the Hadron 10547 G4double qM2 = q4M.m2(); // Squared Mass of the Hadron 10548 G4double qGM = inH->GetQPDG().GetMass(); // Get Ground State Mass 10549 G4double qGM2= qGM*qGM; // Squared Ground State Mass 10550 #ifdef debug 10551 G4cout << "G4QEnv::ChkMassShell:#" << ih <<", hPDG="<< inH->GetPDGCode() <<", dM2=" 10552 << qM2 - qGM*qGM << G4endl; 10553 #endif 10554 if( fabs(qM2 - qGM*qGM) > eps) // Correct the mass shell 10555 { 10556 G4double mins= 10000000000.; // Minimum excitation found 10557 G4int nj = -1; // Minimum j-index 10558 for(G4int jh=0; jh<nHadrons; ++jh) // LOOP over output QHadrons 10559 { 10560 if(jh != ih) 10561 { 10562 G4QHadron* jnH = (*HV)[jh]; // Pointer to the j-th QHadron 10563 hNF = inH->GetNFragments(); // A#of secondary fragments 10564 if(!hNF) // Fill only final hadrons 10565 { 10566 G4LorentzVector j4M = jnH->Get4Momentum(); // Get 4-mom of the Hadron 10567 G4double jGM = jnH->GetQPDG().GetMass(); // Get Ground State Mass 10568 G4double jGM2= jGM*jGM; // Doubled GS Mass 10569 G4LorentzVector s4M = j4M+q4M; // Compound 4-mom 10570 G4double jqM = qGM * jGM; // Worling var. 10571 G4double s2M = s4M.m2()-qGM2-jGM2-jqM-jqM;// Closeness parameter 10572 if(s2M > eps && s2M < mins) 10573 { 10574 mins = s2M; 10575 nj = jh; 10576 } 10577 } 10578 } 10579 } // End of the searching LOOP for the rest of hadrons 10580 //if(nj<0) G4cout<<"-W-G4QE::ChkMShell:NotCorr,M2="<<qM2<<",GSM2="<<qGM2<<G4endl; 10581 //else // It's possible to correct 10582 if(nj >= 0) // It's possible to correct 10583 { 10584 G4QHadron* jnH = (*HV)[nj]; // Pointer to j-th QHadron 10585 G4LorentzVector j4M = jnH->Get4Momentum(); // Get 4-mom of the Hadron 10586 G4double jGM = jnH->GetQPDG().GetMass(); // Get Ground State Mass 10587 G4LorentzVector c4M = q4M + j4M; // Get 4-mom of Compound 10588 G4LorentzVector i4Mom(0.,0.,0.,qGM); 10589 G4LorentzVector j4Mom(0.,0.,0.,jGM); 10590 /* 10591 // DHW 16 June 2011: variable set but not used. Comment out to fix compiler 10592 // warning. 10593 G4bool done = true; 10594 */ 10595 if(!G4QHadron(c4M).DecayIn2(i4Mom, j4Mom)) 10596 { 10597 G4cout<<"-Warning-G4QEnv::ChkMShell: tM="<< c4M.m() <<", iM="<< qGM <<", jM=" 10598 << jGM <<", d="<< c4M.m()-qGM-jGM << G4endl; 10599 /* 10600 // DHW 16 June 2011: set but not used. 10601 done = false; 10602 */ 10603 } 10604 else 10605 { 10606 inH->Set4Momentum(i4Mom); 10607 jnH->Set4Momentum(j4Mom); 10608 } 10609 } 10610 } 10611 } 10612 } 10613 } 10614 }
void G4QEnvironment::CleanUpQHadrons | ( | ) | [protected] |
Definition at line 8290 of file G4QEnvironment.cc.
08291 { 08292 for_each(theQHadrons.begin(), theQHadrons.end(), DeleteQHadron()); 08293 theQHadrons.clear(); 08294 } // End of CleanUpQHadrons
void G4QEnvironment::CloseElectromagneticDecays | ( | ) | [static] |
void G4QEnvironment::DecayAntistrange | ( | G4QHadron * | aS, | |
G4QHadronVector * | HV | |||
) |
Definition at line 9534 of file G4QEnvironment.cc.
References FatalException, G4cerr, G4cout, G4Exception(), G4QHadron::Get4Momentum(), G4QHadron::GetBaryonNumber(), G4QHadron::GetCharge(), G4QPDGCode::GetMass(), G4QHadron::GetPDGCode(), and G4QHadron::GetStrangeness().
Referenced by G4QFragmentation::EvaporateResidual().
09535 { 09536 static const G4QPDGCode kpQPDG(321); // QPDG for Antistrange positive kaon 09537 static const G4QPDGCode kzQPDG(311); // QPDG for Antistrange neutral anti-kaon 09538 static const G4double mK =G4QPDGCode(321).GetMass(); // Mass of antistrange positive Kaon 09539 static const G4double mK0=G4QPDGCode(311).GetMass(); // Mass of antistrange neutral aK0 09540 static const G4double eps=0.003; 09541 //static const G4QNucleus vacuum(90000000); 09542 G4int theLS= qH->GetStrangeness(); // Strangness of the Nucleus 09543 if(theLS>=0) 09544 { 09545 G4cerr<<"***G4QEnvironment::DecayAntistrange: S="<<theLS<<", but must be <0"<<G4endl; 09546 //#ifdef ppdebug 09547 // throw G4QException("G4QEnv::DecayAntistrange: Not Antistrange nucleus"); 09548 G4Exception("G4QEnvironment::DecayAntistrange()", "HAD_CHPS_0000", 09549 FatalException, "Not Antistrange nucleus"); 09550 //#endif 09551 //HV->push_back(qH); // Fill AsIs (delete equivalent) 09552 return; 09553 } 09554 //else if(theLS<-1) 09555 //{ 09556 // G4cout<<"*Warning*G4QEnviron::DecayAntistrange: S="<<theLS<<",AsIs->Improve"<<G4endl; 09557 // HV->push_back(qH); // Fill AsIs (delete equivalent) 09558 // return; 09559 //} 09560 G4int astr=-theLS; // Number of K+ (or anti-K0) 09561 G4int theLB= qH->GetBaryonNumber(); // Baryon number of the Nucleus 09562 G4int theLC= qH->GetCharge(); // Chsrge of the Nucleus 09563 G4int qPDG = qH->GetPDGCode(); // PDG Code of the decaying Nucleus 09564 G4int K0PDG= qPDG+astr*999999; // Residual nonStrange nucleus for S*antiK0 09565 G4QPDGCode K0QPDG(K0PDG); // QPDG of the nuclear residual for S*antiK0 09566 G4double rK0M=K0QPDG.GetMass(); // Mass of the nuclear residual for S*antiK0 09567 G4int KpPDG= qPDG+astr*999000; // Residual nonStrange nucleus for S*K+ 09568 G4QPDGCode KpQPDG(KpPDG); // QPDG of the nuclear residual for S*K+ 09569 G4double rKpM=KpQPDG.GetMass(); // Mass of the nuclear residual for S*K+ 09570 G4LorentzVector q4M = qH->Get4Momentum(); // Get 4-momentum of the Nucleus 09571 G4double qM = q4M.m(); // Mass of the Nucleus 09572 #ifdef debug 09573 G4cout<<"G4QE::DecayAntistrang:S="<<theLS<<",C="<<theLC<<",B="<<theLB<<",M="<<qM<<G4endl; 09574 #endif 09575 // Select a chanel of the decay: @@ The Kaon binding energy is not taken into account !! 09576 G4QPDGCode fQPDG = kzQPDG; // Prototype for Kaon (anti-K0) 09577 G4double fMass= mK0; 09578 G4QPDGCode sQPDG = K0QPDG; // Prototype for residual nucleus to Kaon 09579 G4double sMass= rK0M; 09580 if(astr*mK0+rK0M>qM) // Can not be K0 09581 { 09582 if(astr*mK+rKpM>qM) // Can not be K+ too 09583 { 09584 #ifdef debug 09585 // @@ Survices, but... 09586 G4cout<<"*Warning*G4QEnvironment::DecayAntistrange: Too low mass, keep AsIs"<<G4endl; 09587 #endif 09588 HV->push_back(qH); // Fill AsIs (delete equivalent) 09589 return; 09590 } 09591 else // Switch to K+ 09592 { 09593 fQPDG = kpQPDG; // Positive Kaon 09594 fMass= mK; 09595 sQPDG = KpQPDG; // Residual nucleus to K+ 09596 sMass= rKpM; 09597 } 09598 } 09599 else if(astr*mK+rKpM<qM && theLC>theLB-theLC) // Switch to K+ if Z>N 09600 { 09601 fQPDG = kpQPDG; // Positive Kaon 09602 fMass= mK; 09603 sQPDG = KpQPDG; // Residual nucleus to K+ 09604 sMass= rKpM; 09605 } 09606 G4double afMass=fMass; 09607 if(astr>1) afMass*=astr; 09608 G4LorentzVector f4Mom(0.,0.,0.,afMass); 09609 G4LorentzVector s4Mom(0.,0.,0.,sMass); 09610 G4double sum=afMass+sMass; 09611 if(fabs(qM-sum)<eps) 09612 { 09613 f4Mom=q4M*(afMass/sum); 09614 s4Mom=q4M*(sMass/sum); 09615 } 09616 else if(qM<sum || !G4QHadron(q4M).DecayIn2(f4Mom, s4Mom)) 09617 { 09618 #ifdef debug 09619 G4cout<<"--Warning--G4QE::DecAntistrange: fPDG="<<fQPDG<<"(M="<<fMass<<")+sPDG="<<sQPDG 09620 <<"(M="<<sMass<<") > TotM="<<q4M.m()<<G4endl; 09621 #endif 09622 // G4cerr<<"***G4QEnv::DecayAntistrange: M="<<qM<<", sum="<<sum<<G4endl; 09623 // throw G4QException("G4QEnv::DecayAntistrange: Nucleus DecayIn2 error"); 09624 G4ExceptionDescription ed; 09625 ed << "Nucleus DecayIn2 error: DecayAntistrange: M=" << qM << ", sum=" 09626 << sum << G4endl; 09627 G4Exception("G4QEnvironment::DecayAntistrange()", "HAD_CHPS_0001", 09628 FatalException, ed); 09629 } 09630 #ifdef debug 09631 G4cout<<"G4QEnv::DecayAntistrange: *Done* f4M="<<f4Mom<<",fPDG="<<fQPDG<<", s4M="<<s4Mom 09632 <<",sPDG="<<sQPDG<<G4endl; 09633 #endif 09634 delete qH; 09635 // 09636 if(astr>1) f4Mom/=astr; 09637 G4QHadron* H1 = new G4QHadron(fQPDG,f4Mom); // Create a Hadron for the 1-st kaon 09638 HV->push_back(H1); // Fill "H1" (delete equivalent) 09639 for(G4int ia=1; ia < astr; ++ia) 09640 { 09641 H1 = new G4QHadron(fQPDG,f4Mom); // Create a Hadron for other kaons 09642 HV->push_back(H1); // Fill "H1" (delete equivalent) 09643 } 09644 G4QHadron* H2 = new G4QHadron(sQPDG,s4Mom); // Create a Hadron for the Residual Nucleus 09645 HV->push_back(H2); // Fill "H2" (delete equivalent) 09646 } // End of DecayAntistrange
void G4QEnvironment::DecayBaryon | ( | G4QHadron * | dB, | |
G4QHadronVector * | HV | |||
) |
Definition at line 8318 of file G4QEnvironment.cc.
References FatalException, G4cerr, G4cout, G4Exception(), G4UniformRand, G4QHadron::Get4Momentum(), G4QNucleus::GetA(), G4QHadron::GetBaryonNumber(), G4QHadron::GetCharge(), G4QHadron::GetQC(), G4QHadron::GetStrangeness(), and G4QHadron::SetQPDG().
Referenced by G4QFragmentation::EvaporateResidual().
08319 { 08320 static const G4QPDGCode gQPDG(22); 08321 static const G4QPDGCode pizQPDG(111); 08322 static const G4QPDGCode pipQPDG(211); 08323 static const G4QPDGCode pimQPDG(-211); 08324 static const G4QPDGCode kmQPDG(-321); 08325 static const G4QPDGCode kzQPDG(-311); 08326 static const G4QPDGCode nQPDG(2112); 08327 static const G4QPDGCode pQPDG(2212); 08328 static const G4QPDGCode lQPDG(3122); 08329 static const G4QPDGCode laQPDG(3122); 08330 static const G4QPDGCode smQPDG(3112); 08331 static const G4QPDGCode szQPDG(3212); 08332 static const G4QPDGCode spQPDG(3222); 08333 static const G4QPDGCode kszQPDG(3322); 08334 static const G4QPDGCode ksmQPDG(3312); 08335 static const G4double mPi = G4QPDGCode(211).GetMass(); 08336 static const G4double mPi0 = G4QPDGCode(111).GetMass(); 08337 static const G4double mK = G4QPDGCode(321).GetMass(); 08338 static const G4double mK0 = G4QPDGCode(311).GetMass(); 08339 static const G4double mNeut= G4QPDGCode(2112).GetMass(); 08340 static const G4double mProt= G4QPDGCode(2212).GetMass(); 08341 static const G4double mSigM= G4QPDGCode(3112).GetMass(); 08342 static const G4double mLamb= G4QPDGCode(3122).GetMass(); 08343 static const G4double mSigZ= G4QPDGCode(3212).GetMass(); 08344 static const G4double mSigP= G4QPDGCode(3222).GetMass(); 08345 //static const G4double mKsiM= G4QPDGCode(3312).GetMass(); 08346 //static const G4double mKsi0= G4QPDGCode(3322).GetMass(); 08347 //static const G4double mOmeg= G4QPDGCode(3334).GetMass(); 08348 static const G4double mNPi0 = mPi0+ mNeut; 08349 static const G4double mNPi = mPi + mNeut; 08350 static const G4double mPPi0 = mPi0+ mProt; 08351 static const G4double mPPi = mPi + mProt; 08352 static const G4double mLPi0 = mPi0+ mLamb; 08353 static const G4double mLPi = mPi + mLamb; 08354 static const G4double mSpPi = mPi + mSigP; 08355 static const G4double mSmPi = mPi + mSigM; 08356 static const G4double mPK = mK + mProt; 08357 static const G4double mPKZ = mK0 + mProt; 08358 static const G4double mNKZ = mK0 + mNeut; 08359 static const G4double mSpPi0= mPi0+ mSigP; 08360 static const G4double mSzPi0= mPi0+ mSigZ; 08361 static const G4double mSzPi = mPi + mSigZ; 08362 static const G4double eps = 0.003; 08363 //static const G4QNucleus vacuum(90000000); 08364 G4int theLB= qH->GetBaryonNumber(); // Baryon number of the Baryon 08365 if(theLB!=1) 08366 { 08367 G4cerr<<"***G4QEnvironment::DecayBaryon: A!=1 -> fill as it is"<<G4endl; 08368 #ifdef ppdebug 08369 // throw G4QException("G4QEnv::DecayBaryon: Unknown Baryon with A!=1"); 08370 G4Exception("G4QEnvironment::DecayBaryon()", "HAD_CHPS_0000", 08371 FatalException, "Unknown Baryon with A!=1"); 08372 #endif 08373 HV->push_back(qH); // Fill AsIs (delete equivalent) 08374 return; 08375 } 08376 G4int theLC= qH->GetCharge(); // Chsrge of the Baryon 08377 G4int theLS= qH->GetStrangeness(); // Strangness of the Baryon 08378 //G4int qPDG = qH->GetPDGCode(); // PDG Code of the decaying baryon 08379 G4LorentzVector q4M = qH->Get4Momentum(); // Get 4-momentum of the Baryon 08380 G4double qM = q4M.m(); // Mass of the Baryon 08381 #ifdef debug 08382 G4cout<<"G4QEnv::DecayBaryon: *Called* S="<<theLS<<",C="<<theLC<<",4M="<<q4M<<qM<<G4endl; 08383 #endif 08384 // Select a chanel of the baryon decay 08385 G4QPDGCode fQPDG = pQPDG; // Prototype for Proton 08386 G4double fMass= mProt; 08387 G4QPDGCode sQPDG = pizQPDG; // Prototype for Pi0 08388 G4double sMass= mPi0; 08389 if(!theLS) // This is only for not strange baryons 08390 { 08391 if(!theLC) // Neutron like: n+gam, n+Pi0, p+Pi- are possible 08392 { 08393 if(qM<mNPi0) // Only n+gamma decay is possible 08394 { 08395 if(qM < mNeut+eps) 08396 { 08397 #ifdef debug 08398 G4cout<<"G4QEnv::DecayBaryon: Fill Neutron AsIs"<<G4endl; 08399 #endif 08400 qH->SetQPDG(nQPDG); 08401 HV->push_back(qH); // Fill AsIs (delete equivalent) 08402 if(qM+eps<mNeut) G4cout<<"-Warning-G4QEnv::DecayBaryon: N0 AsIs, M="<<qM<<G4endl; 08403 return; 08404 } 08405 fQPDG=nQPDG; // Baryon is neutron 08406 fMass=mNeut; 08407 sQPDG=gQPDG; // Meson is gamma 08408 sMass=0.; 08409 #ifdef debug 08410 G4cout<<"-Warning-G4QEnv::DecayBaryon: Gamma+n, M="<<qM<<",d="<<qM-mNeut<<G4endl; 08411 #endif 08412 } 08413 else if(qM>mPPi) // Both n+pi0 (p=2/3) & p+Pi- (p=1/3) are possible 08414 { 08415 if(G4UniformRand()>.333333333) // Clebsh value for the Isobar decay 08416 { 08417 fQPDG=nQPDG; // Baryon is neutron (meson is Pi0) 08418 fMass=mNeut; 08419 } 08420 else 08421 { 08422 sQPDG=pimQPDG; // Meson is Pi- (baryon is proton) 08423 sMass=mPi; 08424 } 08425 } 08426 else // Only n+Pi0 decay is possible 08427 { 08428 fQPDG=nQPDG; // Baryon is neutron 08429 fMass=mNeut; 08430 } 08431 } 08432 else if(theLC==1) // Proton like: p+gam, p+Pi0, n+Pi+ are possible 08433 { 08434 if(qM<mPPi0) // Only p+gamma decay is possible 08435 { 08436 if(qM < mProt+eps) 08437 { 08438 #ifdef debug 08439 G4cout<<"G4QEnv::DecayBaryon: Fill Proton AsIs"<<G4endl; 08440 #endif 08441 qH->SetQPDG(pQPDG); 08442 HV->push_back(qH); // Fill AsIs (delete equivalent) 08443 #ifdef debug 08444 if(qM+eps<mProt)G4cout<<"-Warning-G4QEnv::DecayBaryon: Pr+ AsIs, M="<<qM<<G4endl; 08445 #endif 08446 return; 08447 } 08448 sQPDG=gQPDG; // Meson is gamma (baryon is proton) 08449 sMass=0.; 08450 } 08451 else if(qM>mNPi) // Both p+pi0 (p=2/3) & n+Pi+ (p=1/3) are possible 08452 { 08453 if(G4UniformRand()<.333333333) // Clebsh value for the Isobar decay 08454 { 08455 fQPDG=nQPDG; // Baryon is neutron 08456 fMass=mNeut; 08457 sQPDG=pipQPDG; // Meson is Pi+ 08458 sMass=mPi; 08459 } 08460 // p+Pi0 is a default case 08461 } 08462 // p+Pi0 is a default case 08463 } 08464 else if(theLC==2) // Delta++ like: only p+PiP is possible 08465 { 08466 if(qM>mPPi) // Only p+gamma decay is possible 08467 { 08468 sQPDG=pipQPDG; // Meson is Pi+ (baryon is proton) 08469 sMass=mPi; 08470 } 08471 else // @@ Can be aReason to search for anError in Fragmentation 08472 { 08473 #ifdef debug 08474 G4cout<<"-Warning-G4QE::DecBary:*AsIs* DEL++ M="<<qM<<"<"<<mPPi<<G4endl; 08475 #endif 08476 HV->push_back(qH); // Fill AsIs (delete equivalent) 08477 return; 08478 } 08479 } 08480 else if(theLC==-1) // Delta- like: only n+PiM is possible 08481 { 08482 if(qM+eps>mNPi) // Only p+gamma decay is possible 08483 { 08484 fQPDG=nQPDG; // Baryon is neutron 08485 fMass=mNeut; 08486 sQPDG=pimQPDG; // Meson is Pi- 08487 sMass=mPi; 08488 } 08489 else // @@ Can be aReason to search for anError in Fragmentation 08490 { 08491 #ifdef debug 08492 G4cout<<"-Warning-G4QE::DecBary:*AsIs* DEL++ M="<<qM<<"<"<<mNPi<<G4endl; 08493 #endif 08494 HV->push_back(qH); // Fill AsIs (delete equivalent) 08495 return; 08496 } 08497 } 08498 else 08499 { 08500 #ifdef debug 08501 G4cout<<"-Warning-G4QE::DecBary:*AsIs* UnknBaryon (S=0) QC="<<qH->GetQC()<<G4endl; 08502 #endif 08503 HV->push_back(qH); // Fill AsIs (delete equivalent) 08504 return; 08505 } 08506 } 08507 else if(theLS==1) // ==>->->-> S=1 <-<-<-<== 08508 { 08509 if(!theLC) // -->> Lambda/Sz: L+g,L+Pi0,Sz+Pi0,Sm+Pip,Sp+Pim,p+Km,n+Kz 08510 { 08511 if(qM<mLPi0) // Only Lambda+gamma decay is possible 08512 { 08513 if(qM < mLamb+eps) 08514 { 08515 #ifdef debug 08516 G4cout<<"G4QEnv::DecayBaryon: Fill Lambda AsIs"<<G4endl; 08517 #endif 08518 qH->SetQPDG(lQPDG); 08519 HV->push_back(qH); // Fill AsIs (delete equivalent) 08520 if(qM+eps<mLamb)G4cout<<"-Warning-G4QEnv::DecayBaryon: La0 AsIs, M="<<qM<<G4endl; 08521 return; 08522 } 08523 fQPDG=lQPDG; // Baryon is Lambda 08524 fMass=mLamb; 08525 sQPDG=gQPDG; // Meson is gamma 08526 sMass=0.; 08527 } 08528 else if(qM<mSzPi0) // Only Lambda+Pi0 is possible 08529 { 08530 fQPDG=lQPDG; // Baryon is Lambda 08531 fMass=mLamb; 08532 } 08533 else if(qM<mSpPi) // Both Lambda+Pi0 & Sigma0+Pi0 are possible 08534 { 08535 if(G4UniformRand()>.6) // @@ Relative probability (take into account Phase Space) 08536 { 08537 fQPDG=szQPDG; // Baryon is Sigma0 08538 fMass=mSigZ; 08539 } 08540 else 08541 { 08542 fQPDG=lQPDG; // Baryon is Lambda 08543 fMass=mLamb; 08544 } 08545 } 08546 else if(qM<mSmPi) // Lambda+Pi0, Sigma0+Pi0, & SigmaP+PiM are possible 08547 { 08548 G4double ra=G4UniformRand(); 08549 if(ra<.4) // @@ Rel. probab. (take into account Phase Space) 08550 { 08551 fQPDG=lQPDG; // Baryon is Lambda 08552 fMass=mLamb; 08553 } 08554 else if(ra<.7) // @@ Rel. probab. (take into account Phase Space) 08555 { 08556 fQPDG=szQPDG; // Baryon is Sigma0 08557 fMass=mSigZ; 08558 } 08559 else 08560 { 08561 fQPDG=spQPDG; // Baryon is SigmaP 08562 fMass=mSigP; 08563 sQPDG=pimQPDG; // Meson is Pi- 08564 sMass=mPi; 08565 } 08566 } 08567 else if(qM<mPK) // Lambda+Pi0, Sig0+Pi0, SigP+PiM, SigM+PiP are possible 08568 { 08569 G4double ra=G4UniformRand(); 08570 if(ra<.35) // @@ Rel. probab. (take into account Phase Space) 08571 { 08572 fQPDG=lQPDG; // Baryon is Lambda 08573 fMass=mLamb; 08574 } 08575 else if(ra<.6) // @@ Rel. probab. (take into account Phase Space) 08576 { 08577 fQPDG=szQPDG; // Baryon is Sigma0 08578 fMass=mSigZ; 08579 } 08580 else if(ra<.8) // @@ Rel. probab. (take into account Phase Space) 08581 { 08582 fQPDG=smQPDG; // Baryon is SigmaM 08583 fMass=mSigM; 08584 sQPDG=pipQPDG; // Meson is Pi+ 08585 sMass=mPi; 08586 } 08587 else 08588 { 08589 fQPDG=spQPDG; // Baryon is SigmaP 08590 fMass=mSigP; 08591 sQPDG=pimQPDG; // Meson is Pi- 08592 sMass=mPi; 08593 } 08594 } 08595 else if(qM<mNKZ) // Lambda+Pi0, Sig0+Pi0, SigP+PiM, SigM+PiP are possible 08596 { 08597 G4double ra=G4UniformRand(); 08598 if(ra<.3) // @@ Rel. probab. (take into account Phase Space) 08599 { 08600 fQPDG=lQPDG; // Baryon is Lambda 08601 fMass=mLamb; 08602 } 08603 else if(ra<.5) // @@ Rel. probab. (take into account Phase Space) 08604 { 08605 fQPDG=szQPDG; // Baryon is Sigma0 08606 fMass=mSigZ; 08607 } 08608 else if(ra<.7) // @@ Rel. probab. (take into account Phase Space) 08609 { 08610 fQPDG=smQPDG; // Baryon is SigmaM 08611 fMass=mSigM; 08612 sQPDG=pipQPDG; // Meson is Pi+ 08613 sMass=mPi; 08614 } 08615 else if(ra<.9) // @@ Rel. probab. (take into account Phase Space) 08616 { 08617 fQPDG=spQPDG; // Baryon is SigmaP 08618 fMass=mSigP; 08619 sQPDG=pimQPDG; // Meson is Pi- 08620 sMass=mPi; 08621 } 08622 else 08623 { 08624 fQPDG=pQPDG; // Baryon is Proton 08625 fMass=mProt; 08626 sQPDG=kmQPDG; // Meson is K- 08627 sMass=mK; 08628 } 08629 } 08630 else // Only n+Pi0 decay is possible 08631 { 08632 G4double ra=G4UniformRand(); 08633 if(ra<.3) // @@ Rel. probab. (take into account Phase Space) 08634 { 08635 fQPDG=lQPDG; // Baryon is Lambda 08636 fMass=mLamb; 08637 } 08638 else if(ra<.5) // @@ Rel. probab. (take into account Phase Space) 08639 { 08640 fQPDG=szQPDG; // Baryon is Sigma0 08641 fMass=mSigZ; 08642 } 08643 else if(ra<.65) // @@ Rel. probab. (take into account Phase Space) 08644 { 08645 fQPDG=smQPDG; // Baryon is SigmaM 08646 fMass=mSigM; 08647 sQPDG=pipQPDG; // Meson is Pi+ 08648 sMass=mPi; 08649 } 08650 else if(ra<.8) // @@ Rel. probab. (take into account Phase Space) 08651 { 08652 fQPDG=spQPDG; // Baryon is SigmaP 08653 fMass=mSigP; 08654 sQPDG=pimQPDG; // Meson is Pi- 08655 sMass=mPi; 08656 } 08657 else if(ra<.9) // @@ Rel. probab. (take into account Phase Space) 08658 { 08659 fQPDG=pQPDG; // Baryon is Proton 08660 fMass=mProt; 08661 sQPDG=kmQPDG; // Meson is K- 08662 sMass=mK; 08663 } 08664 else 08665 { 08666 fQPDG=nQPDG; // Baryon is Neutron 08667 fMass=mNeut; 08668 sQPDG=kzQPDG; // Meson is K0 08669 sMass=mK0; 08670 } 08671 } 08672 } 08673 else if(theLC==1) // SigmaP: SigP+gam,SigP+Pi0,Sp+PiP,L+Pi0,p+K0 are possible 08674 { 08675 if(qM<mLPi) // Only SigmaPlus+gamma decay is possible 08676 { 08677 if(qM < mSigP+eps) 08678 { 08679 #ifdef debug 08680 G4cout<<"G4QEnv::DecayBaryon: Fill SigmaPlus AsIs"<<G4endl; 08681 #endif 08682 qH->SetQPDG(spQPDG); 08683 HV->push_back(qH); // Fill AsIs (delete equivalent) 08684 if(qM+eps<mSigP)G4cout<<"-Warning-G4QEnv::DecayBaryon: Si+ AsIs, M="<<qM<<G4endl; 08685 return; 08686 } 08687 fQPDG=spQPDG; // Baryon is SigmaP 08688 fMass=mSigP; 08689 sQPDG=gQPDG; // Meson is gamma 08690 sMass=0.; 08691 } 08692 else if(qM<mSpPi0) // Only Lambda+PiP is possible 08693 { 08694 fQPDG=lQPDG; // Baryon is Lambda 08695 fMass=mLamb; 08696 sQPDG=pipQPDG; // Meson is Pi+ 08697 sMass=mPi; 08698 } 08699 else if(qM<mSzPi) // Both Lambda+PiP & Sigma0+Pi0 are possible 08700 { 08701 if(G4UniformRand()<.6) // @@ Relative probability (take into account Phase Space) 08702 { 08703 fQPDG=lQPDG; // Baryon is Lambda 08704 fMass=mLamb; 08705 sQPDG=pipQPDG; // Meson is Pi+ 08706 sMass=mPi; 08707 } 08708 else 08709 { 08710 fQPDG=spQPDG; // Baryon is SigmaP 08711 fMass=mSigP; 08712 } 08713 } 08714 else if(qM<mPKZ) // Lambda+PiP, SigmaP+Pi0, & Sigma0+PiP are possible 08715 { 08716 G4double ra=G4UniformRand(); 08717 if(ra<.4) // @@ Rel. probab. (take into account Phase Space) 08718 { 08719 fQPDG=lQPDG; // Baryon is Lambda 08720 fMass=mLamb; 08721 sQPDG=pipQPDG; // Meson is Pi+ 08722 sMass=mPi; 08723 } 08724 else if(ra<.7) // @@ Rel. probab. (take into account Phase Space) 08725 { 08726 fQPDG=spQPDG; // Baryon is SigmaP 08727 fMass=mSigP; 08728 } 08729 else 08730 { 08731 fQPDG=szQPDG; // Baryon is SigmaZ 08732 fMass=mSigZ; 08733 sQPDG=pipQPDG; // Meson is Pi+ 08734 sMass=mPi; 08735 } 08736 } 08737 else // Lambda+PiP, SigmaP+Pi0, Sigma0+PiP, p+K0 are possible 08738 { 08739 G4double ra=G4UniformRand(); 08740 if(ra<.35) // @@ Rel. probab. (take into account Phase Space) 08741 { 08742 fQPDG=lQPDG; // Baryon is Lambda 08743 fMass=mLamb; 08744 sQPDG=pipQPDG; // Meson is Pi+ 08745 sMass=mPi; 08746 } 08747 else if(ra<.6) // @@ Rel. probab. (take into account Phase Space) 08748 { 08749 fQPDG=spQPDG; // Baryon is SigmaP 08750 fMass=mSigP; 08751 } 08752 else if(ra<.8) // @@ Rel. probab. (take into account Phase Space) 08753 { 08754 fQPDG=szQPDG; // Baryon is SigmaZ 08755 fMass=mSigZ; 08756 sQPDG=pipQPDG; // Meson is Pi+ 08757 sMass=mPi; 08758 } 08759 else 08760 { 08761 fQPDG=pQPDG; // Baryon is Proton 08762 fMass=mProt; 08763 sQPDG=kzQPDG; // Meson is K0 08764 sMass=mK0; 08765 } 08766 } 08767 } 08768 else if(theLC==-1) // SigmaM: SigM+gam,SigM+Pi0,S0+PiM,L+Pi-,n+KM are possible 08769 { 08770 if(qM<mLPi) // Only SigmaMinus + gamma decay is possible 08771 { 08772 if(qM < mSigM+eps) 08773 { 08774 #ifdef debug 08775 G4cout<<"G4QEnv::DecayBaryon: Fill SigmaMinus AsIs"<<G4endl; 08776 #endif 08777 qH->SetQPDG(smQPDG); 08778 HV->push_back(qH); // Fill AsIs (delete equivalent) 08779 if(qM+eps<mSigM)G4cout<<"-Warning-G4QEnv::DecayBaryon: Si- AsIs, M="<<qM<<G4endl; 08780 return; 08781 } 08782 fQPDG=smQPDG; // Baryon is SigmaP 08783 fMass=mSigM; 08784 sQPDG=gQPDG; // Meson is gamma 08785 sMass=0.; 08786 } 08787 else if(qM<mSzPi) // Only Lambda+PiM is possible 08788 { 08789 fQPDG=lQPDG; // Baryon is Lambda 08790 fMass=mLamb; 08791 sQPDG=pimQPDG; // Meson is Pi- 08792 sMass=mPi; 08793 } 08794 else if(qM<mSzPi) // Both Lambda+PiM & Sigma0+PiM are possible 08795 { 08796 if(G4UniformRand()<.6) // @@ Relative probability (take into account Phase Space) 08797 { 08798 fQPDG=lQPDG; // Baryon is Lambda 08799 fMass=mLamb; 08800 sQPDG=pimQPDG; // Meson is Pi- 08801 sMass=mPi; 08802 } 08803 else 08804 { 08805 fQPDG=szQPDG; // Baryon is Sigma0 08806 fMass=mSigZ; 08807 sQPDG=pimQPDG; // Meson is Pi- 08808 sMass=mPi; 08809 } 08810 } 08811 else if(qM<mPKZ) // Lambda+PiM, Sigma0+PiM, & SigmaM+Pi0 are possible 08812 { 08813 G4double ra=G4UniformRand(); 08814 if(ra<.4) // @@ Rel. probab. (take into account Phase Space) 08815 { 08816 fQPDG=lQPDG; // Baryon is Lambda 08817 fMass=mLamb; 08818 sQPDG=pimQPDG; // Meson is Pi- 08819 sMass=mPi; 08820 } 08821 else if(ra<.7) // @@ Rel. probab. (take into account Phase Space) 08822 { 08823 fQPDG=szQPDG; // Baryon is Sigma0 08824 fMass=mSigZ; 08825 sQPDG=pimQPDG; // Meson is Pi- 08826 sMass=mPi; 08827 } 08828 else 08829 { 08830 fQPDG=smQPDG; // Baryon is SigmaM 08831 fMass=mSigM; 08832 } 08833 } 08834 else // Lambda+PiM, Sig0+PiM, SigM+Pi0, n+KM are possible 08835 { 08836 G4double ra=G4UniformRand(); 08837 if(ra<.35) // @@ Rel. probab. (take into account Phase Space) 08838 { 08839 fQPDG=lQPDG; // Baryon is Lambda 08840 fMass=mLamb; 08841 sQPDG=pimQPDG; // Meson is Pi- 08842 sMass=mPi; 08843 } 08844 else if(ra<.6) // @@ Rel. probab. (take into account Phase Space) 08845 { 08846 fQPDG=szQPDG; // Baryon is Sigma0 08847 fMass=mSigZ; 08848 sQPDG=pimQPDG; // Meson is Pi- 08849 sMass=mPi; 08850 } 08851 else if(ra<.8) // @@ Rel. probab. (take into account Phase Space) 08852 { 08853 fQPDG=smQPDG; // Baryon is SigmaM 08854 fMass=mSigM; 08855 } 08856 else 08857 { 08858 fQPDG=nQPDG; // Baryon is Proton 08859 fMass=mNeut; 08860 sQPDG=kmQPDG; // Meson is K- 08861 sMass=mK; 08862 } 08863 } 08864 } 08865 else if(theLC==2 || theLC==-2) // SigmaPlus+PiPlus or SigmaMinus+PiMinus 08866 { 08867 if(theLC==2 && qM>=mSpPi) // SigmaPlus+PiPlus decay is possible 08868 { 08869 fQPDG=spQPDG; // Baryon is SigmaP 08870 fMass=mSigP; 08871 sQPDG=pipQPDG; // Pi+ Meson 08872 sMass=mPi; 08873 } 08874 if(theLC==-2 && qM>=mSmPi)// SigmaPlus+PiPlus decay is possible 08875 { 08876 fQPDG=smQPDG; // Baryon is SigmaP 08877 fMass=mSigM; 08878 sQPDG=pimQPDG; // Pi- Meson 08879 sMass=mPi; 08880 } 08881 else 08882 { 08883 #ifdef debug 08884 G4cout<<"-Warning-G4QE::DecBary:*AsIs* Baryon(S=1,|C|=2),QC="<<qH->GetQC()<<G4endl; 08885 #endif 08886 HV->push_back(qH); // Fill AsIs (delete equivalent) 08887 return; 08888 } 08889 } 08890 else 08891 { 08892 //KsiM: KsiM+Pi0=1456.29, Ksi0+Pi=1454.4, L+K=1609.36, Sig0+K=1686.32, SigM+K0=1695.1 08893 //KsiZ: Ksi0+Pi0=1449.81, KsiM+Pi=1460.9, L+K0=1613.3, Sig0+K0=1690.3, SigP+K=1683.05 08894 //Omeg: Omeg+Pi0=1807.43, Ksi0+K=1808.5, KsiM+K0=1818.96 08895 G4cout<<"-Warning-G4QE::DecBary:*AsIs* UnknownBaryon(S=1)QC="<<qH->GetQC()<<G4endl; 08896 HV->push_back(qH); // Fill AsIs (delete equivalent) 08897 return; 08898 } 08899 } 08900 else 08901 { 08902 #ifdef debug 08903 G4cout<<"---Warning---G4QE::DecBary:*AsIso*UnknBaryon(AntiS),QC="<<qH->GetQC()<<G4endl; 08904 #endif 08905 HV->push_back(qH); // Fill AsIs (delete equivalent) 08906 return; 08907 } 08908 G4LorentzVector f4Mom(0.,0.,0.,fMass); 08909 G4LorentzVector s4Mom(0.,0.,0.,sMass); 08910 G4double sum=fMass+sMass; 08911 if(fabs(qM-sum)<eps) 08912 { 08913 f4Mom=q4M*(fMass/sum); 08914 s4Mom=q4M*(sMass/sum); 08915 } 08916 else if(qM<sum || !G4QHadron(q4M).DecayIn2(f4Mom, s4Mom)) 08917 { 08918 #ifdef debug 08919 G4cout<<"---Warning---G4QE::DecBar:fPDG="<<fQPDG<<"(M="<<fMass<<")+sPDG="<<sQPDG<<"(M=" 08920 <<sMass<<") > TotM="<<q4M.m()<<G4endl; 08921 #endif 08922 if(!theEnvironment.GetA()) 08923 { 08924 G4Quasmon* quasH = new G4Quasmon(qH->GetQC(),qH->Get4Momentum()); 08925 if(!CheckGroundState(quasH,true)) HV->push_back(qH); // Cor or fill asItIs 08926 else delete qH; 08927 delete quasH; 08928 return; 08929 } 08930 else 08931 { 08932 delete qH; 08933 G4ExceptionDescription ed; 08934 ed << "Baryon DecayIn2 error: Can't Correct, *EmptyEnv*=" 08935 << theEnvironment << G4endl; 08936 G4Exception("G4QEnvironment::DecayBaryon()", "HAD_CHPS_0001", 08937 FatalException, ed); 08938 } 08939 } 08940 #ifdef debug 08941 G4cout<<"G4QEnv::DecayBaryon: *DONE* f4M="<<f4Mom<<",fPDG="<<fQPDG<<", s4M="<<s4Mom 08942 <<",sPDG="<<sQPDG<<G4endl; 08943 #endif 08944 delete qH; 08945 // 08946 G4QHadron* H1 = new G4QHadron(fQPDG,f4Mom); // Create a Hadron for the 1-st baryon 08947 HV->push_back(H1); // Fill "H1" (delete equivalent) 08948 G4QHadron* H2 = new G4QHadron(sQPDG,s4Mom); // Create a Hadron for the 2-nd baryon 08949 HV->push_back(H2); // Fill "H2" (delete equivalent) 08950 } // End of DecayBaryon
void G4QEnvironment::DecayMeson | ( | G4QHadron * | dB, | |
G4QHadronVector * | HV | |||
) |
Definition at line 8953 of file G4QEnvironment.cc.
References FatalException, G4cerr, G4cout, G4Exception(), G4UniformRand, G4QHadron::Get4Momentum(), G4QNucleus::GetA(), G4QHadron::GetBaryonNumber(), G4QHadron::GetCharge(), G4QHadron::GetQC(), G4QHadron::GetStrangeness(), and G4QHadron::SetQPDG().
Referenced by G4QFragmentation::EvaporateResidual().
08954 { 08955 static const G4QPDGCode gQPDG(22); 08956 static const G4QPDGCode pizQPDG(111); 08957 static const G4QPDGCode pipQPDG(211); 08958 static const G4QPDGCode pimQPDG(-211); 08959 static const G4QPDGCode kmQPDG(-321); 08960 static const G4QPDGCode kzQPDG(-311); 08961 static const G4QPDGCode kpQPDG(321); 08962 static const G4QPDGCode akzQPDG(311); 08963 static const G4double mPi = G4QPDGCode(211).GetMass(); 08964 static const G4double mPi0 = G4QPDGCode(111).GetMass(); 08965 static const G4double mK = G4QPDGCode(321).GetMass(); 08966 static const G4double mK0 = G4QPDGCode(311).GetMass(); 08967 static const G4double m2Pi0 = mPi0+ mPi0; 08968 static const G4double mPiPi0= mPi + mPi0; 08969 static const G4double mPiPi = mPi + mPi; 08970 static const G4double mKPi0 = mPi0+ mK; 08971 static const G4double mK0Pi0= mPi0+ mK0; 08972 static const G4double mKPi = mPi + mK; 08973 static const G4double mK0Pi = mPi + mK0; 08974 static const G4double mK0K = mK0 + mK; 08975 static const G4double mK0K0 = mK0 + mK0; 08976 static const G4double mKK = mK + mK; 08977 static const G4double eps = 0.003; 08978 //static const G4QNucleus vacuum(90000000); 08979 G4int theLB= qH->GetBaryonNumber(); // Baryon number of the Meson 08980 if(theLB) 08981 { 08982 G4cerr<<"*Warning*G4QEnvironment::DecayMeson:A="<<theLB<<" != 0 -> Fill asIs"<<G4endl; 08983 #ifdef ppdebug 08984 // throw G4QException("G4QEnv::DecayMeson: Unknown Meson with A!=0"); 08985 G4Exception("G4QEnvironment::DecayMeson()", "HAD_CHPS_0000", 08986 FatalException, "Unknown Meson with A!=0"); 08987 #endif 08988 HV->push_back(qH); // Fill AsIs (delete equivalent) 08989 return; 08990 } 08991 G4LorentzVector q4M = qH->Get4Momentum(); // Get 4-momentum of the Meson 08992 G4double qM = q4M.m(); // Excited Mass of the Meson 08993 G4int theLC= qH->GetCharge(); // Chsrge of the Meson 08994 G4int theLS= qH->GetStrangeness(); // Strangness of the Meson 08995 if(qM < eps) 08996 { 08997 HV->push_back(qH); // Fill AsIs (delete equivalent) 08998 if(theLC || theLS) G4cout<<"-Warning-G4QEnv::DecMes: S="<<theLS<<", C="<<theLC<<G4endl; 08999 return; 09000 } 09001 #ifdef debug 09002 G4cout<<"G4QEnv::DecayMeson: *Called* S="<<theLS<<",C="<<theLC<<",4M="<<q4M<<qM<<G4endl; 09003 #endif 09004 // Select a chanel of the Excited Meson decay 09005 G4QPDGCode fQPDG = pipQPDG; // Prototype for Meson1 = Pi+ 09006 G4double fMass= mPi; 09007 G4QPDGCode sQPDG = pizQPDG; // Prototype for Meson2 = Pi0 09008 G4double sMass= mPi0; 09009 if(!theLS) // This is only for not strange Excited Mesons 09010 { 09011 if(!theLC) // Rho0 like 09012 { 09013 if(qM < m2Pi0) // Only Pi0+gamma decay is possible 09014 { 09015 if(qM < mPi0+eps) 09016 { 09017 #ifdef debug 09018 G4cout<<"G4QEnv::DecayMeson: Fill Pi0 AsIs"<<G4endl; 09019 #endif 09020 qH->SetQPDG(pizQPDG); 09021 HV->push_back(qH); // Fill AsIs (delete equivalent) 09022 if(qM+eps < mPi0)G4cout<<"-Warning-G4QEnv::DecayMeson: Pi0 AsIs, M="<<qM<<G4endl; 09023 return; 09024 } 09025 fQPDG=gQPDG; // Meson1 is gamma 09026 fMass=0.; 09027 #ifdef debug 09028 G4cout<<"-Warning-G4QEnv::DecayMeson: Gamma+Pi0, M="<<qM<<",d="<<qM-mPi0<<G4endl; 09029 #endif 09030 } 09031 else if(qM < mPiPi) // only Pi0+Pi0 is possible 09032 { 09033 fQPDG=pizQPDG; // Meson1 is Pi0 09034 fMass=mPi0; 09035 } 09036 else 09037 { 09038 if(G4UniformRand() < .333333333) // @@ can be smaller or dec \w qM ! 09039 { 09040 fQPDG=pizQPDG; // Meson1 is Pi0 09041 fMass=mPi0; 09042 } 09043 else 09044 { 09045 sQPDG=pimQPDG; // Meson2 is Pi- (Pi+/Pi- decay) 09046 sMass=mPi; 09047 } 09048 } 09049 } 09050 else if(theLC==1) // Rho+ like decay 09051 { 09052 if(qM < mPiPi0) // Only gamma+Pi+ decay is possible 09053 { 09054 if(qM < mPi+eps) 09055 { 09056 #ifdef debug 09057 G4cout<<"G4QEnv::DecayMeson: Fill Pi+ AsIs"<<G4endl; 09058 #endif 09059 qH->SetQPDG(pipQPDG); 09060 HV->push_back(qH); // Fill AsIs (delete equivalent) 09061 if(qM+eps < mPi) G4cout<<"-Warning-G4QEnv::DecayMeson: Pi+ AsIs, M="<<qM<<G4endl; 09062 return; 09063 } 09064 sQPDG=gQPDG; // Meson is gamma (gamma + Pi+ decay) 09065 sMass=0.; 09066 #ifdef debug 09067 G4cout<<"-Warning-G4QEnv::DecayMeson: Gamma+Pi+, M="<<qM<<",d="<<qM-mPi0<<G4endl; 09068 #endif 09069 } 09070 //else // Pi0+Pi+ is a default case 09071 } 09072 else if(theLC==2) // Meson++ like: only PiP+PiP is possible 09073 { 09074 if(qM > mPiPi) // Only Pi+ + Pi+ decay is possible 09075 { 09076 sQPDG=pipQPDG; // Meson2 is Pi+ 09077 sMass=mPi; 09078 } 09079 else // @@ Can be aReason to search for anError in Fragmentation 09080 { 09081 #ifdef debug 09082 G4cout<<"-Warning-G4QE::DecayMeson:*AsIs* Meson++ M="<<qM<<",d="<<qM-mPiPi<<G4endl; 09083 #endif 09084 HV->push_back(qH); // Fill AsIs (delete equivalent) 09085 return; 09086 } 09087 } 09088 else if(theLC==-1) // Rho- like decay 09089 { 09090 if(qM < mPiPi0) // Only gamma + Pi- decay is possible 09091 { 09092 if(qM < mPi+eps) 09093 { 09094 #ifdef debug 09095 G4cout<<"G4QEnv::DecayMeson: Fill Pi- AsIs"<<G4endl; 09096 #endif 09097 qH->SetQPDG(pimQPDG); 09098 HV->push_back(qH); // Fill AsIs (delete equivalent) 09099 if(qM+eps < mPi) G4cout<<"-Warning-G4QEnv::DecayMeson: Pi- AsIs, M="<<qM<<G4endl; 09100 return; 09101 } 09102 fQPDG=pimQPDG; // Meson1 is Pi- 09103 sQPDG=gQPDG; // Meson2 is gamma (gamma + Pi- decay) 09104 sMass=0.; 09105 #ifdef debug 09106 G4cout<<"-Warning-G4QEnv::DecayMeson: Gamma+Pi-, M="<<qM<<",d="<<qM-mPi<<G4endl; 09107 #endif 09108 } 09109 else fQPDG=pimQPDG; // Meson1 is Pi- instead of Pi+ 09110 } 09111 else if(theLC==-2) // Meson-- like: only p+PiP is possible 09112 { 09113 if(qM > mPiPi) // Only Pi- + Pi- decay is possible 09114 { 09115 fQPDG=pimQPDG; // Meson1 is Pi- 09116 sQPDG=pimQPDG; // Meson2 is Pi- 09117 sMass=mPi; 09118 } 09119 else // @@ Can be aReason to search for anError in Fragmentation 09120 { 09121 #ifdef debug 09122 G4cout<<"-Warning-G4QE::DecayMeson:*AsIs* Meson-- M="<<qM<<",d="<<qM-mPiPi<<G4endl; 09123 #endif 09124 HV->push_back(qH); // Fill AsIs (delete equivalent) 09125 return; 09126 } 09127 } 09128 else // @@ Growing point: No solution for |C| > 2 so far 09129 { 09130 #ifdef debug 09131 G4cout<<"-Warning-G4QE::DecayMeson:*AsIs* UnknMeson (S=0) QC="<<qH->GetQC()<<G4endl; 09132 #endif 09133 HV->push_back(qH); // Fill AsIs (delete equivalent) 09134 return; 09135 } 09136 } 09137 else if( theLS == 1 ) // ==>->->-> Strange mesons (K-* like) S = 1 <-<-<-<== 09138 { 09139 if(!theLC) // -->> K0* like decay 09140 { 09141 if(qM < mKPi) // Only K0+gamma decay is possible KPi < K0Pi0 09142 { 09143 if(qM < mK0+eps) // Can not decay, hopefully it is close to K0 09144 { 09145 #ifdef debug 09146 G4cout << "G4QEnv::DecayMeson: Fill K0 AsIs" << G4endl; 09147 #endif 09148 qH->SetQPDG(kzQPDG); 09149 HV->push_back(qH); // Fill AsIs (delete equivalent) 09150 if(qM+eps < mK0) G4cout<<"-Warning-G4QEnv::DecayMeson: K0 AsIs, M="<<qM<<G4endl; 09151 return; 09152 } 09153 fQPDG=kzQPDG; // Meson is K0 09154 fMass=mK0; 09155 sQPDG=gQPDG; // Meson is gamma 09156 sMass=0.; 09157 } 09158 else if(qM < mK0Pi0) // Only K- + Pi+ is possible 09159 { 09160 sQPDG=kmQPDG; // Meson2 is K- 09161 sMass=mK; 09162 } 09163 else // Both K0 + Pi0 & K- + Pi+ are possible 09164 { 09165 if(G4UniformRand()>.5) // @@ Relative probability (take into account Phase Space) 09166 { 09167 sQPDG=kmQPDG; // Meson2 is K- 09168 sMass=mK; 09169 } 09170 else 09171 { 09172 fQPDG=kzQPDG; // Meson2 is K0 09173 fMass=mK0; 09174 } 09175 } 09176 } 09177 else if(theLC==-1) // -->> K-* like decay 09178 { 09179 if(qM < mKPi0) // Only K- + gamma decay is possible 09180 { 09181 if(qM < mK+eps) // Can not decay, hopefully it is close to K- 09182 { 09183 #ifdef debug 09184 G4cout << "G4QEnv::DecayMeson: Fill K- AsIs" << G4endl; 09185 #endif 09186 qH->SetQPDG(kmQPDG); 09187 HV->push_back(qH); // Fill AsIs (delete equivalent) 09188 if(qM+eps < mK) G4cout<<"-Warning-G4QEnv::DecayMeson: K- AsIs, M="<<qM<<G4endl; 09189 return; 09190 } 09191 fQPDG=kmQPDG; // Meson is K- 09192 fMass=mK; 09193 sQPDG=gQPDG; // Meson is gamma 09194 sMass=0.; 09195 } 09196 else if(qM < mKPi0) // Only K- + Pi0 is possible 09197 { 09198 fQPDG=kmQPDG; // Meson1 is K- 09199 fMass=mK; 09200 } 09201 else // Both K0 + Pi0 & K- + Pi+ are possible 09202 { 09203 if(G4UniformRand()>.5) // @@ Relative probability (take into account Phase Space) 09204 { 09205 fQPDG=kmQPDG; // Meson1 is K- 09206 fMass=mK; 09207 } 09208 else 09209 { 09210 fQPDG=pimQPDG; // Meson1 is Pi- 09211 sQPDG=kzQPDG; // Meson2 is K0 09212 sMass=mK0; 09213 } 09214 } 09215 } 09216 else if(theLC== 1) // -->> K0 + Pi+ decay only 09217 { 09218 if(qM+eps < mK0Pi) // Nothing can be done for this bad combination (Recover!) 09219 { 09220 G4cout<<"-Warniong-G4QEnv::DecayMeson: LowMassPositive Strange Meson AsIs"<<G4endl; 09221 HV->push_back(qH); // Fill AsIs (delete equivalent) 09222 return; 09223 } 09224 else // Only K- + Pi0 is possible 09225 { 09226 sQPDG=kzQPDG; // Meson2 is K0 09227 sMass=mK0; 09228 } 09229 } 09230 else if(theLC== -2) // -->> K- + Pi- decay only 09231 { 09232 if(qM+eps < mKPi) // Nothing can be done for this bad combination (Recover!) 09233 { 09234 G4cout<<"-Warniong-G4QEnv::DecayMeson: LowMassDNegativeStrange Meson AsIs"<<G4endl; 09235 HV->push_back(qH); // Fill AsIs (delete equivalent) 09236 return; 09237 } 09238 else // Only K- + Pi- is possible 09239 { 09240 fQPDG=pimQPDG; // Meson1 is Pi- 09241 sQPDG=kmQPDG; // Meson2 is K- 09242 sMass=mK; 09243 } 09244 } 09245 else 09246 { 09247 G4cout<<"-Warning-G4QE::DecMeson:*AsIs*UnknownMeson.(S=1), QC="<<qH->GetQC()<<G4endl; 09248 HV->push_back(qH); // Fill AsIs (delete equivalent) 09249 return; 09250 } 09251 } 09252 else if(theLS==2) // ==>->->-> Double srange Meson: S = 2 <-<-<-<== 09253 { 09254 if(theLC== 0) // -->> K0 + K0 decay only 09255 { 09256 if(qM+eps < mK0K0) // Nothing can be done for this bad combination (Recover!) 09257 { 09258 G4cout<<"-Warniong-G4QEnv::DecayMeson: LowMassNeutral DStrange Meson AsIs"<<G4endl; 09259 HV->push_back(qH); // Fill AsIs (delete equivalent) 09260 return; 09261 } 09262 else // Only K- + Pi0 is possible 09263 { 09264 fQPDG=kzQPDG; // Meson1 is K0 09265 fMass=mK0; 09266 sQPDG=kzQPDG; // Meson2 is K0 09267 sMass=mK0; 09268 } 09269 } 09270 else if(theLC== -1) // -->> K- + K0 decay only 09271 { 09272 if(qM+eps < mK0K) // Nothing can be done for this bad combination (Recover!) 09273 { 09274 G4cout<<"-Warniong-G4QEnv::DecayMeson: LowMassNegativeDStrange Meson AsIs"<<G4endl; 09275 HV->push_back(qH); // Fill AsIs (delete equivalent) 09276 return; 09277 } 09278 else // Only K- + Pi- is possible 09279 { 09280 fQPDG=kmQPDG; // Meson1 is K- 09281 fMass=mK; 09282 sQPDG=kzQPDG; // Meson2 is K0 09283 sMass=mK0; 09284 } 09285 } 09286 else if(theLC==-2) // -->> K- + K- decay only 09287 { 09288 if(qM+eps < mKK) // Nothing can be done for this bad combination (Recover!) 09289 { 09290 G4cout<<"-Warniong-G4QEnv::DecayMeson:LowMassDNegativeADStrangeMeson AsIs"<<G4endl; 09291 HV->push_back(qH); // Fill AsIs (delete equivalent) 09292 return; 09293 } 09294 else // Only K+ + K+ is possible 09295 { 09296 fQPDG=kmQPDG; // Meson1 is K- 09297 fMass=mK; 09298 sQPDG=kmQPDG; // Meson2 is K- 09299 sMass=mK; 09300 } 09301 } 09302 else 09303 { 09304 G4cout<<"-Warning-G4QE::DecMeson:*AsIs*UnknownMeson.(S=2), QC="<<qH->GetQC()<<G4endl; 09305 HV->push_back(qH); // Fill AsIs (delete equivalent) 09306 return; 09307 } 09308 } 09309 else if( theLS ==-1 ) // ==>->->-> AntiStrange mesons (K+* like) S =-1 <-<-<-<== 09310 { 09311 if(!theLC) // -->> aK0* like decay 09312 { 09313 if(qM < mKPi) // Only aK0+gamma decay is possible 09314 { 09315 if(qM < mK0+eps) // Can not decay, hopefully it is close to K0 09316 { 09317 #ifdef debug 09318 G4cout << "G4QEnv::DecayMeson: Fill K0 AsIs" << G4endl; 09319 #endif 09320 qH->SetQPDG(akzQPDG); 09321 HV->push_back(qH); // Fill AsIs (delete equivalent) 09322 if(qM+eps < mK0) G4cout<<"-Warning-G4QEnv::DecayMeson: aK0 AsIs, M="<<qM<<G4endl; 09323 return; 09324 } 09325 fQPDG=akzQPDG; // Meson is aK0 09326 fMass=mK0; 09327 sQPDG=gQPDG; // Meson is gamma 09328 sMass=0.; 09329 } 09330 else if(qM < mK0Pi0) // Only K+ + Pi- is possible 09331 { 09332 fQPDG=pimQPDG; // Meson1 is Pi- 09333 sQPDG=kpQPDG; // Meson2 is K+ 09334 sMass=mK; 09335 } 09336 else // Both aK0 + Pi0 & K+ + Pi- are possible 09337 { 09338 if(G4UniformRand()>.5) // @@ Relative probability (take into account Phase Space) 09339 { 09340 fQPDG=pimQPDG; // Meson1 is Pi- 09341 sQPDG=kpQPDG; // Meson2 is K+ 09342 sMass=mK; 09343 } 09344 else 09345 { 09346 fQPDG=akzQPDG; // Meson1 is aK0 09347 fMass=mK0; 09348 } 09349 } 09350 } 09351 else if(theLC == 1) // -->> aK+* like decay 09352 { 09353 if(qM < mKPi0) // Only aK+ + gamma decay is possible 09354 { 09355 if(qM < mK+eps) // Can not decay, hopefully it is close to K+ 09356 { 09357 #ifdef debug 09358 G4cout << "G4QEnv::DecayMeson: Fill K+ AsIs" << G4endl; 09359 #endif 09360 HV->push_back(qH); // Fill AsIs (delete equivalent) 09361 if(qM+eps < mK) G4cout<<"-Warning-G4QEnv::DecayMeson: K+ AsIs, M="<<qM<<G4endl; 09362 return; 09363 } 09364 fQPDG=kpQPDG; // Meson is K+ 09365 fMass=mK; 09366 sQPDG=gQPDG; // Meson is gamma 09367 sMass=0.; 09368 } 09369 else if(qM < mKPi0) // Only K+ + Pi0 is possible 09370 { 09371 fQPDG=kpQPDG; // Meson1 is K+ 09372 fMass=mK; 09373 } 09374 else // Both K+ + Pi0 & aK0 + Pi+ are possible 09375 { 09376 if(G4UniformRand()>.5) // @@ Relative probability (take into account Phase Space) 09377 { 09378 fQPDG=kpQPDG; // Meson1 is K+ 09379 fMass=mK; 09380 } 09381 else 09382 { 09383 sQPDG=akzQPDG; // Meson2 is aK0 09384 sMass=mK0; 09385 } 09386 } 09387 } 09388 else if(theLC==-1) // -->> aK0 + Pi- decay only 09389 { 09390 if(qM+eps < mK0Pi) // Nothing can be done for this bad combination (Recover!) 09391 { 09392 G4cout<<"-Warniong-G4QEnv::DecayMeson: LowMassNegativeAStrange Meson AsIs"<<G4endl; 09393 HV->push_back(qH); // Fill AsIs (delete equivalent) 09394 return; 09395 } 09396 else // Only aK0 + Pi- is possible 09397 { 09398 fQPDG=pimQPDG; // Meson1 is Pi- 09399 sQPDG=akzQPDG; // Meson2 is K0 09400 sMass=mK0; 09401 } 09402 } 09403 else if(theLC== 2) // -->> K+ + Pi+ decay only 09404 { 09405 if(qM+eps < mKPi) // Nothing can be done for this bad combination (Recover!) 09406 { 09407 G4cout<<"-Warniong-G4QEnv::DecayMeson: LowMassDPositiveStrange Meson AsIs"<<G4endl; 09408 HV->push_back(qH); // Fill AsIs (delete equivalent) 09409 return; 09410 } 09411 else // Only K- + Pi- is possible 09412 { 09413 sQPDG=kpQPDG; // Meson2 is K+ 09414 sMass=mK; 09415 } 09416 } 09417 else 09418 { 09419 G4cout<<"-Warning-G4QE::DecMeson:*AsIs*UnknownMeson.(S=-1),QC="<<qH->GetQC()<<G4endl; 09420 HV->push_back(qH); // Fill AsIs (delete equivalent) 09421 return; 09422 } 09423 } 09424 else if(theLS==-2) // ==>->->-> Double srange Meson: S =-2 <-<-<-<== 09425 { 09426 if(theLC== 0) // -->> aK0 + aK0 decay only 09427 { 09428 if(qM+eps < mK0K0) // Nothing can be done for this bad combination (Recover!) 09429 { 09430 G4cout<<"-Warniong-G4QEnv::DecayMeson: LowMassNeutralADStrange Meson AsIs"<<G4endl; 09431 HV->push_back(qH); // Fill AsIs (delete equivalent) 09432 return; 09433 } 09434 else // Only K- + Pi0 is possible 09435 { 09436 fQPDG=akzQPDG; // Meson1 is aK0 09437 fMass=mK0; 09438 sQPDG=akzQPDG; // Meson2 is aK0 09439 sMass=mK0; 09440 } 09441 } 09442 else if(theLC== 1) // -->> K+ + K0 decay only 09443 { 09444 if(qM+eps < mK0K) // Nothing can be done for this bad combination (Recover!) 09445 { 09446 G4cout<<"-Warniong-G4QEnv::DecayMeson: LowMassPositiveADStrangeMeson AsIs"<<G4endl; 09447 HV->push_back(qH); // Fill AsIs (delete equivalent) 09448 return; 09449 } 09450 else // Only K+ + K0 is possible 09451 { 09452 fQPDG=kpQPDG; // Meson1 is K+ 09453 fMass=mK; 09454 sQPDG=akzQPDG; // Meson2 is K0 09455 sMass=mK0; 09456 } 09457 } 09458 else if(theLC== 2) // -->> K+ + K+ decay only 09459 { 09460 if(qM+eps < mKK) // Nothing can be done for this bad combination (Recover!) 09461 { 09462 G4cout<<"-Warniong-G4QEnv::DecayMeson:LowMassDPositiveADStrangeMeson AsIs"<<G4endl; 09463 HV->push_back(qH); // Fill AsIs (delete equivalent) 09464 return; 09465 } 09466 else // Only K+ + K+ is possible 09467 { 09468 fQPDG=kpQPDG; // Meson1 is K+ 09469 fMass=mK; 09470 sQPDG=kpQPDG; // Meson2 is K+ 09471 sMass=mK; 09472 } 09473 } 09474 else 09475 { 09476 G4cout<<"-Warning-G4QE::DecMeson:*AsIs*UnknownMeson.(S=-2),QC="<<qH->GetQC()<<G4endl; 09477 HV->push_back(qH); // Fill AsIs (delete equivalent) 09478 return; 09479 } 09480 } 09481 else 09482 { 09483 //#ifdef debug 09484 G4cout<<"---Warning---G4QE::DecMeso: *Fill AsIso* UnknMeson, QC="<<qH->GetQC()<<G4endl; 09485 //#endif 09486 HV->push_back(qH); // Fill AsIs (delete equivalent) 09487 return; 09488 } 09489 G4LorentzVector f4Mom(0.,0.,0.,fMass); 09490 G4LorentzVector s4Mom(0.,0.,0.,sMass); 09491 G4double sum=fMass+sMass; 09492 if(fabs(qM-sum)<eps) 09493 { 09494 f4Mom=q4M*(fMass/sum); 09495 s4Mom=q4M*(sMass/sum); 09496 } 09497 else if(qM<sum || !G4QHadron(q4M).DecayIn2(f4Mom, s4Mom)) 09498 { 09499 #ifdef debug 09500 G4cout<<"---Warning---G4QE::DecMes:fPDG="<<fQPDG<<"(M="<<fMass<<")+sPDG="<<sQPDG<<"(M=" 09501 <<sMass<<") > TotM="<<q4M.m()<<G4endl; 09502 #endif 09503 if(!theEnvironment.GetA()) 09504 { 09505 G4Quasmon* quasH = new G4Quasmon(qH->GetQC(),qH->Get4Momentum()); 09506 if(!CheckGroundState(quasH,true)) HV->push_back(qH); // Cor or fill asItIs 09507 else delete qH; 09508 delete quasH; 09509 return; 09510 } 09511 else 09512 { 09513 delete qH; 09514 G4ExceptionDescription ed; 09515 ed << "Meson DecayIn2 error: Can't Correct, *EmptyEnv*=" 09516 << theEnvironment << G4endl; 09517 G4Exception("G4QEnvironment::DecayMeson()", "HAD_CHPS_0001", 09518 FatalException, ed); 09519 } 09520 } 09521 #ifdef debug 09522 G4cout<<"G4QEnv::DecayMeson: *DONE* f4M="<<f4Mom<<",fPDG="<<fQPDG<<", s4M="<<s4Mom 09523 <<",sPDG="<<sQPDG<<G4endl; 09524 #endif 09525 delete qH; 09526 // 09527 G4QHadron* H1 = new G4QHadron(fQPDG,f4Mom); // Create a Hadron for the 1-st baryon 09528 HV->push_back(H1); // Fill "H1" (delete equivalent) 09529 G4QHadron* H2 = new G4QHadron(sQPDG,s4Mom); // Create a Hadron for the 2-nd baryon 09530 HV->push_back(H2); // Fill "H2" (delete equivalent) 09531 } // End of DecayMeson
void G4QEnvironment::FillQHadrons | ( | G4QHadronVector * | input | ) | [protected] |
Definition at line 8297 of file G4QEnvironment.cc.
References G4cout.
08298 { 08299 G4int nH=input->size(); 08300 #ifdef debug 08301 G4cout<<"G4QEnvironment::FillQHadrons is called nH="<<nH<<G4endl; 08302 #endif 08303 if(nH) for(G4int ih=0; ih<nH; ih++) 08304 { 08305 #ifdef debug 08306 G4cout<<"G4QEnv::FillQHadrons:H#"<<ih<<",HQPDG="<<(*input)[ih]->GetQPDG()<<",HQC=" 08307 <<(*input)[ih]->GetQC()<<",HM="<<(*input)[ih]->GetMass()<<G4endl; 08308 #endif 08309 G4QHadron* curH = new G4QHadron((*input)[ih]); 08310 theQHadrons.push_back(curH); // (del. equiv. 08311 } 08312 #ifdef debug 08313 G4cout<<"G4QEnvironment::FillQHadrons ===OUT=== Filled nQH="<<theQHadrons.size()<<G4endl; 08314 #endif 08315 } // End of FillQHadrons
G4QHadronVector * G4QEnvironment::Fragment | ( | ) |
Definition at line 4512 of file G4QEnvironment.cc.
References CheckMassShell(), FatalException, G4cerr, G4cout, G4Exception(), G4QHadron::Get4Momentum(), G4QNucleus::GetA(), G4QHadron::GetCharge(), G4QException::GetMessage(), and G4QHadron::GetQC().
Referenced by G4ChiralInvariantPhaseSpace::ApplyYourself(), G4QCaptureAtRest::AtRestDoIt(), G4QIonIonCollision::Fragment(), G4QFragmentation::Fragment(), G4QAtomicElectronScattering::PostStepDoIt(), G4StringChipsParticleLevelInterface::Propagate(), G4StringChipsInterface::Propagate(), G4QStringChipsParticleLevelInterface::Propagate(), and G4QDiffractionRatio::TargFragment().
04513 { 04514 #ifdef chdebug 04515 G4int fCharge=theEnvironment.GetCharge(); 04516 G4int fBaryoN=theEnvironment.GetA(); 04517 G4int nHad=theQHadrons.size(); 04518 if(nHad) for(G4int ih=0; ih<nHad; ih++) 04519 { 04520 fCharge+=theQHadrons[ih]->GetCharge(); 04521 fBaryoN+=theQHadrons[ih]->GetBaryonNumber(); 04522 } 04523 G4int nQuas=theQuasmons.size(); 04524 if(nQuas)for(G4int iqs=0; iqs<nQuas; iqs++) 04525 { 04526 fCharge+=theQuasmons[iqs]->GetCharge(); 04527 fBaryoN+=theQuasmons[iqs]->GetBaryonNumber(); 04528 } 04529 if(fCharge!=totCharge || fBaryoN!=totBaryoN) 04530 { 04531 G4cout<<"*::*G4QE::Frag:(4) tC="<<totCharge<<",C="<<fCharge<<",tB="<<totBaryoN 04532 <<",B="<<fBaryoN<<",E="<<theEnvironment<<G4endl; 04533 if(nHad) for(G4int h=0; h<nHad; h++) 04534 { 04535 G4QHadron* cH = theQHadrons[h]; 04536 G4cout<<"*::*G4QE::HQ:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl; 04537 } 04538 if(nQuas) for(G4int q=0; q<nQuas; q++) 04539 { 04540 G4Quasmon* cQ = theQuasmons[q]; 04541 G4cout<<"*::*G4QE::HQ:q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl; 04542 } 04543 } 04544 #endif 04545 G4QHadronVector dummy; // Prototype of the output G4QHadronVector to avoid warnings 04546 G4QHadronVector* theFragments = &dummy; // Prototype of the output G4QHadronVector 04547 G4int ExCount =0; // Counter of the repetitions 04548 G4int MaxExCnt=1; // A#of of repetitions + 1 (1 for no repetitions) 04549 G4bool RepFlag=true; // To come inside the while 04550 // For the purpose of the recalculation the Quasmons, Hadrons, Environment must be stored 04551 G4QuasmonVector* reQuasmons = new G4QuasmonVector; // deleted after the "while LOOP" 04552 G4int nQ = theQuasmons.size(); 04553 if(nQ) 04554 { 04555 for(G4int iq=0; iq<nQ; iq++) 04556 { 04557 G4Quasmon* curQ = new G4Quasmon(theQuasmons[iq]); 04558 reQuasmons->push_back(curQ); // deleted after the "while LOOP" 04559 } 04560 } 04561 G4QHadronVector* reQHadrons = new G4QHadronVector; // deleted after the "while LOOP" 04562 G4int nH = theQHadrons.size(); 04563 if(nH) 04564 { 04565 for(G4int ih=0; ih<nH; ih++) 04566 { 04567 G4QHadron* curH = new G4QHadron(theQHadrons[ih]); 04568 reQHadrons->push_back(curH); // deleted after the "while LOOP" 04569 } 04570 } 04571 G4QNucleus reEnvironment=theEnvironment; 04572 G4LorentzVector rem4M=tot4Mom; 04573 while (RepFlag && ExCount<MaxExCnt) 04574 { 04575 try 04576 { 04577 RepFlag=false; // If OK - go out of the while 04578 theFragments = FSInteraction(); // InterClass creation. User must delet QHadrons. 04579 } 04580 catch (G4QException& error) 04581 { 04582 G4cout<<"***G4QEnvironment::Fragment: Exception is catched"<<G4endl; 04583 RepFlag=true; // For the Exception - repete 04584 ExCount++; // Increment the repetition counter 04585 G4cout<<"***G4QEnv::Fragment:Exception #"<<ExCount<<": "<<error.GetMessage()<<G4endl; 04586 G4LorentzVector dif=rem4M-theEnvironment.Get4Momentum(); // CHECK difference 04587 G4int nHp=theQHadrons.size(); 04588 G4int nQp = theQuasmons.size(); 04589 G4cout<<"***G4QEnvir::Fragment:nH="<<nHp<<",nQ="<<nQp<<",E="<<theEnvironment<<G4endl; 04590 for(G4int ph=0; ph<nHp; ph++) 04591 { 04592 G4QHadron* cH = theQHadrons[ph]; 04593 dif-=cH->Get4Momentum(); 04594 G4cout<<"***G4QEnvir::Fr:H"<<ph<<"="<<cH->Get4Momentum()<<cH->GetPDGCode()<<G4endl; 04595 } 04596 for(G4int pq=0; pq<nQp; pq++) 04597 { 04598 G4Quasmon* cQ = theQuasmons[pq]; 04599 dif-=cQ->Get4Momentum(); 04600 G4cout<<"***G4QEnvir::Fr:Quasm#"<<pq<<"="<<cQ->Get4Momentum()<<cQ->GetQC()<<G4endl; 04601 } 04602 // *** Cleaning Up of all old output instances for the recalculation purposes *** 04603 for_each(theFragments->begin(), theFragments->end(), DeleteQHadron()); // old Hadrons 04604 theFragments->clear(); 04605 for_each(theQHadrons.begin(), theQHadrons.end(), DeleteQHadron()); //internal Hadrons 04606 theQHadrons.clear(); 04607 for_each(theQuasmons.begin(), theQuasmons.end(), DeleteQuasmon()); // old Quasmons 04608 theQuasmons.clear(); 04609 G4cout<<"***G4QEnv::Fragment: ----------- End of CleaningUp: 4Mdif="<<dif<<G4endl; 04610 // **************** Recover all conditions for the recalculation ******************** 04611 theEnvironment=reEnvironment; // Recover the nuclear environment 04612 tot4Mom=rem4M; // Recover the total 4Momentum of the React 04613 G4cout<<"***G4QEnv::Fragment:*Recover*Env="<<theEnvironment<<",4M="<<tot4Mom<<G4endl; 04614 G4int mQ = reQuasmons->size(); // Recover the memorizedQuasmons with print 04615 for(G4int jq=0; jq<mQ; jq++) 04616 { 04617 //G4Quasmon* curQ = new G4Quasmon(reQuasmons->operator[](jq)); 04618 G4Quasmon* curQ = new G4Quasmon((*reQuasmons)[jq]); 04619 G4cout<<"***G4QE::Fragm:Q("<<jq<<")="<<curQ->Get4Momentum()<<curQ->GetQC()<<G4endl; 04620 theQuasmons.push_back(curQ); // (delete equivalent) 04621 } 04622 G4int mH = reQHadrons->size(); // Recover the memorizedQHadrons with print 04623 for(G4int jh=0; jh<mH; jh++) 04624 { 04625 //G4QHadron* curH = new G4QHadron(reQHadrons->operator[](jh)); 04626 G4QHadron* curH = new G4QHadron((*reQHadrons)[jh]); 04627 G4cout<<"***G4QE::Fragm:H("<<jh<<")="<<curH->Get4Momentum()<<curH->GetQC()<<G4endl; 04628 theQHadrons.push_back(curH); // (delete equivalent) 04629 } 04630 } 04631 } 04632 if(reQuasmons->size()) // If something is still in memory then clean it up 04633 { 04634 for_each(reQuasmons->begin(),reQuasmons->end(),DeleteQuasmon()); // CleanUp oldQuasmons 04635 reQuasmons->clear(); 04636 } 04637 delete reQuasmons; // All temporary Quasmons memory is wiped out 04638 if(reQHadrons->size()) // If something is still in memory then clean it up 04639 { 04640 for_each(reQHadrons->begin(),reQHadrons->end(),DeleteQHadron()); //CleanUp old QHadrons 04641 reQHadrons->clear(); 04642 } 04643 delete reQHadrons; // All temporary QHadrons memory is wiped out 04644 if(ExCount>=MaxExCnt) 04645 { 04646 G4int nProj=theProjectiles.size(); 04647 G4cerr<<"*G4QEnv::Fragment:Exception.Target="<<theTargetPDG<<". #Proj="<<nProj<<G4endl; 04648 if(nProj) for(G4int ipr=0; ipr<nProj; ipr++) 04649 { 04650 G4QHadron* prH = theProjectiles[ipr]; 04651 G4cerr<<"G4QE::F:#"<<ipr<<",PDG/4M="<<prH->GetPDGCode()<<prH->Get4Momentum()<<G4endl; 04652 } 04653 G4Exception("G4QEnvironment::Fragment()", "HAD_CHPS_0000", 04654 FatalException, "This reaction caused the CHIPSException"); 04655 } 04656 // Put the postponed hadrons in the begining of theFragments and clean them up 04657 G4int tmpS=intQHadrons.size(); 04658 if(tmpS) 04659 { 04660 //tmpS=theFragments->size(); 04661 //intQHadrons.resize(tmpS+intQHadrons.size()); 04662 //copy(theFragments->begin(), theFragments->end(), intQHadrons.end()-tmpS); 04663 //tmpS=intQHadrons.size(); 04664 //theFragments->resize(tmpS); // Resize theFragments 04665 //copy(intQHadrons.begin(), intQHadrons.end(), theFragments->begin()); 04666 // Can be like this, but by performance it is closer to FNAL (but better than it) 04667 //copy(theFragments->begin(), theFragments->end(), back_inserter(intQHadrons)); 04668 //theFragments->resize(intQHadrons.size()); // Resize theFragments 04669 //copy(intQHadrons.begin(), intQHadrons.end(), theFragments->begin()); 04670 // The following (istead of all above) has worse performance ! 04671 theFragments->insert(theFragments->begin(), intQHadrons.begin(), intQHadrons.end() ); 04672 intQHadrons.clear(); 04673 } 04674 // No we need to check that all hadrons are on the mass shell 04675 CheckMassShell(theFragments); // @@ the same can be done in the end of G4QFragmentation 04676 return theFragments; 04677 } // End of the Fragmentation member function
G4QNucleus G4QEnvironment::GetEnvironment | ( | ) | const [inline] |
G4QHadronVector* G4QEnvironment::GetProjectiles | ( | ) |
G4QHadronVector * G4QEnvironment::GetQHadrons | ( | ) |
Definition at line 8267 of file G4QEnvironment.cc.
References G4cout.
08268 { 08269 G4int nH=theQHadrons.size(); 08270 #ifdef debug 08271 G4cout<<"G4QEnvironment::GetQHadrons is called nH="<<nH<<G4endl; 08272 #endif 08273 G4QHadronVector* hadrons = new G4QHadronVector; // !! User is responsible to delet it 08274 if(nH) for(G4int ih=0; ih<nH; ih++) 08275 { 08276 #ifdef debug 08277 G4cout<<"G4QEnv::GetQHadrons:H#"<<ih<<",HQPDG="<<theQHadrons[ih]->GetQPDG()<<",HQC=" 08278 <<theQHadrons[ih]->GetQC()<<",HM="<<theQHadrons[ih]->GetMass()<<G4endl; 08279 #endif 08280 G4QHadron* curH = new G4QHadron(theQHadrons[ih]); 08281 hadrons->push_back(curH); // (del. equiv. - user is responsibile) 08282 } 08283 #ifdef debug 08284 G4cout<<"G4QEnvironment::GetQHadrons ===OUT=== Copied nQH="<<hadrons->size()<<G4endl; 08285 #endif 08286 return hadrons; 08287 } // End of GetQHadrons
G4QuasmonVector * G4QEnvironment::GetQuasmons | ( | ) |
Definition at line 8244 of file G4QEnvironment.cc.
References G4cout.
08245 { 08246 G4int nQ=theQuasmons.size(); 08247 #ifdef debug 08248 G4cout<<"G4QEnvironment::GetQuasmons is called nQ="<<nQ<<G4endl; 08249 #endif 08250 G4QuasmonVector* quasmons = new G4QuasmonVector; // !! User is responsible to delet it 08251 if(nQ) for(G4int iq=0; iq<nQ; iq++) 08252 { 08253 #ifdef debug 08254 G4cout<<"G4QEnv::GetQuasm:Q#"<<iq<<",QQPDG="<<theQuasmons[iq]->GetQPDG()<<",QQC=" 08255 <<theQuasmons[iq]->GetQC()<<",M="<<theQuasmons[iq]->Get4Momentum().m()<<G4endl; 08256 #endif 08257 G4Quasmon* curQ = new G4Quasmon(theQuasmons[iq]); 08258 quasmons->push_back(curQ); // (delete equivalent - user is responsible) 08259 } 08260 #ifdef debug 08261 G4cout<<"G4QEnvironment::GetQuasmons ===OUT==="<<G4endl; 08262 #endif 08263 return quasmons; 08264 } // End of GetQuasmons
void G4QEnvironment::OpenElectromagneticDecays | ( | ) | [static] |
G4bool G4QEnvironment::operator!= | ( | const G4QEnvironment & | right | ) | const [inline] |
const G4QEnvironment & G4QEnvironment::operator= | ( | const G4QEnvironment & | right | ) |
Definition at line 718 of file G4QEnvironment.cc.
References f2all, G4cout, G4endl, G4QFreeScattering::GetPointer(), nBarClust, theEnvironment, theQCandidates, theQHadrons, theQuasmons, and theWorld.
00719 { 00720 if(this != &right) // Beware of self assignment 00721 { 00722 // theQHadrons (Vector) 00723 theQFScat = G4QFreeScattering::GetPointer(); 00724 G4int iQH = theQHadrons.size(); 00725 if(iQH) for(G4int ii=0; ii<iQH; ii++) delete theQHadrons[ii]; 00726 theQHadrons.clear(); 00727 G4int nQH = right.theQHadrons.size(); 00728 if(nQH) for(G4int ih=0; ih<nQH; ih++) 00729 { 00730 G4QHadron* curQH = new G4QHadron(right.theQHadrons[ih]); 00731 #ifdef debug 00732 G4cout<<"G4QE::Operator=:c#"<<ih<<","<<curQH->GetQC()<<curQH->Get4Momentum()<<G4endl; 00733 #endif 00734 theQHadrons.push_back(curQH); // (delete equivalent) 00735 } 00736 00737 theWorld = right.theWorld; 00738 nBarClust = right.nBarClust; 00739 f2all = right.f2all; 00740 00741 // theQuasmons (Vector) 00742 G4int iQ = theQuasmons.size(); 00743 if(iQ) for(G4int jq=0; jq<iQ; jq++) delete theQuasmons[jq]; 00744 theQuasmons.clear(); 00745 G4int nQ = right.theQuasmons.size(); 00746 if(nQ) for(G4int iq=0; iq<nQ; iq++) 00747 { 00748 G4Quasmon* curQ = new G4Quasmon(right.theQuasmons[iq]); 00749 theQuasmons.push_back(curQ); // (delete equivalent) 00750 } 00751 00752 // theQCandidates (Vector) 00753 G4int iQC = theQCandidates.size(); 00754 if(iQC) for(G4int jc=0; jc<iQC; jc++) delete theQCandidates[jc]; 00755 theQCandidates.clear(); 00756 G4int nQC = right.theQCandidates.size(); 00757 if(nQC) for(G4int ic=0; ic<nQC; ic++) 00758 { 00759 G4QCandidate* curQC = new G4QCandidate(right.theQCandidates[ic]); 00760 theQCandidates.push_back(curQC); // (delete equivalent) 00761 } 00762 00763 theEnvironment = right.theEnvironment; 00764 } 00765 return *this; 00766 }
G4bool G4QEnvironment::operator== | ( | const G4QEnvironment & | right | ) | const [inline] |
void G4QEnvironment::SetParameters | ( | G4double | solAn = 0.4 , |
|
G4bool | efFlag = false , |
|||
G4double | piThresh = 141.4 , |
|||
G4double | mpisq = 20000. , |
|||
G4double | dinum = 1880. | |||
) | [static] |
Definition at line 708 of file G4QEnvironment.cc.
Referenced by G4QAtomicElectronScattering::G4QAtomicElectronScattering(), G4QCaptureAtRest::G4QCaptureAtRest(), G4QInelastic::G4QInelastic(), G4QInelastic::SetParameters(), G4QCaptureAtRest::SetParameters(), and G4QAtomicElectronScattering::SetParameters().
00710 { 00711 EnergyFlux=efFlag; // Flag for Energy Flux use instead of Multy Quasmon 00712 SolidAngle=solAn; // Part of Solid Angle to capture secondaries (@@A-dep) 00713 PiPrThresh=piThresh; // Pion Production Threshold for gammas 00714 M2ShiftVir=mpisq; // Shift for M2=-Q2=m_pi^2 of the virtual gamma 00715 DiNuclMass=dinum; // Double Nucleon Mass for virtual normalization 00716 }