diff --git a/README.md b/README.md index 9ada0c31e..04936c148 100644 --- a/README.md +++ b/README.md @@ -27,28 +27,28 @@ A generic event data model for future HEP collider experiments. | [CalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L388) | [ParticleID](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L400) | [Cluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L415) | | [TrackerHit3D](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L447) | [TrackerHitPlane](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L473) | [RawTimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L503) | | [Track](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L517) | [Vertex](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L532) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L578) | -| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L680) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L692) | | +| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L807) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L819) | | -**Associations** +**Links** | | | | |-|-|-| -| [MCRecoParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L616) | [MCRecoCaloAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L625) | [MCRecoTrackerAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L634) | -| [MCRecoCaloParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L643) | [MCRecoClusterParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L652) | [MCRecoTrackParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L661) | -| [RecoParticleVertexAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L670) | | | +| [RecoMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L616) | [CaloHitSimCaloHitLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L643) | [TrackerHitSimTrackerHitLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L671) | +| [CaloHitMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L698) | [ClusterMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L725) | [TrackMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L752) | +| [VertexRecoParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L779) | | | **Generator related (meta-)data** | | | | |-|-|-| -| [GeneratorEventParameters](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L704) | | | -| [GeneratorPdfInfo](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L721) | | | +| [GeneratorEventParameters](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L831) | | | +| [GeneratorPdfInfo](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L848) | | | **Interfaces** | | | | |-|-|-| -| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L732) | | | +| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L859) | | | The tests and examples in the `tests` directory show how to read, write, and use these types in your code. diff --git a/edm4hep.yaml b/edm4hep.yaml index 34a358e39..431bf9025 100644 --- a/edm4hep.yaml +++ b/edm4hep.yaml @@ -613,68 +613,195 @@ datatypes: void setCovMatrix(float value, edm4hep::FourMomCoords dimI, edm4hep::FourMomCoords dimJ) { getCovMatrix().setValue(value, dimI, dimJ); }\n " - edm4hep::MCRecoParticleAssociation: - Description: "Association between a ReconstructedParticle and the corresponding MCParticle" + edm4hep::RecoMCParticleLink: + Description: "Link between a ReconstructedParticle and the corresponding MCParticle" Author: "EDM4hep authors" Members: - - float weight // weight of this association + - float weight // weight of this link 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: + declaration: " + [[deprecated(\"use getFrom instead\")]] edm4hep::ReconstructedParticle getRec() const;\n + [[deprecated(\"use getTo instead\")]] edm4hep::MCParticle getSim() const;\n" + implementation: " + edm4hep::ReconstructedParticle {name}::getRec() const { return getFrom(); }\n + edm4hep::MCParticle {name}::getSim() const { return getTo(); }\n" + MutableExtraCode: + declaration: " + [[deprecated(\"use setFrom instead\")]]\n + void setRec(const edm4hep::ReconstructedParticle& rec);\n + [[deprecated(\"use setTo instead\")]]\n + void setSim(const edm4hep::MCParticle& sim);\n + " + implementation: " + void {name}::setSim(const edm4hep::MCParticle& sim) { setTo(sim); }\n + void {name}::setRec(const edm4hep::ReconstructedParticle& rec) { setFrom(rec); }\n + " - edm4hep::MCRecoCaloAssociation: - Description: "Association between a CalorimeterHit and the corresponding SimCalorimeterHit" + edm4hep::CaloHitSimCaloHitLink: + Description: "Link between a CalorimeterHit and the corresponding SimCalorimeterHit" Author: "EDM4hep authors" Members: - - float weight // weight of this association + - float weight // weight of this link 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: + declaration: " + [[deprecated(\"use getFrom instead\")]] edm4hep::CalorimeterHit getRec() const;\n + [[deprecated(\"use getTo instead\")]] edm4hep::SimCalorimeterHit getSim() const;\n" + implementation: " + edm4hep::CalorimeterHit {name}::getRec() const { return getFrom(); }\n + edm4hep::SimCalorimeterHit {name}::getSim() const { return getTo(); }\n" + MutableExtraCode: + declaration: " + [[deprecated(\"use setFrom instead\")]]\n + void setRec(const edm4hep::CalorimeterHit& rec);\n + [[deprecated(\"use setTo instead\")]]\n + void setSim(const edm4hep::SimCalorimeterHit& sim);\n + " + implementation: " + void {name}::setSim(const edm4hep::SimCalorimeterHit& sim) { setTo(sim); }\n + void {name}::setRec(const edm4hep::CalorimeterHit& rec) { setFrom(rec); }\n + " + - edm4hep::MCRecoTrackerAssociation: - Description: "Association between a TrackerHit and the corresponding SimTrackerHit" + edm4hep::TrackerHitSimTrackerHitLink: + Description: "Link between a TrackerHit and the corresponding SimTrackerHit" Author: "EDM4hep authors" Members: - - float weight // weight of this association + - float weight // weight of this link 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: + declaration: " + [[deprecated(\"use getFrom instead\")]] edm4hep::TrackerHit getRec() const;\n + [[deprecated(\"use getTo instead\")]] edm4hep::SimTrackerHit getSim() const;\n" + implementation: " + edm4hep::TrackerHit {name}::getRec() const { return getFrom(); }\n + edm4hep::SimTrackerHit {name}::getSim() const { return getTo(); }\n" + MutableExtraCode: + declaration: " + [[deprecated(\"use setFrom instead\")]]\n + void setRec(const edm4hep::TrackerHit& rec);\n + [[deprecated(\"use setTo instead\")]]\n + void setSim(const edm4hep::SimTrackerHit& sim);\n + " + implementation: " + void {name}::setSim(const edm4hep::SimTrackerHit& sim) { setTo(sim); }\n + void {name}::setRec(const edm4hep::TrackerHit& rec) { setFrom(rec); }\n + " - edm4hep::MCRecoCaloParticleAssociation: - Description: "Association between a CalorimeterHit and the corresponding MCParticle" + edm4hep::CaloHitMCParticleLink: + Description: "Link between a CalorimeterHit and the corresponding MCParticle" Author: "EDM4hep authors" Members: - - float weight // weight of this association + - float weight // weight of this link 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: + declaration: " + [[deprecated(\"use getFrom instead\")]] edm4hep::CalorimeterHit getRec() const;\n + [[deprecated(\"use getTo instead\")]] edm4hep::MCParticle getSim() const;\n" + implementation: " + edm4hep::CalorimeterHit {name}::getRec() const { return getFrom(); }\n + edm4hep::MCParticle {name}::getSim() const { return getTo(); }\n" + MutableExtraCode: + declaration: " + [[deprecated(\"use setFrom instead\")]]\n + void setRec(const edm4hep::CalorimeterHit& rec);\n + [[deprecated(\"use setTo instead\")]]\n + void setSim(const edm4hep::MCParticle& sim);\n + " + implementation: " + void {name}::setSim(const edm4hep::MCParticle& sim) { setTo(sim); }\n + void {name}::setRec(const edm4hep::CalorimeterHit& rec) { setFrom(rec); }\n + " - edm4hep::MCRecoClusterParticleAssociation: - Description: "Association between a Cluster and the corresponding MCParticle" + edm4hep::ClusterMCParticleLink: + Description: "Link between a Cluster and the corresponding MCParticle" Author: "EDM4hep authors" Members: - - float weight // weight of this association + - float weight // weight of this link 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: + declaration: " + [[deprecated(\"use getFrom instead\")]] edm4hep::Cluster getRec() const;\n + [[deprecated(\"use getTo instead\")]] edm4hep::MCParticle getSim() const;\n" + implementation: " + edm4hep::Cluster {name}::getRec() const { return getFrom(); }\n + edm4hep::MCParticle {name}::getSim() const { return getTo(); }\n" + MutableExtraCode: + declaration: " + [[deprecated(\"use setFrom instead\")]]\n + void setRec(const edm4hep::Cluster& rec);\n + [[deprecated(\"use setTo instead\")]]\n + void setSim(const edm4hep::MCParticle& sim);\n + " + implementation: " + void {name}::setSim(const edm4hep::MCParticle& sim) { setTo(sim); }\n + void {name}::setRec(const edm4hep::Cluster& rec) { setFrom(rec); }\n + " - edm4hep::MCRecoTrackParticleAssociation: - Description: "Association between a Track and the corresponding MCParticle" + edm4hep::TrackMCParticleLink: + Description: "Link between a Track and the corresponding MCParticle" Author: "EDM4hep authors" Members: - - float weight // weight of this association + - float weight // weight of this link 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: + declaration: " + [[deprecated(\"use getFrom instead\")]] edm4hep::Track getRec() const;\n + [[deprecated(\"use getTo instead\")]] edm4hep::MCParticle getSim() const;\n" + implementation: " + edm4hep::Track {name}::getRec() const { return getFrom(); }\n + edm4hep::MCParticle {name}::getSim() const { return getTo(); }\n" + MutableExtraCode: + declaration: " + [[deprecated(\"use setFrom instead\")]]\n + void setRec(const edm4hep::Track& rec);\n + [[deprecated(\"use setTo instead\")]]\n + void setSim(const edm4hep::MCParticle& sim);\n + " + implementation: " + void {name}::setSim(const edm4hep::MCParticle& sim) { setTo(sim); }\n + void {name}::setRec(const edm4hep::Track& rec) { setFrom(rec); }\n + " - edm4hep::RecoParticleVertexAssociation: - Description: "Association between a ReconstructedParticle and a Vertex" + edm4hep::VertexRecoParticleLink: + Description: "Link between a Vertex and a ReconstructedParticle" Author: "EDM4hep authors" Members: - - float weight // weight of this association + - float weight // weight of this link 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: + declaration: " + [[deprecated(\"use getTo instead\")]] edm4hep::ReconstructedParticle getRec() const;\n + [[deprecated(\"use getFrom instead\")]] edm4hep::Vertex getVertex() const;\n" + implementation: " + edm4hep::ReconstructedParticle {name}::getRec() const { return getTo(); }\n + edm4hep::Vertex {name}::getVertex() const { return getFrom(); }\n" + MutableExtraCode: + declaration: " + [[deprecated(\"use setFrom instead\")]]\n + void setVertex(const edm4hep::Vertex& rec);\n + [[deprecated(\"use setTo instead\")]]\n + void setRec(const edm4hep::ReconstructedParticle& sim);\n + " + implementation: " + void {name}::setVertex(const edm4hep::Vertex& vertex) { setFrom(vertex); }\n + void {name}::setRec(const edm4hep::ReconstructedParticle& rec) { setTo(rec); }\n + " #---------- TimeSeries edm4hep::TimeSeries: diff --git a/include/edm4hep/MCRecoCaloAssociation.h b/include/edm4hep/MCRecoCaloAssociation.h new file mode 100644 index 000000000..cddcf29a5 --- /dev/null +++ b/include/edm4hep/MCRecoCaloAssociation.h @@ -0,0 +1,10 @@ +#ifndef EDM4HEP_MCRecoCaloAssociation_H +#define EDM4HEP_MCRecoCaloAssociation_H + +#include "edm4hep/CaloHitSimCaloHitLink.h" + +namespace edm4hep { +using MCRecoCaloAssociation [[deprecated("use CaloHitSimCaloHitLink instead")]] = edm4hep::CaloHitSimCaloHitLink; +} + +#endif diff --git a/include/edm4hep/MCRecoCaloAssociationCollection.h b/include/edm4hep/MCRecoCaloAssociationCollection.h new file mode 100644 index 000000000..e315858e5 --- /dev/null +++ b/include/edm4hep/MCRecoCaloAssociationCollection.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MCRecoCaloAssociationCollection_H +#define EDM4HEP_MCRecoCaloAssociationCollection_H + +#include "edm4hep/CaloHitSimCaloHitLinkCollection.h" + +namespace edm4hep { +using MCRecoCaloAssociationCollection [[deprecated("use CaloHitSimCaloHitLinkCollection instead")]] = + edm4hep::CaloHitSimCaloHitLinkCollection; +} + +#endif diff --git a/include/edm4hep/MCRecoCaloParticleAssociation.h b/include/edm4hep/MCRecoCaloParticleAssociation.h new file mode 100644 index 000000000..348c16a9a --- /dev/null +++ b/include/edm4hep/MCRecoCaloParticleAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MCRecoCaloParticleAssociation_H +#define EDM4HEP_MCRecoCaloParticleAssociation_H + +#include "edm4hep/CaloHitMCParticleLink.h" + +namespace edm4hep { +using MCRecoCaloParticleAssociation [[deprecated("use CaloHitMCParticleLink instead")]] = + edm4hep::CaloHitMCParticleLink; +} + +#endif diff --git a/include/edm4hep/MCRecoCaloParticleAssociationCollection.h b/include/edm4hep/MCRecoCaloParticleAssociationCollection.h new file mode 100644 index 000000000..0975c80e0 --- /dev/null +++ b/include/edm4hep/MCRecoCaloParticleAssociationCollection.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MCRecoCaloParticleAssociationCollection_H +#define EDM4HEP_MCRecoCaloParticleAssociationCollection_H + +#include "edm4hep/CaloHitMCParticleLinkCollection.h" + +namespace edm4hep { +using MCRecoCaloParticleAssociationCollection [[deprecated("use CaloHitMCParticleLinkCollection instead")]] = + edm4hep::CaloHitMCParticleLinkCollection; +} + +#endif diff --git a/include/edm4hep/MCRecoClusterParticleAssociation.h b/include/edm4hep/MCRecoClusterParticleAssociation.h new file mode 100644 index 000000000..ffca3d8c1 --- /dev/null +++ b/include/edm4hep/MCRecoClusterParticleAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MCRecoClusterParticleAssociation_H +#define EDM4HEP_MCRecoClusterParticleAssociation_H + +#include "edm4hep/ClusterMCParticleLink.h" + +namespace edm4hep { +using MCRecoClusterParticleAssociation [[deprecated("use ClusterMCParticleLink instead")]] = + edm4hep::ClusterMCParticleLink; +} + +#endif diff --git a/include/edm4hep/MCRecoClusterParticleAssociationCollection.h b/include/edm4hep/MCRecoClusterParticleAssociationCollection.h new file mode 100644 index 000000000..b36c57501 --- /dev/null +++ b/include/edm4hep/MCRecoClusterParticleAssociationCollection.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MCRecoClusterParticleAssociationCollection_H +#define EDM4HEP_MCRecoClusterParticleAssociationCollection_H + +#include "edm4hep/ClusterMCParticleLinkCollection.h" + +namespace edm4hep { +using MCRecoClusterParticleAssociationCollection [[deprecated("use ClusterMCParticleLinkCollection instead")]] = + edm4hep::ClusterMCParticleLinkCollection; +} + +#endif diff --git a/include/edm4hep/MCRecoParticleAssociation.h b/include/edm4hep/MCRecoParticleAssociation.h new file mode 100644 index 000000000..ff3e6a6d8 --- /dev/null +++ b/include/edm4hep/MCRecoParticleAssociation.h @@ -0,0 +1,10 @@ +#ifndef EDM4HEP_MCRecoParticleAssociation_H +#define EDM4HEP_MCRecoParticleAssociation_H + +#include "edm4hep/RecoMCParticleLink.h" + +namespace edm4hep { +using MCRecoParticleAssociation [[deprecated("use RecoMCParticleLink instead")]] = edm4hep::RecoMCParticleLink; +} + +#endif diff --git a/include/edm4hep/MCRecoParticleAssociationCollection.h b/include/edm4hep/MCRecoParticleAssociationCollection.h new file mode 100644 index 000000000..6c214380d --- /dev/null +++ b/include/edm4hep/MCRecoParticleAssociationCollection.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MCRecoParticleAssociationCollection_H +#define EDM4HEP_MCRecoParticleAssociationCollection_H + +#include "edm4hep/RecoMCParticleLinkCollection.h" + +namespace edm4hep { +using MCRecoParticleAssociationCollection [[deprecated("use RecoMCParticleLinkCollection instead")]] = + edm4hep::RecoMCParticleLinkCollection; +} + +#endif diff --git a/include/edm4hep/MCRecoTrackParticleAssociation.h b/include/edm4hep/MCRecoTrackParticleAssociation.h new file mode 100644 index 000000000..abb25b0b2 --- /dev/null +++ b/include/edm4hep/MCRecoTrackParticleAssociation.h @@ -0,0 +1,10 @@ +#ifndef EDM4HEP_MCRecoTrackParticleAssociation_H +#define EDM4HEP_MCRecoTrackParticleAssociation_H + +#include "edm4hep/TrackMCParticleLink.h" + +namespace edm4hep { +using MCRecoTrackParticleAssociation [[deprecated("use TrackMCParticleLink instead")]] = edm4hep::TrackMCParticleLink; +} + +#endif diff --git a/include/edm4hep/MCRecoTrackParticleAssociationCollection.h b/include/edm4hep/MCRecoTrackParticleAssociationCollection.h new file mode 100644 index 000000000..7a321fa95 --- /dev/null +++ b/include/edm4hep/MCRecoTrackParticleAssociationCollection.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MCRecoTrackParticleAssociationCollection_H +#define EDM4HEP_MCRecoTrackParticleAssociationCollection_H + +#include "edm4hep/TrackMCParticleLinkCollection.h" + +namespace edm4hep { +using MCRecoTrackParticleAssociationCollection [[deprecated("use TrackMCParticleLinkCollection instead")]] = + edm4hep::TrackMCParticleLinkCollection; +} + +#endif diff --git a/include/edm4hep/MCRecoTrackerAssociation.h b/include/edm4hep/MCRecoTrackerAssociation.h new file mode 100644 index 000000000..7f0146155 --- /dev/null +++ b/include/edm4hep/MCRecoTrackerAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MCRecoTrackerAssociation_H +#define EDM4HEP_MCRecoTrackerAssociation_H + +#include "edm4hep/TrackerHitSimTrackerHitLink.h" + +namespace edm4hep { +using MCRecoTrackerAssociation [[deprecated("use TrackerHitSimTrackerHitLink instead")]] = + edm4hep::TrackerHitSimTrackerHitLink; +} + +#endif diff --git a/include/edm4hep/MCRecoTrackerAssociationCollection.h b/include/edm4hep/MCRecoTrackerAssociationCollection.h new file mode 100644 index 000000000..669ff2359 --- /dev/null +++ b/include/edm4hep/MCRecoTrackerAssociationCollection.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MCRecoTrackerAssociationCollection_H +#define EDM4HEP_MCRecoTrackerAssociationCollection_H + +#include "edm4hep/TrackerHitSimTrackerHitLinkCollection.h" + +namespace edm4hep { +using MCRecoTrackerAssociationCollection [[deprecated("use TrackerHitSimTrackerHitLinkCollection instead")]] = + edm4hep::TrackerHitSimTrackerHitLinkCollection; +} + +#endif diff --git a/include/edm4hep/MutableMCRecoCaloAssociation.h b/include/edm4hep/MutableMCRecoCaloAssociation.h new file mode 100644 index 000000000..36733bab0 --- /dev/null +++ b/include/edm4hep/MutableMCRecoCaloAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MutableMCRecoCaloAssociation_H +#define EDM4HEP_MutableMCRecoCaloAssociation_H + +#include "edm4hep/CaloHitSimCaloHitLink.h" + +namespace edm4hep { +using MutableMCRecoCaloAssociation [[deprecated("use MutableCaloHitSimCaloHitLink instead")]] = + edm4hep::MutableCaloHitSimCaloHitLink; +} + +#endif diff --git a/include/edm4hep/MutableMCRecoCaloParticleAssociation.h b/include/edm4hep/MutableMCRecoCaloParticleAssociation.h new file mode 100644 index 000000000..9d92223bd --- /dev/null +++ b/include/edm4hep/MutableMCRecoCaloParticleAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MutableMCRecoCaloParticleAssociation_H +#define EDM4HEP_MutableMCRecoCaloParticleAssociation_H + +#include "edm4hep/CaloHitMCParticleLink.h" + +namespace edm4hep { +using MutableMCRecoCaloParticleAssociation [[deprecated("use MutableCaloHitMCParticleLink instead")]] = + edm4hep::MutableCaloHitMCParticleLink; +} + +#endif diff --git a/include/edm4hep/MutableMCRecoClusterParticleAssociation.h b/include/edm4hep/MutableMCRecoClusterParticleAssociation.h new file mode 100644 index 000000000..12c9c9823 --- /dev/null +++ b/include/edm4hep/MutableMCRecoClusterParticleAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MutableMCRecoClusterParticleAssociation_H +#define EDM4HEP_MutableMCRecoClusterParticleAssociation_H + +#include "edm4hep/ClusterMCParticleLink.h" + +namespace edm4hep { +using MutableMCRecoClusterParticleAssociation [[deprecated("use MutableClusterMCParticleLink instead")]] = + edm4hep::MutableClusterMCParticleLink; +} + +#endif diff --git a/include/edm4hep/MutableMCRecoParticleAssociation.h b/include/edm4hep/MutableMCRecoParticleAssociation.h new file mode 100644 index 000000000..0231fdfa3 --- /dev/null +++ b/include/edm4hep/MutableMCRecoParticleAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MutableMCRecoParticleAssociation_H +#define EDM4HEP_MutableMCRecoParticleAssociation_H + +#include "edm4hep/RecoMCParticleLink.h" + +namespace edm4hep { +using MutableMCRecoParticleAssociation [[deprecated("use MutableRecoMCParticleLink instead")]] = + edm4hep::MutableRecoMCParticleLink; +} + +#endif diff --git a/include/edm4hep/MutableMCRecoTrackParticleAssociation.h b/include/edm4hep/MutableMCRecoTrackParticleAssociation.h new file mode 100644 index 000000000..f40377894 --- /dev/null +++ b/include/edm4hep/MutableMCRecoTrackParticleAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MutableMCRecoTrackParticleAssociation_H +#define EDM4HEP_MutableMCRecoTrackParticleAssociation_H + +#include "edm4hep/TrackMCParticleLink.h" + +namespace edm4hep { +using MutableMCRecoTrackParticleAssociation [[deprecated("use MutableTrackMCParticleLink instead")]] = + edm4hep::MutableTrackMCParticleLink; +} + +#endif diff --git a/include/edm4hep/MutableMCRecoTrackerAssociation.h b/include/edm4hep/MutableMCRecoTrackerAssociation.h new file mode 100644 index 000000000..fc4b9e5e8 --- /dev/null +++ b/include/edm4hep/MutableMCRecoTrackerAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MutableMCRecoTrackerAssociation_H +#define EDM4HEP_MutableMCRecoTrackerAssociation_H + +#include "edm4hep/TrackerHitSimTrackerHitLink.h" + +namespace edm4hep { +using MutableMCRecoTrackerAssociation [[deprecated("use MutableTrackerHitSimTrackerHitLink instead")]] = + edm4hep::MutableTrackerHitSimTrackerHitLink; +} + +#endif diff --git a/include/edm4hep/MutableRecoParticleVertexAssociation.h b/include/edm4hep/MutableRecoParticleVertexAssociation.h new file mode 100644 index 000000000..33aefaade --- /dev/null +++ b/include/edm4hep/MutableRecoParticleVertexAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_MutableRecoParticleVertexAssociation_H +#define EDM4HEP_MutableRecoParticleVertexAssociation_H + +#include "edm4hep/VertexRecoParticleLink.h" + +namespace edm4hep { +using MutableRecoParticleVertexAssociation [[deprecated("use MutableVertexRecoParticleLink instead")]] = + edm4hep::MutableVertexRecoParticleLink; +} + +#endif diff --git a/include/edm4hep/RecoParticleVertexAssociation.h b/include/edm4hep/RecoParticleVertexAssociation.h new file mode 100644 index 000000000..47129e6fc --- /dev/null +++ b/include/edm4hep/RecoParticleVertexAssociation.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_RecoParticleVertexAssociation_H +#define EDM4HEP_RecoParticleVertexAssociation_H + +#include "edm4hep/VertexRecoParticleLink.h" + +namespace edm4hep { +using RecoParticleVertexAssociation [[deprecated("use VertexRecoParticleLink instead")]] = + edm4hep::VertexRecoParticleLink; +} + +#endif diff --git a/include/edm4hep/RecoParticleVertexAssociationCollection.h b/include/edm4hep/RecoParticleVertexAssociationCollection.h new file mode 100644 index 000000000..98ef50efc --- /dev/null +++ b/include/edm4hep/RecoParticleVertexAssociationCollection.h @@ -0,0 +1,11 @@ +#ifndef EDM4HEP_RecoParticleVertexAssociationCollection_H +#define EDM4HEP_RecoParticleVertexAssociationCollection_H + +#include "edm4hep/VertexRecoParticleLinkCollection.h" + +namespace edm4hep { +using RecoParticleVertexAssociationCollection [[deprecated("use VertexRecoParticleLinkCollection instead")]] = + edm4hep::VertexRecoParticleLinkCollection; +} + +#endif diff --git a/scripts/createEDM4hepFile.py b/scripts/createEDM4hepFile.py index f838adeed..9ade63cf0 100644 --- a/scripts/createEDM4hepFile.py +++ b/scripts/createEDM4hepFile.py @@ -269,54 +269,54 @@ # if not args.use_pre1: # pid.setParticle(reco_particle) - assocs = edm4hep.MCRecoParticleAssociationCollection() - assoc = assocs.create() - assoc.setWeight(next(counter)) - assoc.setRec(reco_particle) - assoc.setSim(particle) - frame.put(assocs, "MCRecoParticleAssociationCollection") - - assocs = edm4hep.MCRecoCaloAssociationCollection() - assoc = assocs.create() - assoc.setWeight(next(counter)) - assoc.setRec(calo_hit) - assoc.setSim(simcalo_hit) - frame.put(assocs, "MCRecoCaloAssociationCollection") - - assocs = edm4hep.MCRecoTrackerAssociationCollection() - assoc = assocs.create() - assoc.setWeight(next(counter)) - assoc.setRec(tracker_hit) - assoc.setSim(simtracker_hit) - frame.put(assocs, "MCRecoTrackerAssociationCollection") - - assocs = edm4hep.MCRecoCaloParticleAssociationCollection() - assoc = assocs.create() - assoc.setWeight(next(counter)) - assoc.setRec(calo_hit) - assoc.setSim(particle) - frame.put(assocs, "MCRecoCaloParticleAssociationCollection") - - assocs = edm4hep.MCRecoClusterParticleAssociationCollection() - assoc = assocs.create() - assoc.setWeight(next(counter)) - assoc.setRec(cluster) - assoc.setSim(particle) - frame.put(assocs, "MCRecoClusterParticleAssociationCollection") - - assocs = edm4hep.MCRecoTrackParticleAssociationCollection() - assoc = assocs.create() - assoc.setWeight(next(counter)) - assoc.setRec(track) - assoc.setSim(particle) - frame.put(assocs, "MCRecoTrackParticleAssociationCollection") - - assocs = edm4hep.RecoParticleVertexAssociationCollection() - assoc = assocs.create() - assoc.setWeight(next(counter)) - assoc.setRec(reco_particle) - assoc.setVertex(v) - frame.put(assocs, "MCRecoParticleVertexAssociationCollection") + links = edm4hep.RecoMCParticleLinkCollection() + link = links.create() + link.setWeight(next(counter)) + link.setRec(reco_particle) + link.setSim(particle) + frame.put(links, "RecoMCParticleLinkCollection") + + links = edm4hep.CaloHitSimCaloHitLinkCollection() + link = links.create() + link.setWeight(next(counter)) + link.setRec(calo_hit) + link.setSim(simcalo_hit) + frame.put(links, "CaloHitSimCaloHitLinkCollection") + + links = edm4hep.TrackerHitSimTrackerHitLinkCollection() + link = links.create() + link.setWeight(next(counter)) + link.setRec(tracker_hit) + link.setSim(simtracker_hit) + frame.put(links, "TrackerHitSimTrackerHitLinkCollection") + + links = edm4hep.CaloHitMCParticleLinkCollection() + link = links.create() + link.setWeight(next(counter)) + link.setRec(calo_hit) + link.setSim(particle) + frame.put(links, "CaloHitMCParticleLinkCollection") + + links = edm4hep.ClusterMCParticleLinkCollection() + link = links.create() + link.setWeight(next(counter)) + link.setRec(cluster) + link.setSim(particle) + frame.put(links, "ClusterMCParticleLinkCollection") + + links = edm4hep.TrackMCParticleLinkCollection() + link = links.create() + link.setWeight(next(counter)) + link.setRec(track) + link.setSim(particle) + frame.put(links, "TrackMCParticleLinkCollection") + + links = edm4hep.VertexRecoParticleLinkCollection() + link = links.create() + link.setWeight(next(counter)) + link.setRec(reco_particle) + link.setVertex(v) + frame.put(links, "MCVertexRecoParticleLinkCollection") timeseries = edm4hep.TimeSeriesCollection() serie = timeseries.create() diff --git a/tools/include/edm4hep2json.hxx b/tools/include/edm4hep2json.hxx index 615a24ea7..71a296a65 100644 --- a/tools/include/edm4hep2json.hxx +++ b/tools/include/edm4hep2json.hxx @@ -22,13 +22,13 @@ #include "edm4hep/TrackerHitPlaneCollection.h" #include "edm4hep/VertexCollection.h" -#include "edm4hep/MCRecoCaloAssociationCollection.h" -#include "edm4hep/MCRecoCaloParticleAssociationCollection.h" -#include "edm4hep/MCRecoClusterParticleAssociationCollection.h" -#include "edm4hep/MCRecoParticleAssociationCollection.h" -#include "edm4hep/MCRecoTrackParticleAssociationCollection.h" -#include "edm4hep/MCRecoTrackerAssociationCollection.h" -#include "edm4hep/RecoParticleVertexAssociationCollection.h" +#include "edm4hep/CaloHitMCParticleLinkCollection.h" +#include "edm4hep/CaloHitSimCaloHitLinkCollection.h" +#include "edm4hep/ClusterMCParticleLinkCollection.h" +#include "edm4hep/RecoMCParticleLinkCollection.h" +#include "edm4hep/TrackMCParticleLinkCollection.h" +#include "edm4hep/TrackerHitSimTrackerHitLinkCollection.h" +#include "edm4hep/VertexRecoParticleLinkCollection.h" #include "edm4hep/EDM4hepVersion.h" @@ -108,20 +108,20 @@ nlohmann::json processEvent(const podio::Frame& frame, std::vector& insertIntoJson(jsonDict, coll, collList[i]); } // Associations - else if (coll->getTypeName() == "edm4hep::MCRecoParticleAssociationCollection") { - insertIntoJson(jsonDict, coll, collList[i]); - } else if (coll->getTypeName() == "edm4hep::MCRecoCaloAssociationCollection") { - insertIntoJson(jsonDict, coll, collList[i]); - } else if (coll->getTypeName() == "edm4hep::MCRecoTrackerAssociationCollection") { - insertIntoJson(jsonDict, coll, collList[i]); - } else if (coll->getTypeName() == "edm4hep::MCRecoCaloParticleAssociationCollection") { - insertIntoJson(jsonDict, coll, collList[i]); - } else if (coll->getTypeName() == "edm4hep::MCRecoClusterParticleAssociationCollection") { - insertIntoJson(jsonDict, coll, collList[i]); - } else if (coll->getTypeName() == "edm4hep::MCRecoTrackParticleAssociationCollection") { - insertIntoJson(jsonDict, coll, collList[i]); - } else if (coll->getTypeName() == "edm4hep::RecoParticleVertexAssociationCollection") { - insertIntoJson(jsonDict, coll, collList[i]); + else if (coll->getTypeName() == "edm4hep::RecoMCParticleLinkCollection") { + insertIntoJson(jsonDict, coll, collList[i]); + } else if (coll->getTypeName() == "edm4hep::CaloHitSimCaloHitLinkCollection") { + insertIntoJson(jsonDict, coll, collList[i]); + } else if (coll->getTypeName() == "edm4hep::TrackerHitSimTrackerHitLinkCollection") { + insertIntoJson(jsonDict, coll, collList[i]); + } else if (coll->getTypeName() == "edm4hep::CaloHitMCParticleLinkCollection") { + insertIntoJson(jsonDict, coll, collList[i]); + } else if (coll->getTypeName() == "edm4hep::ClusterMCParticleLinkCollection") { + insertIntoJson(jsonDict, coll, collList[i]); + } else if (coll->getTypeName() == "edm4hep::TrackMCParticleLinkCollection") { + insertIntoJson(jsonDict, coll, collList[i]); + } else if (coll->getTypeName() == "edm4hep::VertexRecoParticleLinkCollection") { + insertIntoJson(jsonDict, coll, collList[i]); } // Podio user data else if (coll->getTypeName() == "podio::UserDataCollection") {