Skip to content

Commit 01e06be

Browse files
[PWGLF] added process function to get the shape of the nsigma distributions f… (#14118)
1 parent 085f5bf commit 01e06be

File tree

1 file changed

+69
-8
lines changed

1 file changed

+69
-8
lines changed

PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

Lines changed: 69 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,16 +310,20 @@ struct he3HadronFemto {
310310
{"He3/h2dEdxHe3candidates", "dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {100, 0.0f, 2000.0f}}}},
311311
{"He3/h2NsigmaHe3TPC", "NsigmaHe3 TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(^{3}He)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}},
312312
{"He3/h2NsigmaHe3TPC_preselection", "NsigmaHe3 TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(^{3}He)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
313-
{"He3/h2NSigmaHe3ITS_preselection", "NsigmaHe3 ITS distribution; signed #it{p}_{T} (GeV/#it{c}); n#sigma_{ITS} ^{3}He", {HistType::kTH2F, {{50, -5.0f, 5.0f}, {120, -3.0f, 3.0f}}}},
314313
{"He3/h2NSigmaHe3ITS", "NsigmaHe3 ITS distribution; signed #it{p}_{T} (GeV/#it{c}); n#sigma_{ITS} ^{3}He", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {120, -3.0f, 3.0f}}}},
314+
{"He3/h2NSigmaHe3ITS_preselection", "NsigmaHe3 ITS distribution; signed #it{p}_{T} (GeV/#it{c}); n#sigma_{ITS} ^{3}He", {HistType::kTH2F, {{50, -5.0f, 5.0f}, {120, -3.0f, 3.0f}}}},
315315

316316
{"Had/hNClsHadITS", "had;N_{ITS} Cluster", {HistType::kTH1F, {{20, -10.0f, 10.0f}}}},
317317
{"Had/hChi2NClHadITS", "had;Chi2_{ITS} Ncluster", {HistType::kTH1F, {{100, 0, 100.0f}}}},
318318
{"Had/hHadronPt", "had; #it{p}_{T} (GeV/#it{c})", {HistType::kTH1F, {{120, -3.0f, 3.0f}}}},
319319
{"Had/h2NsigmaHadronTPC", "NsigmaHadron TPC distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}},
320-
{"Had/h2NsigmaHadronTPC_preselection", "NsigmaHe3 TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
320+
{"Had/h2NsigmaHadronTPC_preselection", "NsigmaHadron TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
321+
{"Had/h2NsigmaHadronTPC_mcBackground", "NsigmaHadron TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
322+
{"Had/h2NsigmaHadronTPC_mcSignal", "NsigmaHadron TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
321323
{"Had/h2NsigmaHadronTOF", "NsigmaHadron TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}},
322324
{"Had/h2NsigmaHadronTOF_preselection", "NsigmaHadron TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
325+
{"Had/h2NsigmaHadronTOF_mcBackground", "NsigmaHadron TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
326+
{"Had/h2NsigmaHadronTOF_mcSignal", "NsigmaHadron TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}},
323327
},
324328
OutputObjHandlingPolicy::AnalysisObject,
325329
false,
@@ -532,22 +536,22 @@ struct he3HadronFemto {
532536
bool selectionPIDHadron(const Ttrack& candidate)
533537
{
534538
auto tpcNSigmaHad = computeTPCNSigmaHadron(candidate);
535-
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC_preselection"), candidate.sign() * candidate.tpcInnerParam(), tpcNSigmaHad);
539+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC_preselection"), candidate.tpcInnerParam(), tpcNSigmaHad);
536540
if (candidate.hasTOF() && candidate.pt() > settingCutPtMinTOFHad) {
537541
auto tofNSigmaHad = computeTOFNSigmaHadron(candidate);
538542

539543
if (std::abs(tpcNSigmaHad) > settingCutNsigmaTPC) {
540544
return false;
541545
}
542-
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTOF_preselection"), candidate.sign() * candidate.pt(), tofNSigmaHad);
546+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTOF_preselection"), candidate.pt(), tofNSigmaHad);
543547
if (std::abs(tofNSigmaHad) > settingCutNsigmaTOF) {
544548
return false;
545549
}
546-
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC"), candidate.sign() * candidate.pt(), tpcNSigmaHad);
547-
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTOF"), candidate.sign() * candidate.pt(), tofNSigmaHad);
550+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC"), candidate.pt(), tpcNSigmaHad);
551+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTOF"), candidate.pt(), tofNSigmaHad);
548552
return true;
549553
} else if (std::abs(tpcNSigmaHad) < settingCutNsigmaTPC) {
550-
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC"), candidate.sign() * candidate.pt(), tpcNSigmaHad);
554+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC"), candidate.pt(), tpcNSigmaHad);
551555
return true;
552556
}
553557
return false;
@@ -1315,6 +1319,51 @@ struct he3HadronFemto {
13151319

13161320
for (const auto& track : tracks) {
13171321

1322+
if (!selectTrack(track, Species::kHad))
1323+
continue;
1324+
1325+
if (selectDcaNsigmaCut(track, Species::kHad)) {
1326+
mQaRegistry.fill(HIST("Had/hHadronPt"), track.pt());
1327+
1328+
const float tpcNSigmaHad = computeTPCNSigmaHadron(track);
1329+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC_preselection"), track.tpcInnerParam(), tpcNSigmaHad);
1330+
1331+
if (track.hasTOF()) {
1332+
const float tofNSigmaHad = computeTOFNSigmaHadron(track);
1333+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTOF_preselection"), track.pt(), tofNSigmaHad);
1334+
}
1335+
}
1336+
1337+
if (!selectTrack(track, Species::kHe3) || !selectDcaNsigmaCut(track, Species::kHe3))
1338+
continue;
1339+
1340+
mQaRegistry.fill(HIST("He3/hHe3Pt"), track.pt() * 2.f);
1341+
mQaRegistry.fill(HIST("He3/hDCAxyHe3"), track.dcaXY());
1342+
mQaRegistry.fill(HIST("He3/hDCAzHe3"), track.dcaZ());
1343+
1344+
bool heliumPID = track.pidForTracking() == o2::track::PID::Helium3 || track.pidForTracking() == o2::track::PID::Alpha;
1345+
float correctedTPCinnerParam = (heliumPID && settingCompensatePIDinTracking) ? track.tpcInnerParam() / 2.f : track.tpcInnerParam();
1346+
if (correctedTPCinnerParam < settingCutRigidityMinHe3) {
1347+
continue;
1348+
}
1349+
1350+
const float nSigmaHe3 = computeNSigmaHe3(track);
1351+
mQaRegistry.fill(HIST("He3/h2NsigmaHe3TPC_preselection"), track.sign() * 2 * track.pt(), nSigmaHe3);
1352+
}
1353+
}
1354+
PROCESS_SWITCH(he3HadronFemto, processPurity, "Process for purity studies", false);
1355+
1356+
void processPurityMc(const CollisionsFullMC::iterator& collision, const TrackCandidatesMC& tracks, const aod::BCsWithTimestamps& bcs, const aod::McParticles& /*mcParticles*/, const aod::McTrackLabels& /*mcTrackLabels*/)
1357+
{
1358+
if (!selectCollision</*isMC*/ false>(collision, bcs))
1359+
return;
1360+
1361+
for (const auto& track : tracks) {
1362+
1363+
if (!track.has_mcParticle())
1364+
continue;
1365+
const auto& particle = track.mcParticle_as<aod::McParticles>();
1366+
13181367
if (!selectTrack(track, Species::kHad))
13191368
continue;
13201369

@@ -1324,9 +1373,21 @@ struct he3HadronFemto {
13241373
const float tpcNSigmaHad = computeTPCNSigmaHadron(track);
13251374
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC_preselection"), track.sign() * track.tpcInnerParam(), tpcNSigmaHad);
13261375

1376+
if (std::abs(particle.pdgCode()) != settingHadPDGCode) {
1377+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC_mcBackground"), track.sign() * track.tpcInnerParam(), tpcNSigmaHad);
1378+
} else {
1379+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTPC_mcSignal"), track.sign() * track.tpcInnerParam(), tpcNSigmaHad);
1380+
}
1381+
13271382
if (track.hasTOF()) {
13281383
const float tofNSigmaHad = computeTOFNSigmaHadron(track);
13291384
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTOF_preselection"), track.sign() * track.pt(), tofNSigmaHad);
1385+
1386+
if (std::abs(particle.pdgCode()) != settingHadPDGCode) {
1387+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTOF_mcBackground"), track.sign() * track.tpcInnerParam(), tofNSigmaHad);
1388+
} else {
1389+
mQaRegistry.fill(HIST("Had/h2NsigmaHadronTOF_mcSignal"), track.sign() * track.tpcInnerParam(), tofNSigmaHad);
1390+
}
13301391
}
13311392
}
13321393

@@ -1347,7 +1408,7 @@ struct he3HadronFemto {
13471408
mQaRegistry.fill(HIST("He3/h2NsigmaHe3TPC_preselection"), track.sign() * 2 * track.pt(), nSigmaHe3);
13481409
}
13491410
}
1350-
PROCESS_SWITCH(he3HadronFemto, processPurity, "Process for purity studies", false);
1411+
PROCESS_SWITCH(he3HadronFemto, processPurityMc, "Process for purity studies mc", false);
13511412
};
13521413

13531414
WorkflowSpec defineDataProcessing(const ConfigContext& cfgc)

0 commit comments

Comments
 (0)