@@ -206,51 +206,16 @@ public void fetch_DCHits(DataEvent event) {
206206
207207 double timeCutMin = 0 ;
208208 double timeCutMax = 0 ;
209- double timeCutLC = 0 ;
210209
211210 int region = ((superlayer + 1 ) / 2 );
212-
213- switch (region ) {
214- case 1 :
215- timeCutMin = tdccuts .getIntValue ("MinEdge" , 0 , region , 0 );
216- timeCutMax = tdccuts .getIntValue ("MaxEdge" , 0 , region , 0 );
217- break ;
218- case 2 :
219- if (wire <= 56 ) {
220- timeCutLC = tdccuts .getIntValue ("LinearCoeff" , 0 , region , 1 );
221- timeCutMin = tdccuts .getIntValue ("MinEdge" , 0 , region , 1 );
222- timeCutMax = tdccuts .getIntValue ("MaxEdge" , 0 , region , 1 );
223- }
224- if (wire > 56 ) {
225- timeCutLC = tdccuts .getIntValue ("LinearCoeff" , 0 , region , 56 );
226- timeCutMin = tdccuts .getIntValue ("MinEdge" , 0 , region , 56 );
227- timeCutMax = tdccuts .getIntValue ("MaxEdge" , 0 , region , 56 );
228- }
229- break ;
230- case 3 :
231- timeCutMin = tdccuts .getIntValue ("MinEdge" , 0 , region , 0 );
232- timeCutMax = tdccuts .getIntValue ("MaxEdge" , 0 , region , 0 )+timeBuf ;
233- break ;
234- }
211+ timeCutMin = tdccuts .getIntValue ("min" , 0 , region , wire );
212+ timeCutMax = tdccuts .getIntValue ("max" , 0 , region , wire );
213+
235214 boolean passTimingCut = false ;
236215
237- if (region == 1 && tdc > timeCutMin && tdc < timeCutMax )
238- passTimingCut = true ;
239- if (region == 2 ) {
240- double Bscale = Swimmer .getTorScale () * Swimmer .getTorScale ();
241- if (wire >= 56 ) {
242- if (tdc > timeCutMin &&
243- tdc < timeCutMax + timeCutLC * (double ) (112 - wire / 56 ) * Bscale )
244- passTimingCut = true ;
245- } else {
246- if (tdc > timeCutMin &&
247- tdc < timeCutMax + timeCutLC * (double ) (56 - wire / 56 ) * Bscale )
248- passTimingCut = true ;
249- }
250- }
251- if (region == 3 && tdc > timeCutMin && tdc < timeCutMax )
216+ if (tdc > timeCutMin && tdc < timeCutMax )
252217 passTimingCut = true ;
253-
218+
254219 if (passTimingCut ) { // cut on spurious hits
255220 Hit hit = new Hit (sector , superlayer , layer , wire , tdc , jitter , (index + 1 ));
256221 hit .calc_CellSize (detector );
@@ -261,7 +226,6 @@ public void fetch_DCHits(DataEvent event) {
261226 }
262227 }
263228 }
264-
265229 }
266230
267231 public Map <Integer , ArrayList <FittedHit >> read_Hits (DataEvent event ) {
0 commit comments