3#ifndef EDM4EIC_MutableMCRecoParticleAssociation_H
4#define EDM4EIC_MutableMCRecoParticleAssociation_H
12#include "podio/utilities/MaybeSharedPtr.h"
16#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
17#include "nlohmann/json_fwd.hpp"
22class ReconstructedParticle;
23class MutableReconstructedParticle;
27class MutableMCParticle;
83 const edm4hep::MCParticle
getSim()
const;
90 [[deprecated(
"use getSimID instead")]]
91 std::uint32_t&
simID();
98 [[deprecated(
"use getRecID instead")]]
99 std::uint32_t&
recID();
106 [[deprecated(
"use getWeight instead")]]
113 void setSim(
const edm4hep::MCParticle& value);
121 void unlink() { m_obj = podio::utils::MaybeSharedPtr<MCRecoParticleAssociationObj>{
nullptr}; }
138 swap(a.m_obj, b.m_obj);
145 podio::utils::MaybeSharedPtr<MCRecoParticleAssociationObj> m_obj{
nullptr};
148#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
149void to_json(nlohmann::json& j,
const MutableMCRecoParticleAssociation& value);
Definition MCRecoParticleAssociationCollection.h:92
Definition MCRecoParticleAssociation.h:40
Definition MCRecoParticleAssociationCollection.h:63
Definition MutableMCRecoParticleAssociation.h:38
std::uint32_t getSimID() const
Access the Index of corresponding MCParticle (position in MCParticles array)
Definition MutableMCRecoParticleAssociation.cc:45
const edm4hep::MCParticle getSim() const
Access the reference to the Monte-Carlo particle.
Definition MutableMCRecoParticleAssociation.cc:56
bool operator!=(const MutableMCRecoParticleAssociation &other) const
Definition MutableMCRecoParticleAssociation.h:126
MutableMCRecoParticleAssociation(const MutableMCRecoParticleAssociation &other)=default
copy constructor
const podio::ObjectID getObjectID() const
Definition MutableMCRecoParticleAssociation.cc:94
void setRec(const edm4eic::ReconstructedParticle &value)
Set the reference to the reconstructed particle.
Definition MutableMCRecoParticleAssociation.cc:74
float & weight()
Get reference to weight of this association.
Definition MutableMCRecoParticleAssociation.cc:72
void setWeight(float value)
Set the weight of this association.
Definition MutableMCRecoParticleAssociation.cc:70
void setRecID(std::uint32_t value)
Set the Index of corresponding ReconstructedParticle (position in ReconstructedParticles array)
Definition MutableMCRecoParticleAssociation.cc:67
podio::ObjectID id() const
Definition MutableMCRecoParticleAssociation.h:132
void unlink()
disconnect from MCRecoParticleAssociationObj instance
Definition MutableMCRecoParticleAssociation.h:121
MutableMCRecoParticleAssociation()
default constructor
Definition MutableMCRecoParticleAssociation.cc:20
void setSimID(std::uint32_t value)
Set the Index of corresponding MCParticle (position in MCParticles array)
Definition MutableMCRecoParticleAssociation.cc:64
std::uint32_t & simID()
Get reference to Index of corresponding MCParticle (position in MCParticles array)
Definition MutableMCRecoParticleAssociation.cc:66
bool operator<(const MutableMCRecoParticleAssociation &other) const
Definition MutableMCRecoParticleAssociation.h:130
void setSim(const edm4hep::MCParticle &value)
Set the reference to the Monte-Carlo particle.
Definition MutableMCRecoParticleAssociation.cc:79
std::uint32_t & recID()
Get reference to Index of corresponding ReconstructedParticle (position in ReconstructedParticles arr...
Definition MutableMCRecoParticleAssociation.cc:69
MutableMCRecoParticleAssociation clone(bool cloneRelations=true) const
Definition MutableMCRecoParticleAssociation.cc:35
friend void swap(MutableMCRecoParticleAssociation &a, MutableMCRecoParticleAssociation &b)
Definition MutableMCRecoParticleAssociation.h:136
const edm4eic::ReconstructedParticle getRec() const
Access the reference to the reconstructed particle.
Definition MutableMCRecoParticleAssociation.cc:49
friend class MCRecoParticleAssociation
Definition MutableMCRecoParticleAssociation.h:42
bool operator!=(const MCRecoParticleAssociation &other) const
Definition MutableMCRecoParticleAssociation.h:127
bool operator==(const MutableMCRecoParticleAssociation &other) const
Definition MutableMCRecoParticleAssociation.h:123
std::uint32_t getRecID() const
Access the Index of corresponding ReconstructedParticle (position in ReconstructedParticles array)
Definition MutableMCRecoParticleAssociation.cc:46
float getWeight() const
Access the weight of this association.
Definition MutableMCRecoParticleAssociation.cc:47
~MutableMCRecoParticleAssociation()=default
destructor
MutableMCRecoParticleAssociation & operator=(MutableMCRecoParticleAssociation other)
copy-assignment operator
Definition MutableMCRecoParticleAssociation.cc:30
bool isAvailable() const
check whether the object is actually available
Definition MutableMCRecoParticleAssociation.cc:90
friend class MCRecoParticleAssociationCollection
Definition MutableMCRecoParticleAssociation.h:40
Definition ReconstructedParticle.h:47
Definition CalorimeterHit.cc:17
Definition CalorimeterHit.h:21