ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetMonitoring
src
JetVariable.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
JetMonitoring/JetVariable.h
"
6
7
8
namespace
JetVar
{
9
10
std::unique_ptr<Variable>
Variable::create
(
const
std::string &
name
,
const
std::string &
type
,
int
index
){
11
12
// if known name, return the corresponding dedicated class
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
// Else assume we're looking for an attribute attached to the jet
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
}
33
34
35
}
JetVariable.h
JetVar::Variable::name
virtual std::string name() const
Definition
JetVariable.h:65
JetVar::Variable::create
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
JetVariable.cxx:10
JetVar
Definition
JetSelectorAttribute.h:15
index
Definition
index.py:1
type
Generated on
for ATLAS Offline Software by
1.17.0