Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:12:47

0001 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
0002 
0003 #ifndef EDM4EIC_Cov6f_H
0004 #define EDM4EIC_Cov6f_H
0005 
0006 #include <array>
0007 #include <ostream>
0008 
0009 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0010 #include "nlohmann/json_fwd.hpp"
0011 #endif
0012 
0013 namespace edm4eic {
0014 
0015 
0016 /** @class Cov6f
0017  *  
0018  *  @author: 
0019  */
0020 class Cov6f {
0021 public:
0022   std::array<float, 21> covariance{}; ///< 6d triangular packed covariance matrix
0023 
0024  Cov6f() : covariance{} {}
0025  Cov6f(std::array<float, 21> vcov) : covariance{vcov}{}
0026  float operator()(unsigned i, unsigned j) const {
0027  if(i > j) {
0028  std::swap(i, j);
0029  }
0030  return covariance[i + 1 + (j + 1) * (j) / 2 - 1];
0031  }
0032  float& operator()(unsigned i, unsigned j) {
0033  if(i > j) {
0034  std::swap(i, j);
0035  }
0036  return covariance[i + 1 + (j + 1) * (j) / 2 - 1];
0037  }
0038  
0039 
0040 };
0041 
0042 std::ostream& operator<<(std::ostream& o, const Cov6f& value);
0043 
0044 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0045 void to_json(nlohmann::json& j, const Cov6f& value);
0046 #endif
0047 
0048 namespace v850 {
0049 using Cov6f = edm4eic::Cov6f;
0050 } // namespace v850
0051 
0052 
0053 } // namespace edm4eic
0054 
0055 
0056 #endif