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

adjust weight for multiple hadronization also for HepMC GenEvent #7094

Merged
merged 1 commit into from Jan 8, 2015
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
8 changes: 7 additions & 1 deletion GeneratorInterface/Core/interface/HadronizerFilter.h
Expand Up @@ -260,9 +260,15 @@ namespace edm

//adjust event weights if necessary (in case input event was attempted multiple times)
if (nAttempts_>1) {
double multihadweight = double(naccept)/double(nAttempts_);

//adjust weight for GenEventInfoProduct
std::vector<double> genEventInfoWeights = finalGenEventInfo->weights();
genEventInfoWeights.push_back(double(naccept)/double(nAttempts_));
genEventInfoWeights.push_back(multihadweight);
finalGenEventInfo->setWeights(genEventInfoWeights);

//adjust weight for HepMC GenEvent (used e.g for RIVET)
finalEvent->weights().push_back(multihadweight);
}


Expand Down