Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef JETMONITORING_JETVARIABLE_H
8 #define JETMONITORING_JETVARIABLE_H
40 virtual float at(
int)
const =0;
41 virtual size_t size()
const =0;
46 std::unique_ptr<VectorWrapper>
m_v;
74 static std::unique_ptr<Variable>
create(
const std::string &
name,
const std::string &
type=
"float",
int index=-1);
107 float at(
int i)
const {
return (*m_v)[
i];}
108 size_t size()
const {
return m_v->size();}
116 virtual std::string
name()
const {
146 const static inline vect_t s_dummy{-999};
190 float constScalePt = 0.;
191 std::vector<float> SumPtChargedPFOPt500;
194 status = j.
getAttribute<std::vector<float> >(
"SumPtChargedPFOPt500", SumPtChargedPFOPt500 );
196 return SumPtChargedPFOPt500.at(0)/=constScalePt;
203 float constitScaleEnergy = 0.;
204 std::vector<float> samplingFrac;
212 if(
status )
return (samplingFrac[3]+samplingFrac[7])/constitScaleEnergy;
220 float constitScaleEnergy = 0.;
221 std::vector<float> samplingFrac;
229 if(
status )
return (samplingFrac[12]+samplingFrac[18])/constitScaleEnergy;
Helper class to provide type-safe access to aux data.
virtual float value(const xAOD::Jet &j) const
virtual float value(const xAOD::Jet &j) const
virtual bool isVector() const
return true if the underlying variable is of type vector<X>
virtual float at(int) const =0
virtual bool isVector() const
return true if the underlying variable is of type vector<X>
virtual float value(const xAOD::Jet &j) const
VectorValue is a helper class to access any jet variable of type vector<X> It is implemented this way...
virtual float value(const xAOD::Jet &j) const
virtual float value(const xAOD::Jet &j) const
std::unique_ptr< VectorWrapper > m_v
VectorWrapperT(const vect_t *v)
bool getAttribute(AttributeID type, T &value) const
Retrieve attribute moment by enum.
virtual float value(const xAOD::Jet &j) const
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.
virtual float value(const xAOD::Jet &j) const
float pz() const
The z-component of the jet's momentum.
virtual float value(const xAOD::Jet &j) const
virtual VectorValue vector(const xAOD::Jet &j) const
return a helper object allowing to iterate over the underlying vector. !!! use only if isVector()==tr...
VectorValue(VectorWrapper *v=nullptr, float s=1.)
virtual double rapidity() const
The true rapidity (y) of the particle.
Variable(const std::string &name)
virtual double eta() const
The pseudorapidity ( ) of the particle.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
virtual float value(const xAOD::Jet &j) const
std::string to_string(const DetectorType &type)
virtual std::string name() const
float operator[](int i) const
virtual float value(const xAOD::Jet &j) const
virtual float value(const xAOD::Jet &) const =0
virtual std::string name() const
virtual ~Variable()=default
virtual FourMom_t p4() const
The full 4-momentum of the particle.
virtual double e() const
The total energy of the particle.
virtual float value(const xAOD::Jet &j) const
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
VariableAtt(const std::string &name)
VariableAtt(const std::string &name, int index)
virtual size_t size() const =0
size_t numConstituents() const
Number of constituents in this jets (this is valid even when reading a file where the constituents ha...
virtual VectorValue vector(const xAOD::Jet &) const
return a helper object allowing to iterate over the underlying vector. !!! use only if isVector()==tr...