EDM4eic
EIC data model
Loading...
Searching...
No Matches
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
15#include <ostream>
16#include <cstdint>
17
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
20#endif
21
22// forward declarations
23namespace edm4eic {
24class TrackSegment;
25class MutableTrackSegment;
26}
27
28
29namespace edm4eic {
30
31class MutableCherenkovParticleID;
32class CherenkovParticleIDCollection;
33class CherenkovParticleIDCollectionData;
34
35/** @class CherenkovParticleID
36 * Cherenkov detector PID
37 * @author: A. Kiselev, C. Chatterjee, C. Dilks
38 */
40
45
46public:
49
50 /// default constructor
52
53 /// Constructor initializing all members
54 CherenkovParticleID(float npe, float refractiveIndex, float photonEnergy);
55
56 /// copy constructor
58
59 /// copy-assignment operator
61
62 /// create a mutable deep-copy of the object with identical relations
63 /// if cloneRelations=false, the relations are not cloned and will be empty
64 MutableCherenkovParticleID clone(bool cloneRelations=true) const;
65
66 /// destructor
68
69 /// converting constructor from mutable object
71
73
74public:
75
76 /// Access the Overall photoelectron count
77 float getNpe() const;
78
79 /// Access the Average refractive index at the Cherenkov photons' vertices
80 float getRefractiveIndex() const;
81
82 /// Access the Average energy for these Cherenkov photons [GeV]
83 float getPhotonEnergy() const;
84
85
86 /// Access the reconstructed charged particle
88
89 std::size_t rawHitAssociations_size() const;
91 std::vector<edm4eic::MCRecoTrackerHitAssociation>::const_iterator rawHitAssociations_begin() const;
92 std::vector<edm4eic::MCRecoTrackerHitAssociation>::const_iterator rawHitAssociations_end() const;
93 podio::RelationRange<edm4eic::MCRecoTrackerHitAssociation> getRawHitAssociations() const;
94 std::size_t hypotheses_size() const;
96 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator hypotheses_begin() const;
97 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator hypotheses_end() const;
98 podio::RelationRange<edm4eic::CherenkovParticleIDHypothesis> getHypotheses() const;
99 std::size_t thetaPhiPhotons_size() const;
100 edm4hep::Vector2f getThetaPhiPhotons(std::size_t) const;
101 std::vector<edm4hep::Vector2f>::const_iterator thetaPhiPhotons_begin() const;
102 std::vector<edm4hep::Vector2f>::const_iterator thetaPhiPhotons_end() const;
103 podio::RelationRange<edm4hep::Vector2f> getThetaPhiPhotons() const;
104
105
106 /// check whether the object is actually available
107 bool isAvailable() const;
108 /// disconnect from CherenkovParticleIDObj instance
109 void unlink() { m_obj = podio::utils::MaybeSharedPtr<CherenkovParticleIDObj>{nullptr}; }
110
111 bool operator==(const CherenkovParticleID& other) const { return m_obj == other.m_obj; }
112 bool operator==(const MutableCherenkovParticleID& other) const;
113
114 bool operator!=(const CherenkovParticleID& other) const { return !(*this == other); }
115 bool operator!=(const MutableCherenkovParticleID& other) const { return !(*this == other); }
116
117 // less comparison operator, so that objects can be e.g. stored in sets.
118 bool operator<(const CherenkovParticleID& other) const { return m_obj < other.m_obj; }
119
120 podio::ObjectID id() const { return getObjectID(); }
121
122 const podio::ObjectID getObjectID() const;
123
125 using std::swap;
126 swap(a.m_obj, b.m_obj); // swap out the internal pointers
127 }
128
129private:
130 /// constructor from existing CherenkovParticleIDObj
131 explicit CherenkovParticleID(podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> obj);
133
134 podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> m_obj{nullptr};
135};
136
137std::ostream& operator<<(std::ostream& o, const CherenkovParticleID& value);
138
139#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
140void to_json(nlohmann::json& j, const CherenkovParticleID& value);
141#endif
142
143
144} // namespace edm4eic
145
146
147#endif
Definition CherenkovParticleIDCollectionData.h:32
Definition CherenkovParticleIDCollection.h:92
Definition CherenkovParticleIDCollection.h:37
Definition CherenkovParticleID.h:39
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:120
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:124
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:109
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:41
bool operator<(const CherenkovParticleID &other) const
Definition CherenkovParticleID.h:118
friend class CherenkovParticleIDCollection
Definition CherenkovParticleID.h:42
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:115
bool operator!=(const CherenkovParticleID &other) const
Definition CherenkovParticleID.h:114
bool operator==(const CherenkovParticleID &other) const
Definition CherenkovParticleID.h:111
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:25
Definition MCRecoTrackerHitAssociation.h:39
Definition MutableCherenkovParticleID.h:37
Definition TrackSegment.h:38
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103