Skip to content

Commit c58d55a

Browse files
authored
Merge branch 'AliceO2Group:master' into fulljets-edits
2 parents 5b97edf + f8f8fbc commit c58d55a

File tree

5 files changed

+120
-17
lines changed

5 files changed

+120
-17
lines changed

PWGCF/Flow/Tasks/flowPtEfficiency.cxx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,22 @@ struct FlowPtEfficiency {
145145

146146
void init(InitContext const&)
147147
{
148+
const AxisSpec axisVertex{20, -10, 10, "Vtxz (cm)"};
149+
const AxisSpec axisEta{20, -1., 1., "#eta"};
148150
const AxisSpec axisCounter{1, 0, +1, ""};
149151
// create histograms
150152
registry.add("eventCounter", "eventCounter", kTH1F, {axisCounter});
151153
registry.add("hPtMCRec", "Monte Carlo Reco", {HistType::kTH1D, {axisPt}});
152154
registry.add("hPtNchMCRec", "Reco production; pT (GeV/c); multiplicity", {HistType::kTH2D, {axisPt, axisNch}});
153155
registry.add("hBVsPtVsPhiRec", "hBVsPtVsPhiRec", HistType::kTH3D, {axisB, axisPhi, axisPt});
156+
registry.add("hEtaPtVzRec", "hEtaPtVz Reconstructed", HistType::kTH3D, {axisEta, axisPt, axisVertex});
154157

155158
registry.add("mcEventCounter", "Monte Carlo Truth EventCounter", kTH1F, {axisCounter});
156159
registry.add("hPtMCGen", "Monte Carlo Truth", {HistType::kTH1D, {axisPt}});
157160
registry.add("hPtNchMCGen", "Truth production; pT (GeV/c); multiplicity", {HistType::kTH2D, {axisPt, axisNch}});
158161
registry.add("numberOfRecoCollisions", "numberOfRecoCollisions", kTH1F, {{10, -0.5f, 9.5f}});
159162
registry.add("hBVsPtVsPhiTrue", "hBVsPtVsPhiTrue", HistType::kTH3D, {axisB, axisPhi, axisPt});
163+
registry.add("hEtaPtVzTrue", "hEtaPtVz True", HistType::kTH3D, {axisEta, axisPt, axisVertex});
160164

161165
if (cfgFlowEnabled) {
162166
registry.add("hImpactParameterReco", "hImpactParameterReco", {HistType::kTH1D, {axisB}});
@@ -406,6 +410,7 @@ struct FlowPtEfficiency {
406410
if (isStable(mcParticle.pdgCode())) {
407411
registry.fill(HIST("hPtMCRec"), track.pt());
408412
registry.fill(HIST("hPtNchMCRec"), track.pt(), tracks.size());
413+
registry.fill(HIST("hEtaPtVzRec"), track.eta(), track.pt(), vtxz);
409414

410415
if (cfgFlowEnabled) {
411416
float deltaPhi = RecoDecay::constrainAngle(track.phi() - evPhi);
@@ -462,6 +467,7 @@ struct FlowPtEfficiency {
462467
float lRandom = fRndm->Rndm();
463468
float wacc = 1.0f;
464469
float weff = 1.0f;
470+
float vtxz = mcCollision.posZ();
465471

466472
if (collisions.size() > -1) {
467473
registry.fill(HIST("mcEventCounter"), 0.5);
@@ -477,8 +483,10 @@ struct FlowPtEfficiency {
477483
for (const auto& mcParticle : mcParticles) {
478484
if (mcParticle.isPhysicalPrimary() && isStable(mcParticle.pdgCode())) {
479485
registry.fill(HIST("hPtMCGen"), mcParticle.pt());
480-
if (collisions.size() > 0)
486+
if (collisions.size() > 0) {
481487
registry.fill(HIST("hPtNchMCGen"), mcParticle.pt(), numberOfTracks[0]);
488+
}
489+
registry.fill(HIST("hEtaPtVzTrue"), mcParticle.eta(), mcParticle.pt(), vtxz);
482490

483491
if (cfgFlowEnabled) {
484492
float deltaPhi = RecoDecay::constrainAngle(mcParticle.phi() - evPhi);

PWGLF/DataModel/LFSlimNucleiTables.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,29 @@ DECLARE_SOA_COLUMN(SurvivedEventSelection, survivedEventSelection, bool);
5353
DECLARE_SOA_COLUMN(AbsoDecL, absoDecL, float);
5454

5555
} // namespace NucleiTableNS
56+
57+
namespace NucleiPairTableNS
58+
{
59+
DECLARE_SOA_COLUMN(Pt1, pt1, float); // first particle pt
60+
DECLARE_SOA_COLUMN(Eta1, eta1, float); // first particle eta
61+
DECLARE_SOA_COLUMN(Phi1, phi1, float); // first particle phi
62+
DECLARE_SOA_COLUMN(TPCInnerParam1, tpcInnerParam1, float); // first particle TPC inner param
63+
DECLARE_SOA_COLUMN(TPCsignal1, tpcSignal1, float); // first particle TPC signal
64+
DECLARE_SOA_COLUMN(DCAxy1, dcaxy1, float); // first particle DCA xy
65+
DECLARE_SOA_COLUMN(DCAz1, dcaz1, float); // first particle DCA z
66+
DECLARE_SOA_COLUMN(ClusterSizesITS1, clusterSizesITS1, uint32_t); // first particle ITS cluster sizes
67+
DECLARE_SOA_COLUMN(Flags1, flags1, uint16_t); // first particle flags
68+
DECLARE_SOA_COLUMN(Pt2, pt2, float); // second particle pt
69+
DECLARE_SOA_COLUMN(Eta2, eta2, float); // second particle eta
70+
DECLARE_SOA_COLUMN(Phi2, phi2, float); // second particle phi
71+
DECLARE_SOA_COLUMN(TPCInnerParam2, tpcInnerParam2, float); // second particle TPC inner param
72+
DECLARE_SOA_COLUMN(TPCsignal2, tpcSignal2, float); // second particle TPC signal
73+
DECLARE_SOA_COLUMN(DCAxy2, dcaxy2, float); // second particle DCA xy
74+
DECLARE_SOA_COLUMN(DCAz2, dcaz2, float); // second particle DCA z
75+
DECLARE_SOA_COLUMN(ClusterSizesITS2, clusterSizesITS2, uint32_t); // second particle ITS cluster sizes
76+
DECLARE_SOA_COLUMN(Flags2, flags2, uint16_t); // second particle flags
77+
} // namespace NucleiPairTableNS
78+
5679
namespace NucleiFlowTableNS
5780
{
5881
DECLARE_SOA_COLUMN(CentFV0A, centFV0A, float); // centrality with FT0A estimator
@@ -136,6 +159,26 @@ DECLARE_SOA_TABLE(NucleiTableMC, "AOD", "NUCLEITABLEMC",
136159
NucleiTableNS::SurvivedEventSelection,
137160
NucleiTableNS::AbsoDecL);
138161

162+
DECLARE_SOA_TABLE(NucleiPairTable, "AOD", "NUCLEIPAIRTABLE",
163+
NucleiPairTableNS::Pt1,
164+
NucleiPairTableNS::Eta1,
165+
NucleiPairTableNS::Phi1,
166+
NucleiPairTableNS::TPCInnerParam1,
167+
NucleiPairTableNS::TPCsignal1,
168+
NucleiPairTableNS::DCAxy1,
169+
NucleiPairTableNS::DCAz1,
170+
NucleiPairTableNS::ClusterSizesITS1,
171+
NucleiPairTableNS::Flags1,
172+
NucleiPairTableNS::Pt2,
173+
NucleiPairTableNS::Eta2,
174+
NucleiPairTableNS::Phi2,
175+
NucleiPairTableNS::TPCInnerParam2,
176+
NucleiPairTableNS::TPCsignal2,
177+
NucleiPairTableNS::DCAxy2,
178+
NucleiPairTableNS::DCAz2,
179+
NucleiPairTableNS::ClusterSizesITS2,
180+
NucleiPairTableNS::Flags2);
181+
139182
} // namespace o2::aod
140183

141184
#endif // PWGLF_DATAMODEL_LFSLIMNUCLEITABLES_H_

PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ struct nucleiSpectra {
267267
};
268268

269269
Produces<o2::aod::NucleiTable> nucleiTable;
270+
Produces<o2::aod::NucleiPairTable> nucleiPairTable;
270271
Produces<o2::aod::NucleiTableMC> nucleiTableMC;
271272
Produces<o2::aod::NucleiTableFlow> nucleiTableFlow;
272273
Service<o2::ccdb::BasicCCDBManager> ccdb;
@@ -297,6 +298,7 @@ struct nucleiSpectra {
297298
Configurable<LabeledArray<double>> cfgDCAcut{"cfgDCAcut", {nuclei::DCAcutDefault[0], 5, 2, nuclei::names, nuclei::nDCAConfigName}, "Max DCAxy and DCAz for light nuclei"};
298299
Configurable<LabeledArray<double>> cfgDownscaling{"cfgDownscaling", {nuclei::DownscalingDefault[0], 5, 1, nuclei::names, nuclei::DownscalingConfigName}, "Fraction of kept candidates for light nuclei"};
299300
Configurable<LabeledArray<int>> cfgTreeConfig{"cfgTreeConfig", {nuclei::TreeConfigDefault[0], 5, 2, nuclei::names, nuclei::treeConfigNames}, "Filtered trees configuration"};
301+
Configurable<bool> cfgFillPairTree{"cfgFillPairTree", true, "Fill trees for pairs of light nuclei"};
300302
Configurable<LabeledArray<int>> cfgDCAHists{"cfgDCAHists", {nuclei::DCAHistDefault[0], 5, 2, nuclei::names, nuclei::DCAConfigNames}, "DCA hist configuration"};
301303
Configurable<LabeledArray<int>> cfgFlowHist{"cfgFlowHist", {nuclei::FlowHistDefault[0], 5, 1, nuclei::names, nuclei::flowConfigNames}, "Flow hist configuration"};
302304

@@ -514,6 +516,7 @@ struct nucleiSpectra {
514516
spectra.add("hTpcSignalData", "Specific energy loss", HistType::kTH2F, {{600, -6., 6., "#it{p} (GeV/#it{c})"}, {1400, 0, 1400, "d#it{E} / d#it{X} (a. u.)"}});
515517
spectra.add("hTpcSignalDataSelected", "Specific energy loss for selected particles", HistType::kTH2F, {{600, -6., 6., "#it{p} (GeV/#it{c})"}, {1400, 0, 1400, "d#it{E} / d#it{X} (a. u.)"}});
516518
spectra.add("hTofSignalData", "TOF beta", HistType::kTH2F, {{500, 0., 5., "#it{p} (GeV/#it{c})"}, {750, 0, 1.5, "TOF #beta"}});
519+
spectra.add("hMCDCAxyVsDecRadius", "DCA xy vs DecayRadius", HistType::kTH2F, {{20, 0., 0.2, "Decay radius"}, {150, -0.05, 0.05, "DCA_{xy} (cm)"}});
517520
for (int iC{0}; iC < 2; ++iC) {
518521
nuclei::hGloTOFtracks[iC] = spectra.add<TH2>(fmt::format("hTPCTOFtracks{}", nuclei::matter[iC]).data(), fmt::format("Global vs TOF matched {} tracks in a collision", nuclei::chargeLabelNames[iC]).data(), HistType::kTH2D, {{300, -0.5, 300.5, "Number of global tracks"}, {300, -0.5, 300.5, "Number of TOF matched tracks"}});
519522

@@ -833,14 +836,24 @@ struct nucleiSpectra {
833836
}
834837

835838
fillDataInfo(collision, tracks);
836-
for (auto& c : nuclei::candidates) {
837-
if (c.fillTree) {
838-
nucleiTable(c.pt, c.eta, c.phi, c.tpcInnerParam, c.beta, c.zVertex, c.DCAxy, c.DCAz, c.TPCsignal, c.ITSchi2, c.TPCchi2, c.TOFchi2, c.flags, c.TPCfindableCls, c.TPCcrossedRows, c.ITSclsMap, c.TPCnCls, c.TPCnClsShared, c.clusterSizesITS);
839+
for (size_t i1{0}; i1 < nuclei::candidates.size(); ++i1) {
840+
auto& c1 = nuclei::candidates[i1];
841+
if (c1.fillTree) {
842+
nucleiTable(c1.pt, c1.eta, c1.phi, c1.tpcInnerParam, c1.beta, c1.zVertex, c1.DCAxy, c1.DCAz, c1.TPCsignal, c1.ITSchi2, c1.TPCchi2, c1.TOFchi2, c1.flags, c1.TPCfindableCls, c1.TPCcrossedRows, c1.ITSclsMap, c1.TPCnCls, c1.TPCnClsShared, c1.clusterSizesITS);
843+
if (cfgFillPairTree) {
844+
for (size_t i2{i1 + 1}; i2 < nuclei::candidates.size(); ++i2) {
845+
auto& c2 = nuclei::candidates[i2];
846+
if (!c2.fillTree || ((c1.flags & c2.flags) & 0x1F) == 0) {
847+
continue;
848+
}
849+
nucleiPairTable(c1.pt, c1.eta, c1.phi, c1.tpcInnerParam, c1.TPCsignal, c1.DCAxy, c1.DCAz, c1.clusterSizesITS, c1.flags, c2.pt, c2.eta, c2.phi, c2.tpcInnerParam, c2.TPCsignal, c2.DCAxy, c2.DCAz, c2.clusterSizesITS, c2.flags);
850+
}
851+
}
839852
}
840-
if (c.fillDCAHist) {
853+
if (c1.fillDCAHist) {
841854
for (int iS{0}; iS < nuclei::species; ++iS) {
842-
if (c.flags & BIT(iS)) {
843-
nuclei::hDCAHists[c.pt < 0][iS]->Fill(std::abs(c.pt), c.DCAxy, c.DCAz, c.nSigmaTPC[iS], c.tofMasses[iS], c.ITSnCls, c.TPCnCls);
855+
if (c1.flags & BIT(iS)) {
856+
nuclei::hDCAHists[c1.pt < 0][iS]->Fill(std::abs(c1.pt), c1.DCAxy, c1.DCAz, c1.nSigmaTPC[iS], c1.tofMasses[iS], c1.ITSnCls, c1.TPCnCls);
844857
}
845858
}
846859
}
@@ -979,6 +992,8 @@ struct nucleiSpectra {
979992
if (std::find(nuclei::hfMothCodes.begin(), nuclei::hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != nuclei::hfMothCodes.end()) {
980993
c.flags |= kIsSecondaryFromWeakDecay;
981994
MotherpdgCode = motherparticle.pdgCode();
995+
float decRadius = std::hypot(particle.vx() - motherparticle.vx(), particle.vy() - motherparticle.vy());
996+
spectra.fill(HIST("hMCDCAxyVsDecRadius"), decRadius, c.DCAxy);
982997
break;
983998
}
984999
}

PWGLF/Tasks/GlobalEventProperties/uccZdc.cxx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ struct UccZdc {
9696

9797
// Track-kinematics selection
9898
Configurable<float> minPt{"minPt", 0.1, "minimum pt of the tracks"};
99-
Configurable<float> maxPt{"maxPt", 50., "maximum pt of the tracks"};
99+
Configurable<float> maxPt{"maxPt", 3., "maximum pt of the tracks"};
100+
Configurable<float> maxPtSpectra{"maxPtSpectra", 50., "maximum pt of the tracks"};
100101
Configurable<float> minEta{"minEta", -0.8, "minimum eta"};
101102
Configurable<float> maxEta{"maxEta", +0.8, "maximum eta"};
102103

@@ -150,8 +151,7 @@ struct UccZdc {
150151
Zem
151152
};
152153

153-
// Filter trackFilter = ((aod::track::eta > minEta) && (aod::track::eta < maxEta) && (aod::track::pt > minPt) && (aod::track::pt < maxPt) && requireGlobalTrackInFilter());
154-
Filter trackFilter = ((aod::track::eta > minEta) && (aod::track::eta < maxEta) && (aod::track::pt > minPt) && (aod::track::pt < maxPt));
154+
Filter trackFilter = ((aod::track::eta > minEta) && (aod::track::eta < maxEta));
155155

156156
// Apply Filters
157157
using TheFilteredTracks = soa::Filtered<o2::aod::TracksSel>;
@@ -296,6 +296,9 @@ struct UccZdc {
296296
LOG(info) << "\tuseMidRapNchSel=" << useMidRapNchSel.value;
297297
LOG(info) << "\tpaTHmeanNch=" << paTHmeanNch.value;
298298
LOG(info) << "\tpaTHsigmaNch=" << paTHsigmaNch.value;
299+
LOG(info) << "\tminPt=" << minPt.value;
300+
LOG(info) << "\tmaxPt=" << maxPt.value;
301+
LOG(info) << "\tmaxPtSpectra=" << maxPtSpectra.value;
299302

300303
ccdb->setURL("http://alice-ccdb.cern.ch");
301304
// Enabling object caching, otherwise each call goes to the CCDB server
@@ -473,6 +476,9 @@ struct UccZdc {
473476
if (!track.isGlobalTrack()) {
474477
continue;
475478
}
479+
if ((track.pt() < minPt) || (track.pt() > maxPt)) {
480+
continue;
481+
}
476482
glbTracks++;
477483
}
478484

@@ -513,6 +519,9 @@ struct UccZdc {
513519
if (!track.isGlobalTrack()) {
514520
continue;
515521
}
522+
if ((track.pt() < minPt) || (track.pt() > maxPtSpectra)) {
523+
continue;
524+
}
516525

517526
registry.fill(HIST("ZposVsEta"), collision.posZ(), track.eta());
518527
registry.fill(HIST("EtaVsPhi"), track.eta(), track.phi());
@@ -635,6 +644,9 @@ struct UccZdc {
635644
if (!track.isGlobalTrack()) {
636645
continue;
637646
}
647+
if ((track.pt() < minPt) || (track.pt() > maxPt)) {
648+
continue;
649+
}
638650
registry.fill(HIST("ZposVsEta"), collision.posZ(), track.eta());
639651
registry.fill(HIST("EtaVsPhi"), track.eta(), track.phi());
640652
registry.fill(HIST("sigma1Pt"), track.pt(), track.sigma1Pt());
@@ -687,6 +699,9 @@ struct UccZdc {
687699
if (!track.isGlobalTrack()) {
688700
continue;
689701
}
702+
if ((track.pt() < minPt) || (track.pt() > maxPtSpectra)) {
703+
continue;
704+
}
690705

691706
float pt{track.pt()};
692707
double weight{1.};
@@ -713,6 +728,9 @@ struct UccZdc {
713728
if (!track.isGlobalTrack()) {
714729
continue;
715730
}
731+
if ((track.pt() < minPt) || (track.pt() > maxPtSpectra)) {
732+
continue;
733+
}
716734
registry.fill(HIST("NchVsZNVsPt"), w1, sumZNs, track.pt());
717735
}
718736

0 commit comments

Comments
 (0)