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 <cstddef>
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
58
59 /// destructor
61
62
64
65public:
66
67 /// Access the Longitudinal energy-momentum balance (aka E - pz)
68 float getSigma() const;
69
70 /// Access the Transverse momentum
71 float getPT() const;
72
73 /// Access the Hadronic angle
74 float getGamma() const;
75
76
77
78 std::size_t hadrons_size() const;
80 std::vector<edm4eic::ReconstructedParticle>::const_iterator hadrons_begin() const;
81 std::vector<edm4eic::ReconstructedParticle>::const_iterator hadrons_end() const;
82 podio::RelationRange<edm4eic::ReconstructedParticle> getHadrons() const;
83
84
85 /// check whether the object is actually available
86 bool isAvailable() const;
87 /// disconnect from HadronicFinalStateObj instance
88 void unlink() { m_obj = podio::utils::MaybeSharedPtr<HadronicFinalStateObj>{nullptr}; }
89
90 bool operator==(const HadronicFinalState& other) const { return m_obj == other.m_obj; }
91 bool operator==(const MutableHadronicFinalState& other) const;
92
93 // less comparison operator, so that objects can be e.g. stored in sets.
94 bool operator<(const HadronicFinalState& other) const { return m_obj < other.m_obj; }
95
96 podio::ObjectID id() const { return getObjectID(); }
97
98 const podio::ObjectID getObjectID() const;
99
101 using std::swap;
102 swap(a.m_obj, b.m_obj); // swap out the internal pointers
103 }
104
105private:
106 /// constructor from existing HadronicFinalStateObj
107 explicit HadronicFinalState(podio::utils::MaybeSharedPtr<HadronicFinalStateObj> obj);
109
110 podio::utils::MaybeSharedPtr<HadronicFinalStateObj> m_obj{nullptr};
111};
112
113std::ostream& operator<<(std::ostream& o, const HadronicFinalState& value);
114
115#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
116void to_json(nlohmann::json& j, const HadronicFinalState& value);
117#endif
118
119
120} // namespace edm4eic
121
122
123#endif
Definition HadronicFinalStateCollectionData.h:31
Definition HadronicFinalStateCollection.h:95
Definition HadronicFinalStateCollection.h:40
Definition HadronicFinalState.h:33
HadronicFinalState()
default constructor
Definition HadronicFinalState.cc:21
static HadronicFinalState makeEmpty()
Definition HadronicFinalState.cc:44
std::vector< edm4eic::ReconstructedParticle >::const_iterator hadrons_end() const
Definition HadronicFinalState.cc:60
HadronicFinalState(const HadronicFinalState &other)=default
copy constructor
bool isAvailable() const
check whether the object is actually available
Definition HadronicFinalState.cc:89
friend class MutableHadronicFinalState
Definition HadronicFinalState.h:35
bool operator<(const HadronicFinalState &other) const
Definition HadronicFinalState.h:94
friend void swap(HadronicFinalState &a, HadronicFinalState &b)
Definition HadronicFinalState.h:100
float getGamma() const
Access the Hadronic angle.
Definition HadronicFinalState.cc:50
std::size_t hadrons_size() const
Definition HadronicFinalState.cc:66
MutableHadronicFinalState clone() const
create a mutable deep-copy of the object with identical relations
Definition HadronicFinalState.cc:36
bool operator==(const HadronicFinalState &other) const
Definition HadronicFinalState.h:90
~HadronicFinalState()=default
destructor
HadronicFinalState & operator=(HadronicFinalState other)
copy-assignment operator
Definition HadronicFinalState.cc:31
void unlink()
disconnect from HadronicFinalStateObj instance
Definition HadronicFinalState.h:88
std::vector< edm4eic::ReconstructedParticle >::const_iterator hadrons_begin() const
Definition HadronicFinalState.cc:54
float getPT() const
Access the Transverse momentum.
Definition HadronicFinalState.cc:49
float getSigma() const
Access the Longitudinal energy-momentum balance (aka E - pz)
Definition HadronicFinalState.cc:48
podio::ObjectID id() const
Definition HadronicFinalState.h:96
friend class HadronicFinalStateCollection
Definition HadronicFinalState.h:36
const podio::ObjectID getObjectID() const
Definition HadronicFinalState.cc:96
podio::RelationRange< edm4eic::ReconstructedParticle > getHadrons() const
Definition HadronicFinalState.cc:77
Definition HadronicFinalStateObj.h:19
Definition MutableHadronicFinalState.h:32
Definition ReconstructedParticle.h:47
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97