Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-01 07:07:25

0001 ///////////////////////////////////////////////////////////////////////////
0002 //
0003 //    Copyright 2010
0004 //
0005 //    This file is part of starlight.
0006 //
0007 //    starlight is free software: you can redistribute it and/or modify
0008 //    it under the terms of the GNU General Public License as published by
0009 //    the Free Software Foundation, either version 3 of the License, or
0010 //    (at your option) any later version.
0011 //
0012 //    starlight is distributed in the hope that it will be useful,
0013 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
0014 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0015 //    GNU General Public License for more details.
0016 //
0017 //    You should have received a copy of the GNU General Public License
0018 //    along with starlight. If not, see <http://www.gnu.org/licenses/>.
0019 //
0020 ///////////////////////////////////////////////////////////////////////////
0021 //
0022 // File and Version Information:
0023 // $Rev:: 259                         $: revision of last commit
0024 // $Author:: jseger                   $: author of last commit
0025 // $Date:: 2016-04-19 01:58:25 +0100 #$: date of last commit
0026 //
0027 // Description:
0028 //
0029 //
0030 //
0031 ///////////////////////////////////////////////////////////////////////////
0032 
0033 
0034 #include <iostream>
0035 #include <fstream>
0036 #include <cmath>
0037 
0038 #include "starlightconstants.h"
0039 #include "reportingUtils.h"
0040 #include "bessel.h"
0041 #include "beam.h"
0042 
0043 
0044 using namespace std;
0045 using namespace starlightConstants;
0046 
0047 //______________________________________________________________________________
0048 beam::beam(const int              Z,
0049            const int              A,
0050        const int          productionMode,
0051        const double       beamLorentzGamma):
0052   nucleus(Z, A, productionMode), _beamLorentzGamma(beamLorentzGamma)
0053 { }
0054 
0055 
0056 //______________________________________________________________________________
0057 beam::~beam()
0058 { }
0059 
0060 
0061 //______________________________________________________________________________
0062 double beam::photonDensity(const double impactparameter, 
0063                         const double photonEnergy) const
0064 {
0065   // function for the calculation of the "photon density".
0066   // photonFlux = number of photons / (energy * area)
0067   // assume beta = 1 and gamma >> 1, i.e. neglect the (1 / gamma^2) * K_0(x) term
0068   
0069   const double X
0070     = (impactparameter * photonEnergy) / (_beamLorentzGamma * starlightConstants::hbarc);
0071   if (X <= 0) 
0072       printWarn << "X = " << X << endl;
0073   const double factor1 = (double(Z() * Z()) * starlightConstants::alpha) / (starlightConstants::pi * starlightConstants::pi);  
0074   const double factor2 = 1. / (photonEnergy * impactparameter * impactparameter);
0075   const double bessel  = bessel::dbesk1(X);
0076   const double factor3 = X * X * bessel * bessel;
0077 
0078   return factor1 * factor2 * factor3;
0079 }
0080