Skip to content

Commit

Permalink
Rename association relations and add extra code for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jul 17, 2024
1 parent 648d35c commit 213cdd1
Showing 1 changed file with 126 additions and 14 deletions.
140 changes: 126 additions & 14 deletions edm4hep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -619,62 +619,174 @@ datatypes:
Members:
- float weight // weight of this association
OneToOneRelations:
- edm4hep::ReconstructedParticle rec // reference to the reconstructed particle
- edm4hep::MCParticle sim // reference to the Monte-Carlo particle
- edm4hep::ReconstructedParticle from // reference to the reconstructed particle
- edm4hep::MCParticle to // reference to the Monte-Carlo particle
ExtraCode:
includes: "
#include <edm4hep/ReconstructedParticle.h>\n
#include <edm4hep/MCParticle.h>\n"
declarationFile: "edm4hep/extra_code/AssociationGetters.ipp"
MutableExtraCode:
includes: "
#include <edm4hep/ReconstructedParticle.h>\n
#include <edm4hep/MCParticle.h>\n"

declaration: "
[[deprecated(\"use setFrom instead\")]]\n
void setRec(edm4hep::ReconstructedParticle rec) {setFrom(rec);}\n
[[deprecated(\"use setSim instead\")]]\n
void setSim(edm4hep::MCParticle sim) {setTo(sim);}\n
"

edm4hep::MCRecoCaloAssociation:
Description: "Association between a CalorimeterHit and the corresponding SimCalorimeterHit"
Author: "EDM4hep authors"
Members:
- float weight // weight of this association
OneToOneRelations:
- edm4hep::CalorimeterHit rec // reference to the reconstructed hit
- edm4hep::SimCalorimeterHit sim // reference to the simulated hit
- edm4hep::CalorimeterHit from // reference to the reconstructed hit
- edm4hep::SimCalorimeterHit to // reference to the simulated hit
ExtraCode:
includes: "
#include <edm4hep/CalorimeterHit.h>\n
#include <edm4hep/SimCalorimeterHit.h>\n"
declarationFile: "edm4hep/extra_code/AssociationGetters.ipp"
MutableExtraCode:
includes: "
#include <edm4hep/CalorimeterHit.h>\n
#include <edm4hep/SimCalorimeterHit.h>\n"
declaration: "
[[deprecated(\"use setFrom instead\")]]\n
void setRec(edm4hep::CalorimeterHit rec) {setFrom(rec);}\n
[[deprecated(\"use setSim instead\")]]\n
void setSim(edm4hep::SimCalorimeterHit sim) {setTo(sim);}\n
"


edm4hep::MCRecoTrackerAssociation:
Description: "Association between a TrackerHit and the corresponding SimTrackerHit"
Author: "EDM4hep authors"
Members:
- float weight // weight of this association
OneToOneRelations:
- edm4hep::TrackerHit rec // reference to the reconstructed hit
- edm4hep::SimTrackerHit sim // reference to the simulated hit
- edm4hep::TrackerHit from // reference to the reconstructed hit
- edm4hep::SimTrackerHit to // reference to the simulated hit
ExtraCode:
includes: "
#include <edm4hep/TrackerHit.h>\n
#include <edm4hep/SimTrackerHit.h>\n"
declarationFile: "edm4hep/extra_code/AssociationGetters.ipp"
MutableExtraCode:
includes: "
#include <edm4hep/TrackerHit.h>\n
#include <edm4hep/SimTrackerHit.h>\n"
declaration: "
[[deprecated(\"use setFrom instead\")]]\n
void setRec(edm4hep::TrackerHit rec) {setFrom(rec);}\n
[[deprecated(\"use setSim instead\")]]\n
void setSim(edm4hep::SimTrackerHit sim) {setTo(sim);}\n
"

edm4hep::MCRecoCaloParticleAssociation:
Description: "Association between a CalorimeterHit and the corresponding MCParticle"
Author: "EDM4hep authors"
Members:
- float weight // weight of this association
OneToOneRelations:
- edm4hep::CalorimeterHit rec // reference to the reconstructed hit
- edm4hep::MCParticle sim // reference to the Monte-Carlo particle
- edm4hep::CalorimeterHit from // reference to the reconstructed hit
- edm4hep::MCParticle to // reference to the Monte-Carlo particle
ExtraCode:
includes: "
#include <edm4hep/CalorimeterHit.h>\n
#include <edm4hep/MCParticle.h>\n"
declarationFile: "edm4hep/extra_code/AssociationGetters.ipp"
MutableExtraCode:
includes: "
#include <edm4hep/CalorimeterHit.h>\n
#include <edm4hep/MCParticle.h>\n"
declaration: "
[[deprecated(\"use setFrom instead\")]]\n
void setRec(edm4hep::CalorimeterHit rec) {setFrom(rec);}\n
[[deprecated(\"use setSim instead\")]]\n
void setSim(edm4hep::MCParticle sim) {setTo(sim);}\n
"

edm4hep::MCRecoClusterParticleAssociation:
Description: "Association between a Cluster and the corresponding MCParticle"
Author: "EDM4hep authors"
Members:
- float weight // weight of this association
OneToOneRelations:
- edm4hep::Cluster rec // reference to the cluster
- edm4hep::MCParticle sim // reference to the Monte-Carlo particle
- edm4hep::Cluster from // reference to the cluster
- edm4hep::MCParticle to // reference to the Monte-Carlo particle
ExtraCode:
includes: "
#include <edm4hep/Cluster.h>\n
#include <edm4hep/MCParticle.h>\n"
declarationFile: "edm4hep/extra_code/AssociationGetters.ipp"
MutableExtraCode:
includes: "
#include <edm4hep/Cluster.h>\n
#include <edm4hep/MCParticle.h>\n"
declaration: "
[[deprecated(\"use setFrom instead\")]]\n
void setRec(edm4hep::Cluster rec) {setFrom(rec);}\n
[[deprecated(\"use setSim instead\")]]\n
void setSim(edm4hep::MCParticle sim) {setTo(sim);}\n
"

edm4hep::MCRecoTrackParticleAssociation:
Description: "Association between a Track and the corresponding MCParticle"
Author: "EDM4hep authors"
Members:
- float weight // weight of this association
OneToOneRelations:
- edm4hep::Track rec // reference to the track
- edm4hep::MCParticle sim // reference to the Monte-Carlo particle
- edm4hep::Track from // reference to the track
- edm4hep::MCParticle to // reference to the Monte-Carlo particle
ExtraCode:
includes: "
#include <edm4hep/Track.h>\n
#include <edm4hep/MCParticle.h>\n"
declarationFile: "edm4hep/extra_code/AssociationGetters.ipp"
MutableExtraCode:
includes: "
#include <edm4hep/Cluster.h>\n
#include <edm4hep/MCParticle.h>\n"
declaration: "
[[deprecated(\"use setFrom instead\")]]\n
void setRec(edm4hep::Track rec) {setFrom(rec);}\n
[[deprecated(\"use setSim instead\")]]\n
void setSim(edm4hep::MCParticle sim) {setTo(sim);}\n
"

edm4hep::RecoParticleVertexAssociation:
Description: "Association between a ReconstructedParticle and a Vertex"
Author: "EDM4hep authors"
Members:
- float weight // weight of this association
OneToOneRelations:
- edm4hep::ReconstructedParticle rec // reference to the reconstructed particle
- edm4hep::Vertex vertex // reference to the vertex
- edm4hep::ReconstructedParticle to // reference to the reconstructed particle
- edm4hep::Vertex from // reference to the vertex
ExtraCode:
includes: "
#include <edm4hep/ReconstructedParticle.h>\n
#include <edm4hep/Vertex.h>\n"
declaration: "
[[deprecated(\"use getTo instead\")]]\n
auto getRec() const { return getTo(); }\n
[[deprecated(\"use getFrom instead\")]]\n
auto getVertex() const { return getFrom(); }\n
"
MutableExtraCode:
includes: "
#include <edm4hep/ReconstructedParticle.h>\n
#include <edm4hep/Vertex.h>\n"
declaration: "
[[deprecated(\"use setFrom instead\")]]\n
void setRec(edm4hep::Vertex rec) {setFrom(rec);}\n
[[deprecated(\"use setSim instead\")]]\n
void setSim(edm4hep::ReconstructedParticle sim) {setTo(sim);}\n
"

#---------- TimeSeries
edm4hep::TimeSeries:
Expand Down

0 comments on commit 213cdd1

Please sign in to comment.