Test dN/dx fit with gradient

 I have tested Biao Tu approach with dN/dx fit using calculated gradient.
This approach does significant reduction of tails in dN/dx fit by Minuit.
Before:

After: