00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef PMGTOOLS_PMGSHERPAVJETSSYSTOOL_H
00013 #define PMGTOOLS_PMGSHERPAVJETSSYSTOOL_H
00014
00015
00016 #include "AsgTools/AsgTool.h"
00017
00018
00019 #include "PMGTools/IPMGSherpaVjetsSysTool.h"
00020
00021
00022 #include <map>
00023 #include <vector>
00024 #include <memory>
00025
00026
00027 #include <TH2F.h>
00028 #include <TFile.h>
00029
00030 namespace PMGTools {
00031
00032 class PMGSherpaVjetsSysTool : public virtual IPMGSherpaVjetsSysTool,
00033 public asg::AsgTool {
00034
00035
00036 ASG_TOOL_CLASS( PMGSherpaVjetsSysTool, PMGTools::IPMGSherpaVjetsSysTool )
00037
00038 public:
00040 PMGSherpaVjetsSysTool( const std::string& name );
00041
00043 StatusCode initialize() override;
00044
00046 double getWeight( const std::string& sysVariation = "nom") override;
00047
00048 protected:
00050 void setNjets(int njets) override;
00051 void cacheDSID(bool do_it=true) override;
00052
00054 std::vector<std::string> getSupportedVariations(SysParType ptype) override;
00055
00057 unsigned int getNtruthJets() override;
00058
00059 private:
00060 int getPtMapping(SysParType& pType);
00061
00063 int m_current_njets;
00064
00066 bool m_use_cache;
00067 SysParType m_cache_ptype;
00068 unsigned int m_cache_ptidx;
00069
00071 std::unique_ptr< TFile > m_file;
00072
00074 std::map<std::string, TH2F*> m_map_w;
00075 std::map<std::string, TH2F*> m_map_zll;
00076 std::map<std::string, TH2F*> m_map_znunu;
00077 std::map<std::string, TH2F*> m_map_gamma;
00078
00079 std::vector<std::string> m_supported_w;
00080 std::vector<std::string> m_supported_zll;
00081 std::vector<std::string> m_supported_znunu;
00082 std::vector<std::string> m_supported_gamma;
00083
00085
00087 std::string m_weightsFile;
00088
00090 std::string m_truthJetContainer;
00092 std::string m_truthParticleContainer;
00093
00094 };
00095
00096 }
00097
00098 #endif //> !PMGTOOLS_PMGSHERPAVJETSSYSTOOL_H