EDM4eic
EIC data model
Loading...
Searching...
No Matches
MCRecoTrackerHitAssociation.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_MCRecoTrackerHitAssociation_H
4#define EDM4EIC_MCRecoTrackerHitAssociation_H
5
7
8
9#include "podio/utilities/MaybeSharedPtr.h"
10#include "podio/detail/OrderKey.h"
11
12#include <ostream>
13#include <cstdint>
14
15#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
16#include "nlohmann/json_fwd.hpp"
17#endif
18
19// forward declarations
20namespace edm4eic {
21class MCRecoTrackerHitAssociationCollection;
22class RawTrackerHit;
23class MutableRawTrackerHit;
24}
25namespace edm4hep {
26class SimTrackerHit;
27class MutableSimTrackerHit;
28}
29
30
31namespace podio::detail {
32// Internal function used in less comparison operators of the datatypes and interface types
34};
35
36namespace edm4eic {
37
38class MutableMCRecoTrackerHitAssociation;
39class MCRecoTrackerHitAssociationCollection;
40class MCRecoTrackerHitAssociationCollectionData;
41
42/** @class MCRecoTrackerHitAssociation
43 * Association between a RawTrackerHit and a SimTrackerHit
44 * @author: C. Dilks, W. Deconinck
45 */
47
52 friend podio::detail::OrderKey podio::detail::getOrderKey(const MCRecoTrackerHitAssociation & obj);
53
54public:
57
58 /// default constructor
60
61 /// Constructor initializing all members
62 MCRecoTrackerHitAssociation(float weight);
63
64 /// copy constructor
66
67 /// copy-assignment operator
69
70 /// create a mutable deep-copy of the object with identical relations
71 /// if cloneRelations=false, the relations are not cloned and will be empty
72 MutableMCRecoTrackerHitAssociation clone(bool cloneRelations=true) const;
73
74 /// destructor
76
77 /// converting constructor from mutable object
79
81
82public:
83
84 static constexpr auto typeName = "edm4eic::MCRecoTrackerHitAssociation";
85
86 /// Access the weight of this association
87 float getWeight() const;
88
89
90 /// Access the reference to the digitized hit
92 /// Access the reference to the simulated hit
93 const edm4hep::SimTrackerHit getSimHit() const;
94
95
96
97 /// check whether the object is actually available
98 bool isAvailable() const;
99 /// disconnect from MCRecoTrackerHitAssociationObj instance
100 void unlink() { m_obj = podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj>{nullptr}; }
101
102 bool operator==(const MCRecoTrackerHitAssociation& other) const { return m_obj == other.m_obj; }
103 bool operator==(const MutableMCRecoTrackerHitAssociation& other) const;
104
105 bool operator!=(const MCRecoTrackerHitAssociation& other) const { return !(*this == other); }
106 bool operator!=(const MutableMCRecoTrackerHitAssociation& other) const { return !(*this == other); }
107
108 // less comparison operator, so that objects can be e.g. stored in sets.
110
111 podio::ObjectID id() const { return getObjectID(); }
112
113 const podio::ObjectID getObjectID() const;
114
116 using std::swap;
117 swap(a.m_obj, b.m_obj); // swap out the internal pointers
118 }
119
120private:
121 /// constructor from existing MCRecoTrackerHitAssociationObj
122 explicit MCRecoTrackerHitAssociation(podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj> obj);
124
125 podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj> m_obj{nullptr};
126};
127
128std::ostream& operator<<(std::ostream& o, const MCRecoTrackerHitAssociation& value);
129
130#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
131void to_json(nlohmann::json& j, const MCRecoTrackerHitAssociation& value);
132#endif
133
134
135} // namespace edm4eic
136
137
138#endif
Definition MCRecoTrackerHitAssociationCollectionData.h:32
Definition MCRecoTrackerHitAssociationCollection.h:91
Definition MCRecoTrackerHitAssociationCollection.h:36
Definition MCRecoTrackerHitAssociation.h:46
MutableMCRecoTrackerHitAssociation clone(bool cloneRelations=true) const
Definition MCRecoTrackerHitAssociation.cc:35
MCRecoTrackerHitAssociation & operator=(MCRecoTrackerHitAssociation other)
copy-assignment operator
Definition MCRecoTrackerHitAssociation.cc:30
MCRecoTrackerHitAssociation()
default constructor
Definition MCRecoTrackerHitAssociation.cc:22
friend void swap(MCRecoTrackerHitAssociation &a, MCRecoTrackerHitAssociation &b)
Definition MCRecoTrackerHitAssociation.h:115
~MCRecoTrackerHitAssociation()=default
destructor
bool operator<(const MCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:109
MCRecoTrackerHitAssociation(const MCRecoTrackerHitAssociation &other)=default
copy constructor
static constexpr auto typeName
Definition MCRecoTrackerHitAssociation.h:84
bool isAvailable() const
check whether the object is actually available
Definition MCRecoTrackerHitAssociation.cc:81
float getWeight() const
Access the weight of this association.
Definition MCRecoTrackerHitAssociation.cc:60
friend class MutableMCRecoTrackerHitAssociation
Definition MCRecoTrackerHitAssociation.h:48
bool operator!=(const MutableMCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:106
static MCRecoTrackerHitAssociation makeEmpty()
Definition MCRecoTrackerHitAssociation.cc:56
bool operator!=(const MCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:105
bool operator==(const MCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:102
void unlink()
disconnect from MCRecoTrackerHitAssociationObj instance
Definition MCRecoTrackerHitAssociation.h:100
const podio::ObjectID getObjectID() const
Definition MCRecoTrackerHitAssociation.cc:85
podio::ObjectID id() const
Definition MCRecoTrackerHitAssociation.h:111
friend class MCRecoTrackerHitAssociationCollection
Definition MCRecoTrackerHitAssociation.h:49
const edm4eic::RawTrackerHit getRawHit() const
Access the reference to the digitized hit.
Definition MCRecoTrackerHitAssociation.cc:62
const edm4hep::SimTrackerHit getSimHit() const
Access the reference to the simulated hit.
Definition MCRecoTrackerHitAssociation.cc:69
Definition MCRecoTrackerHitAssociationObj.h:24
Definition MutableMCRecoTrackerHitAssociation.h:38
Definition RawTrackerHit.h:41
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:25
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150