p;
for( int iQ2 = 0 ; iQ2 < _ReadInputnumQ2+3 ; ++iQ2){
if(iQ2 == 0 ){
EQlumfile >> integral;
if( integral > integrated_max)
integrated_max = integral;
}
else{
double temp;
EQlumfile >> temp;
p.push_back(temp);
//cout< 2 && p[iQ2-1] > _g_EQ2max){
_g_EQ2max = p[iQ2-1];
}
}
- for( uint iQ2=2; iQ2 < p.size(); ++iQ2)
+ for( unsigned int iQ2=2; iQ2 < p.size(); ++iQ2)
p[iQ2] = p[iQ2]/_g_EQ2max;
_g_EQ2array->push_back(std::pair< double, std::vector >(integral,p));
}
for( std::vector< std::pair > >::iterator it =_g_EQ2array->begin() ; it != _g_EQ2array->end(); ++it){
//cout<first<first = it->first/integrated_max;
//cout<<"Now"<first< >::iterator it =_g_EQ2array->begin() ; it != _g_EQ2array->end(); ++it){
std::string key = it->first;
if(key=="")
continue;
- for( uint iQ2=2; iQ2 < it->second.size(); ++iQ2)
+ for(unsigned int iQ2=2; iQ2 < it->second.size(); ++iQ2)
it->second[iQ2] = it->second[iQ2]/_g_EQ2max;
}*/
EQlumfile.close();
return;
}
Index: trunk/src/gammaeluminosity.cpp
===================================================================
--- trunk/src/gammaeluminosity.cpp (revision 8)
+++ trunk/src/gammaeluminosity.cpp (revision 9)
@@ -1,209 +1,209 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright 2010
//
// This file is part of starlight.
//
// starlight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// starlight is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with starlight. If not, see .
//
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
// $Rev:: 264 $: revision of last commit
// $Author:: jseger $: author of last commit
// $Date:: 2016-06-06 21:05:12 +0100 #$: date of last commit
//
// Description:
//
//
//
///////////////////////////////////////////////////////////////////////////
#include
#include
#include
#include "inputParameters.h"
#include "beambeamsystem.h"
#include "beam.h"
#include "starlightconstants.h"
#include "nucleus.h"
#include "bessel.h"
#include "gammaeluminosity.h"
using namespace std;
using namespace starlightConstants;
//______________________________________________________________________________
photonElectronLuminosity::photonElectronLuminosity(const inputParameters& inputParametersInstance, beamBeamSystem& bbsystem)
: photonNucleusCrossSection(inputParametersInstance, bbsystem)
,_protonEnergy(inputParametersInstance.protonEnergy())
,_electronEnergy(inputParametersInstance.electronEnergy())
,_beamLorentzGamma(inputParametersInstance.beamLorentzGamma())
,_baseFileName(inputParametersInstance.baseFileName())
,_maxW(inputParametersInstance.maxW())
,_minW(inputParametersInstance.minW())
,_nmbWBins(inputParametersInstance.nmbWBins())
,_maxRapidity(inputParametersInstance.maxRapidity())
,_nmbRapidityBins(inputParametersInstance.nmbRapidityBins())
,_nEBins(inputParametersInstance.nmbEnergyBins())
,_minGammaQ2(inputParametersInstance.minGammaQ2())
,_maxGammaQ2(inputParametersInstance.maxGammaQ2())
,_nmbGammaQ2Bins(inputParametersInstance.nmbGammaQ2Bins())
,_cmsMaxPhotonEnergy(inputParametersInstance.cmsMaxPhotonEnergy())
,_cmsMinPhotonEnergy(inputParametersInstance.cmsMinPhotonEnergy())
,_targetMaxPhotonEnergy(inputParametersInstance.targetMaxPhotonEnergy())
,_targetMinPhotonEnergy(inputParametersInstance.targetMinPhotonEnergy())
,_productionMode(inputParametersInstance.productionMode())
,_beamBreakupMode(inputParametersInstance.beamBreakupMode())
{
cout <<"Creating Luminosity Tables."<* this_energy = Q2arraylimits(Egamma);
double Q2min = this_energy->first;
double Q2max = this_energy->second;
if( Q2min > Q2max)
continue;
//Accounts for the phase space factor
g_E = Egamma*integrated_Q2_dep(Egamma, Q2min, Q2max);
EQ2lumfile << g_E<