Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NuMuNucleusCcModel.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// $Id: G4NuMuNucleusCcModel.cc 91806 2015-08-06 12:20:45Z gcosmo $
27//
28// Geant4 Header : G4NuMuNucleusCcModel
29//
30// Author : V.Grichine 12.2.19
31//
32
33#include <iostream>
34#include <fstream>
35#include <sstream>
36
38// #include "G4NuMuNuclCcDistrKR.hh"
39
40// #include "G4NuMuResQX.hh"
41
42#include "G4SystemOfUnits.hh"
43#include "G4ParticleTable.hh"
45#include "G4IonTable.hh"
46#include "Randomize.hh"
47#include "G4RandomDirection.hh"
48// #include "G4Threading.hh"
49
50// #include "G4Integrator.hh"
51#include "G4DataVector.hh"
52#include "G4PhysicsTable.hh"
53/*
54#include "G4CascadeInterface.hh"
55// #include "G4BinaryCascade.hh"
56#include "G4TheoFSGenerator.hh"
57#include "G4LundStringFragmentation.hh"
58#include "G4ExcitedStringDecay.hh"
59#include "G4FTFModel.hh"
60// #include "G4BinaryCascade.hh"
61#include "G4HadFinalState.hh"
62#include "G4HadSecondary.hh"
63#include "G4HadronicInteractionRegistry.hh"
64// #include "G4INCLXXInterface.hh"
65#include "G4QGSModel.hh"
66#include "G4QGSMFragmentation.hh"
67#include "G4QGSParticipants.hh"
68*/
69#include "G4KineticTrack.hh"
72#include "G4Fragment.hh"
73#include "G4NucleiProperties.hh"
75
77#include "G4PreCompoundModel.hh"
79
80
81#include "G4MuonMinus.hh"
82#include "G4MuonPlus.hh"
83#include "G4Nucleus.hh"
84#include "G4LorentzVector.hh"
85
86using namespace std;
87using namespace CLHEP;
88
89#ifdef G4MULTITHREADED
90 G4Mutex G4NuMuNucleusCcModel::numuNucleusModel = G4MUTEX_INITIALIZER;
91#endif
92
93
96{
97 fData = fMaster = false;
99}
100
101
103{}
104
105
106void G4NuMuNucleusCcModel::ModelDescription(std::ostream& outFile) const
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}
114
115/////////////////////////////////////////////////////////
116//
117// Read data from G4PARTICLEXSDATA (locally PARTICLEXSDATA)
118
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}
214
215/////////////////////////////////////////////////////////
216
218 G4Nucleus & targetNucleus)
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}
235
236/////////////////////////////////////////// ClusterDecay ////////////////////////////////////////////////////////////
237//
238//
239
241 const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
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}
523
524
525/////////////////////////////////////////////////////////////////////
526////////////////////////////////////////////////////////////////////
527///////////////////////////////////////////////////////////////////
528
529/////////////////////////////////////////////////
530//
531// sample x, then Q2
532
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}
730
731//
732//
733///////////////////////////
double A(double temperature)
CLHEP::HepLorentzVector G4LorentzVector
G4ThreeVector G4RandomDirection()
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:85
#define G4MUTEXLOCK(mutex)
Definition: G4Threading.hh:251
#define G4MUTEXUNLOCK(mutex)
Definition: G4Threading.hh:254
std::mutex G4Mutex
Definition: G4Threading.hh:81
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
#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)
static G4double fNuMuQarrayKR[50][51][51]
static G4double fNuMuXarrayKR[50][51]
G4int GetOnePionIndex(G4double energy)
G4double SampleXkr(G4double energy)
G4ParticleDefinition * theMuonMinus
G4double SampleQkr(G4double energy, G4double xx)
G4double GetNuMuQeTotRat(G4int index, G4double energy)
G4int GetEnergyIndex(G4double energy)
G4double GgSampleNM(G4Nucleus &nucl)
G4double GetNuMuOnePionProb(G4int index, G4double energy)
static G4double fNuMuXdistrKR[50][50]
static G4double fNuMuQdistrKR[50][51][50]
void ClusterDecay(G4LorentzVector &lvX, G4int qX)
void FinalBarion(G4LorentzVector &lvB, G4int qB, G4int pdgB)
void SampleLVkr(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
virtual G4bool IsApplicable(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4NuMuNucleusCcModel(const G4String &name="NuMuNucleCcModel")
virtual void ModelDescription(std::ostream &) const
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()
Definition: DoubConv.h:17