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 <cstdint>
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
59 /// if cloneRelations=false, the relations are not cloned and will be empty
60 MutableInclusiveKinematics clone(bool cloneRelations=true) const;
61
62 /// destructor
64
65 /// converting constructor from mutable object
67
69
70public:
71
72 /// Access the Bjorken x (Q2/2P.q)
73 float getX() const;
74
75 /// Access the Four-momentum transfer squared [GeV^2]
76 float getQ2() const;
77
78 /// Access the Invariant mass of final state [GeV]
79 float getW() const;
80
81 /// Access the Inelasticity (P.q/P.k)
82 float getY() const;
83
84 /// Access the Energy transfer P.q/M [GeV]
85 float getNu() const;
86
87
88 /// Access the Associated scattered electron (if identified)
90
91
92
93 /// check whether the object is actually available
94 bool isAvailable() const;
95 /// disconnect from InclusiveKinematicsObj instance
96 void unlink() { m_obj = podio::utils::MaybeSharedPtr<InclusiveKinematicsObj>{nullptr}; }
97
98 bool operator==(const InclusiveKinematics& other) const { return m_obj == other.m_obj; }
99 bool operator==(const MutableInclusiveKinematics& other) const;
100
101 bool operator!=(const InclusiveKinematics& other) const { return !(*this == other); }
102 bool operator!=(const MutableInclusiveKinematics& other) const { return !(*this == other); }
103
104 // less comparison operator, so that objects can be e.g. stored in sets.
105 bool operator<(const InclusiveKinematics& other) const { return m_obj < other.m_obj; }
106
107 podio::ObjectID id() const { return getObjectID(); }
108
109 const podio::ObjectID getObjectID() const;
110
112 using std::swap;
113 swap(a.m_obj, b.m_obj); // swap out the internal pointers
114 }
115
116private:
117 /// constructor from existing InclusiveKinematicsObj
118 explicit InclusiveKinematics(podio::utils::MaybeSharedPtr<InclusiveKinematicsObj> obj);
120
121 podio::utils::MaybeSharedPtr<InclusiveKinematicsObj> m_obj{nullptr};
122};
123
124std::ostream& operator<<(std::ostream& o, const InclusiveKinematics& value);
125
126#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
127void to_json(nlohmann::json& j, const InclusiveKinematics& value);
128#endif
129
130
131} // namespace edm4eic
132
133
134#endif
Definition InclusiveKinematicsCollectionData.h:31
Definition InclusiveKinematicsCollection.h:92
Definition InclusiveKinematicsCollection.h:37
Definition InclusiveKinematics.h:35
InclusiveKinematics & operator=(InclusiveKinematics other)
copy-assignment operator
Definition InclusiveKinematics.cc:33
friend void swap(InclusiveKinematics &a, InclusiveKinematics &b)
Definition InclusiveKinematics.h:111
InclusiveKinematics(const InclusiveKinematics &other)=default
copy constructor
bool operator!=(const MutableInclusiveKinematics &other) const
Definition InclusiveKinematics.h:102
float getY() const
Access the Inelasticity (P.q/P.k)
Definition InclusiveKinematics.cc:63
float getX() const
Access the Bjorken x (Q2/2P.q)
Definition InclusiveKinematics.cc:60
float getW() const
Access the Invariant mass of final state [GeV].
Definition InclusiveKinematics.cc:62
friend class InclusiveKinematicsCollection
Definition InclusiveKinematics.h:38
InclusiveKinematics()
default constructor
Definition InclusiveKinematics.cc:21
float getQ2() const
Access the Four-momentum transfer squared [GeV^2].
Definition InclusiveKinematics.cc:61
const edm4eic::ReconstructedParticle getScat() const
Access the Associated scattered electron (if identified)
Definition InclusiveKinematics.cc:66
bool isAvailable() const
check whether the object is actually available
Definition InclusiveKinematics.cc:78
bool operator!=(const InclusiveKinematics &other) const
Definition InclusiveKinematics.h:101
friend class MutableInclusiveKinematics
Definition InclusiveKinematics.h:37
float getNu() const
Access the Energy transfer P.q/M [GeV].
Definition InclusiveKinematics.cc:64
static InclusiveKinematics makeEmpty()
Definition InclusiveKinematics.cc:56
MutableInclusiveKinematics clone(bool cloneRelations=true) const
Definition InclusiveKinematics.cc:38
void unlink()
disconnect from InclusiveKinematicsObj instance
Definition InclusiveKinematics.h:96
bool operator<(const InclusiveKinematics &other) const
Definition InclusiveKinematics.h:105
podio::ObjectID id() const
Definition InclusiveKinematics.h:107
bool operator==(const InclusiveKinematics &other) const
Definition InclusiveKinematics.h:98
const podio::ObjectID getObjectID() const
Definition InclusiveKinematics.cc:82
~InclusiveKinematics()=default
destructor
Definition InclusiveKinematicsObj.h:21
Definition MutableInclusiveKinematics.h:33
Definition ReconstructedParticle.h:47
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103