Commit d7a99fca authored by Pawel Sznajder's avatar Pawel Sznajder
Browse files

add TCS/CCF module evaluating only NLO part from DVCS

parent 943dac33
......@@ -8,13 +8,11 @@
* @version 1.0
*/
#include <complex>
#include "../../../beans/convol_coeff_function/ConvolCoeffFunctionResult.h"
#include "../../../beans/convol_coeff_function/DVCS/DVCSConvolCoeffFunctionKinematic.h"
#include "../../../beans/gpd/GPDType.h"
#include "../../../beans/List.h"
#include "../DVCS/DVCSConvolCoeffFunctionModule.h"
namespace PARTONS {
class DVCSConvolCoeffFunctionModule;
} /* namespace PARTONS */
namespace PARTONS {
......@@ -26,23 +24,7 @@ struct TCSCFFFromDVCSDifferentiationParameters {
bool m_isReal;
};
double TCSCFFFromDVCSDifferentiationFunction(double Q2, void* params) {
TCSCFFFromDVCSDifferentiationParameters* tcsParams =
static_cast<TCSCFFFromDVCSDifferentiationParameters*>(params);
List<GPDType> gpdTypeList;
gpdTypeList.add(GPDType(tcsParams->m_currentGPDComputeType));
std::complex<double> result =
((tcsParams->m_pDVCSConvolCoeffFunctionModule)->compute(
DVCSConvolCoeffFunctionKinematic(tcsParams->m_xi,
tcsParams->m_t, Q2, tcsParams->m_MuF2,
tcsParams->m_MuR2), gpdTypeList)).getResult(
tcsParams->m_currentGPDComputeType);
return (tcsParams->m_isReal) ? (result.real()) : (result.imag());
}
double TCSCFFFromDVCSDifferentiationFunction(double Q2, void* params);
} /* namespace PARTONS */
......
#ifndef TCS_CFF_FROM_DVCS_ONLY_NLO_PART_H
#define TCS_CFF_FROM_DVCS_ONLY_NLO_PART_H
/**
* @file TCSCFFFromDVCSOnlyNLOPart.h
* @author Oskar Grocholski (UW/NCBJ)
* @date September 08, 2014
* @version 1.0
*/
#include <complex>
#include <string>
#include "TCSCFFFromDVCS.h"
namespace PARTONS {
/**
* @class TCSCFFFromDVCSOnlyNLOPart
*
* This module calculates TCS Compton Form Factors using DVCS CFFs (only NLO addition to LO is given)
*
* Available CFF types: H, E, Ht, Et.
*/
class TCSCFFFromDVCSOnlyNLOPart: public TCSCFFFromDVCS {
public:
static const unsigned int classId; ///< Unique ID to automatically register the class in the registry.
/**
* Constructor.
* See BaseObject::BaseObject and ModuleObject::ModuleObject for more details.
* @param className Name of last child class.
*/
TCSCFFFromDVCSOnlyNLOPart(const std::string &className);
virtual TCSCFFFromDVCSOnlyNLOPart* clone() const;
/**
* Default destructor.
*/
virtual ~TCSCFFFromDVCSOnlyNLOPart();
protected:
/**
* Copy constructor.
* @param other
*/
TCSCFFFromDVCSOnlyNLOPart(const TCSCFFFromDVCSOnlyNLOPart &other);
virtual std::complex<double> computeUnpolarized();
};
} /* namespace PARTONS */
#endif /* TCS_CFF_FROM_DVCS_ONLY_NLO_PART_H */
......@@ -221,7 +221,7 @@ void TCSCFFFromDVCS::prepareSubModules(
m_pDVCSConvolCoeffFunctionModule->configure(
(it->second).getParameters());
m_pDVCSConvolCoeffFunctionModule->prepareSubModules(
(it->second).getSubModules());
(it->second).getSubModules());
}
}
}
......
#include "../../../../../include/partons/modules/convol_coeff_function/TCS/TCSCFFFromDVCSDifferentiation.h"
#include <complex>
#include "../../../../../include/partons/beans/convol_coeff_function/ConvolCoeffFunctionResult.h"
#include "../../../../../include/partons/beans/convol_coeff_function/DVCS/DVCSConvolCoeffFunctionKinematic.h"
#include "../../../../../include/partons/beans/List.h"
#include "../../../../../include/partons/modules/convol_coeff_function/DVCS/DVCSConvolCoeffFunctionModule.h"
namespace PARTONS {
double TCSCFFFromDVCSDifferentiationFunction(double Q2, void* params) {
TCSCFFFromDVCSDifferentiationParameters* tcsParams =
static_cast<TCSCFFFromDVCSDifferentiationParameters*>(params);
List<GPDType> gpdTypeList;
gpdTypeList.add(GPDType(tcsParams->m_currentGPDComputeType));
std::complex<double> result =
((tcsParams->m_pDVCSConvolCoeffFunctionModule)->compute(
DVCSConvolCoeffFunctionKinematic(tcsParams->m_xi,
tcsParams->m_t, Q2, tcsParams->m_MuF2,
tcsParams->m_MuR2), gpdTypeList)).getResult(
tcsParams->m_currentGPDComputeType);
return (tcsParams->m_isReal) ? (result.real()) : (result.imag());
}
} /* namespace PARTONS */
#include "../../../../../include/partons/modules/convol_coeff_function/TCS/TCSCFFFromDVCSOnlyNLOPart.h"
#include <ElementaryUtils/logger/CustomException.h>
#include <ElementaryUtils/string_utils/Formatter.h>
#include <gsl/gsl_deriv.h>
#include <gsl/gsl_math.h>
#include "../../../../../include/partons/beans/gpd/GPDType.h"
#include "../../../../../include/partons/beans/List.h"
#include "../../../../../include/partons/beans/PerturbativeQCDOrderType.h"
#include "../../../../../include/partons/BaseObjectRegistry.h"
#include "../../../../../include/partons/FundamentalPhysicalConstants.h"
#include "../../../../../include/partons/modules/convol_coeff_function/DVCS/DVCSConvolCoeffFunctionModule.h"
#include "../../../../../include/partons/modules/convol_coeff_function/TCS/TCSCFFFromDVCSDifferentiation.h"
namespace PARTONS {
const unsigned int TCSCFFFromDVCSOnlyNLOPart::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new TCSCFFFromDVCSOnlyNLOPart("TCSCFFFromDVCSOnlyNLOPart"));
TCSCFFFromDVCSOnlyNLOPart::TCSCFFFromDVCSOnlyNLOPart(
const std::string &className) :
TCSCFFFromDVCS(className) {
}
TCSCFFFromDVCSOnlyNLOPart::TCSCFFFromDVCSOnlyNLOPart(
const TCSCFFFromDVCSOnlyNLOPart &other) :
TCSCFFFromDVCS(other) {
}
TCSCFFFromDVCSOnlyNLOPart::~TCSCFFFromDVCSOnlyNLOPart() {
}
TCSCFFFromDVCSOnlyNLOPart* TCSCFFFromDVCSOnlyNLOPart::clone() const {
return new TCSCFFFromDVCSOnlyNLOPart(*this);
}
std::complex<double> TCSCFFFromDVCSOnlyNLOPart::computeUnpolarized() {
if (m_qcdOrderType != PerturbativeQCDOrderType::NLO) {
throw ElemUtils::CustomException(getClassName(), __func__,
ElemUtils::Formatter() << "QCD order: "
<< PerturbativeQCDOrderType(m_qcdOrderType).toString()
<< " not implemented");
}
/*
* Calculate TCS Compton Form Factors using results obtained for DVCS
* For unpolarized CFFs we have:
* In LO CFF_TCS = CFF_DVCS*
* In NLO CFF_TCS = CFF_DVCS* - i PI Q2 d/dQ2 CFF_DVCS*
*/
const double step = 1.E-8; // differentiation step
//set module and pQCD order
getDVCSConvolCoeffFunctionModule()->setQCDOrderType(m_qcdOrderType);
//currect GPD type
List<GPDType> gpdTypeList;
gpdTypeList.add(GPDType(m_currentGPDComputeType));
//result
std::complex<double> TCSCFF;
gsl_function gslFunction;
TCSCFFFromDVCSDifferentiationParameters params;
gslFunction.function = &TCSCFFFromDVCSDifferentiationFunction;
gslFunction.params = static_cast<void*>(&params);
double resultReal, abserrReal;
double resultImag, abserrImag;
params.m_pDVCSConvolCoeffFunctionModule =
getDVCSConvolCoeffFunctionModule();
params.m_xi = m_xi;
params.m_t = m_t;
params.m_MuF2 = m_MuF2;
params.m_MuR2 = m_MuR2;
params.m_currentGPDComputeType = m_currentGPDComputeType;
params.m_isReal = true;
gsl_deriv_central(&gslFunction, m_Q2Prim, step, &resultReal, &abserrReal);
params.m_isReal = false;
gsl_deriv_central(&gslFunction, m_Q2Prim, step, &resultImag, &abserrImag);
TCSCFF = std::complex<double>(0., 0.);
TCSCFF -= Constant::PI * m_Q2Prim * std::complex<double>(0., 1.)
* std::conj(std::complex<double>(resultReal, resultImag));
return TCSCFF;
}
} /* namespace PARTONS */
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