ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4AblaDataDefs.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4AblaDataDefs.hh
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 // ABLAXX statistical de-excitation model
27 // Jose Luis Rodriguez, GSI (translation from ABLA07 and contact person)
28 // Pekka Kaitaniemi, HIP (initial translation of ablav3p)
29 // Aleksandra Kelic, GSI (ABLA07 code)
30 // Davide Mancusi, CEA (contact person INCL)
31 // Aatos Heikkinen, HIP (project coordination)
32 //
33 #define ABLAXX_IN_GEANT4_MODE 1
34 
35 #include "globals.hh"
36 
37 // Data structures needed by ABLA evaporation code.
38 
39 #ifndef G4AblaDataDefs_hh
40 #define G4AblaDataDefs_hh 1
41 
42 #ifdef ABLAXX_IN_GEANT4_MODE
43 #include "globals.hh"
44 #else
45 #include "G4INCLGeant4Compat.hh"
46 #endif
47 
48 #include <cmath>
49 
50 // ABLA
51 
52 class G4Nevent {
53 public:
54  G4Nevent() {};
55  ~G4Nevent() {};
56 
57  G4int ii;
58 };
59 
60 // ABLA
61 #define PACESIZEROWS 500
62 #define PACESIZECOLS 500
63 
67 class G4Pace {
68 
69 public:
70  G4Pace() {};
71 
72  ~G4Pace() {};
73 
75 };
76 
77 #define MASSIZEROWS 154
78 #define MASSIZECOLS 13
79 
80 class G4Mexp {
81 
82 public:
83  G4Mexp() {};
84 
85  ~G4Mexp() {};
86 
90 };
91 
92 #define EC2SUBROWS 154
93 #define EC2SUBCOLS 99
94 
98 class G4Ec2sub {
99 public:
100  G4Ec2sub() {};
101 
102  ~G4Ec2sub() {};
103 
105 
109  void dump() {
110  for(G4int i = 0; i < EC2SUBROWS; i++) {
111  for(G4int j = 0; j < EC2SUBCOLS; j++) {
112  //G4cout << ecnz[i][j] << " ";
113  }
114  // G4cout << G4endl;
115  }
116  }
117 };
118 
119 class G4Ald {
120 public:
125  :av(0.0), as(0.0), ak(0.0), optafan(0.0)
126  {};
127  ~G4Ald() {};
128 
130 };
131 
132 #define ECLDROWS 154
133 #define ECLDCOLS 99
134 
135 #define ECLDROWSbeta 251
136 #define ECLDCOLSbeta 137
137 
141 class G4Ecld {
142 
143 public:
144  G4Ecld() {};
145  ~G4Ecld() {};
146 
151 
156 
161 
167 
172 
177 
182 };
183 
184 class G4Fiss {
189 public:
191  :bet(0.0), ifis(0.0), ucr(0.0), dcr(0.0), optshp(0), optxfis(0), optct(0), optcol(0),
192  at(0), zt(0)
193  {};
194  ~G4Fiss() {};
195 
198 };
199 
200 #define FBROWS 101
201 #define FBCOLS 161
202 
206 class G4Fb {
207 
208 public:
209  G4Fb() {};
210  ~G4Fb() {;}
211 
212  // G4double efa[FBROWS][FBCOLS];
214 };
215 
220 class G4Opt {
221 
222 public:
224  :optemd(0), optcha(0), optshpimf(0), optimfallowed(0), nblan0(0)
225  {};
226  ~G4Opt() {};
227 
229 };
230 
231 #define EENUCSIZE 2002
232 #define XHESIZE 50
233 class G4Eenuc {
234 public:
236  for(G4int i = 0; i < EENUCSIZE; ++i) {
237  she[i] = 0.0;
238  }
239  for(G4int i = 0; i < XHESIZE; ++i) {
240  for(G4int j = 0; j < EENUCSIZE; ++j) {
241  xhe[i][j] = 0.0;
242  }
243  }
244  };
245  ~G4Eenuc() {};
246 
248 };
249 
250 //#define VOLANTSIZE 200
251 #define VOLANTSIZE 301
252 
256 class G4Volant {
257 
258 public:
260  {
261  clear();
262  }
263 
264  ~G4Volant() {};
265 
266  void clear()
267  {
268  for(G4int i = 0; i < VOLANTSIZE; i++) {
269  copied[i] = false;
270  acv[i] = 0;
271  zpcv[i] = 0;
272  pcv[i] = 0;
273  xcv[i] = 0;
274  ycv[i] = 0;
275  zcv[i] = 0;
276  iv = 0;
277  }
278  }
279 
281  {
282  G4double total = 0.0;
283  for(G4int i = 0; i <= iv; i++) {
284  total += acv[i];
285  }
286  return total;
287  }
288 
289  void dump()
290  {
291  G4double totA = 0.0, totZ = 0.0, totP = 0.0;
292  // G4cout <<"i \t ACV \t ZPCV \t PCV" << G4endl;
293  for(G4int i = 0; i <= iv; i++) {
294  if(i == 0 && acv[i] != 0) {
295  // G4cout <<"G4Volant: Particle stored at index " << i << G4endl;
296  }
297  totA += acv[i];
298  totZ += zpcv[i];
299  totP += pcv[i];
300  // G4cout << "volant" << i << "\t" << acv[i] << " \t " << zpcv[i] << " \t " << pcv[i] << G4endl;
301  }
302  // G4cout <<"Particle count index (iv) = " << iv << G4endl;
303  // G4cout <<"ABLA Total: A = " << totA << " Z = " << totZ << " momentum = " << totP << G4endl;
304  }
305 
310 };
311 
312 #define VARNTPSIZE 301
313 class G4VarNtp {
314 public:
316  clear();
317  };
318 
319  ~G4VarNtp() {};
320 
324  void clear() {
325  particleIndex = 0;
326  projType = 0;
327  projEnergy = 0.0;
328  targetA = 0;
329  targetZ = 0;
330  masp = 0.0; mzsp = 0.0; exsp = 0.0; mrem = 0.0;
331  // To be deleted?
332  spectatorA = 0;
333  spectatorZ = 0;
334  spectatorEx = 0.0;
335  spectatorM = 0.0;
336  spectatorT = 0.0;
337  spectatorP1 = 0.0;
338  spectatorP2 = 0.0;
339  spectatorP3 = 0.0;
340  massini = 0;
341  mzini = 0;
342  exini = 0;
343  pcorem = 0;
344  mcorem = 0;
345  pxrem = 0;
346  pyrem = 0;
347  pzrem = 0;
348  erecrem = 0;
349  mulncasc = 0;
350  mulnevap = 0;
351  mulntot = 0;
352  bimpact = 0.0;
353  jremn = 0;
354  kfis = 0;
355  estfis = 0;
356  izfis = 0;
357  iafis = 0;
358  ntrack = 0;
359  needsFermiBreakup = false;
360  for(G4int i = 0; i < VARNTPSIZE; i++) {
361  itypcasc[i] = 0;
362  avv[i] = 0;
363  zvv[i] = 0;
364  svv[i] = 0;
365  enerj[i] = 0.0;
366  pxlab[i] = 0.0;
367  pylab[i] = 0.0;
368  pzlab[i] = 0.0;
369  full[i] = false;
370  }
371  }
372 
377  if(full[particleIndex]) {
378  // G4cout <<"A = " << Z << " Z = " << Z << G4endl;
379  } else {
380  avv[particleIndex] = (int) A;
381  zvv[particleIndex] = (int) Z;
382  enerj[particleIndex] = E;
383  plab[particleIndex] = P;
386  full[particleIndex] = true;
387  ntrack = particleIndex + 1;
388  particleIndex++;
389  }
390  }
391 
396  G4int baryonNumber = 0;
397  for(G4int i = 0; i < ntrack; i++) {
398  if(avv[i] > 0) {
399  baryonNumber += avv[i];
400  }
401  }
402  return baryonNumber;
403  }
404 
409  G4double energy = 0.0;
410  for(G4int i = 0; i < ntrack; i++) {
411  energy += std::sqrt(std::pow(plab[i], 2) + std::pow(getMass(i), 2)); // E^2 = p^2 + m^2
412  }
413 
414  return energy;
415  }
416 
421  G4double momentum = 0;
422  for(G4int i = 0; i < ntrack; i++) {
423  momentum += plab[i];
424  }
425  return momentum;
426  }
427 
429  G4double momentum = 0;
430  for(G4int i = 0; i < ntrack; i++) {
431  momentum += plab[i];
432  }
433  return momentum;
434  }
435 
437  const G4double protonMass = 938.272;
438  const G4double neutronMass = 939.565;
439  const G4double pionMass = 139.57;
440 
441  G4double mass = 0.0;
442  if(avv[particle] == 1 && zvv[particle] == 1) mass = protonMass;
443  if(avv[particle] == 1 && zvv[particle] == 0) mass = neutronMass;
444  if(avv[particle] == -1) mass = pionMass;
445  if(avv[particle] > 1)
446  mass = avv[particle] * protonMass + zvv[particle] * neutronMass;
447  return mass;
448  }
449 
453  void dump() {
454  G4int nProton = 0, nNeutron = 0;
455  G4int nPiPlus = 0, nPiZero = 0, nPiMinus = 0;
456  G4int nH2 = 0, nHe3 = 0, nAlpha = 0;
457  G4int nGamma=0;
458  G4int nFragments = 0;
459  G4int nParticles = 0;
460  for(G4int i = 0; i < ntrack; i++) {
461  nParticles++;
462  if(avv[i] == 1 && zvv[i] == 1) nProton++; // Count multiplicities
463  if(avv[i] == 1 && zvv[i] == 0) nNeutron++;
464  if(avv[i] == 0 && zvv[i] == 0) nGamma++;
465  if(avv[i] == -1 && zvv[i] == 1) nPiPlus++;
466  if(avv[i] == -1 && zvv[i] == 0) nPiZero++;
467  if(avv[i] == -1 && zvv[i] == -1) nPiMinus++;
468  if(avv[i] == 2 && zvv[i] == 1) nH2++;
469  if(avv[i] == 3 && zvv[i] == 2) nHe3++;
470  if(avv[i] == 4 && zvv[i] == 2) nAlpha++;
471  if( zvv[i] > 2) nFragments++;
472  }
473  }
474 
479 
484 
489 
494 
499 
504 
509 
514 
519 
524 
529 
534 
539 
544 
549 
554 
556 
561 
566 
571 
576 
581 
586 
591 
596 
601 
606 
613 
621 
626 
627 
632 
637 
642 
647 
655 
660 
665 
666 private:
668 };
669 
670 #endif