EDM4eic
EIC data model
Loading...
Searching...
No Matches
TrackClusterMatch.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_TrackClusterMatch_H
4#define EDM4EIC_TrackClusterMatch_H
5
7
8
9#include "podio/utilities/MaybeSharedPtr.h"
10
11#include <ostream>
12#include <cstddef>
13
14#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
15#include "nlohmann/json_fwd.hpp"
16#endif
17
18// forward declarations
19namespace edm4eic {
20class Cluster;
21class MutableCluster;
22class Track;
23class MutableTrack;
24}
25
26
27namespace edm4eic {
28
29class MutableTrackClusterMatch;
30class TrackClusterMatchCollection;
31class TrackClusterMatchCollectionData;
32
33/** @class TrackClusterMatch
34 * Match between a Cluster and a Track
35 * @author: D. Anderson, D. Brandenburg, D. Kalinkin, S. Joosten
36 */
38
43
44public:
47
48 /// default constructor
50
51 /// Constructor initializing all members
52 TrackClusterMatch(float weight);
53
54 /// copy constructor
55 TrackClusterMatch(const TrackClusterMatch& other) = default;
56
57 /// copy-assignment operator
59
60 /// create a mutable deep-copy of the object with identical relations
62
63 /// destructor
64 ~TrackClusterMatch() = default;
65
66
68
69public:
70
71 /// Access the weight of this association
72 float getWeight() const;
73
74
75 /// Access the reference to the cluster
76 const edm4eic::Cluster getCluster() const;
77 /// Access the reference to the track
78 const edm4eic::Track getTrack() const;
79
80
81
82 /// check whether the object is actually available
83 bool isAvailable() const;
84 /// disconnect from TrackClusterMatchObj instance
85 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackClusterMatchObj>{nullptr}; }
86
87 bool operator==(const TrackClusterMatch& other) const { return m_obj == other.m_obj; }
88 bool operator==(const MutableTrackClusterMatch& other) const;
89
90 // less comparison operator, so that objects can be e.g. stored in sets.
91 bool operator<(const TrackClusterMatch& other) const { return m_obj < other.m_obj; }
92
93 podio::ObjectID id() const { return getObjectID(); }
94
95 const podio::ObjectID getObjectID() const;
96
98 using std::swap;
99 swap(a.m_obj, b.m_obj); // swap out the internal pointers
100 }
101
102private:
103 /// constructor from existing TrackClusterMatchObj
104 explicit TrackClusterMatch(podio::utils::MaybeSharedPtr<TrackClusterMatchObj> obj);
106
107 podio::utils::MaybeSharedPtr<TrackClusterMatchObj> m_obj{nullptr};
108};
109
110std::ostream& operator<<(std::ostream& o, const TrackClusterMatch& value);
111
112#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
113void to_json(nlohmann::json& j, const TrackClusterMatch& value);
114#endif
115
116
117} // namespace edm4eic
118
119
120#endif
Definition Cluster.h:38
Definition MutableTrackClusterMatch.h:36
Definition TrackClusterMatchCollectionData.h:32
Definition TrackClusterMatchCollection.h:95
Definition TrackClusterMatchCollection.h:40
Definition TrackClusterMatch.h:37
static TrackClusterMatch makeEmpty()
Definition TrackClusterMatch.cc:44
MutableTrackClusterMatch clone() const
create a mutable deep-copy of the object with identical relations
Definition TrackClusterMatch.cc:36
TrackClusterMatch & operator=(TrackClusterMatch other)
copy-assignment operator
Definition TrackClusterMatch.cc:31
const edm4eic::Cluster getCluster() const
Access the reference to the cluster.
Definition TrackClusterMatch.cc:50
const edm4eic::Track getTrack() const
Access the reference to the track.
Definition TrackClusterMatch.cc:57
bool isAvailable() const
check whether the object is actually available
Definition TrackClusterMatch.cc:69
~TrackClusterMatch()=default
destructor
friend class TrackClusterMatchCollection
Definition TrackClusterMatch.h:40
void unlink()
disconnect from TrackClusterMatchObj instance
Definition TrackClusterMatch.h:85
bool operator<(const TrackClusterMatch &other) const
Definition TrackClusterMatch.h:91
bool operator==(const TrackClusterMatch &other) const
Definition TrackClusterMatch.h:87
TrackClusterMatch(const TrackClusterMatch &other)=default
copy constructor
friend class MutableTrackClusterMatch
Definition TrackClusterMatch.h:39
TrackClusterMatch()
default constructor
Definition TrackClusterMatch.cc:23
float getWeight() const
Access the weight of this association.
Definition TrackClusterMatch.cc:48
friend void swap(TrackClusterMatch &a, TrackClusterMatch &b)
Definition TrackClusterMatch.h:97
podio::ObjectID id() const
Definition TrackClusterMatch.h:93
const podio::ObjectID getObjectID() const
Definition TrackClusterMatch.cc:76
Definition TrackClusterMatchObj.h:22
Definition Track.h:41
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97