ATLAS Offline Software
Loading...
Searching...
No Matches
PMGSherpaVjetsSysTool.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id: PMGSherpaVjetsSysTool.h tripiana $
8//
9// Tool calculating event weights for systematic variations of Sherpa V+jets (V=Z,W,gamma) samples
10//
11// @author Martin Tripiana <martin.tripiana@cern.ch>
12// John Anders <john.kenneth.anders@cern.ch>
13//
14// $Date: 2016-07-12 $
15//
16
17#ifndef PMGTOOLS_PMGSHERPAVJETSSYSTOOL_H
18#define PMGTOOLS_PMGSHERPAVJETSSYSTOOL_H
19
20// Infrastructure include(s):
21#include "AsgTools/AsgTool.h"
22
23// Interface include(s):
25
26// System include(s):
27#include <map>
28#include <vector>
29#include <memory>
30
31// ROOT include(s):
32#include "TFile.h"
33
34// Forward declaration
35class TH2F;
36
37namespace PMGTools {
38
40 public asg::AsgTool {
41
42 //proper constructor for athena
44
45 public:
47 PMGSherpaVjetsSysTool( const std::string& name );
48
50 StatusCode initialize() override;
51
53 double getWeight( const std::string& sysVariation = "nom") override;
54
55 protected:
57 void setNjets(int njets) override;
58 void cacheDSID(bool do_it=true) override;
59
61 std::vector<std::string> getSupportedVariations(SysParType ptype) override;
62
64 unsigned int getNtruthJets() override;
65
66 private:
67 int getPtMapping(SysParType& pType);
68
71
75 unsigned int m_cache_ptidx;
76
78 std::unique_ptr< TFile > m_file;
79
81 std::map<std::string, TH2F*> m_map_w;
82 std::map<std::string, TH2F*> m_map_zll;
83 std::map<std::string, TH2F*> m_map_znunu;
84 std::map<std::string, TH2F*> m_map_gamma;
85
86 std::vector<std::string> m_supported_w;
87 std::vector<std::string> m_supported_zll;
88 std::vector<std::string> m_supported_znunu;
89 std::vector<std::string> m_supported_gamma;
90
92
94 std::string m_weightsFile;
95
100
101 }; // class PMGSherpaVjetsSysTool
102
103} //namespace PMGTools
104
105#endif //> !PMGTOOLS_PMGSHERPAVJETSSYSTOOL_H
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
std::string m_truthJetContainer
The truth jet container to use for the calculation.
std::string m_truthParticleContainer
The truth particle container to use for the calculation.
std::map< std::string, TH2F * > m_map_zll
unsigned int getNtruthJets() override
get number of truth jets as defined in the parametrization analysis
PMGSherpaVjetsSysTool(const std::string &name)
Standard tool constructor, with name.
std::vector< std::string > m_supported_gamma
std::vector< std::string > getSupportedVariations(SysParType ptype) override
Helpers to get the list of supported variations for Z/W+jets and gamma+jets.
std::vector< std::string > m_supported_zll
StatusCode initialize() override
Initialize is required by AsgTool base class.
std::string m_weightsFile
Tool properties.
std::vector< std::string > m_supported_w
std::map< std::string, TH2F * > m_map_gamma
std::map< std::string, TH2F * > m_map_w
Parametrization maps.
void cacheDSID(bool do_it=true) override
double getWeight(const std::string &sysVariation="nom") override
Return weight for a given systematic variation.
std::map< std::string, TH2F * > m_map_znunu
void setNjets(int njets) override
Some setters to speed up the calculation for multiple variations/events.
bool m_use_cache
Cache MC DSID (to avoid checking it everytime)
std::vector< std::string > m_supported_znunu
std::unique_ptr< TFile > m_file
Parametrization files.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Tool providing sample cross-sections and k-factors etc.