Skip to content

Commit

Permalink
Merge pull request cms-sw#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 authored and hroskes committed Feb 12, 2015
1 parent 18b5c28 commit d0badec
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 d0badec

Please sign in to comment.