Skip to content

Commit 2008c1f

Browse files
authored
Update HadNucleiFemto.cxx
1 parent 434eef5 commit 2008c1f

File tree

1 file changed

+41
-19
lines changed

1 file changed

+41
-19
lines changed

PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ enum Selections {
9292
kAll
9393
};
9494

95-
float MassHad = 0;
95+
float MassHad = 0;
9696

9797
} // namespace
9898

@@ -199,8 +199,10 @@ struct HadNucleiFemto {
199199
Configurable<float> settingCutHadDCAxyMin{"settingCutHadDCAxyMin", 0.3f, "DCAxy Min for Had"};
200200
Configurable<float> settingCutHadDCAzMin{"settingCutHadDCAzMin", 0.3f, "DCAz Min for Had"};
201201
Configurable<float> settingCutDeDCAzMin{"settingCutDeDCAzMin", 0.2f, "DCAxy Min for De"};
202-
Configurable<float> settingCutNsigTPCPrMin{"settingCutNsigTPCPrMin", 3.0f, "Minimum TPC Pr Nsigma cut on Pi"};
203-
Configurable<float> settingCutNsigTOFPrMin{"settingCutNsigTOFPrMin", 3.0f, "Minimum TOF Pr Nsigma cut on Pi"};
202+
Configurable<float> settingCutNsigTPCPrMin{"settingCutNsigTPCPrMin", 3.0f, "Minimum TPC Pr Nsigma cut for rejection"};
203+
Configurable<float> settingCutNsigTPCPiMin{"settingCutNsigTPCPiMin", 3.0f, "Minimum TPC Pi Nsigma cut for rejection"};
204+
Configurable<float> settingCutNsigTOFPrMin{"settingCutNsigTOFPrMin", 3.0f, "Minimum TOF Pr Nsigma cut for rejection"};
205+
Configurable<float> settingCutNsigTOFPiMin{"settingCutNsigTOFPiMin", 3.0f, "Minimum TOF Pi Nsigma cut for rejection"};
204206

205207
Configurable<bool> settingSaveUSandLS{"settingSaveUSandLS", true, "Save All Pairs"};
206208
Configurable<bool> settingFillMultiplicity{"settingFillMultiplicity", false, "Fill multiplicity table"};
@@ -278,6 +280,7 @@ struct HadNucleiFemto {
278280
{"hNuPhi", "phi distribution; phi(Nu)", {HistType::kTH1F, {{600, -4.0f, 4.0f}}}},
279281
{"hHadPhi", "phi distribution; phi(had)", {HistType::kTH1F, {{600, -4.0f, 4.0f}}}},
280282
{"h2dEdxNucandidates", "dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {100, 0.0f, 2000.0f}}}},
283+
{"h2dEdxHadcandidates", "dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {100, 0.0f, 2000.0f}}}},
281284
{"h2dEdx", "dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {100, 0.0f, 2000.0f}}}},
282285
{"h2NsigmaNuTPC", "NsigmaNu TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(Nu)", {HistType::kTH2F, {{100, -2.0f, 2.0f}, {200, -5.0f, 5.0f}}}},
283286
{"h2NsigmaNuComb", "NsigmaNu TPCTOF comb distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{comb}(Nu)", {HistType::kTH2F, {{100, -2.0f, 2.0f}, {100, 0.0f, 5.0f}}}},
@@ -306,7 +309,9 @@ struct HadNucleiFemto {
306309
{"hkStar_US_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
307310
{"hkStar_US_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}},
308311
{"h2NsigmaHadPrTPC", "NsigmaHad TPC distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}},
312+
{"h2NsigmaHadPiTPC", "NsigmaHad TPC distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(pi)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}},
309313
{"h2NsigmaHadPrTOF", "NsigmaHad TOF distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(p)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}},
314+
{"h2NsigmaHadPiTOF", "NsigmaHad TOF distribution; #it{p}_{T}(GeV/#it{c}); n#sigma_{TPC}(pi)", {HistType::kTH1F, {{200, -5.0f, 5.0f}}}},
310315
{"hisBkgEM", "; isBkgEM;", {HistType::kTH1F, {{3, -1, 2}}}}},
311316
OutputObjHandlingPolicy::AnalysisObject,
312317
false,
@@ -502,6 +507,19 @@ struct HadNucleiFemto {
502507
if (std::abs(candidate.pt()) < settingCutHadptMin || std::abs(candidate.pt()) > settingCutHadptMax)
503508
return false;
504509

510+
// reject protons and pions
511+
if (std::abs(candidate.tpcNSigmaPr()) < settingCutNsigTPCPrMin || std::abs(candidate.tpcNSigmaPi()) < settingCutNsigTPCPiMin)
512+
return false;
513+
mQaRegistry.fill(HIST("h2NsigmaHadPrTPC"), candidate.tpcNSigmaPr());
514+
mQaRegistry.fill(HIST("h2NsigmaHadPiTPC"), candidate.tpcNSigmaPi());
515+
if (candidate.hasTOF() && std::abs(candidate.tofNSigmaPr()) < settingCutNsigTOFPrMin)
516+
return false;
517+
if (candidate.hasTOF() && std::abs(candidate.tofNSigmaPi()) < settingCutNsigTOFPiMin)
518+
return false;
519+
mQaRegistry.fill(HIST("h2NsigmaHadPrTOF"), candidate.tofNSigmaPr());
520+
mQaRegistry.fill(HIST("h2NsigmaHadPiTOF"), candidate.tofNSigmaPi());
521+
// rejection end
522+
505523
if (candidate.hasTOF() && candidate.tpcInnerParam() >= settingCutPinMinTOFHad) {
506524
auto tofNSigmaKa = candidate.tofNSigmaKa();
507525

@@ -514,12 +532,14 @@ struct HadNucleiFemto {
514532
}
515533
mQaRegistry.fill(HIST("h2NsigmaHadTPC"), candidate.sign() * candidate.pt(), tpcNSigmaKa);
516534
mQaRegistry.fill(HIST("h2NsigmaHadTOF"), candidate.sign() * candidate.pt(), tofNSigmaKa);
535+
mQaRegistry.fill(HIST("h2dEdxHadcandidates"), candidate.sign() * candidate.tpcInnerParam(), candidate.tpcSignal());
517536
return true;
518537
} else if (candidate.tpcInnerParam() < settingCutPinMinTOFHad) {
519538
if (std::abs(tpcNSigmaKa) > settingCutNsigmaTPCHad) {
520539
return false;
521540
}
522541
mQaRegistry.fill(HIST("h2NsigmaHadTPC"), candidate.sign() * candidate.pt(), tpcNSigmaKa);
542+
mQaRegistry.fill(HIST("h2dEdxHadcandidates"), candidate.sign() * candidate.tpcInnerParam(), candidate.tpcSignal());
523543
return true;
524544
}
525545
return false;
@@ -550,9 +570,9 @@ struct HadNucleiFemto {
550570
auto combNsigma = std::sqrt(tofNSigmaPi * tofNSigmaPi + tpcNSigmaPi * tpcNSigmaPi);
551571

552572
mQaRegistry.fill(HIST("h2NsigmaHadTOF_preselection"), candidate.pt(), tofNSigmaPi);
553-
// if (combNsigma > settingCutNsigmaTOFTPCHad) {
554-
// return false;
555-
// }
573+
//if (combNsigma > settingCutNsigmaTOFTPCHad) {
574+
// return false;
575+
//}
556576
if (std::abs(tofNSigmaPi) > settingCutNsigmaTOFHad) {
557577
return false;
558578
}
@@ -562,12 +582,14 @@ struct HadNucleiFemto {
562582
mQaRegistry.fill(HIST("h2NsigmaHadTPC"), candidate.sign() * candidate.pt(), tpcNSigmaPi);
563583
mQaRegistry.fill(HIST("h2NsigmaHadTOF"), candidate.sign() * candidate.pt(), tofNSigmaPi);
564584
mQaRegistry.fill(HIST("h2NsigmaHadComb"), candidate.sign() * candidate.pt(), combNsigma);
585+
mQaRegistry.fill(HIST("h2dEdxHadcandidates"), candidate.sign() * candidate.tpcInnerParam(), candidate.tpcSignal());
565586
return true;
566587
} else if (candidate.tpcInnerParam() < settingCutPinMinTOFHad) {
567588
if (std::abs(tpcNSigmaPi) > settingCutNsigmaTPCHad) {
568589
return false;
569590
}
570591
mQaRegistry.fill(HIST("h2NsigmaHadTPC"), candidate.sign() * candidate.pt(), tpcNSigmaPi);
592+
mQaRegistry.fill(HIST("h2dEdxHadcandidates"), candidate.sign() * candidate.tpcInnerParam(), candidate.tpcSignal());
571593
return true;
572594
}
573595
return false;
@@ -576,17 +598,17 @@ struct HadNucleiFemto {
576598
template <typename Ttrack>
577599
bool selectionPIDHadron(const Ttrack& candidate)
578600
{
579-
bool PID = false;
580-
if (settingHadPDGCode == PDG_t::kPiPlus) {
581-
PID = selectionPIDPion(candidate);
582-
MassHad = o2::constants::physics::MassPiPlus;
583-
} else if (settingHadPDGCode == PDG_t::kKPlus) {
584-
PID = selectionPIDKaon(candidate);
585-
MassHad = o2::constants::physics::MassKPlus;
586-
} else {
587-
LOG(info) << "invalid PDG code";
588-
}
589-
return PID;
601+
bool PID = false;
602+
if (settingHadPDGCode == PDG_t::kPiPlus) {
603+
PID = selectionPIDPion(candidate);
604+
MassHad = o2::constants::physics::MassPiPlus;
605+
} else if (settingHadPDGCode == PDG_t::kKPlus) {
606+
PID = selectionPIDKaon(candidate);
607+
MassHad = o2::constants::physics::MassKPlus;
608+
} else {
609+
LOG(info) << "invalid PDG code";
610+
}
611+
return PID;
590612
}
591613

592614
template <typename Ttrack>
@@ -738,7 +760,7 @@ struct HadNucleiFemto {
738760
hadNucand.momNu = std::array{trackDe.px(), trackDe.py(), trackDe.pz()};
739761
hadNucand.momHad = std::array{trackHad.px(), trackHad.py(), trackHad.pz()};
740762
float invMass = 0;
741-
invMass = RecoDecay::m(std::array<std::array<float, 3>, 2>{hadNucand.momNu, hadNucand.momHad}, std::array<float, 2>{static_cast<float>(o2::constants::physics::MassDeuteron), MassHad});
763+
invMass = RecoDecay::m(std::array<std::array<float, 3>, 2>{hadNucand.momNu,hadNucand.momHad}, std::array<float, 2>{static_cast<float>(o2::constants::physics::MassDeuteron),MassHad});
742764
if (settingCutInvMass > 0 && invMass > settingCutInvMass) {
743765
mQaRegistry.fill(HIST("hSkipReasons"), 3);
744766
return false;
@@ -835,7 +857,7 @@ struct HadNucleiFemto {
835857
hadHypercand.momHad = std::array{trackHad.px(), trackHad.py(), trackHad.pz()};
836858

837859
float invMass = 0;
838-
invMass = RecoDecay::m(std::array<std::array<float, 3>, 2>{hadHypercand.momNu, hadHypercand.momHad}, std::array<float, 2>{static_cast<float>(o2::constants::physics::MassHelium3), MassHad});
860+
invMass = RecoDecay::m(std::array<std::array<float, 3>, 2>{hadHypercand.momNu,hadHypercand.momHad}, std::array<float, 2>{static_cast<float>(o2::constants::physics::MassHelium3),MassHad});
839861
if (settingCutInvMass > 0 && invMass > settingCutInvMass) {
840862
return false;
841863
}

0 commit comments

Comments
 (0)