The formulas for xt, yt, and zt are wrong for hamc, and [...]. What matters is the input required and assumed for the LeRose model of Transport through the HRS. I talked to John LeRose this morning. Imagine a plane that intersects the beam at the center (z=0) of the target. The normal to the plane is the HRS optic axis. Hence, this normal makes an angle theta_central to the beam's axis. The plane has two coordinates: xt and yt (as written in the code). These are Transport coordinates. Note, zt is irrelevant. If you change zt in the code by 1e6 I think it should not affect the output (maybe you should try something like this to verify it). I already had that at the back of my mind and remember debating with myself whether I should drop the zt variable. Anyway, please check what I'm saying: that zt does not matter.. The xt is along the dispersive axis of the dipole, so it's up and down in Hall A. The yt is what we standardly call "y target". In an event, the coordinates xb, yb, and zb are generated. Here zb is along the beam. It's a little ambigiuous in the hamc code how we define xb and yb, but we may as well define it so that xb is to first order xt, i.e. up/down and yb is to first order yt. Might be less confusing that way. The job is to transform (xb,yb,zb) to (xt,yt) and never mind zt. This means projecting (xb,yb,zb) to the aforementioned plane and finding the intersection. The transformation will depend on the horizontal and vertical angles of the trajectory, as well as theta_central. I've written some formulas and can compare them with yours after you derive them independently. One must pay attention to sign conventions so that the formulas work automatically for left and right HRS, as well as the case where zb is negative (scatters before the middle of target) versus positive (after the middle). Getting this correct will hopefully help improve the data / hamc comparison. BTW, you can also get a feel for this right now by making cuts on z-target. For events near the middle of the target I speculate that the comparison might be better than for events near the front or end caps. After fixing the transformation, the comparison might be equally good for all z. I guess it will pay in the end to get hamc in good shape. yours Bob