EDM4eic
EIC data model
Loading...
Searching...
No Matches
Cov2f.h
Go to the documentation of this file.
1
// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3
#ifndef EDM4EIC_Cov2f_H
4
#define EDM4EIC_Cov2f_H
5
6
#include <ostream>
7
8
#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
9
#include "nlohmann/json_fwd.hpp"
10
#endif
11
12
namespace
edm4eic
{
13
14
/** @class Cov2f
15
*
16
* @author:
17
*/
18
class
Cov2f
{
19
public
:
20
float
xx
{};
21
float
yy
{};
22
float
xy
{};
23
24
Cov2f
() :
xx
{0},
yy
{0},
xy
{0} {}
25
Cov2f
(
double
vx,
double
vy,
double
vxy = 0)
26
:
xx
{static_cast<float>(vx)},
yy
{static_cast<float>(vy)},
xy
{static_cast<float>(vxy)} {}
27
float
operator()
(
unsigned
i,
unsigned
j)
const
{
28
// diagonal
29
if
(i == j) {
30
return
*(&
xx
+ i);
31
}
32
// off-diagonal
33
// we have as options (0, 1), and (1, 0)
34
// note that, starting from xy, we find the correct element at (i+j+1)/2)
35
return
*(&
xy
+ (i + j + 1) / 2);
36
}
37
38
39
};
40
41
std::ostream&
operator<<
(std::ostream& o,
const
edm4eic::Cov2f
& value);
42
43
#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
44
void
to_json(nlohmann::json& j,
const
Cov2f& value);
45
#endif
46
47
}
// namespace edm4eic
48
49
50
#endif
edm4eic::Cov2f
Definition
Cov2f.h:18
edm4eic::Cov2f::operator()
float operator()(unsigned i, unsigned j) const
Definition
Cov2f.h:27
edm4eic::Cov2f::Cov2f
Cov2f()
Definition
Cov2f.h:24
edm4eic::Cov2f::yy
float yy
Definition
Cov2f.h:21
edm4eic::Cov2f::xx
float xx
Definition
Cov2f.h:20
edm4eic::Cov2f::Cov2f
Cov2f(double vx, double vy, double vxy=0)
Definition
Cov2f.h:25
edm4eic::Cov2f::xy
float xy
Definition
Cov2f.h:22
edm4eic
Definition
CalorimeterHit.cc:18
edm4eic::operator<<
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition
CalorimeterHit.cc:97
build
edm4eic
Cov2f.h
Generated by
1.11.0