3#ifndef EDM4EIC_TrackSegment_H
4#define EDM4EIC_TrackSegment_H
9#include "podio/RelationRange.h"
12#include "podio/utilities/MaybeSharedPtr.h"
13#include "podio/detail/OrderKey.h"
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
32OrderKey
getOrderKey(
const edm4eic::TrackSegment& obj);
61 TrackSegment(
const float length,
const float lengthError);
84 static constexpr std::string_view
typeName =
"edm4eic::TrackSegment";
98 std::vector<edm4eic::TrackPoint>::const_iterator
points_begin()
const;
99 std::vector<edm4eic::TrackPoint>::const_iterator
points_end()
const;
100 podio::RelationRange<edm4eic::TrackPoint>
getPoints()
const;
106 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackSegmentObj>{
nullptr}; }
121 friend std::hash<TrackSegment>;
125 swap(a.m_obj, b.m_obj);
130 explicit TrackSegment(podio::utils::MaybeSharedPtr<TrackSegmentObj> obj);
133 podio::utils::MaybeSharedPtr<TrackSegmentObj> m_obj{
nullptr};
138#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
139void to_json(nlohmann::json& j,
const TrackSegment& value);
150 return std::hash<edm4eic::TrackSegmentObj*>{}(obj.m_obj.get());
158#if defined(__clang__)
159#pragma clang diagnostic push
160#pragma clang diagnostic ignored "-Wunknown-warning-option"
161#pragma clang diagnostic ignored "-Wdeprecated-redundant-constexpr-static-def"
162#pragma clang diagnostic ignored "-Wdeprecated"
164#pragma clang diagnostic pop
165#elif defined(__GNUC__)
166#pragma GCC diagnostic push
167#pragma GCC diagnostic ignored "-Wdeprecated"
169#pragma GCC diagnostic pop
Definition MutableTrack.h:40
Definition MutableTrackSegment.h:37
Definition TrackPoint.h:22
Definition TrackSegmentCollectionData.h:31
Definition TrackSegmentCollection.h:137
Definition TrackSegment.h:45
friend class TrackSegmentCollection
Definition TrackSegment.h:48
float getLength() const
Access the Pathlength from the first to the last point.
Definition TrackSegment.cc:68
friend class MutableTrackSegment
Definition TrackSegment.h:47
std::size_t points_size() const
Definition TrackSegment.cc:92
const podio::ObjectID getObjectID() const
Definition TrackSegment.cc:119
MutableTrackSegment clone(bool cloneRelations=true) const
Definition TrackSegment.cc:35
void unlink()
disconnect from TrackSegmentObj instance
Definition TrackSegment.h:106
~TrackSegment()=default
destructor
std::vector< edm4eic::TrackPoint >::const_iterator points_begin() const
Definition TrackSegment.cc:80
std::vector< edm4eic::TrackPoint >::const_iterator points_end() const
Definition TrackSegment.cc:86
bool isAvailable() const
check whether the object is actually available
Definition TrackSegment.cc:115
TrackSegment & operator=(TrackSegment other) &
copy-assignment operator
Definition TrackSegment.cc:30
podio::RelationRange< edm4eic::TrackPoint > getPoints() const
Definition TrackSegment.cc:103
TrackSegment & operator=(TrackSegment other) &&=delete
bool operator<(const TrackSegment &other) const
Definition TrackSegment.h:115
TrackSegment(const TrackSegment &other)=default
copy constructor
bool operator!=(const MutableTrackSegment &other) const
Definition TrackSegment.h:112
friend void swap(TrackSegment &a, TrackSegment &b)
Definition TrackSegment.h:123
friend class TrackSegmentCollectionIterator
Definition TrackSegment.h:50
TrackSegment()
default constructor
Definition TrackSegment.cc:21
const edm4eic::Track getTrack() const
Access the Track used for this projection.
Definition TrackSegment.cc:71
TrackSegmentCollection collection_type
Definition TrackSegment.h:55
podio::ObjectID id() const
Definition TrackSegment.h:117
bool operator==(const TrackSegment &other) const
Definition TrackSegment.h:108
static TrackSegment makeEmpty()
Definition TrackSegment.cc:64
MutableTrackSegment mutable_type
Definition TrackSegment.h:54
static constexpr std::string_view typeName
Definition TrackSegment.h:84
bool operator!=(const TrackSegment &other) const
Definition TrackSegment.h:111
float getLengthError() const
Access the Error on the segment length.
Definition TrackSegment.cc:69
Definition TrackSegmentObj.h:24
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150
std::size_t operator()(const edm4eic::TrackSegment &obj) const
Definition TrackSegment.h:149