Implements edm::EDProducer.
Definition at line 92 of file PdfWeightProducer.cc.
References funct::abs(), edm::InputTag::encode(), fixPOWHEG_, genParticleCandidates2GenParticles_cfi::genParticles, genTag_, edm::Event::getByLabel(), i, edm::HandleBase::id(), edm::EventBase::isRealData(), gen::k, reco::LeafCandidate::mass(), LHAPDF::numberPDF(), pdfInfoTag_, pdfSetNames_, pdfShortNames_, reco::LeafCandidate::pdgId(), edm::Event::put(), mathSSE::sqrt(), reco::LeafCandidate::status(), ntuplemaker::status, useFirstAsDefault_, LHAPDF::usePDFMember(), create_public_pileup_plots::weights, and LHAPDF::xfx().
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
102 float Q = pdfstuff->pdf()->scalePDF;
104 int id1 = pdfstuff->pdf()->
id.first;
105 double x1 = pdfstuff->pdf()->x.first;
106 double pdf1 = pdfstuff->pdf()->xPDF.first;
108 int id2 = pdfstuff->pdf()->
id.second;
109 double x2 = pdfstuff->pdf()->x.second;
110 double pdf2 = pdfstuff->pdf()->xPDF.second;
124 unsigned int gensize = genParticles->size();
126 for(
unsigned int i = 0;
i<gensize; ++
i) {
129 if (status!=3)
continue;
130 int id = part.
pdgId();
131 if (
id!=23 &&
abs(
id)!=24)
continue;
132 mboson = part.
mass();
135 Q =
sqrt(mboson*mboson+Q*Q);
143 std::auto_ptr<std::vector<double> >
weights (
new std::vector<double>);
144 unsigned int nweights = 1;
148 for (
unsigned int i=0;
i<nweights; ++
i) {
152 weights->push_back(newpdf1/pdf1*newpdf2/pdf2);
virtual int pdgId() const GCC11_FINAL
PDG identifier.
std::vector< std::string > pdfSetNames_
virtual int status() const GCC11_FINAL
status word
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Abs< T >::type abs(const T &t)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual float mass() const GCC11_FINAL
mass
edm::InputTag pdfInfoTag_
std::vector< std::string > pdfShortNames_
double xfx(int nset, double x, double Q, int fl)
void usePDFMember(int nset, int member)