Spent some time working on getting DSelector to output only combos that match the truth PIDs. As Sean suggested, IsTrueCombo() didn't work well... or at all. It always returned false. This might have something to do with how I set the particle indexes in my raw file. I set K+, p, and mu- to have idx 1, 2, 3; but these idx are 0, 1, 2 when accessed in DSelector. Might be a mis-match there.
I coded a workaround, which is to check each particle wrapper's ThrownID and compare to 1, 2, 3. In order to handle all three decay topologies, should be enough to check the positive particle permutations (K+, p). This way, the code will be agnostic about whether the tracked negative particle is a pi- or mu-.
After implementation, this seems to do the trick -- the combinatorical tail in the Lambda invariant mass is dramatically decreased.
I want to add the track thrown IDs to the output tree, but this is causing a crash right now. It might be better to go to a flat tree for the time being, as adding flat custom branches is less weird.
No comments:
Post a Comment