3#ifndef EDM4EIC_MutableMCRecoParticleAssociation_H
4#define EDM4EIC_MutableMCRecoParticleAssociation_H
11#include <edm4hep/MCParticle.h>
13#include "podio/utilities/MaybeSharedPtr.h"
17#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
18#include "nlohmann/json_fwd.hpp"
29class MutableMCParticle;
80 const edm4hep::MCParticle
getSim()
const;
87 [[deprecated(
"use getWeight instead")]]
94 void setSim(
const edm4hep::MCParticle& value);
97 [[deprecated(
"use getSim().getObjectID().index instead")]]
int getSimID()
const {
return getSim().getObjectID().index; }
101 [[deprecated(
"use setSim() instead; this function does nothing")]]
void setSimID(
int) { }
102 [[deprecated(
"use setRec() instead; this function does nothing")]]
void setRecID(
int) { }
108 void unlink() { m_obj = podio::utils::MaybeSharedPtr<MCRecoParticleAssociationObj>{
nullptr}; }
123 friend std::hash<MutableMCRecoParticleAssociation>;
127 swap(a.m_obj, b.m_obj);
137#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
147struct std::hash<
edm4eic::MutableMCRecoParticleAssociation> {
149 return std::hash<edm4eic::MCRecoParticleAssociationObj*>{}(obj.m_obj.get());
Definition MCRecoParticleAssociationCollection.h:138
Definition MCRecoParticleAssociation.h:48
Definition MCRecoParticleAssociationObj.h:24
Definition MutableMCRecoParticleAssociation.h:40
void setSimID(int)
Definition MutableMCRecoParticleAssociation.h:101
const edm4hep::MCParticle getSim() const
Access the reference to the Monte-Carlo particle.
Definition MutableMCRecoParticleAssociation.cc:48
bool operator!=(const MutableMCRecoParticleAssociation &other) const
Definition MutableMCRecoParticleAssociation.h:113
MutableMCRecoParticleAssociation(const MutableMCRecoParticleAssociation &other)=default
copy constructor
MutableMCRecoParticleAssociation & operator=(MutableMCRecoParticleAssociation other) &&=delete
const podio::ObjectID getObjectID() const
Definition MutableMCRecoParticleAssociation.cc:78
void setRec(const edm4eic::ReconstructedParticle &value)
Set the reference to the reconstructed particle.
Definition MutableMCRecoParticleAssociation.cc:60
MCRecoParticleAssociationCollection collection_type
Definition MutableMCRecoParticleAssociation.h:48
float & weight()
Get reference to weight of this association.
Definition MutableMCRecoParticleAssociation.cc:58
podio::ObjectID id() const
Definition MutableMCRecoParticleAssociation.h:119
MCRecoParticleAssociation object_type
Definition MutableMCRecoParticleAssociation.h:47
void unlink()
disconnect from MCRecoParticleAssociationObj instance
Definition MutableMCRecoParticleAssociation.h:108
int getRecID() const
Definition MutableMCRecoParticleAssociation.h:98
bool operator<(const MutableMCRecoParticleAssociation &other) const
Definition MutableMCRecoParticleAssociation.h:117
void setSim(const edm4hep::MCParticle &value)
Set the reference to the Monte-Carlo particle.
Definition MutableMCRecoParticleAssociation.cc:64
MutableMCRecoParticleAssociation()=default
default constructor
MutableMCRecoParticleAssociation clone(bool cloneRelations=true) const
Definition MutableMCRecoParticleAssociation.cc:29
friend void swap(MutableMCRecoParticleAssociation &a, MutableMCRecoParticleAssociation &b)
Definition MutableMCRecoParticleAssociation.h:125
void setWeight(const float weight)
Set the weight of this association.
Definition MutableMCRecoParticleAssociation.cc:56
const edm4eic::ReconstructedParticle getRec() const
Access the reference to the reconstructed particle.
Definition MutableMCRecoParticleAssociation.cc:41
friend class MCRecoParticleAssociation
Definition MutableMCRecoParticleAssociation.h:44
bool operator!=(const MCRecoParticleAssociation &other) const
Definition MutableMCRecoParticleAssociation.h:114
void setRecID(int)
Definition MutableMCRecoParticleAssociation.h:102
MutableMCRecoParticleAssociation & operator=(MutableMCRecoParticleAssociation other) &
copy-assignment operator
Definition MutableMCRecoParticleAssociation.cc:24
bool operator==(const MutableMCRecoParticleAssociation &other) const
Definition MutableMCRecoParticleAssociation.h:110
friend class MCRecoParticleAssociationMutableCollectionIterator
Definition MutableMCRecoParticleAssociation.h:43
float getWeight() const
Access the weight of this association.
Definition MutableMCRecoParticleAssociation.cc:39
~MutableMCRecoParticleAssociation()=default
destructor
int getSimID() const
Definition MutableMCRecoParticleAssociation.h:97
bool isAvailable() const
check whether the object is actually available
Definition MutableMCRecoParticleAssociation.cc:74
friend class MCRecoParticleAssociationCollection
Definition MutableMCRecoParticleAssociation.h:42
Definition MutableReconstructedParticle.h:46
Definition ReconstructedParticle.h:54
const podio::ObjectID getObjectID() const
Definition ReconstructedParticle.cc:269
Definition CalorimeterHit.cc:17
Definition CalorimeterHit.h:25
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableMCRecoParticleAssociation &obj) const
Definition MutableMCRecoParticleAssociation.h:148