{"action":"created","issue":{"url":"https://api.github.com/repos/sPHENIX-Collaboration/coresoftware/issues/75","labels_url":"https://api.github.com/repos/sPHENIX-Collaboration/coresoftware/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/sPHENIX-Collaboration/coresoftware/issues/75/comments","events_url":"https://api.github.com/repos/sPHENIX-Collaboration/coresoftware/issues/75/events","html_url":"https://github.com/sPHENIX-Collaboration/coresoftware/pull/75","id":110831912,"number":75,"title":"New truth matching conditions to handle truth table copies during embedding","user":{"login":"mccumbermike","id":12105552,"avatar_url":"https://avatars.githubusercontent.com/u/12105552?v=3","gravatar_id":"","url":"https://api.github.com/users/mccumbermike","html_url":"https://github.com/mccumbermike","followers_url":"https://api.github.com/users/mccumbermike/followers","following_url":"https://api.github.com/users/mccumbermike/following{/other_user}","gists_url":"https://api.github.com/users/mccumbermike/gists{/gist_id}","starred_url":"https://api.github.com/users/mccumbermike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mccumbermike/subscriptions","organizations_url":"https://api.github.com/users/mccumbermike/orgs","repos_url":"https://api.github.com/users/mccumbermike/repos","events_url":"https://api.github.com/users/mccumbermike/events{/privacy}","received_events_url":"https://api.github.com/users/mccumbermike/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"blackcathj","id":7947083,"avatar_url":"https://avatars.githubusercontent.com/u/7947083?v=3","gravatar_id":"","url":"https://api.github.com/users/blackcathj","html_url":"https://github.com/blackcathj","followers_url":"https://api.github.com/users/blackcathj/followers","following_url":"https://api.github.com/users/blackcathj/following{/other_user}","gists_url":"https://api.github.com/users/blackcathj/gists{/gist_id}","starred_url":"https://api.github.com/users/blackcathj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blackcathj/subscriptions","organizations_url":"https://api.github.com/users/blackcathj/orgs","repos_url":"https://api.github.com/users/blackcathj/repos","events_url":"https://api.github.com/users/blackcathj/events{/privacy}","received_events_url":"https://api.github.com/users/blackcathj/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-10-11T03:53:54Z","updated_at":"2015-10-13T15:17:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sPHENIX-Collaboration/coresoftware/pulls/75","html_url":"https://github.com/sPHENIX-Collaboration/coresoftware/pull/75","diff_url":"https://github.com/sPHENIX-Collaboration/coresoftware/pull/75.diff","patch_url":"https://github.com/sPHENIX-Collaboration/coresoftware/pull/75.patch"},"body":"Okay @blackcathj , I believe I've done it now. I wrote a new class BaseTruthEval to handle common tasks between the SvtxTruthEval and CaloTruthEval. This reduces the duplication of code between the two modules and ensures those portions are always doing the same things. Inside that new class, I have changed the truth id matching criteria to this: \r\n\r\n```\r\n  if ((p1->get_primary_id() == -1) &&\r\n      (p2->get_primary_id() == -1)) {\r\n    // both particles are from the primary truth map, use track ids\r\n    if (p1->get_track_id() == p2->get_track_id()) {\r\n      are_same_particle = true;\r\n    }\r\n  } else if ((p1->get_primary_id() != -1) &&\r\n\t     (p2->get_primary_id() != -1)) {\r\n    // both particles are from the total truth map, use track ids\r\n    if (p1->get_track_id() == p2->get_track_id()) {\r\n      are_same_particle = true;\r\n    }\r\n  } else if (is_primary(p1) && is_primary(p2)) {\r\n    // both particles are primary\r\n    if ((p1->get_primary_id() == -1) &&\r\n\t(p2->get_primary_id() != -1)) {\r\n      // only the first particle is from the primary truth map, use one track id and one primary id\r\n      if (p1->get_track_id() == p2->get_primary_id()) {\r\n\tare_same_particle = true;\r\n      }\r\n    } else if ((p1->get_primary_id() != -1) &&\r\n\t       (p2->get_primary_id() == -1)) {\r\n      // only the second particle is from the primary truth map, use one track id and one primary id\r\n      if (p1->get_primary_id() == p2->get_track_id()) {\r\n\tare_same_particle = true;\r\n      }\r\n    }\r\n  }\r\n```\r\nThis handles the special case where the two primary copies are from separate maps in the 3rd and 4th else-if blocks.\r\n\r\nI see that the SVTX and CEMC evaluation is working properly for a handful of electrons thrown near a handful of positrons that were written out to a DST. I have also run the branch through my standard tracking examination (to see I haven't borked anything for the standard tracking eval:\r\n![crosscheck](https://cloud.githubusercontent.com/assets/12105552/10414584/f628649c-6f98-11e5-862b-c4baeb86e0a4.png)\r\n\r\nJin, could you grab the branch and see if it solves your issue with the DST embedded eval as intended?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sPHENIX-Collaboration/coresoftware/issues/comments/147746980","html_url":"https://github.com/sPHENIX-Collaboration/coresoftware/pull/75#issuecomment-147746980","issue_url":"https://api.github.com/repos/sPHENIX-Collaboration/coresoftware/issues/75","id":147746980,"user":{"login":"mccumbermike","id":12105552,"avatar_url":"https://avatars.githubusercontent.com/u/12105552?v=3","gravatar_id":"","url":"https://api.github.com/users/mccumbermike","html_url":"https://github.com/mccumbermike","followers_url":"https://api.github.com/users/mccumbermike/followers","following_url":"https://api.github.com/users/mccumbermike/following{/other_user}","gists_url":"https://api.github.com/users/mccumbermike/gists{/gist_id}","starred_url":"https://api.github.com/users/mccumbermike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mccumbermike/subscriptions","organizations_url":"https://api.github.com/users/mccumbermike/orgs","repos_url":"https://api.github.com/users/mccumbermike/repos","events_url":"https://api.github.com/users/mccumbermike/events{/privacy}","received_events_url":"https://api.github.com/users/mccumbermike/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T15:17:28Z","updated_at":"2015-10-13T15:17:28Z","body":"Good catch, thought I had those and did not. Add the passing down of the set_strict option to both SvtxTruthEval and CaloTruthEval."}}