Skip to content

Commit 0365b66

Browse files
authored
fixed perpendicular cone calculation (#6481)
1 parent 1e5174e commit 0365b66

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

PWGLF/Tasks/Strangeness/strangeness_in_jets.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -705,15 +705,15 @@ struct strangeness_in_jets {
705705
return delta_phi;
706706
}
707707

708-
void get_perpendicular_cone(TVector3 p, TVector3& u, float sign)
708+
void get_perpendicular_axis(TVector3 p, TVector3& u, double sign)
709709
{
710710
// Initialization
711-
float ux(0), uy(0), uz(0);
711+
double ux(0), uy(0), uz(0);
712712

713713
// Components of Vector p
714-
float px = p.X();
715-
float py = p.Y();
716-
float pz = p.Z();
714+
double px = p.X();
715+
double py = p.Y();
716+
double pz = p.Z();
717717

718718
// Protection 1
719719
if (px == 0 && py != 0) {
@@ -736,10 +736,10 @@ struct strangeness_in_jets {
736736
}
737737

738738
// Equation Parameters
739-
float a = px * px + py * py;
740-
float b = 2.0 * px * pz * pz;
741-
float c = pz * pz * pz * pz - py * py * py * py - px * px * py * py;
742-
float delta = b * b - 4.0 * a * c;
739+
double a = px * px + py * py;
740+
double b = 2.0 * px * pz * pz;
741+
double c = pz * pz * pz * pz - py * py * py * py - px * px * py * py;
742+
double delta = b * b - 4.0 * a * c;
743743

744744
// Protection agains delta<0
745745
if (delta < 0) {
@@ -878,8 +878,8 @@ struct strangeness_in_jets {
878878
// Perpendicular Cones for UE
879879
TVector3 ue_axis1(0.0, 0.0, 0.0);
880880
TVector3 ue_axis2(0.0, 0.0, 0.0);
881-
get_perpendicular_cone(jet_axis, ue_axis1, +1.0);
882-
get_perpendicular_cone(jet_axis, ue_axis2, -1.0);
881+
get_perpendicular_axis(jet_axis, ue_axis1, +1.0);
882+
get_perpendicular_axis(jet_axis, ue_axis2, -1.0);
883883

884884
// Protection against delta<0
885885
if (ue_axis1.X() == 0 && ue_axis1.Y() == 0 && ue_axis1.Z() == 0)
@@ -1404,8 +1404,8 @@ struct strangeness_in_jets {
14041404
// Perpendicular Cones for UE
14051405
TVector3 ue_axis1(0.0, 0.0, 0.0);
14061406
TVector3 ue_axis2(0.0, 0.0, 0.0);
1407-
get_perpendicular_cone(jet_axis, ue_axis1, +1.0);
1408-
get_perpendicular_cone(jet_axis, ue_axis2, -1.0);
1407+
get_perpendicular_axis(jet_axis, ue_axis1, +1.0);
1408+
get_perpendicular_axis(jet_axis, ue_axis2, -1.0);
14091409

14101410
// Protection against delta<0
14111411
if (ue_axis1.X() == 0 && ue_axis1.Y() == 0 && ue_axis1.Z() == 0)

0 commit comments

Comments
 (0)