Skip to content

Commit 2030106

Browse files
authored
Update PiNucleiFemto.cxx
1 parent 90e0f31 commit 2030106

File tree

1 file changed

+25
-20
lines changed

1 file changed

+25
-20
lines changed

PWGCF/Femto/FemtoNuclei/TableProducer/PiNucleiFemto.cxx

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ struct PiNucandidate {
104104
std::array<float, 3> momNu = {99.f, 99.f, 99.f};
105105
std::array<float, 3> momPi = {99.f, 99.f, 99.f};
106106

107+
float ptHe3 = 1.f;
108+
float etaHe3 = 1.f;
107109
float signNu = 1.f;
108110
float signPi = 1.f;
109111
float invMass = -10.f;
@@ -159,6 +161,8 @@ struct PiNucleiFemto {
159161
Configurable<float> settingCutPtMinDePi{"settingCutPtMinDePi", 0.0f, "Minimum PT cut on DePi4"};
160162
Configurable<float> settingCutClSizeItsDe{"settingCutClSizeItsDe", 4.0f, "Minimum ITS cluster size for De"};
161163
Configurable<float> settingCutNCls{"settingCutNCls", 5.0f, "Minimum ITS Ncluster for tracks"};
164+
Configurable<float> settingCutTPCChi2He{"settingCutTPCChi2He", 0.0f, "Minimum tpcChi2He for Hyper He3"};
165+
Configurable<float> settingCutAverClsSizeHe{"settingCutAverClsSizeHe", 0.0f, "Minimum averClusSizeHe for Hyper He3"};
162166
Configurable<float> settingCutChi2NClITS{"settingCutChi2NClITS", 999.f, "Maximum ITS Chi2 for tracks"};
163167
Configurable<float> settingCutNsigmaTPCPi{"settingCutNsigmaTPCPi", 3.0f, "Value of the TPC Nsigma cut on Pi"};
164168
Configurable<float> settingCutNsigmaTPCDe{"settingCutNsigmaTPCDe", 2.5f, "Value of the TPC Nsigma cut on De"};
@@ -231,7 +235,7 @@ struct PiNucleiFemto {
231235
"QA",
232236
{{"hVtxZ", "Vertex distribution in Z;Z (cm)", {HistType::kTH1F, {{400, -20.0, 20.0}}}},
233237
{"hNcontributor", "Number of primary vertex contributor", {HistType::kTH1F, {{2000, 0.0f, 2000.0f}}}},
234-
{"hCentrality", "Centrality", {HistType::kTH1F, {{200, 0.0f, 100.0f}}}},
238+
{"hCentrality", "Centrality", {HistType::kTH1F, {{100, 0.0f, 100.0f}}}},
235239
{"hTrackSel", "Accepted tracks", {HistType::kTH1F, {{Selections::kAll, -0.5, static_cast<double>(Selections::kAll) - 0.5}}}},
236240
{"hEvents", "; Events;", {HistType::kTH1F, {{3, -0.5, 2.5}}}},
237241
{"hEmptyPool", "svPoolCreator did not find track pairs false/true", {HistType::kTH1F, {{2, -0.5, 1.5}}}},
@@ -562,15 +566,15 @@ struct PiNucleiFemto {
562566
bool selectionPIDHyper(const aod::DataHypCandsWColl::iterator& V0Hyper)
563567
{
564568
mQaRegistry.fill(HIST("hHe3P_preselected"), V0Hyper.tpcMomHe());
565-
/*float averClusSizeHe = averageClusterSizeCosl(V0Hyper.itsClusterSizesHe(), V0Hyper.etaHe3());
566-
if (averClusSizeHe <= 4) {
569+
float averClusSizeHe = averageClusterSizeCosl(V0Hyper.itsClusterSizesHe(), V0Hyper.etaHe3());
570+
if (averClusSizeHe <= settingCutAverClsSizeHe) {
567571
return false;
568572
}
569-
if (V0Hyper.tpcChi2He() <= 0.5) {
573+
if (V0Hyper.tpcChi2He() <= settingCutTPCChi2He) {
570574
return false;
571575
}
572576
mQaRegistry.fill(HIST("hHe3P"), V0Hyper.tpcMomHe());
573-
mQaRegistry.fill(HIST("hHe3TPCnsigma"), V0Hyper.nSigmaHe());*/
577+
mQaRegistry.fill(HIST("hHe3TPCnsigma"), V0Hyper.ptHe3(), V0Hyper.nSigmaHe());
574578

575579
return true;
576580
}
@@ -697,7 +701,7 @@ struct PiNucleiFemto {
697701
// constexpr double mHe3 = o2::constants::physics::MassHelium3;
698702
// constexpr double mPi = o2::constants::physics::MassPiPlus;
699703
// --- He3
700-
float pxHe3 = V0Hyper.ptHe3() * std::cos(V0Hyper.phiHe3());
704+
float pxHe3 = V0Hyper.ptHe3() * std::cos(V0Hyper.phiHe3());
701705
float pyHe3 = V0Hyper.ptHe3() * std::sin(V0Hyper.phiHe3());
702706
float pzHe3 = V0Hyper.ptHe3() * std::sinh(V0Hyper.etaHe3());
703707
// float pHe3 = V0Hyper.ptHe3() * std::cosh(V0Hyper.etaHe3());
@@ -720,18 +724,15 @@ struct PiNucleiFemto {
720724
if (settingCutInvMass > 0 && invMass > settingCutInvMass) {
721725
return false;
722726
}
723-
float ptDePi = std::hypot(piHypercand.momNu[0] + piHypercand.momPi[0], piHypercand.momNu[1] + piHypercand.momPi[1]);
724-
if (ptDePi < settingCutPtMinDePi) {
725-
return false;
726-
}
727-
727+
728728
piHypercand.signPi = trackPi.sign();
729729
if (V0Hyper.isMatter()) {
730730
piHypercand.signNu = 1;
731731
} else {
732732
piHypercand.signNu = -1;
733733
}
734-
734+
piHypercand.etaHe3 = V0Hyper.etaHe3();
735+
piHypercand.ptHe3 = V0Hyper.ptHe3();
735736
piHypercand.dcaxyPi = trackPi.dcaXY();
736737
piHypercand.dcazPi = trackPi.dcaZ();
737738
piHypercand.tpcSignalPi = trackPi.tpcSignal();
@@ -753,6 +754,7 @@ struct PiNucleiFemto {
753754

754755
piHypercand.trackIDPi = trackPi.globalIndex();
755756

757+
756758
if (trackPi.hasTOF()) {
757759
float beta = o2::pid::tof::Beta::GetBeta(trackPi);
758760
beta = std::min(1.f - 1.e-6f, std::max(1.e-4f, beta)); /// sometimes beta > 1 or < 0, to be checked
@@ -830,8 +832,8 @@ struct PiNucleiFemto {
830832
mQaRegistry.fill(HIST("hTrackSel"), Selections::kPID);
831833

832834
SVCand pair;
833-
pair.tr0Idx = piTrack.globalIndex();
834-
pair.tr1Idx = V0Hyper.globalIndex();
835+
pair.tr0Idx = V0Hyper.globalIndex();
836+
pair.tr1Idx = piTrack.globalIndex();
835837
const int collIdx = V0Hyper.collisionId();
836838
CollBracket collBracket{collIdx, collIdx};
837839
pair.collBracket = collBracket;
@@ -935,6 +937,8 @@ struct PiNucleiFemto {
935937
mOutputHyperDataTable(
936938
piNucand.recoPtNu(),
937939
piNucand.recoEtaNu(),
940+
piNucand.ptHe3,
941+
piNucand.etaHe3,
938942
piNucand.recoPhiNu(),
939943
piNucand.recoPtPi(),
940944
piNucand.recoEtaPi(),
@@ -1089,14 +1093,15 @@ struct PiNucleiFemto {
10891093
{
10901094
for (const auto& trackPair : mTrackHypPairs) {
10911095

1092-
auto v0hyper = V0Hypers.rawIteratorAt(trackPair.tr1Idx);
1093-
auto piTrack = piTracks.rawIteratorAt(trackPair.tr0Idx);
1096+
auto v0hyper = V0Hypers.rawIteratorAt(trackPair.tr0Idx);
1097+
auto piTrack = piTracks.rawIteratorAt(trackPair.tr1Idx);
10941098
// auto collBracket = trackPair.collBracket;
10951099

10961100
PiNucandidate piNucand;
1097-
if (!fillCandidateInfoHyper(v0hyper, piTrack, piNucand, isMixedEvent)) {
1101+
if (!fillCandidateInfoHyper(v0hyper, piTrack, piNucand, isMixedEvent)) {
10981102
continue;
10991103
}
1104+
11001105
mQaRegistry.fill(HIST("hNuPt"), piNucand.recoPtNu());
11011106
mQaRegistry.fill(HIST("hPiPt"), piNucand.recoPtPi());
11021107
mQaRegistry.fill(HIST("hNuEta"), piNucand.recoEtaNu());
@@ -1220,14 +1225,15 @@ PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", fal
12201225

12211226
void processMixedEventHyperPool(const CollisionsFull& collisions, o2::aod::DataHypCandsWColl const& V0Hypers, const TrackCandidates& pitracks)
12221227
{
1223-
LOG(info) << "Processing mixed event for hypertriton";
1224-
12251228
mTrackHypPairs.clear();
12261229
if (!isInitialized) {
12271230
initializePools();
12281231
LOG(info) << "Initialized event pool with size = " << All_Event_pool.size();
12291232
}
12301233
for (auto const& collision : collisions) {
1234+
mQaRegistry.fill(HIST("hNcontributor"), collision.numContrib());
1235+
mQaRegistry.fill(HIST("hCentrality"), collision.centFT0C());
1236+
mQaRegistry.fill(HIST("hVtxZ"), collision.posZ());
12311237
int poolIndexPi = where_pool(collision.posZ(), collision.centFT0C());
12321238
auto& pool = All_Event_pool[poolIndexPi];
12331239

@@ -1247,7 +1253,6 @@ PROCESS_SWITCH(PiNucleiFemto, processMixedEventHyper, "Process Mixed event", fal
12471253
tracks1.push_back(t);
12481254
}
12491255
}
1250-
12511256
std::vector<o2::aod::DataHypCandsWColl::iterator> hypers2;
12521257
for (auto const& h : V0Hypers) {
12531258
if (h.collisionId() != c2.globalIndex())

0 commit comments

Comments
 (0)