ATLAS Offline Software
PMGSherpa22VJetsWeightTool.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: PMGSherpa22VJetsWeightTool.h 764400 2016-07-26 17:47:39Z tripiana $
8 #ifndef PMGTOOLS_PMGSHERPA22VJETSWEIGHTTOOL_H
9 #define PMGTOOLS_PMGSHERPA22VJETSWEIGHTTOOL_H
10 
11 // System include(s):
12 #include <array>
13 
14 // Infrastructure include(s):
15 #include "AsgTools/AsgTool.h"
16 
17 // Interface include(s):
19 
29 
30 namespace PMGTools {
31 
32  class PMGSherpa22VJetsWeightTool : public virtual IWeightTool,
33  public asg::AsgTool {
34 
35  public:
36  //constructor for athena can be created using special macro
38 
39 
40  PMGSherpa22VJetsWeightTool( const std::string& name =
41  "PMGSherpa22VJetsWeightTool" );
42 
45 
47  virtual StatusCode initialize() override final;
48 
50 
53 
62  virtual double getWeight() const override;
63 
65 
68 
70  double getSherpa22VJets_NJetCorrection( size_t ntag ) const;
73  double
74  getSherpa22VJets_NJetCorrection( const std::string &jetcontainer ) const;
76  size_t getSherpa22VJets_NJet( const std::string &jetcontainer ) const;
77 
79 
80  private:
82  static const size_t NJET_CORRECTION_BINS = 9;
84  std::array< double, NJET_CORRECTION_BINS > m_corrFactors;
85 
88 
90  std::string m_truthJetContainer;
93 
95 
96  }; // class PMGSherpa22VJetsWeightTool
97 
98 } //namespace PMGTools
99 
100 #endif //> !PMGTOOLS_PMGSHERPA22VJETSWEIGHTTOOL_H
PMGTools::PMGSherpa22VJetsWeightTool::getSherpa22VJets_NJetCorrection
double getSherpa22VJets_NJetCorrection(size_t ntag) const
Return correction for given jet multiplicity.
Definition: PMGSherpa22VJetsWeightTool.cxx:64
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PMGTools::PMGSherpa22VJetsWeightTool::PMGSherpa22VJetsWeightTool
PMGSherpa22VJetsWeightTool(const std::string &name="PMGSherpa22VJetsWeightTool")
Standard tool constructor, with name.
Definition: PMGSherpa22VJetsWeightTool.cxx:19
PMGTools::PMGSherpa22VJetsWeightTool::initialize
virtual StatusCode initialize() override final
Initialize is required by AsgTool base class.
Definition: PMGSherpa22VJetsWeightTool.cxx:31
PMGTools::PMGSherpa22VJetsWeightTool::getSherpa22VJets_NJet
size_t getSherpa22VJets_NJet(const std::string &jetcontainer) const
Function returns number of jets required for correction.
Definition: PMGSherpa22VJetsWeightTool.cxx:90
IWeightTool
Interface for tools that want to calculate a weight from different event information.
Definition: IWeightTool.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PMGTools
Tool providing sample cross-sections and k-factors etc.
Definition: AnalysisCommon/PMGTools/PMGTools/IPMGCrossSectionTool.h:15
PMGTools::PMGSherpa22VJetsWeightTool::m_corrFactors
std::array< double, NJET_CORRECTION_BINS > m_corrFactors
Correction factors used in the weight calculation.
Definition: PMGSherpa22VJetsWeightTool.h:84
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
IWeightTool.h
PMGTools::PMGSherpa22VJetsWeightTool::m_truthJetContainer
std::string m_truthJetContainer
The truth jet container to use for the calculation.
Definition: PMGSherpa22VJetsWeightTool.h:90
PMGTools::PMGSherpa22VJetsWeightTool
Definition: PMGSherpa22VJetsWeightTool.h:33
AsgTool.h
PMGTools::PMGSherpa22VJetsWeightTool::getWeight
virtual double getWeight() const override
Sherpa 2.2 V+jets jet multiplicity reweight to fix issue from scale settings used in pTV sliced sampl...
Definition: PMGSherpa22VJetsWeightTool.cxx:50
PMGTools::PMGSherpa22VJetsWeightTool::NJET_CORRECTION_BINS
static const size_t NJET_CORRECTION_BINS
Number of jet multiplicities that we have a correction for.
Definition: PMGSherpa22VJetsWeightTool.h:82
PMGTools::PMGSherpa22VJetsWeightTool::m_truthParticleContainer
std::string m_truthParticleContainer
The truth particle container to use for the calculation.
Definition: PMGSherpa22VJetsWeightTool.h:92