Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:12:02

0001 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
0002 
0003 #ifndef EDM4EIC_Cov3f_H
0004 #define EDM4EIC_Cov3f_H
0005 
0006 #include <ostream>
0007 
0008 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0009 #include "nlohmann/json_fwd.hpp"
0010 #endif
0011 
0012 namespace edm4eic {
0013 
0014 
0015 /** @class Cov3f
0016  *  
0017  *  @author: 
0018  */
0019 class Cov3f {
0020 public:
0021   float xx{};
0022   float yy{};
0023   float zz{};
0024   float xy{};
0025   float xz{};
0026   float yz{};
0027 
0028  Cov3f() : xx{0}, yy{0}, zz{0}, xy{0}, xz{0}, yz{0} {}
0029  Cov3f(double vx, double vy, double vz, double vxy = 0, double vxz = 0, double vyz = 0)
0030  : xx{static_cast<float>(vx)}, yy{static_cast<float>(vy)}, zz{static_cast<float>(vz)},
0031  xy{static_cast<float>(vxy)}, xz{static_cast<float>(vxz)}, yz{static_cast<float>(vyz)} {}
0032  float operator()(unsigned i, unsigned j) const {
0033  // diagonal
0034  if (i == j) {
0035  return *(&xx + i);
0036  }
0037  // off-diagonal
0038  // we have as options (0, 1), (0, 2) and (1, 2) (and mirrored)
0039  // note that, starting from xy, we find the correct element at (i+j-1)
0040  return *(&xy + i + j - 1);
0041  }
0042  
0043 
0044 };
0045 
0046 std::ostream& operator<<(std::ostream& o, const Cov3f& value);
0047 
0048 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0049 void to_json(nlohmann::json& j, const Cov3f& value);
0050 #endif
0051 
0052 namespace v850 {
0053 using Cov3f = edm4eic::Cov3f;
0054 } // namespace v850
0055 
0056 
0057 } // namespace edm4eic
0058 
0059 
0060 #endif