Commit 0bc9e97d authored by Pawel Sznajder's avatar Pawel Sznajder
Browse files

In GPDService: remove unused computeGPDModelWithEvolution method

In GPDEvolutionModule: allow to set m_qcdOrderType via enum in configure
In GPDEvolutionModule: correct order of calling initModule and
isModuleWellConfigured
In GPDEvolutionVinnikov: check for NaN for singlet and gluon
parent a40186ac
......@@ -171,19 +171,6 @@ public:
GPDModule* pGPDModule, const List<GPDType> & gpdType =
List<GPDType>()) const;
/**
* Computes GPD model at specific kinematic with a QCD evolution model.
*
* @param gpdKinematic GPD kinematic.
* @param pGPDModule GPDModule to use.
* @param pEvolQCDModule Evolution module to use.
* @param gpdType List of GPDType to compute. Default: all the GPDTypes available with the GPDModule.
* @return GPDResult.
*/
GPDResult computeGPDModelWithEvolution(const GPDKinematic &gpdKinematic,
GPDModule* pGPDModule, GPDEvolutionModule* pEvolQCDModule,
GPDType::Type gpdType = GPDType::ALL);
/**
* Computes several GPDModels at specific kinematics.
*
......
......@@ -186,11 +186,18 @@ void GPDEvolutionModule::configure(const ElemUtils::Parameters &parameters) {
if (parameters.isAvailable(
PerturbativeQCDOrderType::PARAMETER_NAME_PERTURBATIVE_QCD_ORDER_TYPE)) {
//set
m_qcdOrderType = PerturbativeQCDOrderType(
parameters.getLastAvailable().getString()).getType();
// try to set m_qcdOrderType by standard way
try {
m_qcdOrderType =
static_cast<PerturbativeQCDOrderType::Type>(parameters.getLastAvailable().toUInt());
} catch (const std::exception &e) {
// if an exception is raised it means that it's a string configuration value
m_qcdOrderType = PerturbativeQCDOrderType(
parameters.getLastAvailable().getString()).getType();
}
//info
info(__func__,
ElemUtils::Formatter()
<< PerturbativeQCDOrderType::PARAMETER_NAME_PERTURBATIVE_QCD_ORDER_TYPE
......@@ -227,6 +234,7 @@ void GPDEvolutionModule::prepareSubModules(
//reset
if (m_pRunningAlphaStrong != 0) {
setRunningAlphaStrongModule(0);
m_pRunningAlphaStrong = 0;
}
//set
......@@ -261,6 +269,7 @@ void GPDEvolutionModule::prepareSubModules(
//reset
if (m_pActiveFlavorsModule != 0) {
setActiveFlavorsModule(0);
m_pActiveFlavorsModule = 0;
}
//set
......@@ -388,12 +397,12 @@ PartonDistribution GPDEvolutionModule::compute(double x, double xi, double t,
//pre-compute (set internal variables, etc.)
preCompute(x, xi, t, MuF2, MuR2, pGPDModule, gpdType);
//check if inut data are fine
isModuleWellConfigured();
//initialize
initModule();
//check if input data are fine
isModuleWellConfigured();
//do the evolution for nf given by the target scale
std::map<QuarkNonSingletCombination::Type, double> NSDiff;
double SDiff, GDiff;
......
......@@ -196,9 +196,20 @@ void GPDEvolutionVinnikov::initModule() {
if (iGrid >= 2 * m_gridSize) {
//get singlet combination and gluons
m_S.push_back(getS(m_nFlavors_ref, partonDistribution));
m_G.push_back(getG(partonDistribution));
//get single ad gluon
double S = getS(m_nFlavors_ref, partonDistribution);
double G = getG(partonDistribution);
//check if valid
checkIfResultValid(m_NSXGrid.at(iGrid), S);
checkIfResultValid(m_NSXGrid.at(iGrid), G);
if (iGrid >= 2 * m_gridSize) {
//get singlet combination and gluons
m_S.push_back(S);
m_G.push_back(G);
}
}
}
}
......
......@@ -337,10 +337,15 @@ void GPDModule::prepareSubModules(
GPDEvolutionModule::GPD_EVOLUTION_MODULE_CLASS_NAME);
if (it != subModulesData.end()) {
if (m_pGPDEvolutionModule) {
setEvolQcdModule(0);
m_pGPDEvolutionModule = 0;
}
if (!m_pGPDEvolutionModule) {
m_pGPDEvolutionModule =
Partons::getInstance()->getModuleObjectFactory()->newGPDEvolutionModule(
(it->second).getModuleClassName());
......
......@@ -28,8 +28,6 @@ namespace PARTONS {
const std::string GPDService::GPD_SERVICE_COMPUTE_GPD_MODEL = "computeGPDModel";
const std::string GPDService::GPD_SERVICE_COMPUTE_GPD_MODEL_WITH_EVOLUTION =
"computeGPDModelWithEvolution";
const std::string GPDService::GPD_SERVICE_COMPUTE_LIST_OF_GPD_MODEL =
"computeListOfGPDModel";
const std::string GPDService::GPD_SERVICE_COMPUTE_MANY_KINEMATIC_ONE_MODEL =
......@@ -204,20 +202,6 @@ GPDResult GPDService::computeGPDModel(const GPDKinematic &gpdKinematic,
return gpdResult;
}
GPDResult GPDService::computeGPDModelWithEvolution(
const GPDKinematic &gpdKinematic, GPDModule* pGPDModule,
GPDEvolutionModule* pEvolQCDModule, GPDType::Type gpdType) {
pGPDModule->setEvolQcdModule(pEvolQCDModule);
GPDResult gpdResult;
gpdResult.addPartonDistribution(gpdType,
pGPDModule->compute(gpdKinematic.getX(), gpdKinematic.getXi(),
gpdKinematic.getT(), gpdKinematic.getMuF2(),
gpdKinematic.getMuR2(), gpdType, true));
return gpdResult;
}
List<GPDResult> GPDService::computeListOfGPDModel(
const GPDKinematic &gpdKinematic,
std::vector<GPDModule*> &listOfGPDToCompute) {
......@@ -336,8 +320,6 @@ List<GPDResult> GPDService::computeManyKinematicOneModel(
// pGPDModule->configure(task.getLastAvailableParameters());
// }
//
////TODO how to deal with evolution module ?
//
////TODO how to handle many GPD module ?
//
// return configureGPDModule(pGPDModule);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment