Skip to content

Commit 613ef86

Browse files
committed
Add inner and outermost hit information to alice 3 tracks
1 parent 887dfeb commit 613ef86

6 files changed

Lines changed: 61 additions & 14 deletions

File tree

‎ALICE3/Core/FastTracker.cxx‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ int FastTracker::fastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
312312
nIntercepts = 0;
313313
nSiliconPoints = 0;
314314
nGasPoints = 0;
315+
trackIU = -1.f;
316+
trackOU = -1.f;
315317
std::array<float, 3> posIni{}; // provision for != PV
316318
inputTrack.getXYZGlo(posIni);
317319
const float initialRadius = std::hypot(posIni[0], posIni[1]);
@@ -416,6 +418,9 @@ int FastTracker::fastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
416418
firstLayerReached = il;
417419
}
418420
lastLayerReached = il;
421+
if (layers[il].isTOF()) {
422+
continue; // TOF layers are not used for tracking, but are kept in range for the innermost/outermost update
423+
}
419424
nIntercepts++;
420425
}
421426

@@ -475,7 +480,7 @@ int FastTracker::fastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
475480
continue;
476481
}
477482

478-
if (!layers[il].isInert()) { // only update covm for tracker hits
483+
if (!layers[il].isInert() && !layers[il].isTOF()) { // only update covm for tracker hits
479484
const o2::track::TrackParametrization<float>::dim2_t hitpoint = {xyz1[1], xyz1[2]};
480485
const o2::track::TrackParametrization<float>::dim3_t hitpointcov = {layers[il].getResolutionRPhi() * layers[il].getResolutionRPhi(), 0.f, layers[il].getResolutionZ() * layers[il].getResolutionZ()};
481486

@@ -510,7 +515,14 @@ int FastTracker::fastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
510515
}
511516

512517
hits.push_back(thisHit);
513-
if (!layers[il].isInert()) { // good hit probability calculation
518+
if (!layers[il].isInert()) {
519+
trackIU = std::hypot(spacePoint[0], spacePoint[1]);
520+
if (trackOU < 0.f) {
521+
trackOU = trackIU;
522+
}
523+
}
524+
525+
if (!layers[il].isInert() && !layers[il].isTOF()) { // good hit probability calculation
514526
float sigYCmb = o2::math_utils::sqrt(inwardTrack.getSigmaY2() + layers[il].getResolutionRPhi() * layers[il].getResolutionRPhi());
515527
float sigZCmb = o2::math_utils::sqrt(inwardTrack.getSigmaZ2() + layers[il].getResolutionZ() * layers[il].getResolutionZ());
516528
goodHitProbability[il] = probGoodChiSqHit(layers[il].getRadius() * 100, sigYCmb * 100, sigZCmb * 100);

‎ALICE3/Core/FastTracker.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ class FastTracker
127127
[[nodiscard]] int getNIntercepts() const { return nIntercepts; }
128128
[[nodiscard]] int getNSiliconPoints() const { return nSiliconPoints; }
129129
[[nodiscard]] int getNGasPoints() const { return nGasPoints; }
130+
[[nodiscard]] float getTrackIU() const { return trackIU; }
131+
[[nodiscard]] float getTrackOU() const { return trackOU; }
130132
[[nodiscard]] float getGoodHitProb(int layer) const
131133
{
132134
return (layer >= 0 && static_cast<size_t>(layer) < goodHitProbability.size()) ? goodHitProbability[layer] : 0.0f;
@@ -172,6 +174,8 @@ class FastTracker
172174
int nIntercepts = 0; /// found in first outward propagation
173175
int nSiliconPoints = 0; /// silicon-based space points added to track
174176
int nGasPoints = 0; /// tpc-based space points added to track
177+
float trackIU = -1.f; /// innermost update: radius of the innermost active-layer hit added to track
178+
float trackOU = -1.f; /// outermost update: radius of the outermost active-layer hit added to track
175179
std::vector<float> goodHitProbability;
176180

177181
ClassDef(FastTracker, 1);

‎ALICE3/DataModel/tracksAlice3.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ DECLARE_SOA_COLUMN(NTPCHits, nTPCHits, int); //! number of tpc hi
3232
DECLARE_SOA_COLUMN(PdgCode, pdgCode, int); //! PDG code of the linked truth MC particle
3333
DECLARE_SOA_COLUMN(TrackType, trackType, int); //! Type of the track
3434
DECLARE_SOA_COLUMN(IsPVContributor, isPVContributor, bool); //! Has track contributed to the PV fit?
35+
DECLARE_SOA_COLUMN(TrackIU, trackIU, float); //! Innermost update: radius (cm) of the innermost hit assigned to the track
36+
DECLARE_SOA_COLUMN(TrackOU, trackOU, float); //! Outermost update: radius (cm) of the outermost hit assigned to the track
3537
} // namespace track_alice3
3638
DECLARE_SOA_TABLE(TracksAlice3, "AOD", "TRACKSALICE3",
37-
track_alice3::IsReconstructed);
39+
track_alice3::IsReconstructed,
40+
track_alice3::TrackIU,
41+
track_alice3::TrackOU);
3842
using TrackAlice3 = TracksAlice3::iterator;
3943

4044
DECLARE_SOA_TABLE(TracksAlice3Pdg, "AOD", "TRACKSALICE3PDG",

‎ALICE3/Macros/Configuration/a3geometry_v3.ini‎

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,6 @@ B05.resZ: 0.001
9292
B05.eff: 1.00
9393
B05.type: 1
9494

95-
iTOF.r: 19
96-
iTOF.z: 250
97-
iTOF.x0: 0.01*3.
98-
iTOF.xrho: 0.03
99-
iTOF.resRPhi: 0.001
100-
iTOF.resZ: 0.001
101-
iTOF.eff: 1.00
102-
iTOF.type: 0
103-
10495
B06.r: 20.
10596
B06.z: 250
10697
B06.x0: 0.01
@@ -110,6 +101,15 @@ B06.resZ: 0.001
110101
B06.eff: 1.00
111102
B06.type: 1
112103

104+
iTOF.r: 21
105+
iTOF.z: 250
106+
iTOF.x0: 0.01*3.
107+
iTOF.xrho: 0.03
108+
iTOF.resRPhi: 0.001
109+
iTOF.resZ: 0.001
110+
iTOF.eff: 1.00
111+
iTOF.type: 3
112+
113113
B07.r: 30.
114114
B07.z: 250
115115
B07.x0: 0.01
@@ -146,6 +146,15 @@ B10.resZ: 0.001
146146
B10.eff: 1.00
147147
B10.type: 1
148148

149+
oTOF.r: 92
150+
oTOF.z: 250
151+
oTOF.x0: 0.01*3.
152+
oTOF.xrho: 0.03
153+
oTOF.resRPhi: 0.001
154+
oTOF.resZ: 0.001
155+
oTOF.eff: 1.00
156+
oTOF.type: 3
157+
149158
# Lookup tables
150159
global.lutEl: ccdb:/Users/j/jekarlss/LUTs/v3/b/el
151160
global.lutMu: ccdb:/Users/j/jekarlss/LUTs/v3/b/mu

‎ALICE3/TableProducer/OTF/onTheFlyTracker.cxx‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ struct OnTheFlyTracker {
299299
int nSiliconHits = 0; ///< number of silicon hits
300300
int nTPCHits = 0; ///< number of TPC hits
301301
TrackType trackType = TrackType::kNone;
302+
float trackIU = -1.f; ///< radius of the innermost hit (-1 if not available)
303+
float trackOU = -1.f; ///< radius of the outermost hit (-1 if not available)
302304
};
303305

304306
// Helper struct to pass cascade information
@@ -1828,7 +1830,7 @@ struct OnTheFlyTracker {
18281830
tableTrackSelection(static_cast<uint8_t>(0), false, false, false, false, false, false);
18291831
tableTrackSelectionExtension(false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false);
18301832
}
1831-
tableTracksAlice3(true);
1833+
tableTracksAlice3(true, trackParCov.trackIU, trackParCov.trackOU);
18321834
}
18331835
}
18341836

@@ -1949,12 +1951,14 @@ struct OnTheFlyTracker {
19491951

19501952
bool reconstructed = true;
19511953
int nTrkHits = 0;
1954+
std::array<float, 2> hitRadii = {-1.f, -1.f}; // {innermost, outermost}
19521955
if (enablePrimarySmearing) {
19531956
if (fastPrimaryTrackerSettings.fastTrackPrimaries && longLivedToBeHandled) {
19541957
o2::track::TrackParCov perfectTrackParCov = o2::upgrade::convertMCParticleToO2Track(mcParticle, pdgDB);
19551958
perfectTrackParCov.setPID(pdgCodeToPID(mcParticle.pdgCode()));
19561959
computeBremsstrahlungLoss(mcParticle, perfectTrackParCov);
19571960
nTrkHits = fastTracker[icfg]->fastTrack(perfectTrackParCov, trackParCov, dNdEta);
1961+
hitRadii = {fastTracker[icfg]->getTrackIU(), fastTracker[icfg]->getTrackOU()};
19581962
if (nTrkHits < fastPrimaryTrackerSettings.minSiliconHits) {
19591963
reconstructed = false;
19601964
}
@@ -1965,6 +1969,7 @@ struct OnTheFlyTracker {
19651969
const std::array<float, 3> decayVtx = decayer.generateDecayVertex(mcParticle, pdgDB);
19661970
const float decayRadius2D = std::hypot(decayVtx[0], decayVtx[1]);
19671971
nTrkHits = fastTracker[icfg]->fastTrack(perfectTrackParCov, trackParCov, dNdEta, decayRadius2D);
1972+
hitRadii = {fastTracker[icfg]->getTrackIU(), fastTracker[icfg]->getTrackOU()};
19681973
if (nTrkHits < fastPrimaryTrackerSettings.minSiliconHits) {
19691974
reconstructed = false;
19701975
}
@@ -2033,8 +2038,12 @@ struct OnTheFlyTracker {
20332038
bool isPVContributor = trackType == TrackType::kRecoPrimary;
20342039
if (reconstructed) {
20352040
recoPrimaries.push_back(TrackAlice3{trackParCov, mcParticle.globalIndex(), trackTime, TimeResolutionUs, isDecayDaughter, isPVContributor, false, 0, nTrkHits, trackType});
2041+
recoPrimaries.back().trackIU = hitRadii[0];
2042+
recoPrimaries.back().trackOU = hitRadii[1];
20362043
} else {
20372044
ghostPrimaries.push_back(TrackAlice3{trackParCov, mcParticle.globalIndex(), trackTime, TimeResolutionUs, isDecayDaughter, isPVContributor, false, 0, nTrkHits, trackType});
2045+
ghostPrimaries.back().trackIU = hitRadii[0];
2046+
ghostPrimaries.back().trackOU = hitRadii[1];
20382047
}
20392048
}
20402049

@@ -2176,6 +2185,7 @@ struct OnTheFlyTracker {
21762185

21772186
bool reconstructed = false;
21782187
int nTrkHits = 0;
2188+
std::array<float, 2> hitRadii = {-1.f, -1.f}; // {innermost, outermost}
21792189
const bool isSecondary = !otfParticle.isPrimary() && otfParticle.checkBit(o2::upgrade::DecayerBits::ProducedByDecayer) && otfParticle.isAlive();
21802190
if (enablePrimarySmearing && longLivedToBeHandled && otfParticle.isPrimary()) {
21812191
o2::upgrade::convertMCParticleToO2Track(mcParticle, trackParCov, pdgDB);
@@ -2186,6 +2196,7 @@ struct OnTheFlyTracker {
21862196
perfectTrackParCov.setPID(pdgCodeToPID(mcParticle.pdgCode()));
21872197
computeBremsstrahlungLoss(mcParticle, perfectTrackParCov);
21882198
nTrkHits = fastTracker[icfg]->fastTrack(perfectTrackParCov, trackParCov, dNdEta, mcParticle.decayRadius());
2199+
hitRadii = {fastTracker[icfg]->getTrackIU(), fastTracker[icfg]->getTrackOU()};
21892200
getHist<TH2>(histPath + "h2dGenShortLivedParticleRadius")->Fill(mcParticle.decayRadius(), perfectTrackParCov.getPt());
21902201
getHist<TH2>(histPath + "h2dGenRadiusIniVsDecay")->Fill(std::hypot(perfectTrackParCov.getX(), perfectTrackParCov.getY()), mcParticle.decayRadius());
21912202
if (nTrkHits < fastPrimaryTrackerSettings.minSiliconHits) {
@@ -2203,6 +2214,7 @@ struct OnTheFlyTracker {
22032214
computeBremsstrahlungLoss(mcParticle, perfectTrackParCov);
22042215
perfectTrackParCov.setPID(pdgCodeToPID(mcParticle.pdgCode()));
22052216
nTrkHits = fastTracker[icfg]->fastTrack(perfectTrackParCov, trackParCov, dNdEta);
2217+
hitRadii = {fastTracker[icfg]->getTrackIU(), fastTracker[icfg]->getTrackOU()};
22062218
reconstructed = nTrkHits >= fastTrackerSettings.minSiliconHits;
22072219
}
22082220

@@ -2260,9 +2272,13 @@ struct OnTheFlyTracker {
22602272

22612273
if (reconstructed) {
22622274
tracksAlice3.push_back(TrackAlice3{trackParCov, mcParticle.globalIndex(), time, TimeResolutionUs, isSecondary, true, false, 0, nTrkHits, kRecoPrimary});
2275+
tracksAlice3.back().trackIU = hitRadii[0];
2276+
tracksAlice3.back().trackOU = hitRadii[1];
22632277
getHist<TH1>(histPath + "hPtReconstructedPr")->Fill(trackParCov.getPt());
22642278
} else {
22652279
ghostTracksAlice3.push_back(TrackAlice3{trackParCov, mcParticle.globalIndex(), time, TimeResolutionUs, isSecondary, false, false, false, 0, nTrkHits, kGhostPrimary});
2280+
ghostTracksAlice3.back().trackIU = hitRadii[0];
2281+
ghostTracksAlice3.back().trackOU = hitRadii[1];
22662282
}
22672283
}
22682284

‎ALICE3/TableProducer/alice3TrackingTranslator.cxx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,9 @@ struct Alice3TrackingTranslator {
666666
tableTracksDCACov(0.0f, // sigmaDcaXY2
667667
0.0f); // sigmaDcaZ2
668668
// Fill ALICE3 specific tables
669-
tableTracksAlice3(true); // isReconstructed
669+
tableTracksAlice3(true, // isReconstructed
670+
-1.f, // todo: track innermost update
671+
-1.f); // todo: track outermost update
670672
if (mcParticleIdx > 0)
671673
tableTracksAlice3Pdg(GlobalIdxToPDGCode[mcParticleIdx]); // PdgCode to the linked MC truth particle
672674
else

0 commit comments

Comments
 (0)