00001
00002
00004
00005 #ifndef PDFWEIGHT_H
00006 #define PDFWEIGHT_H
00007
00008
00009 #include "ReweightUtils/WeightToolBase.h"
00010
00011 namespace LHAPDF {
00012 class PDF;
00013 }
00014
00015 class PDFWeight : public WeightToolBase
00016 {
00018 ASG_TOOL_CLASS2( PDFWeight, IWeightTool, IObservableTool )
00019
00020 public:
00022 PDFWeight( const std::string& name );
00023
00025 virtual ~PDFWeight() {};
00026
00027 StatusCode initialize() override;
00028
00030 virtual double evaluate( const xAOD::IParticle* part ) const override;
00031
00033 virtual double getWeight() const override;
00034
00035
00036 private:
00037
00038 double computeWeight(const xAOD::EventInfo*) const;
00039
00040 std::string m_pdfName;
00041 std::string m_truthEventContainerName;
00042 std::string m_eventInfoName;
00043 float m_weight;
00044
00045 LHAPDF::PDF* m_pdf = 0;
00046
00047 int m_index;
00048 };
00049
00050 #endif //> !PDFWEIGHT_H