File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,9 @@ class MatchTOF
223223
224224 void updateTimeDependentParams ();
225225
226+ static bool mHasFillScheme ;
227+ static bool mFillScheme [o2::constants::lhc::LHCMaxBunches];
228+
226229 // ================================================================
227230
228231 // Data members
Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ using Cluster = o2::tof::Cluster;
5353using GTrackID = o2::dataformats::GlobalTrackID;
5454using timeEst = o2::dataformats::TimeStampWithError<float , float >;
5555
56+ bool MatchTOF::mHasFillScheme = false ;
57+ bool MatchTOF::mFillScheme [o2::constants::lhc::LHCMaxBunches] = {0 };
58+
5659ClassImp (MatchTOF);
5760
5861// ______________________________________________
@@ -1187,19 +1190,30 @@ void MatchTOF::doMatchingForTPC(int sec)
11871190// ______________________________________________
11881191int MatchTOF::findFITIndex (int bc, const gsl::span<const o2::ft0::RecPoints>& FITRecPoints, unsigned long firstOrbit)
11891192{
1193+ if ((!mHasFillScheme ) && o2::tof::Utils::hasFillScheme ()) {
1194+ mHasFillScheme = true ;
1195+ for (int ibc = 0 ; ibc < o2::tof::Utils::getNinteractionBC (); ibc++) {
1196+ mFillScheme [o2::tof::Utils::getInteractionBC (ibc)] = true ;
1197+ }
1198+ }
1199+
11901200 if (FITRecPoints.size () == 0 ) {
11911201 return -1 ;
11921202 }
11931203
11941204 int index = -1 ;
1195- int distMax = 7 ; // require bc distance below 5
1205+ int distMax = 0 ;
1206+ const int distThr = 8 ;
11961207
11971208 for (unsigned int i = 0 ; i < FITRecPoints.size (); i++) {
11981209 const o2::InteractionRecord ir = FITRecPoints[i].getInteractionRecord ();
1210+ if (mHasFillScheme && !mFillScheme [ir.bc ]) {
1211+ continue ;
1212+ }
11991213 int bct0 = (ir.orbit - firstOrbit) * o2::constants::lhc::LHCMaxBunches + ir.bc ;
12001214 int dist = bc - bct0;
12011215
1202- if (dist < 0 || dist > distMax) {
1216+ if (dist < 0 || dist > distThr || dist < distMax) {
12031217 continue ;
12041218 }
12051219
You can’t perform that action at this time.
0 commit comments