]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TFluka/Fdblprc.h
Improved online calibration algorithms, Energy and Dead channel histograms updated
[u/mrichter/AliRoot.git] / TFluka / Fdblprc.h
index 7fdf3bfb349c66a8e7d6bfd4c0e5eb2bb6de34d5..37949b916dd1b244b8dd551d8d53c37c4d27129b 100644 (file)
@@ -65,9 +65,10 @@ extern "C" {
 //*         loflts = set to true for special off-line testing of speci- *
 //*                  fic routines                                       *
 //*         lusrin = set to true if the user dependent initialization   *
-//*                  routine usrini has been called at least onec       *
+//*                  routine usrini has been called at least once       *
 //*         lnmgeo = set to true for a name-base geometry input         *
 //*         lnminp = set to true for a name-base fluka input            *
+//*         Lfrfmt = set to true for a free-format based Fluka input    *
 //*         lfdrtr = set to true for going in/out feeder/flukam at each *
 //*                  event                                              *
 //*                                                                     *
@@ -91,7 +92,7 @@ const Double_t onemns = 0.999999999999999e+00;
 const Double_t onepls = 1.000000000000001e+00;
 const Double_t csnnrm = 2.0e-15;
 const Double_t dmxtrn = 1.0e+08;
-const Double_t rhflmn = 1.0e-06;
+const Double_t rhflmn = 1.0e-10;
 //*
 //*======================================================================*
 //*======================================================================*
@@ -132,6 +133,7 @@ const Double_t rhflmn = 1.0e-06;
 //*         twothi = 2/3                                                 *
 //*         thrfou = 3/4                                                 *
 //*         thrtwo = 3/2                                                 *
+//*         two2o3 = 2^2/3                                               *
 //*         pipipi = circumference / diameter                            *
 //*         twopip = 2 x pipipi                                          *
 //*         pip5o2 = 5/2 x pipipi                                        *
@@ -150,55 +152,60 @@ const Double_t rhflmn = 1.0e-06;
 //*         sqrsix = square root of  6                                   *
 //*         sqrsev = square root of  7                                   *
 //*         sqrt12 = square root of 12                                   *
+//*         s2fwhm = 2 x square root of 2 x logarithm of 2               *
 //*                                                                      *
 //*----------------------------------------------------------------------*
 //*
-const Float_t  zersng = 0.e+00;
-const Double_t zerzer = 0.e+00;
-const Double_t oneone = 1.e+00;
-const Double_t twotwo = 2.e+00;
-const Double_t thrthr = 3.e+00;
-const Double_t foufou = 4.e+00;
-const Double_t fivfiv = 5.e+00;
-const Double_t sixsix = 6.e+00;
-const Double_t sevsev = 7.e+00;
-const Double_t eigeig = 8.e+00;
-const Double_t aninen = 9.e+00;
-const Double_t tenten = 10.e+00;
-const Double_t eleven = 11.e+00;
-const Double_t twelve = 12.e+00;
-const Double_t fiften = 15.e+00;
-const Double_t sixten = 16.e+00;
-const Double_t hlfhlf = 0.5e+00;
-const Double_t onethi = oneone/thrthr;
-const Double_t onefou = oneone/foufou;
-const Double_t onefiv = oneone/fivfiv;
-const Double_t onesix = oneone/sixsix;
-const Double_t onesev = oneone/sevsev;
-const Double_t oneeig = oneone/eigeig;
-const Double_t twothi = twotwo/thrthr;
-const Double_t thrfou = thrthr/foufou;
-const Double_t thrtwo = thrthr/twotwo;
-const Double_t pipipi = 3.141592653589793238462643383279e+00;
-const Double_t twopip = 6.283185307179586476925286766559e+00;
-const Double_t pip5o2 = 7.853981633974483096156608458199e+00;
-const Double_t pipisq = 9.869604401089358618834490999876e+00;
-const Double_t pihalf = 1.570796326794896619231321691640e+00;
-const Double_t erfa00 = 0.886226925452758013649083741671e+00;
-const Double_t sqrtpi = 1.772453850905516027298167483341e+00;
-const Double_t sqtwpi = 2.506628274631000502415765284811e+00;
-const Double_t eulero = 0.577215664901532860606512e+00;
-const Double_t eulexp = 1.781072417990197985236504e+00;
-const Double_t eullog = -0.5495393129816448223376619e+00;
-const Double_t e1m2eu = 0.8569023337737540831433017e+00;
-const Double_t eneper = 2.718281828459045235360287471353e+00;
-const Double_t sqrent = 1.648721270700128146848650787814e+00;
-const Double_t sqrtwo = 1.414213562373095048801688724210e+00;
-const Double_t sqrthr = 1.732050807568877293527446341506e+00;
-const Double_t sqrfiv = 2.236067977499789696409173668731e+00;
-const Double_t sqrsix = 2.449489742783178098197284074706e+00;
-const Double_t sqrsev = 2.645751311064590590501615753639e+00;
-const Double_t sqrt12 = 3.464101615137754587054892683012e+00;
+    const Float_t  zersng = 0.e+00;
+    const Double_t zerzer = 0.e+00;
+    const Double_t oneone = 1.e+00;
+    const Double_t twotwo = 2.e+00;
+    const Double_t thrthr = 3.e+00;
+    const Double_t foufou = 4.e+00;
+    const Double_t fivfiv = 5.e+00;
+    const Double_t sixsix = 6.e+00;
+    const Double_t sevsev = 7.e+00;
+    const Double_t eigeig = 8.e+00;
+    const Double_t aninen = 9.e+00;
+    const Double_t tenten = 10.e+00;
+    const Double_t eleven = 11.e+00;
+    const Double_t twelve = 12.e+00;
+    const Double_t fiften = 15.e+00;
+    const Double_t sixten = 16.e+00;
+    const Double_t hlfhlf = 0.5e+00;
+    const Double_t onethi = oneone/thrthr;
+    const Double_t onefou = oneone/foufou;
+    const Double_t onefiv = oneone/fivfiv;
+    const Double_t onesix = oneone/sixsix;
+    const Double_t onesev = oneone/sevsev;
+    const Double_t oneeig = oneone/eigeig;
+    const Double_t twothi = twotwo/thrthr;
+    const Double_t thrfou = thrthr/foufou;
+    const Double_t thrtwo = thrthr/twotwo;
+    const Double_t fouthr = foufou/thrthr;    
+    const Double_t pipipi = 3.141592653589793238462643383279e+00;
+    const Double_t two2o3 = 1.587401051968199e+00; // 2006.3
+    const Double_t twopip = 6.283185307179586476925286766559e+00;
+    const Double_t pip5o2 = 7.853981633974483096156608458199e+00;
+    const Double_t pipisq = 9.869604401089358618834490999876e+00;
+    const Double_t pihalf = 1.570796326794896619231321691640e+00;
+    const Double_t erfa00 = 0.886226925452758013649083741671e+00;
+    const Double_t sqrtpi = 1.772453850905516027298167483341e+00;
+    const Double_t sqtwpi = 2.506628274631000502415765284811e+00;
+    const Double_t eulero = 0.577215664901532860606512e+00;
+    const Double_t eulexp = 1.781072417990197985236504e+00;
+    const Double_t eullog = -0.5495393129816448223376619e+00;
+    const Double_t e1m2eu = 0.8569023337737540831433017e+00;
+    const Double_t eneper = 2.718281828459045235360287471353e+00;
+    const Double_t sqrent = 1.648721270700128146848650787814e+00;
+    const Double_t sqrtwo = 1.414213562373095048801688724210e+00;
+    const Double_t sqrthr = 1.732050807568877293527446341506e+00;
+    const Double_t sqrfiv = 2.236067977499789696409173668731e+00;
+    const Double_t sqrsix = 2.449489742783178098197284074706e+00;
+    const Double_t sqrsev = 2.645751311064590590501615753639e+00;
+    const Double_t sqrt12 = 3.464101615137754587054892683012e+00;
+    const Double_t s2fwhm = 2.354820045030949e+00;
+    const Double_t twolog = 0.693147180559945309417232121458e+00;
 //*
 //*======================================================================*
 //*======================================================================*
@@ -217,11 +224,15 @@ const Double_t sqrt12 = 3.464101615137754587054892683012e+00;
 //*         plckbr = reduced planck constant (erg s)                     *
 //*         elccgs = elementary charge (cgs unit)                        *
 //*         elcmks = elementary charge (mks unit)                        *
+//*         epsil0 = vacuum dielectric constant (MKS unit)               *
 //*         amugrm = atomic mass unit (g)                                *
 //*         ammumu = muon    mass (amu)                                  *
 //*         amprmu = proton  mass (amu)                                  *
 //*         amnemu = neutron mass (amu)                                  *
-//*                                                                      *
+//*                                                                      * //*          Note:                                                       *
+//*          e[MKS]^2/ (4 pi epsilon0 hbar[MKS] c[MKS]) = alpha = 1/137  *
+//*          e[CGS]^2/ (hbar[CGS] c[CGS]) = alpha = 1/137                *
+//*          with c[MKs] = 10^-2 c[CGS], hbar[MKS] = 10^-7 hbar[CGS]     *
 //*   derived constants:                                                 *
 //*                                                                      *
 //*         alpfsc = fine structure constant  = e^2/(hbar c) (cgs units) *
@@ -253,6 +264,7 @@ const Double_t sqrt12 = 3.464101615137754587054892683012e+00;
 //*         sin2tw = sin^2 theta_weinberg                                *
 //*         prmgnm = proton  magnetic moment (magneton)                  *
 //*         anmgnm = neutron magnetic moment (magneton)                  *
+//*         s0thms = sigma_0 Thomson, 8/3 pi r_e^2 (mb)                  *
 //*                                                                      *
 //*   astronomical constants:                                            *
 //*                                                                      *
@@ -269,6 +281,7 @@ const Double_t sqrt12 = 3.464101615137754587054892683012e+00;
 //*         raddeg = from radians to degrees                             *
 //*         degrad = from degrees to radians                             *
 //*         gevomg = from (photon) energy [gev] in 2pi x frequency [s^-1]*
+//*         cmq2mb = from square centimetres to millibarns               *
 //*                                                                      *
 //*   useful constants:                                                  *
 //*                                                                      *
@@ -285,35 +298,36 @@ const Double_t sqrt12 = 3.464101615137754587054892683012e+00;
 //*                                                                      *
 //*----------------------------------------------------------------------*
 //*
-const Double_t clight = 2.99792458e+10;
-const Double_t avogad = 6.0221367e+23;
-const Double_t boltzm = 1.380658e-23;
-const Double_t amelgr = 9.1093897e-28;
-const Double_t plckbr = 1.05457266e-27;
-const Double_t elccgs = 4.8032068e-10;
-const Double_t elcmks = 1.60217733e-19;
-const Double_t amugrm = 1.6605402e-24;
-const Double_t ammumu = 0.113428913e+00;
-const Double_t amprmu = 1.007276470e+00;
-const Double_t amnemu = 1.008664904e+00;
-//*     parameter ( alpfsc = 1.e+00 / 137.035989561e+00 )
-//*     parameter ( fscto2 = alpfsc * alpfsc )
-//*     parameter ( fscto3 = fscto2 * alpfsc )
-//*     parameter ( fscto4 = fscto3 * alpfsc )
+    const Double_t clight = 2.99792458e+10;
+    const Double_t avogad = 6.0221367e+23;
+    const Double_t boltzm = 1.380658e-23;
+    const Double_t amelgr = 9.1093897e-28;
+    const Double_t plckbr = 1.05457266e-27;
+    const Double_t elccgs = 4.8032068e-10;
+    const Double_t elcmks = 1.60217733e-19;
+    const Double_t epsil0 = 8.854187817e-12; // 2006.3
+    const Double_t amugrm = 1.6605402e-24;
+    const Double_t ammumu = 0.113428913e+00;
+    const Double_t amprmu = 1.007276470e+00;
+    const Double_t amnemu = 1.008664904e+00;
+//* const Double_t alpfsc = 1.e+00 / 137.035989561e+00
+//* const Double_t fscto2 = alpfsc * alpfsc
+//* const Double_t fscto3 = fscto2 * alpfsc
+//* const Double_t fscto4 = fscto3 * alpfsc
 //*    it is important to set the electron mass exactly with the same
 //*    rounding as in the mass tables, so use the explicit expression
-//*     parameter ( amelct = 1.e-16 * amelgr * clight * clight / elcmks )
+//* const Double_t amelct = 1.e-16 * amelgr * clight * clight / elcmks
 //*    it is important to set the amu mass exactly with the same
 //*    rounding as in the mass tables, so use the explicit expression
-//*     parameter ( amugev = 1.e-16 * amugrm * clight * clight / elcmks )
+//* const Double_t amugev = 1.e-16 * amugrm * clight * clight / elcmks
 //*    it is important to set the muon,proton,neutron masses exactly with
 //*    the same rounding as in the mass tables, so use the explicit
 //*    expression
-//*     parameter ( ammuon = ammumu * amugev )
-//*     parameter ( amprtn = amprmu * amugev )
-//*     parameter ( amntrn = amnemu * amugev )
-//*     parameter ( rclsel = elccgs * elccgs / clight / clight / amelgr )
-//*     parameter ( bltzmn = boltzm / elcmks * 1.e-09 )
+//* const Double_t ammuon = ammumu * amugev
+//* const Double_t amprtn = amprmu * amugev
+//* const Double_t amntrn = amnemu * amugev
+//* const Double_t rclsel = elccgs * elccgs / clight / clight / amelgr
+//* const Double_t bltzmn = boltzm / elcmks * 1.e-09
 const Double_t alpfsc = 7.2973530791728595e-3;
 const Double_t fscto2 = 5.3251361962113614e-5;
 const Double_t fscto3 = 3.8859399018437826e-7;
@@ -326,8 +340,9 @@ const Double_t amprtn = 0.93827231e+00;
 const Double_t amntrn = 0.93956563e+00;
 const Double_t amdeut = 1.87561339e+00;
 const Double_t amalph = 3.72738025692891e+00;
-const Double_t cougfm = elccgs*elccgs/elcmks*(1.e-7)*(1.e+1)*(1.e-9);
+const Double_t cougfm = elccgs*elccgs/elcmks*(1.e-7)*(1.e+13)*(1.e-9);
 const Double_t rclsel = 2.8179409183694872e-13;
+const Double_t alamb0 = twotwo * pipipi * rclsel / alpfsc;
 const Double_t bltzmn = 8.617385e-14;
 const Double_t a0bohr = plabrc/alpfsc/amelct;
 const Double_t gfohb3 = 1.16639e-5;
@@ -341,34 +356,44 @@ const Double_t gevmev = 1.0e+3;
 const Double_t ev2gev = 1.0e-9;
 const Double_t gev2ev = 1.0e+9;
 const Double_t emvgev = 1.0e-3;
+const Double_t cmq2mb = 1.0e+27;
+const Double_t fmb2ba = 1.0e-3;
+const Double_t bar2mb = 1.0e+3;
+const Double_t fmb2fs = 1.0e-1;
+const Double_t fms2mb = 1.0e+1;
 const Double_t algvmv = 6.90775527898214e+00;
 const Double_t raddeg = (180.e+00)/pipipi;
 const Double_t degrad = pipipi/(180.e+00);
 const Double_t gevomg = clight*(1.e+13)/plabrc;
+const Double_t s0thms = eigeig / thrthr * pipipi * rclsel * rclsel * cmq2mb;
 //*  old Fermi-Thomas parametrization of atomic binding energies:
-//*     parameter ( fertho = 15.73       e-9 )
-//*     parameter ( expebn = 7.e+00 / 3.e+00  )
-//*     parameter ( bexc12 = fertho * 65.41634134195703e+00 )
+//*     const Double_t fertho = 15.73       e-9
+//*     const Double_t expebn = 7.e+00 / 3.e+00
+//*     const Double_t bexc12 = fertho * 65.41634134195703e+00
 //*  new Fermi-Thomas parametrization of atomic binding energies:
 const Double_t fertho = 14.33e-9;
 const Double_t expebn = 2.39e+00;
 const Double_t bexc12 = fertho*72.40715579499394e+00;
 const Double_t amunmu = hlfhlf*amelct-bexc12/12.e+00;
 const Double_t amuc12 = amugev-amunmu;
+//*  Old MeV units:
+const Double_t amemev = gevmev * amelct;
 //*
 
 typedef struct {
-   Int_t    lfluka;
-   Int_t    lgbias;
-   Int_t    lgbana;
-   Int_t    lflgeo;
-   Int_t    loflts;
-   Int_t    lusrin;
-   Int_t    lnmgeo;
-   Int_t    lnminp;
-   Int_t    lfdrtr;
-   Int_t    kflgeo;
-   Int_t    kfldnr;
+    Int_t    lfluka;
+    Int_t    lgbias;
+    Int_t    lgbana;
+    Int_t    lflgeo;
+    Int_t    loflts;
+    Int_t    lusrin;
+    Int_t    lusrgl; // 2006.3
+    Int_t    lnmgeo;
+    Int_t    lnminp;
+    Int_t    lfrfmt;
+    Int_t    lfdrtr;
+    Int_t    kflgeo;
+    Int_t    kfldnr;
 } globalCommon;
 #define GLOBAL COMMON_BLOCK(GLOBAL,global)
 COMMON_BLOCK_DEF(globalCommon,GLOBAL);