ATLAS Offline Software
Loading...
Searching...
No Matches
HistoInput3D.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JETTOOLHELPERS_HISTOINPUT3D_H
6#define JETTOOLHELPERS_HISTOINPUT3D_H
7
8#include "TH1.h"
9#include "AsgTools/AsgTool.h"
10
12#include "AsgTools/ToolHandle.h"
14
15#include <vector>
16#include <string>
17#include <memory>
18
19namespace JetHelper {
20
23
25{
27
28 public:
30 HistoInput3D(const std::string& name);
32 virtual StatusCode initialize() override;
34 virtual float getValue(const xAOD::Jet& jet, const JetContext& event) const override;
37 virtual bool runUnitTests() const;
38
39 private:
40
42 ToolHandle<IVarTool> m_varTool1 {this, "varTool1", "VarTool", "InputVariable 1 instance" };
44 ToolHandle<IVarTool> m_varTool2 {this, "varTool2", "VarTool", "InputVariable 2 instance" };
46 ToolHandle<IVarTool> m_varTool3 {this, "varTool3", "VarTool", "InputVariable 3 instance" };
47 // Variable and function to cache projections in case of 1-D interpolaton in 3-D
48 std::vector< std::unique_ptr<TH1> > m_cachedProj;
49 std::vector< std::vector< std::unique_ptr<TH1> > > m_cachedProj2;
50 StatusCode cacheProjections();
51};
52} // namespace JetHelper
53#endif
54
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
ToolHandle< IVarTool > m_varTool3
interface for jet InputVariable to be defined by user, correspond to axis Z of hist
virtual StatusCode initialize() override
Function initialising the tool.
StatusCode cacheProjections()
ToolHandle< IVarTool > m_varTool1
interface for jet InputVariable to be defined by user, correspond to axis X of hist
std::vector< std::unique_ptr< TH1 > > m_cachedProj
ToolHandle< IVarTool > m_varTool2
interface for jet InputVariable to be defined by user, correspond to axis Y of hist
std::vector< std::vector< std::unique_ptr< TH1 > > > m_cachedProj2
virtual bool runUnitTests() const
standalone test, no implemented yet
virtual float getValue(const xAOD::Jet &jet, const JetContext &event) const override
return value of histogram at jet variable
HistoInput3D(const std::string &name)
Constructor for standalone usage.
HistoInputBase(const std::string &myname)
Constructor for standalone usage.
virtual float getValue(const xAOD::Jet &jet, const JetContext &jc) const =0
Class JetContext Designed to read AOD information related to the event, N vertices,...
Definition JetContext.h:24
class IJetCalibStep
Jet_v1 Jet
Definition of the current "jet version".