EDM4eic
EIC data model
All Classes Namespaces Files Functions Variables Typedefs Friends Pages
CherenkovParticleID.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_CherenkovParticleID_H
4#define EDM4EIC_CherenkovParticleID_H
5
7
10#include "podio/RelationRange.h"
11#include <vector>
12
13#include "podio/utilities/MaybeSharedPtr.h"
14#include "podio/detail/OrderKey.h"
15
16#include <ostream>
17#include <cstdint>
18
19#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
20#include "nlohmann/json_fwd.hpp"
21#endif
22
23// forward declarations
24namespace edm4eic {
25class CherenkovParticleIDCollection;
26class TrackSegment;
27class MutableTrackSegment;
28}
29
30
31namespace podio::detail {
32// Internal function used in less comparison operators of the datatypes and interface types
33OrderKey getOrderKey(const edm4eic::CherenkovParticleID& obj);
34};
35
36namespace edm4eic {
37
38class MutableCherenkovParticleID;
39class CherenkovParticleIDCollection;
40class CherenkovParticleIDCollectionData;
41
42/** @class CherenkovParticleID
43 * Cherenkov detector PID
44 * @author: A. Kiselev, C. Chatterjee, C. Dilks
45 */
47
52 friend podio::detail::OrderKey podio::detail::getOrderKey(const CherenkovParticleID & obj);
53
54public:
57
58 /// default constructor
60
61 /// Constructor initializing all members
62 CherenkovParticleID(float npe, float refractiveIndex, float photonEnergy);
63
64 /// copy constructor
66
67 /// copy-assignment operator
69
70 /// create a mutable deep-copy of the object with identical relations
71 /// if cloneRelations=false, the relations are not cloned and will be empty
72 MutableCherenkovParticleID clone(bool cloneRelations=true) const;
73
74 /// destructor
76
77 /// converting constructor from mutable object
79
81
82public:
83
84 static constexpr auto typeName = "edm4eic::CherenkovParticleID";
85
86 /// Access the Overall photoelectron count
87 float getNpe() const;
88
89 /// Access the Average refractive index at the Cherenkov photons' vertices
90 float getRefractiveIndex() const;
91
92 /// Access the Average energy for these Cherenkov photons [GeV]
93 float getPhotonEnergy() const;
94
95
96 /// Access the reconstructed charged particle
98
99 std::size_t rawHitAssociations_size() const;
101 std::vector<edm4eic::MCRecoTrackerHitAssociation>::const_iterator rawHitAssociations_begin() const;
102 std::vector<edm4eic::MCRecoTrackerHitAssociation>::const_iterator rawHitAssociations_end() const;
103 podio::RelationRange<edm4eic::MCRecoTrackerHitAssociation> getRawHitAssociations() const;
104 std::size_t hypotheses_size() const;
106 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator hypotheses_begin() const;
107 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator hypotheses_end() const;
108 podio::RelationRange<edm4eic::CherenkovParticleIDHypothesis> getHypotheses() const;
109 std::size_t thetaPhiPhotons_size() const;
110 edm4hep::Vector2f getThetaPhiPhotons(std::size_t) const;
111 std::vector<edm4hep::Vector2f>::const_iterator thetaPhiPhotons_begin() const;
112 std::vector<edm4hep::Vector2f>::const_iterator thetaPhiPhotons_end() const;
113 podio::RelationRange<edm4hep::Vector2f> getThetaPhiPhotons() const;
114
115
116 /// check whether the object is actually available
117 bool isAvailable() const;
118 /// disconnect from CherenkovParticleIDObj instance
119 void unlink() { m_obj = podio::utils::MaybeSharedPtr<CherenkovParticleIDObj>{nullptr}; }
120
121 bool operator==(const CherenkovParticleID& other) const { return m_obj == other.m_obj; }
122 bool operator==(const MutableCherenkovParticleID& other) const;
123
124 bool operator!=(const CherenkovParticleID& other) const { return !(*this == other); }
125 bool operator!=(const MutableCherenkovParticleID& other) const { return !(*this == other); }
126
127 // less comparison operator, so that objects can be e.g. stored in sets.
128 bool operator<(const CherenkovParticleID& other) const { return podio::detail::getOrderKey(*this) < podio::detail::getOrderKey(other); }
129
130 podio::ObjectID id() const { return getObjectID(); }
131
132 const podio::ObjectID getObjectID() const;
133
135 using std::swap;
136 swap(a.m_obj, b.m_obj); // swap out the internal pointers
137 }
138
139private:
140 /// constructor from existing CherenkovParticleIDObj
141 explicit CherenkovParticleID(podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> obj);
143
144 podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> m_obj{nullptr};
145};
146
147std::ostream& operator<<(std::ostream& o, const CherenkovParticleID& value);
148
149#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
150void to_json(nlohmann::json& j, const CherenkovParticleID& value);
151#endif
152
153
154} // namespace edm4eic
155
156
157#endif
Definition CherenkovParticleIDCollectionData.h:32
Definition CherenkovParticleIDCollection.h:91
Definition CherenkovParticleIDCollection.h:36
Definition CherenkovParticleID.h:46
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_begin() const
Definition CherenkovParticleID.cc:104
float getNpe() const
Access the Overall photoelectron count.
Definition CherenkovParticleID.cc:91
MutableCherenkovParticleID clone(bool cloneRelations=true) const
Definition CherenkovParticleID.cc:36
const edm4eic::TrackSegment getChargedParticle() const
Access the reconstructed charged particle.
Definition CherenkovParticleID.cc:95
podio::RelationRange< edm4eic::MCRecoTrackerHitAssociation > getRawHitAssociations() const
Definition CherenkovParticleID.cc:127
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_end() const
Definition CherenkovParticleID.cc:174
CherenkovParticleID(const CherenkovParticleID &other)=default
copy constructor
podio::ObjectID id() const
Definition CherenkovParticleID.h:130
CherenkovParticleID & operator=(CherenkovParticleID other)
copy-assignment operator
Definition CherenkovParticleID.cc:31
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_begin() const
Definition CherenkovParticleID.cc:168
std::size_t hypotheses_size() const
Definition CherenkovParticleID.cc:148
float getPhotonEnergy() const
Access the Average energy for these Cherenkov photons [GeV].
Definition CherenkovParticleID.cc:93
~CherenkovParticleID()=default
destructor
const podio::ObjectID getObjectID() const
Definition CherenkovParticleID.cc:207
CherenkovParticleID()
default constructor
Definition CherenkovParticleID.cc:21
friend void swap(CherenkovParticleID &a, CherenkovParticleID &b)
Definition CherenkovParticleID.h:134
bool isAvailable() const
check whether the object is actually available
Definition CherenkovParticleID.cc:203
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_end() const
Definition CherenkovParticleID.cc:110
void unlink()
disconnect from CherenkovParticleIDObj instance
Definition CherenkovParticleID.h:119
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_end() const
Definition CherenkovParticleID.cc:142
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_begin() const
Definition CherenkovParticleID.cc:136
friend class MutableCherenkovParticleID
Definition CherenkovParticleID.h:48
bool operator<(const CherenkovParticleID &other) const
Definition CherenkovParticleID.h:128
friend class CherenkovParticleIDCollection
Definition CherenkovParticleID.h:49
static CherenkovParticleID makeEmpty()
Definition CherenkovParticleID.cc:87
podio::RelationRange< edm4hep::Vector2f > getThetaPhiPhotons() const
Definition CherenkovParticleID.cc:191
bool operator!=(const MutableCherenkovParticleID &other) const
Definition CherenkovParticleID.h:125
bool operator!=(const CherenkovParticleID &other) const
Definition CherenkovParticleID.h:124
static constexpr auto typeName
Definition CherenkovParticleID.h:84
bool operator==(const CherenkovParticleID &other) const
Definition CherenkovParticleID.h:121
podio::RelationRange< edm4eic::CherenkovParticleIDHypothesis > getHypotheses() const
Definition CherenkovParticleID.cc:159
float getRefractiveIndex() const
Access the Average refractive index at the Cherenkov photons' vertices.
Definition CherenkovParticleID.cc:92
std::size_t rawHitAssociations_size() const
Definition CherenkovParticleID.cc:116
std::size_t thetaPhiPhotons_size() const
Definition CherenkovParticleID.cc:180
Definition CherenkovParticleIDHypothesis.h:19
Definition CherenkovParticleIDObj.h:26
Definition MCRecoTrackerHitAssociation.h:46
Definition MutableCherenkovParticleID.h:38
Definition TrackSegment.h:45
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150