///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
-// $Rev:: 164 $: revision of last commit
-// $Author:: odjuvsla $: author of last commit
-// $Date:: 2013-10-06 16:18:08 +0200 #$: date of last commit
+// $Rev:: 176 $: revision of last commit
+// $Author:: jseger $: author of last commit
+// $Date:: 2014-06-20 22:15:20 +0200 #$: date of last commit
//
// Description:
// Added incoherent factor to luminosity table output--Joey
OldNorm = Normalize;
//Writing out our input parameters+(w,y)grid+diff._lum.
- wylumfile << inputParametersInstance.parameterValueKey() << endl;
+ // wylumfile << inputParametersInstance.parameterValueKey() << endl;
wylumfile << beam1().Z() <<endl;
wylumfile << beam1().A() <<endl;
wylumfile << beam2().Z() <<endl;
wylumfile << inputParametersInstance.interferenceStrength() <<endl;
wylumfile << inputParametersInstance.coherentProduction() <<endl;
wylumfile << inputParametersInstance.incoherentFactor() <<endl;
- wylumfile << inputParametersInstance.deuteronSlopePar() <<endl;
+ wylumfile << starlightConstants::deuteronSlopePar <<endl;
wylumfile << inputParametersInstance.maxPtInterference() <<endl;
wylumfile << inputParametersInstance.nmbPtBinsInterference() <<endl;
for (unsigned int i = 0; i < _nWbins; ++i) {
wylumfile << xlum <<endl;
}
Normalize = OldNorm;
- }
+ }
}
else if(inputParametersInstance.xsecCalcMethod() == 1) {
+ /*
const int nthreads = inputParametersInstance.nThreads();
pthread_t threads[nthreads];
difflumiargs args[nthreads];
wylumfile << inputParametersInstance.parameterValueKey() << endl;
wylumfile.close();
+ */
+
+ for (unsigned int i = 0; i < _nWbins; i++) { //For each (w,y) pair, calculate the diff. _lum
+ printf("Calculating cross section: %2.0f %% \r", float(i)/float(_nWbins)*100);
+ fflush(stdout);
+ for (unsigned int j = 0; j < _nYbins; j++) {
+ xlum = w[i] * D2LDMDY(w[i],y[j]); //Convert photon flux dN/dW to Lorentz invariant photon number WdN/dW
+ wylumfile << xlum <<endl;
+ // cout<<" i: "<<i<<" j: "<<j<<" W*dN/dW: "<<xlum<<endl;
+ }
+ }
+ }
return;
}