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

#include <G4ANuElNucleusCcModel.hh>

+ Inheritance diagram for G4ANuElNucleusCcModel:

Public Member Functions

 G4ANuElNucleusCcModel (const G4String &name="NuMuNucleCcModel")
 
virtual ~G4ANuElNucleusCcModel ()
 
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 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)
 
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
 
G4LorentzVector fLVh
 
G4LorentzVector fLVl
 
G4LorentzVector fLVt
 
G4LorentzVector fLVcpi
 
G4GeneratorPrecompoundInterfacefPrecoInterface
 
G4PreCompoundModelfPreCompound
 
G4ExcitationHandlerfDeExcitation
 
G4NucleusfRecoil
 
- 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}}}
 

Detailed Description

Definition at line 55 of file G4ANuElNucleusCcModel.hh.

Constructor & Destructor Documentation

◆ G4ANuElNucleusCcModel()

G4ANuElNucleusCcModel::G4ANuElNucleusCcModel ( const G4String name = "NuMuNucleCcModel")

Definition at line 94 of file G4ANuElNucleusCcModel.cc.

96{
97 thePositron = G4Positron::Positron();
98 fData = fMaster = false;
99 fMel = electron_mass_c2;
101}
static G4Positron * Positron()
Definition: G4Positron.cc:93

◆ ~G4ANuElNucleusCcModel()

G4ANuElNucleusCcModel::~G4ANuElNucleusCcModel ( )
virtual

Definition at line 104 of file G4ANuElNucleusCcModel.cc.

105{}

Member Function Documentation

◆ ApplyYourself()

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

Implements G4NeutrinoNucleusModel.

Definition at line 242 of file G4ANuElNucleusCcModel.cc.

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

◆ GetMinNuElEnergy()

G4double G4ANuElNucleusCcModel::GetMinNuElEnergy ( )
inline

Definition at line 76 of file G4ANuElNucleusCcModel.hh.

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

Referenced by IsApplicable().

◆ InitialiseModel()

void G4ANuElNucleusCcModel::InitialiseModel ( )
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 121 of file G4ANuElNucleusCcModel.cc.

122{
123 G4String pName = "anti_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 char* path = getenv("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}
#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 G4ANuElNucleusCcModel().

◆ IsApplicable()

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

Reimplemented from G4NeutrinoNucleusModel.

Definition at line 218 of file G4ANuElNucleusCcModel.cc.

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

◆ ModelDescription()

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

Reimplemented from G4NeutrinoNucleusModel.

Definition at line 108 of file G4ANuElNucleusCcModel.cc.

109{
110
111 outFile << "G4ANuElNucleusCcModel 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 G4ANuElNucleusCcModel::SampleLVkr ( const G4HadProjectile aTrack,
G4Nucleus targetNucleus 
)

Definition at line 530 of file G4ANuElNucleusCcModel.cc.

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

Definition at line 78 of file G4ANuElNucleusCcModel.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: