Studies into cost benefit of trams

Dear Fausto:
Here I send you some links with information regarding your question.
In the case of Barcelona you can find out about our Tram system in https://www.tram.cat/who-are-we
In this website, Public Transportation: What is the cost benefit of trams over buses? (https://www.quora.com/Public-Transportation-What-is-the-cost-benefit-of-trams-over-buses) you can find a short discussion of the topic and a lot of related links.
Here an example of Edinburgh: Transport Economics: The Return of Trams – Benefits and Costs (https://www.tutor2u.net/economics/blog/transport-economics-the-return-of-trams-benefits-and-costs)
Cervero, Robert & Guerra, Erick. Urban Densities and Transit: A Multi-dimensional Perspective  (http://www.its.berkeley.edu/sites/default/files/publications/UCB/2011/VWP/UCB-ITS-VWP-2011-6.pdf)
I hope help you with the information.
Regards
Rolando