Example for the difference between dn/dy and dn/deta

Specify particle mass

m:=0.140

Let’s define a simple parameterization for in the inv. yield 1/(2 Pi pT) dN/dpT/dy

σ:=3

T:=0.16

A:=100

g[y_]:=PDF[NormalDistribution[0,σ],y]

f[pt_,y_]:=A g[y] Exp[-pt/T]  (* = 1/(2 Pi PT) dN/dpTdy) *)

Define dn/dy

dndy[y_]:=NIntegrate[2 π pt f[pt,y],{pt,0,∞}]

Rapidity as a function of Pseudorapidity and pT

y[η_?NumericQ,pt_?NumericQ] := 1/2 Log[((Sqrt[(pt^2)((Cosh[η])^2)+(m^2)])+pt Sinh[η])/((Sqrt[(pt^2)((Cosh[η])^2)+(m^2)])-pt Sinh[η])]

Define the Jacobian

Jac[η_?NumericQ, pt_?NumericQ]:=(Sqrt[1-((m^2)/(((m^2)+(pt^2))((Cosh[y[η,pt]])^2)))])

Calculate dn/dη

dndη[η_]:=NIntegrate[2 π pt Jac[η,pt]f[pt,y[η,pt]],{pt,0,∞}]

pl=Plot[{dndy[r],dndη[r]},{r,-6,6},PlotStyle->{{Blue,Thick},{Red,Thick}},AxesStyle->Thick,TicksStyle->Thick,PlotRange->{0.,2.5},AxesLabel->{Style["η or y",20],Style["dN/dη or dN/dy ",20]},LabelStyle->16]

Export[NotebookDirectory[]<>"dndy_vs_dndeta.png",pl,ImageResolution->300]