Skip to content

Commit fb54f35

Browse files
authored
[ALICE3] Let fasttracker use the generic geometry (#13099)
1 parent 3a6bf94 commit fb54f35

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

ALICE3/Core/FastTracker.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <TObject.h>
2323

2424
#include <fstream>
25+
#include <map>
2526
#include <string>
2627
#include <vector>
2728

@@ -184,7 +185,7 @@ void FastTracker::AddSiliconALICE3(float scaleX0VD, std::vector<float> pixelReso
184185
AddLayer("B03", 7., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1);
185186
AddLayer("B04", 9., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1);
186187
AddLayer("B05", 12., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1);
187-
AddLayer("iTOF", 19, 250, x0iTOF, xrhoiTOF, resRPhiOT, resZOT, eff, 0);
188+
AddLayer("iTOF", 19, 250, x0iTOF, xrhoiTOF, resRPhiOT, resZOT, 0.0f, 0);
188189
AddLayer("B06", 20., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1);
189190
AddLayer("B07", 30., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1);
190191
AddLayer("B08", 45., 250, x0OT, xrhoOT, resRPhiOT, resZOT, eff, 1);

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ struct OnTheFlyTracker {
138138
Configurable<int> minSiliconHits{"minSiliconHits", 6, "minimum number of silicon hits to accept track"};
139139
Configurable<int> minSiliconHitsIfTPCUsed{"minSiliconHitsIfTPCUsed", 2, "minimum number of silicon hits to accept track in case TPC info is present"};
140140
Configurable<int> minTPCClusters{"minTPCClusters", 70, "minimum number of TPC hits necessary to consider minSiliconHitsIfTPCUsed"};
141-
Configurable<int> alice3detector{"alice3detector", 2, "0: ALICE 3 v1, 1: ALICE 3 v4, 2: ALICE 3 Sep 2025"};
141+
Configurable<std::string> alice3geo{"alice3geo", "2", "0: ALICE 3 v1, 1: ALICE 3 v4, 2: ALICE 3 Sep 2025, or path to ccdb with a3 geo"};
142142
Configurable<bool> applyZacceptance{"applyZacceptance", false, "apply z limits to detector layers or not"};
143143
Configurable<bool> applyMSCorrection{"applyMSCorrection", true, "apply ms corrections for secondaries or not"};
144144
Configurable<bool> applyElossCorrection{"applyElossCorrection", true, "apply eloss corrections for secondaries or not"};
@@ -408,31 +408,26 @@ struct OnTheFlyTracker {
408408
rand.SetSeed(seed);
409409

410410
// configure FastTracker
411-
fastTracker.SetMagneticField(magneticField);
412-
fastTracker.SetApplyZacceptance(fastTrackerSettings.applyZacceptance);
413-
fastTracker.SetApplyMSCorrection(fastTrackerSettings.applyMSCorrection);
414-
fastTracker.SetApplyElossCorrection(fastTrackerSettings.applyElossCorrection);
411+
if (enableSecondarySmearing) {
412+
fastTracker.SetMagneticField(magneticField);
413+
fastTracker.SetApplyZacceptance(fastTrackerSettings.applyZacceptance);
414+
fastTracker.SetApplyMSCorrection(fastTrackerSettings.applyMSCorrection);
415+
fastTracker.SetApplyElossCorrection(fastTrackerSettings.applyElossCorrection);
415416

416-
switch (fastTrackerSettings.alice3detector) {
417-
case 0:
417+
if (fastTrackerSettings.alice3geo.value == "0") {
418418
fastTracker.AddSiliconALICE3v2(fastTrackerSettings.pixelRes);
419-
break;
420-
421-
case 1:
419+
} else if (fastTrackerSettings.alice3geo.value == "1") {
422420
fastTracker.AddSiliconALICE3v4(fastTrackerSettings.pixelRes);
423421
fastTracker.AddTPC(0.1, 0.1);
424-
break;
425-
426-
case 2:
422+
} else if (fastTrackerSettings.alice3geo.value == "2") {
427423
fastTracker.AddSiliconALICE3(fastTrackerSettings.scaleVD, fastTrackerSettings.pixelRes);
428-
break;
424+
} else {
425+
fastTracker.AddGenericDetector(fastTrackerSettings.alice3geo, ccdb.operator->());
426+
}
429427

430-
default:
431-
break;
428+
// print fastTracker settings
429+
fastTracker.Print();
432430
}
433-
434-
// print fastTracker settings
435-
fastTracker.Print();
436431
}
437432

438433
/// Function to decay the xi

0 commit comments

Comments
 (0)