Skip to content

Commit 89e67dc

Browse files
authored
Change definition of underlying event in jetHadronsPid.cxx
Instead of using randomly chosen orthogonal axis and drawing cones, rotate cones by 90 degrees in phi both ways while keeping eta the same , creating two underlying event cones
1 parent 1a67dbf commit 89e67dc

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

PWGJE/Tasks/jetHadronsPid.cxx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,20 @@ struct JetHadronsPid {
400400

401401
void getPerpendicularDirections(const TVector3& p, TVector3& u1, TVector3& u2)
402402
{
403-
double const treshold = 1e-9;
404-
if (p.Mag2() < treshold) {
403+
double const threshold = 1e-9;
404+
405+
if (p.Pt() < threshold) {
405406
u1.SetXYZ(0, 0, 0);
406407
u2.SetXYZ(0, 0, 0);
407408
return;
408409
}
409-
u1 = p.Orthogonal();
410-
u2 = p.Cross(u1);
410+
411+
double pt = p.Pt();
412+
double eta = p.Eta();
413+
double phi = p.Phi();
414+
415+
u1.SetPtEtaPhi(pt, eta, phi + PIHalf);
416+
u2.SetPtEtaPhi(pt, eta, phi - PIHalf);
411417
}
412418

413419
template <typename TrackIts>

0 commit comments

Comments
 (0)