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"
22#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
23#include "nlohmann/json_fwd.hpp"
73 const edm4hep::Vector2f&
getLoc()
const;
87 void setLoc(edm4hep::Vector2f value);
89 edm4hep::Vector2f&
loc();
104 std::vector<edm4eic::TrackerHit>::const_iterator
hits_begin()
const;
105 std::vector<edm4eic::TrackerHit>::const_iterator
hits_end()
const;
106 podio::RelationRange<edm4eic::TrackerHit>
getHits()
const;
111 std::vector<float>::const_iterator
weights_end()
const;
112 podio::RelationRange<float>
getWeights()
const;
119 void unlink() { m_obj = podio::utils::MaybeSharedPtr<Measurement2DObj>{
nullptr}; }
133 swap(a.m_obj, b.m_obj);
140 podio::utils::MaybeSharedPtr<Measurement2DObj> m_obj{
nullptr};
143#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
144void to_json(nlohmann::json& j,
const MutableMeasurement2D& value);
Definition Measurement2DCollection.h:95
Definition Measurement2D.h:36
Definition Measurement2DCollection.h:66
Definition MutableMeasurement2D.h:35
std::size_t weights_size() const
Definition MutableMeasurement2D.cc:111
void setCovariance(edm4eic::Cov3f value)
Set the Covariance on location and time.
Definition MutableMeasurement2D.cc:54
friend class Measurement2D
Definition MutableMeasurement2D.h:39
MutableMeasurement2D & operator=(MutableMeasurement2D other)
copy-assignment operator
Definition MutableMeasurement2D.cc:32
void addToHits(edm4eic::TrackerHit)
Definition MutableMeasurement2D.cc:58
friend class Measurement2DCollection
Definition MutableMeasurement2D.h:37
MutableMeasurement2D()
default constructor
Definition MutableMeasurement2D.cc:21
friend void swap(MutableMeasurement2D &a, MutableMeasurement2D &b)
Definition MutableMeasurement2D.h:131
std::vector< edm4eic::TrackerHit >::const_iterator hits_begin() const
Definition MutableMeasurement2D.cc:63
edm4eic::Cov3f & covariance()
Get reference to Covariance on location and time.
Definition MutableMeasurement2D.cc:55
std::vector< edm4eic::TrackerHit >::const_iterator hits_end() const
Definition MutableMeasurement2D.cc:69
MutableMeasurement2D(const MutableMeasurement2D &other)=default
copy constructor
edm4hep::Vector2f & loc()
Get reference to 2D location on surface.
Definition MutableMeasurement2D.cc:52
bool isAvailable() const
check whether the object is actually available
Definition MutableMeasurement2D.cc:135
void setLoc(edm4hep::Vector2f value)
Set the 2D location on surface.
Definition MutableMeasurement2D.cc:51
podio::RelationRange< edm4eic::TrackerHit > getHits() const
Definition MutableMeasurement2D.cc:86
bool operator<(const MutableMeasurement2D &other) const
Definition MutableMeasurement2D.h:125
podio::RelationRange< float > getWeights() const
Definition MutableMeasurement2D.cc:122
std::vector< float >::const_iterator weights_begin() const
Definition MutableMeasurement2D.cc:99
const podio::ObjectID getObjectID() const
Definition MutableMeasurement2D.cc:142
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition MutableMeasurement2D.cc:45
std::uint64_t getSurface() const
Access the Surface for bound coordinates (geometryID)
Definition MutableMeasurement2D.cc:44
void unlink()
disconnect from Measurement2DObj instance
Definition MutableMeasurement2D.h:119
podio::ObjectID id() const
Definition MutableMeasurement2D.h:127
const edm4eic::Cov3f & getCovariance() const
Access the Covariance on location and time.
Definition MutableMeasurement2D.cc:47
void setSurface(std::uint64_t value)
Set the Surface for bound coordinates (geometryID)
Definition MutableMeasurement2D.cc:50
bool operator==(const MutableMeasurement2D &other) const
Definition MutableMeasurement2D.h:121
MutableMeasurement2D clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableMeasurement2D.cc:37
void addToWeights(float)
Definition MutableMeasurement2D.cc:94
std::vector< float >::const_iterator weights_end() const
Definition MutableMeasurement2D.cc:105
void setTime(float value)
Set the Measurement time.
Definition MutableMeasurement2D.cc:53
~MutableMeasurement2D()=default
destructor
float getTime() const
Access the Measurement time.
Definition MutableMeasurement2D.cc:46
std::size_t hits_size() const
Definition MutableMeasurement2D.cc:75
Definition TrackerHit.h:38
Definition CalorimeterHit.cc:18