Skip to content

Commit

Permalink
adjust weight for multiple hadronization also for HepMC GenEvent (nee…
Browse files Browse the repository at this point in the history
…ded to get correct results with RIVET for example)
  • Loading branch information
bendavid committed Jan 8, 2015
1 parent 0fd81b7 commit a8e9e10
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 a8e9e10

Please sign in to comment.