Skip to content

Commit

Permalink
Merge pull request #7094 from bendavid/multihadweightfix
Browse files Browse the repository at this point in the history
adjust weight for multiple hadronization also for HepMC GenEvent
  • Loading branch information
cmsbuild committed Jan 8, 2015
2 parents 54e626c + a8e9e10 commit b54858f
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit b54858f

Please sign in to comment.