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