@@ -124,11 +124,11 @@ T getCompatibleBCs(aod::AmbiguousMFTTrack const& atrack, aod::Collision const& c
124124 }
125125
126126 if (bcIt != bcs.end () && maxBCId >= minBCId) {
127- T slice{{ bcs.asArrowTable ()-> Slice ( minBCId, maxBCId - minBCId + 1 )}, ( uint64_t )minBCId} ;
127+ auto slice = bcs.rawSlice ( minBCId, maxBCId - minBCId + 1 );
128128 bcs.copyIndexBindings (slice);
129129 return slice;
130130 } else {
131- T slice{{ bcs.asArrowTable ()-> Slice ( minBCId, maxBCId - minBCId)}, ( uint64_t )minBCId} ;
131+ auto slice = bcs.rawSlice ( minBCId, maxBCId - minBCId);
132132 bcs.copyIndexBindings (slice);
133133 return slice;
134134 }
@@ -141,18 +141,10 @@ T getCompatibleBCs(aod::MFTTracks::iterator const& track, aod::Collision const&
141141 // define firstBC and lastBC (globalBC of beginning and end of the range, when no shift is applied)
142142
143143 auto bcIt = collOrig.bc_as <T>();
144- // auto timstp = bcIt.timestamp();
145144
146145 int64_t firstBC = bcIt.globalBC () + (track.trackTime () - track.trackTimeRes ()) / o2::constants::lhc::LHCBunchSpacingNS;
147146 int64_t lastBC = firstBC + 2 * track.trackTimeRes () / o2::constants::lhc::LHCBunchSpacingNS + 1 ; // to have a delta = 198 BC
148147
149- // printf(">>>>>>>>>>>>>>>>>>>>>>>>>>> last-first %lld\n", lastBC-firstBC);
150-
151- // int collTimeResInBC = collOrig.collisionTimeRes()/o2::constants::lhc::LHCBunchSpacingNS;
152-
153- // int64_t collFirstBC = bcIt.globalBC() + (collOrig.collisionTime() - collOrig.collisionTimeRes())/o2::constants::lhc::LHCBunchSpacingNS;
154- // int64_t collLastBC = collFirstBC + 2*collOrig.collisionTimeRes()/o2::constants::lhc::LHCBunchSpacingNS +1;
155-
156148 int64_t minBCId = bcIt.globalIndex ();
157149
158150 if ((int64_t )bcIt.globalBC () < firstBC + deltaBC) {
@@ -195,9 +187,7 @@ T getCompatibleBCs(aod::MFTTracks::iterator const& track, aod::Collision const&
195187 {
196188 // means that the slice of compatible BCs is empty
197189
198- T slice{{bcs.asArrowTable ()->Slice (0 , 0 )}, (uint64_t )0 };
199- // bcs.copyIndexBindings(slice); REMOVED IT BECAUSE I DON'T KNOW WHAT IT DOES HERE
200- return slice; // returns an empty slice
190+ return bcs.emptySlice ();
201191 }
202192 }
203193 }
@@ -209,9 +199,7 @@ T getCompatibleBCs(aod::MFTTracks::iterator const& track, aod::Collision const&
209199 if (bcIt != bcs.end () && ((int64_t )bcIt.globalBC () > (int64_t )lastBC + deltaBC)) {
210200 // check the following element
211201
212- T slice{{bcs.asArrowTable ()->Slice (0 , 0 )}, (uint64_t )0 };
213- // bcs.copyIndexBindings(slice); REMOVED IT BECAUSE I DON'T KNOW WHAT IT DOES HERE
214- return slice; // returns an empty slice
202+ return bcs.emptySlice ();
215203 }
216204 }
217205
@@ -222,15 +210,10 @@ T getCompatibleBCs(aod::MFTTracks::iterator const& track, aod::Collision const&
222210 }
223211
224212 if (maxBCId < minBCId) {
225- if (bcIt == bcs.end ()) {
226- printf (" at the end of the bcs iterator %d\n " , 1 );
227- }
228- T slice{{bcs.asArrowTable ()->Slice (0 , 0 )}, (uint64_t )0 };
229- // bcs.copyIndexBindings(slice); REMOVED IT BECAUSE I DON'T KNOW WHAT IT DOES HERE
230- return slice; // returns an empty slice
213+ return bcs.emptySlice ();
231214 }
232215
233- T slice{{ bcs.asArrowTable ()-> Slice ( minBCId, maxBCId - minBCId + 1 )}, ( uint64_t )minBCId} ;
216+ auto slice = bcs.rawSlice ( minBCId, maxBCId - minBCId + 1 );
234217 bcs.copyIndexBindings (slice);
235218 return slice;
236219}
0 commit comments