Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:51

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // ABLAXX statistical de-excitation model
0027 // Jose Luis Rodriguez, GSI (translation from ABLA07 and contact person)
0028 // Pekka Kaitaniemi, HIP (initial translation of ablav3p)
0029 // Aleksandra Kelic, GSI (ABLA07 code)
0030 // Davide Mancusi, CEA (contact person INCL)
0031 // Aatos Heikkinen, HIP (project coordination)
0032 //
0033 #define ABLAXX_IN_GEANT4_MODE 1
0034 
0035 #include "globals.hh"
0036 
0037 #ifndef G4Abla_hh
0038 #define G4Abla_hh 1
0039 
0040 #ifdef ABLAXX_IN_GEANT4_MODE
0041 #include "globals.hh"
0042 #else
0043 #include "G4INCLGeant4Compat.hh"
0044 #include "G4INCLConfig.hh"
0045 #endif
0046 
0047 #include "G4AblaRandom.hh"
0048 #include "G4AblaDataDefs.hh"
0049 
0050 /**
0051  *  Class containing ABLA++ de-excitation code.
0052  */
0053 
0054 class G4Abla {
0055 
0056 public:
0057   /**
0058    * This constructor is used by standalone test driver and the Geant4 interface.
0059    *
0060    * @param aHazard random seeds
0061    * @param aVolant data structure for ABLA output
0062    * @param aVarNtp data structure for transfering ABLA output to Geant4 interface
0063    */
0064 #ifdef ABLAXX_IN_GEANT4_MODE
0065   G4Abla(G4Volant *aVolant, G4VarNtp *aVarntp);
0066 #else
0067   G4Abla(G4INCL::Config *config, G4Volant *aVolant, G4VarNtp *aVarntp);
0068 #endif
0069 
0070   /**
0071    * Basic destructor.
0072    */
0073   ~G4Abla();
0074 
0075   /// \brief Dummy copy constructor
0076   G4Abla(G4Abla const &other);
0077 
0078   /// \brief Dummy assignment operator
0079   G4Abla &operator=(G4Abla const &other);
0080 
0081   /**
0082    * Set verbosity level.
0083    */
0084   void setVerboseLevel(G4int level);
0085 
0086   /**
0087    * Get the internal output data structure pointer.
0088    */
0089   G4Volant* getVolant() {
0090     return volant;
0091   }
0092 
0093   /**
0094    * Main interface to the de-excitation code.
0095    *
0096    * @param nucleusA mass number of the nucleus
0097    * @param nucleusZ charge number of the nucleus
0098    * @param excitationEnergy excitation energy of the nucleus
0099    * @param angularMomentum angular momentum of the nucleus (produced as output by INCL4)
0100    * @param momX momentum x-component
0101    * @param momY momentum y-component
0102    * @param momZ momentum z-component
0103    * @param eventnumber number of the event
0104    */
0105   void DeexcitationAblaxx(G4int nucleusA, G4int nucleusZ, G4double excitationEnergy, G4double angularMomentum, G4double momX, G4double momY, G4double momZ, G4int eventnumber);
0106 
0107   /**
0108    * Main interface to the de-excitation code for hyper-nuclei.
0109    *
0110    * @param nucleusA mass number of the nucleus
0111    * @param nucleusZ charge number of the nucleus
0112    * @param excitationEnergy excitation energy of the nucleus
0113    * @param angularMomentum angular momentum of the nucleus (produced as output by INCL)
0114    * @param momX momentum x-component
0115    * @param momY momentum y-component
0116    * @param momZ momentum z-component
0117    * @param eventnumber number of the event
0118    * @param nucleusS is the strange number
0119    */
0120   void DeexcitationAblaxx(G4int nucleusA, G4int nucleusZ, G4double excitationEnergy, G4double angularMomentum, G4double momX, G4double momY, G4double momZ, G4int eventnumber, G4int nucleusS);
0121 
0122   // Evaporation
0123 public:
0124   /**
0125    * Initialize ABLA evaporation code.
0126    *
0127    */
0128   void initEvapora();
0129 
0130   /**
0131    * Initialize ABLA parameters.
0132    *
0133    */
0134   void SetParameters();
0135   void SetParametersG4(G4int z, G4int a);
0136 
0137   /**
0138    * Coefficient of collective enhancement including damping                         
0139    * Input: z,a,bet,sig,u                                                  
0140    * Output: qr - collective enhancement factor                            
0141    * See  junghans et al., nucl. phys. a 629 (1998) 635                    
0142    * @param z charge number
0143    * @param a mass number
0144    * @param bet beta deformation
0145    * @param sig perpendicular spin cut-off factor
0146    * @param u Energy
0147    * @return Coefficient of collective enhancement   
0148    */
0149   void qrot(G4double z, G4double a, G4double bet, G4double sig, G4double u, G4double *qr);
0150 
0151   /**
0152    * Model de la goutte liquide de c. f. weizsacker.
0153    * usually an obsolete option
0154    */
0155   void mglw(G4double a, G4double z, G4double *el);
0156 
0157   /**
0158    * Mglms
0159    */
0160   void mglms(G4double a, G4double z, G4int refopt4, G4double *el);
0161 
0162   /**
0163    *
0164    */
0165   G4double spdef(G4int a, G4int z, G4int optxfis);
0166 
0167   /**
0168    * Calculation of fissility parameter
0169    */
0170   G4double fissility(G4int a, G4int z, G4int ny, G4double sn, G4double slam, G4int optxfis);
0171 
0172   /**
0173    * Main evaporation routine.
0174    */
0175   void evapora(G4double zprf, G4double aprf, G4double *ee_par, G4double jprf, 
0176            G4double *zf_par, G4double *af_par, G4double *mtota_par,
0177            G4double *vleva_par, G4double *vxeva_par, G4double *vyeva_par,
0178            G4int *ff_par, G4int *fimf_par, G4double *fzimf, G4double *faimf, G4double *tkeimf_par,G4double *jprfout,G4int *inttype_par, G4int *inum_par,G4double EV_TEMP[200][6],G4int *iev_tab_temp_par, G4int *nblam0);
0179 
0180 
0181   /**
0182    * Calculation of particle emission probabilities.
0183    */
0184   void direct(G4double zprf, G4double a, G4double ee, G4double jprf, G4double *probp_par, G4double *probd_par, G4double *probt_par, G4double *probn_par, G4double *probhe_par, G4double *proba_par, G4double *probg_par,G4double *probimf_par,G4double *probf_par,G4double *problamb0_par, G4double *ptotl_par, G4double *sn_par, G4double *sbp_par, G4double *sbd_par, G4double *sbt_par, G4double *sbhe_par, G4double *sba_par,G4double *slamb0_par, G4double *ecn_par, G4double *ecp_par, G4double *ecd_par, G4double *ect_par,G4double *eche_par,G4double *eca_par, G4double *ecg_par,  G4double *eclamb0_par, G4double *bp_par, G4double *bd_par, G4double *bt_par, G4double *bhe_par, G4double *ba_par,G4double *sp_par,G4double *sd_par,G4double *st_par,G4double *she_par,G4double *sa_par, G4double *ef_par,G4double *ts1_par, G4int, G4int inum, G4int itest, G4int *sortie, G4double *tcn,G4double *jprfn_par, G4double *jprfp_par, G4double *jprfd_par, G4double *jprft_par, G4double *jprfhe_par, G4double *jprfa_par, G4double *jprflamb0_par, G4double *tsum_par, G4int NbLam0);
0185 
0186 
0187   /**
0188    * Calculation of fission and the particle emission probabilities after fission.
0189    */
0190 void fission(G4double AF,G4double ZF,G4double EE,G4double JPRF,
0191         G4double *VX1_FISSION,G4double *VY1_FISSION,G4double *VZ1_FISSION,
0192         G4double *VX2_FISSION,G4double *VY2_FISSION,G4double *VZ2_FISSION,
0193         G4int *ZFP1,G4int *AFP1,G4int *SFP1,G4int *ZFP2,G4int *AFP2,G4int *SFP2,G4int *imode, 
0194         G4double *VX_EVA_SC, G4double *VY_EVA_SC, G4double *VZ_EVA_SC,
0195         G4double EV_TEMP[200][6],G4int *IEV_TAB_FIS,G4int *NbLam0);
0196 
0197 
0198   /**
0199    * Calculation of lorentz's boost
0200    */
0201 void lorentz_boost(G4double VXRIN,G4double VYRIN,G4double VZRIN,G4double VXIN,G4double VYIN,G4double VZIN,G4double *VXOUT,G4double *VYOUT,G4double *VZOUT);
0202 
0203   /**
0204    * Calculation of unstable nuclei
0205    */
0206 void unstable_nuclei(G4int AFP,G4int ZFP,G4int *AFPNEW,G4int *ZFPNEW,G4int &IOUNSTABLE,G4double VX,G4double VY,G4double VZ,G4double *VP1X,G4double *VP1Y,G4double *VP1Z,G4double BU_TAB_TEMP[200][6],G4int *ILOOP);
0207 
0208   /**
0209    * Calculation of unstable nuclei tke
0210    */
0211 void unstable_tke(G4double AIN,G4double ZIN,G4double ANEW,G4double ZNEW,G4double VXIN,G4double VYIN,G4double VZIN,G4double *V1X,G4double *V1Y,G4double *V1Z,G4double *V2X,G4double *V2Y,G4double *V2Z);
0212 
0213   /**
0214    * Calculation of tke for breakup fragments
0215    */
0216 void tke_bu(G4double Z,G4double A,G4double ZALL,G4double AAL,G4double *VX,G4double *VY,G4double *VZ);
0217 
0218   /**
0219    * Calculation of the angular momentum of breakup fragments
0220    * according to Goldhaber model
0221    */
0222 void AMOMENT(G4double AABRA,G4double APRF,G4int IMULTIFR,G4double *PX,G4double *PY,G4double *PZ);
0223 
0224   /**
0225    * Calculation of particle emission barriers.
0226    */
0227   void barrs(G4int Z1,G4int A1,G4int Z2,G4int A2,G4double *sBARR,G4double *sOMEGA);
0228 
0229   /**
0230    * Calculation of particle emission between the saddle and scission point.
0231    */
0232   void evap_postsaddle(G4double A, G4double Z, G4double E_scission_pre, G4double *E_scission_post, G4double *A_scission, G4double *Z_scission,
0233 G4double &vx_eva,G4double &vy_eva,G4double &vz_eva,G4int *NbLam0_par);
0234 
0235   /**
0236    * Calculation of imfs.
0237    */
0238   void imf(G4double ACN,G4double ZCN,G4double TEMP,G4double EE,G4double *ZIMF,G4double *AIMF,G4double *BIMF,G4double *SBIMF,G4double *TIMF,G4double JPRF);
0239 
0240   /**
0241    * Calculation of omega at saddle point.
0242    */
0243   void fomega_sp(G4double AF,G4double Y,G4double *MFCD,G4double *sOMEGA,G4double *sHOMEGA);
0244 
0245   /**
0246    * Calculation of omega at ground state.
0247    */
0248   void fomega_gs(G4double AF,G4double ZF,G4double *K1,G4double *sOMEGA,G4double *sHOMEGA);
0249 
0250   /**
0251    * Calculation of tunnelling effect in fission.
0252    */
0253   G4double tunnelling(G4double A,G4double ZPRF,G4double Y,G4double EE,G4double EF,G4double TEMP,G4double DENSG,G4double DENSF,G4double ENH_FACT);
0254 
0255   /**
0256    * Calculation of fission width at the saddle point according to B&W.
0257    */
0258   void fission_width(G4double ZPRF,G4double A,G4double EE,G4double BS,G4double BK,G4double EF,G4double Y,G4double *GF,G4double *TEMP,G4double JPR,G4int IEROT,G4int FF_ALLOWED,G4int OPTCOL,G4int OPTSHP,G4double DENSG);
0259 
0260   /**
0261    * Calculation of unbound nuclei.
0262    */
0263 void unbound(G4double SN,G4double SP,G4double  SD,G4double ST,G4double SHE,G4double SA,G4double BP,G4double BD,G4double BT,G4double BHE,G4double BA,G4double *PROBF,G4double *PROBN,G4double *PROBP,G4double *PROBD,G4double *PROBT,G4double *PROBHE,G4double *PROBA,G4double *PROBIMF,G4double *PROBG,G4double *ECN,G4double *ECP,G4double *ECD,G4double *ECT,G4double *ECHE,G4double *ECA);
0264 
0265   /**
0266    * Calculation of the fission distribution.
0267    */
0268   void fissionDistri(G4double &a,G4double &z,G4double &e,
0269            G4double &a1,G4double &z1,G4double &e1,G4double &v1,
0270            G4double &a2,G4double &z2,G4double &e2,G4double &v2,
0271                    G4double &vx_eva_sc,G4double &vy_eva_sc,
0272                    G4double &vz_eva_sc,G4int *NbLam0_par);
0273 
0274   /**
0275    * Calculation of even-odd effects in fission.
0276    */
0277   void even_odd(G4double r_origin,G4double r_even_odd,G4int &i_out);
0278 
0279   /**
0280    * Functions for the fission model.
0281    */
0282   G4double umass(G4double z,G4double n,G4double beta);
0283   G4double ecoul(G4double z1,G4double n1,G4double beta1,G4double z2,G4double n2,G4double beta2,G4double d);
0284   G4double Uwash(G4double E, G4double Ecrit,G4double Freduction,G4double gamma);
0285   G4double frldm(G4double z,G4double n,G4double beta);
0286   G4double eflmac_profi(G4double a,G4double z);
0287   G4double gausshaz(G4int k, G4double xmoy, G4double sig);
0288   G4double haz(G4int k);
0289 
0290   /**
0291    * Level density parameters.
0292    */
0293   void densniv(G4double a, G4double z, G4double ee, G4double ef, G4double *dens, G4double bshell, G4double bs, G4double bk, 
0294            G4double *temp, G4int optshp, G4int optcol, G4double defbet, G4double *ecor, G4double jprf, G4int ifis,G4double *qr);
0295 
0296   /**
0297    * Calculation of the fission probability modified by transient time effects.
0298    */
0299   void part_fiss(G4double BET,G4double GP,G4double GF,G4double Y,G4double TAUF,G4double TS1,G4double TSUM,G4int *CHOICE,G4double ZF,G4double AF,G4double FT,G4double *T_LAPSE,G4double *GF_LOC);
0300 
0301   G4double func_trans(G4double TIME,G4double ZF,G4double AF,G4double BET,G4double Y,G4double FT,G4double T_0);
0302 
0303   /**
0304    * This subroutine calculates the ordinary legendre polynomials of   
0305    * order 0 to n-1 of argument x and stores them in the vector pl.    
0306    * They are calculated by recursion relation from the first two      
0307    * polynomials.                                                      
0308    * Written by A.J.Sierk  LANL  t-9  February, 1984                   
0309    */
0310   void lpoly(G4double x, G4int n, G4double pl[]);
0311 
0312   /**
0313    * This function will calculate the liquid-drop nuclear mass for spheri
0314    * configuration according to the preprint NUCLEAR GROUND-STATE        
0315    * MASSES and DEFORMATIONS by P. Mo"ller et al. from August 16, 1993 p.
0316    * All constants are taken from this publication for consistency.      
0317    */
0318   G4double eflmac(G4int ia, G4int iz, G4int flag, G4int optshp);
0319 
0320   /**
0321    * Procedure for calculating the pairing correction to the binding   
0322    * energy of a specific nucleus.
0323    */
0324   void appariem(G4double a, G4double z, G4double *del);
0325 
0326   /**
0327    * PROCEDURE FOR CALCULATING THE PARITY OF THE NUMBER N.             
0328    * RETURNS -1 IF N IS ODD AND +1 IF N IS EVEN                        
0329    */
0330   void parite(G4double n, G4double *par);
0331 
0332   /**
0333    * RISE TIME IN WHICH THE FISSION WIDTH HAS REACHED      
0334    * 90 PERCENT OF ITS FINAL VALUE
0335    */
0336   G4double tau(G4double bet, G4double homega, G4double ef, G4double t);
0337 
0338   /**
0339    * KRAMERS FAKTOR  - REDUCTION OF THE FISSION PROBABILITY       
0340    * INDEPENDENT OF EXCITATION ENERGY 
0341    */
0342   G4double cram(G4double bet, G4double homega);
0343 
0344   /**
0345    * CALCULATION OF THE SURFACE BS OR CURVATURE BK OF A NUCLEUS        
0346    * RELATIVE TO THE SPHERICAL CONFIGURATION                           
0347    * BASED ON  MYERS, DROPLET MODEL FOR ARBITRARY SHAPES               
0348    */
0349   G4double bipol(G4int iflag, G4double y);
0350 
0351   /**
0352    * THIS SUBROUTINE RETURNS THE BARRIER HEIGHT BFIS, THE              
0353    * GROUND-STATE ENERGY SEGS, IN MEV, AND THE ANGULAR MOMENTUM        
0354    * AT WHICH THE FISSION BARRIER DISAPPEARS, LMAX, IN UNITS OF        
0355    * H-BAR, WHEN CALLED WITH INTEGER AGUMENTS IZ, THE ATOMIC           
0356    * NUMBER, IA, THE ATOMIC MASS NUMBER, AND IL, THE ANGULAR           
0357    * MOMENTUM IN UNITS OF H-BAR. (PLANCK'S CONSTANT DIVIDED BY         
0358    * 2*PI).                                                            
0359    */
0360   void barfit(G4int iz, G4int ia, G4int il, G4double *sbfis, G4double *segs, G4double *selmax);
0361 
0362   /**
0363    * Calculation of decay widths for light particles.
0364    */
0365   G4double width(G4double AMOTHER,G4double ZMOTHER,G4double APART,G4double ZPART,G4double TEMP,G4double B1,G4double SB1,G4double EXC);
0366 
0367   /**
0368    * Calculation of penetration factors for light charged particles.
0369    */
0370   G4double pen(G4double A, G4double ap, G4double omega, G4double T);
0371 
0372   /**
0373    * Calculation of mean value of orbital angular momentum.
0374    */
0375   void lorb(G4double AMOTHER,G4double ADAUGHTER,G4double LMOTHER,G4double EEFINAL,G4double *LORBITAL,G4double *SIGMA_LORBITAL);
0376 
0377   /**
0378    * Calculation of BS and BK for the nuclear-level density.
0379    */
0380   void bsbkbc(G4double A,G4double Z,G4double *BS,G4double *BK,G4double *BC);
0381 
0382   /**
0383    * Special functions used for the emission of particles.
0384    */
0385   G4double erf(G4double x);
0386 
0387   G4double gammp(G4double a, G4double x);
0388 
0389   void gcf(G4double *gammcf,G4double a,G4double x,G4double gln);
0390 
0391   void gser(G4double *gamser,G4double a,G4double x,G4double gln);
0392 
0393   G4double fvmaxhaz(G4double T);
0394 
0395   G4double fvmaxhaz_neut(G4double x);
0396 
0397   /**
0398    * Random numbers.
0399    */
0400   void standardRandom(G4double *rndm, G4long *seed);
0401 
0402   /**
0403    * LOGARITHM OF THE GAMM FUNCTION
0404    */ 
0405   G4double gammln(G4double xx);
0406 
0407   /**
0408    * DISTRIBUTION DE MAXWELL
0409    */
0410   G4double fd(G4double E);
0411 
0412   /**
0413    *FONCTION INTEGRALE DE FD(E)
0414    */
0415   G4double f(G4double E);
0416 
0417   /**
0418    * tirage aleatoire dans une maxwellienne
0419    */
0420   G4double fmaxhaz(G4double T);
0421 
0422   /**
0423    * tirage aleatoire dans une maxwellienne
0424    */
0425   G4double fmaxhaz_old(G4double T);
0426 
0427   /**
0428    * Random generator according to the
0429      powerfunction y = x**(lambda) in the range from xmin to xmax
0430    */
0431   G4int IPOWERLIMHAZ(G4double lambda,G4int xmin,G4int xmax);
0432 
0433   /**
0434    *
0435    */
0436   G4double pace2(G4double a, G4double z);
0437 
0438   /**
0439    *
0440    */
0441   void guet(G4double *x_par, G4double *z_par, G4double *find_par);
0442 
0443   /**
0444    * Limits of existing nuclei
0445    */
0446   void isostab_lim(G4int z, G4int *nmin, G4int *nmax);
0447 
0448   /**
0449    * Fill the data array for INCL
0450    */
0451   void FillData(G4int IMULTBU,G4int IEV_TAB);
0452 
0453   /**
0454    * Separation energies of lambda
0455    */
0456   G4double gethyperseparation(G4double A, G4double Z, G4int ny);
0457 
0458   /**
0459    * Separation energies of for other particles for hypernuclei
0460    */
0461   G4double getdeltabinding(G4double a,G4int nblamb);
0462   G4double gethyperbinding(G4double A, G4double Z, G4int ny);
0463     
0464 public:
0465   // Utils
0466   G4int min(G4int a, G4int b);
0467   G4double min(G4double a, G4double b);
0468   G4int max(G4int a, G4int b);
0469   G4double max(G4double a, G4double b);
0470   G4double DSIGN(G4double a, G4double b);
0471   G4int ISIGN(G4int a, G4int b);
0472   G4int nint(G4double number);
0473   G4int secnds(G4int x);
0474   G4int mod(G4int a, G4int b);
0475   G4double dmod(G4double a, G4double b);
0476   G4double dint(G4double a);
0477   G4int idint(G4double a);
0478   G4int idnint(G4double value);
0479   G4double utilabs(G4double a);
0480   G4double dmin1(G4double a, G4double b, G4double c);
0481   G4Ec2sub* getFrldmTable() {
0482     return ec2sub;
0483   }
0484 
0485 private:
0486   G4int verboseLevel;
0487   G4int ilast;
0488   G4double T_freeze_out_in;
0489   G4int IEV_TAB_SSC;
0490   G4double BU_TAB[200][12],EV_TAB[200][6],EV_TAB_SSC[200][6];
0491   G4int gammaemission;
0492   G4double T_freeze_out;
0493   G4Pace *pace;
0494   G4Ald *ald;
0495   G4Eenuc *eenuc;
0496   G4Ec2sub *ec2sub;
0497   G4Ecld *ecld; 
0498   G4Mexp *masses;
0499   G4Fb *fb;
0500   G4Fiss *fiss;
0501   G4Opt *opt;
0502   G4Volant *volant;
0503   G4VarNtp *varntp;
0504   G4int Ainit,Zinit,Sinit;
0505 #ifndef ABLAXX_IN_GEANT4_MODE
0506   G4INCL::Config *theConfig;
0507 #endif
0508 };
0509 
0510 #endif