EDM4eic
EIC data model
Loading...
Searching...
No Matches
HadronicFinalState.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_HadronicFinalState_H
4#define EDM4EIC_HadronicFinalState_H
5
7
9#include "podio/RelationRange.h"
10#include <vector>
11
12#include "podio/utilities/MaybeSharedPtr.h"
13
14#include <ostream>
15#include <cstdint>
16
17#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
18#include "nlohmann/json_fwd.hpp"
19#endif
20
21
22
23namespace edm4eic {
24
25class MutableHadronicFinalState;
26class HadronicFinalStateCollection;
27class HadronicFinalStateCollectionData;
28
29/** @class HadronicFinalState
30 * Summed quantities of the hadronic final state
31 * @author: T. Kutz
32 */
34
39
40public:
43
44 /// default constructor
46
47 /// Constructor initializing all members
48 HadronicFinalState(float sigma, float pT, float gamma);
49
50 /// copy constructor
51 HadronicFinalState(const HadronicFinalState& other) = default;
52
53 /// copy-assignment operator
55
56 /// create a mutable deep-copy of the object with identical relations
57 /// if cloneRelations=false, the relations are not cloned and will be empty
58 MutableHadronicFinalState clone(bool cloneRelations=true) const;
59
60 /// destructor
62
63 /// converting constructor from mutable object
65
67
68public:
69
70 /// Access the Longitudinal energy-momentum balance (aka E - pz)
71 float getSigma() const;
72
73 /// Access the Transverse momentum
74 float getPT() const;
75
76 /// Access the Hadronic angle
77 float getGamma() const;
78
79
80
81 std::size_t hadrons_size() const;
83 std::vector<edm4eic::ReconstructedParticle>::const_iterator hadrons_begin() const;
84 std::vector<edm4eic::ReconstructedParticle>::const_iterator hadrons_end() const;
85 podio::RelationRange<edm4eic::ReconstructedParticle> getHadrons() const;
86
87
88 /// check whether the object is actually available
89 bool isAvailable() const;
90 /// disconnect from HadronicFinalStateObj instance
91 void unlink() { m_obj = podio::utils::MaybeSharedPtr<HadronicFinalStateObj>{nullptr}; }
92
93 bool operator==(const HadronicFinalState& other) const { return m_obj == other.m_obj; }
94 bool operator==(const MutableHadronicFinalState& other) const;
95
96 bool operator!=(const HadronicFinalState& other) const { return !(*this == other); }
97 bool operator!=(const MutableHadronicFinalState& other) const { return !(*this == other); }
98
99 // less comparison operator, so that objects can be e.g. stored in sets.
100 bool operator<(const HadronicFinalState& other) const { return m_obj < other.m_obj; }
101
102 podio::ObjectID id() const { return getObjectID(); }
103
104 const podio::ObjectID getObjectID() const;
105
107 using std::swap;
108 swap(a.m_obj, b.m_obj); // swap out the internal pointers
109 }
110
111private:
112 /// constructor from existing HadronicFinalStateObj
113 explicit HadronicFinalState(podio::utils::MaybeSharedPtr<HadronicFinalStateObj> obj);
115
116 podio::utils::MaybeSharedPtr<HadronicFinalStateObj> m_obj{nullptr};
117};
118
119std::ostream& operator<<(std::ostream& o, const HadronicFinalState& value);
120
121#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
122void to_json(nlohmann::json& j, const HadronicFinalState& value);
123#endif
124
125
126} // namespace edm4eic
127
128
129#endif
Definition HadronicFinalStateCollectionData.h:31
Definition HadronicFinalStateCollection.h:92
Definition HadronicFinalStateCollection.h:37
Definition HadronicFinalState.h:33
HadronicFinalState()
default constructor
Definition HadronicFinalState.cc:20
static HadronicFinalState makeEmpty()
Definition HadronicFinalState.cc:61
bool operator!=(const HadronicFinalState &other) const
Definition HadronicFinalState.h:96
std::vector< edm4eic::ReconstructedParticle >::const_iterator hadrons_end() const
Definition HadronicFinalState.cc:77
HadronicFinalState(const HadronicFinalState &other)=default
copy constructor
bool isAvailable() const
check whether the object is actually available
Definition HadronicFinalState.cc:106
friend class MutableHadronicFinalState
Definition HadronicFinalState.h:35
bool operator!=(const MutableHadronicFinalState &other) const
Definition HadronicFinalState.h:97
bool operator<(const HadronicFinalState &other) const
Definition HadronicFinalState.h:100
friend void swap(HadronicFinalState &a, HadronicFinalState &b)
Definition HadronicFinalState.h:106
float getGamma() const
Access the Hadronic angle.
Definition HadronicFinalState.cc:67
std::size_t hadrons_size() const
Definition HadronicFinalState.cc:83
MutableHadronicFinalState clone(bool cloneRelations=true) const
Definition HadronicFinalState.cc:35
bool operator==(const HadronicFinalState &other) const
Definition HadronicFinalState.h:93
~HadronicFinalState()=default
destructor
HadronicFinalState & operator=(HadronicFinalState other)
copy-assignment operator
Definition HadronicFinalState.cc:30
void unlink()
disconnect from HadronicFinalStateObj instance
Definition HadronicFinalState.h:91
std::vector< edm4eic::ReconstructedParticle >::const_iterator hadrons_begin() const
Definition HadronicFinalState.cc:71
float getPT() const
Access the Transverse momentum.
Definition HadronicFinalState.cc:66
float getSigma() const
Access the Longitudinal energy-momentum balance (aka E - pz)
Definition HadronicFinalState.cc:65
podio::ObjectID id() const
Definition HadronicFinalState.h:102
friend class HadronicFinalStateCollection
Definition HadronicFinalState.h:36
const podio::ObjectID getObjectID() const
Definition HadronicFinalState.cc:110
podio::RelationRange< edm4eic::ReconstructedParticle > getHadrons() const
Definition HadronicFinalState.cc:94
Definition HadronicFinalStateObj.h:19
Definition MutableHadronicFinalState.h:31
Definition ReconstructedParticle.h:47
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103