Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NuElNucleusCcModel.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: G4NuElNucleusCcModel.cc 91806 2015-08-06 12:20:45Z gcosmo $
27//
28// Geant4 Header : G4NuElNucleusCcModel
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 "G4Electron.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 G4NuElNucleusCcModel::numuNucleusModel = G4MUTEX_INITIALIZER;
91#endif
92
93
96{
97 theElectron = G4Electron::Electron();
98 fData = fMaster = false;
99 fMel = electron_mass_c2;
101}
102
103
105{}
106
107
108void G4NuElNucleusCcModel::ModelDescription(std::ostream& outFile) const
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}
116
117/////////////////////////////////////////////////////////
118//
119// Read data from G4PARTICLEXSDATA (locally PARTICLEXSDATA)
120
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 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}
215
216/////////////////////////////////////////////////////////
217
219 G4Nucleus & targetNucleus)
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 G4int Z = targetNucleus.GetZ_asInt();
233 Z *= 1;
234
235 return result;
236}
237
238/////////////////////////////////////////// ClusterDecay ////////////////////////////////////////////////////////////
239//
240//
241
243 const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
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 == "nu_e" ) aLept = new G4DynamicParticle( theElectron, lv2 );
329 else
330 {
333 return &theParticleChange;
334 }
335 if( pName == "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 == "nu_e" ) aLept = new G4DynamicParticle( theElectron, 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_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 == "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 == "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 == "nu_e" ) qB = 2;
514 else if( !fProton && pName == "nu_e" ) qB = 1;
515
516 ClusterDecay( lvX, qB );
517 }
518 return &theParticleChange;
519}
520
521
522/////////////////////////////////////////////////////////////////////
523////////////////////////////////////////////////////////////////////
524///////////////////////////////////////////////////////////////////
525
526/////////////////////////////////////////////////
527//
528// sample x, then Q2
529
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}
727
728//
729//
730///////////////////////////
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
static G4Electron * Electron()
Definition: G4Electron.cc:93
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)
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)
G4NuElNucleusCcModel(const G4String &name="NuMuNucleCcModel")
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
virtual void ModelDescription(std::ostream &) const
virtual G4bool IsApplicable(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
void SampleLVkr(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
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