EDM4eic
EIC data model
Loading...
Searching...
No Matches
MutableMCRecoTrackerHitAssociation.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_MutableMCRecoTrackerHitAssociation_H
4#define EDM4EIC_MutableMCRecoTrackerHitAssociation_H
5
7// Make the immutable class available from its mutable version but not vice versa
9
10
11#include "podio/utilities/MaybeSharedPtr.h"
12
13#include <ostream>
14#include <cstddef>
15
16#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
17#include "nlohmann/json_fwd.hpp"
18#endif
19
20// forward declarations
21namespace edm4eic {
22class RawTrackerHit;
23class MutableRawTrackerHit;
24}
25namespace edm4hep {
26class SimTrackerHit;
27class MutableSimTrackerHit;
28}
29
30
31namespace edm4eic {
32
33
34/** @class MutableMCRecoTrackerHitAssociation
35 * Association between a RawTrackerHit and a SimTrackerHit
36 * @author: C. Dilks, W. Deconinck
37 */
39
43
44public:
47
48 /// default constructor
50
51 /// Constructor initializing all members
53
54 /// copy constructor
56
57 /// copy-assignment operator
59
60 /// create a mutable deep-copy of the object with identical relations
62
63 /// destructor
65
66
67 /// conversion to const object
68 operator MCRecoTrackerHitAssociation() const;
69
70public:
71
72 /// Access the weight of this association
73 float getWeight() const;
74
75
76 /// Access the reference to the digitized hit
78 /// Access the reference to the simulated hit
79 const edm4hep::SimTrackerHit getSimHit() const;
80
81 /// Set the weight of this association
82 void setWeight(float value);
83
84
85 /// Set the reference to the digitized hit
87 /// Set the reference to the simulated hit
88 void setSimHit(edm4hep::SimTrackerHit value);
89
90
91
92
93 /// check whether the object is actually available
94 bool isAvailable() const;
95 /// disconnect from MCRecoTrackerHitAssociationObj instance
96 void unlink() { m_obj = podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj>{nullptr}; }
97
98 bool operator==(const MutableMCRecoTrackerHitAssociation& other) const { return m_obj == other.m_obj; }
99 bool operator==(const MCRecoTrackerHitAssociation& other) const;
100
101 // less comparison operator, so that objects can be e.g. stored in sets.
102 bool operator<(const MutableMCRecoTrackerHitAssociation& other) const { return m_obj < other.m_obj; }
103
104 podio::ObjectID id() const { return getObjectID(); }
105
106 const podio::ObjectID getObjectID() const;
107
109 using std::swap;
110 swap(a.m_obj, b.m_obj); // swap out the internal pointers
111 }
112
113private:
114 /// constructor from existing MCRecoTrackerHitAssociationObj
115 explicit MutableMCRecoTrackerHitAssociation(podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj> obj);
116
117 podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj> m_obj{nullptr};
118};
119
120#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
121void to_json(nlohmann::json& j, const MutableMCRecoTrackerHitAssociation& value);
122#endif
123
124
125} // namespace edm4eic
126
127
128#endif
Definition MCRecoTrackerHitAssociationCollection.h:95
Definition MCRecoTrackerHitAssociation.h:39
Definition MCRecoTrackerHitAssociationCollection.h:66
Definition MutableMCRecoTrackerHitAssociation.h:38
~MutableMCRecoTrackerHitAssociation()=default
destructor
bool isAvailable() const
check whether the object is actually available
Definition MutableMCRecoTrackerHitAssociation.cc:82
const edm4eic::RawTrackerHit getRawHit() const
Access the reference to the digitized hit.
Definition MutableMCRecoTrackerHitAssociation.cc:45
MutableMCRecoTrackerHitAssociation & operator=(MutableMCRecoTrackerHitAssociation other)
copy-assignment operator
Definition MutableMCRecoTrackerHitAssociation.cc:31
float getWeight() const
Access the weight of this association.
Definition MutableMCRecoTrackerHitAssociation.cc:43
MutableMCRecoTrackerHitAssociation(const MutableMCRecoTrackerHitAssociation &other)=default
copy constructor
const podio::ObjectID getObjectID() const
Definition MutableMCRecoTrackerHitAssociation.cc:89
void setWeight(float value)
Set the weight of this association.
Definition MutableMCRecoTrackerHitAssociation.cc:60
const edm4hep::SimTrackerHit getSimHit() const
Access the reference to the simulated hit.
Definition MutableMCRecoTrackerHitAssociation.cc:52
podio::ObjectID id() const
Definition MutableMCRecoTrackerHitAssociation.h:104
void setRawHit(edm4eic::RawTrackerHit value)
Set the reference to the digitized hit.
Definition MutableMCRecoTrackerHitAssociation.cc:62
friend class MCRecoTrackerHitAssociation
Definition MutableMCRecoTrackerHitAssociation.h:42
MutableMCRecoTrackerHitAssociation()
default constructor
Definition MutableMCRecoTrackerHitAssociation.cc:23
bool operator<(const MutableMCRecoTrackerHitAssociation &other) const
Definition MutableMCRecoTrackerHitAssociation.h:102
void setSimHit(edm4hep::SimTrackerHit value)
Set the reference to the simulated hit.
Definition MutableMCRecoTrackerHitAssociation.cc:69
bool operator==(const MutableMCRecoTrackerHitAssociation &other) const
Definition MutableMCRecoTrackerHitAssociation.h:98
friend void swap(MutableMCRecoTrackerHitAssociation &a, MutableMCRecoTrackerHitAssociation &b)
Definition MutableMCRecoTrackerHitAssociation.h:108
void unlink()
disconnect from MCRecoTrackerHitAssociationObj instance
Definition MutableMCRecoTrackerHitAssociation.h:96
MutableMCRecoTrackerHitAssociation clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableMCRecoTrackerHitAssociation.cc:36
friend class MCRecoTrackerHitAssociationCollection
Definition MutableMCRecoTrackerHitAssociation.h:40
Definition RawTrackerHit.h:31
Definition CalorimeterHit.cc:18
Definition CalorimeterHit.h:21