File indexing completed on 2025-09-17 08:55:16
0001
0002
0003 #ifndef EDM4HEP_TrackState_H
0004 #define EDM4HEP_TrackState_H
0005
0006 #include "edm4hep/CovMatrix6f.h"
0007 #include "edm4hep/Vector3f.h"
0008 #include <edm4hep/Constants.h>
0009 #include <cstdint>
0010 #include <ostream>
0011
0012 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0013 #include "nlohmann/json_fwd.hpp"
0014 #endif
0015
0016 namespace edm4hep {
0017
0018
0019
0020
0021
0022 class TrackState {
0023 public:
0024 std::int32_t location{};
0025 float D0{};
0026 float phi{};
0027 float omega{};
0028 float Z0{};
0029 float tanLambda{};
0030 float time{};
0031 ::edm4hep::Vector3f referencePoint{};
0032 ::edm4hep::CovMatrix6f covMatrix{};
0033
0034 static const int AtOther = 0 ;
0035 static const int AtIP = 1 ;
0036 static const int AtFirstHit = 2 ;
0037 static const int AtLastHit = 3 ;
0038 static const int AtCalorimeter = 4 ;
0039 static const int AtVertex = 5 ;
0040 static const int LastLocation = AtVertex ;
0041
0042
0043 constexpr float getCovMatrix(edm4hep::TrackParams parI, edm4hep::TrackParams parJ) const { return covMatrix.getValue(parI, parJ); }
0044
0045 constexpr void setCovMatrix(float value, edm4hep::TrackParams parI, edm4hep::TrackParams parJ) { covMatrix.setValue(value, parI, parJ); }
0046
0047 };
0048
0049 std::ostream& operator<<(std::ostream& o, const edm4hep::TrackState& value);
0050
0051 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0052 void to_json(nlohmann::json& j, const TrackState& value);
0053 #endif
0054
0055 }
0056
0057
0058 #endif