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 <ostream>
18#include <cstddef>
19
20#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
21#include "nlohmann/json_fwd.hpp"
22#endif
23
24// forward declarations
25namespace edm4eic {
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 MutableTrackSeed clone() const;
62
63 /// destructor
64 ~MutableTrackSeed() = default;
65
66
67 /// conversion to const object
68 operator TrackSeed() const;
69
70public:
71
72 /// Access the Vector for the perigee (line surface)
73 const edm4hep::Vector3f& getPerigee() const;
74
75
76 /// Access the Initial track parameters
78
79 /// Set the Vector for the perigee (line surface)
80 void setPerigee(edm4hep::Vector3f value);
81 /// Get reference to Vector for the perigee (line surface)
82 edm4hep::Vector3f& perigee();
83
84
85 /// Set the Initial track parameters
87
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 // less comparison operator, so that objects can be e.g. stored in sets.
106 bool operator<(const MutableTrackSeed& other) const { return m_obj < other.m_obj; }
107
108 podio::ObjectID id() const { return getObjectID(); }
109
110 const podio::ObjectID getObjectID() const;
111
113 using std::swap;
114 swap(a.m_obj, b.m_obj); // swap out the internal pointers
115 }
116
117private:
118 /// constructor from existing TrackSeedObj
119 explicit MutableTrackSeed(podio::utils::MaybeSharedPtr<TrackSeedObj> obj);
120
121 podio::utils::MaybeSharedPtr<TrackSeedObj> m_obj{nullptr};
122};
123
124#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
125void to_json(nlohmann::json& j, const MutableTrackSeed& value);
126#endif
127
128
129} // namespace edm4eic
130
131
132#endif
Definition MutableTrackSeed.h:38
void addToHits(edm4eic::TrackerHit)
Definition MutableTrackSeed.cc:63
const podio::ObjectID getObjectID() const
Definition MutableTrackSeed.cc:111
edm4hep::Vector3f & perigee()
Get reference to Vector for the perigee (line surface)
Definition MutableTrackSeed.cc:53
~MutableTrackSeed()=default
destructor
const edm4eic::TrackParameters getParams() const
Access the Initial track parameters.
Definition MutableTrackSeed.cc:44
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:42
void unlink()
disconnect from TrackSeedObj instance
Definition MutableTrackSeed.h:100
MutableTrackSeed(const MutableTrackSeed &other)=default
copy constructor
void setPerigee(edm4hep::Vector3f value)
Set the Vector for the perigee (line surface)
Definition MutableTrackSeed.cc:52
podio::ObjectID id() const
Definition MutableTrackSeed.h:108
MutableTrackSeed & operator=(MutableTrackSeed other)
copy-assignment operator
Definition MutableTrackSeed.cc:30
MutableTrackSeed()
default constructor
Definition MutableTrackSeed.cc:22
std::size_t hits_size() const
Definition MutableTrackSeed.cc:80
bool operator<(const MutableTrackSeed &other) const
Definition MutableTrackSeed.h:106
MutableTrackSeed clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableTrackSeed.cc:35
bool isAvailable() const
check whether the object is actually available
Definition MutableTrackSeed.cc:104
friend void swap(MutableTrackSeed &a, MutableTrackSeed &b)
Definition MutableTrackSeed.h:112
void setParams(edm4eic::TrackParameters value)
Set the Initial track parameters.
Definition MutableTrackSeed.cc:55
podio::RelationRange< edm4eic::TrackerHit > getHits() const
Definition MutableTrackSeed.cc:91
std::vector< edm4eic::TrackerHit >::const_iterator hits_begin() const
Definition MutableTrackSeed.cc:68
bool operator==(const MutableTrackSeed &other) const
Definition MutableTrackSeed.h:102
std::vector< edm4eic::TrackerHit >::const_iterator hits_end() const
Definition MutableTrackSeed.cc:74
Definition TrackParameters.h:33
Definition TrackSeedCollection.h:95
Definition TrackSeed.h:39
Definition TrackSeedCollection.h:66
Definition TrackerHit.h:38
Definition CalorimeterHit.cc:18