3#ifndef EDM4EIC_MutableMCRecoVertexParticleAssociation_H
4#define EDM4EIC_MutableMCRecoVertexParticleAssociation_H
12#include "podio/utilities/MaybeSharedPtr.h"
16#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
17#include "nlohmann/json_fwd.hpp"
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<MCRecoVertexParticleAssociationObj>{
nullptr}; }
138 swap(a.m_obj, b.m_obj);
145 podio::utils::MaybeSharedPtr<MCRecoVertexParticleAssociationObj> m_obj{
nullptr};
148#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
149void to_json(nlohmann::json& j,
const MutableMCRecoVertexParticleAssociation& value);
Definition MCRecoVertexParticleAssociationCollection.h:92
Definition MCRecoVertexParticleAssociation.h:40
Definition MCRecoVertexParticleAssociationCollection.h:63
Definition MutableMCRecoVertexParticleAssociation.h:38
bool operator<(const MutableMCRecoVertexParticleAssociation &other) const
Definition MutableMCRecoVertexParticleAssociation.h:130
podio::ObjectID id() const
Definition MutableMCRecoVertexParticleAssociation.h:132
MutableMCRecoVertexParticleAssociation(const MutableMCRecoVertexParticleAssociation &other)=default
copy constructor
const edm4eic::Vertex getRec() const
Access the reference to the vertex.
Definition MutableMCRecoVertexParticleAssociation.cc:49
void setSimID(std::uint32_t value)
Set the Index of corresponding MCParticle (position in MCParticles array)
Definition MutableMCRecoVertexParticleAssociation.cc:64
bool isAvailable() const
check whether the object is actually available
Definition MutableMCRecoVertexParticleAssociation.cc:90
friend class MCRecoVertexParticleAssociation
Definition MutableMCRecoVertexParticleAssociation.h:42
const podio::ObjectID getObjectID() const
Definition MutableMCRecoVertexParticleAssociation.cc:94
std::uint32_t & simID()
Get reference to Index of corresponding MCParticle (position in MCParticles array)
Definition MutableMCRecoVertexParticleAssociation.cc:66
bool operator==(const MutableMCRecoVertexParticleAssociation &other) const
Definition MutableMCRecoVertexParticleAssociation.h:123
void setRec(const edm4eic::Vertex &value)
Set the reference to the vertex.
Definition MutableMCRecoVertexParticleAssociation.cc:74
void setWeight(float value)
Set the weight of this association.
Definition MutableMCRecoVertexParticleAssociation.cc:70
friend void swap(MutableMCRecoVertexParticleAssociation &a, MutableMCRecoVertexParticleAssociation &b)
Definition MutableMCRecoVertexParticleAssociation.h:136
MutableMCRecoVertexParticleAssociation & operator=(MutableMCRecoVertexParticleAssociation other)
copy-assignment operator
Definition MutableMCRecoVertexParticleAssociation.cc:30
void setRecID(std::uint32_t value)
Set the Index of corresponding Vertex (position in Vertices array)
Definition MutableMCRecoVertexParticleAssociation.cc:67
std::uint32_t getRecID() const
Access the Index of corresponding Vertex (position in Vertices array)
Definition MutableMCRecoVertexParticleAssociation.cc:46
bool operator!=(const MCRecoVertexParticleAssociation &other) const
Definition MutableMCRecoVertexParticleAssociation.h:127
friend class MCRecoVertexParticleAssociationCollection
Definition MutableMCRecoVertexParticleAssociation.h:40
MutableMCRecoVertexParticleAssociation clone(bool cloneRelations=true) const
Definition MutableMCRecoVertexParticleAssociation.cc:35
bool operator!=(const MutableMCRecoVertexParticleAssociation &other) const
Definition MutableMCRecoVertexParticleAssociation.h:126
~MutableMCRecoVertexParticleAssociation()=default
destructor
void unlink()
disconnect from MCRecoVertexParticleAssociationObj instance
Definition MutableMCRecoVertexParticleAssociation.h:121
std::uint32_t getSimID() const
Access the Index of corresponding MCParticle (position in MCParticles array)
Definition MutableMCRecoVertexParticleAssociation.cc:45
MutableMCRecoVertexParticleAssociation()
default constructor
Definition MutableMCRecoVertexParticleAssociation.cc:20
void setSim(const edm4hep::MCParticle &value)
Set the reference to the Monte-Carlo particle.
Definition MutableMCRecoVertexParticleAssociation.cc:79
float & weight()
Get reference to weight of this association.
Definition MutableMCRecoVertexParticleAssociation.cc:72
float getWeight() const
Access the weight of this association.
Definition MutableMCRecoVertexParticleAssociation.cc:47
std::uint32_t & recID()
Get reference to Index of corresponding Vertex (position in Vertices array)
Definition MutableMCRecoVertexParticleAssociation.cc:69
const edm4hep::MCParticle getSim() const
Access the reference to the Monte-Carlo particle.
Definition MutableMCRecoVertexParticleAssociation.cc:56
Definition CalorimeterHit.cc:17
Definition CalorimeterHit.h:21