Skip to content

Commit 495ca6c

Browse files
njacazioalibuild
andauthored
[TOF] update matcher (#13621)
* [TOF] update matcher * Update MatchInfoTOF.h * Please consider the following formatting changes (#33) * Update MatchInfoTOF.h --------- Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent 2249241 commit 495ca6c

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOF.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ class MatchInfoTOF
4141
void setChi2(float chi2) { mChi2 = chi2; }
4242
float getChi2() const { return mChi2; }
4343

44+
void setHitPatternUpDown(bool v) { mHitUpDown = v; }
45+
bool getHitPatternUpDown() const { return mHitUpDown; }
46+
47+
void setHitPatternLeftRight(bool v) { mHitLeftRight = v; }
48+
bool getHitPatternLeftRight() const { return mHitLeftRight; }
49+
4450
o2::track::TrackLTIntegral& getLTIntegralOut() { return mIntLT; }
4551
const o2::track::TrackLTIntegral& getLTIntegralOut() const { return mIntLT; }
4652
void print() const;
@@ -76,8 +82,11 @@ class MatchInfoTOF
7682
double mSignal = 0.0; ///< TOF time in ps
7783
float mVz = 0.0; ///< Vz from TOF match
7884
int mChannel = -1; ///< channel
85+
// Hit pattern information
86+
bool mHitUpDown = false; ///< hit pattern in TOF up-down
87+
bool mHitLeftRight = false; ///< hit pattern in TOF left-right
7988

80-
ClassDefNV(MatchInfoTOF, 6);
89+
ClassDefNV(MatchInfoTOF, 7);
8190
};
8291
} // namespace dataformats
8392
} // namespace o2

Detectors/GlobalTracking/src/MatchTOF.cxx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
15561556
int i = 0;
15571557

15581558
// then we take discard the pairs if their track or cluster was already matched (since they are ordered in chi2, we will take the best matching)
1559-
for (const o2::dataformats::MatchInfoTOFReco& matchingPair : matchedTracksPairs) {
1559+
for (o2::dataformats::MatchInfoTOFReco& matchingPair : matchedTracksPairs) {
15601560
int trkType = (int)matchingPair.getTrackType();
15611561

15621562
int itrk = matchingPair.getIdLocal();
@@ -1610,6 +1610,24 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
16101610
matchedTracksIndex[trkType][itrk] = matchedTracks[trkTypeSplitted].size(); // index of the MatchInfoTOF correspoding to this track
16111611
matchedClustersIndex[matchingPair.getTOFClIndex()] = matchedTracksIndex[trkType][itrk]; // index of the track that was matched to this cluster
16121612

1613+
// let's check if cluster has multiple-hits (noferini)
1614+
if (TOFClusWork[matchingPair.getTOFClIndex()].getNumOfContributingChannels() > 1) {
1615+
const auto& tofcl = TOFClusWork[matchingPair.getTOFClIndex()];
1616+
// has an additional hit Up or Down (Z-dir)
1617+
matchingPair.setHitPatternUpDown(tofcl.isAdditionalChannelSet(o2::tof::Cluster::kUp) ||
1618+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kUpLeft) ||
1619+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kUpRight) ||
1620+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kDown) ||
1621+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kDownLeft) ||
1622+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kDownRight));
1623+
// has an additional hit Left or Right (X-dir)
1624+
matchingPair.setHitPatternLeftRight(tofcl.isAdditionalChannelSet(o2::tof::Cluster::kLeft) ||
1625+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kDownLeft) ||
1626+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kUpLeft) ||
1627+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kRight) ||
1628+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kDownRight) ||
1629+
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kUpRight));
1630+
}
16131631
matchedTracks[trkTypeSplitted].push_back(matchingPair); // array of MatchInfoTOF
16141632

16151633
// get fit info

0 commit comments

Comments
 (0)