]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STARLIGHT/starlight/src/incoherentVMCrossSection.cpp
Update to trunk of hepforge
[u/mrichter/AliRoot.git] / STARLIGHT / starlight / src / incoherentVMCrossSection.cpp
CommitLineData
da32329d
AM
1///////////////////////////////////////////////////////////////////////////
2//
3// Copyright 2010
4//
5// This file is part of starlight.
6//
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.
11//
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.
16//
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/>.
19//
20///////////////////////////////////////////////////////////////////////////
21//
22// File and Version Information:
23// $Rev:: 45 $: revision of last commit
24// $Author:: bgrube $: author of last commit
25// $Date:: 2011-02-27 20:52:35 +0100 #$: date of last commit
26//
27// Description:
28//
29//
30//
31///////////////////////////////////////////////////////////////////////////
32
33
34#include <iostream>
35#include <fstream>
36#include <cmath>
37
38#include "starlightconstants.h"
39#include "incoherentVMCrossSection.h"
40
41
42using namespace std;
43using namespace starlightConstants;
44
45
46//______________________________________________________________________________
47incoherentVMCrossSection::incoherentVMCrossSection(const beamBeamSystem& bbsystem)
48 :photonNucleusCrossSection(bbsystem)
49{
50 _narrowYmax = inputParametersInstance.maxRapidity();
51 _narrowYmin = -1.0*_narrowYmax;
52 _narrowNumY = inputParametersInstance.nmbRapidityBins();
53 _Ep = inputParametersInstance.protonEnergy();
54}
55
56
57//______________________________________________________________________________
58incoherentVMCrossSection::~incoherentVMCrossSection()
59{ }
60
61
62//______________________________________________________________________________
63void
64incoherentVMCrossSection::crossSectionCalculation(const double) // _bwnormsave (unused)
65{
66 // This subroutine calculates the vector meson cross section assuming
67 // a narrow resonance. For reference, see STAR Note 386.
68
69 // double Av,Wgp,cs,cvma;
70 double W,dY;
71 double y1,y2,y12,ega1,ega2,ega12;
45d54d9a 72 // double y1lab,y2lab,y12lab;
da32329d
AM
73 // double t,tmin,tmax;
74 double csgA1,csgA2,csgA12,int_r,dR,rate;
75 double Wgp,csVN,csVA;
45d54d9a 76 double Wgpm;
da32329d
AM
77 double tmp;
78 // double ax,bx;
79 double Eth;
80 int J,NY;
81 // int K,NGAUSS;
82
83 NY = _narrowNumY;
84 dY = (_narrowYmax-_narrowYmin)/double(NY);
85
86 cout<<" Using Narrow Resonance ..."<<endl;
87
88 W = getChannelMass();
89 Eth=0.5*(((W+protonMass)*(W+protonMass)-
90 protonMass*protonMass)/(_Ep+sqrt(_Ep*_Ep-protonMass*protonMass)));
91
92 cout<<" gamma+nucleon Threshold: "<<Eth<<endl;
93 int_r=0.;
94
95 tmp = 0.0;
96
97 for(J=0;J<=(NY-1);J++){
98
45d54d9a 99 // This is the fdefault
da32329d
AM
100 y1 = _narrowYmin + double(J)*dY;
101 y2 = _narrowYmin + double(J+1)*dY;
102 y12 = 0.5*(y1+y2);
103
104 ega1 = 0.5*W*exp(y1);
105 ega2 = 0.5*W*exp(y2);
106 ega12 = 0.5*W*exp(y12);
45d54d9a 107
108 // This is for checking things in the lab frame
109 // y1lab = _narrowYmin + double(J)*dY;
110 // y2lab = _narrowYmin + double(J+1)*dY;
111 // y12lab = 0.5*(y1lab+y2lab);
112
113 // p+Pb
114 // y1 = y1lab + 0.465;
115 // y2 = y2lab + 0.465;
116 // y12 = y12lab + 0.465;
117 // ega1 = 0.5*W*exp(y1);
118 // ega2 = 0.5*W*exp(y2);
119 // ega12 = 0.5*W*exp(y12);
120
121 // Pb+p
122 // y1 = y1lab - 0.465;
123 // y2 = y2lab - 0.465;
124 // y12 = y12lab - 0.465;
125 // ega1 = 0.5*W*exp(-y1);
126 // ega2 = 0.5*W*exp(-y2);
127 // ega12 = 0.5*W*exp(-y12);
128
da32329d
AM
129
130 if(ega1 < Eth)
131 continue;
132 if(ega2 > maxPhotonEnergy())
133 continue;
134
135 // First point
136 Wgp = sqrt(2.*ega1*(_Ep+sqrt(_Ep*_Ep-starlightConstants::protonMass*starlightConstants::protonMass))
137 +starlightConstants::protonMass*starlightConstants::protonMass);
138 csVN = sigma_N(Wgp);
139 csVA = sigma_A(csVN);
140 csgA1 = (csVA/csVN)*sigmagp(Wgp);
141 if( getbbs().beam1().A() == 1 || getbbs().beam2().A()==1 ){
142 csgA1 = sigmagp(Wgp);
143 }
144
145 // Middle point
146 Wgp = sqrt(2.*ega12*(_Ep+sqrt(_Ep*_Ep-starlightConstants::protonMass*starlightConstants::protonMass))
147 +starlightConstants::protonMass*starlightConstants::protonMass);
45d54d9a 148 Wgpm = Wgp;
da32329d
AM
149 csVN = sigma_N(Wgp);
150 csVA = sigma_A(csVN);
151 csgA12 = (csVA/csVN)*sigmagp(Wgp);
152 if( getbbs().beam1().A() == 1 || getbbs().beam2().A()==1 ){
153 csgA12 = sigmagp(Wgp);
154 }
155
156 // Last point
157 Wgp = sqrt(2.*ega2*(_Ep+sqrt(_Ep*_Ep-starlightConstants::protonMass*starlightConstants::protonMass))
158 +starlightConstants::protonMass*starlightConstants::protonMass);
159 csVN = sigma_N(Wgp);
160 csVA = sigma_A(csVN);
161 csgA2 = (csVA/csVN)*sigmagp(Wgp);
162 if( getbbs().beam1().A() == 1 || getbbs().beam2().A()==1 ){
163 csgA2 = sigmagp(Wgp);
164 }
165
166 dR = ega1*photonFlux(ega1)*csgA1;
167 dR = dR + 4*ega12*photonFlux(ega12)*csgA12;
168 dR = dR + ega2*photonFlux(ega2)*csgA2;
169 dR = dR*(dY/6.);
170
171 // cout<<" y: "<<y12<<" egamma: "<<ega12<<" flux: "<<photonFlux(ega12)<<" sigma_gA: "<<10000000.*csgA12<<" dsig/dy (microb): "<<10000.*dR/dY<<endl;
45d54d9a 172 // cout<<" y: "<<y12lab<<" egamma: "<<ega12<<" flux: "<<ega12*photonFlux(ega12)<<" W: "<<Wgpm<<" Wflux: "<<Wgpm*photonFlux(ega12)<<" sigma_gA (nb): "<<10000000.*csgA12<<" dsig/dy (microb): "<<10000.*ega12*photonFlux(ega12)*csgA12<<endl;
da32329d
AM
173
174 // The 2 accounts for the 2 beams
175 if(getbbs().beam1().A()==getbbs().beam2().A()){
176 dR = 2.*dR;
177 }
178
179 int_r = int_r+dR;
180
181 }
182 rate=luminosity()*int_r;
183 cout<<" Cross section (mb): " <<10.*int_r<<endl;
184}