EDM4eic
EIC data model
Loading...
Searching...
No Matches
MCRecoCalorimeterHitAssociation.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_MCRecoCalorimeterHitAssociation_H
4#define EDM4EIC_MCRecoCalorimeterHitAssociation_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 edm4hep {
20class RawCalorimeterHit;
21class MutableRawCalorimeterHit;
22class SimCalorimeterHit;
23class MutableSimCalorimeterHit;
24}
25
26
27namespace edm4eic {
28
29class MutableMCRecoCalorimeterHitAssociation;
30class MCRecoCalorimeterHitAssociationCollection;
31class MCRecoCalorimeterHitAssociationCollectionData;
32
33/** @class MCRecoCalorimeterHitAssociation
34 * Association between a RawCalorimeterHit and a SimCalorimeterHit
35 * @author: S. Rahman
36 */
38
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
61 /// if cloneRelations=false, the relations are not cloned and will be empty
62 MutableMCRecoCalorimeterHitAssociation clone(bool cloneRelations=true) const;
63
64 /// destructor
66
67 /// converting constructor from mutable object
69
71
72public:
73
74 /// Access the weight of this association
75 float getWeight() const;
76
77
78 /// Access the reference to the digitized calorimeter hit
79 const edm4hep::RawCalorimeterHit getRawHit() const;
80 /// Access the reference to the simulated calorimeter hit
81 const edm4hep::SimCalorimeterHit getSimHit() const;
82
83
84
85 /// check whether the object is actually available
86 bool isAvailable() const;
87 /// disconnect from MCRecoCalorimeterHitAssociationObj instance
88 void unlink() { m_obj = podio::utils::MaybeSharedPtr<MCRecoCalorimeterHitAssociationObj>{nullptr}; }
89
90 bool operator==(const MCRecoCalorimeterHitAssociation& other) const { return m_obj == other.m_obj; }
92
93 bool operator!=(const MCRecoCalorimeterHitAssociation& other) const { return !(*this == other); }
94 bool operator!=(const MutableMCRecoCalorimeterHitAssociation& other) const { return !(*this == other); }
95
96 // less comparison operator, so that objects can be e.g. stored in sets.
97 bool operator<(const MCRecoCalorimeterHitAssociation& other) const { return m_obj < other.m_obj; }
98
99 podio::ObjectID id() const { return getObjectID(); }
100
101 const podio::ObjectID getObjectID() const;
102
104 using std::swap;
105 swap(a.m_obj, b.m_obj); // swap out the internal pointers
106 }
107
108private:
109 /// constructor from existing MCRecoCalorimeterHitAssociationObj
110 explicit MCRecoCalorimeterHitAssociation(podio::utils::MaybeSharedPtr<MCRecoCalorimeterHitAssociationObj> obj);
112
113 podio::utils::MaybeSharedPtr<MCRecoCalorimeterHitAssociationObj> m_obj{nullptr};
114};
115
116std::ostream& operator<<(std::ostream& o, const MCRecoCalorimeterHitAssociation& value);
117
118#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
119void to_json(nlohmann::json& j, const MCRecoCalorimeterHitAssociation& value);
120#endif
121
122
123} // namespace edm4eic
124
125
126#endif
Definition MCRecoCalorimeterHitAssociationCollectionData.h:32
Definition MCRecoCalorimeterHitAssociationCollection.h:92
Definition MCRecoCalorimeterHitAssociationCollection.h:37
Definition MCRecoCalorimeterHitAssociation.h:37
bool operator!=(const MCRecoCalorimeterHitAssociation &other) const
Definition MCRecoCalorimeterHitAssociation.h:93
bool operator<(const MCRecoCalorimeterHitAssociation &other) const
Definition MCRecoCalorimeterHitAssociation.h:97
bool isAvailable() const
check whether the object is actually available
Definition MCRecoCalorimeterHitAssociation.cc:81
void unlink()
disconnect from MCRecoCalorimeterHitAssociationObj instance
Definition MCRecoCalorimeterHitAssociation.h:88
MCRecoCalorimeterHitAssociation & operator=(MCRecoCalorimeterHitAssociation other)
copy-assignment operator
Definition MCRecoCalorimeterHitAssociation.cc:30
bool operator==(const MCRecoCalorimeterHitAssociation &other) const
Definition MCRecoCalorimeterHitAssociation.h:90
bool operator!=(const MutableMCRecoCalorimeterHitAssociation &other) const
Definition MCRecoCalorimeterHitAssociation.h:94
MCRecoCalorimeterHitAssociation(const MCRecoCalorimeterHitAssociation &other)=default
copy constructor
friend void swap(MCRecoCalorimeterHitAssociation &a, MCRecoCalorimeterHitAssociation &b)
Definition MCRecoCalorimeterHitAssociation.h:103
MCRecoCalorimeterHitAssociation()
default constructor
Definition MCRecoCalorimeterHitAssociation.cc:22
MutableMCRecoCalorimeterHitAssociation clone(bool cloneRelations=true) const
Definition MCRecoCalorimeterHitAssociation.cc:35
const podio::ObjectID getObjectID() const
Definition MCRecoCalorimeterHitAssociation.cc:85
const edm4hep::SimCalorimeterHit getSimHit() const
Access the reference to the simulated calorimeter hit.
Definition MCRecoCalorimeterHitAssociation.cc:69
const edm4hep::RawCalorimeterHit getRawHit() const
Access the reference to the digitized calorimeter hit.
Definition MCRecoCalorimeterHitAssociation.cc:62
podio::ObjectID id() const
Definition MCRecoCalorimeterHitAssociation.h:99
static MCRecoCalorimeterHitAssociation makeEmpty()
Definition MCRecoCalorimeterHitAssociation.cc:56
~MCRecoCalorimeterHitAssociation()=default
destructor
friend class MCRecoCalorimeterHitAssociationCollection
Definition MCRecoCalorimeterHitAssociation.h:40
friend class MutableMCRecoCalorimeterHitAssociation
Definition MCRecoCalorimeterHitAssociation.h:39
float getWeight() const
Access the weight of this association.
Definition MCRecoCalorimeterHitAssociation.cc:60
Definition MCRecoCalorimeterHitAssociationObj.h:22
Definition MutableMCRecoCalorimeterHitAssociation.h:35
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:21