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);
72 std::int32_t
getPDG()
const;
75 std::uint16_t
getNpe()
const;
85 void setPDG(
const std::int32_t PDG);
90 void setNpe(
const std::uint16_t npe);
95 void setNhits(
const std::uint16_t nhits);
106 std::vector<edm4eic::IrtRadiatorInfo>::const_iterator
radiators_begin()
const;
107 std::vector<edm4eic::IrtRadiatorInfo>::const_iterator
radiators_end()
const;
108 podio::RelationRange<edm4eic::IrtRadiatorInfo>
getRadiators()
const;
115 void unlink() { m_obj = podio::utils::MaybeSharedPtr<IrtParticleObj>{
nullptr}; }
130 friend std::hash<MutableIrtParticle>;
134 swap(a.m_obj, b.m_obj);
141 podio::utils::MaybeSharedPtr<IrtParticleObj> m_obj{
new IrtParticleObj{}, podio::utils::MarkOwned};
144#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
154struct std::hash<
edm4eic::MutableIrtParticle> {
156 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:115
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:121
friend void swap(MutableIrtParticle &a, MutableIrtParticle &b)
Definition MutableIrtParticle.h:132
void setTrack(const edm4eic::Track &value)
Set the charged particle track.
Definition MutableIrtParticle.cc:62
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
MutableIrtParticle(const MutableIrtParticle &other)=default
copy constructor
constexpr bool operator==(const MutableIrtParticle &other) const
Definition MutableIrtParticle.h:117
MutableIrtParticle()=default
default constructor
bool operator<(const MutableIrtParticle &other) const
Definition MutableIrtParticle.h:124
MutableIrtParticle clone(bool cloneRelations=true) const
Definition MutableIrtParticle.cc:30
podio::ObjectID id() const
Definition MutableIrtParticle.h:126
constexpr bool operator!=(const MutableIrtParticle &other) const
Definition MutableIrtParticle.h:120
Definition MutableTrack.h:40
Definition ArrowMapper.cc:61
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableIrtParticle &obj) const
Definition MutableIrtParticle.h:155