Import Geant4 8.3.0 source tree
This commit is contained in:
+3
-3
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QCaptureAtRest.hh,v 1.2 2006/06/29 20:08:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4QCaptureAtRest.hh,v 1.3 2007/02/09 09:33:28 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// ---------------- G4QCaptureAtRest header ----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
@@ -140,7 +140,7 @@ protected:
|
||||
// zero mean lifetime
|
||||
G4double GetMeanLifeTime(const G4Track& aTrack, G4ForceCondition* );
|
||||
void MuCaptureEMCascade(G4int Z, G4int N, std::vector<G4double>* dV);
|
||||
|
||||
G4double RandomizeDecayElectron(G4int Z); // Randomize energy of decay electron (in MeV)
|
||||
private:
|
||||
|
||||
G4bool RandomizeMuDecayOrCapture(G4int Z, G4int N); // true=MuCapture, false=MuDecay
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4QuasiFreeRatios -- header file
|
||||
// M.V. Kossov, ITEP(Moscow), 24-OCT-01
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-2006
|
||||
//
|
||||
|
||||
#ifndef G4QuasiFreeRatios_h
|
||||
#define G4QuasiFreeRatios_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "Randomize.hh"
|
||||
#include <vector>
|
||||
//#include "G4DynamicParticle.hh"
|
||||
//#include "G4Element.hh"
|
||||
//#include "G4ParticleTable.hh"
|
||||
//#include "G4NucleiProperties.hh"
|
||||
//#include "G4NucleiPropertiesTable.hh"
|
||||
#include "G4QPDGCode.hh"
|
||||
#include "G4QHadron.hh"
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
#include "G4QElasticCrossSection.hh"
|
||||
|
||||
|
||||
class G4QuasiFreeRatios
|
||||
{
|
||||
protected:
|
||||
|
||||
G4QuasiFreeRatios() {} // Constructor
|
||||
|
||||
public:
|
||||
|
||||
~G4QuasiFreeRatios() {} // Destructor
|
||||
|
||||
static G4QuasiFreeRatios* GetPointer(); // Gives a pointer to this singletone
|
||||
|
||||
// Pair(QuasiFree/Inelastic,QuasiElastic/QuasiFree)
|
||||
std::pair<G4double,G4double> GetRatios(G4double pIU, G4int prPDG, G4int tgZ, G4int tgN);
|
||||
// scatter (pPDG,p4M) on a virtual nucleon (NPDG,N4M), result: final pair(newN4M,newp4M)
|
||||
// if(newN4M.e()==0.) - below threshold, XS=0, no scattering of the progectile happened
|
||||
std::pair<G4LorentzVector,G4LorentzVector> Scatter(G4int NPDG, G4LorentzVector N4M,
|
||||
G4int pPDG, G4LorentzVector p4M);
|
||||
// Mean hN El and Tot XS(IU) for the isotopic (Z,N): on p -> (Z=1,N=0), on n -> (Z=0,N=1)
|
||||
std::pair<G4double,G4double> GetElTot(G4double pIU, G4int hPDG, G4int Z, G4int N); //(IU)
|
||||
|
||||
private:
|
||||
// These working member functions are in CHIPS units and must not be used externally
|
||||
G4double GetQF2IN_Ratio(G4double TotCS_mb, G4int A); // QuasiFree/Inelastic (fast)
|
||||
G4double CalcQF2IN_Ratio(G4double TCSmb, G4int A); // R=QuasuFree/Inelastic (sig_t in mb)
|
||||
std::pair<G4double,G4double> FetchElTot(G4double pGeV,G4int PDG,G4bool F);//(E,T)fromAMDB
|
||||
std::pair<G4double,G4double> CalcElTot(G4double pGeV,G4int Index);//(sigE,sigT)(Index)
|
||||
|
||||
// Body
|
||||
private:
|
||||
};
|
||||
#endif
|
||||
+555
-51
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QCaptureAtRest.cc,v 1.7 2006/11/22 13:49:06 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4QCaptureAtRest.cc,v 1.11 2007/03/09 10:07:35 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// ---------------- G4QCaptureAtRest class -----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
@@ -49,7 +49,7 @@ G4QCaptureAtRest::G4QCaptureAtRest(const G4String& processName)
|
||||
#endif
|
||||
if (verboseLevel>0) G4cout << GetProcessName() << " is created "<< G4endl;
|
||||
|
||||
G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World with 234 particles
|
||||
//G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part. max)
|
||||
G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio); // Clusterization param's
|
||||
G4Quasmon::SetParameters(Temperature,SSin2Gluons,EtaEtaprime); // Hadronic parameters
|
||||
G4QEnvironment::SetParameters(SolidAngle); // SolAngle of pbar-A secondary mesons capture
|
||||
@@ -143,10 +143,24 @@ G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4St
|
||||
static const G4double mDeut = G4QPDGCode(2112).GetNuclMass(1,1,0);
|
||||
static const G4double mAlph = G4QPDGCode(2112).GetNuclMass(2,2,0);
|
||||
//static const G4double mPi = G4QPDGCode(211).GetMass();
|
||||
//static const G4double mMu = G4QPDGCode(13).GetMass();
|
||||
static const G4double mMu = G4QPDGCode(13).GetMass();
|
||||
//static const G4double mMu2 = mMu*mMu;
|
||||
//static const G4double dmMu = mMu+mMu;
|
||||
// The best parameters for mu->e+nu+nu decay
|
||||
static const G4double b1=2.784;
|
||||
static const G4double ga=.000015;
|
||||
static const G4double rb=1./b1;
|
||||
//static const G4double mTau = G4QPDGCode(15).GetMass();
|
||||
static const G4double mEl = G4QPDGCode(11).GetMass();
|
||||
//
|
||||
static const G4double mEl2 = mEl*mEl;
|
||||
//-------------------------------------------------------------------------------------
|
||||
static G4bool CWinit = true; // CHIPS Warld needs to be initted
|
||||
if(CWinit)
|
||||
{
|
||||
CWinit=false;
|
||||
G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
|
||||
}
|
||||
//-------------------------------------------------------------------------------------
|
||||
const G4DynamicParticle* stoppedHadron = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particle=stoppedHadron->GetDefinition();
|
||||
Time=0.;
|
||||
@@ -469,40 +483,134 @@ G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4St
|
||||
}
|
||||
else if((projPDG==13||projPDG==15) && !lepChan)//Normal BoundLepton->e+nu+anti_nu_e decay
|
||||
{
|
||||
G4LorentzVector totLV(0.,0.,0.,mp-EnergyDeposition);// 4-momentum of the bounded muon
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: e+nu+nu decay 4M="<<totLV<<totLV.m()<<G4endl;
|
||||
#endif
|
||||
// @@ Should be developed for tau-lepton
|
||||
G4LorentzVector e4Mom(0.,0.,0.,mEl); // mass of the electron
|
||||
G4LorentzVector n4Mom(0.,0.,0.,0.); // muon neutrino
|
||||
G4LorentzVector a4Mom(0.,0.,0.,0.); // electron anti-nutrino
|
||||
if(!G4QHadron(totLV).DecayIn3(e4Mom,n4Mom,a4Mom))
|
||||
G4double mbm=mp-EnergyDeposition; // Mass of the bounded muon
|
||||
G4LorentzVector totLV(0.,0.,0.,mbm); // 4-momentum of bounded muon/tau
|
||||
if(projPDG==13) // now for tau it is only energy deposition, for mu this EMCascade
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: Mu_b=>E+Nu_mu+anti_Nu_e"<<G4endl;
|
||||
return 0;
|
||||
MuCaptureEMCascade(Z, N, cascE);
|
||||
G4int nsec=cascE->size();
|
||||
G4DynamicParticle* theSec = 0; // Prototype to fill particle in the G4ParticleChange
|
||||
for(G4int is=0; is<nsec; is++)
|
||||
{
|
||||
G4double ener=cascE->operator[](is);
|
||||
if(ener>0) theSec = new G4DynamicParticle(G4Electron::Electron(),RndmDir(),ener);
|
||||
else theSec = new G4DynamicParticle(G4Gamma::Gamma(),RndmDir(),-ener);
|
||||
totLV-=theSec->Get4Momentum();
|
||||
G4Track* aNewTrack = new G4Track(theSec, localtime, position );
|
||||
aNewTrack->SetTouchableHandle(trTouchable);
|
||||
cascT->push_back(aNewTrack);
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: e+nu+nu decay 4M="<<totLV<<totLV.m()<<G4endl;
|
||||
#endif
|
||||
G4double mt=G4QPDGCode(targPDG).GetMass();// Mass of the target Nucleus
|
||||
G4double ee=mEl+RandomizeDecayElectron(Z);// Randomized electron total energy
|
||||
totLV+=G4LorentzVector(0.,0.,0.,mt); // 4-momentum of the compound system
|
||||
G4double mmt=totLV.m(); // Total energy of the compound system
|
||||
if(ee>=mbm*(mmt-mbm/2)/mmt)
|
||||
{
|
||||
G4cout<<"-W-G4QCaptureAtRest::AtRestDoIt: Unrealistic E="<<ee<<", m="<<mMu<<G4endl;
|
||||
G4LorentzVector f4Mom(0.,0.,0.,mEl); // Electron
|
||||
G4LorentzVector s4Mom(0.,0.,0.,mt); // Quark-A
|
||||
if(!G4QHadron(totLV).DecayIn2(f4Mom,s4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: (mubound+A)->mu+A"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4QHadron* electron = new G4QHadron(11,f4Mom); // Create Electron
|
||||
output->push_back(electron); // Fill the electron to the output
|
||||
G4QHadron* resnuc = new G4QHadron(targPDG,s4Mom); // Create Residual Nucleus
|
||||
output->push_back(resnuc); // Fill the Residual Nucleus to the output
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double mr=std::sqrt(mmt*(mmt-ee-ee)+mEl2); // Mass of the M+nu+nu system
|
||||
if(mr<mt) mr=mt+.000001; // To be shure with the next decay
|
||||
G4LorentzVector f4Mom(0.,0.,0.,mEl); // Electron
|
||||
G4LorentzVector s4Mom(0.,0.,0.,mr); // Nucleus+2neutrinos
|
||||
if(!G4QHadron(totLV).DecayIn2(f4Mom,s4Mom))
|
||||
{
|
||||
G4cerr<<"---Warning---G4QCaptureAtRest::AtRestDoIt: (mu+A)=>e+(A+2nu)"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
#ifdef debug
|
||||
G4double fe=f4Mom.e();
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Ei="<<ee<<",Ef="<<fe<<",de="<<fe-ee<<G4endl;
|
||||
#endif
|
||||
G4QHadron* electron = new G4QHadron(11,f4Mom); // Create Electron
|
||||
output->push_back(electron); // ==> Fill the electron to the output
|
||||
G4LorentzVector r4Mom(0.,0.,0.,mt); // residual nucleus
|
||||
G4LorentzVector n4Mom(0.,0.,0.,0.); // muon neutrino
|
||||
G4LorentzVector a4Mom(0.,0.,0.,0.); // electron anti-nutrino
|
||||
if(!G4QHadron(s4Mom).DecayIn3(r4Mom,n4Mom,a4Mom))
|
||||
{
|
||||
G4cerr<<"-Warning-G4QCaptureAtRest::AtRestDoIt: (A+2nu)=>A+NuMu+antiNuE"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: (A+2nu) Decay is successful - 2"<<G4endl;
|
||||
#endif
|
||||
G4QHadron* resnuc = new G4QHadron(targPDG,r4Mom); // Creation Hadron for ResidNucl
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc 4M="<<mt<<r4Mom<<r4Mom.m()<<G4endl;
|
||||
#endif
|
||||
output->push_back(resnuc); // Fill the Residual Nucleus to the output
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: ResNuc is filled nu="<<n4Mom<<nuPDG<<G4endl;
|
||||
#endif
|
||||
G4QHadron* numu = new G4QHadron(nuPDG,n4Mom); // Create Hadron for LeptonicNeutrino
|
||||
output->push_back(numu); // Fill Muonic Neutrino to the output
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt:Nu is filled,anu="<<a4Mom<<a4Mom.m()<<G4endl;
|
||||
#endif
|
||||
G4QHadron* anue = new G4QHadron(-12,a4Mom); // Create Hadron for the AntiE Neutrino
|
||||
output->push_back(anue); // Fill the AntiENeutrino to the output
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: anu is filled == Success of Mu-cap"<<G4endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else // @@Should be developed for tau-lepton
|
||||
{
|
||||
G4int deL=11; // Prototype of decay lepton
|
||||
G4int deN=-12; // Prototype of decay neutrino
|
||||
G4double mdl=mEl; // Prototype of the decay mass
|
||||
if(G4UniformRand()>.55) // Use mu decay instead of e-decay
|
||||
{
|
||||
deL=13;
|
||||
deN=-14;
|
||||
mdl=mMu;
|
||||
}
|
||||
G4LorentzVector e4Mom(0.,0.,0.,mdl); // mass of the electron
|
||||
G4LorentzVector n4Mom(0.,0.,0.,0.); // muon neutrino
|
||||
G4LorentzVector a4Mom(0.,0.,0.,0.); // electron anti-nutrino
|
||||
if(!G4QHadron(totLV).DecayIn3(e4Mom,n4Mom,a4Mom))
|
||||
{
|
||||
G4cerr<<"--Worning--G4QCaptureAtRest::AtRestDoIt:Tau_b=>L+Nu_tau+anti_NuL"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Decay is successful"<<G4endl;
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Tau Decay is successful"<<G4endl;
|
||||
#endif
|
||||
G4QHadron* elect = new G4QHadron(11,e4Mom); // Creation Hadron for the Electron
|
||||
G4QHadron* lept = new G4QHadron(deL,e4Mom); // Creation Hadron for the Electron
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: electron 4M="<<e4Mom<<e4Mom.m()<<G4endl;
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton 4M="<<e4Mom<<e4Mom.m()<<G4endl;
|
||||
#endif
|
||||
output->push_back(elect); // Fill the Electron in the output
|
||||
output->push_back(lept); // Fill the Electron in the output
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: electron is filled nu4M="<<n4Mom<<nuPDG<<G4endl;
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: lepton is filled nu="<<n4Mom<<nuPDG<<G4endl;
|
||||
#endif
|
||||
G4QHadron* numu = new G4QHadron(nuPDG,n4Mom); // Create Hadron for the LeptonicNeutrino
|
||||
G4QHadron* nuta = new G4QHadron(nuPDG,n4Mom); // Create Hadron for LeptonicNeutrino
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: nu 4M="<<n4Mom<<n4Mom.m()<<G4endl;
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: nu 4M="<<n4Mom<<n4Mom.m()<<G4endl;
|
||||
#endif
|
||||
output->push_back(numu); // Fill the Muonic Neutrino to the output
|
||||
G4QHadron* anue = new G4QHadron(-12,a4Mom); // Create Hadron for the AntiE Neutrino
|
||||
output->push_back(nuta); // Fill Muonic Neutrino to the output
|
||||
G4QHadron* anul = new G4QHadron(deN,a4Mom); // Create Hadron for the AntiE Neutrino
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: antiNu 4M="<<a4Mom<<a4Mom.m()<<G4endl;
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: antiNu 4M="<<a4Mom<<a4Mom.m()<<G4endl;
|
||||
#endif
|
||||
output->push_back(anue); // Fill the AntiE Neutrino to the output
|
||||
output->push_back(anul); // Fill the AntiENeutrino to the output
|
||||
}
|
||||
}
|
||||
else if((projPDG==13||projPDG==15)&&lepChan&&targPDG==90001000)// LeptonCapture on Proton
|
||||
{
|
||||
@@ -543,6 +651,7 @@ G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4St
|
||||
G4QHadron* neut2 = new G4QHadron(2112,s4Mom); // Create Hadron for the SecondNeutron
|
||||
output->push_back(neut2); // Fill the neutron to the output
|
||||
}
|
||||
// *** Closed ***
|
||||
else if((projPDG==13||projPDG==15)&&lepChan&&G4UniformRand()>1&&Z>0&&N>0)//@@QuasiFreeCap
|
||||
{
|
||||
G4double mt=G4QPDGCode(targPDG).GetMass();// Mass of the target Nucleus
|
||||
@@ -567,14 +676,16 @@ G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4St
|
||||
G4QHadron* resnuc = new G4QHadron(rPDG,r4Mom); // Create Hadron for the ResidualNucl
|
||||
output->push_back(resnuc); // Fill the Residual Nucleus to the output
|
||||
}
|
||||
else
|
||||
else // *** THIS works for all particles ! ***
|
||||
//else if(1>2)// !! Immediately change back - Very temporary to avoid nuclear capture !!
|
||||
{
|
||||
G4QHadron* neutr = 0; // Create Neutrino
|
||||
if(projPDG==13||projPDG==15) mp-=EnergyDeposition;//TheEnergyDeposit is only for LepCap
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS M="<<mp<<",dE="<<EnergyDeposition<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector projLV(0.,0.,0.,mp);
|
||||
if(projPDG==13) // now for tau it is only energy deposition, for mu this EMCascade
|
||||
if(projPDG==13) // now for tau it is only energy deposition, for mu this EMCascade+qqnu
|
||||
{
|
||||
MuCaptureEMCascade(Z, N, cascE);
|
||||
G4int nsec=cascE->size();
|
||||
@@ -589,6 +700,38 @@ G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4St
|
||||
aNewTrack->SetTouchableHandle(trTouchable);
|
||||
cascT->push_back(aNewTrack);
|
||||
}
|
||||
// ----- Ericson mu to pi conversion ----- ????? -----
|
||||
if(G4UniformRand()<.025) // .025 is a parameter !
|
||||
{
|
||||
projPDG=-211;
|
||||
// Phase space decay of mu->nu+q+aq M=1
|
||||
//G4LorentzVector f4Mom(0.,0.,0.,0.); // Muon neutrino
|
||||
//G4LorentzVector s4Mom(0.,0.,0.,0.); // Quark
|
||||
//G4LorentzVector r4Mom(0.,0.,0.,0.); // Anti-Quark
|
||||
//if(!G4QHadron(projLV).DecayIn3(f4Mom,s4Mom,r4Mom))
|
||||
//{
|
||||
// G4cerr<<"--Worning--G4QCaptureAtRest::AtRestDoIt: (mu-)=>q+aq+nu, M=1"<<G4endl;
|
||||
// return 0;
|
||||
//}
|
||||
// Phase space decay of mu->nu+q+aq with matrix element
|
||||
G4double mmu2=projLV.m2();
|
||||
G4double mmu=std::sqrt(mmu2);
|
||||
G4double hmm=mmu/2.;
|
||||
G4double dmm=mmu+mmu;
|
||||
G4double qp=std::pow((std::pow(1.+ga*std::pow(hmm,b1),G4UniformRand())-1.)/ga,rb);
|
||||
G4double mqq=0.;
|
||||
if(qp<hmm) mqq=std::sqrt(mmu2-dmm*qp);
|
||||
G4LorentzVector f4Mom(0.,0.,0.,0.); // Muon neutrino
|
||||
G4LorentzVector s4Mom(0.,0.,0.,mqq); // Quark-Antiquark
|
||||
if(!G4QHadron(projLV).DecayIn2(f4Mom,s4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt: (mu-)=>q+aq+nu, M#1"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
neutr = new G4QHadron(nuPDG,f4Mom); // Create Neutrino
|
||||
projLV-=f4Mom;
|
||||
// end of --- ??? ---
|
||||
}
|
||||
}
|
||||
G4QPDGCode targQPDG(targPDG);
|
||||
G4double tM=mp+targQPDG.GetMass();
|
||||
@@ -622,6 +765,9 @@ G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4St
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS fragmentation is done, CV="<<CV<<G4endl;
|
||||
#endif
|
||||
// ----- Ericson mu to pi conversion ----- ????? -----
|
||||
if(neutr) output->push_back(neutr); // Fill nutrino_mu in the output
|
||||
// end of --- ??? ---
|
||||
}
|
||||
aParticleChange.Initialize(track);
|
||||
G4int tNH = output->size(); // A#of hadrons in the output without EM Cascade
|
||||
@@ -752,35 +898,61 @@ G4double G4QCaptureAtRest::GetMeanLifeTime(const G4Track& aTrack, G4ForceConditi
|
||||
// Muon can decay or to be captured by the nucleus (Z,N): true=MuCapture, false=MuDecay
|
||||
G4bool G4QCaptureAtRest::RandomizeMuDecayOrCapture(G4int Z, G4int N)
|
||||
{
|
||||
static G4int mZ=0; // static memory about the last Z
|
||||
static G4int mN=0; // static memory about the last N
|
||||
static G4double mH=0.; // static memory about the last Huff(Z,N)
|
||||
static G4double mR=0.; // static memory about the last rate(Z,N)
|
||||
static const G4int nAZ=17; // total number of tabulated isotopes
|
||||
static const G4int nZm=10; // (maximumZ)+1 for which rates are tabulated
|
||||
static const G4int rin[nZm]={0,0,1,1,1,2,3,4,5,6}; // i=rin[Z]+N for the tabulated rate
|
||||
static const G4double rate[nAZ]={.00000045, .00000047, .00000215, .000000356, .00000468,
|
||||
.00000226, .00000610, .00002750, .000023500, .00003790,
|
||||
.00003500, .00006600, .00006200, .000102500, .00009500,
|
||||
.00008800, .00022900};
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture is called"<<G4endl;
|
||||
#endif
|
||||
G4double Z27 =0.002727*Z;
|
||||
G4double Z227=Z27*Z27;
|
||||
G4double Z427=Z227*Z227;
|
||||
G4double Zeff=(Z-0.13782)*(1.2162-(0.09118-Z427)*std::sqrt((G4double)Z)); // EffNuclear Charge
|
||||
G4double Ze2=Zeff*Zeff; // Squared effective charge of the Nucleus
|
||||
G4double pD=.00045516*(1.-Ze2*.00014658);// 1./MeanLifeTime of muon in atoms (in ns^-1)
|
||||
G4double pC=.00001637*Ze2*Ze2/(33.563+N);// 1./MeanLifeTime of muon NuclCapture(in ns^-1)
|
||||
if(Z==1&&N==0) pC=.0000007;
|
||||
if(Z==1&&N==1) pC=.000000012;
|
||||
G4double DLifeT=-std::log(G4UniformRand())/pD; // Time of the muon decay inside the atom
|
||||
G4double CLifeT=-std::log(G4UniformRand())/pC; // Time of the muon capture by nucleus
|
||||
if(DLifeT<CLifeT)
|
||||
{
|
||||
Time=DLifeT;
|
||||
G4double z=Z;
|
||||
G4double Huff=1.;
|
||||
if(Z==mZ && N==mN) Huff=mH; // Use already calculated value
|
||||
else if(Z==8 || Z==9) Huff=.998; // Use nontrivial values for O and F
|
||||
// @@ Cash this values ! (M.K.)
|
||||
else if(Z>9) Huff=1.-.000394*std::pow(z,2.19)/(1.+12.18*std::exp(z*.01373));
|
||||
G4double pD=.00045516*Huff; // 1/MeanLifeTime of muon in atoms (in ns^-1)?
|
||||
G4double pC=1.e99; // Default 1/MeanLifeTime of muon NuclCapture(in ns^-1)
|
||||
// @@ Use Primakov correction (1-1.5625*N/(Z+N)) for isotopes. (M.K.)
|
||||
if(Z==mZ && N==mN) pC=mR; // Use already calculated value
|
||||
else if(Z>9) pC=.0000001256*std::pow(z,3.5)/(1.+.00429*std::exp(1.67*std::pow(z,.39)));
|
||||
else if(Z>0) pC=rate[rin[Z]+N]; // Tabulated light isotopes
|
||||
else G4cout<<"--Warning--G4QCaptureAtRest::RandomizeMuDecayOrCapture: NEG Z="<<Z<<G4endl;
|
||||
mZ=Z; mN=N; mH=Huff; mR=pC; // Remember the last calculated parameters
|
||||
//G4double DLifeT=-std::log(G4UniformRand())/pD; // Time of the muon decay inside the atom
|
||||
//G4double CLifeT=-std::log(G4UniformRand())/pC; // Time of the muon capture by nucleus
|
||||
//if(DLifeT<CLifeT)
|
||||
//{
|
||||
// Time=DLifeT;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: DecayLifeTime="<<Time<<G4endl;
|
||||
// G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: DecayLifeTime="<<Time<<G4endl;
|
||||
#endif
|
||||
return false;
|
||||
// return false;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Time=CLifeT;
|
||||
#ifdef debug
|
||||
// G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: CaptureLifeTime="<<Time<<G4endl;
|
||||
#endif
|
||||
// return true;
|
||||
//}
|
||||
if((pD+pC)*G4UniformRand()>pD) // CAPTURE @@ Cash pD+pC
|
||||
{
|
||||
Time=-std::log(G4UniformRand())/pC;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Time=CLifeT;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::RandomizeMuDecayOrCapture: CaptureLifeTime="<<Time<<G4endl;
|
||||
#endif
|
||||
return true;
|
||||
{
|
||||
Time=-std::log(G4UniformRand())/pD;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -916,3 +1088,335 @@ void G4QCaptureAtRest::CalculateEnergyDepositionOfTauCapture(G4int Z) // (2p->1s
|
||||
G4cout<<"G4QCapAtRest::CalculateEnergyDepositionOfTauCapture="<<EnergyDeposition<<G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Calculate the TotalEnergyDeposition for the AtomicCascadeDecay of TauMesoAtom to K-shell
|
||||
G4double G4QCaptureAtRest::RandomizeDecayElectron(G4int z) // E_kin in MeV
|
||||
{
|
||||
static const G4int nZ=12; // A#of tabulated nuclei
|
||||
static const G4int nE=200; // A#of tabulated energies for each nucleus
|
||||
static const G4int nEl=nE-1; // The last tabulated energy for nuclei
|
||||
static const G4int nEb=nE-2; // The before last tabulated energy for nuclei
|
||||
static G4double tZ[nZ]={1.,2.,4.,6.,8.,11.,15.,20.,30.,45.,65.,92.};
|
||||
//H1(Z=1)
|
||||
static G4double P0[nE]={
|
||||
0.00000,7.28739,9.21005,10.5820,11.6892,12.6350,13.4701,14.2238,14.9144,15.5546,
|
||||
16.1533,16.7171,17.2511,17.7593,18.2450,18.7106,19.1584,19.5901,20.0073,20.4112,
|
||||
20.8031,21.1839,21.5544,21.9153,22.2675,22.6114,22.9476,23.2766,23.5988,23.9146,
|
||||
24.2243,24.5284,24.8270,25.1205,25.4091,25.6931,25.9726,26.2479,26.5192,26.7865,
|
||||
27.0502,27.3103,27.5670,27.8204,28.0706,28.3178,28.5621,28.8035,29.0422,29.2783,
|
||||
29.5118,29.7428,29.9715,30.1978,30.4219,30.6439,30.8637,31.0815,31.2972,31.5111,
|
||||
31.7231,31.9332,32.1416,32.3482,32.5531,32.7564,32.9581,33.1583,33.3569,33.5540,
|
||||
33.7497,33.9439,34.1368,34.3283,34.5185,34.7074,34.8951,35.0815,35.2667,35.4507,
|
||||
35.6335,35.8152,35.9958,36.1753,36.3537,36.5311,36.7075,36.8828,37.0572,37.2306,
|
||||
37.4030,37.5745,37.7451,37.9147,38.0835,38.2515,38.4185,38.5847,38.7501,38.9147,
|
||||
39.0785,39.2415,39.4038,39.5652,39.7260,39.8859,40.0452,40.2038,40.3616,40.5188,
|
||||
40.6753,40.8311,40.9862,41.1407,41.2946,41.4478,41.6004,41.7524,41.9038,42.0546,
|
||||
42.2048,42.3545,42.5035,42.6520,42.8000,42.9474,43.0942,43.2405,43.3863,43.5316,
|
||||
43.6764,43.8206,43.9644,44.1076,44.2504,44.3927,44.5345,44.6759,44.8168,44.9572,
|
||||
45.0972,45.2367,45.3758,45.5145,45.6527,45.7905,45.9279,46.0648,46.2014,46.3375,
|
||||
46.4733,46.6086,46.7436,46.8781,47.0123,47.1461,47.2796,47.4126,47.5453,47.6776,
|
||||
47.8096,47.9412,48.0724,48.2034,48.3339,48.4641,48.5940,48.7236,48.8528,48.9817,
|
||||
49.1103,49.2385,49.3665,49.4941,49.6214,49.7484,49.8751,50.0015,50.1276,50.2534,
|
||||
50.3789,50.5041,50.6290,50.7536,50.8780,51.0021,51.1259,51.2494,51.3727,51.4957,
|
||||
51.6184,51.7409,51.8633,51.9856,52.1080,52.2311,52.3561,52.4857,52.6273,52.8065};
|
||||
//He4(Z=2)
|
||||
static G4double P1[nE]={
|
||||
0.00000,7.27695,9.19653,10.5662,11.6715,12.6156,13.4493,14.2016,14.8910,15.5300,
|
||||
16.1275,16.6903,17.2233,17.7306,18.2153,18.6800,19.1269,19.5578,19.9742,20.3774,
|
||||
20.7685,21.1485,21.5182,21.8785,22.2299,22.5732,22.9087,23.2370,23.5585,23.8737,
|
||||
24.1828,24.4862,24.7843,25.0772,25.3652,25.6486,25.9275,26.2023,26.4729,26.7398,
|
||||
27.0029,27.2625,27.5186,27.7715,28.0212,28.2679,28.5116,28.7525,28.9907,29.2263,
|
||||
29.4593,29.6899,29.9180,30.1439,30.3675,30.5890,30.8083,31.0256,31.2410,31.4544,
|
||||
31.6659,31.8756,32.0835,32.2897,32.4942,32.6970,32.8983,33.0980,33.2962,33.4929,
|
||||
33.6881,33.8820,34.0744,34.2655,34.4553,34.6438,34.8310,35.0170,35.2018,35.3854,
|
||||
35.5678,35.7492,35.9293,36.1085,36.2865,36.4635,36.6395,36.8144,36.9884,37.1614,
|
||||
37.3334,37.5046,37.6748,37.8441,38.0125,38.1800,38.3467,38.5126,38.6776,38.8418,
|
||||
39.0053,39.1679,39.3298,39.4909,39.6512,39.8109,39.9698,40.1280,40.2855,40.4423,
|
||||
40.5984,40.7539,40.9087,41.0629,41.2164,41.3693,41.5215,41.6732,41.8242,41.9747,
|
||||
42.1246,42.2739,42.4226,42.5707,42.7184,42.8654,43.0119,43.1579,43.3034,43.4483,
|
||||
43.5928,43.7367,43.8801,44.0231,44.1655,44.3075,44.4490,44.5900,44.7306,44.8707,
|
||||
45.0104,45.1496,45.2884,45.4267,45.5646,45.7021,45.8392,45.9758,46.1121,46.2479,
|
||||
46.3833,46.5184,46.6530,46.7873,46.9211,47.0546,47.1878,47.3205,47.4529,47.5849,
|
||||
47.7166,47.8479,47.9788,48.1094,48.2397,48.3696,48.4992,48.6285,48.7574,48.8860,
|
||||
49.0143,49.1422,49.2699,49.3972,49.5242,49.6509,49.7773,49.9034,50.0292,50.1548,
|
||||
50.2800,50.4050,50.5297,50.6541,50.7783,50.9023,51.0261,51.1498,51.2735,51.3973,
|
||||
51.5215,51.6462,51.7721,51.8999,52.0308,52.1668,52.3115,52.4720,52.6642,52.9396};
|
||||
//Be9(Z=4)
|
||||
static G4double P2[nE]={
|
||||
0.00000,7.23479,9.14334,10.5051,11.6039,12.5425,13.3712,14.1191,14.8044,15.4396,
|
||||
16.0336,16.5930,17.1228,17.6270,18.1088,18.5707,19.0150,19.4432,19.8571,20.2579,
|
||||
20.6466,21.0243,21.3918,21.7499,22.0992,22.4404,22.7739,23.1002,23.4198,23.7330,
|
||||
24.0403,24.3419,24.6381,24.9292,25.2155,25.4971,25.7744,26.0474,26.3165,26.5817,
|
||||
26.8432,27.1012,27.3558,27.6071,27.8553,28.1005,28.3428,28.5823,28.8190,29.0531,
|
||||
29.2847,29.5139,29.7407,29.9652,30.1874,30.4076,30.6256,30.8416,31.0556,31.2677,
|
||||
31.4779,31.6863,31.8930,32.0979,32.3012,32.5028,32.7029,32.9014,33.0984,33.2939,
|
||||
33.4880,33.6806,33.8719,34.0619,34.2505,34.4379,34.6240,34.8088,34.9925,35.1750,
|
||||
35.3563,35.5366,35.7157,35.8937,36.0707,36.2466,36.4215,36.5954,36.7683,36.9403,
|
||||
37.1113,37.2814,37.4506,37.6189,37.7863,37.9528,38.1185,38.2834,38.4475,38.6107,
|
||||
38.7731,38.9348,39.0957,39.2559,39.4153,39.5740,39.7319,39.8892,40.0457,40.2016,
|
||||
40.3568,40.5114,40.6652,40.8185,40.9711,41.1231,41.2744,41.4252,41.5754,41.7249,
|
||||
41.8739,42.0223,42.1702,42.3174,42.4642,42.6104,42.7560,42.9012,43.0458,43.1899,
|
||||
43.3334,43.4765,43.6191,43.7612,43.9028,44.0440,44.1846,44.3248,44.4646,44.6039,
|
||||
44.7427,44.8811,45.0191,45.1566,45.2937,45.4304,45.5666,45.7025,45.8379,45.9730,
|
||||
46.1076,46.2419,46.3757,46.5092,46.6423,46.7750,46.9074,47.0394,47.1710,47.3023,
|
||||
47.4332,47.5637,47.6939,47.8238,47.9533,48.0826,48.2114,48.3400,48.4683,48.5962,
|
||||
48.7239,48.8512,48.9783,49.1052,49.2318,49.3581,49.4843,49.6103,49.7362,49.8620,
|
||||
49.9878,50.1137,50.2397,50.3660,50.4927,50.6200,50.7481,50.8774,51.0083,51.1412,
|
||||
51.2769,51.4163,51.5607,51.7120,51.8729,52.0476,52.2435,52.4742,52.7705,53.2313};
|
||||
//C12(Z=6)
|
||||
static G4double P3[nE]={
|
||||
0.00000,7.18201,9.07814,10.4312,11.5230,12.4557,13.2793,14.0225,14.7036,15.3349,
|
||||
15.9253,16.4814,17.0080,17.5092,17.9882,18.4474,18.8890,19.3148,19.7263,20.1247,
|
||||
20.5112,20.8867,21.2521,21.6082,21.9555,22.2948,22.6264,22.9509,23.2687,23.5802,
|
||||
23.8858,24.1857,24.4803,24.7699,25.0546,25.3347,25.6105,25.8821,26.1497,26.4135,
|
||||
26.6737,26.9303,27.1836,27.4336,27.6805,27.9244,28.1654,28.4037,28.6392,28.8721,
|
||||
29.1026,29.3306,29.5562,29.7796,30.0007,30.2198,30.4367,30.6516,30.8646,31.0756,
|
||||
31.2848,31.4923,31.6979,31.9019,32.1041,32.3048,32.5039,32.7015,32.8975,33.0921,
|
||||
33.2853,33.4770,33.6674,33.8565,34.0443,34.2308,34.4160,34.6000,34.7829,34.9645,
|
||||
35.1451,35.3245,35.5028,35.6800,35.8562,36.0313,36.2055,36.3786,36.5508,36.7220,
|
||||
36.8923,37.0616,37.2301,37.3976,37.5643,37.7302,37.8952,38.0593,38.2227,38.3852,
|
||||
38.5470,38.7080,38.8683,39.0277,39.1865,39.3445,39.5018,39.6585,39.8144,39.9696,
|
||||
40.1242,40.2781,40.4314,40.5840,40.7360,40.8874,41.0382,41.1884,41.3379,41.4869,
|
||||
41.6353,41.7832,41.9305,42.0772,42.2234,42.3690,42.5141,42.6587,42.8028,42.9463,
|
||||
43.0894,43.2319,43.3740,43.5156,43.6567,43.7973,43.9375,44.0772,44.2164,44.3552,
|
||||
44.4936,44.6315,44.7690,44.9060,45.0426,45.1789,45.3147,45.4501,45.5851,45.7197,
|
||||
45.8539,45.9877,46.1211,46.2542,46.3869,46.5193,46.6512,46.7829,46.9142,47.0451,
|
||||
47.1758,47.3061,47.4361,47.5658,47.6952,47.8243,47.9532,48.0819,48.2103,48.3385,
|
||||
48.4666,48.5945,48.7223,48.8501,48.9778,49.1056,49.2335,49.3616,49.4899,49.6187,
|
||||
49.7479,49.8779,50.0087,50.1406,50.2738,50.4087,50.5457,50.6854,50.8282,50.9752,
|
||||
51.1272,51.2858,51.4528,51.6310,51.8244,52.0390,52.2854,52.5832,52.9766,53.6078};
|
||||
//O16(Z=8)
|
||||
static G4double P4[nE]={
|
||||
0.00000,7.11944,9.00194,10.3456,11.4301,12.3566,13.1748,13.9133,14.5901,15.2176,
|
||||
15.8044,16.3570,16.8806,17.3789,17.8550,18.3116,18.7507,19.1741,19.5833,19.9796,
|
||||
20.3640,20.7375,21.1010,21.4552,21.8007,22.1382,22.4681,22.7910,23.1072,23.4172,
|
||||
23.7213,24.0198,24.3130,24.6011,24.8845,25.1633,25.4378,25.7082,25.9746,26.2372,
|
||||
26.4962,26.7517,27.0039,27.2528,27.4987,27.7415,27.9816,28.2188,28.4534,28.6854,
|
||||
28.9149,29.1420,29.3667,29.5892,29.8095,30.0277,30.2438,30.4579,30.6701,30.8803,
|
||||
31.0888,31.2954,31.5004,31.7036,31.9052,32.1051,32.3035,32.5004,32.6958,32.8898,
|
||||
33.0823,33.2734,33.4632,33.6517,33.8388,34.0247,34.2094,34.3929,34.5751,34.7563,
|
||||
34.9363,35.1151,35.2929,35.4696,35.6453,35.8200,35.9936,36.1663,36.3380,36.5088,
|
||||
36.6786,36.8475,37.0155,37.1827,37.3489,37.5144,37.6789,37.8427,38.0057,38.1678,
|
||||
38.3292,38.4899,38.6497,38.8089,38.9673,39.1250,39.2819,39.4382,39.5938,39.7488,
|
||||
39.9030,40.0566,40.2096,40.3619,40.5136,40.6647,40.8152,40.9651,41.1144,41.2632,
|
||||
41.4113,41.5589,41.7059,41.8524,41.9984,42.1438,42.2887,42.4330,42.5769,42.7202,
|
||||
42.8631,43.0054,43.1473,43.2887,43.4296,43.5701,43.7101,43.8496,43.9887,44.1274,
|
||||
44.2656,44.4034,44.5407,44.6777,44.8142,44.9503,45.0861,45.2214,45.3564,45.4910,
|
||||
45.6252,45.7590,45.8925,46.0256,46.1584,46.2909,46.4231,46.5549,46.6865,46.8178,
|
||||
46.9488,47.0796,47.2101,47.3404,47.4706,47.6005,47.7304,47.8601,47.9898,48.1194,
|
||||
48.2491,48.3788,48.5087,48.6388,48.7692,48.8999,49.0311,49.1629,49.2955,49.4289,
|
||||
49.5635,49.6993,49.8367,49.9760,50.1175,50.2617,50.4091,50.5605,50.7166,50.8785,
|
||||
51.0475,51.2256,51.4151,51.6195,51.8439,52.0962,52.3897,52.7496,53.2325,54.0205};
|
||||
//Na23(Z=11)
|
||||
static G4double P5[nE]={
|
||||
0.00000,7.00695,8.86633,10.1943,11.2667,12.1832,12.9928,13.7237,14.3938,15.0151,
|
||||
15.5963,16.1438,16.6625,17.1563,17.6283,18.0810,18.5164,18.9362,19.3421,19.7352,
|
||||
20.1165,20.4872,20.8479,21.1994,21.5424,21.8775,22.2051,22.5257,22.8397,23.1476,
|
||||
23.4497,23.7462,24.0375,24.3239,24.6055,24.8826,25.1555,25.4243,25.6892,25.9503,
|
||||
26.2078,26.4619,26.7127,26.9604,27.2050,27.4466,27.6854,27.9215,28.1550,28.3859,
|
||||
28.6143,28.8404,29.0641,29.2857,29.5050,29.7223,29.9375,30.1508,30.3621,30.5716,
|
||||
30.7793,30.9852,31.1894,31.3919,31.5928,31.7921,31.9899,32.1862,32.3810,32.5743,
|
||||
32.7663,32.9569,33.1462,33.3341,33.5208,33.7063,33.8905,34.0735,34.2554,34.4361,
|
||||
34.6157,34.7942,34.9717,35.1481,35.3235,35.4978,35.6712,35.8436,36.0150,36.1856,
|
||||
36.3552,36.5239,36.6917,36.8586,37.0247,37.1900,37.3544,37.5181,37.6809,37.8430,
|
||||
38.0043,38.1648,38.3246,38.4837,38.6420,38.7997,38.9566,39.1129,39.2685,39.4234,
|
||||
39.5777,39.7314,39.8844,40.0368,40.1885,40.3397,40.4903,40.6403,40.7897,40.9385,
|
||||
41.0868,41.2345,41.3817,41.5284,41.6745,41.8201,41.9652,42.1097,42.2538,42.3974,
|
||||
42.5405,42.6831,42.8253,42.9670,43.1082,43.2490,43.3893,43.5292,43.6687,43.8078,
|
||||
43.9464,44.0847,44.2225,44.3600,44.4971,44.6338,44.7702,44.9062,45.0418,45.1772,
|
||||
45.3122,45.4469,45.5814,45.7155,45.8494,45.9831,46.1165,46.2497,46.3828,46.5156,
|
||||
46.6484,46.7810,46.9136,47.0462,47.1787,47.3113,47.4439,47.5768,47.7098,47.8430,
|
||||
47.9767,48.1107,48.2452,48.3804,48.5163,48.6530,48.7908,48.9297,49.0700,49.2119,
|
||||
49.3556,49.5015,49.6499,49.8012,49.9559,50.1146,50.2780,50.4470,50.6226,50.8063,
|
||||
50.9997,51.2054,51.4263,51.6671,51.9343,52.2382,52.5959,53.0400,53.6438,54.6445};
|
||||
//P31(Z=15)
|
||||
static G4double P6[nE]={
|
||||
0.00000,6.82422,8.64751,9.95140,11.0052,11.9065,12.7032,13.4228,14.0829,14.6952,
|
||||
15.2682,15.8082,16.3200,16.8074,17.2734,17.7205,18.1506,18.5656,18.9668,19.3555,
|
||||
19.7327,20.0995,20.4564,20.8044,21.1441,21.4759,21.8005,22.1182,22.4294,22.7347,
|
||||
23.0342,23.3283,23.6173,23.9014,24.1809,24.4560,24.7270,24.9939,25.2570,25.5164,
|
||||
25.7723,26.0249,26.2742,26.5204,26.7637,27.0040,27.2416,27.4765,27.7088,27.9387,
|
||||
28.1661,28.3912,28.6141,28.8347,29.0533,29.2698,29.4843,29.6969,29.9076,30.1165,
|
||||
30.3236,30.5290,30.7327,30.9348,31.1353,31.3342,31.5317,31.7277,31.9222,32.1153,
|
||||
32.3071,32.4975,32.6867,32.8745,33.0611,33.2465,33.4308,33.6138,33.7957,33.9765,
|
||||
34.1562,34.3349,34.5125,34.6890,34.8646,35.0392,35.2128,35.3855,35.5573,35.7281,
|
||||
35.8980,36.0671,36.2353,36.4027,36.5692,36.7350,36.8999,37.0640,37.2274,37.3900,
|
||||
37.5519,37.7130,37.8734,38.0331,38.1921,38.3505,38.5081,38.6651,38.8214,38.9771,
|
||||
39.1322,39.2866,39.4404,39.5937,39.7463,39.8983,40.0498,40.2007,40.3511,40.5009,
|
||||
40.6502,40.7989,40.9471,41.0948,41.2420,41.3887,41.5349,41.6806,41.8259,41.9707,
|
||||
42.1150,42.2589,42.4024,42.5454,42.6880,42.8302,42.9720,43.1134,43.2545,43.3951,
|
||||
43.5354,43.6754,43.8150,43.9542,44.0932,44.2319,44.3702,44.5084,44.6462,44.7838,
|
||||
44.9212,45.0584,45.1954,45.3323,45.4690,45.6057,45.7422,45.8787,46.0152,46.1517,
|
||||
46.2882,46.4249,46.5617,46.6987,46.8360,46.9735,47.1115,47.2499,47.3888,47.5284,
|
||||
47.6687,47.8098,47.9518,48.0950,48.2394,48.3852,48.5326,48.6819,48.8332,48.9869,
|
||||
49.1432,49.3027,49.4657,49.6327,49.8044,49.9815,50.1649,50.3557,50.5552,50.7653,
|
||||
50.9882,51.2267,51.4850,51.7686,52.0858,52.4496,52.8817,53.4232,54.1672,55.4144};
|
||||
//Ca40(Z=20)
|
||||
static G4double P7[nE]={
|
||||
0.00000,6.55304,8.32352,9.59220,10.6190,11.4982,12.2762,12.9795,13.6251,14.2244,
|
||||
14.7856,15.3149,15.8168,16.2951,16.7526,17.1918,17.6146,18.0227,18.4174,18.8000,
|
||||
19.1714,19.5327,19.8846,20.2277,20.5627,20.8902,21.2106,21.5244,21.8320,22.1337,
|
||||
22.4298,22.7208,23.0067,23.2880,23.5648,23.8373,24.1058,24.3704,24.6313,24.8886,
|
||||
25.1426,25.3933,25.6409,25.8855,26.1272,26.3661,26.6023,26.8360,27.0671,27.2959,
|
||||
27.5223,27.7465,27.9685,28.1884,28.4062,28.6221,28.8360,29.0481,29.2584,29.4669,
|
||||
29.6737,29.8789,30.0824,30.2844,30.4848,30.6838,30.8813,31.0774,31.2721,31.4654,
|
||||
31.6575,31.8482,32.0377,32.2260,32.4131,32.5990,32.7838,32.9675,33.1501,33.3316,
|
||||
33.5120,33.6915,33.8699,34.0474,34.2238,34.3994,34.5740,34.7478,34.9206,35.0926,
|
||||
35.2637,35.4339,35.6034,35.7720,35.9399,36.1070,36.2733,36.4389,36.6037,36.7678,
|
||||
36.9312,37.0939,37.2560,37.4173,37.5780,37.7380,37.8974,38.0562,38.2144,38.3719,
|
||||
38.5289,38.6853,38.8411,38.9963,39.1510,39.3051,39.4587,39.6117,39.7643,39.9163,
|
||||
40.0679,40.2189,40.3695,40.5196,40.6692,40.8184,40.9671,41.1154,41.2633,41.4108,
|
||||
41.5579,41.7045,41.8508,41.9967,42.1423,42.2875,42.4324,42.5769,42.7212,42.8651,
|
||||
43.0087,43.1521,43.2953,43.4381,43.5808,43.7233,43.8655,44.0077,44.1496,44.2915,
|
||||
44.4332,44.5749,44.7166,44.8582,44.9999,45.1416,45.2834,45.4253,45.5675,45.7098,
|
||||
45.8524,45.9953,46.1386,46.2824,46.4267,46.5716,46.7172,46.8635,47.0107,47.1589,
|
||||
47.3083,47.4588,47.6108,47.7643,47.9195,48.0768,48.2362,48.3981,48.5628,48.7306,
|
||||
48.9019,49.0772,49.2570,49.4420,49.6329,49.8306,50.0362,50.2510,50.4768,50.7155,
|
||||
50.9699,51.2436,51.5414,51.8702,52.2401,52.6667,53.1765,53.8195,54.7092,56.213};
|
||||
//Zn64(Z=30)
|
||||
static G4double P8[nE]={
|
||||
0.00000,5.93631,7.58588,8.77313,9.73699,10.5643,11.2979,11.9624,12.5734,13.1415,
|
||||
13.6742,14.1774,14.6552,15.1111,15.5477,15.9674,16.3719,16.7627,17.1412,17.5084,
|
||||
17.8654,18.2129,18.5517,18.8825,19.2058,19.5221,19.8319,20.1356,20.4335,20.7260,
|
||||
21.0135,21.2961,21.5742,21.8479,22.1175,22.3833,22.6453,22.9037,23.1588,23.4106,
|
||||
23.6593,23.9050,24.1479,24.3880,24.6255,24.8605,25.0931,25.3232,25.5512,25.7769,
|
||||
26.0005,26.2221,26.4417,26.6594,26.8753,27.0893,27.3017,27.5123,27.7214,27.9288,
|
||||
28.1348,28.3392,28.5422,28.7437,28.9439,29.1428,29.3404,29.5367,29.7318,29.9257,
|
||||
30.1184,30.3100,30.5005,30.6899,30.8782,31.0655,31.2518,31.4371,31.6215,31.8049,
|
||||
31.9874,32.1690,32.3497,32.5296,32.7086,32.8869,33.0643,33.2409,33.4168,33.5919,
|
||||
33.7663,33.9399,34.1129,34.2851,34.4567,34.6277,34.7979,34.9676,35.1366,35.3050,
|
||||
35.4728,35.6400,35.8067,35.9727,36.1383,36.3033,36.4677,36.6317,36.7951,36.9580,
|
||||
37.1205,37.2825,37.4440,37.6050,37.7656,37.9258,38.0855,38.2449,38.4038,38.5623,
|
||||
38.7205,38.8782,39.0356,39.1927,39.3494,39.5058,39.6618,39.8176,39.9730,40.1281,
|
||||
40.2830,40.4376,40.5920,40.7461,40.9000,41.0537,41.2072,41.3606,41.5137,41.6667,
|
||||
41.8196,41.9724,42.1251,42.2777,42.4303,42.5829,42.7354,42.8880,43.0407,43.1934,
|
||||
43.3462,43.4992,43.6524,43.8058,43.9595,44.1135,44.2679,44.4226,44.5779,44.7336,
|
||||
44.8900,45.0470,45.2047,45.3632,45.5227,45.6831,45.8447,46.0075,46.1716,46.3372,
|
||||
46.5045,46.6735,46.8446,47.0179,47.1936,47.3720,47.5535,47.7382,47.9267,48.1193,
|
||||
48.3166,48.5191,48.7275,48.9426,49.1653,49.3968,49.6383,49.8917,50.1588,50.4424,
|
||||
50.7458,51.0735,51.4316,51.8286,52.2771,52.7968,53.4209,54.2121,55.3131,57.1875};
|
||||
//Rh103(Z=45)
|
||||
static G4double P9[nE]={
|
||||
0.00000,5.00701,6.48187,7.55018,8.42075,9.17008,9.83596,10.4402,10.9967,11.5149,
|
||||
12.0017,12.4619,12.8995,13.3176,13.7185,14.1042,14.4765,14.8365,15.1856,15.5248,
|
||||
15.8548,16.1764,16.4903,16.7972,17.0974,17.3914,17.6797,17.9627,18.2406,18.5137,
|
||||
18.7825,19.0470,19.3075,19.5643,19.8176,20.0674,20.3141,20.5576,20.7983,21.0362,
|
||||
21.2714,21.5041,21.7344,21.9623,22.1880,22.4116,22.6331,22.8527,23.0703,23.2862,
|
||||
23.5003,23.7127,23.9234,24.1327,24.3404,24.5466,24.7514,24.9549,25.1571,25.3580,
|
||||
25.5577,25.7562,25.9535,26.1497,26.3449,26.5390,26.7322,26.9243,27.1155,27.3058,
|
||||
27.4952,27.6837,27.8714,28.0583,28.2445,28.4298,28.6144,28.7984,28.9816,29.1641,
|
||||
29.3460,29.5273,29.7079,29.8880,30.0675,30.2464,30.4248,30.6026,30.7799,30.9568,
|
||||
31.1332,31.3091,31.4845,31.6595,31.8341,32.0083,32.1821,32.3555,32.5286,32.7013,
|
||||
32.8736,33.0456,33.2173,33.3887,33.5598,33.7306,33.9011,34.0713,34.2414,34.4111,
|
||||
34.5806,34.7500,34.9191,35.0880,35.2567,35.4252,35.5936,35.7618,35.9299,36.0978,
|
||||
36.2656,36.4333,36.6008,36.7683,36.9357,37.1031,37.2704,37.4376,37.6048,37.7720,
|
||||
37.9391,38.1063,38.2735,38.4407,38.6080,38.7754,38.9428,39.1103,39.2779,39.4457,
|
||||
39.6136,39.7817,39.9500,40.1184,40.2872,40.4562,40.6255,40.7951,40.9650,41.1354,
|
||||
41.3061,41.4773,41.6490,41.8213,41.9941,42.1675,42.3417,42.5165,42.6922,42.8687,
|
||||
43.0462,43.2246,43.4042,43.5849,43.7669,43.9504,44.1353,44.3218,44.5102,44.7004,
|
||||
44.8928,45.0875,45.2847,45.4846,45.6876,45.8939,46.1038,46.3178,46.5362,46.7596,
|
||||
46.9885,47.2236,47.4656,47.7155,47.9743,48.2434,48.5242,48.8187,49.1292,49.4588,
|
||||
49.8113,50.1919,50.6075,51.0680,51.5878,52.1895,52.9113,53.8254,55.0955,57.2547};
|
||||
//Th159(Z=65)
|
||||
static G4double PA[nE]={
|
||||
0.00000,3.72463,4.98461,5.91463,6.68054,7.34437,7.93719,8.47714,8.97585,9.44132,
|
||||
9.87929,10.2941,10.6890,11.0666,11.4290,11.7780,12.1150,12.4412,12.7576,13.0651,
|
||||
13.3644,13.6563,13.9413,14.2199,14.4925,14.7597,15.0217,15.2789,15.5315,15.7800,
|
||||
16.0244,16.2651,16.5023,16.7361,16.9667,17.1943,17.4190,17.6410,17.8604,18.0774,
|
||||
18.2920,18.5044,18.7147,18.9229,19.1292,19.3336,19.5362,19.7371,19.9364,20.1341,
|
||||
20.3303,20.5251,20.7185,20.9106,21.1014,21.2910,21.4794,21.6667,21.8529,22.0381,
|
||||
22.2223,22.4055,22.5879,22.7693,22.9500,23.1298,23.3088,23.4871,23.6647,23.8416,
|
||||
24.0179,24.1935,24.3685,24.5430,24.7170,24.8904,25.0633,25.2358,25.4078,25.5794,
|
||||
25.7506,25.9214,26.0919,26.2620,26.4319,26.6014,26.7706,26.9396,27.1084,27.2770,
|
||||
27.4453,27.6135,27.7815,27.9494,28.1171,28.2847,28.4522,28.6197,28.7871,28.9545,
|
||||
29.1218,29.2891,29.4564,29.6237,29.7911,29.9586,30.1260,30.2936,30.4613,30.6291,
|
||||
30.7970,30.9651,31.1333,31.3018,31.4704,31.6392,31.8082,31.9775,32.1471,32.3169,
|
||||
32.4870,32.6574,32.8281,32.9992,33.1706,33.3425,33.5147,33.6873,33.8603,34.0338,
|
||||
34.2078,34.3822,34.5572,34.7326,34.9087,35.0852,35.2624,35.4402,35.6187,35.7978,
|
||||
35.9775,36.1580,36.3393,36.5213,36.7041,36.8877,37.0722,37.2576,37.4439,37.6312,
|
||||
37.8196,38.0089,38.1994,38.3910,38.5838,38.7778,38.9731,39.1698,39.3680,39.5676,
|
||||
39.7688,39.9716,40.1762,40.3827,40.5910,40.8014,41.0140,41.2289,41.4463,41.6662,
|
||||
41.8890,42.1147,42.3437,42.5761,42.8122,43.0524,43.2969,43.5462,43.8008,44.0610,
|
||||
44.3276,44.6012,44.8826,45.1727,45.4727,45.7838,46.1077,46.4465,46.8024,47.1788,
|
||||
47.5795,48.0100,48.4774,48.9920,49.5687,50.2309,51.0179,52.0041,53.3576,55.6238};
|
||||
|
||||
//U238(Z=92)
|
||||
static G4double PB[nE]={
|
||||
0.00000,1.93933,2.80877,3.48857,4.06872,4.58456,5.05440,5.48917,5.89607,6.28010,
|
||||
6.64494,6.99335,7.32751,7.64913,7.95964,8.26019,8.55175,8.83516,9.11111,9.38023,
|
||||
9.64304,9.90002,10.1516,10.3981,10.6399,10.8772,11.1105,11.3398,11.5654,11.7875,
|
||||
12.0063,12.2220,12.4347,12.6446,12.8518,13.0564,13.2586,13.4585,13.6561,13.8516,
|
||||
14.0450,14.2364,14.4260,14.6137,14.7998,14.9841,15.1668,15.3480,15.5278,15.7060,
|
||||
15.8829,16.0585,16.2328,16.4059,16.5778,16.7485,16.9181,17.0867,17.2543,17.4208,
|
||||
17.5864,17.7511,17.9149,18.0779,18.2400,18.4013,18.5619,18.7218,18.8809,19.0394,
|
||||
19.1972,19.3544,19.5110,19.6670,19.8225,19.9774,20.1318,20.2858,20.4393,20.5924,
|
||||
20.7450,20.8973,21.0492,21.2007,21.3519,21.5028,21.6534,21.8038,21.9539,22.1037,
|
||||
22.2534,22.4029,22.5522,22.7013,22.8503,22.9992,23.1481,23.2968,23.4455,23.5942,
|
||||
23.7428,23.8915,24.0402,24.1889,24.3377,24.4866,24.6355,24.7846,24.9339,25.0833,
|
||||
25.2329,25.3828,25.5328,25.6832,25.8337,25.9846,26.1359,26.2874,26.4394,26.5917,
|
||||
26.7444,26.8976,27.0513,27.2055,27.3602,27.5155,27.6713,27.8278,27.9849,28.1427,
|
||||
28.3012,28.4604,28.6204,28.7812,28.9429,29.1055,29.2690,29.4334,29.5989,29.7655,
|
||||
29.9331,30.1019,30.2719,30.4431,30.6156,30.7895,30.9648,31.1416,31.3200,31.4999,
|
||||
31.6816,31.8650,32.0502,32.2374,32.4266,32.6178,32.8113,33.0071,33.2053,33.4060,
|
||||
33.6094,33.8156,34.0248,34.2370,34.4525,34.6714,34.8939,35.1203,35.3508,35.5855,
|
||||
35.8249,36.0691,36.3185,36.5734,36.8343,37.1015,37.3756,37.6571,37.9466,38.2448,
|
||||
38.5525,38.8705,39.2000,39.5422,39.8984,40.2703,40.6601,41.0701,41.5034,41.9638,
|
||||
42.4562,42.9870,43.5648,44.2017,44.9151,45.7322,46.6981,47.8972,49.5188,52.1676};
|
||||
static G4double* PP[nZ]= {P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,PA,PB};
|
||||
static const G4int mZ1=93; // MaxPossibleZ+1
|
||||
static const G4int mZ=mZ1-1; // MaxPossibleZ
|
||||
static G4double* P[mZ1]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
//---------------------------------------------------------------------------------------
|
||||
if(z<1 || z>mZ)
|
||||
{
|
||||
G4cout<<"-W-G4QCapAtRest::RandomizeDecayElectron: <=0 or big(>"<<mZ<<") Z="<<z<<G4endl;
|
||||
return 0.;
|
||||
}
|
||||
G4double Z = z;
|
||||
G4double* nP = 0;
|
||||
if(!P[z]) // The table for this element must be created
|
||||
{
|
||||
for(G4int i=0; i<nZ; i++)
|
||||
{
|
||||
G4double fZ=tZ[i];
|
||||
if(Z<=fZ) // The extrapolation bin is found
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCapAtRest::RandomizeDecayElectron: Z="<<Z<<", fZ="<<fZ<<G4endl;
|
||||
#endif
|
||||
nP = new G4double[nE];
|
||||
G4double* fP=PP[i];
|
||||
if(Z==fZ) for(G4int j=0; j<nE; j++) nP[j]=fP[j];
|
||||
else
|
||||
{
|
||||
G4int i1=i-1; // i>2, asthe first tabilated Z are 1,2,4,... and min_i=3
|
||||
G4double iZ=tZ[i1];
|
||||
G4double* iP=PP[i1];
|
||||
G4double rZ=(Z-iZ)/(fZ-iZ);
|
||||
for(G4int j=0; j<nE; j++) nP[j]=iP[j]+(fP[j]-iP[j])*rZ;
|
||||
}
|
||||
#ifdef debug
|
||||
for(G4int k=0; k<nE; k++)G4cout<<"G4QCAR::RandDecEle:P["<<k<<"]="<<nP[k]<<G4endl;
|
||||
#endif
|
||||
P[z]=nP;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else nP=P[z];
|
||||
// At this point the randomization table for the element is in nP
|
||||
G4double R=G4UniformRand()*nE;
|
||||
G4int iR=static_cast<int>(R);
|
||||
if(iR > nEl) iR=nEl;
|
||||
else if(iR<0) iR=0;
|
||||
G4double nPi=nP[iR];
|
||||
G4double nPf=0.;
|
||||
if(iR<nEl) nPf=nP[iR+1];
|
||||
else nPf=nP[nEl]+(nP[nEl]-nP[nEb])/2; // An artificial tail
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCapAtR::RaDEl:R="<<R<<",Ei="<<nPi<<",E="<<MeV*(nPi+(R-iR)*(nPf-nPi))<<G4endl;
|
||||
#endif
|
||||
return MeV*(nPi+(R-iR)*(nPf-nPi));
|
||||
}
|
||||
|
||||
+55
-29
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QCollision.cc,v 1.16 2006/11/22 13:49:06 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4QCollision.cc,v 1.19 2007/05/02 14:59:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// ---------------- G4QCollision class -----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
@@ -53,7 +53,7 @@ G4QCollision::G4QCollision(const G4String& processName) : G4VDiscreteProcess(pro
|
||||
#endif
|
||||
if (verboseLevel>0) G4cout << GetProcessName() << " process is created "<< G4endl;
|
||||
|
||||
G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World with 234 particles
|
||||
//G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPSWorld (234 part.max)
|
||||
G4QNucleus::SetParameters(freeNuc,freeDib,clustProb,mediRatio); // Clusterization param's
|
||||
G4Quasmon::SetParameters(Temperature,SSin2Gluons,EtaEtaprime); // Hadronic parameters
|
||||
G4QEnvironment::SetParameters(SolidAngle); // SolAngle of pbar-A secondary mesons capture
|
||||
@@ -241,7 +241,7 @@ G4double G4QCollision::GetMeanFreePath(const G4Track& aTrack,G4double,G4ForceCon
|
||||
for(G4int j=0; j<isoSize; j++) // Calculation of abundance vector for isotopes
|
||||
{
|
||||
G4int N=pElement->GetIsotope(j)->GetN()-Z; // N means A=N+Z !
|
||||
if(pElement->GetIsotope(j)->GetZ()!=Z)G4cerr<<"G4QCaptureAtRest::GetMeanFreePath"
|
||||
if(pElement->GetIsotope(j)->GetZ()!=Z)G4cerr<<"G4QCollision::GetMeanFreePath"
|
||||
<<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
|
||||
G4double abund=abuVector[j];
|
||||
std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
|
||||
@@ -251,7 +251,7 @@ G4double G4QCollision::GetMeanFreePath(const G4Track& aTrack,G4double,G4ForceCon
|
||||
newAbund->push_back(pr);
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: pairVectorLength="<<newAbund->size()<<G4endl;
|
||||
G4cout<<"G4QCollision::GetMeanFreePath: pairVectLength="<<newAbund->size()<<G4endl;
|
||||
#endif
|
||||
indEl=G4QIsotope::Get()->InitElement(Z,indEl,newAbund); // definition of the newInd
|
||||
for(G4int k=0; k<isoSize; k++) delete (*newAbund)[k]; // Cleaning temporary
|
||||
@@ -341,6 +341,7 @@ G4bool G4QCollision::IsApplicable(const G4ParticleDefinition& particle)
|
||||
|
||||
G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step& step)
|
||||
{
|
||||
static const G4double third = 1./3.;
|
||||
static const G4double me=G4Electron::Electron()->GetPDGMass(); // electron mass
|
||||
static const G4double me2=me*me; // squared electron mass
|
||||
static const G4double mu=G4MuonMinus::MuonMinus()->GetPDGMass(); // muon mass
|
||||
@@ -364,7 +365,8 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
static const G4double mudM=mu2/dM; // for x limit
|
||||
static const G4double hdM=dM/2.; // M of the "nucleon"
|
||||
static const G4double hdM2=hdM*hdM; // M2 of the "nucleon"
|
||||
//static const G4double mPi0 = G4QPDGCode(111).GetMass();
|
||||
static const G4double mPi0 = G4QPDGCode(111).GetMass();
|
||||
static const G4double mPi0s= mPi0*mPi0;
|
||||
//static const G4double mDeut= G4QPDGCode(2112).GetNuclMass(1,1,0);
|
||||
static const G4double mPi = G4QPDGCode(211).GetMass();
|
||||
static const G4double tmPi = mPi+mPi; // Doubled mass of the charged pion
|
||||
@@ -375,6 +377,13 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
static const G4double muD = mPPi+mu; // Multiperipheral threshold
|
||||
static const G4double muD2 = muD*muD;
|
||||
//-------------------------------------------------------------------------------------
|
||||
static G4bool CWinit = true; // CHIPS Warld needs to be initted
|
||||
if(CWinit)
|
||||
{
|
||||
CWinit=false;
|
||||
G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
|
||||
}
|
||||
//-------------------------------------------------------------------------------------
|
||||
const G4DynamicParticle* projHadron = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particle=projHadron->GetDefinition();
|
||||
#ifdef debug
|
||||
@@ -392,10 +401,10 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
G4double momentum = projHadron->GetTotalMomentum(); // 3-momentum of the Particle
|
||||
G4double Momentum=proj4M.rho();
|
||||
if(std::fabs(Momentum-momentum)>.001)
|
||||
G4cerr<<"G4QCollision::PostStepDoIt: P="<<Momentum<<"="<<momentum<<G4endl;
|
||||
G4cerr<<"*G4QCollision::PostStepDoIt: P="<<Momentum<<"#"<<momentum<<G4endl;
|
||||
#ifdef debug
|
||||
G4double mp=proj4M.m();
|
||||
G4cout<<"G4QCollision::PostStepDoIt is called, P="<<Momentum<<"="<<momentum<<G4endl;
|
||||
G4cout<<"G4QCollis::PostStepDoIt:called, P="<<Momentum<<"="<<momentum<<",m="<<mp<<G4endl;
|
||||
#endif
|
||||
if (!IsApplicable(*particle)) // Check applicability
|
||||
{
|
||||
@@ -531,7 +540,7 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
//
|
||||
G4int targPDG=90000000+Z*1000+N; // PDG Code of the target nucleus
|
||||
G4QPDGCode targQPDG(targPDG);
|
||||
G4double tM=targQPDG.GetMass();
|
||||
G4double tM=targQPDG.GetMass(); // Target mass
|
||||
G4QHadronVector* output=new G4QHadronVector;// Prototype of EnvironOutput G4QHadronVector
|
||||
G4double absMom = 0.; // Prototype of absorbed by nucleus Moment
|
||||
G4QHadronVector* leadhs=new G4QHadronVector;// Prototype of QuasmOutput G4QHadronVectorum
|
||||
@@ -564,7 +573,7 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
if(xSec <= 0.) // The cross-section is 0 -> Do Nothing
|
||||
{
|
||||
#ifdef debug
|
||||
G4cerr<<"G4QCollision::PSDoIt: Called for zero Cross-section"<<G4endl;
|
||||
G4cerr<<"---OUT---G4QCollision::PSDoIt: Called for zero Cross-section"<<G4endl;
|
||||
#endif
|
||||
//Do Nothing Action insead of the reaction
|
||||
aParticleChange.ProposeEnergy(kinEnergy);
|
||||
@@ -574,10 +583,13 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
return G4VDiscreteProcess::PostStepDoIt(track,step);
|
||||
}
|
||||
G4double photonEnergy = CSmanager->GetExchangeEnergy(); // Energy of EqivExchangePart
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCol::PStDoIt: kE="<<kinEnergy<<",dir="<<dir<<",phE="<<photonEnergy<<G4endl;
|
||||
#endif
|
||||
if( kinEnergy < photonEnergy || photonEnergy < 0.)
|
||||
{
|
||||
//Do Nothing Action insead of the reaction
|
||||
G4cerr<<"G4QCollision::PSDoIt: photE="<<photonEnergy<<">leptE="<<kinEnergy<<G4endl;
|
||||
G4cerr<<"--G4QCollision::PSDoIt: photE="<<photonEnergy<<">leptE="<<kinEnergy<<G4endl;
|
||||
aParticleChange.ProposeEnergy(kinEnergy);
|
||||
aParticleChange.ProposeLocalEnergyDeposit(0.);
|
||||
aParticleChange.ProposeMomentumDirection(dir);
|
||||
@@ -586,11 +598,12 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
}
|
||||
G4double photonQ2 = CSmanager->GetExchangeQ2(photonEnergy);// Q2(t) of EqivExchangePart
|
||||
G4double W=photonEnergy-photonQ2/dM;// HadronicEnergyFlow (W-energy) for virtual photon
|
||||
if(tM<999.) W-=mPi0+mPi0s/dM; // Pion production threshold for a nucleon target
|
||||
if(W<0.)
|
||||
{
|
||||
//Do Nothing Action insead of the reaction
|
||||
#ifdef debug
|
||||
G4cout << "G4QCollision::PostStepDoIt:(lN) negative equivalent energy W="<<W<<G4endl;
|
||||
G4cout<<"--G4QCollision::PostStepDoIt:(lN) negative equivalent energy W="<<W<<G4endl;
|
||||
#endif
|
||||
aParticleChange.ProposeEnergy(kinEnergy);
|
||||
aParticleChange.ProposeLocalEnergyDeposit(0.);
|
||||
@@ -607,7 +620,7 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
{
|
||||
//Do NothingToDo Action insead of the reaction
|
||||
#ifdef debug
|
||||
G4cout << "G4QCollision::PostStepDoIt: probability correction - DoNothing"<<G4endl;
|
||||
G4cout<<"-DoNoth-G4QCollision::PostStepDoIt: probab. correction - DoNothing"<<G4endl;
|
||||
#endif
|
||||
aParticleChange.ProposeEnergy(kinEnergy);
|
||||
aParticleChange.ProposeLocalEnergyDeposit(0.);
|
||||
@@ -617,10 +630,13 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
}
|
||||
G4double iniE=kinEnergy+ml; // Initial total energy of the lepton
|
||||
G4double finE=iniE-photonEnergy; // Final total energy of the lepton
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QCollision::PoStDoIt:E="<<iniE<<",lE="<<finE<<"-"<<ml<<"="<<finE-ml<<G4endl;
|
||||
#endif
|
||||
aParticleChange.ProposeEnergy(finE-ml);
|
||||
if(finE<=ml) // Secondary lepton (e/mu/tau) at rest disappears
|
||||
{
|
||||
aParticleChange.ProposeEnergy(0.) ;
|
||||
aParticleChange.ProposeEnergy(0.);
|
||||
if(aProjPDG== 11) aParticleChange.ProposeTrackStatus(fStopAndKill);
|
||||
else aParticleChange.ProposeTrackStatus(fStopButAlive);
|
||||
aParticleChange.ProposeMomentumDirection(dir);
|
||||
@@ -630,15 +646,16 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
G4double finP=std::sqrt(finE*finE-ml2); // Final momentum of the electron
|
||||
G4double cost=(iniE*finE-ml2-photonQ2/2)/iniP/finP; // cos(scat_ang_of_lepton)
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QCollision::PostStDoIt: Q2="<<photonQ2<<", cost="<<cost<<G4endl;
|
||||
G4cout<<"G4QC::PSDoIt:Q2="<<photonQ2<<",ct="<<cost<<",Pi="<<iniP<<",Pf="<<finP<<G4endl;
|
||||
#endif
|
||||
if(cost>1.) cost=1.; // To avoid the accuracy of calculation problem
|
||||
if(cost<-1.) cost=-1.; // To avoid the accuracy of calculation problem
|
||||
//
|
||||
// Scatter the lepton ( @@ make the same thing for real photons)
|
||||
// At this point we have photonEnergy and photonQ2 (with notDefinedPhi)->SelectProjPart
|
||||
G4double absEn = am*GeV; // @@(b) Mean Energy Absorbed by a Nucleus
|
||||
if(absEn < photonEnergy) // --> the absorption of energy can happen
|
||||
G4double absEn = std::pow(am,third)*GeV; // @@(b) Mean Energy Absorbed by a Nucleus
|
||||
//if(am>1 && absEn < photonEnergy) // --> the absorption of energy can happen
|
||||
if(absEn < photonEnergy) // --> the absorption of energy can happen
|
||||
{
|
||||
G4double abtEn = absEn+hdM; // @@(b) MeanEnergyAbsorbed by a nucleus (+M_N)
|
||||
G4double abEn2 = abtEn*abtEn; // Squared absorbed Energy + MN
|
||||
@@ -649,11 +666,11 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
absMom = std::sqrt(abMo2); // Absorbed Momentum
|
||||
if(absMom < phMo) // --> the absorption of momentum can happen
|
||||
{
|
||||
G4double dEn = photonEnergy - absEn;
|
||||
G4double dEn = photonEnergy - absEn; // Leading energy
|
||||
G4double dMo = phMo - absMom; // Leading momentum
|
||||
G4double sF = dEn*dEn - dMo*dMo;// s of leading particle
|
||||
#ifdef ppdebug
|
||||
G4cout<<"G4QCol::PStDoIt: sF="<<sF<<", phEn="<<photonEnergy<<G4endl;
|
||||
G4cout<<"-PhotoAbsorption-G4QCol::PStDoIt:sF="<<sF<<",phEn="<<photonEnergy<<G4endl;
|
||||
#endif
|
||||
if(sF > stmPi) // --> Leading fragmentation is possible
|
||||
{
|
||||
@@ -663,6 +680,7 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
}
|
||||
else absMom=0.; // Flag that nothing has happened
|
||||
}
|
||||
else absMom=0.; // Flag that nothing has happened
|
||||
}
|
||||
// ------------- End of ProjPart selection
|
||||
//
|
||||
@@ -677,17 +695,24 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
G4ThreeVector findir=cost*dir+sinx*ortx+siny*orty;
|
||||
aParticleChange.ProposeMomentumDirection(findir); // new direction for the lepton
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy()<<","<<finE
|
||||
<<", d="<<*aParticleChange.GetMomentumDirection()<<","<<findir<<G4endl;
|
||||
G4cout<<"G4QCollision::PostStepDoIt: E="<<aParticleChange.GetEnergy()<<"="<<finE<<"-"
|
||||
<<ml<<", d="<<*aParticleChange.GetMomentumDirection()<<","<<findir<<G4endl;
|
||||
#endif
|
||||
G4ThreeVector photon3M=iniP*dir-finP*findir;// 3D total momentum of photon
|
||||
if(absMom) // Photon must be reduced & LeadingSyst fragmented
|
||||
{
|
||||
G4double ptm=photon3M.mag();
|
||||
G4ThreeVector lead3M=photon3M*(ptm-absMom)/ptm;
|
||||
photon3M-=lead3M; // Reduce photon momentum (energy is reduced)
|
||||
G4double ptm=photon3M.mag(); // 3M of the virtual photon
|
||||
#ifdef ppdebug
|
||||
G4cout<<"-Absorption-G4QCollision::PostStepDoIt: ph3M="<<photon3M<<", eIn3M="
|
||||
<<iniP*dir<<", eFin3M="<<finP*findir<<", abs3M="<<absMom<<"<ptm="<<ptm<<G4endl;
|
||||
#endif
|
||||
G4ThreeVector lead3M=photon3M*(ptm-absMom)/ptm; // Keep the direction for leading Q
|
||||
photon3M-=lead3M; // Reduced photon Momentum (photEn already = absEn)
|
||||
proj4M=G4LorentzVector(lead3M,absEn); // 4-momentum of leading System
|
||||
lead4M=proj4M; // Remember 4-mom for the total 4-momentum
|
||||
#ifdef ppdebug
|
||||
G4cout<<"-->G4QC::PoStDoIt: new sF="<<proj4M.m2()<<", lead4M="<<proj4M<<G4endl;
|
||||
#endif
|
||||
lead4M=proj4M; // Remember 4-mom for the total 4-momentum
|
||||
G4Quasmon* pan= new G4Quasmon(G4QContent(1,1,0,1,1,0),proj4M);// ---> DELETED -->---+
|
||||
try // |
|
||||
{ // |
|
||||
@@ -872,7 +897,7 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
std::for_each(projHV.begin(), projHV.end(), DeleteQHadron()); // <---<------<---+-+-+
|
||||
projHV.clear(); // <------------<---------------<-------------------<-----------+-+ .
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: pPDG="<<projPDG<<", mp="<<mp<<G4endl; // | .
|
||||
G4cout<<"G4QCollision::PostStepDoIt:pPDG="<<projPDG<<",4M="<<proj4M<<G4endl; // | .
|
||||
#endif
|
||||
try // | .
|
||||
{ // | .
|
||||
@@ -920,7 +945,7 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
// //#ifdef pdebug
|
||||
// G4cerr<<"***G4QCollision::PostStepDoIt: GEN Exception is catched"<<G4endl; // |
|
||||
// //#endif
|
||||
// G4Exception("G4QCollision::AtRestDoIt:","27",FatalException,"QString Excep");//|
|
||||
// G4Exception("G4QCollision::PostStDoIt:","27",FatalException,"QString Excep");//|
|
||||
// } // |
|
||||
// delete pan; // Delete the Nuclear Environment ---<--+
|
||||
//}
|
||||
@@ -973,7 +998,8 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
G4int PDGCode = hadr->GetPDGCode();
|
||||
G4int nFrag = hadr->GetNFragments();
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QCollision::AtRestDoIt: H#"<<i<<",PDG="<<PDGCode<<",nF="<<nFrag<<G4endl;
|
||||
G4cout<<"G4QCollision::PostStepDoIt: H#"<<i<<",PDG="<<PDGCode<<",nF="<<nFrag
|
||||
<<", 4Mom="<<hadr->Get4Momentum()<<G4endl;
|
||||
#endif
|
||||
if(nFrag) // Skip intermediate (decayed) hadrons
|
||||
{
|
||||
@@ -1003,7 +1029,7 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
G4int aZ = hadr->GetCharge();
|
||||
G4int aA = hadr->GetBaryonNumber();
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QCollision::AtRestDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
|
||||
G4cout<<"G4QCollision::PostStepDoIt:Ion Z="<<aZ<<", A="<<aA<<G4endl;
|
||||
#endif
|
||||
theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ);
|
||||
}
|
||||
|
||||
+21
-13
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QElastic.cc,v 1.16 2006/12/09 14:33:35 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4QElastic.cc,v 1.21 2007/03/16 10:05:05 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
// ---------------- G4QElastic class -----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
@@ -57,7 +57,7 @@ G4QElastic::G4QElastic(const G4String& processName) : G4VDiscreteProcess(process
|
||||
#endif
|
||||
if (verboseLevel>0) G4cout << GetProcessName() << " process is created "<< G4endl;
|
||||
|
||||
G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World with 234 particles
|
||||
//G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part. max)
|
||||
}
|
||||
|
||||
// Destructor
|
||||
@@ -246,6 +246,14 @@ G4VParticleChange* G4QElastic::PostStepDoIt(const G4Track& track, const G4Step&
|
||||
//static const G4double mProt= G4QPDGCode(2212).GetMass()*.001; // CHIPS in GeV
|
||||
//static const G4double mP2=mProt*mProt; // squared proton mass
|
||||
//
|
||||
//-------------------------------------------------------------------------------------
|
||||
static G4bool CWinit = true; // CHIPS Warld needs to be initted
|
||||
if(CWinit)
|
||||
{
|
||||
CWinit=false;
|
||||
G4QCHIPSWorld::Get()->GetParticles(nPartCWorld); // Create CHIPS World (234 part.max)
|
||||
}
|
||||
//-------------------------------------------------------------------------------------
|
||||
const G4DynamicParticle* projHadron = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particle=projHadron->GetDefinition();
|
||||
#ifdef debug
|
||||
@@ -258,9 +266,9 @@ G4VParticleChange* G4QElastic::PostStepDoIt(const G4Track& track, const G4Step&
|
||||
#ifdef debug
|
||||
G4cout<<"G4QElastic::PostStepDoIt: After the GetMeanFreePath is called"<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector proj4M=(projHadron->Get4Momentum())*MeV; // Convert to MeV!
|
||||
G4LorentzVector proj4M=(projHadron->Get4Momentum())/MeV; // Convert to MeV!
|
||||
G4LorentzVector scat4M=proj4M; // @@ Must be filled (?)
|
||||
G4double momentum = projHadron->GetTotalMomentum()*MeV; // 3-momentum of the Proj in MeV
|
||||
G4double momentum = projHadron->GetTotalMomentum()/MeV; // 3-momentum of the Proj in MeV
|
||||
G4double Momentum = proj4M.rho(); // @@ Just for the test purposes
|
||||
if(std::fabs(Momentum-momentum)>.000001)
|
||||
G4cerr<<"*War*G4QElastic::PostStepDoIt:P(IU)="<<Momentum<<"="<<momentum<<G4endl;
|
||||
@@ -402,7 +410,7 @@ G4VParticleChange* G4QElastic::PostStepDoIt(const G4Track& track, const G4Step&
|
||||
#endif
|
||||
//
|
||||
G4int targPDG=90000000+Z*1000+N; // CHIPS PDG Code of the target nucleus
|
||||
G4QPDGCode targQPDG(targPDG);
|
||||
G4QPDGCode targQPDG(targPDG); // @@ one can use G4Ion and get rid of CHIPS World
|
||||
G4double tM=targQPDG.GetMass(); // CHIPS target mass in MeV
|
||||
G4double kinEnergy= projHadron->GetKineticEnergy()*MeV; // Kin energy in MeV (Is *MeV n?)
|
||||
G4ParticleMomentum dir = projHadron->GetMomentumDirection();// It is a unit three-vector
|
||||
@@ -450,8 +458,8 @@ G4VParticleChange* G4QElastic::PostStepDoIt(const G4Track& track, const G4Step&
|
||||
G4double cost=1.-mint/CSmanager->GetHMaxT();// cos(theta) in CMS
|
||||
//
|
||||
#ifdef ppdebug
|
||||
G4cout<<"G4QElastic::PoStDoI:t="<<mint<<",dpcm2="<<twop2cm<<"="<<CSmanager->GetHMaxT()
|
||||
<<",Ek="<<kinEnergy<<",tM="<<tM<<",pM="<<pM<<",s="<<sM<<",cost="<<cost<<G4endl;
|
||||
G4cout<<"G4QElastic::PoStDoI:t="<<mint<<",dpcm2="<<CSmanager->GetHMaxT()<<",Ek="
|
||||
<<kinEnergy<<",tM="<<tM<<",pM="<<pM<<",cost="<<cost<<G4endl;
|
||||
#endif
|
||||
if(cost>1. || cost<-1. || !(cost>-1. || cost<1.))
|
||||
{
|
||||
@@ -473,7 +481,7 @@ G4VParticleChange* G4QElastic::PostStepDoIt(const G4Track& track, const G4Step&
|
||||
if(!G4QHadron(tot4M).RelDecayIn2(scat4M, reco4M, dir4M, cost, cost))
|
||||
{
|
||||
G4cerr<<"G4QElastic::PSD:t4M="<<tot4M<<",pM="<<pM<<",tM="<<tM<<",cost="<<cost<<G4endl;
|
||||
//throw G4QException("G4QElastic::PostStepDoIt: Can't decay Elastic Compound");
|
||||
//G4Exception("G4QElastic::PostStepDoIt:","009",FatalException,"Decay of ElasticComp");
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QElastic::PoStDoIt:s4M="<<scat4M<<"+r4M="<<reco4M<<"="<<scat4M+reco4M<<G4endl;
|
||||
@@ -482,15 +490,15 @@ G4VParticleChange* G4QElastic::PostStepDoIt(const G4Track& track, const G4Step&
|
||||
#endif
|
||||
// Update G4VParticleChange for the scattered muon
|
||||
G4double finE=scat4M.e()-pM; // Final kinetic energy of the scattered proton
|
||||
if(finE>0) aParticleChange.ProposeEnergy(finE);
|
||||
if(finE>0.0) aParticleChange.ProposeEnergy(finE);
|
||||
else
|
||||
{
|
||||
if(finE<-1.e-8 || !(finE>-1.||finE<1.))
|
||||
if(finE<-1.e-8 || !(finE>-1.||finE<1.)) // NAN or negative
|
||||
G4cerr<<"*Warning*G4QElastic::PostStDoIt: Zero or negative scattered E="<<finE
|
||||
<<", s4M="<<scat4M<<", r4M="<<reco4M<<", d4M="<<tot4M-scat4M-reco4M<<G4endl;
|
||||
//throw G4QException("G4QElastic::PostStDoIt: 0, negative, or nan energy");
|
||||
//G4Exception("G4QElastic::PostStDoIt()","009", FatalException," <0 or nan energy");
|
||||
aParticleChange.ProposeEnergy(0.) ;
|
||||
aParticleChange.ProposeTrackStatus(fStopAndKill);
|
||||
aParticleChange.ProposeTrackStatus(fStopButAlive);
|
||||
}
|
||||
G4ThreeVector findir=scat4M.vect()/scat4M.rho(); // Unit vector in new direction
|
||||
aParticleChange.ProposeMomentumDirection(findir); // new direction for the scattered part
|
||||
|
||||
+146
-72
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QElasticCrossSection.cc,v 1.19 2006/12/09 14:33:35 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// $Id: G4QElasticCrossSection.cc,v 1.24 2007/03/30 10:53:31 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4QElasticCrossSection for N+A elastic cross sections
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
//#define debug
|
||||
//#define isodebug
|
||||
#define edebug
|
||||
//#define pdebug
|
||||
//#define ppdebug
|
||||
//#define tdebug
|
||||
@@ -45,9 +44,9 @@
|
||||
#include "G4QElasticCrossSection.hh"
|
||||
|
||||
// Initialization of the static parameters
|
||||
const G4int G4QElasticCrossSection::nPoints=100;//#of points in the AMDB tables(>anyPar)(D)
|
||||
const G4int G4QElasticCrossSection::nPoints=128;//#of points in the AMDB tables(>anyPar)(D)
|
||||
const G4int G4QElasticCrossSection::nLast=nPoints-1; // the Last element in the table (D)
|
||||
G4double G4QElasticCrossSection::lPMin=-4.; // Min tabulated logarithmic Momentum (D)
|
||||
G4double G4QElasticCrossSection::lPMin=-8.; // Min tabulated logarithmic Momentum (D)
|
||||
G4double G4QElasticCrossSection::lPMax= 8.; // Max tabulated logarithmic Momentum (D)
|
||||
G4double G4QElasticCrossSection::dlnP=(lPMax-lPMin)/nLast;// Log step in the table (D)
|
||||
G4bool G4QElasticCrossSection::onlyCS=true;// Flag to calculate only CS (not Si/Bi) (L)
|
||||
@@ -97,7 +96,6 @@ G4VQCrossSection* G4QElasticCrossSection::GetPointer()
|
||||
G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4int tgZ,
|
||||
G4int tgN, G4int pPDG)
|
||||
{
|
||||
static G4int j; // A#0f records found in DB for this projectile
|
||||
static std::vector <G4int> colPDG;// Vector of the projectile PDG code
|
||||
static std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops)
|
||||
static std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops)
|
||||
@@ -105,6 +103,13 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
static std::vector <G4double> colTH; // Vector of energy thresholds for the reaction
|
||||
static std::vector <G4double> colCS; // Vector of last cross sections for the reaction
|
||||
// ***---*** End of the mandatory Static Definitions of the Associative Memory ***---***
|
||||
if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic
|
||||
{
|
||||
tgZ=1;
|
||||
tgN=1;
|
||||
if (pPDG==2212) pPDG=2112;
|
||||
else if(pPDG==2112) pPDG=2212;
|
||||
}
|
||||
G4double pEn=pMom;
|
||||
onlyCS=fCS;
|
||||
#ifdef pdebug
|
||||
@@ -130,22 +135,21 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
lastN = tgN; // The last N of the calculated nucleus
|
||||
lastZ = tgZ; // The last Z of the calculated nucleus
|
||||
lastI = colN.size(); // Size of the Associative Memory DB in the heap
|
||||
j = 0; // A#0f records found in DB for this projectile
|
||||
if(lastI) for(G4int i=0; i<lastI; i++) if(colPDG[i]==pPDG) // The partType is found
|
||||
if(lastI) for(G4int i=0; i<lastI; i++) // Loop over proj/tgZ/tgN lines of DB
|
||||
{ // The nucleus with projPDG is found in AMDB
|
||||
if(colN[i]==tgN && colZ[i]==tgZ)
|
||||
if(colPDG[i]==pPDG && colN[i]==tgN && colZ[i]==tgZ)
|
||||
{
|
||||
lastI=i;
|
||||
lastTH =colTH[i]; // Last THreshold (A-dependent)
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCS:*Found* P="<<pMom<<",Threshold="<<lastTH<<",j="<<j<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
G4cout<<"G4QElCS::GetCS:*Found* P="<<pMom<<",Threshold="<<lastTH<<",i="<<i<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,i,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
#endif
|
||||
if(pEn<=lastTH)
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCS:Found T="<<pEn<<" < Threshold="<<lastTH<<",CS=0"<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
//CalculateCrossSection(fCS,-27,i,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
#endif
|
||||
return 0.; // Energy is below the Threshold value
|
||||
}
|
||||
@@ -156,18 +160,18 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCS:P="<<pMom<<",CS="<<lastCS*millibarn<<G4endl;
|
||||
#endif
|
||||
CalculateCrossSection(fCS,-1,j,lastPDG,lastZ,lastN,pMom); // Update param's only
|
||||
CalculateCrossSection(fCS,-1,i,lastPDG,lastZ,lastN,pMom); // Update param's only
|
||||
return lastCS*millibarn; // Use theLastCS
|
||||
}
|
||||
in = true; // This is the case when the isotop is found in DB
|
||||
// Momentum pMom is in IU ! @@ Units
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::G:UpdateDB P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl;
|
||||
G4cout<<"G4QElCS::G:UpdateDB P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",i="<<i<<G4endl;
|
||||
#endif
|
||||
lastCS=CalculateCrossSection(fCS,-1,j,lastPDG,lastZ,lastN,pMom); // read & update
|
||||
lastCS=CalculateCrossSection(fCS,-1,i,lastPDG,lastZ,lastN,pMom); // read & update
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCrosSec: *****> New (inDB) Calculated CS="<<lastCS<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
//CalculateCrossSection(fCS,-27,i,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
#endif
|
||||
if(lastCS<=0. && pEn>lastTH) // Correct the threshold
|
||||
{
|
||||
@@ -176,14 +180,13 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
#endif
|
||||
lastTH=pEn;
|
||||
}
|
||||
break; // Go out of the LOOP
|
||||
break; // Go out of the LOOP with found lastI
|
||||
}
|
||||
#ifdef pdebug
|
||||
G4cout<<"---G4QElCrossSec::GetCrosSec:pPDG="<<pPDG<<",j="<<j<<",N="<<colN[i]
|
||||
G4cout<<"---G4QElCrossSec::GetCrosSec:pPDG="<<pPDG<<",i="<<i<<",N="<<colN[i]
|
||||
<<",Z["<<i<<"]="<<colZ[i]<<",cPDG="<<colPDG[i]<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
//CalculateCrossSection(fCS,-27,i,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
#endif
|
||||
j++; // Increment a#0f records found in DB for this pPDG
|
||||
}
|
||||
if(!in) // This nucleus has not been calculated previously
|
||||
{
|
||||
@@ -191,7 +194,7 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
G4cout<<"G4QElCS::GetCrosSec:CalcNew P="<<pMom<<",f="<<fCS<<",lastI="<<lastI<<G4endl;
|
||||
#endif
|
||||
//!!The slave functions must provide cross-sections in millibarns (mb) !! (not in IU)
|
||||
lastCS=CalculateCrossSection(fCS,0,j,lastPDG,lastZ,lastN,pMom); //calculate & create
|
||||
lastCS=CalculateCrossSection(fCS,0,lastI,lastPDG,lastZ,lastN,pMom);//calculate&create
|
||||
if(lastCS<=0.)
|
||||
{
|
||||
lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
|
||||
@@ -208,7 +211,7 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
}
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCrosSec: New CS="<<lastCS<<",lZ="<<lastN<<",lN="<<lastZ<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
//CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
#endif
|
||||
colN.push_back(tgN);
|
||||
colZ.push_back(tgZ);
|
||||
@@ -218,14 +221,14 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
colCS.push_back(lastCS);
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCS:1st,P="<<pMom<<"(MeV),CS="<<lastCS*millibarn<<"(mb)"<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
//CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
#endif
|
||||
return lastCS*millibarn;
|
||||
} // End of creation of the new set of parameters
|
||||
else
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCS: Update lastI="<<lastI<<",j="<<j<<G4endl;
|
||||
G4cout<<"G4QElCS::GetCS: Update lastI="<<lastI<<G4endl;
|
||||
#endif
|
||||
colP[lastI]=pMom;
|
||||
colPDG[lastI]=pPDG;
|
||||
@@ -236,7 +239,7 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCS: Current T="<<pEn<<" < Threshold="<<lastTH<<", CS=0"<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
//CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
#endif
|
||||
return 0.; // Momentum is below the Threshold Value -> CS=0
|
||||
}
|
||||
@@ -244,7 +247,7 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCS:OldCur P="<<pMom<<"="<<pMom<<", CS="<<lastCS*millibarn<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
//CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
G4cout<<"G4QElCS::GetCrSec:***SAME***, onlyCS="<<onlyCS<<G4endl;
|
||||
#endif
|
||||
return lastCS*millibarn; // Use theLastCS
|
||||
@@ -254,12 +257,12 @@ G4double G4QElasticCrossSection::GetCrossSection(G4bool fCS, G4double pMom, G4in
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCS:UpdatCur P="<<pMom<<",f="<<fCS<<",I="<<lastI<<",j="<<j<<G4endl;
|
||||
#endif
|
||||
lastCS=CalculateCrossSection(fCS,1,j,lastPDG,lastZ,lastN,pMom); // Only UpdateDB
|
||||
lastCS=CalculateCrossSection(fCS,1,lastI,lastPDG,lastZ,lastN,pMom); // Only UpdateDB
|
||||
lastP=pMom;
|
||||
}
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::GetCrSec:End,P="<<pMom<<"(MeV),CS="<<lastCS*millibarn<<"(mb)"<<G4endl;
|
||||
//CalculateCrossSection(fCS,-27,j,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
//CalculateCrossSection(fCS,-27,lastI,lastPDG,lastZ,lastN,pMom); // DUMMY TEST
|
||||
G4cout<<"G4QElCS::GetCrSec:***End***, onlyCS="<<onlyCS<<G4endl;
|
||||
#endif
|
||||
return lastCS*millibarn;
|
||||
@@ -271,7 +274,6 @@ G4double G4QElasticCrossSection::CalculateCrossSection(G4bool CS,G4int F,G4int I
|
||||
G4int tgZ, G4int tgN, G4double pIU)
|
||||
{
|
||||
// *** Begin of Associative Memory DB for acceleration of the cross section calculations
|
||||
static std::vector <G4int> pPDG; // Vector of PDG code of the projectile
|
||||
static std::vector <G4double> PIN; // Vector of max initialized log(P) in the table
|
||||
static std::vector <G4double*> PAR; // Vector of parameters for functional calculations
|
||||
static std::vector <G4double*> CST; // Vector of cross-section table
|
||||
@@ -285,10 +287,17 @@ G4double G4QElasticCrossSection::CalculateCrossSection(G4bool CS,G4int F,G4int I
|
||||
static std::vector <G4double*> S4T; // Vector of the 4-th mantissa (gloria)
|
||||
static std::vector <G4double*> B4T; // Vector of the 4-th slope (gloria)
|
||||
// *** End of Static Definitions (Associative Memory Data Base) ***
|
||||
if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic
|
||||
{
|
||||
tgZ=1;
|
||||
tgN=1;
|
||||
if (PDG==2212) PDG=2112;
|
||||
else if(PDG==2112) PDG=2212;
|
||||
}
|
||||
G4double pMom=pIU/GeV; // All calculations are in GeV
|
||||
onlyCS=CS; // Flag to calculate only CS (not Si/Bi)
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElasticCrossSection::CalcCS: called onlyCS="<<onlyCS<<",p="<<pIU<<G4endl;
|
||||
G4cout<<"G4QElasticCrossSection::CalcCS:->onlyCS="<<onlyCS<<",F="<<F<<",p="<<pIU<<G4endl;
|
||||
#endif
|
||||
lastLP=std::log(pMom); // Make a logarithm of the momentum for calculation
|
||||
if(F) // This isotope was found in AMDB =>RETRIEVE/UPDATE
|
||||
@@ -307,6 +316,9 @@ G4double G4QElasticCrossSection::CalculateCrossSection(G4bool CS,G4int F,G4int I
|
||||
lastB3T = B3T[I]; // Pointer to the rhird slope
|
||||
lastS4T = S4T[I]; // Pointer to the 4-th mantissa
|
||||
lastB4T = B4T[I]; // Pointer to the 4-th slope
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElasticCS::CalcCS: DB is updated for I="<<I<<",*,PIN4="<<PIN[4]<<G4endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElasticCrossSection::CalcCS:*read*, LP="<<lastLP<<",PIN="<<lastPIN<<G4endl;
|
||||
@@ -314,7 +326,10 @@ G4double G4QElasticCrossSection::CalculateCrossSection(G4bool CS,G4int F,G4int I
|
||||
if(lastLP>lastPIN && lastLP<lPMax)
|
||||
{
|
||||
lastPIN = GetPTables(lastLP,lastPIN,PDG,tgZ,tgN);// Can update upper logP-Limit in tabs
|
||||
PIN[I]=lastPIN; // Remember the new P-Limit of the tables
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::CalcCS:*updated(I)*,LP="<<lastLP<<"<IN["<<I<<"]="<<lastPIN<<G4endl;
|
||||
#endif
|
||||
PIN[I]=lastPIN; // Remember the new P-Limit of the tables
|
||||
}
|
||||
}
|
||||
else // This isotope wasn't initialized => CREATE
|
||||
@@ -336,9 +351,8 @@ G4double G4QElasticCrossSection::CalculateCrossSection(G4bool CS,G4int F,G4int I
|
||||
#endif
|
||||
lastPIN = GetPTables(lastLP,lPMin,PDG,tgZ,tgN); // Returns the new P-limit for tables
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElasticCrossSection::CalcCS: Z="<<tgZ<<", N="<<tgN<<", PDG="<<PDG<<G4endl;
|
||||
G4cout<<"G4QElCS::CalcCS:*i*Z="<<tgZ<<",N="<<tgN<<",PDG="<<PDG<<",LP"<<lastPIN<<G4endl;
|
||||
#endif
|
||||
pPDG.push_back(lastPDG); // Fill the associative memmory for the projPDG
|
||||
PIN.push_back(lastPIN); // Fill parameters of CS function to AMDB
|
||||
PAR.push_back(lastPAR); // Fill parameters of CS function to AMDB
|
||||
CST.push_back(lastCST); // Fill Tabulated CS function to AMDB
|
||||
@@ -353,19 +367,22 @@ G4double G4QElasticCrossSection::CalculateCrossSection(G4bool CS,G4int F,G4int I
|
||||
B4T.push_back(lastB4T); // Fill Tabulated 4-th slope to AMDB
|
||||
} // End of creation/update of the new set of parameters and tables
|
||||
// ============= NOW Update (if necessary) and Calculate the Cross Section ===========
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::CalcCS:?update?,LP="<<lastLP<<",IN="<<lastPIN<<",ML="<<lPMax<<G4endl;
|
||||
#endif
|
||||
if(lastLP>lastPIN && lastLP<lPMax)
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElasticCrossSection::CalcCS:*update*,LP="<<lastLP<<",IN="<<lastPIN<<G4endl;
|
||||
#endif
|
||||
lastPIN = GetPTables(lastLP,lastPIN,PDG,tgZ,tgN);
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::CalcCS: *updated(O)*, LP="<<lastLP<<" < IN="<<lastPIN<<G4endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElastCS::CalcCS: lastLP="<<lastLP<<",lPM="<<lPMin<<",lPIN="<<lastPIN<<G4endl;
|
||||
#endif
|
||||
if(!onlyCS) lastTM=GetQ2max(PDG, tgZ, tgN, pMom); // Calculate (-t)_max=Q2_max (GeV2)
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElasticCrosSec::CalcCS:F="<<onlyCS<<",-t="<<lastTM<<", p="<<lastLP<<G4endl;
|
||||
G4cout<<"G4QElasticCrosSec::CalcCS:oCS="<<onlyCS<<",-t="<<lastTM<<", p="<<lastLP<<G4endl;
|
||||
#endif
|
||||
if(lastLP>lPMin && lastLP<=lastPIN) // Linear fit is made using precalculated tables
|
||||
{
|
||||
@@ -414,7 +431,7 @@ G4double G4QElasticCrossSection::CalculateCrossSection(G4bool CS,G4int F,G4int I
|
||||
G4double B1TL=lastB1T[blast]; // the low bin of the first slope
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElCS::CalcCrossSection:bl="<<blast<<",ls="<<lastL<<",SL="<<S1TL<<",SU="
|
||||
<<lastB1T[lastL]<<",BL="<<B1TL<<",BU="<<lastB1T[lastL]<<G4endl;
|
||||
<<lastS1T[lastL]<<",BL="<<B1TL<<",BU="<<lastB1T[lastL]<<G4endl;
|
||||
#endif
|
||||
theB1=B1TL+shift*(lastB1T[lastL]-B1TL); // the basic value of the first slope
|
||||
G4double S2TL=lastS2T[blast]; // the low bin of the second mantissa
|
||||
@@ -483,6 +500,13 @@ G4double G4QElasticCrossSection::GetPTables(G4double LP,G4double ILP, G4int PDG,
|
||||
// .004,.005,1.5e-11,2.3,.002,23.};
|
||||
// -13- -14- -15- -16- -17- -18--19--20-21--22--23- -24- -25-
|
||||
// -26- -27- -28- -29- -30- -31-
|
||||
if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic
|
||||
{
|
||||
tgZ=1;
|
||||
tgN=1;
|
||||
if (PDG==2212) PDG=2112;
|
||||
else if(PDG==2112) PDG=2212;
|
||||
}
|
||||
if(PDG==2212 || PDG==2112)
|
||||
{
|
||||
// --- Total np elastic cross section cs & s1/b1 (t), s2/b2 (u) --- NotTuned for highE
|
||||
@@ -507,10 +531,10 @@ G4double G4QElasticCrossSection::GetPTables(G4double LP,G4double ILP, G4int PDG,
|
||||
//
|
||||
if(lastPAR[nLast]!=pwd) // A unique flag to avoid the repeatable definition
|
||||
{
|
||||
if (PDG==2112&&tgZ==1&&tgN==0)
|
||||
for(G4int ip=0;ip<n_npel;ip++)lastPAR[ip]=np_el[ip];// np
|
||||
else if(PDG==2212&&tgZ==1&&tgN==0)
|
||||
for(G4int ip=0;ip<n_ppel;ip++)lastPAR[ip]=pp_el[ip];// pp
|
||||
if (PDG==2112&&tgZ==1&&tgN==0 || PDG==2212&&tgZ==0&&tgN==1)
|
||||
for(G4int ip=0;ip<n_npel;ip++)lastPAR[ip]=np_el[ip];//np/pn
|
||||
else if(PDG==2212&&tgZ==1&&tgN==0 || PDG==2112&&tgZ==0&&tgN==1)
|
||||
for(G4int ip=0;ip<n_ppel;ip++)lastPAR[ip]=pp_el[ip];//pp/nn
|
||||
else
|
||||
{
|
||||
G4double a=tgZ+tgN;
|
||||
@@ -755,7 +779,14 @@ G4double G4QElasticCrossSection::GetExchangeT(G4int tgZ, G4int tgN, G4int PDG)
|
||||
static const G4double third=1./3.;
|
||||
static const G4double fifth=1./5.;
|
||||
static const G4double sevth=1./7.;
|
||||
#ifdef pdebug
|
||||
if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic
|
||||
{
|
||||
tgZ=1;
|
||||
tgN=1;
|
||||
if (PDG==2212) PDG=2112;
|
||||
else if(PDG==2112) PDG=2212;
|
||||
}
|
||||
#ifdef tdebug
|
||||
G4cout<<"G4QElasticCS::GetExchangeT:F="<<onlyCS<<",Z="<<tgZ<<",N="<<tgN<<",PDG="<<PDG<<G4endl;
|
||||
#endif
|
||||
if(onlyCS) G4cout<<"*Warning*G4QElasticCrossSection::GetExchangeQ2: onlyCS=true"<<G4endl;
|
||||
@@ -763,27 +794,31 @@ G4double G4QElasticCrossSection::GetExchangeT(G4int tgZ, G4int tgN, G4int PDG)
|
||||
G4double q2=0.;
|
||||
if(PDG==2112 && tgZ==1 && tgN==0) // ===> n+p=n+p
|
||||
{
|
||||
#ifdef pdebug
|
||||
#ifdef tdebug
|
||||
G4cout<<"G4QElasticCS::GetExchangeT: TM="<<lastTM<<",S1="<<theS1<<",B1="<<theB1<<",S2="
|
||||
<<theS2<<",B2="<<theB2<<",GeV2="<<GeVSQ<<G4endl;
|
||||
#endif
|
||||
G4double E1=lastTM*theB1;
|
||||
G4double R1=(1.-std::exp(-E1));
|
||||
#ifdef ppdebug
|
||||
#ifdef tdebug
|
||||
G4double ts1=-std::log(1.-R1)/theB1;
|
||||
G4double ds1=std::fabs(ts1-lastTM)/lastTM;
|
||||
if(ds1>.0001)G4cout<<"*Warn*G4QElCS::GetExT:1n "<<ts1<<"#"<<lastTM<<",d="<<ds1<<G4endl;
|
||||
if(ds1>.0001)
|
||||
G4cout<<"*Warning*G4QElCS::GetExT:1n "<<ts1<<"#"<<lastTM<<",d="<<ds1
|
||||
<<",R1="<<R1<<",E1="<<E1<<G4endl;
|
||||
#endif
|
||||
G4double E2=lastTM*theB2;
|
||||
G4double R2=(1.-std::exp(-E2));
|
||||
#ifdef ppdebug
|
||||
#ifdef tdebug
|
||||
G4double ts2=-std::log(1.-R2)/theB2;
|
||||
G4double ds2=std::fabs(ts2-lastTM)/lastTM;
|
||||
if(ds2>.0001)G4cout<<"*Warn*G4QElCS::GetExT:2n "<<ts2<<"#"<<lastTM<<",d="<<ds2<<G4endl;
|
||||
if(ds2>.0001)
|
||||
G4cout<<"*Warning*G4QElCS::GetExT:2n "<<ts2<<"#"<<lastTM<<",d="<<ds2
|
||||
<<",R2="<<R2<<",E2="<<E2<<G4endl;
|
||||
#endif
|
||||
//G4double E3=lastTM*theB3;
|
||||
//G4double R3=(1.-std::exp(-E3));
|
||||
#ifdef ppdebug
|
||||
#ifdef tdebug
|
||||
//G4double ts3=-std::log(1.-R3)/theB3;
|
||||
//G4double ds3=std::fabs(ts3-lastTM)/lastTM;
|
||||
//if(ds3>.01)G4cout<<"*Warn*G4QElCS::GetExT:3n "<<ts3<<"#"<<lastTM<<",d="<<ds3<<G4endl;
|
||||
@@ -809,30 +844,36 @@ G4double G4QElasticCrossSection::GetExchangeT(G4int tgZ, G4int tgN, G4int PDG)
|
||||
}
|
||||
else if(PDG==2212 && tgZ==1 && tgN==0) // ===> p+p=p+p
|
||||
{
|
||||
#ifdef pdebug
|
||||
#ifdef tdebug
|
||||
G4cout<<"G4QElasticCS::GetExchangeT: TM="<<lastTM<<",S1="<<theS1<<",B1="<<theB1<<",S2="
|
||||
<<theS2<<",B2="<<theB2<<",S3="<<theS3<<",B3="<<theB3<<",GeV2="<<GeVSQ<<G4endl;
|
||||
#endif
|
||||
G4double E1=lastTM*theB1;
|
||||
G4double R1=(1.-std::exp(-E1));
|
||||
#ifdef ppdebug
|
||||
#ifdef tdebug
|
||||
G4double ts1=-std::log(1.-R1)/theB1;
|
||||
G4double ds1=std::fabs(ts1-lastTM)/lastTM;
|
||||
if(ds1>.0001)G4cout<<"*Warn*G4QElCS::GetExT:1p "<<ts1<<"#"<<lastTM<<",d="<<ds1<<G4endl;
|
||||
if(ds1>.0001)
|
||||
G4cout<<"*Warning*G4QElCS::GetExT:1p "<<ts1<<"#"<<lastTM<<",d="<<ds1
|
||||
<<",R1="<<R1<<",E1="<<E1<<G4endl;
|
||||
#endif
|
||||
G4double E2=lastTM*theB2;
|
||||
G4double R2=(1.-std::exp(-E2*E2*E2));
|
||||
#ifdef ppdebug
|
||||
#ifdef tdebug
|
||||
G4double ts2=std::pow(-std::log(1.-R2),.333333333)/theB2;
|
||||
G4double ds2=std::fabs(ts2-lastTM)/lastTM;
|
||||
if(ds2>.0001)G4cout<<"*Warn*G4QElCS::GetExT:2p "<<ts2<<"#"<<lastTM<<",d="<<ds2<<G4endl;
|
||||
if(ds2>.0001)
|
||||
G4cout<<"*Warning*G4QElCS::GetExT:2p "<<ts2<<"#"<<lastTM<<",d="<<ds2
|
||||
<<",R2="<<R2<<",E2="<<E2<<G4endl;
|
||||
#endif
|
||||
G4double E3=lastTM*theB3;
|
||||
G4double R3=(1.-std::exp(-E3));
|
||||
#ifdef ppdebug
|
||||
#ifdef tdebug
|
||||
G4double ts3=-std::log(1.-R3)/theB3;
|
||||
G4double ds3=std::fabs(ts3-lastTM)/lastTM;
|
||||
if(ds3>.0001)G4cout<<"*Warn*G4QElCS::GetExT:3p "<<ts3<<"#"<<lastTM<<",d="<<ds3<<G4endl;
|
||||
if(ds3>.0001)
|
||||
G4cout<<"*Warning*G4QElCS::GetExT:3p "<<ts3<<"#"<<lastTM<<",d="<<ds3
|
||||
<<",R3="<<R1<<",E3="<<E3<<G4endl;
|
||||
#endif
|
||||
G4double I1=R1*theS1/theB1;
|
||||
G4double I2=R2*theS2;
|
||||
@@ -875,7 +916,9 @@ G4double G4QElasticCrossSection::GetExchangeT(G4int tgZ, G4int tgN, G4int PDG)
|
||||
G4double ts1=-std::log(1.-R1)/theB1;
|
||||
if(std::fabs(tss)>1.e-7) ts1=(std::sqrt(theB1*(theB1+(tss+tss)*ts1))-theB1)/tss;
|
||||
G4double ds1=(ts1-lastTM)/lastTM;
|
||||
if(ds1>.0001)G4cout<<"*Warn*G4QElCS::GetExT:1a "<<ts1<<"#"<<lastTM<<",d="<<ds1<<G4endl;
|
||||
if(ds1>.0001)
|
||||
G4cout<<"*Warning*G4QElCS::GetExT:1a "<<ts1<<"#"<<lastTM<<",d="<<ds1
|
||||
<<",R1="<<R1<<",E1="<<E1<<G4endl;
|
||||
#endif
|
||||
G4double tm2=lastTM*lastTM;
|
||||
G4double E2=lastTM*tm2*theB2; // power 3 for lowA, 5 for HighA (1st)
|
||||
@@ -886,7 +929,9 @@ G4double G4QElasticCrossSection::GetExchangeT(G4int tgZ, G4int tgN, G4int PDG)
|
||||
if(a<6.5)ts2=std::pow(ts2,third);
|
||||
else ts2=std::pow(ts2,fifth);
|
||||
G4double ds2=std::fabs(ts2-lastTM)/lastTM;
|
||||
if(ds2>.0001)G4cout<<"*Warn*G4QElCS::GetExT:2a "<<ts2<<"#"<<lastTM<<",d="<<ds2<<G4endl;
|
||||
if(ds2>.0001)
|
||||
G4cout<<"*Warning*G4QElCS::GetExT:2a "<<ts2<<"#"<<lastTM<<",d="<<ds2
|
||||
<<",R2="<<R2<<",E2="<<E2<<G4endl;
|
||||
#endif
|
||||
G4double E3=lastTM*theB3;
|
||||
if(a>6.5)E3*=tm2*tm2*tm2; // power 1 for lowA, 7 (2nd) for HighA
|
||||
@@ -895,14 +940,18 @@ G4double G4QElasticCrossSection::GetExchangeT(G4int tgZ, G4int tgN, G4int PDG)
|
||||
G4double ts3=-std::log(1.-R3)/theB3;
|
||||
if(a>6.5)ts3=std::pow(ts3,sevth);
|
||||
G4double ds3=std::fabs(ts3-lastTM)/lastTM;
|
||||
if(ds3>.0001)G4cout<<"*Warn*G4QElCS::GetExT:3a "<<ts3<<"#"<<lastTM<<",d="<<ds3<<G4endl;
|
||||
if(ds3>.0001)
|
||||
G4cout<<"*Warning*G4QElCS::GetExT:3a "<<ts3<<"#"<<lastTM<<",d="<<ds3
|
||||
<<",R3="<<R3<<",E3="<<E3<<G4endl;
|
||||
#endif
|
||||
G4double E4=lastTM*theB4;
|
||||
G4double R4=(1.-std::exp(-E4));
|
||||
#ifdef tdebug
|
||||
G4double ts4=-std::log(1.-R4)/theB4;
|
||||
G4double ds4=std::fabs(ts4-lastTM)/lastTM;
|
||||
if(ds4>.0001)G4cout<<"*Warn*G4QElCS::GetExT:4a "<<ts4<<"#"<<lastTM<<",d="<<ds4<<G4endl;
|
||||
if(ds4>.0001)
|
||||
G4cout<<"*Warning*G4QElCS::GetExT:4a "<<ts4<<"#"<<lastTM<<",d="<<ds4
|
||||
<<",R4="<<R4<<",E4="<<E4<<G4endl;
|
||||
#endif
|
||||
G4double I1=R1*theS1;
|
||||
G4double I2=R2*theS2;
|
||||
@@ -1375,12 +1424,25 @@ G4double G4QElasticCrossSection::GetTabValues(G4double lp, G4int PDG, G4int tgZ,
|
||||
X37,X38,X39,X40,X41,X42,X43,X44,X45,X46,X47,X48,X49,X50,X51,X52,X53,X54,X55,X56,X57,X58,
|
||||
X59,X60,X61,X62,X63,X64,X65,X66,X67,X68,X69,X70,X71,X72,X73,X74,X75,X76,X77,X78,X79,X80,
|
||||
X81,X82,X83,X84,X85,X86,X87,X88,X89,X90,X91,X92};
|
||||
if(tgZ<1 || tgZ>92)
|
||||
if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic
|
||||
{
|
||||
tgZ=1;
|
||||
tgN=1;
|
||||
if (PDG==2212) PDG=2112;
|
||||
else if(PDG==2112) PDG=2212;
|
||||
}
|
||||
if(tgZ<0 || tgZ>92)
|
||||
{
|
||||
G4cout<<"*Warning*G4QElasticCS::GetTabValue: (1-92) No isotopes for Z="<<tgZ<<G4endl;
|
||||
return 0.;
|
||||
}
|
||||
G4int iZ=tgZ-1; // Z index
|
||||
if(iZ<0)
|
||||
{
|
||||
iZ=0; // conversion of the neutron target to the proton target
|
||||
tgZ=1;
|
||||
tgN=0;
|
||||
}
|
||||
if(nN[iZ][0] < 0)
|
||||
{
|
||||
#ifdef isodebug
|
||||
@@ -1396,7 +1458,7 @@ G4double G4QElasticCrossSection::GetTabValues(G4double lp, G4int PDG, G4int tgZ,
|
||||
G4double p2=p*p;
|
||||
G4double p3=p2*p;
|
||||
G4double p4=p3*p;
|
||||
if(PDG==2112 && tgZ==1 && tgN==0) // np
|
||||
if(PDG==2112 && tgZ==1 && tgN==0 || PDG==2212 && tgZ==0 && tgN==1) // np/pn
|
||||
{
|
||||
G4double ssp=std::sqrt(sp); // sqrt(sqrt(p))=p^.25
|
||||
G4double p2s=p2*sp;
|
||||
@@ -1412,14 +1474,14 @@ G4double G4QElasticCrossSection::GetTabValues(G4double lp, G4int PDG, G4int tgZ,
|
||||
theS4=0.;
|
||||
theB4=0.;
|
||||
#ifdef tdebug
|
||||
G4cout<<"G4QElasticCS::GetTableValues:(pp) TM="<<lastTM<<",S1="<<theS1<<",B1="<<theB1
|
||||
G4cout<<"G4QElasticCS::GetTableValues:(np) TM="<<lastTM<<",S1="<<theS1<<",B1="<<theB1
|
||||
<<",S2="<<theS2<<",B2="<<theB2<<",S3="<<theS1<<",B3="<<theB1<<G4endl;
|
||||
#endif
|
||||
// Returns the total elastic pp cross-section (to avoid spoiling lastSIG)
|
||||
return lastPAR[0]/(p2s+lastPAR[1]*p+lastPAR[2]/ssp)+lastPAR[4]/p
|
||||
+(lastPAR[5]+lastPAR[6]*dl1*dl1+lastPAR[7]/p)/(1.+lastPAR[8]/p4);
|
||||
}
|
||||
else if(PDG==2212 && tgZ==1 && tgN==0) // pp
|
||||
else if(PDG==2212 && tgZ==1 && tgN==0 || PDG==2112 && tgZ==0 && tgN==1) // pp/nn
|
||||
{
|
||||
G4double p2s=p2*sp;
|
||||
G4double dl1=lp-lastPAR[3];
|
||||
@@ -1524,8 +1586,8 @@ G4double G4QElasticCrossSection::GetTabValues(G4double lp, G4int PDG, G4int tgZ,
|
||||
else
|
||||
{
|
||||
G4cout<<"*Error*G4QElasticCrossSection::GetTabValues: PDG="<<PDG<<", Z="<<tgZ<<", N="
|
||||
<<tgN<<", while it is defined only for PDG=2212, Z=1, N=0"<<G4endl;
|
||||
throw G4QException("G4QElasticCrossSection::GetTabValues: only pp is implemented");
|
||||
<<tgN<<", while it is defined only for PDG=2212/2112, Z>0, N>0"<<G4endl;
|
||||
throw G4QException("G4QElasticCrossSection::GetTabValues: only NA is implemented");
|
||||
}
|
||||
return 0.;
|
||||
} // End of GetTableValues
|
||||
@@ -1542,21 +1604,33 @@ G4double G4QElasticCrossSection::GetQ2max(G4int PDG, G4int tgZ, G4int tgN, G4dou
|
||||
static const G4double mProt2= mProt*mProt;
|
||||
static const G4double mNeut2= mNeut*mNeut;
|
||||
//static const G4double mDeut2= mDeut*mDeut;
|
||||
G4double pP2=pP*pP; // squared momentum of the projectile
|
||||
if(PDG==2212 && tgZ==1 && tgN==0) // ---> pp(identical,symmetric 90deg)
|
||||
if(tgZ==0 && tgN==1) // Temporary change for Quasi-Elastic
|
||||
{
|
||||
tgZ=1;
|
||||
tgN=1;
|
||||
if (PDG==2212) PDG=2112;
|
||||
else if(PDG==2112) PDG=2212;
|
||||
}
|
||||
G4double pP2=pP*pP; // squared momentum of the projectile
|
||||
if(PDG==2212 && tgZ==1 && tgN==0)
|
||||
{
|
||||
G4double tMid=std::sqrt(pP2+mProt2)*mProt-mProt2; // CMS 90deg value of -t=Q2 (GeV^2)
|
||||
G4double tMid=std::sqrt(pP2+mProt2)*mProt-mProt2; // CMS 90deg value of -t=Q2 (GeV^2)
|
||||
return tMid+tMid;
|
||||
}
|
||||
else if(PDG==2112 && tgZ) // ---> nA
|
||||
else if(PDG==2112 && tgZ==0 && tgN==1)
|
||||
{
|
||||
G4double mt=mProt; // Target mass in GeV
|
||||
G4double tMid=std::sqrt(pP2+mNeut2)*mNeut-mNeut2; // CMS 90deg value of -t=Q2 (GeV^2)
|
||||
return tMid+tMid;
|
||||
}
|
||||
else if(PDG==2112 && (tgZ || tgN)) // ---> nA
|
||||
{
|
||||
G4double mt=mProt; // Target mass in GeV
|
||||
if(tgN||tgZ>1) mt=G4QPDGCode(90000000+tgZ*1000+tgN).GetMass()*.001; // Target mass GeV
|
||||
G4double dmt=mt+mt;
|
||||
G4double s=dmt*std::sqrt(pP2+mNeut2)+mNeut2+mt*mt; // Mondelstam s (in GeV^2)
|
||||
return dmt*dmt*pP2/s;
|
||||
}
|
||||
else if(PDG==2212 && tgZ) // ---> pA
|
||||
else if(PDG==2212 && (tgZ || tgN)) // ---> pA
|
||||
{
|
||||
G4double mt=G4QPDGCode(90000000+tgZ*1000+tgN).GetMass()*.001; // Target mass in GeV
|
||||
G4double dmt=mt+mt;
|
||||
|
||||
+792
@@ -0,0 +1,792 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QuasiFreeRatios.cc,v 1.11 2007/05/02 15:00:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4QuasiFreeRatios for N+A elastic cross sections
|
||||
// Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-06
|
||||
//
|
||||
//================================================================================
|
||||
|
||||
//#define debug
|
||||
//#define pdebug
|
||||
//#define nandebug
|
||||
|
||||
#include "G4QuasiFreeRatios.hh"
|
||||
|
||||
// Returns Pointer to the G4VQCrossSection class
|
||||
G4QuasiFreeRatios* G4QuasiFreeRatios::GetPointer()
|
||||
{
|
||||
static G4QuasiFreeRatios theRatios; // *** Static body of the QEl Cross Section ***
|
||||
return &theRatios;
|
||||
}
|
||||
|
||||
// Calculation of pair(QuasiFree/Inelastic,QuasiElastic/QuasiFree)
|
||||
std::pair<G4double,G4double> G4QuasiFreeRatios::GetRatios(G4double pIU, G4int pPDG,
|
||||
G4int tgZ, G4int tgN)
|
||||
{
|
||||
std::pair<G4double,G4double> ElTot=GetElTot(pIU, pPDG, tgZ, tgN); // mean hN El&Tot(IU)
|
||||
G4double R=0.;
|
||||
G4double QF2In=1.; // Prototype of QuasiFree/Inelastic ratio for hN_tot
|
||||
if(ElTot.second>0.)
|
||||
{
|
||||
R=ElTot.first/ElTot.second; // Elastic/Total ratio (does not depend on units
|
||||
QF2In=GetQF2IN_Ratio(ElTot.second/millibarn, tgZ+tgN); // QuasiFree/Inelastic ratio
|
||||
}
|
||||
return std::make_pair(QF2In,R);
|
||||
}
|
||||
|
||||
// Calculatio QasiFree/Inelastic Ratio as a function of total hN cross-section (mb) and A
|
||||
G4double G4QuasiFreeRatios::GetQF2IN_Ratio(G4double s, G4int A)
|
||||
{
|
||||
static const G4int nps=150; // Number of steps in the R(s) LinTable
|
||||
static const G4int mps=nps+1; // Number of elements in the R(s) LinTable
|
||||
static const G4double sma=150.; // The first LinTabEl(s=0)=1., s>sma -> logTab
|
||||
static const G4double ds=sma/nps; // Step of the linear Table
|
||||
static const G4int nls=100; // Number of steps in the R(lns) logTable
|
||||
static const G4int mls=nls+1; // Number of elements in the R(lns) logTable
|
||||
static const G4double lsi=5.; // The min ln(s) logTabEl(s=148.4 < sma=150.)
|
||||
static const G4double lsa=9.; // The max ln(s) logTabEl(s=148.4 - 8103. mb)
|
||||
static const G4double mi=std::exp(lsi);// The min s of logTabEl(~ 148.4 mb)
|
||||
static const G4double ms=std::exp(lsa);// The max s of logTabEl(~ 8103. mb)
|
||||
static const G4double dl=(lsa-lsi)/nls;// Step of the logarithmic Table
|
||||
static const G4double edl=std::exp(dl);// Multiplication step of the logarithmic Table
|
||||
static const G4double toler=.01; // The tolarence mb defining the same cross-section
|
||||
static G4double lastS=0.; // The last sigma value for which R was calculated
|
||||
static G4double lastR=0.; // The last ratio R which was calculated
|
||||
// Local Associative Data Base:
|
||||
static std::vector<G4int> vA; // Vector of calculated A
|
||||
static std::vector<G4double> vH; // Vector of max s initialized in the LinTable
|
||||
static std::vector<G4int> vN; // Vector of topBin number initialized in LinTable
|
||||
static std::vector<G4double> vM; // Vector of rel max ln(s) initialized in LogTable
|
||||
static std::vector<G4int> vK; // Vector of topBin number initialized in LogTable
|
||||
static std::vector<G4double*> vT; // Vector of pointers to LinTable in C++ heap
|
||||
static std::vector<G4double*> vL; // Vector of pointers to LogTable in C++ heap
|
||||
// Last values of the Associative Data Base:
|
||||
static G4int lastA=0; // theLast of calculated A
|
||||
static G4double lastH=0.; // theLast of max s initialized in the LinTable
|
||||
static G4int lastN=0; // theLast of topBin number initialized in LinTable
|
||||
static G4double lastM=0.; // theLast of rel max ln(s) initialized in LogTable
|
||||
static G4int lastK=0; // theLast of topBin number initialized in LogTable
|
||||
static G4double* lastT=0; // theLast of pointer to LinTable in the C++ heap
|
||||
static G4double* lastL=0; // theLast of pointer to LogTable in the C++ heap
|
||||
// LogTable is created only if necessary. The ratio R(s>8100 mb) = 0 for any nuclei
|
||||
if(s<toler || A<2) return 1.;
|
||||
if(s>ms) return 0.;
|
||||
if(A>238)
|
||||
{
|
||||
G4cout<<"-Warning-G4QuasiFreeRatio::GetQF2IN_Ratio:A="<<A<<">238, return zero"<<G4endl;
|
||||
return 0.;
|
||||
}
|
||||
G4int nDB=vA.size(); // A number of nuclei already initialized in AMDB
|
||||
if(nDB && lastA==A && std::fabs(s-lastS)<toler) return lastR;
|
||||
G4bool found=false;
|
||||
G4int i=-1;
|
||||
if(nDB) for (i=0; i<nDB; i++) if(A==vA[i]) // Sirch for this A in AMDB
|
||||
{
|
||||
found=true; // The A value is found
|
||||
break;
|
||||
}
|
||||
if(!nDB || !found) // Create new line in the AMDB
|
||||
{
|
||||
lastA = A;
|
||||
lastT = new G4double[mps]; // Create the linear Table
|
||||
lastN = static_cast<int>(s/ds)+1; // MaxBin to be initialized
|
||||
if(lastN>nps)
|
||||
{
|
||||
lastN=nps;
|
||||
lastH=sma;
|
||||
}
|
||||
else lastH = lastN*ds; // Calculate max initialized s for LinTab
|
||||
G4double sv=0;
|
||||
lastT[0]=1.;
|
||||
for(G4int j=1; j<=lastN; j++) // Calculate LogTab values
|
||||
{
|
||||
sv+=ds;
|
||||
lastT[j]=CalcQF2IN_Ratio(sv,A);
|
||||
}
|
||||
if(s>sma) // Initialize the logarithmic Table
|
||||
{
|
||||
lastL=new G4double[mls]; // Create the logarithmic Table
|
||||
G4double ls=std::log(s);
|
||||
lastK = static_cast<int>((ls-lsi)/dl)+1; // MaxBin to be initialized in LogTaB
|
||||
if(lastK>nls)
|
||||
{
|
||||
lastK=nls;
|
||||
lastM=lsa-lsi;
|
||||
}
|
||||
else lastM = lastK*dl; // Calculate max initialized ln(s)-lsi for LogTab
|
||||
sv=mi;
|
||||
for(G4int j=0; j<=lastK; j++) // Calculate LogTab values
|
||||
{
|
||||
lastL[j]=CalcQF2IN_Ratio(sv,A);
|
||||
if(j!=lastK) sv*=edl;
|
||||
}
|
||||
}
|
||||
else // LogTab is not initialized
|
||||
{
|
||||
lastL = 0;
|
||||
lastK = 0;
|
||||
lastM = 0.;
|
||||
}
|
||||
i++; // Make a new record to AMDB and position on it
|
||||
vA.push_back(lastA);
|
||||
vH.push_back(lastH);
|
||||
vN.push_back(lastN);
|
||||
vM.push_back(lastM);
|
||||
vK.push_back(lastK);
|
||||
vT.push_back(lastT);
|
||||
vL.push_back(lastL);
|
||||
}
|
||||
else // The A value was found in AMDB
|
||||
{
|
||||
lastA=vA[i];
|
||||
lastH=vH[i];
|
||||
lastN=vN[i];
|
||||
lastM=vM[i];
|
||||
lastK=vK[i];
|
||||
lastT=vT[i];
|
||||
lastL=vL[i];
|
||||
if(s>lastM) // At least LinTab must be updated
|
||||
{
|
||||
G4int nextN=lastN+1; // The next bin to be initialized
|
||||
if(lastN<nps)
|
||||
{
|
||||
lastN = static_cast<int>(s/ds)+1;// MaxBin to be initialized
|
||||
if(lastN>nps)
|
||||
{
|
||||
lastN=nps;
|
||||
lastH=sma;
|
||||
}
|
||||
else lastH = lastN*ds; // Calculate max initialized s for LinTab
|
||||
G4double sv=lastM;
|
||||
for(G4int j=nextN; j<=lastN; j++)// Calculate LogTab values
|
||||
{
|
||||
sv+=ds;
|
||||
lastT[j]=CalcQF2IN_Ratio(sv,A);
|
||||
}
|
||||
} // End of LinTab update
|
||||
if(lastN>=nextN)
|
||||
{
|
||||
vH[i]=lastH;
|
||||
vN[i]=lastN;
|
||||
}
|
||||
G4int nextK=lastK+1;
|
||||
if(s>sma && lastK<nls) // LogTab must be updated
|
||||
{
|
||||
G4double sv=std::exp(lastM+lsi); // Define starting poit (lastM will be changed)
|
||||
G4double ls=std::log(s);
|
||||
lastK = static_cast<int>((ls-lsi)/dl)+1; // MaxBin to be initialized in LogTaB
|
||||
if(lastK>nls)
|
||||
{
|
||||
lastK=nls;
|
||||
lastM=lsa-lsi;
|
||||
}
|
||||
else lastM = lastK*dl; // Calculate max initialized ln(s)-lsi for LogTab
|
||||
for(G4int j=nextK; j<=lastK; j++)// Calculate LogTab values
|
||||
{
|
||||
sv*=edl;
|
||||
lastL[j]=CalcQF2IN_Ratio(sv,A);
|
||||
}
|
||||
} // End of LogTab update
|
||||
if(lastK>=nextK)
|
||||
{
|
||||
vM[i]=lastM;
|
||||
vK[i]=lastK;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Now one can use tabeles to calculate the value
|
||||
if(s<sma) // Use linear table
|
||||
{
|
||||
G4int n=static_cast<int>(s/ds); // Low edge number of the bin
|
||||
G4double d=s-n*ds; // Linear shift
|
||||
G4double v=lastT[n]; // Base
|
||||
lastR=v+d*(lastT[n+1]-v)/ds; // Result
|
||||
}
|
||||
else // Use log table
|
||||
{
|
||||
G4double ls=std::log(s)-lsi; // ln(s)-l_min
|
||||
G4int n=static_cast<int>(ls/dl); // Low edge number of the bin
|
||||
G4double d=ls-n*dl; // Log shift
|
||||
G4double v=lastL[n]; // Base
|
||||
lastR=v+d*(lastL[n+1]-v)/dl; // Result
|
||||
}
|
||||
if(lastR<0.) lastR=0.;
|
||||
if(lastR>1.) lastR=1.;
|
||||
return lastR;
|
||||
} // End of CalcQF2IN_Ratio
|
||||
|
||||
// Calculatio QasiFree/Inelastic Ratio as a function of total hN cross-section and A
|
||||
G4double G4QuasiFreeRatios::CalcQF2IN_Ratio(G4double s, G4int A)
|
||||
{
|
||||
static const G4double C=1.246;
|
||||
G4double s2=s*s;
|
||||
G4double s4=s2*s2;
|
||||
G4double ss=std::sqrt(std::sqrt(s));
|
||||
G4double P=7.48e-5*s2/(1.+8.77e12/s4/s4/s2);
|
||||
G4double E=.2644+.016/(1.+std::exp((29.54-s)/2.49));
|
||||
G4double F=ss*.1526*std::exp(-s2*ss*.0000859);
|
||||
return C*std::exp(-E*std::pow(G4double(A-1.),F))/std::pow(G4double(A),P);
|
||||
} // End of CalcQF2IN_Ratio
|
||||
|
||||
// Calculatio pair(hN_el,hN_tot) (mb): p in GeV/c, index(PDG,F) (see FetchElTot)
|
||||
std::pair<G4double,G4double> G4QuasiFreeRatios::CalcElTot(G4double p, G4int I)
|
||||
{
|
||||
// ---------> Each parameter set can have not more than nPoints=128 parameters
|
||||
static const G4double lmi=3.5; // min of (lnP-lmi)^2 parabola
|
||||
static const G4double pbe=.0557; // elastic (lnP-lmi)^2 parabola coefficient
|
||||
static const G4double pbt=.3; // total (lnP-lmi)^2 parabola coefficient
|
||||
static const G4double pmi=.1; // Below that fast LE calculation is made
|
||||
static const G4double pma=1000.; // Above that fast HE calculation is made
|
||||
// ======================================================================================
|
||||
G4double El=0.; // prototype of the elastic hN cross-section
|
||||
G4double To=0.; // prototype of the total hN cross-section
|
||||
if(p<=0.)
|
||||
{
|
||||
G4cout<<"-Warning-G4QuasiFreeRatios::CalcElTot: p="<<p<<" is zero or negative"<<G4endl;
|
||||
return std::make_pair(El,To);
|
||||
}
|
||||
if (!I) // pp/nn
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QuasiFreeR::CalcElTot:I=0, p="<<p<<", pmi="<<pmi<<", pma="<<pma<<G4endl;
|
||||
#endif
|
||||
if(p<pmi)
|
||||
{
|
||||
G4double p2=p*p;
|
||||
El=1./(.00012+p2*.2);
|
||||
To=El;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QuasiFreeR::CalcElTot:I=0i, El="<<El<<", To="<<To<<", p2="<<p2<<G4endl;
|
||||
#endif
|
||||
}
|
||||
else if(p>pma)
|
||||
{
|
||||
G4double lp=std::log(p)-lmi;
|
||||
G4double lp2=lp*lp;
|
||||
El=pbe*lp2+6.72;
|
||||
To=pbt*lp2+38.2;
|
||||
#ifdef debug
|
||||
G4cout<<"G4QuasiFreeR::CalcElTot:I=0a, El="<<El<<", To="<<To<<", lp2="<<lp2<<G4endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double p2=p*p;
|
||||
G4double LE=1./(.00012+p2*.2);
|
||||
G4double lp=std::log(p)-lmi;
|
||||
G4double lp2=lp*lp;
|
||||
G4double rp2=1./p2;
|
||||
El=LE+(pbe*lp2+6.72+32.6/p)/(1.+rp2/p);
|
||||
To=LE+(pbt*lp2+38.2+52.7*rp2)/(1.+2.72*rp2*rp2);
|
||||
#ifdef debug
|
||||
G4cout<<"G4QuasiFreeR::CalcElTot:0,E="<<El<<",T="<<To<<",s="<<p2<<",l="<<lp2<<G4endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if(I==1) // np/pn
|
||||
{
|
||||
if(p<pmi)
|
||||
{
|
||||
G4double p2=p*p;
|
||||
El=1./(.00012+p2*(.051+.1*p2));
|
||||
To=El;
|
||||
}
|
||||
else if(p>pma)
|
||||
{
|
||||
G4double lp=std::log(p)-lmi;
|
||||
G4double lp2=lp*lp;
|
||||
El=pbe*lp2+6.72;
|
||||
To=pbt*lp2+38.2;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double p2=p*p;
|
||||
G4double LE=1./(.00012+p2*(.051+.1*p2));
|
||||
G4double lp=std::log(p)-lmi;
|
||||
G4double lp2=lp*lp;
|
||||
G4double rp2=1./p2;
|
||||
El=LE+(pbe*lp2+6.72+30./p)/(1.+.49*rp2/p);
|
||||
To=LE+(pbt*lp2+38.2)/(1.+.54*rp2*rp2);
|
||||
}
|
||||
}
|
||||
else if(I==2) // pimp/pipn
|
||||
{
|
||||
G4double lp=std::log(p);
|
||||
if(p<pmi)
|
||||
{
|
||||
G4double lr=lp+1.27;
|
||||
El=1.53/(lr*lr+.0676);
|
||||
To=El*3;
|
||||
}
|
||||
else if(p>pma)
|
||||
{
|
||||
G4double ld=lp-lmi;
|
||||
G4double ld2=ld*ld;
|
||||
G4double sp=std::sqrt(p);
|
||||
El=pbe*ld2+2.4+7./sp;
|
||||
To=pbt*ld2+22.3+12./sp;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double lr=lp+1.27;
|
||||
G4double LE=1.53/(lr*lr+.0676);
|
||||
G4double ld=lp-lmi;
|
||||
G4double ld2=ld*ld;
|
||||
G4double p2=p*p;
|
||||
G4double p4=p2*p2;
|
||||
G4double sp=std::sqrt(p);
|
||||
G4double lm=lp+.36;
|
||||
G4double md=lm*lm+.04;
|
||||
G4double lh=lp-.017;
|
||||
G4double hd=lh*lh+.0025;
|
||||
El=LE+(pbe*ld2+2.4+7./sp)/(1.+.7/p4)+.6/md+.05/hd;
|
||||
To=LE*3+(pbt*ld2+22.3+12./sp)/(1.+.4/p4)+1./md+.06/hd;
|
||||
}
|
||||
}
|
||||
else if(I==3) // pipp/pimn
|
||||
{
|
||||
G4double lp=std::log(p);
|
||||
if(p<pmi)
|
||||
{
|
||||
G4double lr=lp+1.27;
|
||||
G4double lr2=lr*lr;
|
||||
El=13./(lr2+lr2*lr2+.0676);
|
||||
To=El;
|
||||
}
|
||||
else if(p>pma)
|
||||
{
|
||||
G4double ld=lp-lmi;
|
||||
G4double ld2=ld*ld;
|
||||
G4double sp=std::sqrt(p);
|
||||
El=pbe*ld2+2.4+6./sp;
|
||||
To=pbt*ld2+22.3+5./sp;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double lr=lp+1.27;
|
||||
G4double lr2=lr*lr;
|
||||
G4double LE=13./(lr2+lr2*lr2+.0676);
|
||||
G4double ld=lp-lmi;
|
||||
G4double ld2=ld*ld;
|
||||
G4double p2=p*p;
|
||||
G4double p4=p2*p2;
|
||||
G4double sp=std::sqrt(p);
|
||||
G4double lm=lp-.32;
|
||||
G4double md=lm*lm+.0576;
|
||||
El=LE+(pbe*ld2+2.4+6./sp)/(1.+3./p4)+.7/md;
|
||||
To=LE+(pbt*ld2+22.3+5./sp)/(1.+1./p4)+.8/md;
|
||||
}
|
||||
}
|
||||
else if(I==4) // Kmp/Kmn/K0p/K0n
|
||||
{
|
||||
|
||||
if(p<pmi)
|
||||
{
|
||||
G4double psp=p*std::sqrt(p);
|
||||
El=5.2/psp;
|
||||
To=14./psp;
|
||||
}
|
||||
else if(p>pma)
|
||||
{
|
||||
G4double ld=std::log(p)-lmi;
|
||||
G4double ld2=ld*ld;
|
||||
El=pbe*ld2+2.23;
|
||||
To=pbt*ld2+19.5;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double ld=std::log(p)-lmi;
|
||||
G4double ld2=ld*ld;
|
||||
G4double sp=std::sqrt(p);
|
||||
G4double psp=p*sp;
|
||||
G4double p2=p*p;
|
||||
G4double p4=p2*p2;
|
||||
G4double lm=p-.39;
|
||||
G4double md=lm*lm+.000156;
|
||||
G4double lh=p-1.;
|
||||
G4double hd=lh*lh+.0156;
|
||||
El=5.2/psp+(pbe*ld2+2.23)/(1.-.7/sp+.075/p4)+.004/md+.15/hd;
|
||||
To=14./psp+(pbt*ld2+19.5)/(1.-.21/sp+.52/p4)+.006/md+.30/hd;
|
||||
}
|
||||
}
|
||||
else if(I==5) // Kpp/Kpn/aKp/aKn
|
||||
{
|
||||
if(p<pmi)
|
||||
{
|
||||
G4double lr=p-.38;
|
||||
G4double lm=p-1.;
|
||||
G4double md=lm*lm+.372;
|
||||
El=.7/(lr*lr+.0676)+2./md;
|
||||
To=El+.6/md;
|
||||
}
|
||||
else if(p>pma)
|
||||
{
|
||||
G4double ld=std::log(p)-lmi;
|
||||
G4double ld2=ld*ld;
|
||||
El=pbe*ld2+2.23;
|
||||
To=pbt*ld2+19.5;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double ld=std::log(p)-lmi;
|
||||
G4double ld2=ld*ld;
|
||||
G4double lr=p-.38;
|
||||
G4double LE=.7/(lr*lr+.0676);
|
||||
G4double sp=std::sqrt(p);
|
||||
G4double p2=p*p;
|
||||
G4double p4=p2*p2;
|
||||
G4double lm=p-1.;
|
||||
G4double md=lm*lm+.372;
|
||||
El=LE+(pbe*ld2+2.23)/(1.-.7/sp+.1/p4)+2./md;
|
||||
To=LE+(pbt*ld2+19.5)/(1.+.46/sp+1.6/p4)+2.6/md;
|
||||
}
|
||||
}
|
||||
else if(I==6) // hyperon-N
|
||||
{
|
||||
if(p<pmi)
|
||||
{
|
||||
G4double p2=p*p;
|
||||
El=1./(.002+p2*(.12+p2));
|
||||
To=El;
|
||||
}
|
||||
else if(p>pma)
|
||||
{
|
||||
G4double lp=std::log(p)-lmi;
|
||||
G4double lp2=lp*lp;
|
||||
G4double sp=std::sqrt(p);
|
||||
El=(pbe*lp2+6.72)/(1.+2./sp);
|
||||
To=(pbt*lp2+38.2+900./sp)/(1.+27./sp);
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double p2=p*p;
|
||||
G4double LE=1./(.002+p2*(.12+p2));
|
||||
G4double lp=std::log(p)-lmi;
|
||||
G4double lp2=lp*lp;
|
||||
G4double p4=p2*p2;
|
||||
G4double sp=std::sqrt(p);
|
||||
El=LE+(pbe*lp2+6.72+99./p2)/(1.+2./sp+2./p4);
|
||||
To=LE+(pbt*lp2+38.2+900./sp)/(1.+27./sp+3./p4);
|
||||
}
|
||||
}
|
||||
else if(I==7) // antibaryon-N
|
||||
{
|
||||
if(p>pma)
|
||||
{
|
||||
G4double lp=std::log(p)-lmi;
|
||||
G4double lp2=lp*lp;
|
||||
El=pbe*lp2+6.72;
|
||||
To=pbt*lp2+38.2;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double ye=std::pow(p,1.25);
|
||||
G4double yt=std::pow(p,.35);
|
||||
G4double lp=std::log(p)-lmi;
|
||||
G4double lp2=lp*lp;
|
||||
El=80./(ye+1.)+pbe*lp2+6.72;
|
||||
To=(80./yt+.3)/yt+pbt*lp2+38.2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout<<"*Error*G4QuasiFreeRatios::CalcElTot:ind="<<I<<" is not defined (0-7)"<<G4endl;
|
||||
G4Exception("G4QuasiFreeRatios::CalcElTot:","23",FatalException,"CHIPScrash");
|
||||
}
|
||||
if(El>To) El=To;
|
||||
return std::make_pair(El,To);
|
||||
} // End of CalcElTot
|
||||
|
||||
// Calculatio pair(hN_el,hN_tot)(mb): p in GeV/c, F=true -> N=proton, F=false -> N=neutron
|
||||
std::pair<G4double,G4double> G4QuasiFreeRatios::FetchElTot(G4double p, G4int PDG, G4bool F)
|
||||
{
|
||||
static const G4int nlp=300; // Number of steps in the S(lnp) logTable(5% step)
|
||||
static const G4int mlp=nlp+1; // Number of elements in the S(lnp) logTable
|
||||
static const G4double lpi=-5.; // The min ln(p) logTabEl(p=6.7 MeV/c - 22. TeV/c)
|
||||
static const G4double lpa=10.; // The max ln(p) logTabEl(p=6.7 MeV/c - 22. TeV/c)
|
||||
static const G4double mi=std::exp(lpi);// The min p of logTabEl(~ 6.7 MeV/c)
|
||||
static const G4double ma=std::exp(lpa);// The max p of logTabEl(~ 22. TeV)
|
||||
static const G4double dl=(lpa-lpi)/nlp;// Step of the logarithmic Table
|
||||
static const G4double edl=std::exp(dl);// Multiplication step of the logarithmic Table
|
||||
static const G4double toler=.001; // Relative tolarence defining "the same momentum"
|
||||
static G4double lastP=0.; // The last momentum for which XS was calculated
|
||||
static G4int lastH=0; // The last projPDG for which XS was calculated
|
||||
static G4bool lastF=true; // The last nucleon for which XS was calculated
|
||||
static std::pair<G4double,G4double> lastR=std::make_pair(0.,0.); // The last result
|
||||
// Local Associative Data Base:
|
||||
static std::vector<G4int> vI; // Vector of index for which XS was calculated
|
||||
static std::vector<G4double> vM; // Vector of rel max ln(p) initialized in LogTable
|
||||
static std::vector<G4int> vK; // Vector of topBin number initialized in LogTable
|
||||
static std::vector<G4double*> vE; // Vector of ElastPointers to LogTable in C++ heap
|
||||
static std::vector<std::pair<G4double,G4double>*> vX; // Vector of ETPointers to LogTable
|
||||
// Last values of the Associative Data Base:
|
||||
static G4int lastI=0; // The Last index for which XS was calculated
|
||||
static G4double lastM=0.; // The Last rel max ln(p) initialized in LogTable
|
||||
static G4int lastK=0; // The Last topBin number initialized in LogTable
|
||||
static std::pair<G4double,G4double>* lastX=0; // The Last ETPointers to LogTable in heap
|
||||
// LogTable is created only if necessary. The ratio R(s>8100 mb) = 0 for any nuclei
|
||||
G4int nDB=vI.size(); // A number of hadrons already initialized in AMDB
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QuasiFreeR::FetchElTot:p="<<p<<",PDG="<<PDG<<",F="<<F<<",nDB="<<nDB<<G4endl;
|
||||
#endif
|
||||
if(nDB && lastH==PDG && lastF==F && p>0. && std::fabs(p-lastP)/p<toler) return lastR;
|
||||
lastH=PDG;
|
||||
lastF=F;
|
||||
G4int ind=-1; // Prototipe of the index of the PDG/F combination
|
||||
// i=0: pp(nn), i=1: np(pn), i=2: pimp(pipn), i=3: pipp(pimn), i=4: Kmp(Kmn,K0n,K0p),
|
||||
// i=5: Kpp(Kpn,aK0n,aK0p), i=6: Hp(Hn), i=7: app(apn,ann,anp)
|
||||
G4bool kfl=true; // Flag of K0/aK0 oscillation
|
||||
G4bool kf=false;
|
||||
if(PDG==130||PDG==310)
|
||||
{
|
||||
kf=true;
|
||||
if(G4UniformRand()>.5) kfl=false;
|
||||
}
|
||||
if (PDG==2212&&F || PDG==2112&&!F) ind=0; // pp/nn
|
||||
else if(PDG==2112&&F || PDG==2212&&!F) ind=1; // np/pn
|
||||
else if(PDG==-211&&F || PDG== 211&&!F) ind=2; // pimp/pipn
|
||||
else if(PDG== 211&&F || PDG==-211&&!F) ind=3; // pipp/pimn
|
||||
else if(PDG==-321 || PDG==-311 || (kf &&!kfl)) ind=4; // KmN/K0N
|
||||
else if(PDG== 321 || PDG== 311 || (kf && kfl)) ind=5; // KpN/aK0N
|
||||
else if(PDG> 3000 && PDG< 3335) ind=6; // @@ for all hyperons - take Lambda
|
||||
else if(PDG<-2000 && PDG>-3335) ind=7; // @@ for all anti-baryons - anti-p/anti-n
|
||||
else
|
||||
{
|
||||
G4cout<<"*Error*G4QuasiFreeRatios::FetchElTot: PDG="<<PDG
|
||||
<<", while it is defined only for p,n,hyperons,anti-baryons,pi,K/antiK"<<G4endl;
|
||||
G4Exception("G4QuasiFreeRatio::FetchElTot:","22",FatalException,"CHIPScrash");
|
||||
}
|
||||
if(nDB && lastI==ind && p>0. && std::fabs(p-lastP)/p<toler) return lastR;
|
||||
if(p<=mi || p>=ma) return CalcElTot(p,ind); // @@ Slow calculation ! (Warning?)
|
||||
G4bool found=false;
|
||||
G4int i=-1;
|
||||
if(nDB) for (i=0; i<nDB; i++) if(ind==vI[i]) // Sirch for this index in AMDB
|
||||
{
|
||||
found=true; // The index is found
|
||||
break;
|
||||
}
|
||||
G4double lp=std::log(p);
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QuasiFreeR::FetchElTot:I="<<ind<<",i="<<i<<",fd="<<found<<",lp="<<lp<<G4endl;
|
||||
#endif
|
||||
if(!nDB || !found) // Create new line in the AMDB
|
||||
{
|
||||
lastX = new std::pair<G4double,G4double>[mlp]; // Create logarithmic Table for ElTot
|
||||
lastK = static_cast<int>((lp-lpi)/dl)+1; // MaxBin to be initialized in LogTaB
|
||||
if(lastK>nlp)
|
||||
{
|
||||
lastK=nlp;
|
||||
lastM=lpa-lpi;
|
||||
}
|
||||
else lastM = lastK*dl; // Calculate max initialized ln(p)-lpi for LogTab
|
||||
G4double pv=mi;
|
||||
for(G4int j=0; j<=lastK; j++) // Calculate LogTab values
|
||||
{
|
||||
lastX[j]=CalcElTot(pv,ind);
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QuasiFreeR::FetchElTot:I,j="<<j<<",pv="<<pv<<",E="<<lastX[j].first<<",T="
|
||||
<<lastX[j].second<<G4endl;
|
||||
#endif
|
||||
if(j!=lastK) pv*=edl;
|
||||
}
|
||||
i++; // Make a new record to AMDB and position on it
|
||||
vI.push_back(lastI);
|
||||
vM.push_back(lastM);
|
||||
vK.push_back(lastK);
|
||||
vX.push_back(lastX);
|
||||
}
|
||||
else // The A value was found in AMDB
|
||||
{
|
||||
lastI=vI[i];
|
||||
lastM=vM[i];
|
||||
lastK=vK[i];
|
||||
lastX=vX[i];
|
||||
G4int nextK=lastK+1;
|
||||
G4double lpM=lastM+lpi;
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QuasiFreeR::FetchElTo:M="<<lpM<<",l="<<lp<<",K="<<lastK<<",n="<<nlp<<G4endl;
|
||||
#endif
|
||||
if(lp>lpM && lastK<nlp) // LogTab must be updated
|
||||
{
|
||||
lastK = static_cast<int>((lp-lpi)/dl)+1; // MaxBin to be initialized in LogTab
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QuasiFreeR::FetET:K="<<lastK<<",lp="<<lp<<",li="<<lpi<<",dl="<<dl<<G4endl;
|
||||
#endif
|
||||
if(lastK>nlp)
|
||||
{
|
||||
lastK=nlp;
|
||||
lastM=lpa-lpi;
|
||||
}
|
||||
else lastM = lastK*dl; // Calculate max initialized ln(p)-lpi for LogTab
|
||||
G4double pv=std::exp(lpM); // momentum of the last calculated beam
|
||||
for(G4int j=nextK; j<=lastK; j++)// Calculate LogTab values
|
||||
{
|
||||
pv*=edl;
|
||||
lastX[j]=CalcElTot(pv,ind);
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QuasiFreeR::FetchElTot:U:j="<<j<<",p="<<pv<<",E="<<lastX[j].first<<",T="
|
||||
<<lastX[j].second<<G4endl;
|
||||
#endif
|
||||
}
|
||||
} // End of LogTab update
|
||||
if(lastK>=nextK) // The AMDB was apdated
|
||||
{
|
||||
vM[i]=lastM;
|
||||
vK[i]=lastK;
|
||||
}
|
||||
}
|
||||
// Now one can use tabeles to calculate the value
|
||||
G4double dlp=lp-lpi; // Shifted log(p) value
|
||||
G4int n=static_cast<int>(dlp/dl); // Low edge number of the bin
|
||||
G4double d=dlp-n*dl; // Log shift
|
||||
G4double e=lastX[n].first; // E-Base
|
||||
lastR.first=e+d*(lastX[n+1].first-e)/dl; // E-Result
|
||||
if(lastR.first<0.) lastR.first = 0.;
|
||||
G4double t=lastX[n].second; // T-Base
|
||||
lastR.second=t+d*(lastX[n+1].second-t)/dl; // T-Result
|
||||
if(lastR.second<0.) lastR.second= 0.;
|
||||
if(lastR.first>lastR.second) lastR.first = lastR.second;
|
||||
return lastR;
|
||||
} // End of FetchElTot
|
||||
|
||||
// (Mean Elastic and Mean Total) Cross-Sections (mb) for PDG+(Z,N) at P=p[GeV/c]
|
||||
std::pair<G4double,G4double> G4QuasiFreeRatios::GetElTot(G4double pIU, G4int hPDG,
|
||||
G4int Z, G4int N)
|
||||
{
|
||||
G4double pGeV=pIU/gigaelectronvolt;
|
||||
if(Z<1 && N<1)
|
||||
{
|
||||
G4cout<<"-Warning-G4QuasiFreeRatio::GetElTot:Z="<<Z<<",N="<<N<<", return zero"<<G4endl;
|
||||
return std::make_pair(0.,0.);
|
||||
}
|
||||
std::pair<G4double,G4double> pA=FetchElTot(pGeV, hPDG, true);
|
||||
std::pair<G4double,G4double> nA=FetchElTot(pGeV, hPDG, false);
|
||||
G4double A=(Z+N)/millibarn; // To make the result in independent units(IU)
|
||||
return std::make_pair((Z*pA.first+N*nA.first)/A,(Z*pA.second+N*nA.second)/A);
|
||||
} // End of GetElTot
|
||||
|
||||
// scatter (pPDG,p4M) on a virtual nucleon (NPDG,N4M), result: final pair(newN4M,newp4M)
|
||||
// if(newN4M.e()==0.) - below threshold, XS=0, no scattering of the progectile happened
|
||||
std::pair<G4LorentzVector,G4LorentzVector> G4QuasiFreeRatios::Scatter(G4int NPDG,
|
||||
G4LorentzVector N4M, G4int pPDG, G4LorentzVector p4M)
|
||||
{
|
||||
static const G4double mNeut= G4QPDGCode(2112).GetMass();
|
||||
static const G4double mProt= G4QPDGCode(2212).GetMass();
|
||||
G4LorentzVector pr4M=p4M/megaelectronvolt; // Convert 4-momenta in MeV (keep p4M)
|
||||
N4M/=megaelectronvolt;
|
||||
G4LorentzVector tot4M=N4M+p4M;
|
||||
G4double mT=mNeut;
|
||||
G4int Z=0;
|
||||
G4int N=1;
|
||||
if(NPDG==2212)
|
||||
{
|
||||
mT=mProt;
|
||||
Z=1;
|
||||
N=0;
|
||||
}
|
||||
else if(NPDG!=2112)
|
||||
{
|
||||
G4cout<<"Error:G4QuasiFreeRatios::Scatter:NPDG="<<NPDG<<" is not 2212 or 2112"<<G4endl;
|
||||
G4Exception("G4QuasiFreeRatios::Scatter:","21",FatalException,"CHIPScomplain");
|
||||
//return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M);// Use this if not exception
|
||||
}
|
||||
G4double mT2=mT*mT;
|
||||
G4double mP2=pr4M.m2();
|
||||
G4double E=(tot4M.m2()-mT2-mP2)/(mT+mT);
|
||||
G4double E2=E*E;
|
||||
if(E<0. || E2<mP2)
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cerr<<"-Warning-G4QFR::Scat:*Negative Energy*E="<<E<<",E2="<<E2<<"<M2="<<mP2<<G4endl;
|
||||
#endif
|
||||
return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action
|
||||
}
|
||||
G4double P=std::sqrt(E2-mP2); // Momentum in pseudo laboratory system
|
||||
G4VQCrossSection* CSmanager=G4QElasticCrossSection::GetPointer();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QFR::Scatter: Before XS, P="<<P<<", Z="<<Z<<", N="<<N<<", PDG="<<pPDG<<G4endl;
|
||||
#endif
|
||||
// @@ Temporary NN t-dependence for all hadrons
|
||||
if(pPDG>3400 || pPDG<-3400) G4cout<<"-Warning-G4QElast::Scatter: pPDG="<<pPDG<<G4endl;
|
||||
G4int PDG=2212; // *TMP* instead of pPDG
|
||||
G4double xSec=CSmanager->GetCrossSection(false, P, Z, N, PDG); // Rec.CrossSect *TMP*
|
||||
//G4double xSec=CSmanager->GetCrossSection(false, P, Z, N, pPDG); // Rec.CrossSect
|
||||
#ifdef debug
|
||||
G4cout<<"G4QElast::Scatter:pPDG="<<pPDG<<",P="<<P<<",CS="<<xSec/millibarn<<G4endl;
|
||||
#endif
|
||||
#ifdef nandebug
|
||||
if(xSec>0. || xSec<0. || xSec==0);
|
||||
else G4cout<<"******G4QElast::Scatter:xSec="<<xSec/millibarn<<G4endl;
|
||||
#endif
|
||||
// @@ check a possibility to separate p, n, or alpha (!)
|
||||
if(xSec <= 0.) // The cross-section iz 0 -> Do Nothing
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cerr<<"-Warning-G4QFR::Scat:**Zero XS**PDG="<<pPDG<<",NPDG="<<NPDG<<",P="<<P<<G4endl;
|
||||
#endif
|
||||
return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); //Do Nothing Action
|
||||
}
|
||||
G4double mint=CSmanager->GetExchangeT(Z,N,PDG); // functional randomized -t (MeV^2) *TMP*
|
||||
//G4double mint=CSmanager->GetExchangeT(Z,N,pPDG); // functional randomized -t in MeV^2
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QFR::SCAT:PDG="<<pPDG<<", P="<<Momentum<<", CS="<<xSec<<", -t="<<mint<<G4endl;
|
||||
#endif
|
||||
#ifdef nandebug
|
||||
if(mint>-.0000001);
|
||||
else G4cout<<"******G4QFR::Scat:-t="<<mint<<G4endl;
|
||||
#endif
|
||||
G4double cost=1.-mint/CSmanager->GetHMaxT(); // cos(theta) in CMS
|
||||
#ifdef ppdebug
|
||||
G4cout<<"G4QFR::Scat:-t="<<mint<<",dpc2="<<CSmanager->GetHMaxT()<<",cost="<<cost<<G4endl;
|
||||
#endif
|
||||
if(cost>1. || cost<-1. || !(cost>-1. || cost<=1.))
|
||||
{
|
||||
if (cost>1.) cost=1.;
|
||||
else if(cost<-1.) cost=-1.;
|
||||
else
|
||||
{
|
||||
G4cerr<<"G4QFR::S:*NAN*c="<<cost<<",t="<<mint<<",tm="<<CSmanager->GetHMaxT()<<G4endl;
|
||||
return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action
|
||||
}
|
||||
}
|
||||
G4LorentzVector reco4M=G4LorentzVector(0.,0.,0.,mT); // 4mom of the recoil nucleon
|
||||
G4LorentzVector dir4M=tot4M-G4LorentzVector(0.,0.,0.,(tot4M.e()-mT)*.01);
|
||||
if(!G4QHadron(tot4M).RelDecayIn2(pr4M, reco4M, dir4M, cost, cost))
|
||||
{
|
||||
G4cerr<<"G4QFR::Scat:t="<<tot4M<<tot4M.m()<<",mT="<<mT<<",mP="<<std::sqrt(mP2)<<G4endl;
|
||||
//G4Exception("G4QFR::Scat:","009",FatalException,"Decay of ElasticComp");
|
||||
return std::make_pair(G4LorentzVector(0.,0.,0.,0.),p4M); // Do Nothing Action
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QFR::Scat:p4M="<<p4M<<"+r4M="<<reco4M<<"="<<scat4M+reco4M<<"="<<tot4M<<G4endl;
|
||||
#endif
|
||||
return std::make_pair(reco4M*megaelectronvolt,pr4M*megaelectronvolt); // Result
|
||||
} // End of Scatter
|
||||
Reference in New Issue
Block a user