20 using namespace HepMC;
43 pdfWeightOffset_(
cfg.getParameter<unsigned
int>(
"pdfWeightOffset")),
44 nPdfWeights_(
cfg.getParameter<unsigned
int>(
"nPdfWeights")),
45 nPdfEigWeights_(
cfg.getParameter<unsigned
int>(
"nPdfEigWeights")),
46 pdfweights_(nPdfWeights_),
47 pdfeigweights_(nPdfEigWeights_) {
49 tree_ = fs->
make<TTree>(
"tree",
"");
51 tree_->Branch(
"pdfrep", &pdfweights_);
52 tree_->Branch(
"pdfeig", &pdfeigweights_);
53 tree_->Branch(
"weight", &weight_);
56 pdfweightshelper_.
Init(nPdfWeights_, nPdfEigWeights_, mc2hessianCSV);
68 double nomlheweight =
lheInfo->weights()[0].wgt;
73 weight_ = genInfo->
weight();
76 std::vector<double> inpdfweights(nPdfWeights_);
77 for (
unsigned int ipdf = 0; ipdf < nPdfWeights_; ++ipdf) {
78 unsigned int iwgt = ipdf + pdfWeightOffset_;
81 pdfweights_[ipdf] =
lheInfo->weights()[iwgt].wgt * weight_ / nomlheweight;
84 inpdfweights[ipdf] =
lheInfo->weights()[iwgt].wgt;
87 std::vector<double> outpdfweights(nPdfEigWeights_);
89 pdfweightshelper_.
DoMC2Hessian(nomlheweight, inpdfweights.data(), outpdfweights.data());
91 for (
unsigned int iwgt = 0; iwgt < nPdfEigWeights_; ++iwgt) {
92 double wgtval = outpdfweights[iwgt];
95 pdfeigweights_[iwgt] = wgtval * weight_ / nomlheweight;