Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/incl/include/G4InclDataDefs.hh

    r1196 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4InclDataDefs.hh,v 1.7 2009/11/18 10:43:14 kaitanie Exp $
     26// $Id: G4InclDataDefs.hh,v 1.10 2010/10/28 15:35:50 gcosmo Exp $
    2727// Translation of INCL4.2/ABLA V3
    2828// Pekka Kaitaniemi, HIP (translation)
     
    3636#define InclDataDefs_hh 1
    3737
     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
    38110#define FSIZE 15
    39111/**
     
    42114class G4Calincl {
    43115public:
    44   G4Calincl() {};
     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
    45139  ~G4Calincl() {};
    46140 
     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
    47228  /**
    48229   * Here f is an array containing the following initial values:
     
    69250   */
    70251  G4int icoup;
     252
     253  G4bool usingInverseKinematics;
    71254};
    72255
     
    206389class G4Ws {
    207390public:
    208   G4Ws() {};
     391  G4Ws() {
     392    fneck = 0.0;
     393  };
    209394  ~G4Ws() {};
    210395 
     
    256441   */
    257442  G4double bmax;
     443
     444  G4double fneck;
    258445};
    259446
     
    311498  G4int ind1[BL1SIZE],ind2[BL1SIZE];
    312499  G4double ta;
     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  }
    313510};
    314511
     
    383580   */
    384581  G4double rab2;
     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  }
    385594};
    386595
     
    510719};
    511720
     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
    512764#define VARSIZE 3
    513765#define VAEPSSIZE 250
     
    567819};
    568820
    569 #define VARNTPSIZE 255
     821#define VARNTPSIZE 301
    570822class G4VarNtp {
    571823public:
     
    582834    targetA = 0;
    583835    targetZ = 0;
     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;
    584846    massini = 0;
    585847    mzini = 0;
     
    590852    pyrem = 0;
    591853    pzrem = 0;
     854    erecrem = 0;
    592855    mulncasc = 0;
    593856    mulnevap = 0;
     
    600863    iafis = 0;
    601864    ntrack = 0;
     865    needsFermiBreakup = false;
    602866    for(G4int i = 0; i < VARNTPSIZE; i++) {
    603867      itypcasc[i] = 0;
     
    612876  }
    613877
     878  /**
     879   * Add a particle to the INCL/ABLA final output.
     880   */
    614881  void addParticle(G4double A, G4double Z, G4double E, G4double P, G4double theta, G4double phi) {
    615882    if(full[particleIndex]) {
     
    7521019
    7531020  /**
     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  /**
    7541066   * A of the remnant.
    7551067   */
     
    7661078  G4double exini;
    7671079
    768   G4double pcorem, mcorem, pxrem, pyrem, pzrem;
     1080  G4double pcorem, mcorem, pxrem, pyrem, pzrem, erecrem;
    7691081
    7701082  /**
     
    8261138
    8271139  /**
     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  /**
    8281148   * emitted in cascade (0) or evaporation (1).
    8291149   */
Note: See TracChangeset for help on using the changeset viewer.