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
00025 #include <TH2F.h>
00026 #include <TFile.h>
00027 #include <TObject.h>
00028 #include <TKey.h>
00029 #include <TIterator.h>
00030
00031 namespace PMGTools {
00032
00033 class PMGSherpaVjetsSysTool : public virtual IPMGSherpaVjetsSysTool,
00034 public asg::AsgTool {
00035
00036
00037
00038 ASG_TOOL_CLASS( PMGSherpaVjetsSysTool, PMGTools::IPMGSherpaVjetsSysTool )
00039
00040 public:
00042 PMGSherpaVjetsSysTool( const std::string& name );
00043 ~PMGSherpaVjetsSysTool(){};
00044
00046 StatusCode initialize();
00047
00049 double getWeight(std::string sysVariation = "nom");
00050
00051
00052 protected:
00053
00055 void setNjets(int njets);
00056 void cacheDSID(bool do_it=true);
00057
00059 std::vector<std::string> getSupportedVariations(SysParType ptype);
00060
00062 unsigned int getNtruthJets();
00063
00064 private:
00065
00066 int getPtMapping(SysParType& pType);
00067
00068
00070 int m_current_njets;
00071
00073 bool m_use_cache;
00074 SysParType m_cache_ptype;
00075 unsigned int m_cache_ptidx;
00076
00078 TFile* m_file;
00079
00081 std::map<std::string, TH2F*> m_map_w;
00082 std::map<std::string, TH2F*> m_map_zll;
00083 std::map<std::string, TH2F*> m_map_znunu;
00084 std::map<std::string, TH2F*> m_map_gamma;
00085
00086 std::vector<std::string> m_supported_w;
00087 std::vector<std::string> m_supported_zll;
00088 std::vector<std::string> m_supported_znunu;
00089 std::vector<std::string> m_supported_gamma;
00090
00092
00094 std::string m_weightsFile;
00095
00097 std::string m_truthJetContainer;
00099 std::string m_truthParticleContainer;
00100
00101
00102 };
00103
00104 }
00105
00106 #endif //> !PMGTOOLS_PMGSHERPAVJETSSYSTOOL_H