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

add observables for DVMP

parent 080dc4af
#ifndef DVMPALLUMINUSCOS0PHI
#define DVMPALLUMINUSCOS0PHI
/**
* @file DVMPAlluMinusCos0Phi.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 "DVMPAlluMinus.h"
namespace PARTONS {
class DVMPObservableKinematic;
} /* namespace PARTONS */
namespace PARTONS {
/**
* @class DVMPAlluMinusCos0Phi
*
* @brief 0th Fourier moment of longitudinally polarized beam - target asymmetry for negative beam charge.
*/
class DVMPAlluMinusCos0Phi: public DVMPAlluMinus, public MathIntegratorModule {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVMPAlluMinusCos0Phi(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAlluMinusCos0Phi();
virtual DVMPAlluMinusCos0Phi* clone() const;
virtual void configure(const ElemUtils::Parameters &parameters);
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAlluMinusCos0Phi(const DVMPAlluMinusCos0Phi &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 /* DVMPALLUMINUSCOS0PHI */
#ifndef DVMPALLUMINUSCOS1PHI
#define DVMPALLUMINUSCOS1PHI
/**
* @file DVMPAlluMinusCos1Phi.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 "DVMPAlluMinus.h"
namespace PARTONS {
class DVMPObservableKinematic;
} /* namespace PARTONS */
namespace PARTONS {
/**
* @class DVMPAlluMinusCos1Phi
*
* @brief 1th Fourier moment of longitudinally polarized beam - target asymmetry for negative beam charge.
*/
class DVMPAlluMinusCos1Phi: public DVMPAlluMinus, public MathIntegratorModule {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVMPAlluMinusCos1Phi(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAlluMinusCos1Phi();
virtual DVMPAlluMinusCos1Phi* clone() const;
virtual void configure(const ElemUtils::Parameters &parameters);
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAlluMinusCos1Phi(const DVMPAlluMinusCos1Phi &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 /* DVMPALLUMINUSCOS1PHI */
#ifndef DVMPALLUMINUSCOS2PHI
#define DVMPALLUMINUSCOS2PHI
/**
* @file DVMPAlluMinusCos2Phi.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 "DVMPAlluMinus.h"
namespace PARTONS {
class DVMPObservableKinematic;
} /* namespace PARTONS */
namespace PARTONS {
/**
* @class DVMPAlluMinusCos2Phi
*
* @brief 2nd Fourier moment of longitudinally polarized beam - target asymmetry for negative beam charge.
*/
class DVMPAlluMinusCos2Phi: public DVMPAlluMinus, public MathIntegratorModule {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVMPAlluMinusCos2Phi(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAlluMinusCos2Phi();
virtual DVMPAlluMinusCos2Phi* clone() const;
virtual void configure(const ElemUtils::Parameters &parameters);
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAlluMinusCos2Phi(const DVMPAlluMinusCos2Phi &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 /* DVMPALLUMINUSCOS2PHI */
#ifndef DVMPALUUMINUS_H
#define DVMPALUUMINUS_H
/**
* @file DVMPAluuMinus.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 DVMPAluuMinus
* @brief \f$A_{LUU}\f$ asymmetry (long. polarized beam, unpolarized target, unpolarized meson) for negative beam charge.
*
* Unit: none.
*/
class DVMPAluuMinus: public DVMPObservable {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVMPAluuMinus(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAluuMinus();
virtual DVMPAluuMinus* clone() const;
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAluuMinus(const DVMPAluuMinus &other);
virtual PhysicalType<double> computeObservable(
const DVMPObservableKinematic& kinematic,
const List<GPDType>& gpdType);
};
} /* namespace PARTONS */
#endif /* DVMPALUUMINUS_H */
#ifndef DVMPALUUMINUSSIN1PHI
#define DVMPALUUMINUSSIN1PHI
/**
* @file DVMPAluuMinusSin1Phi.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 "DVMPAluuMinus.h"
namespace PARTONS {
class DVMPObservableKinematic;
} /* namespace PARTONS */
namespace PARTONS {
/**
* @class DVMPAluuMinusSin1Phi
*
* @brief 1th Fourier moment of longitudinally polarized target asymmetry for negative beam charge.
*/
class DVMPAluuMinusSin1Phi: public DVMPAluuMinus, public MathIntegratorModule {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
DVMPAluuMinusSin1Phi(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAluuMinusSin1Phi();
virtual DVMPAluuMinusSin1Phi* clone() const;
virtual void configure(const ElemUtils::Parameters &parameters);
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAluuMinusSin1Phi(const DVMPAluuMinusSin1Phi &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 /* DVMPALUUMINUSSIN1PHI */
#ifndef DVMPAULUMINUSSIN3PHI
#define DVMPAULUMINUSSIN3PHI
/**
* @file DVMPAuluMinusSin3Phi.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 DVMPAuluMinusSin3Phi
*
* @brief 3rd Fourier moment of longitudinally polarized target asymmetry for negative beam charge.
*/
class DVMPAuluMinusSin3Phi: 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.
*/
DVMPAuluMinusSin3Phi(const std::string &className);
/**
* Destructor.
*/
virtual ~DVMPAuluMinusSin3Phi();
virtual DVMPAuluMinusSin3Phi* clone() const;
virtual void configure(const ElemUtils::Parameters &parameters);
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
DVMPAuluMinusSin3Phi(const DVMPAuluMinusSin3Phi &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 /* DVMPAULUMINUSSIN3PHI */
#include "../../../../../../include/partons/modules/observable/DVMP/asymmetry/DVMPAlluMinusCos0Phi.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/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 DVMPAlluMinusCos0Phi::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new DVMPAlluMinusCos0Phi("DVMPAlluMinusCos0Phi"));
DVMPAlluMinusCos0Phi::DVMPAlluMinusCos0Phi(const std::string &className) :
DVMPAlluMinus(className), MathIntegratorModule(), m_pFunctionToIntegrateObservable(
0) {
setIntegrator(NumA::IntegratorType1D::DEXP);
initFunctorsForIntegrations();
}
DVMPAlluMinusCos0Phi::DVMPAlluMinusCos0Phi(const DVMPAlluMinusCos0Phi& other) :
DVMPAlluMinus(other), MathIntegratorModule(other) {
initFunctorsForIntegrations();
}
DVMPAlluMinusCos0Phi::~DVMPAlluMinusCos0Phi() {
if (m_pFunctionToIntegrateObservable) {
delete m_pFunctionToIntegrateObservable;
m_pFunctionToIntegrateObservable = 0;
}
}
void DVMPAlluMinusCos0Phi::initFunctorsForIntegrations() {
m_pFunctionToIntegrateObservable =
NumA::Integrator1D::newIntegrationFunctor(this,
&DVMPAlluMinusCos0Phi::functionToIntegrateObservable);
}
DVMPAlluMinusCos0Phi* DVMPAlluMinusCos0Phi::clone() const {
return new DVMPAlluMinusCos0Phi(*this);
}
void DVMPAlluMinusCos0Phi::configure(const ElemUtils::Parameters &parameters) {
DVMPAlluMinus::configure(parameters);
MathIntegratorModule::configureIntegrator(parameters);
}
double DVMPAlluMinusCos0Phi::functionToIntegrateObservable(double x,
std::vector<double> params) {
DVMPObservableKinematic kinematic;
List<GPDType> gpdType;
unserializeKinematicsAndGPDTypesFromStdVector(params, kinematic, gpdType);
kinematic.setPhi(PhysicalType<double>(x, PhysicalUnit::RAD));
return DVMPAlluMinus::computeObservable(kinematic, gpdType).getValue(); // * cos(0);
}
PhysicalType<double> DVMPAlluMinusCos0Phi::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) / (2 * Constant::PI), PhysicalUnit::NONE);
}
} /* namespace PARTONS */
#include "../../../../../../include/partons/modules/observable/DVMP/asymmetry/DVMPAlluMinusCos1Phi.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 DVMPAlluMinusCos1Phi::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(