File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2525#include "Generators/GeneratorPythia8Param.h"
2626#include "Generators/DecayerPythia8Param.h"
2727#endif
28+ #include "Generators/GeneratorPythia8.h"
2829#include <nlohmann/json.hpp>
2930#include "generator_pythia8_longlived.C"
3031
@@ -275,9 +276,9 @@ class GeneratorPythia8LFRapidity : public o2::eventgen::GeneratorPythia8
275276 const double phi = gRandom -> Uniform (0 , TMath ::TwoPi ());
276277 const double px {pt * std ::cos (phi )};
277278 const double py {pt * std ::sin (phi )};
278- // Convert rapidity to pz using the relation: pz = pt * sinh(rapidity)
279- const double pz {pt * std ::sinh (rapidity )};
280- const double et {std ::hypot ( std :: hypot ( pt , pz ), cfg . mMass )};
279+ const double mT = std :: sqrt ( cfg . mMass * cfg . mMass + pt * pt );
280+ const double pz {mT * std ::sinh (rapidity )};
281+ const double et {mT * std ::cosh ( rapidity )};
281282
282283 // TParticle::TParticle(Int_t pdg,
283284 // Int_t status,
You can’t perform that action at this time.
0 commit comments