Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of PDF reweighting supporting MadGraph use case, use first PDF as... #78

Merged
merged 1 commit into from Aug 6, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions ElectroWeakAnalysis/Utilities/src/PdfWeightProducer.cc
Expand Up @@ -28,6 +28,7 @@ class PdfWeightProducer : public edm::EDProducer {
virtual void endJob() ;

std::string fixPOWHEG_;
bool useFirstAsDefault_;
edm::InputTag genTag_;
edm::InputTag pdfInfoTag_;
std::vector<std::string> pdfSetNames_;
Expand All @@ -50,6 +51,7 @@ namespace LHAPDF {
/////////////////////////////////////////////////////////////////////////////////////
PdfWeightProducer::PdfWeightProducer(const edm::ParameterSet& pset) :
fixPOWHEG_(pset.getUntrackedParameter<std::string> ("FixPOWHEG", "")),
useFirstAsDefault_(pset.getUntrackedParameter<bool>("useFirstAsDefault",false)),
genTag_(pset.getUntrackedParameter<edm::InputTag> ("GenTag", edm::InputTag("genParticles"))),
pdfInfoTag_(pset.getUntrackedParameter<edm::InputTag> ("PdfInfoTag", edm::InputTag("generator"))),
pdfSetNames_(pset.getUntrackedParameter<std::vector<std::string> > ("PdfSetNames"))
Expand Down Expand Up @@ -106,6 +108,11 @@ void PdfWeightProducer::produce(edm::Event& iEvent, const edm::EventSetup&) {
int id2 = pdfstuff->pdf()->id.second;
double x2 = pdfstuff->pdf()->x.second;
double pdf2 = pdfstuff->pdf()->xPDF.second;
if (useFirstAsDefault_ && pdf1 == -1. && pdf2 == -1. ) {
LHAPDF::usePDFMember(1,0);
pdf1 = LHAPDF::xfx(1, x1, Q, id1)/x1;
pdf2 = LHAPDF::xfx(1, x2, Q, id2)/x2;
}

// Ad-hoc fix for POWHEG
if (fixPOWHEG_!="") {
Expand Down