EDM4eic
EIC data model
Loading...
Searching...
No Matches
Cov6f.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_Cov6f_H
4#define EDM4EIC_Cov6f_H
5
6#include <array>
7#include <ostream>
8
9#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
10#include "nlohmann/json_fwd.hpp"
11#endif
12
13namespace edm4eic {
14
15
16/** @class Cov6f
17 *
18 * @author:
19 */
20class Cov6f {
21public:
22 std::array<float, 21> covariance{}; ///< 6d triangular packed covariance matrix
23
25 Cov6f(std::array<float, 21> vcov) : covariance{vcov}{}
26 float operator()(unsigned i, unsigned j) const {
27 if(i > j) {
28 std::swap(i, j);
29 }
30 return covariance[i + 1 + (j + 1) * (j) / 2 - 1];
31 }
32 float& operator()(unsigned i, unsigned j) {
33 if(i > j) {
34 std::swap(i, j);
35 }
36 return covariance[i + 1 + (j + 1) * (j) / 2 - 1];
37 }
38
39
40};
41
42std::ostream& operator<<(std::ostream& o, const Cov6f& value);
43
44#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
45void to_json(nlohmann::json& j, const Cov6f& value);
46#endif
47
48namespace v850 {
50} // namespace v850
51
52
53} // namespace edm4eic
54
55
56#endif
Definition Cov6f.h:20
std::array< float, 21 > covariance
6d triangular packed covariance matrix
Definition Cov6f.h:22
Cov6f(std::array< float, 21 > vcov)
Definition Cov6f.h:25
float operator()(unsigned i, unsigned j) const
Definition Cov6f.h:26
Cov6f()
Definition Cov6f.h:24
float & operator()(unsigned i, unsigned j)
Definition Cov6f.h:32
edm4eic::Cov6f Cov6f
Definition Cov6f.h:49
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:99