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 <cstddef>
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 MutableTrackSeed clone() const;
64
65 /// destructor
66 ~TrackSeed() = default;
67
68
69 static TrackSeed makeEmpty();
70
71public:
72
73 /// Access the Vector for the perigee (line surface)
74 const edm4hep::Vector3f& getPerigee() const;
75
76
77 /// Access the Initial track parameters
79
80 std::size_t hits_size() const;
81 edm4eic::TrackerHit getHits(std::size_t) const;
82 std::vector<edm4eic::TrackerHit>::const_iterator hits_begin() const;
83 std::vector<edm4eic::TrackerHit>::const_iterator hits_end() const;
84 podio::RelationRange<edm4eic::TrackerHit> getHits() const;
85
86
87 /// check whether the object is actually available
88 bool isAvailable() const;
89 /// disconnect from TrackSeedObj instance
90 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackSeedObj>{nullptr}; }
91
92 bool operator==(const TrackSeed& other) const { return m_obj == other.m_obj; }
93 bool operator==(const MutableTrackSeed& other) const;
94
95 // less comparison operator, so that objects can be e.g. stored in sets.
96 bool operator<(const TrackSeed& other) const { return m_obj < other.m_obj; }
97
98 podio::ObjectID id() const { return getObjectID(); }
99
100 const podio::ObjectID getObjectID() const;
101
102 friend void swap(TrackSeed& a, TrackSeed& b) {
103 using std::swap;
104 swap(a.m_obj, b.m_obj); // swap out the internal pointers
105 }
106
107private:
108 /// constructor from existing TrackSeedObj
109 explicit TrackSeed(podio::utils::MaybeSharedPtr<TrackSeedObj> obj);
111
112 podio::utils::MaybeSharedPtr<TrackSeedObj> m_obj{nullptr};
113};
114
115std::ostream& operator<<(std::ostream& o, const TrackSeed& value);
116
117#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
118void to_json(nlohmann::json& j, const TrackSeed& value);
119#endif
120
121
122} // namespace edm4eic
123
124
125#endif
Definition MutableTrackSeed.h:38
Definition TrackParameters.h:33
Definition TrackSeedCollectionData.h:32
Definition TrackSeedCollection.h:95
Definition TrackSeedCollection.h:40
Definition TrackSeed.h:39
friend void swap(TrackSeed &a, TrackSeed &b)
Definition TrackSeed.h:102
podio::ObjectID id() const
Definition TrackSeed.h:98
bool operator<(const TrackSeed &other) const
Definition TrackSeed.h:96
bool isAvailable() const
check whether the object is actually available
Definition TrackSeed.cc:93
TrackSeed()
default constructor
Definition TrackSeed.cc:22
void unlink()
disconnect from TrackSeedObj instance
Definition TrackSeed.h:90
bool operator==(const TrackSeed &other) const
Definition TrackSeed.h:92
std::vector< edm4eic::TrackerHit >::const_iterator hits_begin() const
Definition TrackSeed.cc:58
TrackSeed & operator=(TrackSeed other)
copy-assignment operator
Definition TrackSeed.cc:30
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:49
MutableTrackSeed clone() const
create a mutable deep-copy of the object with identical relations
Definition TrackSeed.cc:35
const edm4hep::Vector3f & getPerigee() const
Access the Vector for the perigee (line surface)
Definition TrackSeed.cc:47
podio::RelationRange< edm4eic::TrackerHit > getHits() const
Definition TrackSeed.cc:81
const podio::ObjectID getObjectID() const
Definition TrackSeed.cc:100
TrackSeed(const TrackSeed &other)=default
copy constructor
~TrackSeed()=default
destructor
static TrackSeed makeEmpty()
Definition TrackSeed.cc:43
std::size_t hits_size() const
Definition TrackSeed.cc:70
std::vector< edm4eic::TrackerHit >::const_iterator hits_end() const
Definition TrackSeed.cc:64
Definition TrackSeedObj.h:23
Definition TrackerHit.h:38
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97