From a07f596b38ba44817824817eec61c33cf22f35d2 Mon Sep 17 00:00:00 2001
From: Chengdong Fu <fucd@ihep.ac.cn>
Date: Fri, 8 Oct 2021 15:02:56 +0800
Subject: [PATCH] recover TrackState check
---
Reconstruction/Tracking/src/Clupatra/clupatra_new.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Reconstruction/Tracking/src/Clupatra/clupatra_new.h b/Reconstruction/Tracking/src/Clupatra/clupatra_new.h
index e8aecc0c..793cc8d1 100644
--- a/Reconstruction/Tracking/src/Clupatra/clupatra_new.h
+++ b/Reconstruction/Tracking/src/Clupatra/clupatra_new.h
@@ -156,8 +156,8 @@ namespace clupatra_new{
// FIXME debug Mingrui
//streamlog_out( DEBUG ) << " add hit << " << *first << " to layer " << (*first)->first->layer << std::endl ;
-
- hLV[ (*first)->first->layer ].push_back( *first ) ;
+ //std::cout << "fucd debug: " << " add hit << " << *first << " to layer " << (*first)->first->layer << std::endl ;
+ hLV[ (*first)->first->layer ].push_back( *first ) ;
++first ;
}
}
@@ -437,6 +437,7 @@ namespace clupatra_new{
// track state at last hit migyt be rubish....
// const lcio::TrackState* ts = ( outward ? trk->getTrackState( lcio::TrackState::AtLastHit ) : trk->getTrackState( lcio::TrackState::AtFirstHit ) ) ;
+ if(!hasTrackStateAt(trk, lcio::TrackState::AtFirstHit)) return false; //equivalent to pointer ts ==0 in lcio, fucd
const edm4hep::TrackState ts = getTrackStateAt(trk, lcio::TrackState::AtFirstHit ) ;
@@ -455,7 +456,7 @@ namespace clupatra_new{
int nHit = trk.trackerHits_size() ;
- if( nHit == 0 /*|| ts ==0*/ ) // FIXME Mingrui Since it is no pointer
+ if( nHit == 0 /*|| ts ==0*/ ) // FIXME Mingrui Since it is no pointer, fixed previous by hasTrackStateAt, fucd
return false ;
// float initial_chi2 = trk->getChi2() ;
--
GitLab