Definition at line 96 of file PdfWeightProducer.cc.
References funct::abs(), DEFINE_FWK_MODULE, edm::InputTag::encode(), fixPOWHEG_, GenHFHadronMatcher_cfi::genParticles, genTag_, genToken_, edm::Event::getByToken(), mps_fire::i, gen::PdfInfo::id, globals_cff::id1, globals_cff::id2, edm::EventBase::isRealData(), gen::k, reco::LeafCandidate::mass(), eostools::move(), LHAPDF::numberPDF(), GenEventInfoProduct::pdf(), pdfInfoTag_, pdfInfoToken_, pdfSetNames_, pdfShortNames_, reco::LeafCandidate::pdgId(), edm::Event::put(), class-composition::Q, gen::PdfInfo::scalePDF, mathSSE::sqrt(), mps_update::status, reco::LeafCandidate::status(), useFirstAsDefault_, LHAPDF::usePDFMember(), create_public_lumi_plots::weights, gen::PdfInfo::x, globals_cff::x1, globals_cff::x2, LHAPDF::xfx(), and gen::PdfInfo::xPDF.
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
108 int id1 = pdfstuff->
pdf()->
id.first;
109 double x1 = pdfstuff->
pdf()->
x.first;
110 double pdf1 = pdfstuff->
pdf()->
xPDF.first;
112 int id2 = pdfstuff->
pdf()->
id.second;
113 double x2 = pdfstuff->
pdf()->
x.second;
114 double pdf2 = pdfstuff->
pdf()->
xPDF.second;
128 unsigned int gensize = genParticles->size();
130 for(
unsigned int i = 0;
i<gensize; ++
i) {
133 if (status!=3)
continue;
134 int id = part.
pdgId();
135 if (
id!=23 &&
abs(
id)!=24)
continue;
136 mboson = part.
mass();
139 Q =
sqrt(mboson*mboson+Q*Q);
147 std::unique_ptr<std::vector<double> >
weights (
new std::vector<double>);
148 unsigned int nweights = 1;
152 for (
unsigned int i=0;
i<nweights; ++
i) {
156 weights->push_back(newpdf1/pdf1*newpdf2/pdf2);
int pdgId() const final
PDG identifier.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::pair< double, double > x
edm::EDGetTokenT< reco::GenParticleCollection > genToken_
std::vector< std::string > pdfSetNames_
std::pair< double, double > xPDF
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< GenEventInfoProduct > pdfInfoToken_
edm::InputTag pdfInfoTag_
std::vector< std::string > pdfShortNames_
double xfx(int nset, double x, double Q, int fl)
int status() const final
status word
double mass() const final
mass
void usePDFMember(int nset, int member)