Skip to content

Commit a80cb64

Browse files
authored
added K0s and replaced local with global multiplicity (#6257)
* added K0s and replaced local with global multiplicity * fixed formatting (1st try)
1 parent 1342d9e commit a80cb64

1 file changed

Lines changed: 84 additions & 42 deletions

File tree

PWGLF/Tasks/Strangeness/strangeness_in_jets.cxx

Lines changed: 84 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "Common/DataModel/EventSelection.h"
2929
#include "Common/DataModel/PIDResponse.h"
3030
#include "Common/DataModel/TrackSelectionTables.h"
31+
#include "Common/DataModel/Multiplicity.h"
3132
#include "Framework/ASoAHelpers.h"
3233
#include "Framework/AnalysisDataModel.h"
3334
#include "Framework/AnalysisTask.h"
@@ -42,7 +43,7 @@ using namespace o2::framework::expressions;
4243
using namespace o2::constants::physics;
4344
using std::array;
4445

45-
using SelectedCollisions = soa::Join<aod::Collisions, aod::EvSels>;
46+
using SelectedCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms>;
4647

4748
using FullTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TrackSelectionExtension, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>;
4849

@@ -81,6 +82,8 @@ struct strangeness_in_jets {
8182
Configurable<float> ptMax_V0_proton{"ptMax_V0_proton", 10.0f, "pt max of proton from V0"};
8283
Configurable<float> ptMin_V0_pion{"ptMin_V0_pion", 0.1f, "pt min of pion from V0"};
8384
Configurable<float> ptMax_V0_pion{"ptMax_V0_pion", 1.5f, "pt max of pion from V0"};
85+
Configurable<float> ptMin_K0_pion{"ptMin_K0_pion", 0.3f, "pt min of pion from K0"};
86+
Configurable<float> ptMax_K0_pion{"ptMax_K0_pion", 10.0f, "pt max of pion from K0"};
8487
Configurable<float> nsigmaTPCmin{"nsigmaTPCmin", -3.0f, "Minimum nsigma TPC"};
8588
Configurable<float> nsigmaTPCmax{"nsigmaTPCmax", +3.0f, "Maximum nsigma TPC"};
8689
Configurable<float> nsigmaTOFmin{"nsigmaTOFmin", -3.0f, "Minimum nsigma TOF"};
@@ -107,14 +110,18 @@ struct strangeness_in_jets {
107110
registryQC.add("number_of_events_data", "number of events in data", HistType::kTH1F, {{15, 0, 15, "Event Cuts"}});
108111

109112
// Multiplicity Binning
110-
std::vector<double> multBinning = {0, 5, 15, 50};
111-
AxisSpec multAxis = {multBinning, "#it{N}_{ch}"};
113+
std::vector<double> multBinning = {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
114+
AxisSpec multAxis = {multBinning, "FT0C percentile"};
112115

113-
// Histograms
116+
// Histograms (Lambda)
114117
registryData.add("Lambda_in_jet", "Lambda_in_jet", HistType::kTH3F, {multBinning, {100, 0.0, 10.0, "#it{p}_{T} (GeV/#it{c})"}, {200, 1.09, 1.14, "m_{p#pi} (GeV/#it{c}^{2})"}});
115118
registryData.add("AntiLambda_in_jet", "AntiLambda_in_jet", HistType::kTH3F, {multBinning, {100, 0.0, 10.0, "#it{p}_{T} (GeV/#it{c})"}, {200, 1.09, 1.14, "m_{p#pi} (GeV/#it{c}^{2})"}});
116119
registryData.add("Lambda_in_ue", "Lambda_in_ue", HistType::kTH3F, {multBinning, {100, 0.0, 10.0, "#it{p}_{T} (GeV/#it{c})"}, {200, 1.09, 1.14, "m_{p#pi} (GeV/#it{c}^{2})"}});
117120
registryData.add("AntiLambda_in_ue", "AntiLambda_in_ue", HistType::kTH3F, {multBinning, {100, 0.0, 10.0, "#it{p}_{T} (GeV/#it{c})"}, {200, 1.09, 1.14, "m_{p#pi} (GeV/#it{c}^{2})"}});
121+
122+
// Histograms (K0s)
123+
registryData.add("K0s_in_jet", "K0s_in_jet", HistType::kTH3F, {multBinning, {100, 0.0, 10.0, "#it{p}_{T} (GeV/#it{c})"}, {200, 0.44, 0.56, "m_{#pi#pi} (GeV/#it{c}^{2})"}});
124+
registryData.add("K0s_in_ue", "K0s_in_ue", HistType::kTH3F, {multBinning, {100, 0.0, 10.0, "#it{p}_{T} (GeV/#it{c})"}, {200, 0.44, 0.56, "m_{#pi#pi} (GeV/#it{c}^{2})"}});
118125
}
119126

120127
template <typename T1>
@@ -259,6 +266,63 @@ struct strangeness_in_jets {
259266
return true;
260267
}
261268

269+
// K0s Selections
270+
template <typename V, typename T1, typename T2, typename C>
271+
bool passedK0ShortSelection(const V& v0, const T1& ptrack, const T2& ntrack, const C& collision)
272+
{
273+
// Single-Track Selections
274+
if (!passedSingleTrackSelection(ptrack))
275+
return false;
276+
if (!passedSingleTrackSelection(ntrack))
277+
return false;
278+
279+
// Momentum K0s Daughters
280+
TVector3 pion_pos(v0.pxpos(), v0.pypos(), v0.pzpos());
281+
TVector3 pion_neg(v0.pxneg(), v0.pyneg(), v0.pzneg());
282+
283+
if (pion_pos.Pt() < ptMin_K0_pion)
284+
return false;
285+
if (pion_pos.Pt() > ptMax_K0_pion)
286+
return false;
287+
if (pion_neg.Pt() < ptMin_K0_pion)
288+
return false;
289+
if (pion_neg.Pt() > ptMax_K0_pion)
290+
return false;
291+
292+
// V0 Selections
293+
if (v0.v0cosPA() < v0cospaMin)
294+
return false;
295+
if (v0.v0radius() < minimumV0Radius || v0.v0radius() > maximumV0Radius)
296+
return false;
297+
if (v0.dcaV0daughters() > dcaV0DaughtersMax)
298+
return false;
299+
if (v0.dcapostopv() < dcapostoPVmin)
300+
return false;
301+
if (v0.dcanegtopv() < dcanegtoPVmin)
302+
return false;
303+
304+
// PID Selections (TPC)
305+
if (ptrack.tpcNSigmaPi() < nsigmaTPCmin || ptrack.tpcNSigmaPi() > nsigmaTPCmax)
306+
return false;
307+
if (ntrack.tpcNSigmaPi() < nsigmaTPCmin || ntrack.tpcNSigmaPi() > nsigmaTPCmax)
308+
return false;
309+
310+
// PID Selections (TOF)
311+
if (requireTOF) {
312+
if (ptrack.tofNSigmaPi() < nsigmaTOFmin || ptrack.tofNSigmaPi() > nsigmaTOFmax)
313+
return false;
314+
if (ntrack.tofNSigmaPi() < nsigmaTOFmin || ntrack.tofNSigmaPi() > nsigmaTOFmax)
315+
return false;
316+
}
317+
318+
// Rapidity Selection
319+
TLorentzVector lorentzVect;
320+
lorentzVect.SetXYZM(ptrack.px() + ntrack.px(), ptrack.py() + ntrack.py(), ptrack.pz() + ntrack.pz(), 0.497614);
321+
if (lorentzVect.Rapidity() < yMin || lorentzVect.Rapidity() > yMax)
322+
return false;
323+
return true;
324+
}
325+
262326
// Single-Track Selection
263327
template <typename T1>
264328
bool passedSingleTrackSelection(const T1& track)
@@ -489,40 +553,8 @@ struct strangeness_in_jets {
489553
return;
490554
registryQC.fill(HIST("number_of_events_data"), 5.5);
491555

492-
// Calculate multiplicity in jet and UE
493-
float mult_jet(0);
494-
float mult_ue(0);
495-
for (auto track : tracks) {
496-
497-
if (!track.passedITSRefit())
498-
continue;
499-
if (!track.passedTPCRefit())
500-
continue;
501-
if (!passedTrackSelectionForJets(track))
502-
continue;
503-
504-
TVector3 pTrack(track.px(), track.py(), track.pz());
505-
506-
// Jet multiplicity
507-
float deltaEta_jet = pTrack.Eta() - jet_axis.Eta();
508-
float deltaPhi_jet = GetDeltaPhi(pTrack.Phi(), jet_axis.Phi());
509-
float deltaR_jet = sqrt(deltaEta_jet * deltaEta_jet + deltaPhi_jet * deltaPhi_jet);
510-
if (deltaR_jet < Rmax)
511-
mult_jet++;
512-
513-
// UE multiplicity
514-
float deltaEta_ue1 = pTrack.Eta() - ue_axis1.Eta();
515-
float deltaPhi_ue1 = GetDeltaPhi(pTrack.Phi(), ue_axis1.Phi());
516-
float deltaR_ue1 = sqrt(deltaEta_ue1 * deltaEta_ue1 + deltaPhi_ue1 * deltaPhi_ue1);
517-
float deltaEta_ue2 = pTrack.Eta() - ue_axis2.Eta();
518-
float deltaPhi_ue2 = GetDeltaPhi(pTrack.Phi(), ue_axis2.Phi());
519-
float deltaR_ue2 = sqrt(deltaEta_ue2 * deltaEta_ue2 + deltaPhi_ue2 * deltaPhi_ue2);
520-
521-
if (deltaR_ue1 < Rmax || deltaR_ue2 < Rmax)
522-
mult_ue++;
523-
}
524-
525-
mult_jet = mult_jet - 2.0 * mult_ue;
556+
// Event multiplicity
557+
float multiplicity = collision.centFT0M();
526558

527559
for (auto& v0 : fullV0s) {
528560

@@ -547,25 +579,35 @@ struct strangeness_in_jets {
547579
float deltaPhi_ue2 = GetDeltaPhi(v0dir.Phi(), ue_axis2.Phi());
548580
float deltaR_ue2 = sqrt(deltaEta_ue2 * deltaEta_ue2 + deltaPhi_ue2 * deltaPhi_ue2);
549581

582+
// K0s
583+
if (passedK0ShortSelection(v0, pos, neg, collision)) {
584+
if (deltaR_jet < Rmax) {
585+
registryData.fill(HIST("K0s_in_jet"), multiplicity, v0.pt(), v0.mK0Short());
586+
}
587+
if (deltaR_ue1 < Rmax || deltaR_ue2 < Rmax) {
588+
registryData.fill(HIST("K0s_in_ue"), multiplicity, v0.pt(), v0.mK0Short());
589+
}
590+
}
591+
550592
// Lambda
551593
if (passedLambdaSelection(v0, pos, neg, collision)) {
552594
if (deltaR_jet < Rmax) {
553-
registryData.fill(HIST("Lambda_in_jet"), mult_jet, v0.pt(), v0.mLambda());
595+
registryData.fill(HIST("Lambda_in_jet"), multiplicity, v0.pt(), v0.mLambda());
554596
}
555597

556598
if (deltaR_ue1 < Rmax || deltaR_ue2 < Rmax) {
557-
registryData.fill(HIST("Lambda_in_ue"), mult_ue, v0.pt(), v0.mLambda());
599+
registryData.fill(HIST("Lambda_in_ue"), multiplicity, v0.pt(), v0.mLambda());
558600
}
559601
}
560602

561603
// AntiLambda
562604
if (passedAntiLambdaSelection(v0, pos, neg, collision)) {
563605
if (deltaR_jet < Rmax) {
564-
registryData.fill(HIST("AntiLambda_in_jet"), mult_jet, v0.pt(), v0.mAntiLambda());
606+
registryData.fill(HIST("AntiLambda_in_jet"), multiplicity, v0.pt(), v0.mAntiLambda());
565607
}
566608

567609
if (deltaR_ue1 < Rmax || deltaR_ue2 < Rmax) {
568-
registryData.fill(HIST("AntiLambda_in_ue"), mult_ue, v0.pt(), v0.mAntiLambda());
610+
registryData.fill(HIST("AntiLambda_in_ue"), multiplicity, v0.pt(), v0.mAntiLambda());
569611
}
570612
}
571613
}

0 commit comments

Comments
 (0)