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 <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 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
64
65 /// destructor
67
68
70
71public:
72
73 /// Access the weight of this association
74 float getWeight() const;
75
76
77 /// Access the reference to the digitized hit
79 /// Access the reference to the simulated hit
80 const edm4hep::SimTrackerHit getSimHit() const;
81
82
83
84 /// check whether the object is actually available
85 bool isAvailable() const;
86 /// disconnect from MCRecoTrackerHitAssociationObj instance
87 void unlink() { m_obj = podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj>{nullptr}; }
88
89 bool operator==(const MCRecoTrackerHitAssociation& other) const { return m_obj == other.m_obj; }
90 bool operator==(const MutableMCRecoTrackerHitAssociation& other) const;
91
92 // less comparison operator, so that objects can be e.g. stored in sets.
93 bool operator<(const MCRecoTrackerHitAssociation& other) const { return m_obj < other.m_obj; }
94
95 podio::ObjectID id() const { return getObjectID(); }
96
97 const podio::ObjectID getObjectID() const;
98
100 using std::swap;
101 swap(a.m_obj, b.m_obj); // swap out the internal pointers
102 }
103
104private:
105 /// constructor from existing MCRecoTrackerHitAssociationObj
106 explicit MCRecoTrackerHitAssociation(podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj> obj);
108
109 podio::utils::MaybeSharedPtr<MCRecoTrackerHitAssociationObj> m_obj{nullptr};
110};
111
112std::ostream& operator<<(std::ostream& o, const MCRecoTrackerHitAssociation& value);
113
114#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
115void to_json(nlohmann::json& j, const MCRecoTrackerHitAssociation& value);
116#endif
117
118
119} // namespace edm4eic
120
121
122#endif
Definition MCRecoTrackerHitAssociationCollectionData.h:32
Definition MCRecoTrackerHitAssociationCollection.h:95
Definition MCRecoTrackerHitAssociationCollection.h:40
Definition MCRecoTrackerHitAssociation.h:39
MCRecoTrackerHitAssociation & operator=(MCRecoTrackerHitAssociation other)
copy-assignment operator
Definition MCRecoTrackerHitAssociation.cc:31
MCRecoTrackerHitAssociation()
default constructor
Definition MCRecoTrackerHitAssociation.cc:23
friend void swap(MCRecoTrackerHitAssociation &a, MCRecoTrackerHitAssociation &b)
Definition MCRecoTrackerHitAssociation.h:99
~MCRecoTrackerHitAssociation()=default
destructor
bool operator<(const MCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:93
MCRecoTrackerHitAssociation(const MCRecoTrackerHitAssociation &other)=default
copy constructor
bool isAvailable() const
check whether the object is actually available
Definition MCRecoTrackerHitAssociation.cc:69
float getWeight() const
Access the weight of this association.
Definition MCRecoTrackerHitAssociation.cc:48
friend class MutableMCRecoTrackerHitAssociation
Definition MCRecoTrackerHitAssociation.h:41
static MCRecoTrackerHitAssociation makeEmpty()
Definition MCRecoTrackerHitAssociation.cc:44
MutableMCRecoTrackerHitAssociation clone() const
create a mutable deep-copy of the object with identical relations
Definition MCRecoTrackerHitAssociation.cc:36
bool operator==(const MCRecoTrackerHitAssociation &other) const
Definition MCRecoTrackerHitAssociation.h:89
void unlink()
disconnect from MCRecoTrackerHitAssociationObj instance
Definition MCRecoTrackerHitAssociation.h:87
const podio::ObjectID getObjectID() const
Definition MCRecoTrackerHitAssociation.cc:76
podio::ObjectID id() const
Definition MCRecoTrackerHitAssociation.h:95
friend class MCRecoTrackerHitAssociationCollection
Definition MCRecoTrackerHitAssociation.h:42
const edm4eic::RawTrackerHit getRawHit() const
Access the reference to the digitized hit.
Definition MCRecoTrackerHitAssociation.cc:50
const edm4hep::SimTrackerHit getSimHit() const
Access the reference to the simulated hit.
Definition MCRecoTrackerHitAssociation.cc:57
Definition MCRecoTrackerHitAssociationObj.h:24
Definition MutableMCRecoTrackerHitAssociation.h:38
Definition RawTrackerHit.h:31
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97
Definition CalorimeterHit.h:21