Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NuElNucleusCcModel Class Reference

#include <G4NuElNucleusCcModel.hh>

+ Inheritance diagram for G4NuElNucleusCcModel:

Public Member Functions

 G4NuElNucleusCcModel (const G4String &name="NuElNuclCcModel")
 
virtual ~G4NuElNucleusCcModel ()
 
virtual void InitialiseModel ()
 
virtual G4bool IsApplicable (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
void SampleLVkr (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
G4double GetMinNuElEnergy ()
 
G4double ThresholdEnergy (G4double mI, G4double mF, G4double mP)
 
virtual void ModelDescription (std::ostream &) const
 
- Public Member Functions inherited from G4NeutrinoNucleusModel
 G4NeutrinoNucleusModel (const G4String &name="neutrino-nucleus")
 
virtual ~G4NeutrinoNucleusModel ()
 
virtual G4bool IsApplicable (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
G4double SampleXkr (G4double energy)
 
G4double GetXkr (G4int iEnergy, G4double prob)
 
G4double SampleQkr (G4double energy, G4double xx)
 
G4double GetQkr (G4int iE, G4int jX, G4double prob)
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)=0
 
void ClusterDecay (G4LorentzVector &lvX, G4int qX)
 
void MesonDecay (G4LorentzVector &lvX, G4int qX)
 
void FinalBarion (G4LorentzVector &lvB, G4int qB, G4int pdgB)
 
void RecoilDeexcitation (G4Fragment &fragment)
 
void FinalMeson (G4LorentzVector &lvM, G4int qM, G4int pdgM)
 
void CoherentPion (G4LorentzVector &lvP, G4int pdgP, G4Nucleus &targetNucleus)
 
void SetCutEnergy (G4double ec)
 
G4double GetCutEnergy ()
 
G4double GetNuEnergy ()
 
G4double GetQtransfer ()
 
G4double GetQ2 ()
 
G4double GetXsample ()
 
G4int GetPDGencoding ()
 
G4bool GetCascade ()
 
G4bool GetString ()
 
G4double GetCosTheta ()
 
G4double GetEmu ()
 
G4double GetEx ()
 
G4double GetMuMass ()
 
G4double GetW2 ()
 
G4double GetM1 ()
 
G4double GetMr ()
 
G4double GetTr ()
 
G4double GetDp ()
 
G4bool GetfBreak ()
 
G4bool GetfCascade ()
 
G4bool GetfString ()
 
G4LorentzVector GetLVl ()
 
G4LorentzVector GetLVh ()
 
G4LorentzVector GetLVt ()
 
G4LorentzVector GetLVcpi ()
 
G4double GetMinNuMuEnergy ()
 
G4double ThresholdEnergy (G4double mI, G4double mF, G4double mP)
 
G4double GetQEratioA ()
 
void SetQEratioA (G4double qea)
 
G4double FinalMomentum (G4double mI, G4double mF, G4double mP, G4LorentzVector lvX)
 
G4double FermiMomentum (G4Nucleus &targetNucleus)
 
G4double NucleonMomentum (G4Nucleus &targetNucleus)
 
G4double GetEx (G4int A, G4bool fP)
 
G4double GgSampleNM (G4Nucleus &nucl)
 
G4int GetEnergyIndex (G4double energy)
 
G4double GetNuMuQeTotRat (G4int index, G4double energy)
 
G4int GetOnePionIndex (G4double energy)
 
G4double GetNuMuOnePionProb (G4int index, G4double energy)
 
G4double CalculateQEratioA (G4int Z, G4int A, G4double energy, G4int nepdg)
 
virtual void ModelDescription (std::ostream &) const
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int value)
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void ModelDescription (std::ostream &outFile) const
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void InitialiseModel ()
 
 G4HadronicInteraction (const G4HadronicInteraction &right)=delete
 
const G4HadronicInteractionoperator= (const G4HadronicInteraction &right)=delete
 
G4bool operator== (const G4HadronicInteraction &right) const =delete
 
G4bool operator!= (const G4HadronicInteraction &right) const =delete
 

Additional Inherited Members

- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 
- Protected Attributes inherited from G4NeutrinoNucleusModel
G4ParticleDefinitiontheMuonMinus
 
G4ParticleDefinitiontheMuonPlus
 
G4double fSin2tW
 
G4double fCutEnergy
 
G4int fNbin
 
G4int fIndex
 
G4int fEindex
 
G4int fXindex
 
G4int fQindex
 
G4int fOnePionIndex
 
G4int fPDGencoding
 
G4bool fCascade
 
G4bool fString
 
G4bool fProton
 
G4bool f2p2h
 
G4bool fBreak
 
G4double fNuEnergy
 
G4double fQ2
 
G4double fQtransfer
 
G4double fXsample
 
G4double fM1
 
G4double fM2
 
G4double fMt
 
G4double fMu
 
G4double fW2
 
G4double fMpi
 
G4double fW2pi
 
G4double fMinNuEnergy
 
G4double fDp
 
G4double fTr
 
G4double fEmu
 
G4double fEmuPi
 
G4double fEx
 
G4double fMr
 
G4double fCosTheta
 
G4double fCosThetaPi
 
G4double fQEratioA
 
G4LorentzVector fLVh
 
G4LorentzVector fLVl
 
G4LorentzVector fLVt
 
G4LorentzVector fLVcpi
 
G4GeneratorPrecompoundInterfacefPrecoInterface
 
G4PreCompoundModelfPreCompound
 
G4ExcitationHandlerfDeExcitation
 
G4NucleusfRecoil
 
G4int fSecID
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 
- Static Protected Attributes inherited from G4NeutrinoNucleusModel
static const G4int fResNumber = 6
 
static const G4double fResMass [6]
 
static const G4int fClustNumber = 4
 
static const G4double fMesMass [4] = {1260., 980., 770., 139.57}
 
static const G4int fMesPDG [4] = {20213, 9000211, 213, 211}
 
static const G4double fBarMass [4] = {1700., 1600., 1232., 939.57}
 
static const G4int fBarPDG [4] = {12224, 32224, 2224, 2212}
 
static const G4double fNuMuResQ [50][50]
 
static const G4double fNuMuEnergy [50]
 
static const G4double fNuMuQeTotRat [50]
 
static const G4double fOnePionEnergy [58]
 
static const G4double fOnePionProb [58]
 
static const G4double fNuMuEnergyLogVector [50]
 
static G4double fNuMuXarrayKR [50][51] = {{1.0}}
 
static G4double fNuMuXdistrKR [50][50] = {{1.0}}
 
static G4double fNuMuQarrayKR [50][51][51] = {{{1.0}}}
 
static G4double fNuMuQdistrKR [50][51][50] = {{{1.0}}}
 
static const G4double fQEnergy [50]
 
static const G4double fANeMuQEratio [50]
 
static const G4double fNeMuQEratio [50]
 

Detailed Description

Definition at line 55 of file G4NuElNucleusCcModel.hh.

Constructor & Destructor Documentation

◆ G4NuElNucleusCcModel()

G4NuElNucleusCcModel::G4NuElNucleusCcModel ( const G4String name = "NuElNuclCcModel")

Definition at line 94 of file G4NuElNucleusCcModel.cc.

96{
97 theElectron = G4Electron::Electron();
98 fData = fMaster = false;
99 fMel = electron_mass_c2;
101}
static G4Electron * Electron()
Definition: G4Electron.cc:93

◆ ~G4NuElNucleusCcModel()

G4NuElNucleusCcModel::~G4NuElNucleusCcModel ( )
virtual

Definition at line 104 of file G4NuElNucleusCcModel.cc.

105{}

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4NuElNucleusCcModel::ApplyYourself ( const G4HadProjectile aTrack,
G4Nucleus targetNucleus 
)
virtual

Implements G4NeutrinoNucleusModel.

Definition at line 240 of file G4NuElNucleusCcModel.cc.

242{
244 fProton = f2p2h = fBreak = false;
245 fCascade = fString = false;
246 fLVh = fLVl = fLVt = fLVcpi = G4LorentzVector(0.,0.,0.,0.);
247
248 const G4HadProjectile* aParticle = &aTrack;
249 G4double energy = aParticle->GetTotalEnergy();
250
251 G4String pName = aParticle->GetDefinition()->GetParticleName();
252
253 if( energy < fMinNuEnergy )
254 {
257 return &theParticleChange;
258 }
259
260 SampleLVkr( aTrack, targetNucleus);
261
262 if( fBreak == true || fEmu < fMel ) // ~5*10^-6
263 {
264 // G4cout<<"ni, ";
267 return &theParticleChange;
268 }
269
270 // LVs of initial state
271
272 G4LorentzVector lvp1 = aParticle->Get4Momentum();
273 G4LorentzVector lvt1( 0., 0., 0., fM1 );
275
276 // 1-pi by fQtransfer && nu-energy
277 G4LorentzVector lvpip1( 0., 0., 0., mPip );
278 G4LorentzVector lvsum, lv2, lvX;
279 G4ThreeVector eP;
280 G4double cost(1.), sint(0.), phi(0.), muMom(0.), massX2(0.), massX(0.), massR(0.), eCut(0.);
281 G4DynamicParticle* aLept = nullptr; // lepton lv
282
283 G4int Z = targetNucleus.GetZ_asInt();
284 G4int A = targetNucleus.GetA_asInt();
285 G4double mTarg = targetNucleus.AtomicMass(A,Z);
286 G4int pdgP(0), qB(0);
287 // G4double mSum = G4ParticleTable::GetParticleTable()->FindParticle(2212)->GetPDGMass() + mPip;
288
289 G4int iPi = GetOnePionIndex(energy);
290 G4double p1pi = GetNuMuOnePionProb( iPi, energy);
291
292 if( p1pi > G4UniformRand() && fCosTheta > 0.9 ) // && fQtransfer < 0.95*GeV ) // mu- & coherent pion + nucleus
293 {
294 // lvsum = lvp1 + lvpip1;
295 lvsum = lvp1 + lvt1;
296 // cost = fCosThetaPi;
297 cost = fCosTheta;
298 sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
299 phi = G4UniformRand()*CLHEP::twopi;
300 eP = G4ThreeVector( sint*std::cos(phi), sint*std::sin(phi), cost );
301
302 // muMom = sqrt(fEmuPi*fEmuPi-fMel*fMel);
303 muMom = sqrt(fEmu*fEmu-fMel*fMel);
304
305 eP *= muMom;
306
307 // lv2 = G4LorentzVector( eP, fEmuPi );
308 // lv2 = G4LorentzVector( eP, fEmu );
309 lv2 = fLVl;
310
311 // lvX = lvsum - lv2;
312 lvX = fLVh;
313 massX2 = lvX.m2();
314 massX = lvX.m();
315 massR = fLVt.m();
316
317 if ( massX2 <= 0. ) // vmg: very rarely ~ (1-4)e-6 due to big Q2/x, to be improved
318 {
319 fCascade = true;
322 return &theParticleChange;
323 }
324 fW2 = massX2;
325
326 if( pName == "nu_e" ) aLept = new G4DynamicParticle( theElectron, lv2 );
327 else
328 {
331 return &theParticleChange;
332 }
333 if( pName == "nu_e" ) pdgP = 211;
334 // else pdgP = -211;
335 // eCut = fMpi + 0.5*(fMpi*fMpi-massX2)/mTarg; // massX -> fMpi
336
337 if( A > 1 )
338 {
339 eCut = (fMpi + mTarg)*(fMpi + mTarg) - (massX + massR)*(massX + massR);
340 eCut /= 2.*massR;
341 eCut += massX;
342 }
343 else eCut = fM1 + fMpi;
344
345 if ( lvX.e() > eCut ) // && sqrt( GetW2() ) < 1.4*GeV ) //
346 {
347 CoherentPion( lvX, pdgP, targetNucleus);
348 }
349 else
350 {
351 fCascade = true;
354 return &theParticleChange;
355 }
357
358 return &theParticleChange;
359 }
360 else // lepton part in lab
361 {
362 lvsum = lvp1 + lvt1;
363 cost = fCosTheta;
364 sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
365 phi = G4UniformRand()*CLHEP::twopi;
366 eP = G4ThreeVector( sint*std::cos(phi), sint*std::sin(phi), cost );
367
368 muMom = sqrt(fEmu*fEmu-fMel*fMel);
369
370 eP *= muMom;
371
372 lv2 = G4LorentzVector( eP, fEmu );
373 lv2 = fLVl;
374 lvX = lvsum - lv2;
375 lvX = fLVh;
376 massX2 = lvX.m2();
377
378 if ( massX2 <= 0. ) // vmg: very rarely ~ (1-4)e-6 due to big Q2/x, to be improved
379 {
380 fCascade = true;
383 return &theParticleChange;
384 }
385 fW2 = massX2;
386
387 if( pName == "nu_e" ) aLept = new G4DynamicParticle( theElectron, lv2 );
388 else
389 {
392 return &theParticleChange;
393 }
395 }
396
397 // hadron part
398
399 fRecoil = nullptr;
400
401 if( A == 1 )
402 {
403 if( pName == "nu_e" ) qB = 2;
404 // else qB = 0;
405
406 // if( G4UniformRand() > 0.1 ) // > 0.9999 ) // > 0.0001 ) //
407 {
408 ClusterDecay( lvX, qB );
409 }
410 return &theParticleChange;
411 }
412 /*
413 // else
414 {
415 if( pName == "nu_mu" ) pdgP = 211;
416 else pdgP = -211;
417
418
419 if ( fQtransfer < 0.95*GeV ) // < 0.35*GeV ) //
420 {
421 if( lvX.m() > mSum ) CoherentPion( lvX, pdgP, targetNucleus);
422 }
423 }
424 return &theParticleChange;
425 }
426 */
427 G4Nucleus recoil;
428 G4double rM(0.), ratio = G4double(Z)/G4double(A);
429
430 if( ratio > G4UniformRand() ) // proton is excited
431 {
432 fProton = true;
433 recoil = G4Nucleus(A-1,Z-1);
434 fRecoil = &recoil;
435 rM = recoil.AtomicMass(A-1,Z-1);
436
437 if( pName == "nu_e" ) // (++) state -> p + pi+
438 {
441 }
442 else // (0) state -> p + pi-, n + pi0
443 {
444 // fMt = G4ParticleTable::GetParticleTable()->FindParticle(2212)->GetPDGMass()
445 // + G4ParticleTable::GetParticleTable()->FindParticle(-211)->GetPDGMass();
446 }
447 }
448 else // excited neutron
449 {
450 fProton = false;
451 recoil = G4Nucleus(A-1,Z);
452 fRecoil = &recoil;
453 rM = recoil.AtomicMass(A-1,Z);
454
455 if( pName == "nu_e" ) // (+) state -> n + pi+
456 {
459 }
460 else // (-) state -> n + pi-, // n + pi0
461 {
462 // fMt = G4ParticleTable::GetParticleTable()->FindParticle(2112)->GetPDGMass()
463 // + G4ParticleTable::GetParticleTable()->FindParticle(-211)->GetPDGMass();
464 }
465 }
466 // G4int index = GetEnergyIndex(energy);
467 G4int nepdg = aParticle->GetDefinition()->GetPDGEncoding();
468
469 G4double qeTotRat; // = GetNuMuQeTotRat(index, energy);
470 qeTotRat = CalculateQEratioA( Z, A, energy, nepdg);
471
472 G4ThreeVector dX = (lvX.vect()).unit();
473 G4double eX = lvX.e(); // excited nucleon
474 G4double mX = sqrt(massX2);
475 // G4double pX = sqrt( eX*eX - mX*mX );
476 // G4double sumE = eX + rM;
477
478 if( qeTotRat > G4UniformRand() || mX <= fMt ) // || eX <= 1232.*MeV) // QE
479 {
480 fString = false;
481
482 if( fProton )
483 {
484 fPDGencoding = 2212;
485 fMr = proton_mass_c2;
486 recoil = G4Nucleus(A-1,Z-1);
487 fRecoil = &recoil;
488 rM = recoil.AtomicMass(A-1,Z-1);
489 }
490 else
491 {
492 fPDGencoding = 2112;
494 FindParticle(fPDGencoding)->GetPDGMass(); // 939.5654133*MeV;
495 recoil = G4Nucleus(A-1,Z);
496 fRecoil = &recoil;
497 rM = recoil.AtomicMass(A-1,Z);
498 }
499 // sumE = eX + rM;
500 G4double eTh = fMr + 0.5*(fMr*fMr - mX*mX)/rM;
501
502 if( eX <= eTh ) // vmg, very rarely out of kinematics
503 {
504 fString = true;
507 return &theParticleChange;
508 }
509 // FinalBarion( fLVh, 0, fPDGencoding ); // p(n)+deexcited recoil
510 FinalBarion( lvX, 0, fPDGencoding ); // p(n)+deexcited recoil
511 }
512 else // if ( eX < 9500000.*GeV ) // < 25.*GeV) // < 95.*GeV ) // < 2.5*GeV ) //cluster decay
513 {
514 if ( fProton && pName == "nu_e" ) qB = 2;
515 else if( !fProton && pName == "nu_e" ) qB = 1;
516
517 ClusterDecay( lvX, qB );
518 }
519 return &theParticleChange;
520}
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]
#define G4UniformRand()
Definition: Randomize.hh:52
Hep3Vector unit() const
Hep3Vector vect() const
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
void CoherentPion(G4LorentzVector &lvP, G4int pdgP, G4Nucleus &targetNucleus)
G4int GetOnePionIndex(G4double energy)
G4double GetNuMuOnePionProb(G4int index, G4double energy)
G4double CalculateQEratioA(G4int Z, G4int A, G4double energy, G4int nepdg)
void ClusterDecay(G4LorentzVector &lvX, G4int qX)
void FinalBarion(G4LorentzVector &lvB, G4int qB, G4int pdgB)
void SampleLVkr(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4int GetA_asInt() const
Definition: G4Nucleus.hh:99
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:105
G4double AtomicMass(const G4double A, const G4double Z, const G4int numberOfLambdas=0) const
Definition: G4Nucleus.cc:357
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
G4double energy(const ThreeVector &p, const G4double m)

◆ GetMinNuElEnergy()

G4double G4NuElNucleusCcModel::GetMinNuElEnergy ( )
inline

Definition at line 76 of file G4NuElNucleusCcModel.hh.

76{ return fMel + 0.5*fMel*fMel/fM1 + 0.05*CLHEP::MeV; }; // kinematics + accuracy for sqrts

Referenced by IsApplicable().

◆ InitialiseModel()

void G4NuElNucleusCcModel::InitialiseModel ( )
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 121 of file G4NuElNucleusCcModel.cc.

122{
123 G4String pName = "nu_e";
124
125 G4int nSize(0), i(0), j(0), k(0);
126
127 if(!fData)
128 {
129#ifdef G4MULTITHREADED
130 G4MUTEXLOCK(&numuNucleusModel);
131 if(!fData)
132 {
133#endif
134 fMaster = true;
135#ifdef G4MULTITHREADED
136 }
137 G4MUTEXUNLOCK(&numuNucleusModel);
138#endif
139 }
140
141 if(fMaster)
142 {
143 const char* path = G4FindDataDir("G4PARTICLEXSDATA");
144 std::ostringstream ost1, ost2, ost3, ost4;
145 ost1 << path << "/" << "neutrino" << "/" << pName << "/xarraycckr";
146
147 std::ifstream filein1( ost1.str().c_str() );
148
149 // filein.open("$PARTICLEXSDATA/");
150
151 filein1>>nSize;
152
153 for( k = 0; k < fNbin; ++k )
154 {
155 for( i = 0; i <= fNbin; ++i )
156 {
157 filein1 >> fNuMuXarrayKR[k][i];
158 // G4cout<< fNuMuXarrayKR[k][i] << " ";
159 }
160 }
161 // G4cout<<G4endl<<G4endl;
162
163 ost2 << path << "/" << "neutrino" << "/" << pName << "/xdistrcckr";
164 std::ifstream filein2( ost2.str().c_str() );
165
166 filein2>>nSize;
167
168 for( k = 0; k < fNbin; ++k )
169 {
170 for( i = 0; i < fNbin; ++i )
171 {
172 filein2 >> fNuMuXdistrKR[k][i];
173 // G4cout<< fNuMuXdistrKR[k][i] << " ";
174 }
175 }
176 // G4cout<<G4endl<<G4endl;
177
178 ost3 << path << "/" << "neutrino" << "/" << pName << "/q2arraycckr";
179 std::ifstream filein3( ost3.str().c_str() );
180
181 filein3>>nSize;
182
183 for( k = 0; k < fNbin; ++k )
184 {
185 for( i = 0; i <= fNbin; ++i )
186 {
187 for( j = 0; j <= fNbin; ++j )
188 {
189 filein3 >> fNuMuQarrayKR[k][i][j];
190 // G4cout<< fNuMuQarrayKR[k][i][j] << " ";
191 }
192 }
193 }
194 // G4cout<<G4endl<<G4endl;
195
196 ost4 << path << "/" << "neutrino" << "/" << pName << "/q2distrcckr";
197 std::ifstream filein4( ost4.str().c_str() );
198
199 filein4>>nSize;
200
201 for( k = 0; k < fNbin; ++k )
202 {
203 for( i = 0; i <= fNbin; ++i )
204 {
205 for( j = 0; j < fNbin; ++j )
206 {
207 filein4 >> fNuMuQdistrKR[k][i][j];
208 // G4cout<< fNuMuQdistrKR[k][i][j] << " ";
209 }
210 }
211 }
212 fData = true;
213 }
214}
const char * G4FindDataDir(const char *)
#define G4MUTEXLOCK(mutex)
Definition: G4Threading.hh:251
#define G4MUTEXUNLOCK(mutex)
Definition: G4Threading.hh:254
static G4double fNuMuQarrayKR[50][51][51]
static G4double fNuMuXarrayKR[50][51]
static G4double fNuMuXdistrKR[50][50]
static G4double fNuMuQdistrKR[50][51][50]

Referenced by G4NuElNucleusCcModel().

◆ IsApplicable()

G4bool G4NuElNucleusCcModel::IsApplicable ( const G4HadProjectile aTrack,
G4Nucleus targetNucleus 
)
virtual

Reimplemented from G4NeutrinoNucleusModel.

Definition at line 218 of file G4NuElNucleusCcModel.cc.

220{
221 G4bool result = false;
222 G4String pName = aPart.GetDefinition()->GetParticleName();
223 G4double energy = aPart.GetTotalEnergy();
225
226 if( pName == "nu_e"
227 &&
228 energy > fMinNuEnergy )
229 {
230 result = true;
231 }
232
233 return result;
234}
bool G4bool
Definition: G4Types.hh:86

◆ ModelDescription()

void G4NuElNucleusCcModel::ModelDescription ( std::ostream &  outFile) const
virtual

Reimplemented from G4NeutrinoNucleusModel.

Definition at line 108 of file G4NuElNucleusCcModel.cc.

109{
110
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";
114
115}

◆ SampleLVkr()

void G4NuElNucleusCcModel::SampleLVkr ( const G4HadProjectile aTrack,
G4Nucleus targetNucleus 
)

Definition at line 531 of file G4NuElNucleusCcModel.cc.

532{
533 fBreak = false;
534 G4int A = targetNucleus.GetA_asInt(), iTer(0), iTerMax(100);
535 G4int Z = targetNucleus.GetZ_asInt();
536 G4double e3(0.), pMu2(0.), pX2(0.), nMom(0.), rM(0.), hM(0.), tM = targetNucleus.AtomicMass(A,Z);
537 G4double Ex(0.), ei(0.), nm2(0.);
538 G4double cost(1.), sint(0.), phi(0.), muMom(0.);
539 G4ThreeVector eP, bst;
540 const G4HadProjectile* aParticle = &aTrack;
541 G4LorentzVector lvp1 = aParticle->Get4Momentum();
542
543 if( A == 1 ) // hydrogen, no Fermi motion ???
544 {
545 fNuEnergy = aParticle->GetTotalEnergy();
546 iTer = 0;
547
548 do
549 {
553
554 if( fXsample > 0. )
555 {
556 fW2 = fM1*fM1 - fQ2 + fQ2/fXsample; // sample excited hadron mass
558 }
559 else
560 {
561 fW2 = fM1*fM1;
562 fEmu = fNuEnergy;
563 }
564 e3 = fNuEnergy + fM1 - fEmu;
565
566 if( e3 < sqrt(fW2) ) G4cout<<"energyX = "<<e3/GeV<<", fW = "<<sqrt(fW2)/GeV<<G4endl;
567
568 pMu2 = fEmu*fEmu - fMel*fMel;
569
570 if(pMu2 < 0.) { fBreak = true; return; }
571
572 pX2 = e3*e3 - fW2;
573
574 fCosTheta = fNuEnergy*fNuEnergy + pMu2 - pX2;
575 fCosTheta /= 2.*fNuEnergy*sqrt(pMu2);
576 iTer++;
577 }
578 while( ( abs(fCosTheta) > 1. || fEmu < fMel ) && iTer < iTerMax );
579
580 if( iTer >= iTerMax ) { fBreak = true; return; }
581
582 if( abs(fCosTheta) > 1.) // vmg: due to big Q2/x values. To be improved ...
583 {
584 G4cout<<"H2: fCosTheta = "<<fCosTheta<<", fEmu = "<<fEmu<<G4endl;
585 // fCosTheta = -1. + 2.*G4UniformRand();
586 if(fCosTheta < -1.) fCosTheta = -1.;
587 if(fCosTheta > 1.) fCosTheta = 1.;
588 }
589 // LVs
590
591 G4LorentzVector lvt1 = G4LorentzVector( 0., 0., 0., fM1 );
592 G4LorentzVector lvsum = lvp1 + lvt1;
593
594 cost = fCosTheta;
595 sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
596 phi = G4UniformRand()*CLHEP::twopi;
597 eP = G4ThreeVector( sint*std::cos(phi), sint*std::sin(phi), cost );
598 muMom = sqrt(fEmu*fEmu-fMel*fMel);
599 eP *= muMom;
600 fLVl = G4LorentzVector( eP, fEmu );
601
602 fLVh = lvsum - fLVl;
603 fLVt = G4LorentzVector( 0., 0., 0., 0. ); // no recoil
604 }
605 else // Fermi motion, Q2 in nucleon rest frame
606 {
607 G4Nucleus recoil1( A-1, Z );
608 rM = recoil1.AtomicMass(A-1,Z);
609 do
610 {
611 // nMom = NucleonMomentumBR( targetNucleus ); // BR
612 nMom = GgSampleNM( targetNucleus ); // Gg
613 Ex = GetEx(A-1, fProton);
614 ei = tM - sqrt( (rM + Ex)*(rM + Ex) + nMom*nMom );
615 // ei = 0.5*( tM - s2M - 2*eX );
616
617 nm2 = ei*ei - nMom*nMom;
618 iTer++;
619 }
620 while( nm2 < 0. && iTer < iTerMax );
621
622 if( iTer >= iTerMax ) { fBreak = true; return; }
623
624 G4ThreeVector nMomDir = nMom*G4RandomDirection();
625
626 if( !f2p2h || A < 3 ) // 1p1h
627 {
628 // hM = tM - rM;
629
630 fLVt = G4LorentzVector( -nMomDir, sqrt( (rM + Ex)*(rM + Ex) + nMom*nMom ) ); // rM ); //
631 fLVh = G4LorentzVector( nMomDir, ei ); // hM); //
632 }
633 else // 2p2h
634 {
635 G4Nucleus recoil(A-2,Z-1);
636 rM = recoil.AtomicMass(A-2,Z-1)+sqrt(nMom*nMom+fM1*fM1);
637 hM = tM - rM;
638
639 fLVt = G4LorentzVector( nMomDir, sqrt( rM*rM+nMom*nMom ) );
640 fLVh = G4LorentzVector(-nMomDir, sqrt( hM*hM+nMom*nMom ) );
641 }
642 // G4cout<<hM<<", ";
643 // bst = fLVh.boostVector();
644
645 // lvp1.boost(-bst); // -> nucleon rest system, where Q2 transfer is ???
646
647 fNuEnergy = lvp1.e();
648 // G4double mN = fLVh.m(); // better mN = fM1 !? vmg
649 iTer = 0;
650
651 do // no FM!?, 5.4.20 vmg
652 {
656
657 // G4double mR = mN + fM1*(A-1.)*std::exp(-2.0*fQtransfer/mN); // recoil mass in+el
658
659 if( fXsample > 0. )
660 {
661 fW2 = fM1*fM1 - fQ2 + fQ2/fXsample; // sample excited hadron mass
662
663 // fW2 = mN*mN - fQ2 + fQ2/fXsample; // sample excited hadron mass
664 // fEmu = fNuEnergy - fQ2/2./mR/fXsample; // fM1->mN
665
666 fEmu = fNuEnergy - fQ2/2./fM1/fXsample; // fM1->mN
667 }
668 else
669 {
670 // fW2 = mN*mN;
671
672 fW2 = fM1*fM1;
673 fEmu = fNuEnergy;
674 }
675 // if(fEmu < 0.) G4cout<<"fEmu = "<<fEmu<<" hM = "<<hM<<G4endl;
676 // e3 = fNuEnergy + mR - fEmu;
677
678 e3 = fNuEnergy + fM1 - fEmu;
679
680 // if( e3 < sqrt(fW2) ) G4cout<<"energyX = "<<e3/GeV<<", fW = "<<sqrt(fW2)/GeV<<G4endl;
681
682 pMu2 = fEmu*fEmu - fMel*fMel;
683 pX2 = e3*e3 - fW2;
684
685 if(pMu2 < 0.) { fBreak = true; return; }
686
687 fCosTheta = fNuEnergy*fNuEnergy + pMu2 - pX2;
688 fCosTheta /= 2.*fNuEnergy*sqrt(pMu2);
689 iTer++;
690 }
691 while( ( abs(fCosTheta) > 1. || fEmu < fMel ) && iTer < iTerMax );
692
693 if( iTer >= iTerMax ) { fBreak = true; return; }
694
695 if( abs(fCosTheta) > 1.) // vmg: due to big Q2/x values. To be improved ...
696 {
697 G4cout<<"FM: fCosTheta = "<<fCosTheta<<", fEmu = "<<fEmu<<G4endl;
698 // fCosTheta = -1. + 2.*G4UniformRand();
699 if( fCosTheta < -1.) fCosTheta = -1.;
700 if( fCosTheta > 1.) fCosTheta = 1.;
701 }
702 // LVs
703 // G4LorentzVector lvt1 = G4LorentzVector( 0., 0., 0., mN ); // fM1 );
704
705 G4LorentzVector lvt1 = G4LorentzVector( 0., 0., 0., fM1 ); // fM1 );
706 G4LorentzVector lvsum = lvp1 + lvt1;
707
708 cost = fCosTheta;
709 sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
710 phi = G4UniformRand()*CLHEP::twopi;
711 eP = G4ThreeVector( sint*std::cos(phi), sint*std::sin(phi), cost );
712 muMom = sqrt(fEmu*fEmu-fMel*fMel);
713 eP *= muMom;
714 fLVl = G4LorentzVector( eP, fEmu );
715 fLVh = lvsum - fLVl;
716
717 // if( fLVh.e() < mN || fLVh.m2() < 0.) { fBreak = true; return; }
718
719 if( fLVh.e() < fM1 || fLVh.m2() < 0.) { fBreak = true; return; }
720
721 // back to lab system
722
723 // fLVl.boost(bst);
724 // fLVh.boost(bst);
725 }
726 //G4cout<<iTer<<", "<<fBreak<<"; ";
727}
G4ThreeVector G4RandomDirection()
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4double SampleXkr(G4double energy)
G4double SampleQkr(G4double energy, G4double xx)
G4double GgSampleNM(G4Nucleus &nucl)

Referenced by ApplyYourself().

◆ ThresholdEnergy()

G4double G4NuElNucleusCcModel::ThresholdEnergy ( G4double  mI,
G4double  mF,
G4double  mP 
)
inline

Definition at line 78 of file G4NuElNucleusCcModel.hh.

79 {
80 G4double w = std::sqrt(fW2);
81 return w + 0.5*( (mP+mF)*(mP+mF)-(w+mI)*(w+mI) )/mI;
82 };

The documentation for this class was generated from the following files: