Skip to content

Commit

Permalink
bug fixes: phi range now in correct units, and
Browse files Browse the repository at this point in the history
- momentum distributions for Fermi motion are now flat
  • Loading branch information
aborquez authored and chiarazampolli committed Apr 3, 2024
1 parent 4ca08c6 commit 17e36cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EVGEN/AliGenSexaquarkReaction.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void AliGenSexaquarkReaction::SetDefaultValues() {
void AliGenSexaquarkReaction::SetDefaultRanges() {
// anti-sexaquark
SetPtRange(0., 5.); // GeV/c
SetPhiRange(0., 2 * TMath::Pi()); // radians
SetPhiRange(0., 360.); // degrees (get converted into radians here)
SetYRange(-0.8, 0.8);
// interaction vertex
SetRadiusRange(5., 180.); // cm
Expand Down Expand Up @@ -412,7 +412,7 @@ void AliGenSexaquarkReaction::GetFermiMomentum(Float_t& Px, Float_t& Py, Float_t
Float_t random_N[2];
Rndm(random_N, 2);
Float_t Phi_N = 2 * TMath::Pi() * random_N[0]; // azimuthal angle (uniform distribution) (in radians)
Float_t Theta_N = TMath::Pi() * random_N[1]; // polar angle (uniform distribution) (in radians)
Float_t Theta_N = TMath::ACos(1 - 2 * random_N[1]); // polar angle (based on inverse CDF) (in radians)
// then, assign px,py,pz
Px = P_N * TMath::Cos(Phi_N) * TMath::Sin(Theta_N);
Py = P_N * TMath::Sin(Phi_N) * TMath::Sin(Theta_N);
Expand Down

0 comments on commit 17e36cf

Please sign in to comment.