Skip to content

Commit 82da473

Browse files
committed
add best knowldge of collision time in tof matching info
1 parent 012946b commit 82da473

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

DataFormats/Reconstruction/include/ReconstructionDataFormats/MatchInfoTOF.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ class MatchInfoTOF
8686
hasT0_1BCbefore = 0x1 << 8,
8787
hasT0_2BCbefore = 0x1 << 9 };
8888

89+
void setFT0Best(double val, float res = 200.)
90+
{
91+
mFT0Best = val;
92+
mFT0BestRes = res;
93+
}
94+
double getFT0Best() const { return mFT0Best; }
95+
float getFT0BestRes() const { return mFT0BestRes; }
96+
8997
private:
9098
int mIdLocal; // track id in sector of the pair track-TOFcluster
9199
float mChi2; // chi2 of the pair track-TOFcluster
@@ -106,7 +114,10 @@ class MatchInfoTOF
106114
float mTgeant = 0.0; ///< geant time in MC
107115
double mT0true = 0.0; ///< t0true
108116

109-
ClassDefNV(MatchInfoTOF, 8);
117+
double mFT0Best = 0.0; //< best info for collision time
118+
float mFT0BestRes = 200.0; //< resolution (in ps) of the best info for collision time
119+
120+
ClassDefNV(MatchInfoTOF, 9);
110121
};
111122
} // namespace dataformats
112123
} // namespace o2

Detectors/GlobalTracking/src/MatchTOF.cxx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,8 +1702,8 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
17021702
matchingPair.setT0true(TOFClusWork[matchingPair.getTOFClIndex()].getT0true());
17031703

17041704
// let's check if cluster has multiple-hits (noferini)
1705-
if (TOFClusWork[matchingPair.getTOFClIndex()].getNumOfContributingChannels() > 1) {
1706-
const auto& tofcl = TOFClusWork[matchingPair.getTOFClIndex()];
1705+
const auto& tofcl = TOFClusWork[matchingPair.getTOFClIndex()];
1706+
if (tofcl.getNumOfContributingChannels() > 1) {
17071707
// has an additional hit Up or Down (Z-dir)
17081708
matchingPair.setHitPatternUpDown(tofcl.isAdditionalChannelSet(o2::tof::Cluster::kUp) ||
17091709
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kUpLeft) ||
@@ -1719,6 +1719,19 @@ void MatchTOF::BestMatches(std::vector<o2::dataformats::MatchInfoTOFReco>& match
17191719
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kDownRight) ||
17201720
tofcl.isAdditionalChannelSet(o2::tof::Cluster::kUpRight));
17211721
}
1722+
1723+
// estimate collision time using FT0 info if available
1724+
ULong64_t bclongtofCal = (matchingPair.getSignal() - 10000) * o2::tof::Geo::BC_TIME_INPS_INV;
1725+
double t0Best = bclongtofCal * o2::tof::Geo::BC_TIME_INPS; // here just BC
1726+
float t0BestRes = 200;
1727+
if (FITRecPoints.size() > 0) {
1728+
int index = findFITIndex(bclongtofCal, FITRecPoints, mFirstTForbit);
1729+
if (index > -1 && FITRecPoints[index].isValidTime(1) && FITRecPoints[index].isValidTime(2)) { // require A and C
1730+
t0Best += FITRecPoints[index].getCollisionTime(0);
1731+
t0BestRes = 15;
1732+
}
1733+
}
1734+
matchingPair.setFT0Best(t0Best, t0BestRes);
17221735
matchedTracks[trkTypeSplitted].push_back(matchingPair); // array of MatchInfoTOF
17231736

17241737
// get fit info

Detectors/GlobalTrackingWorkflow/src/tof-matcher-workflow.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
114114
}
115115
}
116116

117-
if (!writecalib) {
118-
useFIT = false;
119-
}
117+
// if (!writecalib) {
118+
// useFIT = false;
119+
// }
120120

121121
LOG(debug) << "TOF MATCHER WORKFLOW configuration";
122122
LOG(debug) << "TOF track inputs = " << configcontext.options().get<std::string>("track-sources");

0 commit comments

Comments
 (0)