-
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.
- Loading branch information
Showing
5 changed files
with
66 additions
and
6 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
44 changes: 44 additions & 0 deletions
44
SimDataFormats/GeneratorProducts/interface/PdfWeightGroupInfo.h
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,44 @@ | ||
#ifndef SimDataFormats_GeneratorProducts_PdfWeightGroupInfo_h | ||
#define SimDataFormats_GeneratorProducts_PdfWeightGroupInfo_h | ||
|
||
#include "SimDataFormats/GeneratorProducts/interface/WeightGroupInfo.h" | ||
|
||
namespace gen { | ||
enum PdfUncertaintyType { | ||
kHessianUnc, | ||
kMonteCarloUnc, | ||
kUnknownUnc, | ||
}; | ||
|
||
class PdfWeightGroupInfo : public WeightGroupInfo { | ||
private: | ||
PdfUncertaintyType uncertaintyType_; | ||
bool hasAlphasVars_; | ||
int alphasUpIndex_; | ||
int alphasDownIndex_; | ||
public: | ||
PdfWeightGroupInfo() : WeightGroupInfo() { weightType_ = kPdfWeights; } | ||
PdfWeightGroupInfo(std::string header, std::string name) : | ||
WeightGroupInfo(header, name) { weightType_ = kPdfWeights; } | ||
PdfWeightGroupInfo(std::string header) : | ||
WeightGroupInfo(header) { weightType_ = kPdfWeights; } | ||
PdfWeightGroupInfo(const PdfWeightGroupInfo &other) { | ||
copy(other); | ||
} | ||
virtual ~PdfWeightGroupInfo() override {}; | ||
void copy(const PdfWeightGroupInfo &other); | ||
PdfWeightGroupInfo* clone() const; | ||
|
||
void setUncertaintyType(PdfUncertaintyType uncertaintyType) { uncertaintyType_ = uncertaintyType; } | ||
void setHasAlphasVariations(bool hasAlphasVars) { hasAlphasVars_ = hasAlphasVars; } | ||
void setAlphasUpIndex(int alphasUpIndex) { alphasUpIndex_ = alphasUpIndex; } | ||
void setAlphasDownIndex(int alphasDownIndex) { alphasDownIndex_ = alphasDownIndex; } | ||
PdfUncertaintyType uncertaintyType() const { return uncertaintyType_; } | ||
bool hasAlphasVariations() const { return hasAlphasVars_; } | ||
int alphasUpIndex() const { return alphasUpIndex_; } | ||
int alphasDownIndex() const { return alphasDownIndex_; } | ||
}; | ||
} | ||
|
||
#endif // SimDataFormats_GeneratorProducts_PdfWeightGroupInfo_h | ||
|
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
16 changes: 16 additions & 0 deletions
16
SimDataFormats/GeneratorProducts/src/PdfWeightGroupInfo.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,16 @@ | ||
#include <string> | ||
#include "SimDataFormats/GeneratorProducts/interface/PdfWeightGroupInfo.h" | ||
|
||
namespace gen { | ||
void PdfWeightGroupInfo::copy(const PdfWeightGroupInfo &other) { | ||
uncertaintyType_ = other.uncertaintyType(); | ||
hasAlphasVars_ = other.hasAlphasVariations(); | ||
alphasUpIndex_ = other.alphasDownIndex(); | ||
alphasDownIndex_ = other.alphasDownIndex(); | ||
WeightGroupInfo::copy(other); | ||
} | ||
|
||
PdfWeightGroupInfo* PdfWeightGroupInfo::clone() const { | ||
return new PdfWeightGroupInfo(*this); | ||
} | ||
} |
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