AIDASoft / podio

PODIO
GNU General Public License v3.0
23 stars 57 forks source link

OneToOne relations are not preserved on `clone()` since v01-00 #631

Closed veprbl closed 2 months ago

veprbl commented 2 months ago

!!!IMPORTANT!!!: To facilitate faster and easier response to your issue please provide in addition to the description of the issue also the following information

sorry, no exact steps, but the idea is we start with:

  edm4eic::MCRecoTrackParticleAssociation:
    Description: "Association between a Track and a MCParticle"
    Author : "S. Joosten"
    OneToOneRelations:
      - edm4hep::MCParticle sim             // reference to the Monte-Carlo particle

then we fill that with both rec and sim set.

MCRecoTrackParticleAssociationCollection *partassocs_in;
for (auto assoc_in : *partassocs_in) {
  // assoc_in.getSim().isAvailable() == 1
  auto assoc_out = assoc_in.clone();
  // assoc_out.getSim().isAvailable() == 0 <- BUG
}

Bisect shows that 02a4b9d5d704eb572ce945594b4c85303e89e216 is the first bad commit

jmcarcell commented 2 months ago

Hi @veprbl, feel free to test #632, it should be fixed there.