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