Skip to content

Commit 797c2fe

Browse files
author
Prottay Das
committed
added SA in polar angle
1 parent daa111f commit 797c2fe

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

PWGLF/Tasks/Resonances/kstarpbpb.cxx

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ struct kstarpbpb {
101101
Configurable<float> cfgCutDCAxy{"cfgCutDCAxy", 2.0f, "DCAxy range for tracks"};
102102
Configurable<float> cfgCutDCAz{"cfgCutDCAz", 2.0f, "DCAz range for tracks"};
103103
Configurable<bool> useGlobalTrack{"useGlobalTrack", true, "use Global track"};
104+
Configurable<bool> usepolar{"usepolar", true, "flag to fill type of SA"};
104105
Configurable<float> nsigmaCutTOF{"nsigmacutTOF", 3.0, "Value of the TOF Nsigma cut"};
105106
Configurable<float> nsigmaCutTPC{"nsigmacutTPC", 3.0, "Value of the TPC Nsigma cut"};
106107
Configurable<bool> isTOFOnly{"isTOFOnly", false, "use TOF only PID"};
@@ -159,8 +160,8 @@ struct kstarpbpb {
159160
Preslice<TrackMCRecTable> perCollision = aod::track::collisionId;
160161

161162
SliceCache cache;
162-
Partition<TrackCandidates> posTracks = aod::track::signed1Pt > cfgCutCharge;
163-
Partition<TrackCandidates> negTracks = aod::track::signed1Pt < cfgCutCharge;
163+
// Partition<TrackCandidates> posTracks = aod::track::signed1Pt > cfgCutCharge;
164+
// Partition<TrackCandidates> negTracks = aod::track::signed1Pt < cfgCutCharge;
164165

165166
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
166167

@@ -183,8 +184,8 @@ struct kstarpbpb {
183184
AxisSpec resAxis = {6000, -30, 30, "Res"};
184185
AxisSpec centAxis = {8, 0, 80, "V0M (%)"};
185186
AxisSpec occupancyAxis = {occupancyBinning, "Occupancy"};
187+
histos.add("hEvtSelInfo", "hEvtSelInfo", kTH1F, {{10, 0, 10.0}});
186188
if (!fillSA) {
187-
histos.add("hEvtSelInfo", "hEvtSelInfo", kTH1F, {{10, 0, 10.0}});
188189
if (same) {
189190
histos.add("hSparseV2SASameEvent_V2", "hSparseV2SASameEvent_V2", HistType::kTHnSparseF, {configThnAxisInvMass, configThnAxisPt, configThnAxisV2, configThnAxisCentrality});
190191
}
@@ -663,15 +664,25 @@ struct kstarpbpb {
663664
threeVecDauCM = fourVecDauCM.Vect();
664665
threeVecDauCMXY = ROOT::Math::XYZVector(threeVecDauCM.X(), threeVecDauCM.Y(), 0.);
665666
eventplaneVec = ROOT::Math::XYZVector(std::cos(2.0 * psiFT0C), std::sin(2.0 * psiFT0C), 0);
667+
eventplaneVecNorm = ROOT::Math::XYZVector(std::sin(2.0 * psiFT0C), -std::cos(2.0 * psiFT0C), 0);
666668
auto cosPhistarminuspsi = GetPhiInRange(fourVecDauCM.Phi() - psiFT0C);
667669
auto SA = TMath::Cos(2.0 * cosPhistarminuspsi);
670+
auto cosThetaStar = eventplaneVecNorm.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()) / std::sqrt(eventplaneVecNorm.Mag2());
668671

669-
if (track1Sign * track2Sign < 0)
670-
histos.fill(HIST("hSparseSAvsrapsameunlike"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
671-
else if (track1Sign * track2Sign > 0)
672-
histos.fill(HIST("hSparseSAvsrapsamelike"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
672+
if (track1Sign * track2Sign < 0) {
673+
if (usepolar) {
674+
histos.fill(HIST("hSparseSAvsrapsameunlike"), KstarMother.M(), KstarMother.Pt(), cosThetaStar, KstarMother.Rapidity(), centrality);
675+
} else {
676+
histos.fill(HIST("hSparseSAvsrapsameunlike"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
677+
}
678+
} else if (track1Sign * track2Sign > 0) {
679+
if (usepolar) {
680+
histos.fill(HIST("hSparseSAvsrapsamelike"), KstarMother.M(), KstarMother.Pt(), cosThetaStar, KstarMother.Rapidity(), centrality);
681+
} else {
682+
histos.fill(HIST("hSparseSAvsrapsamelike"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
683+
}
684+
}
673685
}
674-
675686
if (fillRotation) {
676687
for (int nrotbkg = 0; nrotbkg < nBkgRotations; nrotbkg++) {
677688
auto anglestart = confMinRot;
@@ -707,8 +718,12 @@ struct kstarpbpb {
707718
threeVecDauCMXYrot = ROOT::Math::XYZVector(threeVecDauCMrot.X(), threeVecDauCMrot.Y(), 0.);
708719
auto cosPhistarminuspsirot = GetPhiInRange(fourVecDauCMrot.Phi() - psiFT0C);
709720
auto SArot = TMath::Cos(2.0 * cosPhistarminuspsirot);
710-
711-
histos.fill(HIST("hSparseSAvsraprot"), kstarrot.M(), kstarrot.Pt(), SArot, kstarrot.Rapidity(), centrality);
721+
auto cosThetaStarrot = eventplaneVecNorm.Dot(threeVecDauCMrot) / std::sqrt(threeVecDauCMrot.Mag2()) / std::sqrt(eventplaneVecNorm.Mag2());
722+
if (usepolar) {
723+
histos.fill(HIST("hSparseSAvsraprot"), kstarrot.M(), kstarrot.Pt(), cosThetaStarrot, kstarrot.Rapidity(), centrality);
724+
} else {
725+
histos.fill(HIST("hSparseSAvsraprot"), kstarrot.M(), kstarrot.Pt(), SArot, kstarrot.Rapidity(), centrality);
726+
}
712727
}
713728
}
714729
}
@@ -1203,10 +1218,15 @@ struct kstarpbpb {
12031218
threeVecDauCM = fourVecDauCM.Vect();
12041219
threeVecDauCMXY = ROOT::Math::XYZVector(threeVecDauCM.X(), threeVecDauCM.Y(), 0.);
12051220
eventplaneVec = ROOT::Math::XYZVector(std::cos(2.0 * psiFT0C), std::sin(2.0 * psiFT0C), 0);
1221+
eventplaneVecNorm = ROOT::Math::XYZVector(std::sin(2.0 * psiFT0C), -std::cos(2.0 * psiFT0C), 0);
12061222
auto cosPhistarminuspsi = GetPhiInRange(fourVecDauCM.Phi() - psiFT0C);
12071223
auto SA = TMath::Cos(2.0 * cosPhistarminuspsi);
1208-
1209-
histos.fill(HIST("hSparseSAvsrapmix"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
1224+
auto cosThetaStar = eventplaneVecNorm.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()) / std::sqrt(eventplaneVecNorm.Mag2());
1225+
if (usepolar) {
1226+
histos.fill(HIST("hSparseSAvsrapmix"), KstarMother.M(), KstarMother.Pt(), cosThetaStar, KstarMother.Rapidity(), centrality);
1227+
} else {
1228+
histos.fill(HIST("hSparseSAvsrapmix"), KstarMother.M(), KstarMother.Pt(), SA, KstarMother.Rapidity(), centrality);
1229+
}
12101230
}
12111231
}
12121232
}

0 commit comments

Comments
 (0)