Skip to content

Commit d38032a

Browse files
[PWGLF] NucleiTask - Add MC multiplicity (#11823)
1 parent ea858cc commit d38032a

File tree

1 file changed

+37
-31
lines changed

1 file changed

+37
-31
lines changed

PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,33 @@
1818
///
1919

2020
#include "PWGLF/DataModel/LFNucleiTables.h"
21+
#include "PWGLF/DataModel/LFParticleIdentification.h"
22+
#include "PWGLF/DataModel/mcCentrality.h"
2123

24+
#include "Common/CCDB/EventSelectionParams.h"
25+
#include "Common/Core/trackUtilities.h"
26+
#include "Common/DataModel/Centrality.h"
27+
#include "Common/DataModel/EventSelection.h"
28+
#include "Common/DataModel/Multiplicity.h"
29+
#include "Common/DataModel/PIDResponse.h"
30+
#include "Common/DataModel/PIDResponseITS.h"
31+
#include "Common/DataModel/TrackSelectionTables.h"
2232
#include "EventFiltering/Zorro.h"
2333
#include "EventFiltering/ZorroSummary.h"
34+
2435
#include "CCDB/BasicCCDBManager.h"
25-
#include <string>
26-
#include <TLorentzVector.h>
27-
#include <TF1.h>
28-
#include "ReconstructionDataFormats/Track.h"
29-
#include "Framework/runDataProcessing.h"
30-
#include "Framework/AnalysisTask.h"
31-
#include "Framework/AnalysisDataModel.h"
3236
#include "Framework/ASoAHelpers.h"
37+
#include "Framework/AnalysisDataModel.h"
38+
#include "Framework/AnalysisTask.h"
3339
#include "Framework/HistogramRegistry.h"
34-
35-
#include "Common/DataModel/Multiplicity.h"
36-
#include "Common/DataModel/PIDResponse.h"
37-
#include "Common/DataModel/PIDResponseITS.h"
38-
#include "Common/DataModel/EventSelection.h"
39-
#include "Common/DataModel/Centrality.h"
40-
#include "Common/DataModel/TrackSelectionTables.h"
41-
#include "Common/Core/trackUtilities.h"
42-
#include "Common/CCDB/EventSelectionParams.h"
43-
#include "PWGLF/DataModel/LFParticleIdentification.h"
40+
#include "Framework/runDataProcessing.h"
4441
#include "ReconstructionDataFormats/PID.h"
42+
#include "ReconstructionDataFormats/Track.h"
43+
44+
#include <TF1.h>
45+
#include <TLorentzVector.h>
46+
47+
#include <string>
4548

4649
using namespace o2;
4750
using namespace o2::framework;
@@ -328,7 +331,7 @@ struct LFNucleiBATask {
328331
hSkim->GetXaxis()->SetBinLabel(1, "Total");
329332
hSkim->GetXaxis()->SetBinLabel(2, "Skimmed events");
330333

331-
histos.add<TH1>("event/eventSelection", "eventSelection", HistType::kTH1D, {{7, -0.5, 6.5}});
334+
histos.add<TH1>("event/eventSelection", "eventSelection", HistType::kTH1D, {{8, -0.5, 7.5}});
332335
auto h = histos.get<TH1>(HIST("event/eventSelection"));
333336
if (skimmingOptions.applySkimming)
334337
h->GetXaxis()->SetBinLabel(1, "Skimmed events");
@@ -340,6 +343,7 @@ struct LFNucleiBATask {
340343
h->GetXaxis()->SetBinLabel(5, "TVX + TF + ITS ROF");
341344
h->GetXaxis()->SetBinLabel(6, "Sel8 cut");
342345
h->GetXaxis()->SetBinLabel(7, "Z-vert Cut");
346+
h->GetXaxis()->SetBinLabel(8, "Multiplicity cut");
343347
histos.add<TH1>("event/h1VtxZ", "V_{z};V_{z} (in cm); counts", HistType::kTH1F, {{1500, -15, 15}});
344348

345349
if (enablePIDplot) {
@@ -1597,9 +1601,6 @@ struct LFNucleiBATask {
15971601
}
15981602
}
15991603
if (enableTr) {
1600-
// histos.add<TH2>("tracks/triton/h2TritonVspTNSigmaITS", "NSigmaITS(t) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaITS", HistType::kTH2F, {{ptAxis}, {sigmaITSAxis}});
1601-
// histos.add<TH2>("tracks/triton/h2antiTritonVspTNSigmaITS", "NSigmaITS(#bar{t}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaITS", HistType::kTH2F, {{ptAxis}, {sigmaITSAxis}});
1602-
16031604
histos.add<TH2>("tracks/triton/h2TritonVspTNSigmaTPC", "NSigmaTPC(t) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}});
16041605
histos.add<TH2>("tracks/triton/h2antiTritonVspTNSigmaTPC", "NSigmaTPC(#bar{t}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {sigmaTPCAxis}});
16051606
}
@@ -2140,14 +2141,6 @@ struct LFNucleiBATask {
21402141
if (enableDebug)
21412142
debugHistos.fill(HIST("qa/h1VtxZ_sel8"), event.posZ());
21422143

2143-
if (enableCentrality) {
2144-
if (event.centFT0M() < cfgLowMultCut || event.centFT0M() > cfgHighMultCut) {
2145-
return;
2146-
}
2147-
if (enableDebug)
2148-
debugHistos.fill(HIST("event/h1VtxZ_Centrality"), event.posZ());
2149-
}
2150-
21512144
if (event.posZ() < cfgLowCutVertex || event.posZ() > cfgHighCutVertex)
21522145
return;
21532146
histos.fill(HIST("event/eventSelection"), 6);
@@ -2159,6 +2152,15 @@ struct LFNucleiBATask {
21592152
return;
21602153
}
21612154

2155+
if (event.centFT0M() < cfgLowMultCut || event.centFT0M() > cfgHighMultCut) {
2156+
return;
2157+
}
2158+
histos.fill(HIST("event/eventSelection"), 7);
2159+
2160+
if (enableCentrality && enableDebug) {
2161+
debugHistos.fill(HIST("event/h1VtxZ_Centrality"), event.posZ());
2162+
}
2163+
21622164
float gamma = 0., massTOF = 0., massTOFhe = 0., massTOFantihe = 0., heTPCmomentum = 0.f, antiheTPCmomentum = 0.f, heP = 0.f, antiheP = 0.f, hePt = 0.f, antihePt = 0.f, antiDPt = 0.f, DPt = 0.f;
21632165
bool isTritonTPCpid = false;
21642166
bool prRapCut = false;
@@ -5763,6 +5765,7 @@ struct LFNucleiBATask {
57635765

57645766
// Process function that runs on the original AO2D (for the MC)
57655767
void processMCReco(EventCandidatesMC::iterator const& event,
5768+
soa::Join<aod::McCollisions, aod::McCentFT0Ms> const&,
57665769
soa::Join<TrackCandidates, aod::McTrackLabels> const& tracks,
57675770
aod::McParticles const& mcParticles,
57685771
o2::aod::BCsWithTimestamps const&)
@@ -5773,6 +5776,7 @@ struct LFNucleiBATask {
57735776

57745777
// Process function that runs on the original AO2D (for the MC) with the LfPIDcalibration
57755778
void processMCRecoLfPid(EventCandidatesMC::iterator const& event,
5779+
soa::Join<aod::McCollisions, aod::McCentFT0Ms> const&,
57765780
soa::Join<TrackCandidatesLfPid, aod::McTrackLabels> const& tracks,
57775781
aod::McParticles const& mcParticles,
57785782
o2::aod::BCsWithTimestamps const&)
@@ -5916,10 +5920,12 @@ struct LFNucleiBATask {
59165920
////////////
59175921

59185922
// LOOP OVER GENERATED MC PARTICLES
5919-
void processMCGen(aod::McCollision const& mcCollision,
5923+
void processMCGen(soa::Join<aod::McCollisions, aod::McCentFT0Ms>::iterator const& mcCollision,
59205924
aod::McParticles& mcParticles)
59215925
{
59225926
spectraGen.fill(HIST("histGenVetxZ"), mcCollision.posZ());
5927+
if (mcCollision.centFT0M() > cfgHighMultCut || mcCollision.centFT0M() < cfgLowMultCut)
5928+
return;
59235929
for (auto& mcParticleGen : mcParticles) {
59245930
if (mcParticleGen.y() > kinemOptions.yHighCut || mcParticleGen.y() < kinemOptions.yLowCut) {
59255931
continue;
@@ -6151,7 +6157,7 @@ struct LFNucleiBATask {
61516157
}
61526158
} // Close processMCGen
61536159
PROCESS_SWITCH(LFNucleiBATask, processMCGen, "process MC Generated", true);
6154-
void processEvSgLossMC(aod::McCollision const& mcCollision,
6160+
void processEvSgLossMC(soa::Join<aod::McCollisions, aod::McCentFT0Ms>::iterator const& mcCollision,
61556161
aod::McParticles const& mcParticles,
61566162
const soa::SmallGroups<EventCandidatesMC>& recoColls)
61576163
{

0 commit comments

Comments
 (0)