File indexing completed on 2024-09-27 07:03:42
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <cmath>
0021 #include "spectrumprotonnucleus.h"
0022 #include "beambeamsystem.h"
0023 #include "beam.h"
0024 #include <iostream>
0025
0026 spectrumProtonNucleus::spectrumProtonNucleus(const randomGenerator &randy, beamBeamSystem *b) : spectrum(randy,b)
0027 {
0028 _bMin = 4.0;
0029 }
0030
0031 bool spectrumProtonNucleus::generateBreakupProbabilities()
0032 {
0033 int nbbins = _nBbins;
0034
0035 double b_min = _bMin;
0036
0037 double binc = exp((log(_bMax/_bMin))/(double)_nBbins);
0038
0039 double b = b_min;
0040
0041 _probOfBreakup.resize(nbbins);
0042
0043 for (int i = 0; i < nbbins; i++)
0044 {
0045 _beamBeamSystem->beam1().Z() > 1 ? _probOfBreakup[i] = exp(-getNucleonNucleonSigma()*_beamBeamSystem->beam1().thickness(b)) :
0046 _beamBeamSystem->beam2().Z() > 1 ? _probOfBreakup[i] = exp(-getNucleonNucleonSigma()*_beamBeamSystem->beam2().thickness(b)) :
0047 b < 7.76 ? _probOfBreakup[i] = 0 : _probOfBreakup[i] = 1;
0048
0049 b = b*binc;
0050 }
0051
0052 return true;
0053 }
0054
0055 double spectrumProtonNucleus::getSigma(double ) const
0056 {
0057 return 0.11;
0058 }
0059
0060