Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion ALICE3/Core/FastTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,34 @@
AddLayer("B10", 80., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1);
}

void FastTracker::AddSiliconALICE3(std::vector<float> 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";
Expand Down Expand Up @@ -176,8 +204,8 @@
for (int i = 0; i < kNPassiveBound; i++) {
AddLayer(Form("tpc_boundary%d", i), rBoundary[i], zLength, radLBoundary[i], xrhoBoundary[i], 0); // dummy errors
}
for (Int_t k = 0; k < tpcRows; k++) {

Check failure on line 207 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
Float_t rowRadius = 0;

Check failure on line 208 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (k < innerRows)
rowRadius = rowOneRadius + k * tpcInnerRadialPitch;
else if (k >= innerRows && k < (innerRows + middleRows))
Expand All @@ -204,7 +232,7 @@
index = 1;
z0 = -4 * sigmaD + i * dz0;
dist += index * (dz0 / 3.) * (1 / o2::math_utils::sqrt(o2::constants::math::TwoPI) / sigmaD) * std::exp(-z0 * z0 / 2. / sigmaD / sigmaD) * (1 / o2::math_utils::sqrt((z - z0) * (z - z0) + r * r));
if (index != 4)

Check failure on line 235 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
index = 4;
else
index = 2;
Expand Down Expand Up @@ -307,7 +335,7 @@
break;
}
}
if (firstActiveLayer <= 0) {
if (firstActiveLayer < 0) {
LOG(fatal) << "No active layers found in FastTracker, check layer setup";
return -2; // no active layers
}
Expand All @@ -334,7 +362,7 @@
// check if layer is reached
float targetX = 1e+3;
inputTrack.getXatLabR(layers[il].getRadius(), targetX, magneticField);
if (targetX > 999.f) {

Check failure on line 365 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOGF(debug, "Failed to find intercept for layer %d at radius %.2f cm", il, layers[il].getRadius());
break; // failed to find intercept
}
Expand Down Expand Up @@ -411,7 +439,7 @@

float targetX = 1e+3;
inputTrack.getXatLabR(layers[il].getRadius(), targetX, magneticField);
if (targetX > 999)

Check failure on line 442 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue; // failed to find intercept

if (!inputTrack.propagateTo(targetX, magneticField)) {
Expand Down Expand Up @@ -483,7 +511,7 @@
// backpropagate to original radius
float finalX = 1e+3;
bool inPropStatus = inwardTrack.getXatLabR(initialRadius, finalX, magneticField);
if (finalX > 999) {

Check failure on line 514 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
LOG(debug) << "Failed to find intercept for initial radius " << initialRadius << " cm, x = " << finalX << " and status " << inPropStatus << " and sn = " << inwardTrack.getSnp() << " r = " << inwardTrack.getY() * inwardTrack.getY();
return -3; // failed to find intercept
}
Expand All @@ -493,7 +521,7 @@
}

// only attempt to continue if intercepts are at least four
if (nIntercepts < 4)

Check failure on line 524 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return nIntercepts;

// generate efficiency
Expand Down Expand Up @@ -537,7 +565,7 @@
if (fcovm[ii][jj] * fcovm[ii][jj] > std::abs(fcovm[ii][ii] * fcovm[jj][jj])) {
rubenConditional = true;
if (makePositiveDefinite) {
fcovm[ii][jj] = TMath::Sign(1, fcovm[ii][jj]) * covMatFactor * sqrt(std::abs(fcovm[ii][ii] * fcovm[jj][jj]));

Check failure on line 568 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
}
}
}
Expand Down Expand Up @@ -575,7 +603,7 @@
for (int j = 0; j < 5; ++j)
val += eigVec[j][ii] * outputTrack.getParam(j);
// smear parameters according to eigenvalues
params_[ii] = gRandom->Gaus(val, sqrt(eigVal[ii]));

Check failure on line 606 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
}

// invert eigenvector matrix
Expand All @@ -588,7 +616,7 @@
outputTrack.setParam(val, ii);
}
// should make a sanity check that par[2] sin(phi) is in [-1, 1]
if (fabs(outputTrack.getParam(2)) > 1.) {

Check failure on line 619 in ALICE3/Core/FastTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
LOG(info) << " --- smearTrack failed sin(phi) sanity check: " << outputTrack.getParam(2);
return -2;
}
Expand Down
3 changes: 3 additions & 0 deletions ALICE3/Core/FastTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<DetLayer> 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); }
Expand All @@ -57,6 +59,7 @@ class FastTracker

void AddSiliconALICE3v4(std::vector<float> pixelResolution);
void AddSiliconALICE3v2(std::vector<float> pixelResolution);
void AddSiliconALICE3(std::vector<float> pixelResolution);
void AddTPC(float phiResMean, float zResMean);

void Print();
Expand Down
17 changes: 16 additions & 1 deletion ALICE3/TableProducer/alice3-multicharmTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ struct alice3multicharmTable {
Partition<alice3tracks> 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<alice3tracks> 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<alice3tracks> 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 {
Expand Down Expand Up @@ -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});
Expand Down Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions ALICE3/Tasks/alice3-multicharm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,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<int>(score * 100));
histPath = std::format("MLQA/RequiredBDTScore_{}/", static_cast<int>(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}}})});
Expand Down Expand Up @@ -327,7 +327,7 @@ struct alice3multicharm {

for (const auto& requiredScore : bdt.requiredScores.value) {
if (bdtScore > requiredScore) {
histPath = std::format("MLQA/RequiredBDTScore_{}/", static_cast<int>(requiredScore * 100));
histPath = std::format("MLQA/RequiredBDTScore_{}/", static_cast<int>(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));
Expand All @@ -347,13 +347,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());
}
}
Expand Down
Loading