@@ -177,16 +177,18 @@ bool StFttPointMaker::GhostHitRejection_StripGroup( int row_x, int row_y, double
177177{
178178 // check all the strip groups to reject the ghost
179179 bool is_ghosthit = kFALSE ;
180- if ( is_Group1 (row_x,row_y,x,y) || is_Group2 (row_x,row_y,x,y) || is_Group3 (row_x,row_y,x,y) || is_Group4 (row_x,row_y,x,y) || is_Group5 (row_x,row_y,x,y) || is_Group6 (row_x,row_y,x,y) || is_Group6 (row_x,row_y,x,y) || is_Group7 (row_x,row_y,x,y) || is_Group8 (row_x,row_y,x,y) )
181- is_ghosthit = kTRUE ;
182- // is_ghosthit = is_Group1(x,y);
183- // is_ghosthit = is_Group2(x,y);
184- // is_ghosthit = is_Group3(x,y);
185- // is_ghosthit = is_Group4(x,y);
186- // is_ghosthit = is_Group5(x,y);
187- // is_ghosthit = is_Group6(x,y);
188- // is_ghosthit = is_Group7(x,y);
189- // is_ghosthit = is_Group8(x,y);
180+ if (
181+ is_Group1 (row_x,row_y,x,y) ||
182+ is_Group2 (row_x,row_y,x,y) ||
183+ is_Group3 (row_x,row_y,x,y) ||
184+ is_Group4 (row_x,row_y,x,y) ||
185+ is_Group5 (row_x,row_y,x,y) ||
186+ is_Group6 (row_x,row_y,x,y) ||
187+ is_Group6 (row_x,row_y,x,y) ||
188+ is_Group7 (row_x,row_y,x,y) ||
189+ is_Group8 (row_x,row_y,x,y)
190+ )
191+ is_ghosthit = kTRUE ;
190192
191193 return is_ghosthit;
192194}
@@ -211,24 +213,6 @@ bool StFttPointMaker::GhostHitRejection_DiagH(double x, double y, int Rob, int &
211213 double LEdge = clu_dx->maxStripLeftEdge ()*sqrt (2 );
212214 double REdge = clu_dx->maxStripRightEdge ()*sqrt (2 );
213215
214- // for loose cluster cut and check performance, this number now select by hand
215- // LEdge = LEdge-1.6*sqrt(2);
216- // REdge = REdge+1.6*sqrt(2);
217-
218- // LOG_INFO << "intercept = " << intercept << " LEdge = " << LEdge << " REdge = " << REdge << endm;
219- // LOG_INFO << "cluster x = " << clu_dx->x()*sqrt(2) << endm;
220-
221- // if(intercept >= LEdge && intercept <= REdge)
222- // {
223- // is_pair = kTRUE;
224- // distance = abs(intercept-clu_dx->x()*sqrt(2));
225- // if (distance < distance_prev)
226- // {
227- // distance_prev = distance;
228- // i_cluster = iClu_DH;
229- // }
230- // }
231- // LOG_INFO << "i_cluster = " << i_cluster << endm;
232216 if (clu_dx->x ()*sqrt (2 )+1.60 *3 > intercept && clu_dx->x ()*sqrt (2 )-1.60 *3 < intercept)
233217 {
234218 is_pair = kTRUE ;
@@ -239,17 +223,16 @@ bool StFttPointMaker::GhostHitRejection_DiagH(double x, double y, int Rob, int &
239223 i_cluster = iClu_DH;
240224 }
241225 }
242- // LOG_INFO << "i_cluster = " << i_cluster << endm;
226+ LOG_DEBUG << " i_cluster = " << i_cluster << endm;
243227 }
244- // LOG_INFO << "is pair = " << (int)is_pair << endm;
228+ LOG_DEBUG << " is pair = " << (int )is_pair << endm;
245229 return is_pair;
246230}
247231
248232// using diagnoal vertical strip to reject method,
249233bool StFttPointMaker::GhostHitRejection_DiagV (double x, double y, int Rob, int &i_cluster)
250234{
251- // LOG_INFO << "starting do GhostHitRejection_DiagV " << endm;
252- // TODO: how to confirm i_cluster
235+ LOG_DEBUG << " starting do GhostHitRejection_DiagV " << endm;
253236 bool is_pair = kFALSE ;
254237 i_cluster = -999 ;
255238 // loop the diagonal cluster find a cluster can include this cluster
@@ -265,25 +248,6 @@ bool StFttPointMaker::GhostHitRejection_DiagV(double x, double y, int Rob, int &
265248 double LEdge = clu_dx->maxStripLeftEdge ()*sqrt (2 );
266249 double REdge = clu_dx->maxStripRightEdge ()*sqrt (2 );
267250
268- // for loose cluster cut and check performance, this number now select by hand
269- // LEdge = LEdge-1.6*sqrt(2);
270- // REdge = REdge+1.6*sqrt(2);
271-
272-
273- // LOG_INFO << "intercept = " << intercept << " LEdge = " << LEdge << " REdge = " << REdge << endm;
274- // LOG_INFO << "cluster x = " << clu_dx->x()*sqrt(2) << endm;
275-
276- // if(intercept >= LEdge && intercept <= REdge)
277- // {
278- // is_pair = kTRUE;
279- // distance = abs(intercept-clu_dx->x()*sqrt(2));
280- // if (distance < distance_prev)
281- // {
282- // distance_prev = distance;
283- // i_cluster = iClu_DV;
284- // }
285- // }
286- // LOG_INFO << "i_cluster = " << i_cluster << endm;
287251 if (clu_dx->x ()*sqrt (2 ) < intercept+1.60 *3 && clu_dx->x ()*sqrt (2 ) > intercept-1.60 *3 )
288252 {
289253 is_pair = kTRUE ;
@@ -294,9 +258,9 @@ bool StFttPointMaker::GhostHitRejection_DiagV(double x, double y, int Rob, int &
294258 i_cluster = iClu_DV;
295259 }
296260 }
297- // LOG_INFO << "i_cluster = " << i_cluster << endm;
261+ LOG_DEBUG << " i_cluster = " << i_cluster << endm;
298262 }
299- // LOG_INFO << "is pair = " << (int)is_pair << endm;
263+ LOG_DEBUG << " is pair = " << (int )is_pair << endm;
300264 return is_pair;
301265}
302266
@@ -324,7 +288,6 @@ void StFttPointMaker::MakeLocalPoints(UChar_t Rob)
324288
325289 for ( size_t iClu_X = 0 ; iClu_X < nClusters_X; iClu_X++ )
326290 {
327- // point = new StFttPoint();
328291 auto clu_x = clustersPerRob[(UChar_t)Rob][kFttVertical ][iClu_X];
329292 x = clu_x->x ();
330293 int Row_x = clu_x->row ();
@@ -365,61 +328,42 @@ void StFttPointMaker::MakeLocalPoints(UChar_t Rob)
365328 }
366329 if ( GhostHitRejection_DiagV (x,y,Rob,i_cluster) )
367330 {
368- // LOG_INFO << "debug Diag V1" << endm;
369331 point->setX (x);
370332 point->setY (y);
371- LOG_INFO << " Point (X,Y) = " << x << " , " << y << endm;
372333 point->setPlane (clu_x->plane ());
373334 point->setQuadrant (clu_x->quadrant ());
374335 point->addCluster (clu_x,kFttVertical );
375336 point->addCluster (clu_y,kFttHorizontal );
376337 auto clu_dv = clustersPerRob[(UChar_t)Rob][kFttDiagonalV ][i_cluster];
377- // if( ((x+y) - clu_dv->x()*sqrt(2)) < 10 && ((x+y) - clu_dv->x()*sqrt(2)) > 6 )
378- // {
379- // // LOG_INFO << "x = " << x << " y = " << y <<"cluster center = " << clu_dv->x() <<" cluster x * sqrt(2) = " << clu_dv->x()*sqrt(2) << " MaxADC strip center = " << clu_dv->SC_MaxStrip() << endm;
380- // }
381- // LOG_INFO << "match diagonal cluster is " << i_cluster << " DV cluster" << endm;
382- clu_dv->print ();
383338 point->addCluster (clu_dv,kFttDiagonalV );
384339 point->setD1 (clu_dv->x ());
385340 is_pair = kTRUE ;
386- // LOG_INFO << "debug Diag V2" << endm;
341+
387342 if ( GhostHitRejection_DiagH (x,y,Rob,i_cluster) )
388343 {
389344 auto clu_dh = clustersPerRob[(UChar_t)Rob][kFttDiagonalH ][i_cluster];
390345 point->setD2 (clu_dh->x ());
391- // LOG_INFO << "debug Diag H1" << endm;
392346 point->addCluster (clu_dh,kFttDiagonalH );
393347 }
394348
395349 } else if ( GhostHitRejection_DiagH (x,y,Rob,i_cluster) )
396350 {
397-
398- // LOG_INFO << "debug Diag H2" << endm;
399351 is_pair = kTRUE ;
400- LOG_INFO << " Point (X,Y) = " << x << " , " << y << endm;
401352 point->setX (x);
402353 point->setY (y);
403354 point->setPlane (clu_x->plane ());
404355 point->setQuadrant (clu_x->quadrant ());
405- // LOG_INFO << "debug Diag H3" << endm;
406356 point->addCluster (clu_x,kFttVertical );
407- // LOG_INFO << "debug Diag H4" << endm;
408357 point->addCluster (clu_y,kFttHorizontal );
409- LOG_INFO << " match diagonal cluster is " << i_cluster << " DH cluster" << endm;
410358 auto clu_dh = clustersPerRob[(UChar_t)Rob][kFttDiagonalH ][i_cluster];
411- clu_dh->print ();
412359 point->setD1 (clu_dh->x ());
413360 point->addCluster (clu_dh,kFttDiagonalH );
414361 }
415362 else
416363 continue ;
417364
418- // LOG_INFO << "is pair = " << is_pair << endm;
419365 if (is_pair)
420366 {
421- point->print ();
422- LOG_INFO << " PAIR Point (X,Y) = " << point->x () << " , " << point->y () << endm;
423367 mFttPoint .push_back (point);
424368 mFttCollection ->addPoint (point);
425369 }
@@ -442,12 +386,6 @@ void StFttPointMaker::MakeLocalPoints(UChar_t Rob)
442386 point->addCluster (clu_x,kFttVertical );
443387 point->addCluster (clu_y,kFttHorizontal );
444388 auto clu_dh = clustersPerRob[(UChar_t)Rob][kFttDiagonalH ][i_cluster];
445- // if( ((x+y) - clu_dh->x()*sqrt(2)) < 10 && ((x+y) - clu_dh->x()*sqrt(2)) > 6 )
446- // {
447- // // LOG_INFO << "x = " << x << " y = " << y << "cluster center = " << clu_dh->x() << " cluster x * sqrt(2) = " << clu_dh->x()*sqrt(2) << " MaxADC strip center = " << clu_dh->SC_MaxStrip() << endm;
448- // }
449- // LOG_INFO << "match diagonal cluster is " << i_cluster << " DH cluster" << endm;
450- clu_dh->print ();
451389 point->setD1 (clu_dh->x ());
452390 point->addCluster (clu_dh,kFttDiagonalH );
453391 if (GhostHitRejection_DiagV (x,y,Rob,i_cluster))
@@ -465,29 +403,24 @@ void StFttPointMaker::MakeLocalPoints(UChar_t Rob)
465403 point->setQuadrant (clu_x->quadrant ());
466404 point->addCluster (clu_x,kFttVertical );
467405 point->addCluster (clu_y,kFttHorizontal );
468- LOG_INFO << " match diagonal cluster is " << i_cluster << " DV cluster" << endm;
406+ // LOG_INFO << "match diagonal cluster is " << i_cluster << " DV cluster" << endm;
469407 auto clu_dv = clustersPerRob[(UChar_t)Rob][kFttDiagonalV ][i_cluster];
470- clu_dv->print ();
408+ // clu_dv->print();
471409 point->setD1 (clu_dv->x ());
472410 point->addCluster (clu_dv,kFttDiagonalV );
473411 } else continue ;
474412
475- // LOG_INFO << "is pair = " << is_pair << endm;nn
476413 if (is_pair)
477414 {
478- LOG_INFO << " PAIR Point (X,Y) = " << point->x () << " , " << point->y () << endm;
479- point->print ();
480415 mFttPoint .push_back (point);
481416 mFttCollection ->addPoint (point);
482417 }
483418 }
484419 if (!point)
485420 {
486- LOG_INFO << " empty point !!!!!!" << endm;
421+ LOG_DEBUG << " empty point !!!!!!" << endm;
487422 continue ;
488423 }
489- // point->print();
490- // delete point;
491424 }
492425 }
493426
0 commit comments