From d409c530466c28ace19af865c56cec8911d8b369 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Sun, 28 Jul 2024 19:18:37 +0200 Subject: [PATCH 01/11] Add a script to create an EDM4hep file making use of the complete datamodel (#272) --- scripts/createEDM4hepFile.py | 373 +++++++++++++++++++++++++++++++++++ test/CMakeLists.txt | 4 + 2 files changed, 377 insertions(+) create mode 100644 scripts/createEDM4hepFile.py diff --git a/scripts/createEDM4hepFile.py b/scripts/createEDM4hepFile.py new file mode 100644 index 000000000..f838adeed --- /dev/null +++ b/scripts/createEDM4hepFile.py @@ -0,0 +1,373 @@ +# Description: Create a file with EDM4hep data using the EDM4hep python bindings +# The purpose of the script is to use all the classes of the EDM4hep library +# to create a file with dummy data. +import podio +import edm4hep +from itertools import count +import argparse +import sys + +frames = 3 # How many frames or events will be written +vectorsize = 5 # For vector members, each vector member will have this size +counter = count() # next(counter) will return 0, 1, 2, ... +# used to generate the dummy data +output_file = "output.root" + +parser = argparse.ArgumentParser(description="Create a file with EDM4hep data") +parser.add_argument( + "--rntuple", action="store_true", help="Use a ROOT ntuple instead of EDM4hep" +) +args = parser.parse_args() + +if args.rntuple: + try: + writer = podio.root_io.RNTupleWriter(output_file) + except AttributeError: + print("The RNTuple writer from podio is not available but was requested") + sys.exit(1) +else: + writer = podio.root_io.Writer(output_file) + +for i in range(frames): + print(f"Writing frame {i}") + frame = podio.Frame() + + # Make covariance matrices needed later + + # With the current version of cppyy (from ROOT 6.30.06) + # it's not possible to initialize an std::array from a list + # In future versions (works with 6.32.02) it will be possible + cov3f = edm4hep.CovMatrix3f() + for i in range(6): + cov3f[i] = next(counter) + cov4f = edm4hep.CovMatrix4f() + for i in range(10): + cov4f[i] = next(counter) + cov6f = edm4hep.CovMatrix6f() + for i in range(21): + cov6f[i] = next(counter) + + header = edm4hep.EventHeaderCollection() + h = header.create() + h.setEventNumber(next(counter)) + h.setRunNumber(next(counter)) + h.setTimeStamp(next(counter)) + h.setWeight(1.0) + for j in range(vectorsize): + h.addToWeights(next(counter)) + frame.put(header, "EventHeader") + + particles = edm4hep.MCParticleCollection() + for i in range(3): + particle = particles.create() + particle.setPDG(next(counter)) + particle.setGeneratorStatus(next(counter)) + particle.setSimulatorStatus(next(counter)) + particle.setCharge(next(counter)) + particle.setTime(next(counter)) + particle.setMass(next(counter)) + particle.setVertex( + edm4hep.Vector3d(next(counter), next(counter), next(counter)) + ) + particle.setEndpoint( + edm4hep.Vector3d(next(counter), next(counter), next(counter)) + ) + particle.setMomentum( + edm4hep.Vector3d(next(counter), next(counter), next(counter)) + ) + particle.setMomentumAtEndpoint( + edm4hep.Vector3d(next(counter), next(counter), next(counter)) + ) + particle.setSpin( + edm4hep.Vector3f(next(counter), next(counter), next(counter)) + ) + particle.setColorFlow(edm4hep.Vector2i(next(counter), next(counter))) + + particles[0].addToDaughters(particles[1]) + particles[0].addToParents(particles[2]) + particle = particles[0] + frame.put(particles, "MCParticleCollection") + + hits = edm4hep.SimTrackerHitCollection() + hit = hits.create() + hit.setCellID(next(counter)) + hit.setEDep(next(counter)) + hit.setTime(next(counter)) + hit.setPathLength(next(counter)) + hit.setQuality(next(counter)) + hit.setPosition(edm4hep.Vector3d(next(counter), next(counter), next(counter))) + hit.setMomentum(edm4hep.Vector3f(next(counter), next(counter), next(counter))) + hit.setParticle(particle) + simtracker_hit = hit + frame.put(hits, "SimTrackerHitCollection") + + hits = edm4hep.CaloHitContributionCollection() + hit = hits.create() + hit.setPDG(next(counter)) + hit.setEnergy(next(counter)) + hit.setTime(next(counter)) + hit.setStepPosition(edm4hep.Vector3f(next(counter), next(counter), next(counter))) + hit.setParticle(particle) + calohit = hit + frame.put(hits, "CaloHitContributionCollection") + + hits = edm4hep.SimCalorimeterHitCollection() + hit = hits.create() + hit.setCellID(next(counter)) + hit.setEnergy(next(counter)) + hit.setPosition(edm4hep.Vector3f(next(counter), next(counter), next(counter))) + hit.addToContributions(calohit) + simcalo_hit = hit + frame.put(hits, "SimCalorimeterHitCollection") + + hits = edm4hep.RawCalorimeterHitCollection() + hit = hits.create() + hit.setCellID(next(counter)) + hit.setAmplitude(next(counter)) + hit.setTimeStamp(next(counter)) + frame.put(hits, "RawCalorimeterHitCollection") + + hits = edm4hep.CalorimeterHitCollection() + hit = hits.create() + hit.setCellID(next(counter)) + hit.setEnergy(next(counter)) + hit.setEnergyError(next(counter)) + hit.setTime(next(counter)) + hit.setPosition(edm4hep.Vector3f(next(counter), next(counter), next(counter))) + hit.setType(next(counter)) + calo_hit = hit + frame.put(hits, "CalorimeterHitCollection") + + pids = edm4hep.ParticleIDCollection() + pid = pids.create() + pid.setType(next(counter)) + pid.setPDG(next(counter)) + pid.setAlgorithmType(next(counter)) + pid.setLikelihood(next(counter)) + for j in range(vectorsize): + pid.addToParameters(next(counter)) + frame.put(pids, "ParticleIDCollection") + + clusters = edm4hep.ClusterCollection() + cluster = clusters.create() + cluster.setType(next(counter)) + cluster.setEnergy(next(counter)) + cluster.setEnergyError(next(counter)) + cluster.setPosition(edm4hep.Vector3f(next(counter), next(counter), next(counter))) + cluster.setPositionError(cov3f) + cluster.setITheta(next(counter)) + cluster.setPhi(next(counter)) + cluster.setDirectionError( + edm4hep.Vector3f(next(counter), next(counter), next(counter)) + ) + for j in range(vectorsize): + cluster.addToShapeParameters(next(counter)) + cluster.addToSubdetectorEnergies(next(counter)) + cluster.addToClusters(cluster) + cluster.addToHits(calo_hit) + frame.put(clusters, "ClusterCollection") + + hits = edm4hep.TrackerHit3DCollection() + hit = hits.create() + hit.setCellID(next(counter)) + hit.setType(next(counter)) + hit.setQuality(next(counter)) + hit.setTime(next(counter)) + hit.setEDep(next(counter)) + hit.setEDepError(next(counter)) + hit.setPosition(edm4hep.Vector3d(next(counter), next(counter), next(counter))) + hit.setCovMatrix(cov3f) + tracker_hit = hit + frame.put(hits, "TrackerHit3DCollection") + + hits = edm4hep.TrackerHitPlaneCollection() + hit = hits.create() + hit.setCellID(next(counter)) + hit.setType(next(counter)) + hit.setQuality(next(counter)) + hit.setTime(next(counter)) + hit.setEDep(next(counter)) + hit.setEDepError(next(counter)) + hit.setU(edm4hep.Vector2f(next(counter), next(counter))) + hit.setV(edm4hep.Vector2f(next(counter), next(counter))) + hit.setDu(next(counter)) + hit.setDv(next(counter)) + hit.setPosition(edm4hep.Vector3d(next(counter), next(counter), next(counter))) + hit.setCovMatrix(cov3f) + frame.put(hits, "TrackerHitPlaneCollection") + + series = edm4hep.RawTimeSeriesCollection() + serie = series.create() + serie.setCellID(next(counter)) + serie.setQuality(next(counter)) + serie.setTime(next(counter)) + serie.setCharge(next(counter)) + serie.setInterval(next(counter)) + for j in range(vectorsize): + serie.addToAdcCounts(next(counter)) + frame.put(series, "RawTimeSeriesCollection") + + tracks = edm4hep.TrackCollection() + track = tracks.create() + track.setType(next(counter)) + track.setChi2(next(counter)) + track.setNdf(next(counter)) + for j in range(vectorsize): + track.addToSubdetectorHitNumbers(next(counter)) + state = edm4hep.TrackState() + state.location = next(counter) + state.d0 = next(counter) + state.phi = next(counter) + state.omega = next(counter) + state.z0 = next(counter) + state.tanLambda = next(counter) + state.time = next(counter) + state.referencePoint = edm4hep.Vector3f( + next(counter), next(counter), next(counter) + ) + state.CovMatrix = cov6f + track.addToTrackStates(state) + track.addToTrackerHits(tracker_hit) + track.addToTracks(track) + frame.put(tracks, "TrackCollection") + + vertex = edm4hep.VertexCollection() + v = vertex.create() + v.setType(next(counter)) + v.setChi2(next(counter)) + v.setNdf(next(counter)) + v.setPosition(edm4hep.Vector3f(next(counter), next(counter), next(counter))) + v.setCovMatrix(cov3f) + v.setAlgorithmType(next(counter)) + for j in range(vectorsize): + v.addToParameters(next(counter)) + frame.put(vertex, "VertexCollection") + + rparticles = edm4hep.ReconstructedParticleCollection() + rparticle = rparticles.create() + rparticle.setPDG(next(counter)) + rparticle.setEnergy(next(counter)) + rparticle.setMomentum(edm4hep.Vector3f(next(counter), next(counter), next(counter))) + rparticle.setReferencePoint( + edm4hep.Vector3f(next(counter), next(counter), next(counter)) + ) + rparticle.setCharge(next(counter)) + rparticle.setMass(next(counter)) + rparticle.setGoodnessOfPID(next(counter)) + rparticle.setCovMatrix(cov4f) + rparticle.setDecayVertex(v) + rparticle.addToClusters(cluster) + rparticle.addToTracks(track) + rparticle.addToParticles(rparticle) + reco_particle = rparticle + frame.put(rparticles, "ReconstructedParticleCollection") + + v.addToParticles(reco_particle) + pid.setParticle(reco_particle) + + # TODO: Add when the PID PR is merged + # 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") + + timeseries = edm4hep.TimeSeriesCollection() + serie = timeseries.create() + serie.setCellID(next(counter)) + serie.setTime(next(counter)) + serie.setInterval(next(counter)) + for j in range(vectorsize): + serie.addToAmplitude(next(counter)) + frame.put(timeseries, "TimeSeriesCollection") + + recdqdx = edm4hep.RecDqdxCollection() + dqdx = recdqdx.create() + q = edm4hep.Quantity() + q.type = next(counter) + q.value = next(counter) + q.error = next(counter) + dqdx.setDQdx(q) + dqdx.setTrack(track) + frame.put(recdqdx, "RecDqdxCollection") + + gep_coll = edm4hep.GeneratorEventParametersCollection() + gep = gep_coll.create() + gep.setEventScale(next(counter)) + gep.setAlphaQED(next(counter)) + gep.setAlphaQCD(next(counter)) + gep.setSignalProcessId(next(counter)) + gep.setSqrts(next(counter)) + + for i in range(vectorsize): + gep.addToCrossSections(next(counter)) + gep.addToCrossSectionErrors(next(counter)) + gep.addToSignalVertex(particle) + + gpi_coll = edm4hep.GeneratorPdfInfoCollection() + gpi = gpi_coll.create() + # Doesn't work with ROOT 6.30.06 + # gpi.setPartonId([next(counter), next(counter)]) + gpi.setPartonId(0, next(counter)) + gpi.setPartonId(1, next(counter)) + # Doesn't work with ROOT 6.30.06 + # gpi.setLhapdfId([next(counter), next(counter)]) + gpi.setLhapdfId(0, next(counter)) + gpi.setLhapdfId(1, next(counter)) + # Doesn't work with ROOT 6.30.06 + # gpi.setX([next(counter), next(counter)]) + gpi.setX(0, next(counter)) + gpi.setX(1, next(counter)) + # Doesn't work with ROOT 6.30.06 + # gpi.setXf([next(counter), next(counter)]) + gpi.setXf(0, next(counter)) + gpi.setXf(1, next(counter)) + gpi.setScale(next(counter)) + + writer.write_frame(frame, "events") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3e238e52e..ee6306bdb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,12 +6,16 @@ function(set_test_env _testname) set_property(TEST ${_testname} APPEND PROPERTY ENVIRONMENT LD_LIBRARY_PATH=$:$:$<$:$:>$:$ENV{LD_LIBRARY_PATH} ROOT_INCLUDE_PATH=${PROJECT_SOURCE_DIR}/edm4hep:${PROJECT_SOURCE_DIR}/utils/include:$ENV{ROOT_INCLUDE_PATH} + PYTHONPATH=${PROJECT_SOURCE_DIR}/python:$ENV{PYTHONPATH} ) set_tests_properties(${_testname} PROPERTIES FAIL_REGULAR_EXPRESSION "[^a-z]Error;ERROR;error;Failed" ) endfunction() +add_test(NAME "Create an EDM4hep data file" COMMAND python ${PROJECT_SOURCE_DIR}/scripts/createEDM4hepFile.py) +set_test_env("Create an EDM4hep data file") + add_executable(write_events write_events.cc) target_include_directories(write_events PUBLIC ${PROJECT_SOURCE_DIR}/edm4hep ) target_link_libraries(write_events edm4hep podio::podioRootIO) From 73d15dffd654d83e6d997e2f79fd06d98384c30d Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:02:32 +0200 Subject: [PATCH 02/11] Update LCG workflow to use LCG_106 instead of LCG_104 (#346) --- .github/workflows/lcg_linux_with_podio.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lcg_linux_with_podio.yml b/.github/workflows/lcg_linux_with_podio.yml index 028865f97..51f65f9e8 100644 --- a/.github/workflows/lcg_linux_with_podio.yml +++ b/.github/workflows/lcg_linux_with_podio.yml @@ -13,7 +13,7 @@ jobs: "dev4/x86_64-el9-gcc13-opt"] CXX_STANDARD: [20] include: - - LCG: "LCG_104/x86_64-centos8-gcc11-opt" + - LCG: "LCG_106/x86_64-el9-gcc13-opt" CXX_STANDARD: 17 - LCG: "dev4/x86_64-ubuntu2004-gcc9-opt" CXX_STANDARD: 17 From 153c99c67a0aea4f14e08b2fcdbbb8abe693c6f0 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 30 Jul 2024 10:29:52 +0200 Subject: [PATCH 03/11] CI: Make sure to use the python bindings of podio that we build (#348) --- .github/workflows/lcg_linux_with_podio.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lcg_linux_with_podio.yml b/.github/workflows/lcg_linux_with_podio.yml index 51f65f9e8..22883f417 100644 --- a/.github/workflows/lcg_linux_with_podio.yml +++ b/.github/workflows/lcg_linux_with_podio.yml @@ -43,6 +43,7 @@ jobs: unset CPATH export CMAKE_PREFIX_PATH=$(pwd)/install:$CMAKE_PREFIX_PATH export LD_LIBRARY_PATH=$(pwd)/install/lib:$(pwd)/install/lib64:$LD_LIBRARY_PATH + export PYTHONPATH=$(pwd)/install/lib/python3$(python -c 'import sys; print(sys.version_info[1])')/site-packages:$PYTHONPATH echo "::endgroup::" echo "::group::Build edm4hep" cd $STARTDIR From ac7ceab53cb59d8e47dc0dc74530bf86a2f8b1ba Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 30 Jul 2024 13:50:35 +0200 Subject: [PATCH 04/11] Make associations links and prepare them for a potential introduction of templated links (#341) * Rename association relations and add extra code for compatibility * Proper names of getters and setters * Split declartaion and implementation to avoid inlining Inlining will omit creating symbols for these functions which leads to issues when dynamically loading a library that uses these methods * Propose the correct replacement * Rename Associations to Links * Rename the links for more clarity * Add compatibility headers with deprecation warnings * Use non-deprecated types * Move ExtraCode into yaml file * Remove inline to force symbol generation * Fix names in python script creating all types * Fix README links and names * Fix formatting for pre-commit --- README.md | 16 +- edm4hep.yaml | 197 ++++++++++++++---- include/edm4hep/MCRecoCaloAssociation.h | 10 + .../edm4hep/MCRecoCaloAssociationCollection.h | 11 + .../edm4hep/MCRecoCaloParticleAssociation.h | 11 + .../MCRecoCaloParticleAssociationCollection.h | 11 + .../MCRecoClusterParticleAssociation.h | 11 + ...RecoClusterParticleAssociationCollection.h | 11 + include/edm4hep/MCRecoParticleAssociation.h | 10 + .../MCRecoParticleAssociationCollection.h | 11 + .../edm4hep/MCRecoTrackParticleAssociation.h | 10 + ...MCRecoTrackParticleAssociationCollection.h | 11 + include/edm4hep/MCRecoTrackerAssociation.h | 11 + .../MCRecoTrackerAssociationCollection.h | 11 + .../edm4hep/MutableMCRecoCaloAssociation.h | 11 + .../MutableMCRecoCaloParticleAssociation.h | 11 + .../MutableMCRecoClusterParticleAssociation.h | 11 + .../MutableMCRecoParticleAssociation.h | 11 + .../MutableMCRecoTrackParticleAssociation.h | 11 + .../edm4hep/MutableMCRecoTrackerAssociation.h | 11 + .../MutableRecoParticleVertexAssociation.h | 11 + .../edm4hep/RecoParticleVertexAssociation.h | 11 + .../RecoParticleVertexAssociationCollection.h | 11 + scripts/createEDM4hepFile.py | 96 ++++----- tools/include/edm4hep2json.hxx | 42 ++-- 25 files changed, 467 insertions(+), 112 deletions(-) create mode 100644 include/edm4hep/MCRecoCaloAssociation.h create mode 100644 include/edm4hep/MCRecoCaloAssociationCollection.h create mode 100644 include/edm4hep/MCRecoCaloParticleAssociation.h create mode 100644 include/edm4hep/MCRecoCaloParticleAssociationCollection.h create mode 100644 include/edm4hep/MCRecoClusterParticleAssociation.h create mode 100644 include/edm4hep/MCRecoClusterParticleAssociationCollection.h create mode 100644 include/edm4hep/MCRecoParticleAssociation.h create mode 100644 include/edm4hep/MCRecoParticleAssociationCollection.h create mode 100644 include/edm4hep/MCRecoTrackParticleAssociation.h create mode 100644 include/edm4hep/MCRecoTrackParticleAssociationCollection.h create mode 100644 include/edm4hep/MCRecoTrackerAssociation.h create mode 100644 include/edm4hep/MCRecoTrackerAssociationCollection.h create mode 100644 include/edm4hep/MutableMCRecoCaloAssociation.h create mode 100644 include/edm4hep/MutableMCRecoCaloParticleAssociation.h create mode 100644 include/edm4hep/MutableMCRecoClusterParticleAssociation.h create mode 100644 include/edm4hep/MutableMCRecoParticleAssociation.h create mode 100644 include/edm4hep/MutableMCRecoTrackParticleAssociation.h create mode 100644 include/edm4hep/MutableMCRecoTrackerAssociation.h create mode 100644 include/edm4hep/MutableRecoParticleVertexAssociation.h create mode 100644 include/edm4hep/RecoParticleVertexAssociation.h create mode 100644 include/edm4hep/RecoParticleVertexAssociationCollection.h 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") { From 7cf1a17df53deab51296fcc1467ee8f0c52a5c3e Mon Sep 17 00:00:00 2001 From: Federico Meloni Date: Tue, 30 Jul 2024 14:09:29 +0200 Subject: [PATCH 05/11] Add track holes to EDM4hep to match LCIO v2.22 (#337) * added track holes to EDM to match LCIO v2.22) * some README links black magic update --------- Co-authored-by: Federico Meloni --- README.md | 16 ++++++++-------- edm4hep.yaml | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 04936c148..b4fe0a6b3 100644 --- a/README.md +++ b/README.md @@ -26,29 +26,29 @@ A generic event data model for future HEP collider experiments. | [CaloHitContribution](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L355) | [SimCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L367) | [RawCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L379) | | [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#L807) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L819) | | +| [Track](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L517) | [Vertex](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L534) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L580) | +| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L809) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L821) | | **Links** | | | | |-|-|-| -| [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) | | | +| [RecoMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L618) | [CaloHitSimCaloHitLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L645) | [TrackerHitSimTrackerHitLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L673) | +| [CaloHitMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L700) | [ClusterMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L727) | [TrackMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L754) | +| [VertexRecoParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L781) | | | **Generator related (meta-)data** | | | | |-|-|-| -| [GeneratorEventParameters](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L831) | | | -| [GeneratorPdfInfo](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L848) | | | +| [GeneratorEventParameters](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L833) | | | +| [GeneratorPdfInfo](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L850) | | | **Interfaces** | | | | |-|-|-| -| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L859) | | | +| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L861) | | | 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 431bf9025..c33f03a32 100644 --- a/edm4hep.yaml +++ b/edm4hep.yaml @@ -521,8 +521,10 @@ datatypes: - int32_t type // flagword that defines the type of track - float chi2 // Chi^2 of the track fit - int32_t ndf // number of degrees of freedom of the track fit + - int32_t Nholes // number of holes on track VectorMembers: - int32_t subdetectorHitNumbers // number of hits in particular subdetectors + - int32_t subdetectorHoleNumbers // number of holes in particular subdetectors - edm4hep::TrackState trackStates // track states OneToManyRelations: - edm4hep::TrackerHit trackerHits // hits that have been used to create this track From 1e1ebce725dedafd9d39363a674718ffe0290431 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Tue, 30 Jul 2024 14:39:37 +0200 Subject: [PATCH 06/11] Check for the size of the input for one of the constructors of the covariance matrices (#347) * Check for the size of the input for one of the constructors And also static_cast to float, because with older GCC and Clang this is fine, newer GCC throws a warning and newer Clang a compilation error if it's a double. * Fix links --------- Co-authored-by: jmcarcell --- README.md | 30 +++++++++++++++--------------- edm4hep.yaml | 16 ++++++++++++---- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index b4fe0a6b3..6c70d33bb 100644 --- a/README.md +++ b/README.md @@ -13,42 +13,42 @@ A generic event data model for future HEP collider experiments. | | | | |-|-|-| | [Vector4f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L9) | [Vector3f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L34) | [Vector3d](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L56) | -| [Vector2i](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L84) | [Vector2f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L104) | [TrackState](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L195) | -| [Quantity](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L224) | [CovMatrix2f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L123) | [CovMatrix3f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L141) | -| [CovMatrix4f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L158) | [CovMatrix6f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L176) | | +| [Vector2i](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L84) | [Vector2f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L104) | [TrackState](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L203) | +| [Quantity](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L232) | [CovMatrix2f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L123) | [CovMatrix3f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L143) | +| [CovMatrix4f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L162) | [CovMatrix6f](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L182) | | **Datatypes** | | | | |-|-|-| -| [EventHeader](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L233) | [MCParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L245) | [SimTrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L313) | -| [CaloHitContribution](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L355) | [SimCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L367) | [RawCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L379) | -| [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#L534) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L580) | -| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L809) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L821) | | +| [EventHeader](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L241) | [MCParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L253) | [SimTrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L321) | +| [CaloHitContribution](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L363) | [SimCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L375) | [RawCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L387) | +| [CalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L396) | [ParticleID](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L408) | [Cluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L423) | +| [TrackerHit3D](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L455) | [TrackerHitPlane](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L481) | [RawTimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L511) | +| [Track](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L525) | [Vertex](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L542) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L588) | +| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L817) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L829) | | **Links** | | | | |-|-|-| -| [RecoMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L618) | [CaloHitSimCaloHitLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L645) | [TrackerHitSimTrackerHitLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L673) | -| [CaloHitMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L700) | [ClusterMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L727) | [TrackMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L754) | -| [VertexRecoParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L781) | | | +| [RecoMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L626) | [CaloHitSimCaloHitLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L653) | [TrackerHitSimTrackerHitLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L681) | +| [CaloHitMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L708) | [ClusterMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L735) | [TrackMCParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L762) | +| [VertexRecoParticleLink](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L789) | | | **Generator related (meta-)data** | | | | |-|-|-| -| [GeneratorEventParameters](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L833) | | | -| [GeneratorPdfInfo](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L850) | | | +| [GeneratorEventParameters](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L841) | | | +| [GeneratorPdfInfo](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L858) | | | **Interfaces** | | | | |-|-|-| -| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L861) | | | +| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L869) | | | 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 c33f03a32..361d8c1ad 100644 --- a/edm4hep.yaml +++ b/edm4hep.yaml @@ -129,7 +129,9 @@ components: declaration: " constexpr CovMatrix2f() = default;\n template\n - constexpr CovMatrix2f(Vs... v) : values{v...} {}\n + constexpr CovMatrix2f(Vs... v) : values{static_cast(v)...} { + static_assert(sizeof...(v) == 3, \"CovMatrix2f requires 3 values\"); + }\n constexpr CovMatrix2f(const std::array& v) : values(v) {}\n constexpr CovMatrix2f& operator=(std::array& v) { values = v; return *this; }\n bool operator==(const CovMatrix2f& v) const { return v.values == values; }\n @@ -148,7 +150,9 @@ components: constexpr CovMatrix3f() = default;\n constexpr CovMatrix3f(const std::array& v) : values(v) {}\n template\n - constexpr CovMatrix3f(Vs... v) : values{v...} {}\n + constexpr CovMatrix3f(Vs... v) : values{static_cast(v)...} { + static_assert(sizeof...(v) == 6, \"CovMatrix3f requires 6 values\"); + }\n constexpr CovMatrix3f& operator=(std::array& v) { values = v; return *this; }\n bool operator==(const CovMatrix3f& v) const { return v.values == values; }\n bool operator!=(const CovMatrix3f& v) const { return v.values != values; }\n @@ -164,7 +168,9 @@ components: declaration: " constexpr CovMatrix4f() = default;\n template\n - constexpr CovMatrix4f(Vs... v) : values{v...} {}\n + constexpr CovMatrix4f(Vs... v) : values{static_cast(v)...} { + static_assert(sizeof...(v) == 10, \"CovMatrix4f requires 10 values\"); + }\n constexpr CovMatrix4f(const std::array& v) : values(v) {}\n constexpr CovMatrix4f& operator=(std::array& v) { values = v; return *this; }\n bool operator==(const CovMatrix4f& v) const { return v.values == values; }\n @@ -182,7 +188,9 @@ components: declaration: " constexpr CovMatrix6f() = default;\n template\n - constexpr CovMatrix6f(Vs... v) : values{v...} {}\n + constexpr CovMatrix6f(Vs... v) : values{static_cast(v)...} { + static_assert(sizeof...(v) == 21, \"CovMatrix6f requires 21 values\"); + }\n constexpr CovMatrix6f(const std::array& v) : values(v) {}\n constexpr CovMatrix6f& operator=(std::array& v) { values = v; return *this; }\n bool operator==(const CovMatrix6f& v) const { return v.values == values; }\n From bae237d770dcbdcf28dc511f8a65105b2c83632e Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 30 Jul 2024 14:42:08 +0200 Subject: [PATCH 07/11] Bump the schema version to 2 (#345) --- edm4hep.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edm4hep.yaml b/edm4hep.yaml index 361d8c1ad..7a268a6bf 100644 --- a/edm4hep.yaml +++ b/edm4hep.yaml @@ -1,5 +1,5 @@ --- -schema_version: 1 +schema_version: 2 options: getSyntax: True exposePODMembers: False From 1090c2b5a82e67ff6e42f0cf83ed48a084e729e5 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 30 Jul 2024 16:16:34 +0200 Subject: [PATCH 08/11] Make sure legacy headers are truly transparent (#350) --- include/edm4hep/MCRecoCaloAssociationCollection.h | 2 ++ include/edm4hep/MCRecoCaloParticleAssociationCollection.h | 2 ++ include/edm4hep/MCRecoClusterParticleAssociationCollection.h | 2 ++ include/edm4hep/MCRecoParticleAssociationCollection.h | 2 ++ include/edm4hep/MCRecoTrackParticleAssociationCollection.h | 2 ++ include/edm4hep/MCRecoTrackerAssociationCollection.h | 2 ++ include/edm4hep/RecoParticleVertexAssociation.h | 2 ++ 7 files changed, 14 insertions(+) diff --git a/include/edm4hep/MCRecoCaloAssociationCollection.h b/include/edm4hep/MCRecoCaloAssociationCollection.h index e315858e5..fae6c27f7 100644 --- a/include/edm4hep/MCRecoCaloAssociationCollection.h +++ b/include/edm4hep/MCRecoCaloAssociationCollection.h @@ -2,6 +2,8 @@ #define EDM4HEP_MCRecoCaloAssociationCollection_H #include "edm4hep/CaloHitSimCaloHitLinkCollection.h" +#include "edm4hep/MCRecoCaloAssociation.h" +#include "edm4hep/MutableMCRecoCaloAssociation.h" namespace edm4hep { using MCRecoCaloAssociationCollection [[deprecated("use CaloHitSimCaloHitLinkCollection instead")]] = diff --git a/include/edm4hep/MCRecoCaloParticleAssociationCollection.h b/include/edm4hep/MCRecoCaloParticleAssociationCollection.h index 0975c80e0..3e5d95ef5 100644 --- a/include/edm4hep/MCRecoCaloParticleAssociationCollection.h +++ b/include/edm4hep/MCRecoCaloParticleAssociationCollection.h @@ -2,6 +2,8 @@ #define EDM4HEP_MCRecoCaloParticleAssociationCollection_H #include "edm4hep/CaloHitMCParticleLinkCollection.h" +#include "edm4hep/MCRecoCaloParticleAssociation.h" +#include "edm4hep/MutableMCRecoCaloParticleAssociation.h" namespace edm4hep { using MCRecoCaloParticleAssociationCollection [[deprecated("use CaloHitMCParticleLinkCollection instead")]] = diff --git a/include/edm4hep/MCRecoClusterParticleAssociationCollection.h b/include/edm4hep/MCRecoClusterParticleAssociationCollection.h index b36c57501..280641987 100644 --- a/include/edm4hep/MCRecoClusterParticleAssociationCollection.h +++ b/include/edm4hep/MCRecoClusterParticleAssociationCollection.h @@ -2,6 +2,8 @@ #define EDM4HEP_MCRecoClusterParticleAssociationCollection_H #include "edm4hep/ClusterMCParticleLinkCollection.h" +#include "edm4hep/MCRecoClusterParticleAssociation.h" +#include "edm4hep/MutableMCRecoClusterParticleAssociation.h" namespace edm4hep { using MCRecoClusterParticleAssociationCollection [[deprecated("use ClusterMCParticleLinkCollection instead")]] = diff --git a/include/edm4hep/MCRecoParticleAssociationCollection.h b/include/edm4hep/MCRecoParticleAssociationCollection.h index 6c214380d..8dd9e600c 100644 --- a/include/edm4hep/MCRecoParticleAssociationCollection.h +++ b/include/edm4hep/MCRecoParticleAssociationCollection.h @@ -1,6 +1,8 @@ #ifndef EDM4HEP_MCRecoParticleAssociationCollection_H #define EDM4HEP_MCRecoParticleAssociationCollection_H +#include "edm4hep/MCRecoParticleAssociation.h" +#include "edm4hep/MutableMCRecoParticleAssociation.h" #include "edm4hep/RecoMCParticleLinkCollection.h" namespace edm4hep { diff --git a/include/edm4hep/MCRecoTrackParticleAssociationCollection.h b/include/edm4hep/MCRecoTrackParticleAssociationCollection.h index 7a321fa95..393bd60a4 100644 --- a/include/edm4hep/MCRecoTrackParticleAssociationCollection.h +++ b/include/edm4hep/MCRecoTrackParticleAssociationCollection.h @@ -1,6 +1,8 @@ #ifndef EDM4HEP_MCRecoTrackParticleAssociationCollection_H #define EDM4HEP_MCRecoTrackParticleAssociationCollection_H +#include "edm4hep/MCRecoTrackParticleAssociation.h" +#include "edm4hep/MutableMCRecoTrackParticleAssociation.h" #include "edm4hep/TrackMCParticleLinkCollection.h" namespace edm4hep { diff --git a/include/edm4hep/MCRecoTrackerAssociationCollection.h b/include/edm4hep/MCRecoTrackerAssociationCollection.h index 669ff2359..c7326abb2 100644 --- a/include/edm4hep/MCRecoTrackerAssociationCollection.h +++ b/include/edm4hep/MCRecoTrackerAssociationCollection.h @@ -1,6 +1,8 @@ #ifndef EDM4HEP_MCRecoTrackerAssociationCollection_H #define EDM4HEP_MCRecoTrackerAssociationCollection_H +#include "edm4hep/MCRecoTrackerAssociation.h" +#include "edm4hep/MutableMCRecoTrackerAssociation.h" #include "edm4hep/TrackerHitSimTrackerHitLinkCollection.h" namespace edm4hep { diff --git a/include/edm4hep/RecoParticleVertexAssociation.h b/include/edm4hep/RecoParticleVertexAssociation.h index 47129e6fc..9e9c2ab91 100644 --- a/include/edm4hep/RecoParticleVertexAssociation.h +++ b/include/edm4hep/RecoParticleVertexAssociation.h @@ -1,6 +1,8 @@ #ifndef EDM4HEP_RecoParticleVertexAssociation_H #define EDM4HEP_RecoParticleVertexAssociation_H +#include "edm4hep/MutableRecoParticleVertexAssociation.h" +#include "edm4hep/RecoParticleVertexAssociation.h" #include "edm4hep/VertexRecoParticleLink.h" namespace edm4hep { From edc94ec93c1f3586287279e7c26e9645ac236ec8 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 31 Jul 2024 09:59:59 +0200 Subject: [PATCH 09/11] Update the names of the links in the diagram (#349) --- doc/edm4hep_diagram.svg | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/edm4hep_diagram.svg b/doc/edm4hep_diagram.svg index 354145f97..31215bf05 100644 --- a/doc/edm4hep_diagram.svg +++ b/doc/edm4hep_diagram.svg @@ -24,14 +24,14 @@ inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1920" - inkscape:window-height="1043" + inkscape:window-height="1136" id="namedview332" showgrid="true" inkscape:zoom="0.86342179" - inkscape:cx="565.77215" - inkscape:cy="265.22379" - inkscape:window-x="0" - inkscape:window-y="0" + inkscape:cx="526.39394" + inkscape:cy="270.43561" + inkscape:window-x="1920" + inkscape:window-y="27" inkscape:window-maximized="1" inkscape:current-layer="svg8" inkscape:pagecheckerboard="0" @@ -2202,17 +2202,17 @@ MCRecoParticleAssociation + id="tspan2554">RecoMCParticleLink MCRecoTrackerAssociation + id="tspan2554-1">TrackerHitSimTrackerHitLink MCRecoCaloAssociation + id="tspan2554-1-9">CaloHitSimCaloHitLink MCRecoCaloParticleAssociation + style="font-size:3.88056px;stroke-width:0.161093">CaloHitMCParticleLink Date: Wed, 31 Jul 2024 10:02:25 +0200 Subject: [PATCH 10/11] Release Notes for v00-99 --- doc/ReleaseNotes.md | 236 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) diff --git a/doc/ReleaseNotes.md b/doc/ReleaseNotes.md index 471252452..c9fd9a9bd 100644 --- a/doc/ReleaseNotes.md +++ b/doc/ReleaseNotes.md @@ -1,3 +1,239 @@ +# v00-99 + +* 2024-07-31 tmadlener ([PR#349](https://github.com/key4hep/EDM4hep/pull/349)) + - Update the `Link` names in the diagram after #341 + +* 2024-07-30 tmadlener ([PR#350](https://github.com/key4hep/EDM4hep/pull/350)) + - Include the user handle types in the `Collection.h` legacy header files such that they can truly be used transparently. + +* 2024-07-30 tmadlener ([PR#348](https://github.com/key4hep/EDM4hep/pull/348)) + - CI: Make sure to use the python bindings of podio that we build in CI + +* 2024-07-30 jmcarcell ([PR#347](https://github.com/key4hep/EDM4hep/pull/347)) + - Covariance matrices: Check for the size of the input for one of the constructors + - `static_cast` the inputs to `float` + +* 2024-07-30 tmadlener ([PR#345](https://github.com/key4hep/EDM4hep/pull/345)) + - Bump the schema version of EDM4hep to 2 to have a way to differentiate between *before pre-release* and afterwards + +* 2024-07-30 tmadlener ([PR#341](https://github.com/key4hep/EDM4hep/pull/341)) + - Rename the members of the associations to `from` and `to` in preparation for a transparent introduction of templated associations in podio (https://github.com/AIDASoft/podio/pull/257) + - Add (immediately deprecated) compatibility getters and setters that keep the current behavior on the API side. + - **Rename `Association` to `Link` and make naming more consistent** + - Add (immediately deprecated) compatiblity typedefs and headers to keep the current behavior. + +* 2024-07-30 Federico Meloni ([PR#337](https://github.com/key4hep/EDM4hep/pull/337)) + - edm4hep::Track: Added Nholes and subdetectorHoleNumbers + +* 2024-07-29 jmcarcell ([PR#346](https://github.com/key4hep/EDM4hep/pull/346)) + - Update LCG workflow to use LCG_106 instead of LCG_104 + +* 2024-07-28 jmcarcell ([PR#272](https://github.com/key4hep/EDM4hep/pull/272)) + - Add a script to create an EDM4hep file. The script is in python and can be called like `python createEDM4hepFile.py`. I have tried to make use of every member and relation in the data model. The purpose is to have something that can create quickly an EDM4hep file and because the script is in python no compilation is needed, hopefully lowering the barrier to get to an EDM4hep file. People can adapt it to their needs or use it as an example for testing, debugging, etc. + +* 2024-07-19 tmadlener ([PR#332](https://github.com/key4hep/EDM4hep/pull/332)) + - Make the `Vertex` have relations to the (decay) particles that were used to build it + - Rename the `ReconstructedParticle` relation to a `Vertex` to `decayVertex` (as dicsussed in [#320](https://github.com/key4hep/EDM4hep/issues/320)) + +* 2024-07-16 tmadlener ([PR#340](https://github.com/key4hep/EDM4hep/pull/340)) + - Improve the error message of the README links CI check to suggest how to fix it + +* 2024-07-16 tmadlener ([PR#311](https://github.com/key4hep/EDM4hep/pull/311)) + - Remove the `dQ/dx` information from the Track + - Add `TrackPIDHandler` to allow for the reverse lookup + +* 2024-07-10 jmcarcell ([PR#339](https://github.com/key4hep/EDM4hep/pull/339)) + - Load libraries without the .so suffix to make it work in other OSes + +* 2024-07-08 tmadlener ([PR#336](https://github.com/key4hep/EDM4hep/pull/336)) + - Switch to EL9 as OS for the `dev4` stack based CI workflow + +* 2024-07-08 tmadlener ([PR#329](https://github.com/key4hep/EDM4hep/pull/329)) + - Rename the `Vertex` `primary` field to `type` and make it a 32 bit unsigned integer + - Introduce 3 reserved bits and accompanying utility / ExtraCode functionality for checking primary, secondary or tertiary vertex + - Introduce `setBit` and `checkBit` utility functionality and also use that for the `MCParticle` extra code + +* 2024-07-08 jmcarcell ([PR#326](https://github.com/key4hep/EDM4hep/pull/326)) + - Remove `radiusOfInnermostHit` from tracks + +* 2024-07-04 tmadlener ([PR#334](https://github.com/key4hep/EDM4hep/pull/334)) + - Remove compatibility with podio versions before 1.0 + +* 2024-06-28 tmadlener ([PR#335](https://github.com/key4hep/EDM4hep/pull/335)) + - Remove the association between `TrackerHitPlane` and `SimTrackerHit` from the diagram + +* 2024-06-28 tmadlener ([PR#333](https://github.com/key4hep/EDM4hep/pull/333)) + - Remove some of the drift chamber study types that were introduced in [#179](https://github.com/key4hep/EDM4hep/pull/179) again since they need a bit more consideration + - The removed types and components are: `Hypothesis`, `HitLevelData`, `RecIonizationCluster`, `SimPrimaryIonizationCluster`, `TrackerPulse` + - Keep the types and components that are already in use, mainly `TimeSeries` + - Remove the usage of the removed components from `RecDqdx` to make it a purely reconstruction level type + - Fix script that checks that all types are part of the json dumper + +* 2024-06-28 tmadlener ([PR#331](https://github.com/key4hep/EDM4hep/pull/331)) + - Remove the `MCRecoTrackerHitPlaneAssociation` as it is no longer necessary + +* 2024-06-28 jmcarcell ([PR#324](https://github.com/key4hep/EDM4hep/pull/324)) + - Change probability to ndf in Vertex + +* 2024-06-27 tmadlener ([PR#330](https://github.com/key4hep/EDM4hep/pull/330)) + - Remove docstring of `Track::type` that is no longer relevant for EDM4hep and was a leftover from LCIO. + - EDM4hep does not (yet) reserve any bits in the Track + +* 2024-06-25 Wouter Deconinck ([PR#327](https://github.com/key4hep/EDM4hep/pull/327)) + - Require podio 1.0 + +* 2024-06-24 Thomas Madlener ([PR#325](https://github.com/key4hep/EDM4hep/pull/325)) + - Introduce a `edm4hep::labels::MCParticles` label to formalize the name of the canonical MCParticle collection + +* 2024-06-18 Benedikt Hegner ([PR#310](https://github.com/key4hep/EDM4hep/pull/310)) + - Add `GeneratorEventParameters` and `GeneratorPdfInfo` datatypes to store generator related data in a structured and well defined way. + - Add a `GeneratorToolInfo` struct and related utility functionality to store some high level metadata on the generator into Frame parameters. + +* 2024-06-17 tmadlener ([PR#315](https://github.com/key4hep/EDM4hep/pull/315)) + - Introduce the `edm4hep::labels` namespace to hold the string constants that are used for consistent labeling / naming of collections or parameters. + - Use this opportunity to homogenize the naming and capitalization of the variables but leave string constants unchanged + - Deprecate existing string constants + +* 2024-06-12 tmadlener ([PR#314](https://github.com/key4hep/EDM4hep/pull/314)) + - Make the python bindings install prefix conform to python conventions by default and allow overriding with the `EDM4HEP_PYTHON_INSTALLDIR` cmake variable + - Default prefix is now `/lib[64]/pythonX.Y/site-packages` (where `lib` or `lib64` is defined from the platform defaults and `X.Y` is the python major and minor version). + +* 2024-06-11 tmadlener ([PR#313](https://github.com/key4hep/EDM4hep/pull/313)) + - Switch to `alma9` image to fix documentation deploys + +* 2024-06-11 tmadlener ([PR#307](https://github.com/key4hep/EDM4hep/pull/307)) + - To have a more consistent way of filling the `algoType` in the `edm4hep::utils::ParticleIDMeta` use the 32 bit version of MurmurHash3 to hash the `algoName` to get to `algoType`. Fixes #298 + - Make `algoType` a private member but allow read access to it via the `algoType` member function. `algoType` has to be filled on construction. It is still possible to set it manually, the hashing will only kick in for the constructor taking only a name. + +* 2024-06-11 Juraj Smiesko ([PR#283](https://github.com/key4hep/EDM4hep/pull/283)) + - Adding metadata name for event filter statistics. + +* 2024-06-04 tmadlener ([PR#303](https://github.com/key4hep/EDM4hep/pull/303)) + - Update the schema diagram to reflect the changes from [#268](https://github.com/key4hep/EDM4hep/pull/268) + +* 2024-06-03 Mateusz Jakub Fila ([PR#308](https://github.com/key4hep/EDM4hep/pull/308)) + - Use declarationFile instead of include in CovMatrix to fix generated documentation for covariance matrix components. Fixes [#296](https://github.com/key4hep/EDM4hep/issues/296) + +* 2024-05-21 tmadlener ([PR#302](https://github.com/key4hep/EDM4hep/pull/302)) + - Update the schema diagram to reflect the `TrackerHit` as interface + - Add `TrackerHit3D` as new type + - Fix all arrow heads to be consistently black + +* 2024-05-16 tmadlener ([PR#305](https://github.com/key4hep/EDM4hep/pull/305)) + - Introduce pre-processor checks to transparently switch to the new `std::optional` return values of `podio::Frame::getParameter` (introduced with [AIDASoft/podio#580](https://github.com/AIDASoft/podio/pull/580)) + +* 2024-05-14 jmcarcell ([PR#304](https://github.com/key4hep/EDM4hep/pull/304)) + - Remove ParticleID that was deleted in https://github.com/key4hep/EDM4hep/pull/268 and reintroduced in https://github.com/key4hep/EDM4hep/pull/287 + +* 2024-05-07 Andre Sailer ([PR#300](https://github.com/key4hep/EDM4hep/pull/300)) + - DOC: change association descriptions to allow doxygen to link to respective classes + +* 2024-05-02 Mateusz Jakub Fila ([PR#297](https://github.com/key4hep/EDM4hep/pull/297)) + - Fix datatypes table formatting. Fix typos + +* 2024-05-01 tmadlener ([PR#287](https://github.com/key4hep/EDM4hep/pull/287)) + - Introduce `edm4hep::CovMatrix[2,3,4,6}f` components to represent covariance matrices + - using `std::array` under the hood + - Access functionality that works on enums for defining dimensions and some utilities to do the indexing into the underlying storage + - Introduce some `enum class`es for defining dimensions, e.g. `TrackParams` or `Cartesian` + - Use these components instead of the raw `std::array`s in datatypes and other components and tie the interpretation of the values to the approriate dimension `enum class` + + Usage example: + ```cpp + #include "edm4hep/TrackerHit3D.h" + + void foo(const edm4hep::TrackerHit3D& hit) { + const auto covXY = hit.getCovMatrix(edm4hep::Cartesian::x, edm4hep::Cartesian:y); + } + ``` + +* 2024-05-01 tmadlener ([PR#268](https://github.com/key4hep/EDM4hep/pull/268)) + - Remove the relations from `Cluster` to `ParticleID` + - Remove the relations from `ReconstructedParticle` to `ParticleID` + - Add a `OneToOneRelation` from `ParticleID` to a `ReconstructedParticle` + - **This is a breaking change for both existing files and interfaces. There will be no schema evolution for this change** + - Add a new `edm4hep::utils::PIDHandler` and some related utility functionality to help with handling the necessary meta data. + +* 2024-04-19 tmadlener ([PR#295](https://github.com/key4hep/EDM4hep/pull/295)) + - Make sure that the `utils` (currently INTERFACE only) target appears as `edm4hepUtils` "on disk" in order to avoid having on overly generic `libutils.so` once it actually becomes a shared library. + +* 2024-04-19 tmadlener ([PR#289](https://github.com/key4hep/EDM4hep/pull/289)) + - Only pass what is strictly necessary as input to doxygen + - Exclude dependencies to avoid generating empty namespaces in the EDM4hep API reference + +* 2024-04-08 jmcarcell ([PR#294](https://github.com/key4hep/EDM4hep/pull/294)) + - Load Constants.h in python, making some names available like `edm4hep::EventHeaderName` + +* 2024-04-04 tmadlener ([PR#293](https://github.com/key4hep/EDM4hep/pull/293)) + - Use non deprecated versions of the `SIOWriter` and `SIOReader` + +* 2024-04-02 jmcarcell ([PR#292](https://github.com/key4hep/EDM4hep/pull/292)) + - Do not try to set the read-only property ALIAS_GLOBAL + +* 2024-03-12 tmadlener ([PR#286](https://github.com/key4hep/EDM4hep/pull/286)) + - Make sure that `operator[]` of the `VectorNx` types return the correct type. + +* 2024-03-12 Mateusz Jakub Fila ([PR#285](https://github.com/key4hep/EDM4hep/pull/285)) + - added static asserting vector components' member ordering and padding + +* 2024-02-26 tmadlener ([PR#282](https://github.com/key4hep/EDM4hep/pull/282)) + - Bump the patch version to 99 in order to keep preprocessor version checks working for current tagged version. + +* 2024-02-26 tmadlener ([PR#281](https://github.com/key4hep/EDM4hep/pull/281)) + - Add `operator!=` to `VectorXY` classes to keep symmetry with updated podio generated code. + +* 2024-02-25 Mateusz Jakub Fila ([PR#280](https://github.com/key4hep/EDM4hep/pull/280)) + - Fix readme formatting and links to trackerhit + +* 2024-02-23 jmcarcell ([PR#279](https://github.com/key4hep/EDM4hep/pull/279)) + - Fix a few compiler warnings, some of them introduced in 1.0 PRs + +* 2024-02-23 tmadlener ([PR#252](https://github.com/key4hep/EDM4hep/pull/252)) + - Make the `edm4hep::TrackerHit` an `interface` type and use that in the `edm4hep::Track`. + - Rename the current `edm4hep::TrackerHit` to `edm4hep::TrackerHit3D` + - **This is a breaking change. However, we currently do not plan to implement schema evolution for this** + +* 2024-02-22 jmcarcell ([PR#278](https://github.com/key4hep/EDM4hep/pull/278)) + - Remove any path containing /fccanalyses/ for one test to prevent ROOT from loading FCCAnalyses dictionaries + +* 2024-02-22 tmadlener ([PR#277](https://github.com/key4hep/EDM4hep/pull/277)) + - Use the units explictly in the yaml file to make them appear nicer in the generated docstrings. + +* 2024-02-22 BrieucF ([PR#276](https://github.com/key4hep/EDM4hep/pull/276)) + - "EDM4hep authors" as `Author` field for all data types. Fixes https://github.com/key4hep/EDM4hep/issues/255 + - Remove the confusing reference to collection parameters. Fixes https://github.com/key4hep/EDM4hep/issues/191 + - Homogenize the comments (dot at the end or not, space after // or not). + +* 2024-02-22 jmcarcell ([PR#275](https://github.com/key4hep/EDM4hep/pull/275)) + - Remove BITEndpoint from MCParticle + +* 2024-02-22 jmcarcell ([PR#274](https://github.com/key4hep/EDM4hep/pull/274)) + - Rename EDep to eDep in SimTrackerHit for consistency with other uses of "eDep" + +* 2024-02-22 jmcarcell ([PR#273](https://github.com/key4hep/EDM4hep/pull/273)) + - Rename type to PDG in ReconstructedParticle + +* 2024-02-22 Thomas Madlener ([PR#267](https://github.com/key4hep/EDM4hep/pull/267)) + - Bring back MCParticle momenta as doubles. See #237 and #266 + +* 2024-02-22 tmadlener ([PR#260](https://github.com/key4hep/EDM4hep/pull/260)) + - Remove the `edm4hep::ObjectID` component. Fixes #259 + - Remove its usage from the `edm4hep::TrackerHit` and `edm4hep::TrackerHitPlane` + - **This is a breaking change both in code and existing files**. Existing usages might switch to use the `podio::ObjectID` to have effectively the same functionality. + +* 2024-02-22 tmadlener ([PR#256](https://github.com/key4hep/EDM4hep/pull/256)) + - Rename `MCParticle` relations to `particle` in `SimTrackerHit` and `SimPrimaryIonizationCluster` to avoid clashes with the `MCParticle` typename. + - Add `getMCParticle` and `setMCParticle` via `ExtraCode` to keep everything working. + - **This will break the reading of existing files via podio utilities** + +* 2024-02-22 jmcarcell ([PR#254](https://github.com/key4hep/EDM4hep/pull/254)) + - Add a `double weight` `VectorMember` to the `EventHeader` to allow storing multiple weights. + - **This should not break any existing code as we simply add a new member. However, this will break the possibility of reading existing files through podio**. + - Introduce the `edm4hep::EventWeights` constant to have a consistent name for storing / accessing them in file level metadata. + +* 2024-02-12 tmadlener ([PR#269](https://github.com/key4hep/EDM4hep/pull/269)) + - Put the `schema_version` to the correct level for the downstream usage tests to keep it working after [podio#556)(https://github.com/AIDASoft/podio/pull/556) + # v00-10-05 * 2024-02-07 Thomas Madlener ([PR#266](https://github.com/key4hep/EDM4hep/pull/266)) From a173bdec749abf5447810b25286a64456914faa6 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 31 Jul 2024 10:02:26 +0200 Subject: [PATCH 11/11] Updating version to v00-99 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62f9ffe4b..1a1f8f8b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,8 +4,8 @@ project(EDM4HEP LANGUAGES CXX) # project version SET( ${PROJECT_NAME}_VERSION_MAJOR 0 ) -SET( ${PROJECT_NAME}_VERSION_MINOR 10 ) -SET( ${PROJECT_NAME}_VERSION_PATCH 99 ) +SET( ${PROJECT_NAME}_VERSION_MINOR 99 ) +SET( ${PROJECT_NAME}_VERSION_PATCH 0 ) SET( ${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" )