1 ///////////////////////////////////////////////////////////////////////////
5 // This file is part of starlight.
7 // starlight is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // starlight is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with starlight. If not, see <http://www.gnu.org/licenses/>.
20 ///////////////////////////////////////////////////////////////////////////
22 // File and Version Information:
23 // $Rev:: 164 $: revision of last commit
24 // $Author:: odjuvsla $: author of last commit
25 // $Date:: 2013-10-06 16:18:08 +0200 #$: date of last commit
31 ///////////////////////////////////////////////////////////////////////////
38 #include "starlightconstants.h"
39 #include "inputParameters.h"
40 #include "reportingUtils.h"
46 using namespace starlightConstants;
48 //______________________________________________________________________________
49 beam::beam(const int Z,
51 const double bdeuteron,
52 const bool dAuCoherentProduction)
56 dAuCoherentProduction)
57 ,_beamLorentzGamma(inputParametersInstance.beamLorentzGamma())
62 //______________________________________________________________________________
67 //______________________________________________________________________________
68 double beam::photonFlux(const double impactparameter,
69 const double photonEnergy) const
71 // function for the calculation of the "photon density".
72 // photonFlux = number of photons / (energy * area)
73 // assume beta = 1 and gamma >> 1, i.e. neglect the (1 / gamma^2) * K_0(x) term
76 = (impactparameter * photonEnergy) / (_beamLorentzGamma * hbarc);
78 printWarn << "X = " << X << endl;
80 const double factor1 = (double(Z() * Z()) * alpha) / (pi * pi);
81 const double factor2 = 1. / (photonEnergy * impactparameter * impactparameter);
82 const double bessel = bessel::dbesk1(X);
83 const double factor3 = X * X * bessel * bessel;
85 return factor1 * factor2 * factor3;