#include <JetVariable.h>
Definition at line 200 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.
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);
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);
◆ 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()
Implements JetVar::Variable.
Definition at line 202 of file JetVariable.h.
203 float constitScaleEnergy = 0.;
204 std::vector<float> samplingFrac;
212 if(
status )
return (samplingFrac[3]+samplingFrac[7])/constitScaleEnergy;
◆ Variable()
JetVar::Variable::Variable |
|
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: