forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#16 from dteague/from-CMSSW_11_1_0_pre2
GenWeight Parsing
- Loading branch information
Showing
9 changed files
with
198 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
SimDataFormats/GeneratorProducts/src/PartonShowerWeightGroupInfo.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "SimDataFormats/GeneratorProducts/interface/PartonShowerWeightGroupInfo.h" | ||
|
||
namespace gen { | ||
void PartonShowerWeightGroupInfo::copy(const PartonShowerWeightGroupInfo& other) { WeightGroupInfo::copy(other); } | ||
|
||
PartonShowerWeightGroupInfo* PartonShowerWeightGroupInfo::clone() const { | ||
return new PartonShowerWeightGroupInfo(*this); | ||
} | ||
|
||
void PartonShowerWeightGroupInfo::updateWeight(int globalIndex, std::string id, std::string subName, bool isUp) { | ||
size_t localIndex = weightMetaInfoByGlobalIndex(id, globalIndex).localIndex; | ||
if (weightNameToUpDown.find(subName) == weightNameToUpDown.end()) { | ||
weightNames.push_back(subName); | ||
weightNameToUpDown[subName] = std::pair<size_t, size_t>(); | ||
} | ||
if (isUp) | ||
weightNameToUpDown[subName].first = localIndex; | ||
else | ||
weightNameToUpDown[subName].second = localIndex; | ||
} | ||
|
||
} // namespace gen |
Oops, something went wrong.