3#ifndef EDM4EIC_MCRecoParticleAssociation_H
4#define EDM4EIC_MCRecoParticleAssociation_H
9#include <edm4hep/MCParticle.h>
11#include "podio/utilities/MaybeSharedPtr.h"
12#include "podio/detail/OrderKey.h"
17#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
18#include "nlohmann/json_fwd.hpp"
29class MutableMCParticle;
35OrderKey
getOrderKey(
const edm4eic::MCRecoParticleAssociation& obj);
87 static constexpr std::string_view
typeName =
"edm4eic::MCRecoParticleAssociation";
96 const edm4hep::MCParticle
getSim()
const;
99 [[deprecated(
"use getSim().getObjectID().index instead")]]
int getSimID()
const {
return getSim().getObjectID().index; }
106 void unlink() { m_obj = podio::utils::MaybeSharedPtr<MCRecoParticleAssociationObj>{
nullptr}; }
121 friend std::hash<MCRecoParticleAssociation>;
125 swap(a.m_obj, b.m_obj);
138#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
148struct std::hash<
edm4eic::MCRecoParticleAssociation> {
150 return std::hash<edm4eic::MCRecoParticleAssociationObj*>{}(obj.m_obj.get());
158#if defined(__clang__)
159 #pragma clang diagnostic push
160 #pragma clang diagnostic ignored "-Wunknown-warning-option"
161 #pragma clang diagnostic ignored "-Wdeprecated-redundant-constexpr-static-def"
162 #pragma clang diagnostic ignored "-Wdeprecated"
164 #pragma clang diagnostic pop
165#elif defined(__GNUC__)
166 #pragma GCC diagnostic push
167 #pragma GCC diagnostic ignored "-Wdeprecated"
169 #pragma GCC diagnostic pop
Definition MCRecoParticleAssociationCollectionData.h:33
Definition MCRecoParticleAssociationCollection.h:138
Definition MCRecoParticleAssociation.h:48
friend class MutableMCRecoParticleAssociation
Definition MCRecoParticleAssociation.h:50
friend void swap(MCRecoParticleAssociation &a, MCRecoParticleAssociation &b)
Definition MCRecoParticleAssociation.h:123
bool operator<(const MCRecoParticleAssociation &other) const
Definition MCRecoParticleAssociation.h:115
const podio::ObjectID getObjectID() const
Definition MCRecoParticleAssociation.cc:81
const edm4eic::ReconstructedParticle getRec() const
Access the reference to the reconstructed particle.
Definition MCRecoParticleAssociation.cc:58
bool operator!=(const MutableMCRecoParticleAssociation &other) const
Definition MCRecoParticleAssociation.h:112
int getRecID() const
Definition MCRecoParticleAssociation.h:100
const edm4hep::MCParticle getSim() const
Access the reference to the Monte-Carlo particle.
Definition MCRecoParticleAssociation.cc:65
MCRecoParticleAssociation & operator=(MCRecoParticleAssociation other) &&=delete
bool operator==(const MCRecoParticleAssociation &other) const
Definition MCRecoParticleAssociation.h:108
MCRecoParticleAssociation & operator=(MCRecoParticleAssociation other) &
copy-assignment operator
Definition MCRecoParticleAssociation.cc:26
MutableMCRecoParticleAssociation mutable_type
Definition MCRecoParticleAssociation.h:57
MutableMCRecoParticleAssociation clone(bool cloneRelations=true) const
Definition MCRecoParticleAssociation.cc:31
void unlink()
disconnect from MCRecoParticleAssociationObj instance
Definition MCRecoParticleAssociation.h:106
MCRecoParticleAssociation()=default
default constructor
~MCRecoParticleAssociation()=default
destructor
static constexpr std::string_view typeName
Definition MCRecoParticleAssociation.h:87
bool isAvailable() const
check whether the object is actually available
Definition MCRecoParticleAssociation.cc:77
MCRecoParticleAssociation(const MCRecoParticleAssociation &other)=default
copy constructor
float getWeight() const
Access the weight of this association.
Definition MCRecoParticleAssociation.cc:56
friend class MCRecoParticleAssociationCollectionIterator
Definition MCRecoParticleAssociation.h:53
static MCRecoParticleAssociation makeEmpty()
Definition MCRecoParticleAssociation.cc:52
MCRecoParticleAssociationCollection collection_type
Definition MCRecoParticleAssociation.h:58
int getSimID() const
Definition MCRecoParticleAssociation.h:99
friend class MCRecoParticleAssociationCollection
Definition MCRecoParticleAssociation.h:51
bool operator!=(const MCRecoParticleAssociation &other) const
Definition MCRecoParticleAssociation.h:111
podio::ObjectID id() const
Definition MCRecoParticleAssociation.h:117
Definition MCRecoParticleAssociationObj.h:24
Definition MutableMCRecoParticleAssociation.h:40
Definition MutableReconstructedParticle.h:46
Definition ReconstructedParticle.h:54
const podio::ObjectID getObjectID() const
Definition ReconstructedParticle.cc:269
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:99
Definition CalorimeterHit.h:25
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MCRecoParticleAssociation &obj) const
Definition MCRecoParticleAssociation.h:149