ATLAS Offline Software
Loading...
Searching...
No Matches
JetHistoVarTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8JetHistoVarTool::JetHistoVarTool( const std::string& type, const std::string & name ,const IInterface* parent):
9 AthAlgTool( type, name, parent )
10
11{
12 declareInterface<IJetHistoVarTool>(this);
13
14
15}
16
18
19 if(m_name=="") m_name = name();
21
22 if (! bool(m_v) ) {
23 ATH_MSG_ERROR(" could not create Jet Variable "<< m_name << " type: "<< m_type << " index="<< m_index );
24 return StatusCode::FAILURE;
25 }
26 m_v->setScale(m_scale);
27 return StatusCode::SUCCESS;
28
29}
30
31
32float JetHistoVarTool::value(const xAOD::Jet &j) const {
33 return m_v->value(j) ;
34}
#define ATH_MSG_ERROR(x)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Property< float > m_scale
virtual StatusCode initialize()
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
static std::unique_ptr< Variable > create(const std::string &name, const std::string &type="float", int index=-1)
create and return a new Variable of a given name & type.
Jet_v1 Jet
Definition of the current "jet version".