ATLAS Offline Software
Loading...
Searching...
No Matches
JetVar::VectorValue Struct Reference

VectorValue is a helper class to access any jet variable of type vector<X> It is implemented this way, so it is cheap to copy and can be returned from a const method. More...

#include <JetVariable.h>

Collaboration diagram for JetVar::VectorValue:

Classes

struct  VectorWrapper

Public Member Functions

 VectorValue (VectorWrapper *v=nullptr, float s=1.)
float operator[] (int i) const
size_t size () const

Public Attributes

std::unique_ptr< VectorWrapperm_v
float m_scale =1

Detailed Description

VectorValue is a helper class to access any jet variable of type vector<X> It is implemented this way, so it is cheap to copy and can be returned from a const method.

(there's possibly a simpler implementation...)

Definition at line 37 of file JetVariable.h.

Constructor & Destructor Documentation

◆ VectorValue()

JetVar::VectorValue::VectorValue ( VectorWrapper * v = nullptr,
float s = 1. )
inline

Definition at line 43 of file JetVariable.h.

43: m_v(v), m_scale(s){}
std::unique_ptr< VectorWrapper > m_v
Definition JetVariable.h:46

Member Function Documentation

◆ operator[]()

float JetVar::VectorValue::operator[] ( int i) const
inline

Definition at line 44 of file JetVariable.h.

44{return m_v->at(i)*m_scale;}

◆ size()

size_t JetVar::VectorValue::size ( ) const
inline

Definition at line 45 of file JetVariable.h.

45{return m_v->size();}

Member Data Documentation

◆ m_scale

float JetVar::VectorValue::m_scale =1

Definition at line 47 of file JetVariable.h.

◆ m_v

std::unique_ptr<VectorWrapper> JetVar::VectorValue::m_v

Definition at line 46 of file JetVariable.h.


The documentation for this struct was generated from the following file: