diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b17974d6..4f1c1a452 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project(EDM4HEP LANGUAGES CXX) # project version SET( ${PROJECT_NAME}_VERSION_MAJOR 0 ) SET( ${PROJECT_NAME}_VERSION_MINOR 99 ) -SET( ${PROJECT_NAME}_VERSION_PATCH 1 ) +SET( ${PROJECT_NAME}_VERSION_PATCH 99 ) SET( ${PROJECT_NAME}_VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" ) diff --git a/edm4hep.yaml b/edm4hep.yaml index 8c18127ca..0fbcf9e13 100644 --- a/edm4hep.yaml +++ b/edm4hep.yaml @@ -266,7 +266,6 @@ datatypes: - edm4hep::Vector3d momentum [GeV] // particle 3-momentum at the production vertex - edm4hep::Vector3d momentumAtEndpoint [GeV] // particle 3-momentum at the endpoint - edm4hep::Vector3f spin // spin (helicity) vector of the particle - - edm4hep::Vector2i colorFlow // color flow as defined by the generator OneToManyRelations: - edm4hep::MCParticle parents // The parents of this particle - edm4hep::MCParticle daughters // The daughters this particle diff --git a/scripts/createEDM4hepFile.py b/scripts/createEDM4hepFile.py index e7c2af07c..b564af877 100755 --- a/scripts/createEDM4hepFile.py +++ b/scripts/createEDM4hepFile.py @@ -52,7 +52,6 @@ def create_MCParticleCollection(): 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))) p_list[0].addToDaughters(p_list[1]) p_list[0].addToParents(p_list[2]) diff --git a/test/test_EDM4hepFile.py b/test/test_EDM4hepFile.py index 461d1ee99..1a195a56f 100644 --- a/test/test_EDM4hepFile.py +++ b/test/test_EDM4hepFile.py @@ -95,6 +95,11 @@ def track(event): return event.get("TrackCollection")[0] +@pytest.fixture(scope="module") +def edm4hep_version(reader): + return reader.current_file_version("edm4hep") + + def check_cov_matrix(cov_matrix, n_dim): """Check the contents of the passed covariance matrix""" counter = count(COUNT_START) @@ -125,7 +130,7 @@ def test_EventHeaderCollection(event): assert weight == next(counter) -def test_MCParticleCollection(event): +def test_MCParticleCollection(event, edm4hep_version): """Check the MCParticleCollection""" counter = count(COUNT_START) particles = event.get("MCParticleCollection") @@ -151,7 +156,12 @@ def test_MCParticleCollection(event): next(counter), next(counter), next(counter) ) assert particle.getSpin() == edm4hep.Vector3f(next(counter), next(counter), next(counter)) - assert particle.getColorFlow() == edm4hep.Vector2i(next(counter), next(counter)) + + if edm4hep_version < podio.version.parse("0.99.2"): + # The colorFlow as here so we have increase the counter here to + # maintain the expected values for all elements of the collection + next(counter) + next(counter) assert particles[0].getDaughters()[0] == particles[1] assert particles[0].getParents()[0] == particles[2] diff --git a/test/utils/test_kinematics.py b/test/utils/test_kinematics.py index f460ecde0..91873343e 100644 --- a/test/utils/test_kinematics.py +++ b/test/utils/test_kinematics.py @@ -34,7 +34,6 @@ def test_p4(self): edm4hep.Vector3d(1.0, 2.0, 3.0), # momentum edm4hep.Vector3d(0, 0, 0), # momentumAtEndpoint edm4hep.Vector3f(0, 0, 0), # spin - edm4hep.Vector2i(0, 0), # colorFlow ) self.assertEqual(p4(p), LVM(1.0, 2.0, 3.0, 125.0))