#include <JetVariable.h>
|
| 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.
|
Definition at line 161 of file JetVariable.h.
◆ create()
| std::unique_ptr< Variable > Variable::create |
( |
const std::string & | name, |
|
|
const std::string & | type = "float", |
|
|
int | index = -1 ) |
|
staticinherited |
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.
10 {
11
12
13 if(
name==
"e")
return std::make_unique<EVar>(
name);
14 if(
name==
"et")
return std::make_unique<EtVar>(
name);
15 if(
name==
"pz")
return std::make_unique<PzVar>(
name);
16 if(
name==
"nconstit")
return std::make_unique<NconstitVar>(
name);
17 if(
name==
"abseta")
return std::make_unique<AbsEtaVar>(
name);
18 if(
name==
"|eta|")
return std::make_unique<AbsEtaVar>(
name);
19 if(
name==
"rapidity")
return std::make_unique<Rapidity>(
name);
20 if(
name==
"fCharged")
return std::make_unique<FChargedVar>(
name);
21 if(
name==
"EM3Frac")
return std::make_unique<EM3FracVar>(
name);
22 if(
name==
"Tile0Frac")
return std::make_unique<Tile0FracVar>(
name);
23
24
25 if(type==
"float")
return std::make_unique<VariableAtt<float> >(
name);
26 if(type==
"int")
return std::make_unique<VariableAtt<int> >(
name);
27 if(type==
"vecfloat")
return std::make_unique<VariableAtt<std::vector<float> > >(
name,
index);
28 if(type==
"vecint")
return std::make_unique<VariableAtt< std::vector<int> > >(
name,
index);
29
30
31 return nullptr;
32 }
virtual std::string name() const
◆ isVector()
| virtual bool JetVar::Variable::isVector |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ name()
| virtual std::string JetVar::Variable::name |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ scale()
| float JetVar::Variable::scale |
( |
| ) |
const |
|
inlineinherited |
◆ setScale()
| void JetVar::Variable::setScale |
( |
float | s | ) |
|
|
inlineinherited |
◆ value()
| virtual float JetVar::PzVar::value |
( |
const xAOD::Jet & | j | ) |
const |
|
inlinevirtual |
◆ Variable()
| JetVar::Variable::Variable |
( |
const std::string & | name | ) |
|
|
inline |
◆ vector()
◆ m_index
| int JetVar::Variable::m_index = -1 |
|
inherited |
◆ m_name
| std::string JetVar::Variable::m_name |
|
inherited |
◆ m_scale
| float JetVar::Variable::m_scale = 1 |
|
inherited |
The documentation for this struct was generated from the following file: