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

add xi converter module that include also t dep.

parent 53368929
#ifndef TCS_XI_CONVERTER_EXACT_H
#define TCS_XI_CONVERTER_EXACT_H
/**
* @file TCSXiConverterExact.h
* @author Bryan BERTHOU (SPhN / CEA Saclay)
* @date 28 October 2015
* @version 1.0
*/
#include <string>
#include "../../../utils/type/PhysicalType.h"
#include "TCSXiConverterModule.h"
namespace PARTONS {
/**
* @class TCSXiConverterExact
*
* @brief Exact evaluation of GPD variable xi for TCS.
*
* \f$-\xi = \frac{t/2-Q^{2}'}{2 s + t - 2 m^{2} - Q^{2}'}\f$
*/
class TCSXiConverterExact: public TCSXiConverterModule {
public:
/**
* Unique ID to automatically register the class in the registry.
*/
static const unsigned int classId;
/**
* Constructor.
* @param className Name of class.
*/
TCSXiConverterExact(const std::string &className);
/**
* Copy constructor.
* @param other Object to be copied.
*/
TCSXiConverterExact(const TCSXiConverterExact &other);
/**
* Destructor.
*/
virtual ~TCSXiConverterExact();
virtual TCSXiConverterExact* clone() const;
virtual PhysicalType<double> compute(
const TCSObservableKinematic& kinematic);
};
} /* namespace PARTONS */
#endif /* TCS_XI_CONVERTER_EXACT_H */
#include "../../../../../include/partons/modules/xi_converter/TCS/TCSXiConverterExact.h"
#include <cmath>
#include "../../../../../include/partons/beans/observable/TCS/TCSObservableKinematic.h"
#include "../../../../../include/partons/BaseObjectRegistry.h"
#include "../../../../../include/partons/FundamentalPhysicalConstants.h"
#include "../../../../../include/partons/utils/type/PhysicalUnit.h"
namespace PARTONS {
const unsigned int TCSXiConverterExact::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new TCSXiConverterExact("TCSXiConverterExact"));
TCSXiConverterExact::TCSXiConverterExact(const std::string &className) :
TCSXiConverterModule(className) {
}
TCSXiConverterExact::TCSXiConverterExact(const TCSXiConverterExact &other) :
TCSXiConverterModule(other) {
}
TCSXiConverterExact::~TCSXiConverterExact() {
}
TCSXiConverterExact* TCSXiConverterExact::clone() const {
return new TCSXiConverterExact(*this);
}
PhysicalType<double> TCSXiConverterExact::compute(
const TCSObservableKinematic& kinematic) {
double s =
pow(Constant::PROTON_MASS, 2)
+ 2. * Constant::PROTON_MASS
* kinematic.getE().makeSameUnitAs(PhysicalUnit::GEV).getValue();
double t = kinematic.getT().makeSameUnitAs(PhysicalUnit::GEV2).getValue();
double Q2Prim =
kinematic.getQ2Prim().makeSameUnitAs(PhysicalUnit::GEV2).getValue();
return PhysicalType<double>(
-1 * (0.5 * t - Q2Prim)
/ (2 * s + t - 2 * pow(Constant::PROTON_MASS, 2) - Q2Prim),
PhysicalUnit::NONE);
}
} /* 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