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
39 changes: 27 additions & 12 deletions ALICE3/Core/FastTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -144,27 +144,42 @@
AddLayer("B10", 80., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1);
}

void FastTracker::AddSiliconALICE3(std::vector<float> pixelResolution)
void FastTracker::AddSiliconALICE3(float scaleX0VD, std::vector<float> pixelResolution)
{
float x0IT = 0.001; // 0.1%
float x0Pipe0 = 0.001592; // 200 um AlBe
float x0VDL0 = 0.00076; // 30 um Si + 50 um glue + carbon foam 0.03%
float x0VDL1 = 0.00096; // 30 um Si + 50 um glue + carbon foam 0.05%
float x0VDL2 = 0.00167; // 30 um Si + 50 um glue + carbon foam 0.05% + 0.07% Be case
float x0Coldplate = 0.02f; // (1.5 mm Al2O3 2%)
float x0Pipe1 = 0.0023f; // 800 um Be
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 x0iTOF = x0OT * 3.;

float resRPhiIT = pixelResolution[0];
float resZIT = pixelResolution[1];
float resRPhiVD = pixelResolution[0];
float resZVD = 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
float xrhoPipe0 = 0;
float xrhoVDL0 = 0;
float xrhoVDL1 = 0;
float xrhoVDL2 = 0;
float xrhoColdplate = 0;
float xrhoPipe1 = 0;
float xrhoOT = 2.3292e-01;
float xrhoiTOF = 0.03;
float eff = 1.00;

AddLayer("bpipe0", 0.48, 250, x0Pipe0, xrhoPipe0, 0.0f, 0.0f, 0.0f, 0);
AddLayer("B00", 0.5, 250, x0VDL0 * scaleX0VD, xrhoVDL0, resRPhiVD, resZVD, eff, 1);
AddLayer("B01", 1.2, 250, x0VDL1 * scaleX0VD, xrhoVDL1, resRPhiVD, resZVD, eff, 1);
AddLayer("B02", 2.5, 250, x0VDL2 * scaleX0VD, xrhoVDL2, resRPhiVD, resZVD, eff, 1);
AddLayer("coldplate", 2.6, 250, x0Coldplate, xrhoColdplate, 0.0f, 0.0f, 0.0f, 0);
AddLayer("bpipe1", 5.7, 250, x0Pipe1, xrhoPipe1, 0.0f, 0.0f, 0.0f, 0);
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("iTOF", 19, 250, x0iTOF, xrhoiTOF, resRPhiOT, resZOT, eff, 0);
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);
Expand Down Expand Up @@ -204,8 +219,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 222 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 223 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 @@ -232,7 +247,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 250 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 @@ -362,7 +377,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 380 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 @@ -439,7 +454,7 @@

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

Check failure on line 457 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 @@ -511,7 +526,7 @@
// backpropagate to original radius
float finalX = 1e+3;
bool inPropStatus = inwardTrack.getXatLabR(initialRadius, finalX, magneticField);
if (finalX > 999) {

Check failure on line 529 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 @@ -521,7 +536,7 @@
}

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

Check failure on line 539 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 @@ -565,7 +580,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 583 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 @@ -603,7 +618,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 621 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 @@ -616,7 +631,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 634 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
2 changes: 1 addition & 1 deletion ALICE3/Core/FastTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class FastTracker

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

void Print();
Expand Down
25 changes: 18 additions & 7 deletions ALICE3/TableProducer/OTF/onTheFlyTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ struct OnTheFlyTracker {
Configurable<int> minSiliconHits{"minSiliconHits", 6, "minimum number of silicon hits to accept track"};
Configurable<int> minSiliconHitsIfTPCUsed{"minSiliconHitsIfTPCUsed", 2, "minimum number of silicon hits to accept track in case TPC info is present"};
Configurable<int> minTPCClusters{"minTPCClusters", 70, "minimum number of TPC hits necessary to consider minSiliconHitsIfTPCUsed"};
Configurable<int> alice3detector{"alice3detector", 0, "0: ALICE 3 v1, 1: ALICE 3 v4"};
Configurable<int> alice3detector{"alice3detector", 2, "0: ALICE 3 v1, 1: ALICE 3 v4, 2: ALICE 3 Sep 2025"};
Configurable<bool> applyZacceptance{"applyZacceptance", false, "apply z limits to detector layers or not"};
Configurable<bool> applyMSCorrection{"applyMSCorrection", true, "apply ms corrections for secondaries or not"};
Configurable<bool> applyElossCorrection{"applyElossCorrection", true, "apply eloss corrections for secondaries or not"};
Configurable<bool> applyEffCorrection{"applyEffCorrection", true, "apply efficiency correction or not"};
Configurable<int> scaleVD{"scaleVD", 1, "scale x0 and xrho in VD layers"};
Configurable<std::vector<float>> pixelRes{"pixelRes", {0.00025, 0.00025, 0.001, 0.001}, "RPhiIT, ZIT, RPhiOT, ZOT"};
} fastTrackerSettings; // allows for gap between peak and bg in case someone wants to

Expand Down Expand Up @@ -412,12 +413,22 @@ struct OnTheFlyTracker {
fastTracker.SetApplyMSCorrection(fastTrackerSettings.applyMSCorrection);
fastTracker.SetApplyElossCorrection(fastTrackerSettings.applyElossCorrection);

if (fastTrackerSettings.alice3detector == 0) {
fastTracker.AddSiliconALICE3v2(fastTrackerSettings.pixelRes);
}
if (fastTrackerSettings.alice3detector == 1) {
fastTracker.AddSiliconALICE3v4(fastTrackerSettings.pixelRes);
fastTracker.AddTPC(0.1, 0.1);
switch (fastTrackerSettings.alice3detector) {
case 0:
fastTracker.AddSiliconALICE3v2(fastTrackerSettings.pixelRes);
break;

case 1:
fastTracker.AddSiliconALICE3v4(fastTrackerSettings.pixelRes);
fastTracker.AddTPC(0.1, 0.1);
break;

case 2:
fastTracker.AddSiliconALICE3(fastTrackerSettings.scaleVD, fastTrackerSettings.pixelRes);
break;

default:
break;
}

// print fastTracker settings
Expand Down
Loading