source: trunk/source/processes/hadronic/models/incl/include/G4InclDataDefs.hh@ 1344

Last change on this file since 1344 was 1340, checked in by garnier, 15 years ago

update ti head

File size: 23.6 KB
RevLine 
[819]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//
[1340]26// $Id: G4InclDataDefs.hh,v 1.10 2010/10/28 15:35:50 gcosmo Exp $
[819]27// Translation of INCL4.2/ABLA V3
28// Pekka Kaitaniemi, HIP (translation)
29// Christelle Schmidt, IPNL (fission code)
30// Alain Boudard, CEA (contact person INCL/ABLA)
31// Aatos Heikkinen, HIP (project coordination)
32
33// All data structures needed by INCL4 are defined here.
34
35#ifndef InclDataDefs_hh
36#define InclDataDefs_hh 1
37
[1340]38#include "G4Nucleus.hh"
39#include "G4HadProjectile.hh"
40#include "G4ParticleTable.hh"
41#include "G4Track.hh"
42
43class G4InclFermi {
44public:
45 G4InclFermi() {
46 G4double hc = 197.328;
47 G4double fmp = 938.2796;
48 pf=1.37*hc;
49 pf2=pf*pf;
50 tf=std::sqrt(pf*pf+fmp*fmp)-fmp;
51 };
52 ~G4InclFermi() {};
53
54 G4double tf,pf,pf2;
55};
56
57#define max_a_proj 61
58
59/**
60 * (eps_c,p1_s,p2_s,p3_s,eps_c used to store the kinematics of
61 * nucleons for composit projectiles before entering the potential)
62 */
63class G4QuadvectProjo {
64public:
65 G4QuadvectProjo() {};
66 ~G4QuadvectProjo() {};
67
68 G4double eps_c[max_a_proj],p3_c[max_a_proj],
69 p1_s[max_a_proj],p2_s[max_a_proj],p3_s[max_a_proj],
70 t_c[max_a_proj];
71};
72
73class G4VBe {
74public:
75 G4VBe() {};
76 ~G4VBe() {};
77
78 G4int ia_be, iz_be;
79 G4double rms_be, pms_be, bind_be;
80};
81
82/**
83 * Projectile spectator
84 */
85class G4InclProjSpect {
86public:
87 G4InclProjSpect() {
88 // G4cout <<"Projectile spectator data structure created!" << G4endl;
89 };
90 ~G4InclProjSpect() {};
91
92 void clear() {
93 for(G4int i = 0; i < 21; i++) tab[i] = 0.0;
94 for(G4int i = 0; i < 61; i++) n_projspec[i] = 0;
95 a_projspec = 0;
96 z_projspec = 0;
97 m_projspec = 0.0;
98 ex_projspec = 0.0;
99 p1_projspec = 0.0;
100 p2_projspec = 0.0;
101 p3_projspec = 0.0;
102 };
103
104 G4double tab[21];
105 G4int n_projspec[61];
106 G4int a_projspec,z_projspec;
107 G4double ex_projspec,t_projspec, p1_projspec, p2_projspec, p3_projspec, m_projspec;
108};
109
[819]110#define FSIZE 15
111/**
112 * Initial values of a hadronic cascade problem.
113 */
114class G4Calincl {
115public:
[1340]116 G4Calincl() {
117 isExtendedProjectile = false;
118 };
119
120 G4Calincl(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus, G4bool inverseKinematics = false) {
121 for(int i = 0; i < 15; i++) {
122 f[i] = 0.0; // Initialize INCL input data
123 }
124
125 usingInverseKinematics = inverseKinematics;
126
127 f[0] = theNucleus.GetA_asInt(); // Target mass number
128 f[1] = theNucleus.GetZ_asInt(); // Target charge number
129 f[6] = getBulletType(aTrack.GetDefinition()); // Projectile type (INCL particle code)
130 f[2] = aTrack.GetKineticEnergy() / MeV; // Projectile energy (total, in MeV)
131 f[5] = 1.0; // Time scaling
132 f[4] = 45.0; // Nuclear potential
133 setExtendedProjectileInfo(aTrack.GetDefinition());
134 // G4cout <<"Projectile type = " << f[6] << G4endl;
135 // G4cout <<"Energy = " << f[2] << G4endl;
136 // G4cout <<"Target A = " << f[0] << " Z = " << f[1] << G4endl;
137 };
138
[819]139 ~G4Calincl() {};
140
[1340]141 static void printProjectileTargetInfo(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus) {
142 G4cout <<"Projectile = " << aTrack.GetDefinition()->GetParticleName() << G4endl;
143 G4cout <<" four-momentum: " << aTrack.Get4Momentum() << G4endl;
144 G4cout <<"Energy = " << aTrack.GetKineticEnergy() / MeV << G4endl;
145 G4cout <<"Target A = " << theNucleus.GetA_asInt() << " Z = " << theNucleus.GetZ_asInt() << G4endl;
146 }
147
148 static G4bool canUseInverseKinematics(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus) {
149 G4int targetA = theNucleus.GetA_asInt();
150 const G4ParticleDefinition *projectileDef = aTrack.GetDefinition();
151 G4int projectileA = projectileDef->GetAtomicMass();
152 // G4int projectileZ = projectileDef->GetAtomicNumber();
153 if(targetA > 0 && targetA < 18 && (projectileDef != G4Proton::Proton() &&
154 projectileDef != G4Neutron::Neutron() &&
155 projectileDef != G4PionPlus::PionPlus() &&
156 projectileDef != G4PionZero::PionZero() &&
157 projectileDef != G4PionMinus::PionMinus()) &&
158 projectileA > 1) {
159 return true;
160 } else {
161 return false;
162 }
163 }
164
165 G4double bulletE() {
166 return f[2];
167 }
168
169 G4int getBulletType() {
170 return G4int(f[6]);
171 };
172
173 void setExtendedProjectileInfo(const G4ParticleDefinition *pd) {
174 if(getBulletType(pd) == -666) {
175 extendedProjectileA = pd->GetAtomicMass();
176 extendedProjectileZ = pd->GetAtomicNumber();
177 isExtendedProjectile = true;
178 } else {
179 isExtendedProjectile = false;
180 }
181 };
182
183 G4int getBulletType(const G4ParticleDefinition *pd) {
184 G4ParticleTable *pt = G4ParticleTable::GetParticleTable();
185
186 if(pd == G4Proton::Proton()) {
187 return 1;
188 } else if(pd == G4Neutron::Neutron()) {
189 return 2;
190 } else if(pd == G4PionPlus::PionPlus()) {
191 return 3;
192 } else if(pd == G4PionMinus::PionMinus()) {
193 return 5;
194 } else if(pd == G4PionZero::PionZero()) {
195 return 4;
196 } else if(pd == G4Deuteron::Deuteron()) {
197 return 6;
198 } else if(pd == G4Triton::Triton()) {
199 return 7;
200 } else if(pd == G4He3::He3()) {
201 return 8;
202 } else if(pd == G4Alpha::Alpha()) {
203 return 9;
204 } else if(pd == pt->GetIon(6, 12, 0.0)) { // C12 special case. This should be phased-out in favor of "extended projectile"
205 return -12;
206 } else { // Is this extended projectile?
207 G4int A = pd->GetAtomicMass();
208 G4int Z = pd->GetAtomicNumber();
209 if(A > 4 && A <= 16 && Z > 2 && Z <= 8) { // Ions from Lithium to Oxygen
210 return -666; // Code of an extended projectile
211 }
212 }
213 G4cout <<"Error! Projectile " << pd->GetParticleName() << " not defined!" << G4endl;
214 return 0;
215 };
216
217 G4bool isInverseKinematics() {
218 return usingInverseKinematics;
219 };
220
221 G4double targetA() { return f[0]; };
222 G4double targetZ() { return f[1]; };
223
224 G4int extendedProjectileA;
225 G4int extendedProjectileZ;
226 G4bool isExtendedProjectile;
227
[819]228 /**
229 * Here f is an array containing the following initial values:
230 * - f[0] : target mass number
231 * - f[1] : target charge number
232 * - f[2] : bullet energy
233 * - f[3] : minimum proton energy to leave the target (default: 0.0)
234 * - f[4] : nuclear potential (default: 45.0 MeV)
235 * - f[5] : time scale (default: 1.0)
236 * - f[6] : bullet type (1: proton, 2: neutron, 3: pi+, 4: pi0 5: pi-, 6:H2, 7: H3, 8: He3, 9: He4
237 * - f[7] : minimum neutron energy to leave the target (default: 0.0)
238 * - f[8] : target material identifier (G4Mat)
239 * - f[9] : not used
240 * - f[10] : not used
241 * - f[11] : not used
242 * - f[12] : not used
243 * - f[13] : not used
244 * - f[14] : not used
245 */
246 G4double f[FSIZE];
247
248 /**
249 * Number of events to be processed.
250 */
251 G4int icoup;
[1340]252
253 G4bool usingInverseKinematics;
[819]254};
255
256#define IGRAINESIZE 19
257/**
258 * Random seeds used by internal random number generators.
259 * @see G4Incl::standardRandom
260 * @see G4Incl::gaussianRandom
261 */
262class G4Hazard{
263public:
264 G4Hazard() {};
265 ~G4Hazard() {};
266
267 /**
268 * Random seed
269 */
270 G4long ial;
271
272 /**
273 * An array of random seeds.
274 */
275 G4long igraine[IGRAINESIZE];
276};
277
278#define MATSIZE 500
279#define MATGEOSIZE 6
280/**
281 * Target nuclei to be taken into account in the cascade problem.
282 */
283class G4Mat {
284public:
285 G4Mat() { };
286 ~G4Mat() { };
287
288 /**
289 * Charge numbers.
290 */
291 G4int zmat[MATSIZE];
292
293 /**
294 * Mass number
295 */
296 G4int amat[MATSIZE];
297
298 /**
299 *
300 */
301 G4double bmax_geo[MATGEOSIZE][MATSIZE];
302
303 /**
304 * Number of materials.
305 */
306 G4int nbmat;
307};
308
309#define LGNSIZE 9
310/**
311 * Properties of light nucleus used as a bullet.
312 */
313class G4LightGausNuc {
314public:
315 G4LightGausNuc() {};
316 ~G4LightGausNuc() {};
317
318 G4double rms1t[LGNSIZE];
319 G4double pf1t[LGNSIZE];
320 G4double pfln[LGNSIZE];
321 G4double tfln[LGNSIZE];
322 G4double vnuc[LGNSIZE];
323};
324
325#define LNSIZE 30
326/**
327 * Data of light nuclei.
328 */
329class G4LightNuc {
330public:
331 G4LightNuc() {};
332 ~G4LightNuc() {};
333
334 /**
335 * r
336 */
337 G4double r[LNSIZE];
338
339 /**
340 * a
341 */
342 G4double a[LNSIZE];
343};
344
345#define SAXWROWS 30
346#define SAXWCOLS 500
347/**
348 * Woods-Saxon density and its first derivative.
349 */
350class G4Saxw {
351public:
352 G4Saxw() {};
353 ~G4Saxw() {};
354
355 /**
356 * x
357 */
358 G4double x[SAXWROWS][SAXWCOLS];
359
360 /**
361 * y
362 */
363 G4double y[SAXWROWS][SAXWCOLS];
364
365 /**
366 * s
367 */
368 G4double s[SAXWROWS][SAXWCOLS];
369
370 /**
371 * imat
372 */
373 G4int imat;
374
375 /**
376 * n
377 */
378 G4int n;
379
380 /**
381 * k
382 */
383 G4int k;
384};
385
386/**
387 * Parameters for INCL4 model.
388 */
389class G4Ws {
390public:
[1340]391 G4Ws() {
392 fneck = 0.0;
393 };
[819]394 ~G4Ws() {};
395
396 /**
397 * r0
398 */
399 G4double r0;
400
401 /**
402 * adif
403 */
404 G4double adif;
405
406 /**
407 * Maximum radius of the nucleus
408 */
409 G4double rmaxws;
410
411 /**
412 * drws
413 */
414 G4double drws;
415
416 /**
417 * Shape of the surface of the nucleus:
418 * - -1: Woods-Saxon density with impact parameter dependence
419 * - 0: Woods-Saxon density without impact parameter dependence
420 * - 1: Sharp surface (hard sphere)
421 */
422 G4double nosurf;
423
424 /**
425 * Parameter related to the maximum radius of the nucleus.
426 *
427 * rmaxws = r0 + xfoisa*A
428 */
429 G4double xfoisa;
430
431 /**
432 * Pauli blocking used in the simulation:
433 * - 0: statistic Pauli blocking
434 * - 1: strict Pauli blocking
435 * - 2: no Pauli blocking
436 */
437 G4double npaulstr;
438
439 /**
440 * Maximum impact parameter
441 */
442 G4double bmax;
[1340]443
444 G4double fneck;
[819]445};
446
447#define DTONSIZE 13
448/**
449 * Random seeds used by internal random number generators.
450 * @see G4Incl::standardRandom
451 * @see G4Incl::gaussianRandom
452 */
453class G4Dton {
454public:
455 G4Dton() {};
456 ~G4Dton() {};
457
458 G4double c[DTONSIZE];
459 G4double d[DTONSIZE];
460 G4double fn;
461};
462
463#define SPL2SIZE 100
464/**
465 * Random seeds used by internal random number generators.
466 * @see G4Incl::standardRandom
467 * @see G4Incl::gaussianRandom
468 */
469class G4Spl2 {
470public:
471 G4Spl2() {};
472 ~G4Spl2() {};
473
474 G4double x[SPL2SIZE];
475 G4double y[SPL2SIZE];
476 G4double a[SPL2SIZE];
477 G4double b[SPL2SIZE];
478 G4double c[SPL2SIZE];
479 G4int n;
480};
481
482// incl4.2.cc:
483
484//#define BL1SIZE 300
485#define BL1SIZE 3000
486/**
487 * Random seeds used by internal random number generators.
488 * @see G4Incl::standardRandom
489 * @see G4Incl::gaussianRandom
490 */
491class G4Bl1 {
492public:
493 G4Bl1() {};
494 ~G4Bl1() {};
495
496 G4double p1[BL1SIZE],p2[BL1SIZE],p3[BL1SIZE];
497 G4double eps[BL1SIZE];
498 G4int ind1[BL1SIZE],ind2[BL1SIZE];
499 G4double ta;
[1340]500
501 void dump(G4int numberOfParticles) {
502 static G4int dumpNumber = 0;
503 G4cout <<"Dump number" << dumpNumber << " of particle 4-momenta (G4Bl1):" << G4endl;
504 G4cout <<"ta = " << ta << G4endl;
505 for(G4int i = 0; i < numberOfParticles; i++) {
506 G4cout <<"i = " << i << " p1 = " << p1[i] << " p2 = " << p2[i] << " p3 = " << p3[i] << " eps = " << eps[i] << G4endl;
507 }
508 dumpNumber++;
509 }
[819]510};
511
512#define BL2CROISSIZE 19900
513#define BL2INDSIZE 19900
514/**
515 *
516 */
517class G4Bl2 {
518public:
519 G4Bl2() {};
520 ~G4Bl2() {};
521
[1196]522 void dump() {
523 G4cout <<"Avatars: (number of avatars = " << k << ")" << G4endl;
524 for(G4int i = 0; i <= k; i++) {
525 G4cout <<"i = " << i << G4endl;
526 G4cout <<"crois[" << i << "] = " << crois[i] << G4endl;
527 G4cout <<"ind[" << i << "] = " << ind[i] << G4endl;
528 G4cout <<"jnd[" << i << "] = " << jnd[i] << G4endl;
529 }
530 }
531
[819]532 /**
533 *
534 */
535 G4double crois[BL2CROISSIZE];
536
537 /**
538 *
539 */
540 G4int k;
541
542 /**
543 *
544 */
545 G4int ind[BL2INDSIZE];
546
547 /**
548 *
549 */
550 G4int jnd[BL2INDSIZE];
551};
552
553//#define BL3SIZE 300
554#define BL3SIZE 3000
555/**
556 *
557 */
558class G4Bl3 {
559public:
560 G4Bl3() {};
561 ~G4Bl3() {};
562
563 /**
564 * r1 and r2
565 */
566 G4double r1,r2;
567
568 /**
569 * Nucleon positions
570 */
571 G4double x1[BL3SIZE], x2[BL3SIZE],x3[BL3SIZE];
572
573 /**
574 * Mass numbers
575 */
576 G4int ia1,ia2;
577
578 /**
579 * rab2
580 */
581 G4double rab2;
[1340]582
583 void dump() {
584 static G4int dumpNumber = 0;
585 G4cout <<"Dump number" << dumpNumber << " of particle positions (G4Bl3):" << G4endl;
586 G4cout <<" ia1 = " << ia1 << G4endl;
587 G4cout <<" ia2 = " << ia2 << G4endl;
588 G4cout <<" rab2 = " << rab2 << G4endl;
589 for(G4int i = 0; i <= (ia1 + ia2); i++) {
590 G4cout <<"i = " << i << " x1 = " << x1[i] << " x2 = " << x2[i] << " x3 = " << x3[i] << G4endl;
591 }
592 dumpNumber++;
593 }
[819]594};
595
596/**
597 * G4Bl4
598 */
599class G4Bl4 {
600public:
601 G4Bl4() {};
602 ~G4Bl4() {};
603
604 /**
605 * tmax5
606 */
607 G4double tmax5;
608};
609
610//#define BL5SIZE 300
611#define BL5SIZE 3000
612/**
613 * G4Bl5
614 */
615class G4Bl5 {
616public:
617 G4Bl5() {};
618 ~G4Bl5() {};
619
620 /**
621 * tlg
622 */
623 G4double tlg[BL5SIZE];
624
625 /**
626 * nesc
627 */
628 G4int nesc[BL5SIZE];
629};
630
631/**
632 * G4Bl6
633 */
634class G4Bl6 {
635public:
636 G4Bl6() {};
637 ~G4Bl6() {};
638
639 /**
640 * xx10
641 */
642 G4double xx10;
643
644 /**
645 * isa
646 */
647 G4double isa;
648};
649
650/**
651 * G4Bl8
652 */
653class G4Bl8 {
654public:
655 G4Bl8() {};
656 ~G4Bl8() {};
657
658 /**
659 * rathr
660 */
661 G4double rathr;
662
663 /**
664 * ramass
665 */
666 G4double ramass;
667};
668
669//#define BL9SIZE 300
670#define BL9SIZE 3000
671/**
672 * G4Bl9
673 */
674class G4Bl9 {
675public:
676 G4Bl9() {
677 l1 = 0;
678 l2 = 0;
679 };
680 ~G4Bl9() {};
681
682 /**
683 * hel
684 */
685 G4double hel[BL9SIZE];
686
687 /**
688 * l1 and l2
689 */
690 G4int l1,l2;
691};
692
693/**
694 * G4Bl10
695 */
696class G4Bl10 {
697public:
698 G4Bl10() {};
699 ~G4Bl10() {};
700
701 /**
702 * ri4, rs4, r2i, r2s, pdummy, pf
703 */
704 G4double ri4,rs4,r2i,r2s,pdummy,pf;
705};
706
707/**
708 * G4Kind
709 */
710class G4Kind {
711public:
712 G4Kind() {};
713 ~G4Kind() {};
714
715 /**
716 * kindf7
717 */
718 G4int kindf7;
719};
720
[1340]721/**
722 * Projectile parameters.
723 */
724class G4Bev {
725public:
726 /**
727 * Initialize all variables to zero.
728 */
729 G4Bev() {
730 ia_be = 0;
731 iz_be = 0;
732 rms_be = 0.0;
733 pms_be = 0.0;
734 bind_be = 0.0;
735 };
736 ~G4Bev() {};
737
738 /**
739 * Mass number.
740 */
741 G4int ia_be;
742
743 /**
744 * Charge number.
745 */
746 G4int iz_be;
747
748 /**
749 * rms
750 */
751 G4double rms_be;
752
753 /**
754 * pms
755 */
756 G4double pms_be;
757
758 /**
759 * bind
760 */
761 G4double bind_be;
762};
763
[819]764#define VARSIZE 3
765#define VAEPSSIZE 250
766#define VAAVM 1000
767/**
768 * Extra information on collisions between nucleons.
769 */
770class G4VarAvat {
771public:
772 G4VarAvat() {};
773 ~G4VarAvat() {};
774
775 /**
776 *
777 */
778 G4int kveux;
779
780 /**
781 *
782 */
783 G4double bavat;
784
785 /**
786 *
787 */
788 G4int nopartavat,ncolavat;
789
790 /**
791 *
792 */
793 G4double r1_in[VARSIZE],r1_first_avat[VARSIZE];
794
795 /**
796 *
797 */
798 G4double epsd[VAEPSSIZE],eps2[VAEPSSIZE],eps4[VAEPSSIZE],eps6[VAEPSSIZE],epsf[VAEPSSIZE];
799
800 /**
801 *
802 */
803 G4int nb_avat;
804
805 /**
806 *
807 */
808 G4double timeavat[VAAVM],l1avat[VAAVM],l2avat[VAAVM],jpartl1[VAAVM],jpartl2[VAAVM];
809
810 /**
811 *
812 */
813 G4double del1avat[VAAVM],del2avat[VAAVM],energyavat[VAAVM];
814
815 /**
816 *
817 */
818 G4double bloc_paul[VAAVM],bloc_cdpp[VAAVM],go_out[VAAVM];
819};
820
[1340]821#define VARNTPSIZE 301
[819]822class G4VarNtp {
823public:
824 G4VarNtp() {};
825 ~G4VarNtp() {};
826
827 /**
[962]828 * Clear and initialize all variables and arrays.
829 */
830 void clear() {
831 particleIndex = 0;
832 projType = 0;
833 projEnergy = 0.0;
834 targetA = 0;
835 targetZ = 0;
[1340]836 masp = 0.0; mzsp = 0.0; exsp = 0.0;
837 // To be deleted?
838 spectatorA = 0;
839 spectatorZ = 0;
840 spectatorEx = 0.0;
841 spectatorM = 0.0;
842 spectatorT = 0.0;
843 spectatorP1 = 0.0;
844 spectatorP2 = 0.0;
845 spectatorP3 = 0.0;
[962]846 massini = 0;
847 mzini = 0;
848 exini = 0;
849 pcorem = 0;
850 mcorem = 0;
851 pxrem = 0;
852 pyrem = 0;
853 pzrem = 0;
[1340]854 erecrem = 0;
[962]855 mulncasc = 0;
856 mulnevap = 0;
857 mulntot = 0;
858 bimpact = 0.0;
859 jremn = 0;
860 kfis = 0;
861 estfis = 0;
862 izfis = 0;
863 iafis = 0;
864 ntrack = 0;
[1340]865 needsFermiBreakup = false;
[962]866 for(G4int i = 0; i < VARNTPSIZE; i++) {
867 itypcasc[i] = 0;
868 avv[i] = 0;
869 zvv[i] = 0;
870 enerj[i] = 0.0;
871 plab[i] = 0.0;
872 tetlab[i] = 0.0;
873 philab[i] = 0.0;
874 full[i] = false;
875 }
876 }
877
[1340]878 /**
879 * Add a particle to the INCL/ABLA final output.
880 */
[962]881 void addParticle(G4double A, G4double Z, G4double E, G4double P, G4double theta, G4double phi) {
882 if(full[particleIndex]) {
883 G4cout <<"G4VarNtp: Error. Index i = " << particleIndex << " is already occupied by particle:" << G4endl;
884 G4cout <<"A = " << avv[particleIndex] << " Z = " << zvv[particleIndex] << G4endl;
885 G4cout <<"Tried to replace it with:" << G4endl;
886 G4cout <<"A = " << Z << " Z = " << Z << G4endl;
887 } else {
888 avv[particleIndex] = (int) A;
889 zvv[particleIndex] = (int) Z;
890 enerj[particleIndex] = E;
891 plab[particleIndex] = P;
892 tetlab[particleIndex] = theta;
893 philab[particleIndex] = phi;
894 full[particleIndex] = true;
895 ntrack = particleIndex + 1;
896 particleIndex++;
897 }
898 }
899
900 /**
901 * Baryon number conservation check.
902 */
903 G4int getTotalBaryonNumber() {
904 G4int baryonNumber = 0;
905 for(G4int i = 0; i < ntrack; i++) {
906 if(avv[i] > 0) {
907 baryonNumber += avv[i];
908 }
909 }
910 return baryonNumber;
911 }
912
913 /**
914 * Return total energy.
915 */
916 G4double getTotalEnergy() {
917 G4double energy = 0.0;
918 for(G4int i = 0; i < ntrack; i++) {
919 energy += std::sqrt(std::pow(plab[i], 2) + std::pow(getMass(i), 2)); // E^2 = p^2 + m^2
920 }
921
922 return energy;
923 }
924
925 /**
926 * Return total three momentum.
927 */
928 G4double getTotalThreeMomentum() {
929 G4double momentum = 0;
930 for(G4int i = 0; i < ntrack; i++) {
931 momentum += plab[i];
932 }
933 return momentum;
934 }
935
936 G4double getMomentumSum() {
937 G4double momentum = 0;
938 for(G4int i = 0; i < ntrack; i++) {
939 momentum += plab[i];
940 }
941 return momentum;
942 }
943
944 G4double getMass(G4int particle) {
945 const G4double protonMass = 938.272;
946 const G4double neutronMass = 939.565;
947 const G4double pionMass = 139.57;
948
949 G4double mass = 0.0;
950 if(avv[particle] == 1 && zvv[particle] == 1) mass = protonMass;
951 if(avv[particle] == 1 && zvv[particle] == 0) mass = neutronMass;
952 if(avv[particle] == -1) mass = pionMass;
953 if(avv[particle] > 1)
954 mass = avv[particle] * protonMass + zvv[particle] * neutronMass;
955 return mass;
956 }
957
958 /**
959 * Dump debugging output.
960 */
961 void dump() {
962 G4int nProton = 0, nNeutron = 0;
963 G4int nPiPlus = 0, nPiZero = 0, nPiMinus = 0;
964 G4int nH2 = 0, nHe3 = 0, nAlpha = 0;
965 G4int nFragments = 0;
966 G4int nParticles = 0;
967 G4cout <<"Particles produced in the event (" << ntrack << "):" << G4endl;
968 G4cout <<"A \t Z \t Ekin \t Ptot \t Theta \t Phi" << G4endl;
969 for(G4int i = 0; i < ntrack; i++) {
970 nParticles++;
971 if(avv[i] == 1 && zvv[i] == 1) nProton++; // Count multiplicities
972 if(avv[i] == 1 && zvv[i] == 0) nNeutron++;
973 if(avv[i] == -1 && zvv[i] == 1) nPiPlus++;
974 if(avv[i] == -1 && zvv[i] == 0) nPiZero++;
975 if(avv[i] == -1 && zvv[i] == -1) nPiMinus++;
976 if(avv[i] == 2 && zvv[i] == 1) nH2++;
977 if(avv[i] == 3 && zvv[i] == 2) nHe3++;
978 if(avv[i] == 4 && zvv[i] == 2) nAlpha++;
979 if( zvv[i] > 2) nFragments++;
980
981 G4cout << i << " \t " << avv[i] << " \t " << zvv[i] << " \t " << enerj[i] << " \t "
982 << plab[i] << " \t " << tetlab[i] << " \t " << philab[i] << G4endl;
983 }
984
985 G4cout <<"Summary of event: " << G4endl;
986 G4cout <<"Projectile type: " << projType <<" Energy: " << projEnergy << G4endl;
987 G4cout <<"Target A = " << targetA << " Z = " << targetZ << G4endl;
988 G4cout <<"Remnant from cascade: " << G4endl;
989 G4cout <<"A = " << massini << " Z = " << mzini << " excitation E = " << exini << G4endl;
990 G4cout <<"Particle multiplicities:" << G4endl;
991 G4cout <<"Protons: " << nProton << " Neutrons: " << nNeutron << G4endl;
992 G4cout <<"pi+: " << nPiPlus << " pi0: " << nPiZero << " pi-: " << nPiMinus << G4endl;
993 G4cout <<"H2: " << nH2 << " He3: " << nHe3 << " Alpha: " << nAlpha << G4endl;
994 G4cout <<"Nucleus fragments = " << nFragments << G4endl;
995 G4cout <<"Conservation laws:" << G4endl;
996 G4cout <<"Baryon number = " << getTotalBaryonNumber() << G4endl;
997 G4cout <<"Number of particles = " << nParticles << G4endl;
998 }
999
1000 /**
1001 * Projectile type.
1002 */
1003 G4int projType;
1004
1005 /**
1006 * Projectile energy.
1007 */
1008 G4double projEnergy;
1009
1010 /**
1011 * Target mass number.
1012 */
1013 G4int targetA;
1014
1015 /**
1016 * Target charge number.
1017 */
1018 G4int targetZ;
1019
1020 /**
[1340]1021 * Projectile spectator A, Z, Eex;
1022 */
1023 G4double masp, mzsp, exsp, mrem;
1024
1025 /**
1026 * Spectator nucleus mass number for light ion projectile support.
1027 */
1028 G4int spectatorA;
1029
1030 /**
1031 * Spectator nucleus charge number for light ion projectile support.
1032 */
1033 G4int spectatorZ;
1034
1035 /**
1036 * Spectator nucleus excitation energy for light ion projectile support.
1037 */
1038 G4double spectatorEx;
1039
1040 /**
1041 * Spectator nucleus mass.
1042 */
1043 G4double spectatorM;
1044
1045 /**
1046 * Spectator nucleus kinetic energy.
1047 */
1048 G4double spectatorT;
1049
1050 /**
1051 * Spectator nucleus momentum x-component.
1052 */
1053 G4double spectatorP1;
1054
1055 /**
1056 * Spectator nucleus momentum y-component.
1057 */
1058 G4double spectatorP2;
1059
1060 /**
1061 * Spectator nucleus momentum z-component.
1062 */
1063 G4double spectatorP3;
1064
1065 /**
[819]1066 * A of the remnant.
1067 */
1068 G4double massini;
1069
1070 /**
1071 * Z of the remnant.
1072 */
1073 G4double mzini;
1074
1075 /**
1076 * Excitation energy.
1077 */
1078 G4double exini;
1079
[1340]1080 G4double pcorem, mcorem, pxrem, pyrem, pzrem, erecrem;
[962]1081
[819]1082 /**
1083 * Cascade n multip.
1084 */
1085 G4int mulncasc;
1086
1087 /**
1088 * Evaporation n multip.
1089 */
1090 G4int mulnevap;
1091
1092 /**
1093 * Total n multip.
1094 */
1095 G4int mulntot;
1096
1097 /**
1098 * Impact parameter.
1099 */
1100 G4double bimpact;
1101
1102 /**
1103 * Remnant Intrinsic Spin.
1104 */
1105 G4int jremn;
1106
1107 /**
1108 * Fission 1/0=Y/N.
1109 */
1110 G4int kfis;
1111
1112 /**
1113 * Excit energy at fis.
1114 */
1115 G4double estfis;
1116
1117 /**
1118 * Z of fiss nucleus.
1119 */
1120 G4int izfis;
1121
1122 /**
1123 * A of fiss nucleus.
1124 */
1125 G4int iafis;
1126
1127 /**
1128 * Number of particles.
1129 */
1130 G4int ntrack;
1131
1132 /**
[962]1133 * The state of the index:
1134 * true = reserved
1135 * false = free
1136 */
1137 G4bool full[VARNTPSIZE];
1138
1139 /**
[1340]1140 * Does this nucleus require Fermi break-up treatment? Only
1141 * applicable when used together with Geant4.
1142 * true = do fermi break-up (and skip ABLA part)
1143 * false = use ABLA
1144 */
1145 G4bool needsFermiBreakup;
1146
1147 /**
[819]1148 * emitted in cascade (0) or evaporation (1).
1149 */
1150 G4int itypcasc[VARNTPSIZE];
1151
1152
1153 /**
1154 * A (-1 for pions).
1155 */
1156 G4int avv[VARNTPSIZE];
1157
1158 /**
1159 * Z
1160 */
1161 G4int zvv[VARNTPSIZE];
1162
1163 /**
1164 * Kinetic energy.
1165 */
1166 G4double enerj[VARNTPSIZE];
1167
1168 /**
1169 * Momentum.
1170 */
1171 G4double plab[VARNTPSIZE];
1172
1173 /**
1174 * Theta angle.
1175 */
1176 G4double tetlab[VARNTPSIZE];
1177
1178 /**
1179 * Phi angle.
1180 */
1181 G4double philab[VARNTPSIZE];
[962]1182
1183private:
1184 G4int particleIndex;
[819]1185};
1186
1187/**
1188 * Pauli blocking.
1189 */
1190class G4Paul {
1191public:
1192 G4Paul() {};
1193 ~G4Paul() {};
1194
1195 /**
1196 *
1197 */
1198 G4double ct0,ct1,ct2,ct3,ct4,ct5,ct6,pr,pr2,xrr,xrr2;
1199
1200 /**
1201 *
1202 */
1203 G4double cp0,cp1,cp2,cp3,cp4,cp5,cp6;
1204};
1205
1206
1207#endif
Note: See TracBrowser for help on using the repository browser.