DUNE / ND_CAFMaker

Code for making CAFs from ND inputs (whether 2x2+MINERvA prototype or full ND simulation)
Apache License 2.0
1 stars 11 forks source link

Possible kinematics calculation error in `FillTruth.cxx` #30

Closed pgranger23 closed 10 months ago

pgranger23 commented 11 months ago

While looking at FillTruth.cxx to adapt the FD CAFMaker to the new CAF format, I came across what seems to be a mistake in the momentum transfer calculation in FillTruth.cxx.

At ND_CAFMaker/src/truth/FillTruth.cxx:147, it seems that lepP4 is defined but never set to its value before being used on L154, which impacts the later calculations.

Just reporting here as this seems wrong to me. Please excuse me if this has already been fixed or if this is the expected behaviour.

chenel commented 11 months ago

Good catch! A lot of this code was pulled in from other places and clearly I just missed a line or something. You can feel free to submit a patch, if you want to, otherwise I'll fix it when I get there 😅

pgranger23 commented 11 months ago

I opened PR https://github.com/DUNE/ND_CAFMaker/pull/31 , with an attempt at fixing this. Just to make sure this doesn't get forgotten.