-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove extraneous code in MEParamWeightGroup
- Loading branch information
Showing
2 changed files
with
1 addition
and
35 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
22 changes: 1 addition & 21 deletions
22
SimDataFormats/GeneratorProducts/src/MEParamWeightGroupInfo.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 |
---|---|---|
@@ -1,28 +1,8 @@ | ||
#include "SimDataFormats/GeneratorProducts/interface/MEParamWeightGroupInfo.h" | ||
|
||
#include <iostream> | ||
|
||
// To be expanded with more specific behaviours in the future | ||
namespace gen { | ||
void MEParamWeightGroupInfo::copy(const MEParamWeightGroupInfo& other) { WeightGroupInfo::copy(other); } | ||
|
||
MEParamWeightGroupInfo* MEParamWeightGroupInfo::clone() const { return new MEParamWeightGroupInfo(*this); } | ||
|
||
void MEParamWeightGroupInfo::updateWeight(int globalIndex, std::string id, double weight) { | ||
size_t localIndex = weightMetaInfoByGlobalIndex(id, globalIndex).localIndex; | ||
auto lower = | ||
std::lower_bound(massValue.begin(), massValue.end(), std::make_pair(weight, std::numeric_limits<int>::min())); | ||
massValue.insert(lower, std::make_pair(weight, localIndex)); | ||
isWellFormed_ = massValue.size() % 2 == 1; | ||
if (isWellFormed_) { | ||
numSigma = massValue.size() / 2; | ||
central = massValue.at(centralIdx).first; | ||
centralIdx = massValue.at(centralIdx).second; | ||
} | ||
} | ||
|
||
void MEParamWeightGroupInfo::updateWeight(int globalIndex, std::string id, std::vector<std::string>& content) { | ||
size_t localIndex = weightMetaInfoByGlobalIndex(id, globalIndex).localIndex; | ||
splitContent[localIndex] = content; | ||
} | ||
|
||
} // namespace gen |