ATLAS Offline Software
|
#include <JetVariable.h>
Inherited by JetVar::AbsEtaVar, JetVar::EM3FracVar, JetVar::EtVar, JetVar::EVar, JetVar::FChargedVar, JetVar::NconstitVar, JetVar::PzVar, JetVar::Rapidity, JetVar::Tile0FracVar, JetVar::VariableAtt< T >, and JetVar::VariableAtt< std::vector< T > >.
Public Member Functions | |
Variable (const std::string &name) | |
virtual | ~Variable ()=default |
virtual float | value (const xAOD::Jet &) const =0 |
virtual bool | isVector () const |
return true if the underlying variable is of type vector<X> More... | |
virtual VectorValue | vector (const xAOD::Jet &) const |
return a helper object allowing to iterate over the underlying vector. !!! use only if isVector()==true !!! More... | |
virtual std::string | name () const |
float | scale () const |
void | setScale (float s) |
Static Public Member Functions | |
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. More... | |
Public Attributes | |
std::string | m_name |
float | m_scale = 1 |
int | m_index = -1 |
The goal of this class is to define a common way to access any "jet variable". Here "jet variable" is any quantity calculable from a single jet. Often this will be a jet attribute stored in the xAOD::Jet class, but it can also be kinematics (ex: rapidity()) or an other quantity. JetVar::Variable allows access to the variables independently of their type or implementation details. It can then be used in generic tools to fill histograms (JetHistoAttributeFiller) or to select Jets (JetHistoSelectSort).
JetVar::Variable is the base class providing the acces methods. Concrete classes derive from it, in particular VariableAtt is the generic (templated) class to access atributes stored in the xAOD::Jet object. The function JetVar::Variable::create() allows to dynamicaly instantiate a variable from a name and a type passed as strings.
Definition at line 51 of file JetVariable.h.
|
inline |
Definition at line 54 of file JetVariable.h.
|
virtualdefault |
|
static |
create and return a new Variable of a given name & type.
If type is a vector an index can be specified : the variable will behave as a non-vector Variable corresponding to the value at the given index
Definition at line 10 of file JetVariable.cxx.
|
inlinevirtual |
return true if the underlying variable is of type vector<X>
Reimplemented in JetVar::VariableAtt< std::vector< T > >.
Definition at line 59 of file JetVariable.h.
|
inlinevirtual |
Reimplemented in JetVar::VariableAtt< std::vector< T > >.
Definition at line 65 of file JetVariable.h.
|
inline |
Definition at line 67 of file JetVariable.h.
|
inline |
Definition at line 68 of file JetVariable.h.
|
inlinevirtual |
return a helper object allowing to iterate over the underlying vector. !!! use only if isVector()==true !!!
Reimplemented in JetVar::VariableAtt< std::vector< T > >.
Definition at line 62 of file JetVariable.h.
int JetVar::Variable::m_index = -1 |
Definition at line 78 of file JetVariable.h.
std::string JetVar::Variable::m_name |
Definition at line 76 of file JetVariable.h.
float JetVar::Variable::m_scale = 1 |
Definition at line 77 of file JetVariable.h.