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"
72 std::int32_t
getPDG()
const;
75 std::uint16_t
getNpe()
const;
89 [[deprecated(
"use getPDG instead")]]
97 [[deprecated(
"use getNpe instead")]]
105 [[deprecated(
"use getNhits instead")]]
106 std::uint16_t&
nhits();
115 std::vector<edm4eic::IrtRadiatorInfo>::const_iterator
radiators_begin()
const;
116 std::vector<edm4eic::IrtRadiatorInfo>::const_iterator
radiators_end()
const;
117 podio::RelationRange<edm4eic::IrtRadiatorInfo>
getRadiators()
const;
124 void unlink() { m_obj = podio::utils::MaybeSharedPtr<IrtParticleObj>{
nullptr}; }
139 friend std::hash<MutableIrtParticle>;
143 swap(a.m_obj, b.m_obj);
150 podio::utils::MaybeSharedPtr<IrtParticleObj> m_obj{
new IrtParticleObj{}, podio::utils::MarkOwned};
153#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
163struct std::hash<
edm4eic::MutableIrtParticle> {
165 return std::hash<edm4eic::IrtParticleObj*>{}(obj.m_obj.get());
Definition IrtParticleCollection.h:138
Definition IrtParticle.h:46
Definition IrtParticleObj.h:24
Definition IrtRadiatorInfo.h:41
Definition MutableIrtParticle.h:38
const podio::ObjectID getObjectID() const
Definition MutableIrtParticle.cc:115
void addToRadiators(const edm4eic::IrtRadiatorInfo &)
Definition MutableIrtParticle.cc:70
~MutableIrtParticle()=default
destructor
void setNhits(const std::uint16_t nhits)
Set the Hit count associated with this particle by IRT engine.
Definition MutableIrtParticle.cc:61
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:75
std::size_t radiators_size() const
Definition MutableIrtParticle.cc:87
std::vector< edm4eic::IrtRadiatorInfo >::const_iterator radiators_end() const
Definition MutableIrtParticle.cc:81
bool isAvailable() const
check whether the object is actually available
Definition MutableIrtParticle.cc:111
MutableIrtParticle & operator=(MutableIrtParticle other) &
copy-assignment operator
Definition MutableIrtParticle.cc:25
std::uint16_t & nhits()
Get reference to Hit count associated with this particle by IRT engine.
Definition MutableIrtParticle.cc:63
void setNpe(const std::uint16_t npe)
Set the Detected photoelectron count.
Definition MutableIrtParticle.cc:58
void unlink()
disconnect from IrtParticleObj instance
Definition MutableIrtParticle.h:124
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:130
friend void swap(MutableIrtParticle &a, MutableIrtParticle &b)
Definition MutableIrtParticle.h:141
void setTrack(const edm4eic::Track &value)
Set the charged particle track.
Definition MutableIrtParticle.cc:65
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:98
std::uint16_t getNhits() const
Access the Hit count associated with this particle by IRT engine.
Definition MutableIrtParticle.cc:45
bool operator==(const MutableIrtParticle &other) const
Definition MutableIrtParticle.h:126
void setPDG(const std::int32_t PDG)
Set the Reconstructed most probable PDG code.
Definition MutableIrtParticle.cc:55
bool operator!=(const MutableIrtParticle &other) const
Definition MutableIrtParticle.h:129
MutableIrtParticle(const MutableIrtParticle &other)=default
copy constructor
MutableIrtParticle()=default
default constructor
std::int32_t & PDG()
Get reference to Reconstructed most probable PDG code.
Definition MutableIrtParticle.cc:57
bool operator<(const MutableIrtParticle &other) const
Definition MutableIrtParticle.h:133
MutableIrtParticle clone(bool cloneRelations=true) const
Definition MutableIrtParticle.cc:30
std::uint16_t & npe()
Get reference to Detected photoelectron count.
Definition MutableIrtParticle.cc:60
podio::ObjectID id() const
Definition MutableIrtParticle.h:135
Definition MutableTrack.h:40
Definition CalorimeterHit.cc:17
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableIrtParticle &obj) const
Definition MutableIrtParticle.h:164