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;
77 const edm4hep::Vector2f&
getLoc()
const;
89 std::vector<edm4eic::TrackerHit>::const_iterator
hits_begin()
const;
90 std::vector<edm4eic::TrackerHit>::const_iterator
hits_end()
const;
91 podio::RelationRange<edm4eic::TrackerHit>
getHits()
const;
95 std::vector<float>::const_iterator
weights_end()
const;
96 podio::RelationRange<float>
getWeights()
const;
102 void unlink() { m_obj = podio::utils::MaybeSharedPtr<Measurement2DObj>{
nullptr}; }
119 swap(a.m_obj, b.m_obj);
124 explicit Measurement2D(podio::utils::MaybeSharedPtr<Measurement2DObj> obj);
127 podio::utils::MaybeSharedPtr<Measurement2DObj> m_obj{
nullptr};
130std::ostream&
operator<<(std::ostream& o,
const Measurement2D& value);
132#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
133void to_json(nlohmann::json& j,
const Measurement2D& value);
Definition Measurement2DCollectionData.h:31
Definition Measurement2DCollection.h:92
Definition Measurement2DCollection.h:37
Definition Measurement2D.h:36
std::uint64_t getSurface() const
Access the Surface for bound coordinates (geometryID)
Definition Measurement2D.cc:77
const edm4eic::Cov3f & getCovariance() const
Access the Covariance on location and time.
Definition Measurement2D.cc:80
bool isAvailable() const
check whether the object is actually available
Definition Measurement2D.cc:151
friend class Measurement2DCollection
Definition Measurement2D.h:39
void unlink()
disconnect from Measurement2DObj instance
Definition Measurement2D.h:102
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition Measurement2D.cc:78
std::vector< edm4eic::TrackerHit >::const_iterator hits_end() const
Definition Measurement2D.cc:90
MutableMeasurement2D clone(bool cloneRelations=true) const
Definition Measurement2D.cc:36
std::size_t weights_size() const
Definition Measurement2D.cc:128
Measurement2D(const Measurement2D &other)=default
copy constructor
std::vector< float >::const_iterator weights_end() const
Definition Measurement2D.cc:122
podio::RelationRange< edm4eic::TrackerHit > getHits() const
Definition Measurement2D.cc:107
bool operator==(const Measurement2D &other) const
Definition Measurement2D.h:104
Measurement2D & operator=(Measurement2D other)
copy-assignment operator
Definition Measurement2D.cc:31
~Measurement2D()=default
destructor
podio::RelationRange< float > getWeights() const
Definition Measurement2D.cc:139
std::size_t hits_size() const
Definition Measurement2D.cc:96
std::vector< edm4eic::TrackerHit >::const_iterator hits_begin() const
Definition Measurement2D.cc:84
bool operator<(const Measurement2D &other) const
Definition Measurement2D.h:111
float getTime() const
Access the Measurement time.
Definition Measurement2D.cc:79
const podio::ObjectID getObjectID() const
Definition Measurement2D.cc:155
static Measurement2D makeEmpty()
Definition Measurement2D.cc:73
Measurement2D()
default constructor
Definition Measurement2D.cc:20
friend void swap(Measurement2D &a, Measurement2D &b)
Definition Measurement2D.h:117
podio::ObjectID id() const
Definition Measurement2D.h:113
bool operator!=(const Measurement2D &other) const
Definition Measurement2D.h:107
std::vector< float >::const_iterator weights_begin() const
Definition Measurement2D.cc:116
friend class MutableMeasurement2D
Definition Measurement2D.h:38
bool operator!=(const MutableMeasurement2D &other) const
Definition Measurement2D.h:108
Definition Measurement2DObj.h:19
Definition MutableMeasurement2D.h:34
Definition TrackerHit.h:38
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103