Skip to content

Commit 98a0f41

Browse files
NucleiTask - Add eventloss histos
1 parent b964b0a commit 98a0f41

File tree

1 file changed

+98
-15
lines changed

1 file changed

+98
-15
lines changed

PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx

Lines changed: 98 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -330,17 +330,29 @@ struct LFNucleiBATask {
330330
LOG(fatal) << "Can't enable processData and processMCReco in the same time, pick one!";
331331
}
332332
if (doprocessEvSgLossMC) {
333-
evLossHistos.add<TH1>("evLoss/hEvent", "Event loss histograms; ; counts", HistType::kTH1F, {{3, 0., 3.}});
333+
evLossHistos.add<TH1>("evLoss/hEvent", "Event loss histograms; ; counts", HistType::kTH1F, {{4, 0., 4.}});
334334
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(1, "All Gen.");
335335
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(2, "TVX (reco.)");
336-
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(3, "Sel8 (reco.)");
336+
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(3, "MC Sel8 (TVX + NoTFB) (reco.)");
337+
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(4, "Sel8 (reco.)");
337338

338339
evLossHistos.add<TH1>("evLoss/pt/hDeuteronTriggeredTVX", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
339340
evLossHistos.add<TH1>("evLoss/pt/hDeuteronTriggeredSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
341+
evLossHistos.add<TH1>("evLoss/pt/hDeuteronTriggeredMCSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
340342
evLossHistos.add<TH1>("evLoss/pt/hDeuteronGen", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
341343
evLossHistos.add<TH1>("evLoss/pt/hAntiDeuteronTriggeredTVX", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
344+
evLossHistos.add<TH1>("evLoss/pt/hAntiDeuteronTriggeredMCSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
342345
evLossHistos.add<TH1>("evLoss/pt/hAntiDeuteronTriggeredSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
343346
evLossHistos.add<TH1>("evLoss/pt/hAntiDeuteronGen", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
347+
348+
evLossHistos.add<TH1>("evLoss/pt/hHeliumTriggeredTVX", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
349+
evLossHistos.add<TH1>("evLoss/pt/hHeliumTriggeredSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
350+
evLossHistos.add<TH1>("evLoss/pt/hHeliumTriggeredMCSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
351+
evLossHistos.add<TH1>("evLoss/pt/hHeliumGen", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
352+
evLossHistos.add<TH1>("evLoss/pt/hAntiHeliumTriggeredTVX", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
353+
evLossHistos.add<TH1>("evLoss/pt/hAntiHeliumTriggeredSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
354+
evLossHistos.add<TH1>("evLoss/pt/hAntiHeliumTriggeredMCSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
355+
evLossHistos.add<TH1>("evLoss/pt/hAntiHeliumGen", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
344356
}
345357
if (doprocessMCRecoLfPidEv) {
346358
spectraGen.add<TH1>("LfEv/pT_nocut", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
@@ -356,15 +368,27 @@ struct LFNucleiBATask {
356368
spectraGen.add<TH1>("LfEv/helium/pT_ITSROFBorder_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
357369
spectraGen.add<TH1>("LfEv/helium/pT_sel8_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
358370
spectraGen.add<TH1>("LfEv/helium/pT_MCsel8_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
359-
spectraGen.add<TH1>("LfEv/helium/pT_MCsel8_HePrim", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
371+
372+
spectraGen.add<TH1>("LfEv/helium/prim/pT_nocut_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
373+
spectraGen.add<TH1>("LfEv/helium/prim/pT_TVXtrigger_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
374+
spectraGen.add<TH1>("LfEv/helium/prim/pT_TFrameBorder_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
375+
spectraGen.add<TH1>("LfEv/helium/prim/pT_ITSROFBorder_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
376+
spectraGen.add<TH1>("LfEv/helium/prim/pT_sel8_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
377+
spectraGen.add<TH1>("LfEv/helium/prim/pT_MCsel8_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
360378

361379
spectraGen.add<TH1>("LfEv/helium/pT_nocut_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
362380
spectraGen.add<TH1>("LfEv/helium/pT_TVXtrigger_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
363381
spectraGen.add<TH1>("LfEv/helium/pT_TFrameBorder_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
364382
spectraGen.add<TH1>("LfEv/helium/pT_ITSROFBorder_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
365383
spectraGen.add<TH1>("LfEv/helium/pT_sel8_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
366384
spectraGen.add<TH1>("LfEv/helium/pT_MCsel8_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
367-
spectraGen.add<TH1>("LfEv/helium/pT_MCsel8_antiHePrim", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
385+
386+
spectraGen.add<TH1>("LfEv/helium/prim/pT_nocut_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
387+
spectraGen.add<TH1>("LfEv/helium/prim/pT_TVXtrigger_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
388+
spectraGen.add<TH1>("LfEv/helium/prim/pT_TFrameBorder_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
389+
spectraGen.add<TH1>("LfEv/helium/prim/pT_ITSROFBorder_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
390+
spectraGen.add<TH1>("LfEv/helium/prim/pT_sel8_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
391+
spectraGen.add<TH1>("LfEv/helium/prim/pT_MCsel8_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
368392
}
369393

370394
if (enableDebug) {
@@ -6042,55 +6066,83 @@ struct LFNucleiBATask {
60426066

60436067
// No cut
60446068
spectraGen.fill(HIST("LfEv/pT_nocut"), pt);
6045-
if (pdg == PDGHelium)
6069+
if (pdg == PDGHelium) {
60466070
spectraGen.fill(HIST("LfEv/helium/pT_nocut_He"), pt);
6047-
if (pdg == -PDGHelium)
6071+
if (isPhysPrim)
6072+
spectraGen.fill(HIST("LfEv/helium/prim/pT_nocut_He"), pt);
6073+
}
6074+
if (pdg == -PDGHelium) {
60486075
spectraGen.fill(HIST("LfEv/helium/pT_nocut_antiHe"), pt);
6076+
if (isPhysPrim)
6077+
spectraGen.fill(HIST("LfEv/helium/prim/pT_nocut_antiHe"), pt);
6078+
}
60496079
// Trigger TVX
60506080
if (hasTVX) {
60516081
spectraGen.fill(HIST("LfEv/pT_TVXtrigger"), pt);
6052-
if (pdg == PDGHelium)
6082+
if (pdg == PDGHelium) {
60536083
spectraGen.fill(HIST("LfEv/helium/pT_TVXtrigger_He"), pt);
6054-
if (pdg == -PDGHelium)
6084+
if (isPhysPrim)
6085+
spectraGen.fill(HIST("LfEv/helium/prim/pT_TVXtrigger_He"), pt);
6086+
}
6087+
if (pdg == -PDGHelium) {
60556088
spectraGen.fill(HIST("LfEv/helium/pT_TVXtrigger_antiHe"), pt);
6089+
if (isPhysPrim)
6090+
spectraGen.fill(HIST("LfEv/helium/prim/pT_TVXtrigger_antiHe"), pt);
6091+
}
60566092
}
60576093
// No Time Frame Border
60586094
if (hasNoTFB) {
60596095
spectraGen.fill(HIST("LfEv/pT_TFrameBorder"), pt);
6060-
if (pdg == PDGHelium)
6096+
if (pdg == PDGHelium) {
60616097
spectraGen.fill(HIST("LfEv/helium/pT_TFrameBorder_He"), pt);
6062-
if (pdg == -PDGHelium)
6098+
if (isPhysPrim)
6099+
spectraGen.fill(HIST("LfEv/helium/prim/pT_TFrameBorder_He"), pt);
6100+
}
6101+
if (pdg == -PDGHelium) {
60636102
spectraGen.fill(HIST("LfEv/helium/pT_TFrameBorder_antiHe"), pt);
6103+
if (isPhysPrim)
6104+
spectraGen.fill(HIST("LfEv/helium/prim/pT_TFrameBorder_antiHe"), pt);
6105+
}
60646106
}
60656107
// No ITS ROF Frame Border
60666108
if (hasNoItsRofFB) {
60676109
spectraGen.fill(HIST("LfEv/pT_ITSROFBorder"), pt);
6068-
if (pdg == PDGHelium)
6110+
if (pdg == PDGHelium) {
60696111
spectraGen.fill(HIST("LfEv/helium/pT_ITSROFBorder_He"), pt);
6070-
if (pdg == -PDGHelium)
6112+
if (isPhysPrim)
6113+
spectraGen.fill(HIST("LfEv/helium/prim/pT_ITSROFBorder_He"), pt);
6114+
}
6115+
if (pdg == -PDGHelium) {
60716116
spectraGen.fill(HIST("LfEv/helium/pT_ITSROFBorder_antiHe"), pt);
6117+
if (isPhysPrim)
6118+
spectraGen.fill(HIST("LfEv/helium/prim/pT_ITSROFBorder_antiHe"), pt);
6119+
}
60726120
}
60736121
// Sel8 MC
60746122
if (hasTVX && hasNoTFB) {
60756123
spectraGen.fill(HIST("LfEv/pT_MCsel8"), pt);
60766124
if (pdg == PDGHelium) {
60776125
spectraGen.fill(HIST("LfEv/helium/pT_MCsel8_He"), pt);
60786126
if (isPhysPrim)
6079-
spectraGen.fill(HIST("LfEv/helium/pT_MCsel8_HePrim"), pt);
6127+
spectraGen.fill(HIST("LfEv/helium/prim/pT_MCsel8_He"), pt);
60806128
}
60816129
if (pdg == -PDGHelium) {
60826130
spectraGen.fill(HIST("LfEv/helium/pT_MCsel8_antiHe"), pt);
60836131
if (isPhysPrim)
6084-
spectraGen.fill(HIST("LfEv/helium/pT_MCsel8_antiHePrim"), pt);
6132+
spectraGen.fill(HIST("LfEv/helium/prim/pT_MCsel8_antiHe"), pt);
60856133
}
60866134
}
60876135
// Sel8 tag
60886136
if (hasSel8) {
60896137
spectraGen.fill(HIST("LfEv/pT_sel8"), pt);
60906138
if (pdg == PDGHelium)
60916139
spectraGen.fill(HIST("LfEv/helium/pT_sel8_He"), pt);
6140+
if (isPhysPrim)
6141+
spectraGen.fill(HIST("LfEv/helium/prim/pT_sel8_He"), pt);
60926142
if (pdg == -PDGHelium)
60936143
spectraGen.fill(HIST("LfEv/helium/pT_sel8_antiHe"), pt);
6144+
if (isPhysPrim)
6145+
spectraGen.fill(HIST("LfEv/helium/prim/pT_sel8_antiHe"), pt);
60946146
}
60956147
}
60966148
}
@@ -6383,6 +6435,8 @@ struct LFNucleiBATask {
63836435

63846436
bool isSel8Event = false;
63856437
bool isTvxEvent = false;
6438+
bool isNoTFBEvent = false;
6439+
bool isMCSel8Event = false;
63866440

63876441
// Check if there is an event reconstructed for a generated event
63886442
for (const auto& recoColl : recoColls) {
@@ -6392,14 +6446,21 @@ struct LFNucleiBATask {
63926446
isTvxEvent = true;
63936447
if (recoColl.sel8())
63946448
isSel8Event = true;
6395-
if (isTvxEvent && isSel8Event)
6449+
if (recoColl.selection_bit(aod::evsel::kNoTimeFrameBorder))
6450+
isNoTFBEvent = true;
6451+
if (isTvxEvent && isSel8Event && isNoTFBEvent)
63966452
break; // Optimize loop
63976453
}
63986454

6455+
if (isTvxEvent && isNoTFBEvent)
6456+
isMCSel8Event = true;
6457+
63996458
if (isTvxEvent)
64006459
evLossHistos.fill(HIST("evLoss/hEvent"), 1.5);
64016460
if (isSel8Event)
64026461
evLossHistos.fill(HIST("evLoss/hEvent"), 2.5);
6462+
if (isMCSel8Event)
6463+
evLossHistos.fill(HIST("evLoss/hEvent"), 3.5);
64036464

64046465
// Loop over all the Generated level particles
64056466
for (const auto& mcPart : mcParticles) {
@@ -6417,13 +6478,35 @@ struct LFNucleiBATask {
64176478
evLossHistos.fill(HIST("evLoss/pt/hDeuteronTriggeredTVX"), pt);
64186479
if (isSel8Event)
64196480
evLossHistos.fill(HIST("evLoss/pt/hDeuteronTriggeredSel8"), pt);
6481+
if (isMCSel8Event)
6482+
evLossHistos.fill(HIST("evLoss/pt/hDeuteronTriggeredMCSel8"), pt);
64206483
}
64216484
if (pdg == -PDGDeuteron) {
64226485
evLossHistos.fill(HIST("evLoss/pt/hAntiDeuteronGen"), pt);
64236486
if (isTvxEvent)
64246487
evLossHistos.fill(HIST("evLoss/pt/hAntiDeuteronTriggeredTVX"), pt);
64256488
if (isSel8Event)
64266489
evLossHistos.fill(HIST("evLoss/pt/hAntiDeuteronTriggeredSel8"), pt);
6490+
if (isMCSel8Event)
6491+
evLossHistos.fill(HIST("evLoss/pt/hAntiDeuteronTriggeredMCSel8"), pt);
6492+
}
6493+
if (pdg == PDGHelium) {
6494+
evLossHistos.fill(HIST("evLoss/pt/hHeliumGen"), pt);
6495+
if (isTvxEvent)
6496+
evLossHistos.fill(HIST("evLoss/pt/hHeliumTriggeredTVX"), pt);
6497+
if (isSel8Event)
6498+
evLossHistos.fill(HIST("evLoss/pt/hHeliumTriggeredSel8"), pt);
6499+
if (isMCSel8Event)
6500+
evLossHistos.fill(HIST("evLoss/pt/hHeliumTriggeredMCSel8"), pt);
6501+
}
6502+
if (pdg == -PDGHelium) {
6503+
evLossHistos.fill(HIST("evLoss/pt/hAntiHeliumGen"), pt);
6504+
if (isTvxEvent)
6505+
evLossHistos.fill(HIST("evLoss/pt/hAntiHeliumTriggeredTVX"), pt);
6506+
if (isSel8Event)
6507+
evLossHistos.fill(HIST("evLoss/pt/hAntiHeliumTriggeredSel8"), pt);
6508+
if (isMCSel8Event)
6509+
evLossHistos.fill(HIST("evLoss/pt/hAntiHeliumTriggeredMCSel8"), pt);
64276510
}
64286511
}
64296512
}

0 commit comments

Comments
 (0)