Commit ea5a7a9f authored by Valerio Bertone's avatar Valerio Bertone
Browse files

Minor adjustments

parent f687527f
......@@ -39,5 +39,6 @@ computation.nb.processor = 1
# Maximum size of batch for a given type (in one task several batches may be run in separate threads)
gpd.service.batch.size = 10000
collinear_distribution.service.batch.size = 10000
ccf.service.batch.size = 1000
observable.service.batch.size = 1000
......@@ -54,7 +54,7 @@ public:
std::string getSetName() const;
int getMember() const;
CollinearDistributionType::Type getType() const;
LHAPDF::PDF* getSet() const;
std::vector<LHAPDF::PDF*> getSet() const;
void setSetName(const std::string &setname);
void setMember(const int &member);
......@@ -84,7 +84,7 @@ protected:
std::string m_setName;
int m_member;
CollinearDistributionType::Type m_type;
LHAPDF::PDF* m_set;
std::vector<LHAPDF::PDF*> m_set;
};
......
......@@ -22,7 +22,7 @@ CollinearDistributionLHAPDF::CollinearDistributionLHAPDF(const std::string &clas
m_setName = "UNDEFINED";
m_member = 0;
m_type = CollinearDistributionType::Type::UnpolPDF;
m_set = nullptr;
m_set = {};
}
CollinearDistributionLHAPDF::CollinearDistributionLHAPDF(const CollinearDistributionLHAPDF& other) :
......@@ -103,8 +103,8 @@ void CollinearDistributionLHAPDF::initModule() {
CollinearDistributionModule::initModule();
if (m_set == nullptr) {
m_set = LHAPDF::mkPDF(m_setName, m_member);
if (m_set.empty()) {
m_set = LHAPDF::mkPDFs(m_setName);
}
}
......@@ -117,7 +117,7 @@ PartonDistribution CollinearDistributionLHAPDF::computeUnpolPDF() {
return partonDistribution;
// Get distributions from LHAPDF (only positive values of x are allowed)
const std::map<int, double> dists = m_set->xfxQ2(std::abs(m_x), m_MuF2);
const std::map<int, double> dists = m_set[m_member]->xfxQ2(std::abs(m_x), m_MuF2);
// Map between QuarkFlavor enum and GPD convention for quarks
const std::map<int, QuarkFlavor::Type> flavour_map{{1, QuarkFlavor::DOWN}, {2, QuarkFlavor::UP}, {3, QuarkFlavor::STRANGE},
......@@ -160,7 +160,7 @@ PartonDistribution CollinearDistributionLHAPDF::computePolPDF() {
return partonDistribution;
// Get distributions from LHAPDF (only positive values of x are allowed)
const std::map<int, double> dists = m_set->xfxQ2(std::abs(m_x), m_MuF2);
const std::map<int, double> dists = m_set[m_member]->xfxQ2(std::abs(m_x), m_MuF2);
// Map between QuarkFlavor enum and GPD convention for quarks
const std::map<int, QuarkFlavor::Type> flavour_map{{1, QuarkFlavor::DOWN}, {2, QuarkFlavor::UP}, {3, QuarkFlavor::STRANGE},
......@@ -203,7 +203,7 @@ PartonDistribution CollinearDistributionLHAPDF::computeUnpolFF() {
return partonDistribution;
// Get distributions from LHAPDF (only positive values of x are allowed)
const std::map<int, double> dists = m_set->xfxQ2(std::abs(m_x), m_MuF2);
const std::map<int, double> dists = m_set[m_member]->xfxQ2(std::abs(m_x), m_MuF2);
// Map between QuarkFlavor enum and GPD convention for quarks
const std::map<int, QuarkFlavor::Type> flavour_map{{1, QuarkFlavor::DOWN}, {2, QuarkFlavor::UP}, {3, QuarkFlavor::STRANGE},
......@@ -246,7 +246,7 @@ PartonDistribution CollinearDistributionLHAPDF::computePolFF() {
return partonDistribution;
// Get distributions from LHAPDF (only positive values of x are allowed)
const std::map<int, double> dists = m_set->xfxQ2(std::abs(m_x), m_MuF2);
const std::map<int, double> dists = m_set[m_member]->xfxQ2(std::abs(m_x), m_MuF2);
// Map between QuarkFlavor enum and GPD convention for quarks
const std::map<int, QuarkFlavor::Type> flavour_map{{1, QuarkFlavor::DOWN}, {2, QuarkFlavor::UP}, {3, QuarkFlavor::STRANGE},
......@@ -296,7 +296,7 @@ CollinearDistributionType::Type CollinearDistributionLHAPDF::getType() const {
return m_type;
}
LHAPDF::PDF* CollinearDistributionLHAPDF::getSet() const {
std::vector<LHAPDF::PDF*> CollinearDistributionLHAPDF::getSet() const {
return m_set;
}
......
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