EDM4eic
EIC data model
Loading...
Searching...
No Matches
MutableInclusiveKinematics.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_MutableInclusiveKinematics_H
4#define EDM4EIC_MutableInclusiveKinematics_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 ReconstructedParticle;
23class MutableReconstructedParticle;
24}
25
26
27namespace edm4eic {
28
29
30/** @class MutableInclusiveKinematics
31 * Kinematic variables for DIS events
32 * @author: S. Joosten, W. Deconinck
33 */
35
38 friend class InclusiveKinematics;
39
40public:
43
44 /// default constructor
46
47 /// Constructor initializing all members
48 MutableInclusiveKinematics(float x, float Q2, float W, float y, float nu);
49
50 /// copy constructor
52
53 /// copy-assignment operator
55
56 /// create a mutable deep-copy of the object with identical relations
58
59 /// destructor
61
62
63 /// conversion to const object
64 operator InclusiveKinematics() const;
65
66public:
67
68 /// Access the Bjorken x (Q2/2P.q)
69 float getX() const;
70
71 /// Access the Four-momentum transfer squared [GeV^2]
72 float getQ2() const;
73
74 /// Access the Invariant mass of final state [GeV]
75 float getW() const;
76
77 /// Access the Inelasticity (P.q/P.k)
78 float getY() const;
79
80 /// Access the Energy transfer P.q/M [GeV]
81 float getNu() const;
82
83
84 /// Access the Associated scattered electron (if identified)
86
87 /// Set the Bjorken x (Q2/2P.q)
88 void setX(float value);
89
90 /// Set the Four-momentum transfer squared [GeV^2]
91 void setQ2(float value);
92
93 /// Set the Invariant mass of final state [GeV]
94 void setW(float value);
95
96 /// Set the Inelasticity (P.q/P.k)
97 void setY(float value);
98
99 /// Set the Energy transfer P.q/M [GeV]
100 void setNu(float value);
101
102
103 /// Set the Associated scattered electron (if identified)
105
106
107
108
109 /// check whether the object is actually available
110 bool isAvailable() const;
111 /// disconnect from InclusiveKinematicsObj instance
112 void unlink() { m_obj = podio::utils::MaybeSharedPtr<InclusiveKinematicsObj>{nullptr}; }
113
114 bool operator==(const MutableInclusiveKinematics& other) const { return m_obj == other.m_obj; }
115 bool operator==(const InclusiveKinematics& other) const;
116
117 // less comparison operator, so that objects can be e.g. stored in sets.
118 bool operator<(const MutableInclusiveKinematics& other) const { return m_obj < other.m_obj; }
119
120 podio::ObjectID id() const { return getObjectID(); }
121
122 const podio::ObjectID getObjectID() const;
123
125 using std::swap;
126 swap(a.m_obj, b.m_obj); // swap out the internal pointers
127 }
128
129private:
130 /// constructor from existing InclusiveKinematicsObj
131 explicit MutableInclusiveKinematics(podio::utils::MaybeSharedPtr<InclusiveKinematicsObj> obj);
132
133 podio::utils::MaybeSharedPtr<InclusiveKinematicsObj> m_obj{nullptr};
134};
135
136#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
137void to_json(nlohmann::json& j, const MutableInclusiveKinematics& value);
138#endif
139
140
141} // namespace edm4eic
142
143
144#endif
Definition InclusiveKinematicsCollection.h:95
Definition InclusiveKinematics.h:35
Definition InclusiveKinematicsCollection.h:66
Definition MutableInclusiveKinematics.h:34
MutableInclusiveKinematics()
default constructor
Definition MutableInclusiveKinematics.cc:22
float getNu() const
Access the Energy transfer P.q/M [GeV].
Definition MutableInclusiveKinematics.cc:50
void setW(float value)
Set the Invariant mass of final state [GeV].
Definition MutableInclusiveKinematics.cc:62
MutableInclusiveKinematics & operator=(MutableInclusiveKinematics other)
copy-assignment operator
Definition MutableInclusiveKinematics.cc:34
float getX() const
Access the Bjorken x (Q2/2P.q)
Definition MutableInclusiveKinematics.cc:46
void setNu(float value)
Set the Energy transfer P.q/M [GeV].
Definition MutableInclusiveKinematics.cc:64
MutableInclusiveKinematics(const MutableInclusiveKinematics &other)=default
copy constructor
void setX(float value)
Set the Bjorken x (Q2/2P.q)
Definition MutableInclusiveKinematics.cc:60
float getY() const
Access the Inelasticity (P.q/P.k)
Definition MutableInclusiveKinematics.cc:49
void unlink()
disconnect from InclusiveKinematicsObj instance
Definition MutableInclusiveKinematics.h:112
podio::ObjectID id() const
Definition MutableInclusiveKinematics.h:120
friend class InclusiveKinematicsCollection
Definition MutableInclusiveKinematics.h:36
bool isAvailable() const
check whether the object is actually available
Definition MutableInclusiveKinematics.cc:79
bool operator==(const MutableInclusiveKinematics &other) const
Definition MutableInclusiveKinematics.h:114
void setScat(edm4eic::ReconstructedParticle value)
Set the Associated scattered electron (if identified)
Definition MutableInclusiveKinematics.cc:66
bool operator<(const MutableInclusiveKinematics &other) const
Definition MutableInclusiveKinematics.h:118
~MutableInclusiveKinematics()=default
destructor
void setY(float value)
Set the Inelasticity (P.q/P.k)
Definition MutableInclusiveKinematics.cc:63
const podio::ObjectID getObjectID() const
Definition MutableInclusiveKinematics.cc:86
float getQ2() const
Access the Four-momentum transfer squared [GeV^2].
Definition MutableInclusiveKinematics.cc:47
friend class InclusiveKinematics
Definition MutableInclusiveKinematics.h:38
friend void swap(MutableInclusiveKinematics &a, MutableInclusiveKinematics &b)
Definition MutableInclusiveKinematics.h:124
float getW() const
Access the Invariant mass of final state [GeV].
Definition MutableInclusiveKinematics.cc:48
const edm4eic::ReconstructedParticle getScat() const
Access the Associated scattered electron (if identified)
Definition MutableInclusiveKinematics.cc:52
MutableInclusiveKinematics clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableInclusiveKinematics.cc:39
void setQ2(float value)
Set the Four-momentum transfer squared [GeV^2].
Definition MutableInclusiveKinematics.cc:61
Definition ReconstructedParticle.h:47
Definition CalorimeterHit.cc:18