3#ifndef EDM4EIC_Measurement2D_H
4#define EDM4EIC_Measurement2D_H
10#include "edm4hep/Vector2f.h"
11#include "podio/RelationRange.h"
15#include "podio/utilities/MaybeSharedPtr.h"
20#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
21#include "nlohmann/json_fwd.hpp"
28class MutableMeasurement2D;
29class Measurement2DCollection;
30class Measurement2DCollectionData;
74 const edm4hep::Vector2f&
getLoc()
const;
86 std::vector<edm4eic::TrackerHit>::const_iterator
hits_begin()
const;
87 std::vector<edm4eic::TrackerHit>::const_iterator
hits_end()
const;
88 podio::RelationRange<edm4eic::TrackerHit>
getHits()
const;
92 std::vector<float>::const_iterator
weights_end()
const;
93 podio::RelationRange<float>
getWeights()
const;
99 void unlink() { m_obj = podio::utils::MaybeSharedPtr<Measurement2DObj>{
nullptr}; }
113 swap(a.m_obj, b.m_obj);
118 explicit Measurement2D(podio::utils::MaybeSharedPtr<Measurement2DObj> obj);
121 podio::utils::MaybeSharedPtr<Measurement2DObj> m_obj{
nullptr};
124std::ostream&
operator<<(std::ostream& o,
const Measurement2D& value);
126#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
127void to_json(nlohmann::json& j,
const Measurement2D& value);
Definition Measurement2DCollectionData.h:31
Definition Measurement2DCollection.h:95
Definition Measurement2DCollection.h:40
Definition Measurement2D.h:36
std::uint64_t getSurface() const
Access the Surface for bound coordinates (geometryID)
Definition Measurement2D.cc:49
const edm4eic::Cov3f & getCovariance() const
Access the Covariance on location and time.
Definition Measurement2D.cc:52
bool isAvailable() const
check whether the object is actually available
Definition Measurement2D.cc:123
friend class Measurement2DCollection
Definition Measurement2D.h:39
void unlink()
disconnect from Measurement2DObj instance
Definition Measurement2D.h:99
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition Measurement2D.cc:50
std::vector< edm4eic::TrackerHit >::const_iterator hits_end() const
Definition Measurement2D.cc:62
std::size_t weights_size() const
Definition Measurement2D.cc:100
Measurement2D(const Measurement2D &other)=default
copy constructor
std::vector< float >::const_iterator weights_end() const
Definition Measurement2D.cc:94
podio::RelationRange< edm4eic::TrackerHit > getHits() const
Definition Measurement2D.cc:79
bool operator==(const Measurement2D &other) const
Definition Measurement2D.h:101
Measurement2D & operator=(Measurement2D other)
copy-assignment operator
Definition Measurement2D.cc:32
~Measurement2D()=default
destructor
podio::RelationRange< float > getWeights() const
Definition Measurement2D.cc:111
std::size_t hits_size() const
Definition Measurement2D.cc:68
std::vector< edm4eic::TrackerHit >::const_iterator hits_begin() const
Definition Measurement2D.cc:56
bool operator<(const Measurement2D &other) const
Definition Measurement2D.h:105
MutableMeasurement2D clone() const
create a mutable deep-copy of the object with identical relations
Definition Measurement2D.cc:37
float getTime() const
Access the Measurement time.
Definition Measurement2D.cc:51
const podio::ObjectID getObjectID() const
Definition Measurement2D.cc:130
static Measurement2D makeEmpty()
Definition Measurement2D.cc:45
Measurement2D()
default constructor
Definition Measurement2D.cc:21
friend void swap(Measurement2D &a, Measurement2D &b)
Definition Measurement2D.h:111
podio::ObjectID id() const
Definition Measurement2D.h:107
std::vector< float >::const_iterator weights_begin() const
Definition Measurement2D.cc:88
friend class MutableMeasurement2D
Definition Measurement2D.h:38
Definition Measurement2DObj.h:19
Definition MutableMeasurement2D.h:35
Definition TrackerHit.h:38
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97