Skip to content

Commit 50af68b

Browse files
committed
Added more distributions
1 parent b2f69de commit 50af68b

File tree

1 file changed

+53
-7
lines changed

1 file changed

+53
-7
lines changed

PWGLF/Tasks/Nuspex/piKpRAA.cxx

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ using namespace o2::framework::expressions;
6969
using ColEvSels = soa::Join<aod::Collisions, aod::EvSels, aod::FT0MultZeqs, o2::aod::CentFT0Cs, o2::aod::CentFT0Ms, aod::TPCMults, o2::aod::BarrelMults>;
7070
using BCsRun3 = soa::Join<aod::BCsWithTimestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
7171

72-
using ColEvSelsMC = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, o2::aod::CentFT0Cs, o2::aod::CentFT0Ms>;
72+
using ColEvSelsMC = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, o2::aod::CentFT0Cs, o2::aod::CentFT0Ms, o2::aod::CentFT0Ms, o2::aod::BarrelMults>;
7373

7474
using TracksFull = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelectionExtension, aod::TracksDCA, aod::TrackSelection, aod::TracksCovIU, aod::pidTPCPi, aod::pidTPCPr, aod::pidTOFPr, aod::pidTPCEl, aod::pidTOFFlags, aod::pidTOFbeta, aod::TOFSignal, aod::pidTOFFullPi, aod::pidTOFFullEl>;
7575

@@ -198,7 +198,7 @@ struct PiKpRAA {
198198
Configurable<bool> isCentSel{"isCentSel", true, "Centrality selection?"};
199199
Configurable<bool> isT0Ccent{"isT0Ccent", true, "Use T0C-based centrality?"};
200200
Configurable<bool> isZvtxPosSel{"isZvtxPosSel", true, "Zvtx position selection?"};
201-
201+
Configurable<bool> isINELgt0{"isINELgt0", true, "Apply INEL > 0?"};
202202
Configurable<bool> isApplyFT0CbasedOccupancy{"isApplyFT0CbasedOccupancy", false, "T0C Occu cut"};
203203
Configurable<bool> applyNchSel{"applyNchSel", false, "Use mid-rapidity-based Nch selection"};
204204
Configurable<bool> skipRecoColGTOne{"skipRecoColGTOne", true, "Remove collisions if reconstructed more than once"};
@@ -258,7 +258,8 @@ struct PiKpRAA {
258258
OccuCut,
259259
Centrality,
260260
VtxZ,
261-
NchSel
261+
NchSel,
262+
INELgt0
262263
};
263264

264265
enum TrkSelLabel {
@@ -347,7 +348,7 @@ struct PiKpRAA {
347348
// define axes you want to use
348349
const std::string titlePorPt{v0Selections.usePinPhiSelection ? "#it{p} (GeV/#it{c})" : "#it{p}_{T} (GeV/#it{c})"};
349350
const AxisSpec axisZpos{binsZpos, "Vtx_{z} (cm)"};
350-
const AxisSpec axisEvent{15, 0.5, 15.5, ""};
351+
const AxisSpec axisEvent{17, 0.5, 17.5, ""};
351352
const AxisSpec axisNcl{161, -0.5, 160.5, "#it{N}_{cl} TPC"};
352353
const AxisSpec axisPt{binsPt, "#it{p}_{T} (GeV/#it{c})"};
353354
const AxisSpec axisPtV0s{binsPtV0s, "#it{p}_{T} (GeV/#it{c})"};
@@ -381,6 +382,7 @@ struct PiKpRAA {
381382
x->SetBinLabel(12, "Cent. Sel.");
382383
x->SetBinLabel(13, "VtxZ Sel.");
383384
x->SetBinLabel(14, "Nch Sel.");
385+
x->SetBinLabel(15, "INEL > 0");
384386

385387
if (doprocessCalibrationAndV0s) {
386388
registry.add("NchVsNPV", ";Nch; NPV;", kTH2F, {{{nBinsNPV, minNpv, maxNpv}, {nBinsNch, minNch, maxNch}}});
@@ -553,6 +555,7 @@ struct PiKpRAA {
553555

554556
LOG(info) << "\tccdbNoLaterThan=" << ccdbNoLaterThan.value;
555557
LOG(info) << "\tapplyNchSel=" << applyNchSel.value;
558+
LOG(info) << "\tisINELgt0=" << isINELgt0.value;
556559
LOG(info) << "\tdetector4Calibration=" << detector4Calibration.value;
557560
LOG(info) << "\tv0TypeSelection=" << static_cast<int>(v0Selections.v0TypeSelection);
558561
LOG(info) << "\tselElecFromGammas=" << v0Selections.selElecFromGammas;
@@ -1366,6 +1369,41 @@ struct PiKpRAA {
13661369
void processSim(aod::McCollisions::iterator const& mccollision, soa::SmallGroups<ColEvSelsMC> const& collisions, BCsRun3 const& /*bcs*/, aod::FT0s const& /*ft0s*/, aod::McParticles const& mcParticles, TracksMC const& tracksMC)
13671370
{
13681371

1372+
// Only INEL > 0 generated collisions
1373+
// By counting number of primary charged particles in |eta| < 1
1374+
if (isINELgt0) {
1375+
int nChMC{0};
1376+
for (const auto& particle : mcParticles) {
1377+
1378+
if (std::abs(particle.eta()) > kOne)
1379+
continue;
1380+
1381+
auto charge{0.};
1382+
// Get the MC particle
1383+
const auto* pdgParticle = pdg->GetParticle(particle.pdgCode());
1384+
if (pdgParticle != nullptr) {
1385+
charge = pdgParticle->Charge();
1386+
} else {
1387+
continue;
1388+
}
1389+
1390+
// Is it a charged particle?
1391+
if (std::abs(charge) < kMinCharge)
1392+
continue;
1393+
1394+
// Is it a primary particle?
1395+
if (!particle.isPhysicalPrimary())
1396+
continue;
1397+
1398+
nChMC++;
1399+
}
1400+
1401+
// Only INEL > 0 generated events
1402+
if (!(nChMC > kZeroInt)) {
1403+
return;
1404+
}
1405+
}
1406+
13691407
const auto& nRecColls{collisions.size()};
13701408

13711409
registry.fill(HIST("NumberOfRecoCollisions"), nRecColls);
@@ -1425,11 +1463,12 @@ struct PiKpRAA {
14251463

14261464
auto charge{0.};
14271465
// Get the MC particle
1428-
auto* pdgParticle = pdg->GetParticle(particle.pdgCode());
1429-
if (pdgParticle != nullptr)
1466+
const auto* pdgParticle = pdg->GetParticle(particle.pdgCode());
1467+
if (pdgParticle != nullptr) {
14301468
charge = pdgParticle->Charge();
1431-
else
1469+
} else {
14321470
continue;
1471+
}
14331472

14341473
// Is it a charged particle?
14351474
if (std::abs(charge) < kMinCharge)
@@ -2141,6 +2180,13 @@ struct PiKpRAA {
21412180
registry.fill(HIST("EventCounter"), EvCutLabel::VtxZ);
21422181
}
21432182

2183+
if (isINELgt0) {
2184+
if (!col.isInelGt0()) {
2185+
return false;
2186+
}
2187+
registry.fill(HIST("EventCounter"), EvCutLabel::INELgt0);
2188+
}
2189+
21442190
return true;
21452191
}
21462192

0 commit comments

Comments
 (0)