98 fData = fMaster =
false;
99 fMel = electron_mass_c2;
111 outFile <<
"G4NuElNucleusCcModel is a neutrino-nucleus (charge current) scattering\n"
112 <<
"model which uses the standard model \n"
113 <<
"transfer parameterization. The model is fully relativistic\n";
125 G4int nSize(0), i(0), j(0), k(0);
129#ifdef G4MULTITHREADED
135#ifdef G4MULTITHREADED
144 std::ostringstream ost1, ost2, ost3, ost4;
145 ost1 << path <<
"/" <<
"neutrino" <<
"/" << pName <<
"/xarraycckr";
147 std::ifstream filein1( ost1.str().c_str() );
153 for( k = 0; k <
fNbin; ++k )
155 for( i = 0; i <=
fNbin; ++i )
163 ost2 << path <<
"/" <<
"neutrino" <<
"/" << pName <<
"/xdistrcckr";
164 std::ifstream filein2( ost2.str().c_str() );
168 for( k = 0; k <
fNbin; ++k )
170 for( i = 0; i <
fNbin; ++i )
178 ost3 << path <<
"/" <<
"neutrino" <<
"/" << pName <<
"/q2arraycckr";
179 std::ifstream filein3( ost3.str().c_str() );
183 for( k = 0; k <
fNbin; ++k )
185 for( i = 0; i <=
fNbin; ++i )
187 for( j = 0; j <=
fNbin; ++j )
196 ost4 << path <<
"/" <<
"neutrino" <<
"/" << pName <<
"/q2distrcckr";
197 std::ifstream filein4( ost4.str().c_str() );
201 for( k = 0; k <
fNbin; ++k )
203 for( i = 0; i <=
fNbin; ++i )
205 for( j = 0; j <
fNbin; ++j )
280 G4double cost(1.), sint(0.), phi(0.), muMom(0.), massX2(0.), massX(0.), massR(0.), eCut(0.);
286 G4int pdgP(0), qB(0);
298 sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
300 eP =
G4ThreeVector( sint*std::cos(phi), sint*std::sin(phi), cost );
333 if( pName ==
"nu_e" ) pdgP = 211;
339 eCut = (
fMpi + mTarg)*(
fMpi + mTarg) - (massX + massR)*(massX + massR);
345 if ( lvX.
e() > eCut )
364 sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
366 eP =
G4ThreeVector( sint*std::cos(phi), sint*std::sin(phi), cost );
403 if( pName ==
"nu_e" ) qB = 2;
437 if( pName ==
"nu_e" )
455 if( pName ==
"nu_e" )
485 fMr = proton_mass_c2;
514 if (
fProton && pName ==
"nu_e" ) qB = 2;
515 else if( !
fProton && pName ==
"nu_e" ) qB = 1;
536 G4double e3(0.), pMu2(0.), pX2(0.), nMom(0.), rM(0.), hM(0.), tM = targetNucleus.
AtomicMass(
A,
Z);
538 G4double cost(1.), sint(0.), phi(0.), muMom(0.);
570 if(pMu2 < 0.) {
fBreak =
true;
return; }
578 while( ( abs(
fCosTheta) > 1. ||
fEmu < fMel ) && iTer < iTerMax );
580 if( iTer >= iTerMax ) {
fBreak =
true;
return; }
595 sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
597 eP =
G4ThreeVector( sint*std::cos(phi), sint*std::sin(phi), cost );
614 ei = tM - sqrt( (rM + Ex)*(rM + Ex) + nMom*nMom );
617 nm2 = ei*ei - nMom*nMom;
620 while( nm2 < 0. && iTer < iTerMax );
622 if( iTer >= iTerMax ) {
fBreak =
true;
return; }
685 if(pMu2 < 0.) {
fBreak =
true;
return; }
691 while( ( abs(
fCosTheta) > 1. ||
fEmu < fMel ) && iTer < iTerMax );
693 if( iTer >= iTerMax ) {
fBreak =
true;
return; }
709 sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
711 eP =
G4ThreeVector( sint*std::cos(phi), sint*std::sin(phi), cost );
const char * G4FindDataDir(const char *)
CLHEP::HepLorentzVector G4LorentzVector
G4ThreeVector G4RandomDirection()
#define G4MUTEX_INITIALIZER
#define G4MUTEXLOCK(mutex)
#define G4MUTEXUNLOCK(mutex)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
static G4Electron * Electron()
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
G4double GetTotalEnergy() const
G4HadFinalState theParticleChange
void CoherentPion(G4LorentzVector &lvP, G4int pdgP, G4Nucleus &targetNucleus)
static G4double fNuMuQarrayKR[50][51][51]
static G4double fNuMuXarrayKR[50][51]
G4int GetOnePionIndex(G4double energy)
G4double SampleXkr(G4double energy)
G4double SampleQkr(G4double energy, G4double xx)
G4double GgSampleNM(G4Nucleus &nucl)
G4double GetNuMuOnePionProb(G4int index, G4double energy)
static G4double fNuMuXdistrKR[50][50]
static G4double fNuMuQdistrKR[50][51][50]
G4double CalculateQEratioA(G4int Z, G4int A, G4double energy, G4int nepdg)
void ClusterDecay(G4LorentzVector &lvX, G4int qX)
void FinalBarion(G4LorentzVector &lvB, G4int qB, G4int pdgB)
G4NuElNucleusCcModel(const G4String &name="NuElNuclCcModel")
virtual void InitialiseModel()
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
virtual void ModelDescription(std::ostream &) const
virtual G4bool IsApplicable(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
void SampleLVkr(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4double GetMinNuElEnergy()
virtual ~G4NuElNucleusCcModel()
G4double AtomicMass(const G4double A, const G4double Z, const G4int numberOfLambdas=0) const
G4double GetPDGMass() const
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()