ATLAS Offline Software
Loading...
Searching...
No Matches
JetHistoVarTool.h
Go to the documentation of this file.
1/* this file is -*- C++ -*-
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JETMONITORING_JETVARTOOL_H
6#define JETMONITORING_JETVARTOOL_H
7
9
10#include "GaudiKernel/IAlgTool.h"
12
14
15
16static const InterfaceID IID_IJetHistoVarTool("IJetHistoVarTool", 1 , 0);
17
26
27class IJetHistoVarTool : virtual public IAlgTool
28{
29public:
30
31 // Retrieve interface ID
32 static const InterfaceID& interfaceID() { return IID_IJetHistoVarTool; }
33
35
37 virtual float value(const xAOD::Jet &) const = 0;
39 virtual const JetVar::Variable * variable() const = 0;
41 virtual std::string describe() const =0;
42};
43
44
45class JetHistoVarTool : public AthAlgTool, virtual public IJetHistoVarTool {
46public:
47 JetHistoVarTool( const std::string& type, const std::string & name ,const IInterface* parent);
48 virtual ~JetHistoVarTool(){}
49
50 virtual StatusCode initialize() ;
51
52 virtual float value(const xAOD::Jet &) const ;
53 virtual const JetVar::Variable * variable() const {return m_v.get();};
54 virtual std::string describe() const {
55 return m_name+", "+m_type+","+std::to_string(m_index);
56 }
57
58
59private:
60
61 std::unique_ptr<JetVar::Variable> m_v;
62
63 Gaudi::Property<std::string> m_name {this,"Name", ""};
64 Gaudi::Property<std::string> m_type {this,"Type", "float"};
65 Gaudi::Property<int> m_index {this,"Index", -1};
66 Gaudi::Property<float> m_scale {this,"Scale", 1.};
67
68};
69
70
71#endif
static const InterfaceID IID_IJetHistoVarTool("IJetHistoVarTool", 1, 0)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
virtual std::string describe() const =0
a compact description of the variable.
static const InterfaceID & interfaceID()
virtual const JetVar::Variable * variable() const =0
The actual variable represented by this tool.
virtual ~IJetHistoVarTool()
virtual float value(const xAOD::Jet &) const =0
the value of the variable for a given Jet
virtual const JetVar::Variable * variable() const
The actual variable represented by this tool.
Gaudi::Property< float > m_scale
virtual StatusCode initialize()
virtual ~JetHistoVarTool()
virtual float value(const xAOD::Jet &) const
the value of the variable for a given Jet
Gaudi::Property< int > m_index
std::unique_ptr< JetVar::Variable > m_v
Gaudi::Property< std::string > m_name
JetHistoVarTool(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< std::string > m_type
virtual std::string describe() const
a compact description of the variable.
The goal of this class is to define a common way to access any "jet variable".
Definition JetVariable.h:51
Jet_v1 Jet
Definition of the current "jet version".