/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/KalFitAlg/KalFitAlg-00-07-55-p03/src/KalFitMaterial.cxx

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------
00002 // File from KalFit module
00003 //
00004 // Filename : KalFitMaterial.cc
00005 //------------------------------------------------------------------------
00006 // Description : 
00007 // Material is a class which describes the properties of a given material, 
00008 // for instance atomic number, atomic weight and so on.
00009 //------------------------------------------------------------------------
00010 // Modif :
00011 //------------------------------------------------------------------------
00012 #include <math.h>
00013 #include <iostream>
00014 #include "KalFitAlg/KalFitMaterial.h"
00015 
00016 using namespace std;
00017 
00018 KalFitMaterial::KalFitMaterial(double z, double a, double i,
00019                            double rho, double x0)
00020   : x0_(x0), z_(z)  // rho is the density, z is the atomic number, a is the weight
00021                     // i is mean excitation potention, x0 is the radiation length
00022 {
00023   rza_ = rho * z / a;
00024   isq_  = i * i * 1e-18;
00025 }
00026 
00027 KalFitMaterial::KalFitMaterial(const KalFitMaterial& mat)
00028   : rza_(mat.rza_), isq_(mat.isq_),
00029     x0_(mat.x0_), z_(mat.z_)
00030 {
00031    
00032 }
00033 
00034 // calculate dE
00035 double KalFitMaterial::dE(double mass, double path,
00036                         double p) const
00037 {
00038   if (!(p>0))
00039     return 0;
00040  
00041   //cout<<"this material:x0 "<< x0_ << " Z  " << z_ << endl
00042   //    <<"  rho*Z/A  "<< rza_ << " I^2 "<< isq_ << endl;
00043 
00044   
00045   const double Me = 0.000510999;
00046   double psq = p * p;
00047   double bsq = psq / (psq + mass * mass);
00048   double esq = psq / (mass * mass);
00049 
00050   double s = Me / mass;
00051   double w = (4 * Me * esq
00052               / (1 + 2 * s * sqrt(1 + esq)
00053                  + s * s));
00054 
00055   // Density correction :
00056   double cc, x0;
00057   cc = 1+2*log(sqrt(isq_)/(28.8E-09*sqrt(rza_)));
00058   if (cc < 5.215) 
00059     x0 = 0.2;
00060   else
00061     x0 = 0.326*cc-1.5;
00062   double x1(3), xa(cc/4.606), aa;
00063   aa = 4.606*(xa-x0)/((x1-x0)*(x1-x0)*(x1-x0));
00064   double delta(0);
00065   double x(log10(sqrt(esq)));
00066   if (x > x0){    
00067     delta = 4.606*x-cc;
00068     if (x < x1) delta=delta+aa*(x1-x)*(x1-x)*(x1-x);
00069   }
00070 
00071  // Shell correction :  
00072   float f1, f2, f3, f4, f5, ce;
00073   f1 = 1/esq;
00074   f2 = f1*f1;
00075   f3 = f1*f2;
00076   f4 = (f1*0.42237+f2*0.0304-f3*0.00038)*1E12;
00077   f5 = (f1*3.858-f2*0.1668+f3*0.00158)*1E18;
00078   ce = f4*isq_+f5*isq_*sqrt(isq_);
00079 
00080   return (0.0001535 * rza_ / bsq
00081           * (log(Me * esq * w / isq_)
00082              - 2 * bsq-delta-2.0*ce/z_)) * path;
00083 }
00084 
00085 
00086 // calculate Multiple Scattering angle
00087 double KalFitMaterial::mcs_angle(double mass, double path,
00088                                double p) const
00089 {
00090   //cout<<"this material:x0 "<< x0_ << " Z  " << z_ << endl
00091   //    <<"  rho*Z/A  "<< rza_ << " I^2 "<< isq_ << endl;
00092   double t = path / x0_;
00093   double psq = p*p;
00094   return 0.0136 * sqrt(t * (mass*mass + psq)) / psq
00095     * (1 + 0.038 * log(t));
00096 }
00097 
00098 // calculate the RMS of straggling for the energy loss (del_E) :
00099 double KalFitMaterial::del_E(double mass, double path,
00100                            double p) const
00101 {
00102   double sigma0_2 = 0.1569*rza_*path;
00103 
00104   if (sigma0_2<0) return 0;
00105 
00106   double psq = p * p;
00107   double bsq = psq / (psq + mass * mass);
00108 
00109   // Correction for relativistic particles :
00110   double sigma_2 = sigma0_2*(1-0.5*bsq)/(1-bsq);
00111 
00112   if (sigma_2<0) return 0;
00113 
00114   // Return sigma in GeV !!
00115   return sqrt(sigma_2)*0.001;
00116 
00117 }

Generated on Tue Nov 29 23:13:24 2016 for BOSS_7.0.2 by  doxygen 1.4.7