3#ifndef EDM4EIC_MutableIrtParticle_H
4#define EDM4EIC_MutableIrtParticle_H
11#include "podio/RelationRange.h"
15#include "podio/utilities/MaybeSharedPtr.h"
19#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
20#include "nlohmann/json_fwd.hpp"
52 MutableIrtParticle(
const std::int32_t PDG,
const std::uint16_t npe,
const std::uint16_t nhits);
75 std::int32_t
getPDG()
const;
78 std::uint16_t
getNpe()
const;
88 void setPDG(
const std::int32_t PDG);
93 void setNpe(
const std::uint16_t npe);
98 void setNhits(
const std::uint16_t nhits);
109 std::vector<edm4eic::IrtRadiatorInfo>::const_iterator
radiators_begin()
const;
110 std::vector<edm4eic::IrtRadiatorInfo>::const_iterator
radiators_end()
const;
111 podio::RelationRange<edm4eic::IrtRadiatorInfo>
getRadiators()
const;
118 void unlink() { m_obj = podio::utils::MaybeSharedPtr<IrtParticleObj>{
nullptr}; }
133 friend std::hash<MutableIrtParticle>;
137 swap(a.m_obj, b.m_obj);
144 podio::utils::MaybeSharedPtr<IrtParticleObj> m_obj{
new IrtParticleObj{}, podio::utils::MarkOwned};
147#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
157struct std::hash<
edm4eic::MutableIrtParticle> {
159 return std::hash<edm4eic::IrtParticleObj*>{}(obj.m_obj.get());
Definition IrtParticleCollection.h:139
Definition IrtParticle.h:46
Definition IrtParticleObj.h:24
Definition IrtRadiatorInfo.h:41
Definition MutableIrtParticle.h:38
const podio::ObjectID getObjectID() const
Definition MutableIrtParticle.cc:112
void addToRadiators(const edm4eic::IrtRadiatorInfo &)
Definition MutableIrtParticle.cc:67
~MutableIrtParticle()=default
destructor
void setNhits(const std::uint16_t nhits)
Set the Hit count associated with this particle by IRT engine.
Definition MutableIrtParticle.cc:59
std::int32_t getPDG() const
Access the Reconstructed most probable PDG code.
Definition MutableIrtParticle.cc:43
std::vector< edm4eic::IrtRadiatorInfo >::const_iterator radiators_begin() const
Definition MutableIrtParticle.cc:72
std::size_t radiators_size() const
Definition MutableIrtParticle.cc:84
std::vector< edm4eic::IrtRadiatorInfo >::const_iterator radiators_end() const
Definition MutableIrtParticle.cc:78
bool isAvailable() const
check whether the object is actually available
Definition MutableIrtParticle.cc:108
MutableIrtParticle & operator=(MutableIrtParticle other) &
copy-assignment operator
Definition MutableIrtParticle.cc:25
void setNpe(const std::uint16_t npe)
Set the Detected photoelectron count.
Definition MutableIrtParticle.cc:57
void unlink()
disconnect from IrtParticleObj instance
Definition MutableIrtParticle.h:118
MutableIrtParticle & operator=(MutableIrtParticle other) &&=delete
IrtParticleCollection collection_type
Definition MutableIrtParticle.h:46
friend class IrtParticleMutableCollectionIterator
Definition MutableIrtParticle.h:41
friend class IrtParticle
Definition MutableIrtParticle.h:42
bool operator!=(const IrtParticle &other) const
Definition MutableIrtParticle.h:124
friend void swap(MutableIrtParticle &a, MutableIrtParticle &b)
Definition MutableIrtParticle.h:135
void setTrack(const edm4eic::Track &value)
Set the charged particle track.
Definition MutableIrtParticle.cc:62
MutableIrtParticle(MutableIrtParticle &&other) noexcept=default
move constructor
friend class IrtParticleCollection
Definition MutableIrtParticle.h:40
const edm4eic::Track getTrack() const
Access the charged particle track.
Definition MutableIrtParticle.cc:47
IrtParticle object_type
Definition MutableIrtParticle.h:45
std::uint16_t getNpe() const
Access the Detected photoelectron count.
Definition MutableIrtParticle.cc:44
podio::RelationRange< edm4eic::IrtRadiatorInfo > getRadiators() const
Definition MutableIrtParticle.cc:95
std::uint16_t getNhits() const
Access the Hit count associated with this particle by IRT engine.
Definition MutableIrtParticle.cc:45
void setPDG(const std::int32_t PDG)
Set the Reconstructed most probable PDG code.
Definition MutableIrtParticle.cc:55
constexpr bool operator==(const MutableIrtParticle &other) const
Definition MutableIrtParticle.h:120
MutableIrtParticle()=default
default constructor
MutableIrtParticle(const MutableIrtParticle &other) noexcept=default
copy constructor
bool operator<(const MutableIrtParticle &other) const
Definition MutableIrtParticle.h:127
MutableIrtParticle clone(bool cloneRelations=true) const
Definition MutableIrtParticle.cc:30
podio::ObjectID id() const
Definition MutableIrtParticle.h:129
constexpr bool operator!=(const MutableIrtParticle &other) const
Definition MutableIrtParticle.h:123
Definition MutableTrack.h:40
Definition ArrowMapper.cc:63
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableIrtParticle &obj) const
Definition MutableIrtParticle.h:158