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

add dvcs observable -> unpolarized cs for virtual-photoprod.

parent e8197f54
#ifndef DVCSCROSSSECTIONUUVIRTUALPHOTOPRODUCTION_H
#define DVCSCROSSSECTIONUUVIRTUALPHOTOPRODUCTION_H
/**
* @file DVCSCrossSectionUUVirtualPhotoProduction.h
* @author Pawel Sznajder (IPNO)
* @date November 25, 2016
* @version 1.0
*/
#include <string>
#include "../../../../beans/gpd/GPDType.h"
#include "../../../../beans/List.h"
#include "../../../../utils/type/PhysicalType.h"
#include "../DVCSObservable.h"
namespace PARTONS {
/**
* @class DVCSCrossSectionUUVirtualPhotoProduction
* @brief Unpolarized cross-section for virtual photo-production.
*
* Unit: \f$\mathrm{nbarn}/\mathrm{GeV}^4\f$.
*/
class DVCSCrossSectionUUVirtualPhotoProduction: public DVCSObservable {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVCSCrossSectionUUVirtualPhotoProduction(const std::string &className);
/**
* Destructor.
*/
virtual ~DVCSCrossSectionUUVirtualPhotoProduction();
virtual DVCSCrossSectionUUVirtualPhotoProduction* clone() const;
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVCSCrossSectionUUVirtualPhotoProduction(
const DVCSCrossSectionUUVirtualPhotoProduction &other);
virtual PhysicalType<double> computeObservable(
const DVCSObservableKinematic& kinematic,
const List<GPDType>& gpdType);
private:
/**
* Virtual-photon flux.
*/
double getVirtualPhotonFlux(const DVCSObservableKinematic& kinematic) const;
};
} /* namespace PARTONS */
#endif /* DVCSCROSSSECTIONUUVIRTUALPHOTOPRODUCTION_H */
#ifndef DVCSCROSSSECTIONUUVIRTUALPHOTOPRODUCTIONPHIINTEGRATED_H
#define DVCSCROSSSECTIONUUVIRTUALPHOTOPRODUCTIONPHIINTEGRATED_H
/**
* @file DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated.h
* @author Luca COLANERI (IPNO)
* @date April 24, 2017
* @version 1.0
*/
#include <ElementaryUtils/parameters/Parameters.h>
#include <string>
#include <vector>
#include "../../../../beans/gpd/GPDType.h"
#include "../../../../beans/List.h"
#include "../../../../utils/type/PhysicalType.h"
#include "../../../MathIntegratorModule.h"
#include "DVCSCrossSectionUUVirtualPhotoProduction.h"
namespace PARTONS {
/**
* @class DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated
* @brief Unpolarized cross-section for virtual photo-production integrated over \f$\phi\f$.
*
* Unit: \f$\mathrm{nbarn}/\mathrm{GeV}^4\f$.
*/
class DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated: public DVCSCrossSectionUUVirtualPhotoProduction,
public MathIntegratorModule {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated(
const std::string &className);
/**
* Destructor.
*/
virtual ~DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated();
virtual DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated* clone() const;
virtual void configure(const ElemUtils::Parameters &parameters);
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated(
const DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated &other);
virtual PhysicalType<double> computeObservable(
const DVCSObservableKinematic& kinematic,
const List<GPDType>& gpdType);
/**
* Functor to perform the integration.
*/
NumA::FunctionType1D* m_pFunctionToIntegrateObservable;
/**
* Function to be integrated.
*/
virtual double functionToIntegrateObservable(double x,
std::vector<double> params);
/**
* Initialize functors.
*/
void initFunctorsForIntegrations();
};
} /* namespace PARTONS */
#endif /* DVCSCROSSSECTIONUUVIRTUALPHOTOPRODUCTIONPHIINTEGRATED_H */
#include "../../../../../../include/partons/modules/observable/DVCS/cross_section/DVCSCrossSectionUUVirtualPhotoProduction.h"
#include <NumA/linear_algebra/vector/Vector3D.h>
#include <cmath>
#include "../../../../../../include/partons/beans/observable/DVCS/DVCSObservableKinematic.h"
#include "../../../../../../include/partons/beans/observable/ObservableResult.h"
#include "../../../../../../include/partons/beans/process/VCSSubProcessType.h"
#include "../../../../../../include/partons/BaseObjectRegistry.h"
#include "../../../../../../include/partons/FundamentalPhysicalConstants.h"
#include "../../../../../../include/partons/modules/process/DVCS/DVCSProcessModule.h"
#include "../../../../../../include/partons/utils/type/PhysicalUnit.h"
namespace PARTONS {
const unsigned int DVCSCrossSectionUUVirtualPhotoProduction::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new DVCSCrossSectionUUVirtualPhotoProduction(
"DVCSCrossSectionUUVirtualPhotoProduction"));
DVCSCrossSectionUUVirtualPhotoProduction::DVCSCrossSectionUUVirtualPhotoProduction(
const std::string &className) :
DVCSObservable(className) {
}
DVCSCrossSectionUUVirtualPhotoProduction::DVCSCrossSectionUUVirtualPhotoProduction(
const DVCSCrossSectionUUVirtualPhotoProduction& other) :
DVCSObservable(other) {
}
DVCSCrossSectionUUVirtualPhotoProduction::~DVCSCrossSectionUUVirtualPhotoProduction() {
}
DVCSCrossSectionUUVirtualPhotoProduction* DVCSCrossSectionUUVirtualPhotoProduction::clone() const {
return new DVCSCrossSectionUUVirtualPhotoProduction(*this);
}
PhysicalType<double> DVCSCrossSectionUUVirtualPhotoProduction::computeObservable(
const DVCSObservableKinematic& kinematic,
const List<GPDType>& gpdType) {
//evaluate
DVCSObservableResult A = m_pProcessModule->compute(1., -1,
NumA::Vector3D(0., 0., 0.), kinematic, gpdType,
VCSSubProcessType::DVCS);
DVCSObservableResult B = m_pProcessModule->compute(-1., -1,
NumA::Vector3D(0., 0., 0.), kinematic, gpdType,
VCSSubProcessType::DVCS);
//combine
PhysicalType<double> result = (A.getValue() + B.getValue()) / 2.;
//integrate over transversely polarized target dependence to obtain 4-fold differential cross-section
result *= 2. * Constant::PI;
//virtual photon flux
result /= getVirtualPhotonFlux(kinematic);
//change to nb
return result.makeSameUnitAs(PhysicalUnit::NB);
}
double DVCSCrossSectionUUVirtualPhotoProduction::getVirtualPhotonFlux(
const DVCSObservableKinematic& kinematic) const {
double xB = kinematic.getXB().getValue();
double Q2 = kinematic.getQ2().makeSameUnitAs(PhysicalUnit::GEV2).getValue();
double E = kinematic.getE().makeSameUnitAs(PhysicalUnit::GEV).getValue();
double nu = Q2 / (2 * Constant::PROTON_MASS * xB);
double y = nu / E;
double eps = 2 * xB * Constant::PROTON_MASS / sqrt(Q2);
double e = (1. - y - pow(eps * y / 2., 2))
/ (1 - y + pow(y, 2) / 2 + pow(eps * y / 2., 2));
double value = Constant::FINE_STRUCTURE_CONSTANT / (2 * Constant::PI);
value *= pow(y, 2) / (1 - e);
value *= (1. - xB) / (xB * Q2);
return value;
}
} /* namespace PARTONS */
#include "../../../../../../include/partons/modules/observable/DVCS/cross_section/DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated.h"
#include <NumA/functor/one_dimension/Functor1D.h>
#include <NumA/integration/one_dimension/Integrator1D.h>
#include <NumA/integration/one_dimension/IntegratorType1D.h>
#include "../../../../../../include/partons/beans/observable/DVCS/DVCSObservableKinematic.h"
#include "../../../../../../include/partons/BaseObjectRegistry.h"
#include "../../../../../../include/partons/FundamentalPhysicalConstants.h"
#include "../../../../../../include/partons/modules/observable/Observable.h"
#include "../../../../../../include/partons/utils/type/PhysicalUnit.h"
namespace PARTONS {
const unsigned int DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated(
"DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated"));
DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated(
const std::string &className) :
DVCSCrossSectionUUVirtualPhotoProduction(className), MathIntegratorModule(), m_pFunctionToIntegrateObservable(
0) {
setIntegrator(NumA::IntegratorType1D::DEXP);
initFunctorsForIntegrations();
}
DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated(
const DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated& other) :
DVCSCrossSectionUUVirtualPhotoProduction(other), MathIntegratorModule(
other) {
m_pFunctionToIntegrateObservable = 0;
initFunctorsForIntegrations();
}
DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::~DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated() {
if (m_pFunctionToIntegrateObservable) {
delete m_pFunctionToIntegrateObservable;
m_pFunctionToIntegrateObservable = 0;
}
}
void DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::initFunctorsForIntegrations() {
m_pFunctionToIntegrateObservable =
NumA::Integrator1D::newIntegrationFunctor(this,
&DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::functionToIntegrateObservable);
}
DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated* DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::clone() const {
return new DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated(*this);
}
void DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::configure(
const ElemUtils::Parameters &parameters) {
DVCSCrossSectionUUVirtualPhotoProduction::configure(parameters);
MathIntegratorModule::configureIntegrator(parameters);
}
double DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::functionToIntegrateObservable(
double x, std::vector<double> params) {
DVCSObservableKinematic kinematic;
List<GPDType> gpdType;
unserializeKinematicsAndGPDTypesFromStdVector(params, kinematic, gpdType);
kinematic.setPhi(PhysicalType<double>(x, PhysicalUnit::RAD));
return DVCSCrossSectionUUVirtualPhotoProduction::computeObservable(
kinematic, gpdType).getValue();
}
PhysicalType<double> DVCSCrossSectionUUVirtualPhotoProductionPhiIntegrated::computeObservable(
const DVCSObservableKinematic& kinematic,
const List<GPDType>& gpdType) {
std::vector<double> params = serializeKinematicsAndGPDTypesIntoStdVector(
kinematic, gpdType);
return PhysicalType<double>(
integrate(m_pFunctionToIntegrateObservable, 0., (2 * Constant::PI),
params), PhysicalUnit::NB);
}
} /* 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