Commit 09d615a3 authored by Pawel Sznajder's avatar Pawel Sznajder
Browse files

DVMP: implement beam and target contributions to the process and obs.

parent 2c83711e
#ifndef DVMPALLUMINUS_H
#define DVMPALLUMINUS_H
/**
* @file DVMPAlluMinus.h
* @author Pawel Sznajder (NCBJ)
* @date September 09, 2020
* @version 1.0
*/
#include <string>
#include "../../../../beans/gpd/GPDType.h"
#include "../../../../beans/List.h"
#include "../../../../utils/type/PhysicalType.h"
#include "../DVMPObservable.h"
namespace PARTONS {
/**
* @class DVMPAlluMinus
* @brief \f$A_{LLU}\f$ asymmetry (long. polarised beam, long. polarized target, unpolarized meson) for negative beam charge.
*
* Unit: none.
*/
class DVMPAlluMinus: public DVMPObservable {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVMPAlluMinus(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAlluMinus();
virtual DVMPAlluMinus* clone() const;
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAlluMinus(const DVMPAlluMinus &other);
virtual PhysicalType<double> computeObservable(
const DVMPObservableKinematic& kinematic,
const List<GPDType>& gpdType);
};
} /* namespace PARTONS */
#endif /* DVMPALLUMINUS_H */
#ifndef DVMPAULUMINUS_H
#define DVMPAULUMINUS_H
/**
* @file DVMPAuluMinus.h
* @author Pawel Sznajder (NCBJ)
* @date September 09, 2020
* @version 1.0
*/
#include <string>
#include "../../../../beans/gpd/GPDType.h"
#include "../../../../beans/List.h"
#include "../../../../utils/type/PhysicalType.h"
#include "../DVMPObservable.h"
namespace PARTONS {
/**
* @class DVMPAuluMinus
* @brief \f$A_{ULU}\f$ asymmetry (unpolarized beam, long. polarized target, unpolarized meson) for negative beam charge.
*
* Unit: none.
*/
class DVMPAuluMinus: public DVMPObservable {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVMPAuluMinus(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAuluMinus();
virtual DVMPAuluMinus* clone() const;
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAuluMinus(const DVMPAuluMinus &other);
virtual PhysicalType<double> computeObservable(
const DVMPObservableKinematic& kinematic,
const List<GPDType>& gpdType);
};
} /* namespace PARTONS */
#endif /* DVMPAULUMINUS_H */
#ifndef DVMPAULUMINUSSIN1PHI
#define DVMPAULUMINUSSIN1PHI
/**
* @file DVMPAuluMinusSin1Phi.h
* @author Pawel Sznajder (NCBJ, Warsaw)
* @date November 16, 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 "DVMPAuluMinus.h"
namespace PARTONS {
class DVMPObservableKinematic;
} /* namespace PARTONS */
namespace PARTONS {
/**
* @class DVMPAuluMinusSin1Phi
*
* @brief 1th Fourier moment of longitudinally polarized target asymmetry for negative beam charge.
*/
class DVMPAuluMinusSin1Phi: public DVMPAuluMinus, public MathIntegratorModule {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVMPAuluMinusSin1Phi(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAuluMinusSin1Phi();
virtual DVMPAuluMinusSin1Phi* clone() const;
virtual void configure(const ElemUtils::Parameters &parameters);
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAuluMinusSin1Phi(const DVMPAuluMinusSin1Phi &other);
virtual PhysicalType<double> computeObservable(
const DVMPObservableKinematic& 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 /* DVMPAULUMINUSSIN1PHI */
#ifndef DVMPAULUMINUSSIN2PHI
#define DVMPAULUMINUSSIN2PHI
/**
* @file DVMPAuluMinusSin2Phi.h
* @author Pawel Sznajder (NCBJ, Warsaw)
* @date November 16, 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 "DVMPAuluMinus.h"
namespace PARTONS {
class DVMPObservableKinematic;
} /* namespace PARTONS */
namespace PARTONS {
/**
* @class DVMPAuluMinusSin2Phi
*
* @brief 2nd Fourier moment of longitudinally polarized target asymmetry for negative beam charge.
*/
class DVMPAuluMinusSin2Phi: public DVMPAuluMinus, public MathIntegratorModule {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVMPAuluMinusSin2Phi(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAuluMinusSin2Phi();
virtual DVMPAuluMinusSin2Phi* clone() const;
virtual void configure(const ElemUtils::Parameters &parameters);
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAuluMinusSin2Phi(const DVMPAuluMinusSin2Phi &other);
virtual PhysicalType<double> computeObservable(
const DVMPObservableKinematic& 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 /* DVMPAULUMINUSSIN2PHI */
......@@ -55,10 +55,13 @@ protected:
private:
double CrossSectionL(); ///< Partial cross-section L
double CrossSectionT(); ///< Partial cross-section T
double CrossSectionLT(); ///< Partial cross-section LT
double CrossSectionTT(); ///< Partial cross-section TT
double CrossSectionL(); ///< Partial cross-section L.
double CrossSectionT(); ///< Partial cross-section T.
double CrossSectionLT(); ///< Partial cross-section LT.
double CrossSectionTT(); ///< Partial cross-section TT.
double CrossSectionAUL(); ///< AUL times sigma_0.
double CrossSectionALU(); ///< ALU times sigma_0.
double poleResidue(); ///< The residue of the pole in Pi+ production
......@@ -77,6 +80,8 @@ private:
std::complex<double> Amplitude0mmp(); ///< Computation of the amplitude M_{0--+}.
double m_W2; ///< W^2 variable.
double m_gamma; ///< gamma variable.
double m_eps; ///< epsilon variable.
double m_xi; ///< xi variable.
double lambdaFunction(double a, double b, double c) const; ///< Mandalstam function.
......
#include "../../../../../../include/partons/modules/observable/DVMP/asymmetry/DVMPAlluMinus.h"
#include <NumA/linear_algebra/vector/Vector3D.h>
#include "../../../../../../include/partons/beans/MesonPolarization.h"
#include "../../../../../../include/partons/beans/observable/ObservableResult.h"
#include "../../../../../../include/partons/BaseObjectRegistry.h"
#include "../../../../../../include/partons/modules/process/DVMP/DVMPProcessModule.h"
#include "../../../../../../include/partons/utils/type/PhysicalUnit.h"
namespace PARTONS {
const unsigned int DVMPAlluMinus::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new DVMPAlluMinus("DVMPAlluMinus"));
DVMPAlluMinus::DVMPAlluMinus(const std::string &className) :
DVMPObservable(className) {
}
DVMPAlluMinus::DVMPAlluMinus(const DVMPAlluMinus& other) :
DVMPObservable(other) {
}
DVMPAlluMinus::~DVMPAlluMinus() {
}
DVMPAlluMinus* DVMPAlluMinus::clone() const {
return new DVMPAlluMinus(*this);
}
PhysicalType<double> DVMPAlluMinus::computeObservable(
const DVMPObservableKinematic& kinematic,
const List<GPDType>& gpdType) {
//TODO VECTOR MESON POLARISATION
PhysicalType<double> A = m_pProcessModule->compute(+1, -1,
NumA::Vector3D(0., 0., -1.), MesonPolarization::UNDEFINED,
kinematic, gpdType).getValue();
PhysicalType<double> B = m_pProcessModule->compute(-1, -1,
NumA::Vector3D(0., 0., +1.), MesonPolarization::UNDEFINED,
kinematic, gpdType).getValue();
PhysicalType<double> C = m_pProcessModule->compute(+1, -1,
NumA::Vector3D(0., 0., +1.), MesonPolarization::UNDEFINED,
kinematic, gpdType).getValue();
PhysicalType<double> D = m_pProcessModule->compute(-1, -1,
NumA::Vector3D(0., 0., -1.), MesonPolarization::UNDEFINED,
kinematic, gpdType).getValue();
if ((A + B + C + D).getValue() == 0.) {
warn(__func__, "Asymmetry denominator is zero");
return PhysicalType<double>(0., PhysicalUnit::NONE);
}
return ((A + B) - (C + D)) / ((A + B) + (C + D));
}
} /* namespace PARTONS */
#include "../../../../../../include/partons/modules/observable/DVMP/asymmetry/DVMPAuluMinus.h"
#include <NumA/linear_algebra/vector/Vector3D.h>
#include "../../../../../../include/partons/beans/MesonPolarization.h"
#include "../../../../../../include/partons/beans/observable/ObservableResult.h"
#include "../../../../../../include/partons/BaseObjectRegistry.h"
#include "../../../../../../include/partons/modules/process/DVMP/DVMPProcessModule.h"
#include "../../../../../../include/partons/utils/type/PhysicalUnit.h"
namespace PARTONS {
const unsigned int DVMPAuluMinus::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new DVMPAuluMinus("DVMPAuluMinus"));
DVMPAuluMinus::DVMPAuluMinus(const std::string &className) :
DVMPObservable(className) {
}
DVMPAuluMinus::DVMPAuluMinus(const DVMPAuluMinus& other) :
DVMPObservable(other) {
}
DVMPAuluMinus::~DVMPAuluMinus() {
}
DVMPAuluMinus* DVMPAuluMinus::clone() const {
return new DVMPAuluMinus(*this);
}
PhysicalType<double> DVMPAuluMinus::computeObservable(
const DVMPObservableKinematic& kinematic,
const List<GPDType>& gpdType) {
//TODO VECTOR MESON POLARISATION
PhysicalType<double> A = m_pProcessModule->compute(+1, -1,
NumA::Vector3D(0., 0., -1.), MesonPolarization::UNDEFINED,
kinematic, gpdType).getValue();
PhysicalType<double> B = m_pProcessModule->compute(-1, -1,
NumA::Vector3D(0., 0., -1.), MesonPolarization::UNDEFINED,
kinematic, gpdType).getValue();
PhysicalType<double> C = m_pProcessModule->compute(+1, -1,
NumA::Vector3D(0., 0., +1.), MesonPolarization::UNDEFINED,
kinematic, gpdType).getValue();
PhysicalType<double> D = m_pProcessModule->compute(-1, -1,
NumA::Vector3D(0., 0., +1.), MesonPolarization::UNDEFINED,
kinematic, gpdType).getValue();
if ((A + B + C + D).getValue() == 0.) {
warn(__func__, "Asymmetry denominator is zero");
return PhysicalType<double>(0., PhysicalUnit::NONE);
}
return ((A + B) - (C + D)) / ((A + B) + (C + D));
}
} /* namespace PARTONS */
#include "../../../../../../include/partons/modules/observable/DVMP/asymmetry/DVMPAuluMinusSin1Phi.h"
#include <NumA/functor/one_dimension/Functor1D.h>
#include <NumA/integration/one_dimension/Integrator1D.h>
#include <NumA/integration/one_dimension/IntegratorType1D.h>
#include <cmath>
#include "../../../../../../include/partons/beans/observable/DVMP/DVMPObservableKinematic.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 DVMPAuluMinusSin1Phi::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new DVMPAuluMinusSin1Phi("DVMPAuluMinusSin1Phi"));
DVMPAuluMinusSin1Phi::DVMPAuluMinusSin1Phi(const std::string &className) :
DVMPAuluMinus(className), MathIntegratorModule(), m_pFunctionToIntegrateObservable(
0) {
setIntegrator(NumA::IntegratorType1D::DEXP);
initFunctorsForIntegrations();
}
DVMPAuluMinusSin1Phi::DVMPAuluMinusSin1Phi(const DVMPAuluMinusSin1Phi& other) :
DVMPAuluMinus(other), MathIntegratorModule(other) {
initFunctorsForIntegrations();
}
DVMPAuluMinusSin1Phi::~DVMPAuluMinusSin1Phi() {
if (m_pFunctionToIntegrateObservable) {
delete m_pFunctionToIntegrateObservable;
m_pFunctionToIntegrateObservable = 0;
}
}
void DVMPAuluMinusSin1Phi::initFunctorsForIntegrations() {
m_pFunctionToIntegrateObservable =
NumA::Integrator1D::newIntegrationFunctor(this,
&DVMPAuluMinusSin1Phi::functionToIntegrateObservable);
}
DVMPAuluMinusSin1Phi* DVMPAuluMinusSin1Phi::clone() const {
return new DVMPAuluMinusSin1Phi(*this);
}
void DVMPAuluMinusSin1Phi::configure(const ElemUtils::Parameters &parameters) {
DVMPAuluMinus::configure(parameters);
MathIntegratorModule::configureIntegrator(parameters);
}
double DVMPAuluMinusSin1Phi::functionToIntegrateObservable(double x,
std::vector<double> params) {
DVMPObservableKinematic kinematic;
List<GPDType> gpdType;
unserializeKinematicsAndGPDTypesFromStdVector(params, kinematic, gpdType);
kinematic.setPhi(PhysicalType<double>(x, PhysicalUnit::RAD));
return DVMPAuluMinus::computeObservable(kinematic, gpdType).getValue() * sin(x);
}
PhysicalType<double> DVMPAuluMinusSin1Phi::computeObservable(
const DVMPObservableKinematic& kinematic,
const List<GPDType>& gpdType) {
std::vector<double> params = serializeKinematicsAndGPDTypesIntoStdVector(kinematic, gpdType);
return PhysicalType<double>(
integrate(m_pFunctionToIntegrateObservable, 0., (2 * Constant::PI),
params) / (Constant::PI), PhysicalUnit::NONE);
}
} /* namespace PARTONS */
#include "../../../../../../include/partons/modules/observable/DVMP/asymmetry/DVMPAuluMinusSin2Phi.h"
#include <NumA/functor/one_dimension/Functor1D.h>
#include <NumA/integration/one_dimension/Integrator1D.h>
#include <NumA/integration/one_dimension/IntegratorType1D.h>
#include <cmath>
#include "../../../../../../include/partons/beans/observable/DVMP/DVMPObservableKinematic.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 DVMPAuluMinusSin2Phi::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new DVMPAuluMinusSin2Phi("DVMPAuluMinusSin2Phi"));
DVMPAuluMinusSin2Phi::DVMPAuluMinusSin2Phi(const std::string &className) :
DVMPAuluMinus(className), MathIntegratorModule(), m_pFunctionToIntegrateObservable(
0) {
setIntegrator(NumA::IntegratorType1D::DEXP);
initFunctorsForIntegrations();
}
DVMPAuluMinusSin2Phi::DVMPAuluMinusSin2Phi(const DVMPAuluMinusSin2Phi& other) :
DVMPAuluMinus(other), MathIntegratorModule(other) {
initFunctorsForIntegrations();
}
DVMPAuluMinusSin2Phi::~DVMPAuluMinusSin2Phi() {
if (m_pFunctionToIntegrateObservable) {
delete m_pFunctionToIntegrateObservable;
m_pFunctionToIntegrateObservable = 0;
}
}
void DVMPAuluMinusSin2Phi::initFunctorsForIntegrations() {
m_pFunctionToIntegrateObservable =
NumA::Integrator1D::newIntegrationFunctor(this,
&DVMPAuluMinusSin2Phi::functionToIntegrateObservable);
}
DVMPAuluMinusSin2Phi* DVMPAuluMinusSin2Phi::clone() const {
return new DVMPAuluMinusSin2Phi(*this);
}
void DVMPAuluMinusSin2Phi::configure(const ElemUtils::Parameters &parameters) {
DVMPAuluMinus::configure(parameters);