EICd
EIC data model
MutableInclusiveKinematics.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EICD_MutableInclusiveKinematics_H
4#define EICD_MutableInclusiveKinematics_H
5
7// Make the immutable class available from its mutable version but not vice versa
9
10#include "podio/ObjectID.h"
11#include <ostream>
12
13#ifdef PODIO_JSON_OUTPUT
14#include "nlohmann/json.hpp"
15#endif
16
17// forward declarations
18namespace eicd {
19class ReconstructedParticle;
20class MutableReconstructedParticle;
21}
22
23
24namespace eicd {
25
26
27/** @class MutableInclusiveKinematics
28 * Kinematic variables for DIS events
29 * @author: S. Joosten, W. Deconinck
30 */
32
35 friend class InclusiveKinematics;
36
37public:
38
39 /// default constructor
41 MutableInclusiveKinematics(float x, float Q2, float W, float y, float nu);
42
43 /// constructor from existing InclusiveKinematicsObj
45
46 /// copy constructor
48
49 /// copy-assignment operator
51
52 /// create a mutable deep-copy of the object with identical relations
54
55 /// destructor
57
58 /// conversion to const object
59 operator InclusiveKinematics() const;
60
61public:
62
63 /// Access the Bjorken x (Q2/2P.q)
64 const float& getX() const;
65
66 /// Access the Four-momentum transfer squared [GeV^2]
67 const float& getQ2() const;
68
69 /// Access the Invariant mass of final state [GeV]
70 const float& getW() const;
71
72 /// Access the Inelasticity (P.q/P.k)
73 const float& getY() const;
74
75 /// Access the Energy transfer P.q/M [GeV]
76 const float& getNu() const;
77
78
79 /// Access the Associated scattered electron (if identified)
81
82 /// Set the Bjorken x (Q2/2P.q)
83 void setX(float value);
84
85 /// Set the Four-momentum transfer squared [GeV^2]
86 void setQ2(float value);
87
88 /// Set the Invariant mass of final state [GeV]
89 void setW(float value);
90
91 /// Set the Inelasticity (P.q/P.k)
92 void setY(float value);
93
94 /// Set the Energy transfer P.q/M [GeV]
95 void setNu(float value);
96
97
98 /// Set the Associated scattered electron (if identified)
100
101
102
103
104 /// check whether the object is actually available
105 bool isAvailable() const;
106 /// disconnect from InclusiveKinematicsObj instance
107 void unlink() { m_obj = nullptr; }
108
109 bool operator==(const MutableInclusiveKinematics& other) const { return m_obj == other.m_obj; }
110 bool operator==(const InclusiveKinematics& other) const;
111
112 // less comparison operator, so that objects can be e.g. stored in sets.
113 bool operator<(const MutableInclusiveKinematics& other) const { return m_obj < other.m_obj; }
114
115 unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
116
117 const podio::ObjectID getObjectID() const;
118
120 using std::swap;
121 swap(a.m_obj, b.m_obj); // swap out the internal pointers
122 }
123
124private:
126};
127
128#ifdef PODIO_JSON_OUTPUT
129void to_json(nlohmann::json& j, const MutableInclusiveKinematics& value);
130#endif
131
132
133} // namespace eicd
134
135
136#endif
Definition: InclusiveKinematicsCollection.h:82
Definition: InclusiveKinematics.h:30
Definition: InclusiveKinematicsCollection.h:57
Definition: InclusiveKinematicsObj.h:21
Definition: MutableInclusiveKinematics.h:31
void unlink()
disconnect from InclusiveKinematicsObj instance
Definition: MutableInclusiveKinematics.h:107
const eicd::ReconstructedParticle getScat() const
Access the Associated scattered electron (if identified)
Definition: MutableInclusiveKinematics.cc:62
MutableInclusiveKinematics & operator=(MutableInclusiveKinematics other)
copy-assignment operator
Definition: MutableInclusiveKinematics.cc:34
const float & getX() const
Access the Bjorken x (Q2/2P.q)
Definition: MutableInclusiveKinematics.cc:56
const float & getNu() const
Access the Energy transfer P.q/M [GeV].
Definition: MutableInclusiveKinematics.cc:60
unsigned int id() const
Definition: MutableInclusiveKinematics.h:115
const float & getY() const
Access the Inelasticity (P.q/P.k)
Definition: MutableInclusiveKinematics.cc:59
const float & getQ2() const
Access the Four-momentum transfer squared [GeV^2].
Definition: MutableInclusiveKinematics.cc:57
bool operator==(const MutableInclusiveKinematics &other) const
Definition: MutableInclusiveKinematics.h:109
void setScat(eicd::ReconstructedParticle value)
Set the Associated scattered electron (if identified)
Definition: MutableInclusiveKinematics.cc:76
void setW(float value)
Set the Invariant mass of final state [GeV].
Definition: MutableInclusiveKinematics.cc:72
void setY(float value)
Set the Inelasticity (P.q/P.k)
Definition: MutableInclusiveKinematics.cc:73
MutableInclusiveKinematics clone() const
create a mutable deep-copy of the object with identical relations
Definition: MutableInclusiveKinematics.cc:45
const float & getW() const
Access the Invariant mass of final state [GeV].
Definition: MutableInclusiveKinematics.cc:58
~MutableInclusiveKinematics()
destructor
Definition: MutableInclusiveKinematics.cc:49
MutableInclusiveKinematics()
default constructor
Definition: MutableInclusiveKinematics.cc:17
friend class InclusiveKinematics
Definition: MutableInclusiveKinematics.h:35
void setX(float value)
Set the Bjorken x (Q2/2P.q)
Definition: MutableInclusiveKinematics.cc:70
friend void swap(MutableInclusiveKinematics &a, MutableInclusiveKinematics &b)
Definition: MutableInclusiveKinematics.h:119
void setQ2(float value)
Set the Four-momentum transfer squared [GeV^2].
Definition: MutableInclusiveKinematics.cc:71
const podio::ObjectID getObjectID() const
Definition: MutableInclusiveKinematics.cc:96
bool isAvailable() const
check whether the object is actually available
Definition: MutableInclusiveKinematics.cc:89
bool operator<(const MutableInclusiveKinematics &other) const
Definition: MutableInclusiveKinematics.h:113
void setNu(float value)
Set the Energy transfer P.q/M [GeV].
Definition: MutableInclusiveKinematics.cc:74
Definition: ReconstructedParticle.h:42
Definition: CalorimeterHit.cc:13