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

#include <G4NuMuNucleusCcModel.hh>

+ Inheritance diagram for G4NuMuNucleusCcModel:

Public Member Functions

 G4NuMuNucleusCcModel (const G4String &name="NuMuNucleCcModel")
 
virtual ~G4NuMuNucleusCcModel ()
 
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 GetMinNuMuEnergy ()
 
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 G4NuMuNucleusCcModel.hh.

Constructor & Destructor Documentation

◆ G4NuMuNucleusCcModel()

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

Definition at line 94 of file G4NuMuNucleusCcModel.cc.

96{
97 fData = fMaster = false;
99}

◆ ~G4NuMuNucleusCcModel()

G4NuMuNucleusCcModel::~G4NuMuNucleusCcModel ( )
virtual

Definition at line 102 of file G4NuMuNucleusCcModel.cc.

103{}

Member Function Documentation

◆ ApplyYourself()

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

Implements G4NeutrinoNucleusModel.

Definition at line 240 of file G4NuMuNucleusCcModel.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 < fMu ) // ~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-fMu*fMu);
303 muMom = sqrt(fEmu*fEmu-fMu*fMu);
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_mu" ) aLept = new G4DynamicParticle( theMuonMinus, lv2 );
327 // else if( pName == "anti_nu_mu") aLept = new G4DynamicParticle( theMuonPlus, lv2 );
328 else
329 {
332 return &theParticleChange;
333 }
334 if( pName == "nu_mu" ) pdgP = 211;
335 // else pdgP = -211;
336 // eCut = fMpi + 0.5*(fMpi*fMpi-massX2)/mTarg; // massX -> fMpi
337
338 if( A > 1 )
339 {
340 eCut = (fMpi + mTarg)*(fMpi + mTarg) - (massX + massR)*(massX + massR);
341 eCut /= 2.*massR;
342 eCut += massX;
343 }
344 else eCut = fM1 + fMpi;
345
346 if ( lvX.e() > eCut ) // && sqrt( GetW2() ) < 1.4*GeV ) //
347 {
348 CoherentPion( lvX, pdgP, targetNucleus);
349 }
350 else
351 {
352 fCascade = true;
355 return &theParticleChange;
356 }
358
359 return &theParticleChange;
360 }
361 else // lepton part in lab
362 {
363 lvsum = lvp1 + lvt1;
364 cost = fCosTheta;
365 sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
366 phi = G4UniformRand()*CLHEP::twopi;
367 eP = G4ThreeVector( sint*std::cos(phi), sint*std::sin(phi), cost );
368
369 muMom = sqrt(fEmu*fEmu-fMu*fMu);
370
371 eP *= muMom;
372
373 lv2 = G4LorentzVector( eP, fEmu );
374 lv2 = fLVl;
375 lvX = lvsum - lv2;
376 lvX = fLVh;
377 massX2 = lvX.m2();
378
379 if ( massX2 <= 0. ) // vmg: very rarely ~ (1-4)e-6 due to big Q2/x, to be improved
380 {
381 fCascade = true;
384 return &theParticleChange;
385 }
386 fW2 = massX2;
387
388 if( pName == "nu_mu" ) aLept = new G4DynamicParticle( theMuonMinus, lv2 );
389 // else if( pName == "anti_nu_mu") aLept = new G4DynamicParticle( theMuonPlus, 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 == "nu_mu" ) 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 == "nu_mu" ) // (++) 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 == "nu_mu" ) // (+) 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 // if( pName == "anti_nu_mu" )
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 == "nu_mu" ) qB = 2;
514 // else if( fProton && pName == "anti_nu_mu" ) qB = 0;
515 else if( !fProton && pName == "nu_mu" ) qB = 1;
516 // else if( !fProton && pName == "anti_nu_mu" ) qB = -1;
517
518
519 ClusterDecay( lvX, qB );
520 }
521 return &theParticleChange;
522}
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 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)
G4ParticleDefinition * theMuonMinus
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)
void SampleLVkr(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
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)

◆ GetMinNuMuEnergy()

G4double G4NuMuNucleusCcModel::GetMinNuMuEnergy ( )
inline

Definition at line 76 of file G4NuMuNucleusCcModel.hh.

76{ return fMu + 0.5*fMu*fMu/fM1 + 4.*CLHEP::MeV; }; // kinematics + accuracy for sqrts

◆ InitialiseModel()

void G4NuMuNucleusCcModel::InitialiseModel ( )
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 119 of file G4NuMuNucleusCcModel.cc.

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

◆ IsApplicable()

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

Reimplemented from G4NeutrinoNucleusModel.

Definition at line 217 of file G4NuMuNucleusCcModel.cc.

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

◆ ModelDescription()

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

Reimplemented from G4NeutrinoNucleusModel.

Definition at line 106 of file G4NuMuNucleusCcModel.cc.

107{
108
109 outFile << "G4NuMuNucleusCcModel is a neutrino-nucleus (charge current) scattering\n"
110 << "model which uses the standard model \n"
111 << "transfer parameterization. The model is fully relativistic\n";
112
113}

◆ SampleLVkr()

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

Definition at line 533 of file G4NuMuNucleusCcModel.cc.

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

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