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
11#include <ostream>
12#include <cstdint>
13
14#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
15#include "nlohmann/json_fwd.hpp"
16#endif
17
18// forward declarations
19namespace edm4eic {
20class RawTrackerHit;
21class MutableRawTrackerHit;
22}
23namespace edm4hep {
24class SimTrackerHit;
25class MutableSimTrackerHit;
26}
27
28
29namespace edm4eic {
30
31class MutableMCRecoTrackerHitAssociation;
32class MCRecoTrackerHitAssociationCollection;
33class MCRecoTrackerHitAssociationCollectionData;
34
35/** @class MCRecoTrackerHitAssociation
36 * Association between a RawTrackerHit and a SimTrackerHit
37 * @author: C. Dilks, W. Deconinck
38 */
40
45
46public:
49
50 /// default constructor
52
53 /// Constructor initializing all members
54 MCRecoTrackerHitAssociation(float weight);
55
56 /// copy constructor
58
59 /// copy-assignment operator
61
62 /// create a mutable deep-copy of the object with identical relations
63 /// if cloneRelations=false, the relations are not cloned and will be empty
64 MutableMCRecoTrackerHitAssociation clone(bool cloneRelations=true) const;
65
66 /// destructor
68
69 /// converting constructor from mutable object
71
73
74public:
75
76 /// Access the weight of this association
77 float getWeight() const;
78
79
80 /// Access the reference to the digitized hit
82 /// Access the reference to the simulated hit
83 const edm4hep::SimTrackerHit getSimHit() const;
84
85
86
87 /// check whether the object is actually available
88 bool isAvailable() const;
89 /// disconnect from MCRecoTrackerHitAssociationObj instance
90 void unlink() { m_obj = podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj>{nullptr}; }
91
92 bool operator==(const MCRecoTrackerHitAssociation& other) const { return m_obj == other.m_obj; }
93 bool operator==(const MutableMCRecoTrackerHitAssociation& other) const;
94
95 bool operator!=(const MCRecoTrackerHitAssociation& other) const { return !(*this == other); }
96 bool operator!=(const MutableMCRecoTrackerHitAssociation& other) const { return !(*this == other); }
97
98 // less comparison operator, so that objects can be e.g. stored in sets.
99 bool operator<(const MCRecoTrackerHitAssociation& other) const { return m_obj < other.m_obj; }
100
101 podio::ObjectID id() const { return getObjectID(); }
102
103 const podio::ObjectID getObjectID() const;
104
106 using std::swap;
107 swap(a.m_obj, b.m_obj); // swap out the internal pointers
108 }
109
110private:
111 /// constructor from existing MCRecoTrackerHitAssociationObj
112 explicit MCRecoTrackerHitAssociation(podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj> obj);
114
115 podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj> m_obj{nullptr};
116};
117
118std::ostream& operator<<(std::ostream& o, const MCRecoTrackerHitAssociation& value);
119
120#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
121void to_json(nlohmann::json& j, const MCRecoTrackerHitAssociation& value);
122#endif
123
124
125} // namespace edm4eic
126
127
128#endif
Definition MCRecoTrackerHitAssociationCollectionData.h:32
Definition MCRecoTrackerHitAssociationCollection.h:92
Definition MCRecoTrackerHitAssociationCollection.h:37
Definition MCRecoTrackerHitAssociation.h:39
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:105
~MCRecoTrackerHitAssociation()=default
destructor
bool operator<(const MCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:99
MCRecoTrackerHitAssociation(const MCRecoTrackerHitAssociation &other)=default
copy constructor
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:41
bool operator!=(const MutableMCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:96
static MCRecoTrackerHitAssociation makeEmpty()
Definition MCRecoTrackerHitAssociation.cc:56
bool operator!=(const MCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:95
bool operator==(const MCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:92
void unlink()
disconnect from MCRecoTrackerHitAssociationObj instance
Definition MCRecoTrackerHitAssociation.h:90
const podio::ObjectID getObjectID() const
Definition MCRecoTrackerHitAssociation.cc:85
podio::ObjectID id() const
Definition MCRecoTrackerHitAssociation.h:101
friend class MCRecoTrackerHitAssociationCollection
Definition MCRecoTrackerHitAssociation.h:42
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:37
Definition RawTrackerHit.h:31
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:21