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