Skip to content

Commit

Permalink
Add parton shower weights class
Browse files Browse the repository at this point in the history
  • Loading branch information
kdlong committed Oct 3, 2019
1 parent c535b55 commit 3e48617
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#ifndef SimDataFormats_GeneratorProducts_PartonShowerWeightGroupInfo_h
#define SimDataFormats_GeneratorProducts_PartonShowerWeightGroupInfo_h

#include "SimDataFormats/GeneratorProducts/interface/WeightGroupInfo.h"

namespace gen {
class PartonShowerWeightGroupInfo : public WeightGroupInfo {
public:
PartonShowerWeightGroupInfo() : PartonShowerWeightGroupInfo("") {}
PartonShowerWeightGroupInfo(std::string header, std::string name) :
WeightGroupInfo(header, name) {
weightType_ = kPartonShowerWeights;
}
PartonShowerWeightGroupInfo(std::string header) :
PartonShowerWeightGroupInfo(header, header) { }
PartonShowerWeightGroupInfo(const PartonShowerWeightGroupInfo &other) {
copy(other);
}
virtual ~PartonShowerWeightGroupInfo() override {}
void copy(const PartonShowerWeightGroupInfo &other);
virtual PartonShowerWeightGroupInfo* clone() const override;

// Is a variation of the functional form of the dynamic scale
};
}

#endif


Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ namespace gen {
void copy(const ScaleWeightGroupInfo &other);
virtual ScaleWeightGroupInfo* clone() const override;

void setMuRMuFIndex(WeightMetaInfo info, float muR, float muF);
void addContainedId(int weightEntry, std::string id, std::string label, float muR, float muF);
void setMuRMuFIndex(WeightMetaInfo info, float muR, float muF);
void addContainedId(int weightEntry, std::string id, std::string label, float muR, float muF);

// Is a variation of the functional form of the dynamic scale
bool isFunctionalFormVariation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace gen {
kScaleWeights,
kMatrixElementWeights,
kUnknownWeights,
kShowerWeights,
kPartonShowerWeights,
};

class WeightGroupInfo {
Expand Down
12 changes: 12 additions & 0 deletions SimDataFormats/GeneratorProducts/src/PartonShowerWeights.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#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);
}
}

1 change: 1 addition & 0 deletions SimDataFormats/GeneratorProducts/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "SimDataFormats/GeneratorProducts/interface/ScaleWeightGroupInfo.h"
#include "SimDataFormats/GeneratorProducts/interface/UnknownWeightGroupInfo.h"
#include "SimDataFormats/GeneratorProducts/interface/PdfWeightGroupInfo.h"
#include "SimDataFormats/GeneratorProducts/interface/PartonShowerWeightGroupInfo.h"
#include "SimDataFormats/GeneratorProducts/interface/GenWeightInfoProduct.h"
#include "SimDataFormats/GeneratorProducts/interface/GenWeightProduct.h"
#include "SimDataFormats/GeneratorProducts/interface/LHEXMLStringProduct.h"
Expand Down
2 changes: 2 additions & 0 deletions SimDataFormats/GeneratorProducts/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
<class name="gen::WeightGroupInfo"/>
<class name="gen::UnknownWeightGroupInfo"/>
<class name="gen::PdfWeightGroupInfo"/>
<class name="gen::PartonShowerWeightGroupInfo"/>
<class name="gen::ScaleWeightGroupInfo"/>
<class name="gen::WeightMetaInfo"/>
<class name="std::vector<gen::WeightsInfo>"/>
Expand All @@ -234,6 +235,7 @@
<class name="edm::Wrapper<gen::WeightGroupInfo>"/>
<class name="edm::Wrapper<gen::UnknownWeightGroupInfo>"/>
<class name="edm::Wrapper<gen::PdfWeightGroupInfo>"/>
<class name="edm::Wrapper<gen::PartonShowerWeightGroupInfo>"/>
<class name="edm::Wrapper<gen::ScaleWeightGroupInfo>"/>
<class name="edm::ClonePolicy<gen::WeightGroupInfo>"/>
<class name="edm::OwnVector<gen::WeightGroupInfo, edm::ClonePolicy<gen::WeightGroupInfo> >"/>
Expand Down

0 comments on commit 3e48617

Please sign in to comment.