3#ifndef EDM4EIC_MutableMeasurement2D_H
4#define EDM4EIC_MutableMeasurement2D_H
12#include "edm4hep/Vector2f.h"
13#include "podio/RelationRange.h"
17#include "podio/utilities/MaybeSharedPtr.h"
21#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
22#include "nlohmann/json_fwd.hpp"
70 const edm4hep::Vector2f&
getLoc()
const;
85 [[deprecated(
"use getSurface instead")]]
89 void setLoc(edm4hep::Vector2f value);
91 edm4hep::Vector2f&
getLoc();
93 [[deprecated(
"use getLoc instead")]]
94 edm4hep::Vector2f&
loc();
101 [[deprecated(
"use getTime instead")]]
109 [[deprecated(
"use getCovariance instead")]]
117 std::vector<edm4eic::TrackerHit>::const_iterator
hits_begin()
const;
118 std::vector<edm4eic::TrackerHit>::const_iterator
hits_end()
const;
119 podio::RelationRange<edm4eic::TrackerHit>
getHits()
const;
124 std::vector<float>::const_iterator
weights_end()
const;
125 podio::RelationRange<float>
getWeights()
const;
132 void unlink() { m_obj = podio::utils::MaybeSharedPtr<Measurement2DObj>{
nullptr}; }
149 swap(a.m_obj, b.m_obj);
156 podio::utils::MaybeSharedPtr<Measurement2DObj> m_obj{
nullptr};
159#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
160void to_json(nlohmann::json& j,
const MutableMeasurement2D& value);
Definition Measurement2DCollection.h:92
Definition Measurement2D.h:36
Definition Measurement2DCollection.h:63
Definition MutableMeasurement2D.h:34
std::size_t weights_size() const
Definition MutableMeasurement2D.cc:123
void setCovariance(edm4eic::Cov3f value)
Set the Covariance on location and time.
Definition MutableMeasurement2D.cc:65
void addToHits(const edm4eic::TrackerHit &)
Definition MutableMeasurement2D.cc:70
friend class Measurement2D
Definition MutableMeasurement2D.h:38
MutableMeasurement2D & operator=(MutableMeasurement2D other)
copy-assignment operator
Definition MutableMeasurement2D.cc:29
friend class Measurement2DCollection
Definition MutableMeasurement2D.h:36
MutableMeasurement2D()
default constructor
Definition MutableMeasurement2D.cc:18
bool operator!=(const Measurement2D &other) const
Definition MutableMeasurement2D.h:138
friend void swap(MutableMeasurement2D &a, MutableMeasurement2D &b)
Definition MutableMeasurement2D.h:147
float & time()
Get reference to Measurement time.
Definition MutableMeasurement2D.cc:64
std::vector< edm4eic::TrackerHit >::const_iterator hits_begin() const
Definition MutableMeasurement2D.cc:75
bool operator!=(const MutableMeasurement2D &other) const
Definition MutableMeasurement2D.h:137
edm4eic::Cov3f & covariance()
Get reference to Covariance on location and time.
Definition MutableMeasurement2D.cc:67
std::vector< edm4eic::TrackerHit >::const_iterator hits_end() const
Definition MutableMeasurement2D.cc:81
MutableMeasurement2D(const MutableMeasurement2D &other)=default
copy constructor
edm4hep::Vector2f & loc()
Get reference to 2D location on surface.
Definition MutableMeasurement2D.cc:61
bool isAvailable() const
check whether the object is actually available
Definition MutableMeasurement2D.cc:147
void setLoc(edm4hep::Vector2f value)
Set the 2D location on surface.
Definition MutableMeasurement2D.cc:59
podio::RelationRange< edm4eic::TrackerHit > getHits() const
Definition MutableMeasurement2D.cc:98
bool operator<(const MutableMeasurement2D &other) const
Definition MutableMeasurement2D.h:141
podio::RelationRange< float > getWeights() const
Definition MutableMeasurement2D.cc:134
std::vector< float >::const_iterator weights_begin() const
Definition MutableMeasurement2D.cc:111
const podio::ObjectID getObjectID() const
Definition MutableMeasurement2D.cc:151
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition MutableMeasurement2D.cc:51
std::uint64_t getSurface() const
Access the Surface for bound coordinates (geometryID)
Definition MutableMeasurement2D.cc:50
void addToWeights(const float &)
Definition MutableMeasurement2D.cc:106
void unlink()
disconnect from Measurement2DObj instance
Definition MutableMeasurement2D.h:132
podio::ObjectID id() const
Definition MutableMeasurement2D.h:143
std::uint64_t & surface()
Get reference to Surface for bound coordinates (geometryID)
Definition MutableMeasurement2D.cc:58
const edm4eic::Cov3f & getCovariance() const
Access the Covariance on location and time.
Definition MutableMeasurement2D.cc:53
MutableMeasurement2D clone(bool cloneRelations=true) const
Definition MutableMeasurement2D.cc:34
void setSurface(std::uint64_t value)
Set the Surface for bound coordinates (geometryID)
Definition MutableMeasurement2D.cc:56
bool operator==(const MutableMeasurement2D &other) const
Definition MutableMeasurement2D.h:134
std::vector< float >::const_iterator weights_end() const
Definition MutableMeasurement2D.cc:117
void setTime(float value)
Set the Measurement time.
Definition MutableMeasurement2D.cc:62
~MutableMeasurement2D()=default
destructor
float getTime() const
Access the Measurement time.
Definition MutableMeasurement2D.cc:52
std::size_t hits_size() const
Definition MutableMeasurement2D.cc:87
Definition TrackerHit.h:38
Definition CalorimeterHit.cc:17