EDM4eic
EIC data model
Loading...
Searching...
No Matches
TrackSeed.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_TrackSeed_H
4#define EDM4EIC_TrackSeed_H
5
7
9#include "edm4hep/Vector3f.h"
10#include "podio/RelationRange.h"
11#include <vector>
12
13#include "podio/utilities/MaybeSharedPtr.h"
14#include "podio/detail/OrderKey.h"
15
16#include <ostream>
17#include <cstdint>
18
19#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
20#include "nlohmann/json_fwd.hpp"
21#endif
22
23// forward declarations
24namespace edm4eic {
25class TrackSeedCollection;
26class TrackParameters;
27class MutableTrackParameters;
28}
29
30
31namespace podio::detail {
32// Internal function used in less comparison operators of the datatypes and interface types
33OrderKey getOrderKey(const edm4eic::TrackSeed& obj);
34};
35
36namespace edm4eic {
37
38class MutableTrackSeed;
39class TrackSeedCollection;
40class TrackSeedCollectionData;
41
42/** @class TrackSeed
43 * Seed info from the realistic seed finder
44 * @author: S. Li, B. Schmookler, J. Osborn
45 */
46class TrackSeed {
47
48 friend class MutableTrackSeed;
49 friend class TrackSeedCollection;
52 friend podio::detail::OrderKey podio::detail::getOrderKey(const TrackSeed & obj);
53
54public:
57
58 /// default constructor
59 TrackSeed();
60
61 /// Constructor initializing all members
62 TrackSeed(edm4hep::Vector3f perigee);
63
64 /// copy constructor
65 TrackSeed(const TrackSeed& other) = default;
66
67 /// copy-assignment operator
69
70 /// create a mutable deep-copy of the object with identical relations
71 /// if cloneRelations=false, the relations are not cloned and will be empty
72 MutableTrackSeed clone(bool cloneRelations=true) const;
73
74 /// destructor
75 ~TrackSeed() = default;
76
77 /// converting constructor from mutable object
78 TrackSeed(const MutableTrackSeed& other);
79
80 static TrackSeed makeEmpty();
81
82public:
83
84 static constexpr auto typeName = "edm4eic::TrackSeed";
85
86 /// Access the Vector for the perigee (line surface)
87 const edm4hep::Vector3f& getPerigee() const;
88
89
90 /// Access the Initial track parameters
92
93 std::size_t hits_size() const;
94 edm4eic::TrackerHit getHits(std::size_t) const;
95 std::vector<edm4eic::TrackerHit>::const_iterator hits_begin() const;
96 std::vector<edm4eic::TrackerHit>::const_iterator hits_end() const;
97 podio::RelationRange<edm4eic::TrackerHit> getHits() const;
98
99
100 /// check whether the object is actually available
101 bool isAvailable() const;
102 /// disconnect from TrackSeedObj instance
103 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackSeedObj>{nullptr}; }
104
105 bool operator==(const TrackSeed& other) const { return m_obj == other.m_obj; }
106 bool operator==(const MutableTrackSeed& other) const;
107
108 bool operator!=(const TrackSeed& other) const { return !(*this == other); }
109 bool operator!=(const MutableTrackSeed& other) const { return !(*this == other); }
110
111 // less comparison operator, so that objects can be e.g. stored in sets.
112 bool operator<(const TrackSeed& other) const { return podio::detail::getOrderKey(*this) < podio::detail::getOrderKey(other); }
113
114 podio::ObjectID id() const { return getObjectID(); }
115
116 const podio::ObjectID getObjectID() const;
117
118 friend void swap(TrackSeed& a, TrackSeed& b) {
119 using std::swap;
120 swap(a.m_obj, b.m_obj); // swap out the internal pointers
121 }
122
123private:
124 /// constructor from existing TrackSeedObj
125 explicit TrackSeed(podio::utils::MaybeSharedPtr<TrackSeedObj> obj);
127
128 podio::utils::MaybeSharedPtr<TrackSeedObj> m_obj{nullptr};
129};
130
131std::ostream& operator<<(std::ostream& o, const TrackSeed& value);
132
133#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
134void to_json(nlohmann::json& j, const TrackSeed& value);
135#endif
136
137
138} // namespace edm4eic
139
140
141#endif
Definition MutableTrackSeed.h:38
Definition TrackParameters.h:43
Definition TrackSeedCollectionData.h:32
Definition TrackSeedCollection.h:91
Definition TrackSeedCollection.h:36
Definition TrackSeed.h:46
bool operator!=(const MutableTrackSeed &other) const
Definition TrackSeed.h:109
friend void swap(TrackSeed &a, TrackSeed &b)
Definition TrackSeed.h:118
podio::ObjectID id() const
Definition TrackSeed.h:114
bool operator<(const TrackSeed &other) const
Definition TrackSeed.h:112
bool isAvailable() const
check whether the object is actually available
Definition TrackSeed.cc:113
MutableTrackSeed clone(bool cloneRelations=true) const
Definition TrackSeed.cc:34
TrackSeed()
default constructor
Definition TrackSeed.cc:21
void unlink()
disconnect from TrackSeedObj instance
Definition TrackSeed.h:103
bool operator==(const TrackSeed &other) const
Definition TrackSeed.h:105
std::vector< edm4eic::TrackerHit >::const_iterator hits_begin() const
Definition TrackSeed.cc:78
TrackSeed & operator=(TrackSeed other)
copy-assignment operator
Definition TrackSeed.cc:29
friend class TrackSeedCollection
Definition TrackSeed.h:49
friend class MutableTrackSeed
Definition TrackSeed.h:48
const edm4eic::TrackParameters getParams() const
Access the Initial track parameters.
Definition TrackSeed.cc:69
const edm4hep::Vector3f & getPerigee() const
Access the Vector for the perigee (line surface)
Definition TrackSeed.cc:67
podio::RelationRange< edm4eic::TrackerHit > getHits() const
Definition TrackSeed.cc:101
const podio::ObjectID getObjectID() const
Definition TrackSeed.cc:117
TrackSeed(const TrackSeed &other)=default
copy constructor
~TrackSeed()=default
destructor
static TrackSeed makeEmpty()
Definition TrackSeed.cc:63
std::size_t hits_size() const
Definition TrackSeed.cc:90
static constexpr auto typeName
Definition TrackSeed.h:84
std::vector< edm4eic::TrackerHit >::const_iterator hits_end() const
Definition TrackSeed.cc:84
bool operator!=(const TrackSeed &other) const
Definition TrackSeed.h:108
Definition TrackSeedObj.h:24
Definition TrackerHit.h:45
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