From 2caae8be17b004c7c0068830db4a1ea23bf9bfe4 Mon Sep 17 00:00:00 2001 From: jesgum Date: Thu, 21 Aug 2025 14:50:31 +0200 Subject: [PATCH 1/2] Update fasttracker and mcharm histograms --- ALICE3/Core/FastTracker.cxx | 30 ++++++++++++++++++- ALICE3/Core/FastTracker.h | 3 ++ .../TableProducer/alice3-multicharmTable.cxx | 17 ++++++++++- ALICE3/Tasks/alice3-multicharm.cxx | 16 ++++++---- 4 files changed, 58 insertions(+), 8 deletions(-) diff --git a/ALICE3/Core/FastTracker.cxx b/ALICE3/Core/FastTracker.cxx index 15ac7939af2..8d59501d3be 100644 --- a/ALICE3/Core/FastTracker.cxx +++ b/ALICE3/Core/FastTracker.cxx @@ -144,6 +144,34 @@ void FastTracker::AddSiliconALICE3v2(std::vector pixelResolution) AddLayer("B10", 80., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1); } +void FastTracker::AddSiliconALICE3(std::vector pixelResolution) +{ + float x0IT = 0.001; // 0.1% + float x0OT = 0.01; // 1.0% + float xrhoIB = 2.3292e-02; // 100 mum Si + float xrhoOT = 2.3292e-01; // 1000 mum Si + float eff = 1.00; + + float resRPhiIT = pixelResolution[0]; + float resZIT = pixelResolution[1]; + float resRPhiOT = pixelResolution[2]; + float resZOT = pixelResolution[3]; + + AddLayer("bpipe0", 0.48, 250, 0.00042, 2.772e-02, 0.0f, 0.0f, 0.0f, 0); // 150 mum Be + AddLayer("B00", 0.5, 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1); + AddLayer("B01", 1.2, 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1); + AddLayer("B02", 2.5, 250, x0IT, xrhoIB, resRPhiIT, resZIT, eff, 1); + AddLayer("bpipe1", 3.7, 250, 0.0014, 9.24e-02, 0.0f, 0.0f, 0.0f, 0); // 500 mum Be + AddLayer("B03", 7., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1); + AddLayer("B04", 9., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1); + AddLayer("B05", 12., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1); + AddLayer("B06", 20., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1); + AddLayer("B07", 30., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1); + AddLayer("B08", 45., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1); + AddLayer("B09", 60., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1); + AddLayer("B10", 80., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1); +} + void FastTracker::AddTPC(float phiResMean, float zResMean) { LOG(info) << " Adding standard time projection chamber"; @@ -307,7 +335,7 @@ int FastTracker::FastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa break; } } - if (firstActiveLayer <= 0) { + if (firstActiveLayer < 0) { LOG(fatal) << "No active layers found in FastTracker, check layer setup"; return -2; // no active layers } diff --git a/ALICE3/Core/FastTracker.h b/ALICE3/Core/FastTracker.h index a0dba5d7ec5..c65c3206618 100644 --- a/ALICE3/Core/FastTracker.h +++ b/ALICE3/Core/FastTracker.h @@ -42,9 +42,11 @@ class FastTracker // Layer and layer configuration void AddLayer(TString name, float r, float z, float x0, float xrho, float resRPhi = 0.0f, float resZ = 0.0f, float eff = 0.0f, int type = 0); DetLayer GetLayer(const int layer, bool ignoreBarrelLayers = true) const; + std::vector GetLayers() const { return layers; } int GetLayerIndex(const std::string& name) const; size_t GetNLayers() const { return layers.size(); } bool IsLayerInert(const int layer) const { return layers[layer].isInert(); } + void ClearLayers() { layers.clear(); } void SetRadiationLength(const std::string layerName, float x0) { layers[GetLayerIndex(layerName)].setRadiationLength(x0); } void SetRadius(const std::string layerName, float r) { layers[GetLayerIndex(layerName)].setRadius(r); } void SetResolutionRPhi(const std::string layerName, float resRPhi) { layers[GetLayerIndex(layerName)].setResolutionRPhi(resRPhi); } @@ -57,6 +59,7 @@ class FastTracker void AddSiliconALICE3v4(std::vector pixelResolution); void AddSiliconALICE3v2(std::vector pixelResolution); + void AddSiliconALICE3(std::vector pixelResolution); void AddTPC(float phiResMean, float zResMean); void Print(); diff --git a/ALICE3/TableProducer/alice3-multicharmTable.cxx b/ALICE3/TableProducer/alice3-multicharmTable.cxx index f667b5dcd0a..8d9ea9d43dd 100644 --- a/ALICE3/TableProducer/alice3-multicharmTable.cxx +++ b/ALICE3/TableProducer/alice3-multicharmTable.cxx @@ -161,7 +161,8 @@ struct alice3multicharmTable { Partition tracksPiFromXiC = ((aod::a3DecayMap::decayMap & trackSelectionPiFromXiC) == trackSelectionPiFromXiC) && aod::track::signed1Pt > 0.0f && 1.0f / nabs(aod::track::signed1Pt) > minPiCPt&& nabs(aod::track::dcaXY) > piFromXiC_dcaXYconstant + piFromXiC_dcaXYpTdep* nabs(aod::track::signed1Pt) && nabs(aod::track::dcaZ) > piFromXiC_dcaZconstant + piFromXiC_dcaZpTdep* nabs(aod::track::signed1Pt); - Partition tracksPiFromXiCC = ((aod::a3DecayMap::decayMap & trackSelectionPiFromXiCC) == trackSelectionPiFromXiCC) && aod::track::signed1Pt > 0.0f && 1.0f / nabs(aod::track::signed1Pt) > minPiCCPt&& nabs(aod::track::dcaXY) > piFromXiCC_dcaXYconstant + piFromXiCC_dcaXYpTdep* nabs(aod::track::signed1Pt); + Partition tracksPiFromXiCC = + ((aod::a3DecayMap::decayMap & trackSelectionPiFromXiCC) == trackSelectionPiFromXiCC) && aod::track::signed1Pt > 0.0f && 1.0f / nabs(aod::track::signed1Pt) > minPiCCPt&& nabs(aod::track::dcaXY) > piFromXiCC_dcaXYconstant + piFromXiCC_dcaXYpTdep* nabs(aod::track::signed1Pt) && nabs(aod::track::dcaZ) > piFromXiCC_dcaZconstant + piFromXiCC_dcaZpTdep* nabs(aod::track::signed1Pt); // Helper struct to pass candidate information struct { @@ -440,6 +441,13 @@ struct alice3multicharmTable { histos.add("hPi2cPt", "hPi2cPt", kTH1D, {axisPt}); histos.add("hPiccPt", "hPiccPt", kTH1D, {axisPt}); + histos.add("hPi1cDCAxy", "hPi1cDCAxy", kTH1D, {axisDCA}); + histos.add("hPi1cDCAz", "hPi1cDCAz", kTH1D, {axisDCA}); + histos.add("hPi2cDCAxy", "hPi2cDCAxy", kTH1D, {axisDCA}); + histos.add("hPi2cDCAz", "hPi2cDCAz", kTH1D, {axisDCA}); + histos.add("hPiccDCAxy", "hPiccDCAxy", kTH1D, {axisDCA}); + histos.add("hPiccDCAz", "hPiccDCAz", kTH1D, {axisDCA}); + histos.add("hMinXiDecayRadius", "hMinXiDecayRadius", kTH1D, {axisRadius2DXi}); histos.add("hMinXiCDecayRadius", "hMinXiCDecayRadius", kTH1D, {axisRadius}); histos.add("hMinXiCCDecayRadius", "hMinXiCCDecayRadius", kTH1D, {axisRadius}); @@ -774,6 +782,13 @@ struct alice3multicharmTable { piFromLa.pt(), piFromLa.eta(), piFromLa.dcaXY(), piFromLa.dcaZ(), pi1c.eta(), pi2c.eta(), picc.eta()); + + histos.fill(HIST("hPi1cDCAxy"), std::abs(pi1c.dcaXY() * 1e+4)); + histos.fill(HIST("hPi1cDCAz"), std::abs(pi1c.dcaZ() * 1e+4)); + histos.fill(HIST("hPi2cDCAxy"), std::abs(pi2c.dcaXY() * 1e+4)); + histos.fill(HIST("hPi2cDCAz"), std::abs(pi2c.dcaZ() * 1e+4)); + histos.fill(HIST("hPiccDCAxy"), std::abs(picc.dcaXY() * 1e+4)); + histos.fill(HIST("hPiccDCAz"), std::abs(picc.dcaZ() * 1e+4)); } } histos.fill(HIST("hCombinationsXiCC"), nCombinationsCC); diff --git a/ALICE3/Tasks/alice3-multicharm.cxx b/ALICE3/Tasks/alice3-multicharm.cxx index 088a3b5c1f6..88faae8428e 100644 --- a/ALICE3/Tasks/alice3-multicharm.cxx +++ b/ALICE3/Tasks/alice3-multicharm.cxx @@ -157,6 +157,10 @@ struct alice3multicharm { histos.add("SelectionQA/hPi2cPt", "hPi2cPt; Pi2c pT (Gev/#it(c))", kTH1D, {axisPt}); histos.add("SelectionQA/hPiccPt", "hPiccPt; Picc pT (Gev/#it(c))", kTH1D, {axisPt}); + histos.add("Debugging/hPi1cDCAz", "hPi1cDCAz", kTH1D, {axisDCA}); + histos.add("Debugging/hPi2cDCAz", "hPi1cDCAz", kTH1D, {axisDCA}); + histos.add("Debugging/hPiccDCAz", "hPi1cDCAz", kTH1D, {axisDCA}); + auto hMCharmBuilding = histos.add("hMCharmBuilding", "hMCharmBuilding", kTH1D, {{22, -0.5, 21.5}}); hMCharmBuilding->GetXaxis()->SetBinLabel(1, "nTotalCandidates"); hMCharmBuilding->GetXaxis()->SetBinLabel(2, "xicMaxDauDCA"); @@ -254,7 +258,7 @@ struct alice3multicharm { histos.add("hBDTScoreVsXiccMass", "hBDTScoreVsXiccMass", kTH2D, {axisXiccMass, axisBDTScore}); histos.add("hBDTScoreVsXiccPt", "hBDTScoreVsXiccPt", kTH2D, {axisXiccMass, axisPt}); for (const auto& score : bdt.requiredScores.value) { - histPath = std::format("MLQA/RequiredBDTScore_{}/", static_cast(score * 100)); + histPath = std::format("MLQA/RequiredBDTScore_{}/", static_cast(score * 10000)); histPointers.insert({histPath + "hDCAXicDaughters", histos.add((histPath + "hDCAXicDaughters").c_str(), "hDCAXicDaughters", {kTH1D, {{axisDcaDaughters}}})}); histPointers.insert({histPath + "hDCAXiccDaughters", histos.add((histPath + "hDCAXiccDaughters").c_str(), "hDCAXiccDaughters", {kTH1D, {{axisDcaDaughters}}})}); histPointers.insert({histPath + "hDCAxyXi", histos.add((histPath + "hDCAxyXi").c_str(), "hDCAxyXi", {kTH1D, {{axisDCA}}})}); @@ -327,7 +331,7 @@ struct alice3multicharm { for (const auto& requiredScore : bdt.requiredScores.value) { if (bdtScore > requiredScore) { - histPath = std::format("MLQA/RequiredBDTScore_{}/", static_cast(requiredScore * 100)); + histPath = std::format("MLQA/RequiredBDTScore_{}/", static_cast(requiredScore * 10000)); getHist(TH1, histPath + "hDCAXicDaughters")->Fill(xiccCand.xicDauDCA() * 1e+4); getHist(TH1, histPath + "hDCAXiccDaughters")->Fill(xiccCand.xiccDauDCA() * 1e+4); getHist(TH1, histPath + "hDCAxyXi")->Fill(std::fabs(xiccCand.xiDCAxy() * 1e+4)); @@ -347,13 +351,13 @@ struct alice3multicharm { getHist(TH1, histPath + "hPi2cDCAz")->Fill(xiccCand.pi2cDCAz() * 1e+4); getHist(TH1, histPath + "hPiccDCAxy")->Fill(xiccCand.piccDCAxy() * 1e+4); getHist(TH1, histPath + "hPiccDCAz")->Fill(xiccCand.piccDCAz() * 1e+4); - getHist(TH1, histPath + "hPi1cDCAz")->Fill(xiccCand.pi1cPt()); - getHist(TH1, histPath + "hPi2cDCAz")->Fill(xiccCand.pi2cPt()); - getHist(TH1, histPath + "hPiccDCAz")->Fill(xiccCand.piccPt()); + getHist(TH1, histPath + "hPi1cPt")->Fill(xiccCand.pi1cPt()); + getHist(TH1, histPath + "hPi2cPt")->Fill(xiccCand.pi2cPt()); + getHist(TH1, histPath + "hPiccPt")->Fill(xiccCand.piccPt()); getHist(TH1, histPath + "hXiccMass")->Fill(xiccCand.xiccMass()); getHist(TH1, histPath + "hXicMass")->Fill(xiccCand.xicMass()); - getHist(TH1, histPath + "hXiccPt")->Fill(xiccCand.xiccPt()); getHist(TH1, histPath + "hXicPt")->Fill(xiccCand.xicPt()); + getHist(TH1, histPath + "hXiccPt")->Fill(xiccCand.xiccPt()); getHist(TH3, histPath + "h3dXicc")->Fill(xiccCand.xiccPt(), xiccCand.xiccEta(), xiccCand.xiccMass()); } } From bfaa46f6350453bfcfc99278e2060ceb70690550 Mon Sep 17 00:00:00 2001 From: jesgum Date: Thu, 21 Aug 2025 15:03:52 +0200 Subject: [PATCH 2/2] remove unused histograms --- ALICE3/Tasks/alice3-multicharm.cxx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ALICE3/Tasks/alice3-multicharm.cxx b/ALICE3/Tasks/alice3-multicharm.cxx index 88faae8428e..b328fec53f8 100644 --- a/ALICE3/Tasks/alice3-multicharm.cxx +++ b/ALICE3/Tasks/alice3-multicharm.cxx @@ -157,10 +157,6 @@ struct alice3multicharm { histos.add("SelectionQA/hPi2cPt", "hPi2cPt; Pi2c pT (Gev/#it(c))", kTH1D, {axisPt}); histos.add("SelectionQA/hPiccPt", "hPiccPt; Picc pT (Gev/#it(c))", kTH1D, {axisPt}); - histos.add("Debugging/hPi1cDCAz", "hPi1cDCAz", kTH1D, {axisDCA}); - histos.add("Debugging/hPi2cDCAz", "hPi1cDCAz", kTH1D, {axisDCA}); - histos.add("Debugging/hPiccDCAz", "hPi1cDCAz", kTH1D, {axisDCA}); - auto hMCharmBuilding = histos.add("hMCharmBuilding", "hMCharmBuilding", kTH1D, {{22, -0.5, 21.5}}); hMCharmBuilding->GetXaxis()->SetBinLabel(1, "nTotalCandidates"); hMCharmBuilding->GetXaxis()->SetBinLabel(2, "xicMaxDauDCA");