3#ifndef EDM4EIC_MCRecoVertexParticleAssociation_H
4#define EDM4EIC_MCRecoVertexParticleAssociation_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::MCRecoVertexParticleAssociation& obj);
87 static constexpr std::string_view
typeName =
"edm4eic::MCRecoVertexParticleAssociation";
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<MCRecoVertexParticleAssociationObj>{
nullptr}; }
121 friend std::hash<MCRecoVertexParticleAssociation>;
125 swap(a.m_obj, b.m_obj);
138#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
148struct std::hash<
edm4eic::MCRecoVertexParticleAssociation> {
150 return std::hash<edm4eic::MCRecoVertexParticleAssociationObj*>{}(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 MCRecoVertexParticleAssociationCollectionData.h:33
Definition MCRecoVertexParticleAssociationCollection.h:138
Definition MCRecoVertexParticleAssociation.h:48
bool operator<(const MCRecoVertexParticleAssociation &other) const
Definition MCRecoVertexParticleAssociation.h:115
const edm4hep::MCParticle getSim() const
Access the reference to the Monte-Carlo particle.
Definition MCRecoVertexParticleAssociation.cc:65
podio::ObjectID id() const
Definition MCRecoVertexParticleAssociation.h:117
bool operator!=(const MCRecoVertexParticleAssociation &other) const
Definition MCRecoVertexParticleAssociation.h:111
friend void swap(MCRecoVertexParticleAssociation &a, MCRecoVertexParticleAssociation &b)
Definition MCRecoVertexParticleAssociation.h:123
MutableMCRecoVertexParticleAssociation mutable_type
Definition MCRecoVertexParticleAssociation.h:57
int getSimID() const
Definition MCRecoVertexParticleAssociation.h:99
MCRecoVertexParticleAssociation(const MCRecoVertexParticleAssociation &other)=default
copy constructor
float getWeight() const
Access the weight of this association.
Definition MCRecoVertexParticleAssociation.cc:56
MCRecoVertexParticleAssociation()=default
default constructor
int getRecID() const
Definition MCRecoVertexParticleAssociation.h:100
MutableMCRecoVertexParticleAssociation clone(bool cloneRelations=true) const
Definition MCRecoVertexParticleAssociation.cc:31
MCRecoVertexParticleAssociation & operator=(MCRecoVertexParticleAssociation other) &&=delete
static constexpr std::string_view typeName
Definition MCRecoVertexParticleAssociation.h:87
friend class MCRecoVertexParticleAssociationCollectionIterator
Definition MCRecoVertexParticleAssociation.h:53
friend class MCRecoVertexParticleAssociationCollection
Definition MCRecoVertexParticleAssociation.h:51
friend class MutableMCRecoVertexParticleAssociation
Definition MCRecoVertexParticleAssociation.h:50
bool operator==(const MCRecoVertexParticleAssociation &other) const
Definition MCRecoVertexParticleAssociation.h:108
MCRecoVertexParticleAssociationCollection collection_type
Definition MCRecoVertexParticleAssociation.h:58
MCRecoVertexParticleAssociation & operator=(MCRecoVertexParticleAssociation other) &
copy-assignment operator
Definition MCRecoVertexParticleAssociation.cc:26
static MCRecoVertexParticleAssociation makeEmpty()
Definition MCRecoVertexParticleAssociation.cc:52
void unlink()
disconnect from MCRecoVertexParticleAssociationObj instance
Definition MCRecoVertexParticleAssociation.h:106
bool isAvailable() const
check whether the object is actually available
Definition MCRecoVertexParticleAssociation.cc:77
bool operator!=(const MutableMCRecoVertexParticleAssociation &other) const
Definition MCRecoVertexParticleAssociation.h:112
const podio::ObjectID getObjectID() const
Definition MCRecoVertexParticleAssociation.cc:81
~MCRecoVertexParticleAssociation()=default
destructor
const edm4eic::Vertex getRec() const
Access the reference to the vertex.
Definition MCRecoVertexParticleAssociation.cc:58
Definition MCRecoVertexParticleAssociationObj.h:24
Definition MutableMCRecoVertexParticleAssociation.h:40
Definition MutableVertex.h:38
const podio::ObjectID getObjectID() const
Definition Vertex.cc:110
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::MCRecoVertexParticleAssociation &obj) const
Definition MCRecoVertexParticleAssociation.h:149