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
15#include <ostream>
16#include <cstdint>
17
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
20#endif
21
22// forward declarations
23namespace edm4eic {
24class TrackParameters;
25class MutableTrackParameters;
26}
27
28
29namespace edm4eic {
30
31class MutableTrackSeed;
32class TrackSeedCollection;
33class TrackSeedCollectionData;
34
35/** @class TrackSeed
36 * Seed info from the realistic seed finder
37 * @author: S. Li, B. Schmookler, J. Osborn
38 */
39class TrackSeed {
40
41 friend class MutableTrackSeed;
42 friend class TrackSeedCollection;
45
46public:
49
50 /// default constructor
51 TrackSeed();
52
53 /// Constructor initializing all members
54 TrackSeed(edm4hep::Vector3f perigee);
55
56 /// copy constructor
57 TrackSeed(const TrackSeed& other) = default;
58
59 /// copy-assignment operator
61
62 /// create a mutable deep-copy of the object with identical relations
63 /// if cloneRelations=false, the relations are not cloned and will be empty
64 MutableTrackSeed clone(bool cloneRelations=true) const;
65
66 /// destructor
67 ~TrackSeed() = default;
68
69 /// converting constructor from mutable object
70 TrackSeed(const MutableTrackSeed& other);
71
72 static TrackSeed makeEmpty();
73
74public:
75
76 /// Access the Vector for the perigee (line surface)
77 const edm4hep::Vector3f& getPerigee() const;
78
79
80 /// Access the Initial track parameters
82
83 std::size_t hits_size() const;
84 edm4eic::TrackerHit getHits(std::size_t) const;
85 std::vector<edm4eic::TrackerHit>::const_iterator hits_begin() const;
86 std::vector<edm4eic::TrackerHit>::const_iterator hits_end() const;
87 podio::RelationRange<edm4eic::TrackerHit> getHits() const;
88
89
90 /// check whether the object is actually available
91 bool isAvailable() const;
92 /// disconnect from TrackSeedObj instance
93 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackSeedObj>{nullptr}; }
94
95 bool operator==(const TrackSeed& other) const { return m_obj == other.m_obj; }
96 bool operator==(const MutableTrackSeed& other) const;
97
98 bool operator!=(const TrackSeed& other) const { return !(*this == other); }
99 bool operator!=(const MutableTrackSeed& other) const { return !(*this == other); }
100
101 // less comparison operator, so that objects can be e.g. stored in sets.
102 bool operator<(const TrackSeed& other) const { return m_obj < other.m_obj; }
103
104 podio::ObjectID id() const { return getObjectID(); }
105
106 const podio::ObjectID getObjectID() const;
107
108 friend void swap(TrackSeed& a, TrackSeed& b) {
109 using std::swap;
110 swap(a.m_obj, b.m_obj); // swap out the internal pointers
111 }
112
113private:
114 /// constructor from existing TrackSeedObj
115 explicit TrackSeed(podio::utils::MaybeSharedPtr<TrackSeedObj> obj);
117
118 podio::utils::MaybeSharedPtr<TrackSeedObj> m_obj{nullptr};
119};
120
121std::ostream& operator<<(std::ostream& o, const TrackSeed& value);
122
123#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
124void to_json(nlohmann::json& j, const TrackSeed& value);
125#endif
126
127
128} // namespace edm4eic
129
130
131#endif
Definition MutableTrackSeed.h:37
Definition TrackParameters.h:33
Definition TrackSeedCollectionData.h:32
Definition TrackSeedCollection.h:92
Definition TrackSeedCollection.h:37
Definition TrackSeed.h:39
bool operator!=(const MutableTrackSeed &other) const
Definition TrackSeed.h:99
friend void swap(TrackSeed &a, TrackSeed &b)
Definition TrackSeed.h:108
podio::ObjectID id() const
Definition TrackSeed.h:104
bool operator<(const TrackSeed &other) const
Definition TrackSeed.h:102
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:93
bool operator==(const TrackSeed &other) const
Definition TrackSeed.h:95
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:42
friend class MutableTrackSeed
Definition TrackSeed.h:41
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
std::vector< edm4eic::TrackerHit >::const_iterator hits_end() const
Definition TrackSeed.cc:84
bool operator!=(const TrackSeed &other) const
Definition TrackSeed.h:98
Definition TrackSeedObj.h:23
Definition TrackerHit.h:38
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103