From e8835768fd443b39b6e0f083a4713986407bcb8f Mon Sep 17 00:00:00 2001 From: Chengdong Fu Date: Mon, 16 Oct 2023 15:31:59 +0800 Subject: [PATCH] fix bug --- .../FullLDCTracking/FullLDCTrackingAlg.cpp | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/Reconstruction/Tracking/src/FullLDCTracking/FullLDCTrackingAlg.cpp b/Reconstruction/Tracking/src/FullLDCTracking/FullLDCTrackingAlg.cpp index fad902455..ee5f1feb2 100755 --- a/Reconstruction/Tracking/src/FullLDCTracking/FullLDCTrackingAlg.cpp +++ b/Reconstruction/Tracking/src/FullLDCTracking/FullLDCTrackingAlg.cpp @@ -1166,13 +1166,18 @@ void FullLDCTrackingAlg::prepareVectors() { trackExt->setNDF(tpcTrack.getNdf()); trackExt->setChi2(tpcTrack.getChi2()); for (int iHit=0;iHitsecond; + if (it==mapTrackerHits.end()) { + error() << "Cannot find hit " << hit.id() << " in map" << endmsg; + continue; + } + TrackerHitExtended* hitExt = it->second; //info() << hit.id() << " " << hitExt << endmsg; hitExt->setTrackExtended( trackExt ); trackExt->addTrackerHitExtended( hitExt ); @@ -1231,8 +1236,17 @@ void FullLDCTrackingAlg::prepareVectors() { char strg[200]; HelixClass helixSi; for (int iHit=0;iHitsecond; hitExt->setTrackExtended( trackExt ); trackExt->addTrackerHitExtended( hitExt ); @@ -1534,8 +1548,8 @@ TrackExtended * FullLDCTrackingAlg::CombineTracks(TrackExtended * tpcTrack, Trac int nTPCHits = int(tpcHitVec.size()); int nHits = nTPCHits + nSiHits; - //std::cout << "FullLDCTrackingAlg::CombineTracks nSiHits = " << nSiHits << endmsg; - //std::cout << "FullLDCTrackingAlg::CombineTracks nTPCHits = " << nTPCHits << endmsg; + //debug() << "FullLDCTrackingAlg::CombineTracks nSiHits = " << nSiHits << endmsg; + //debug() << "FullLDCTrackingAlg::CombineTracks nTPCHits = " << nTPCHits << endmsg; TrackerHitVec trkHits; trkHits.reserve(nHits); @@ -1748,7 +1762,7 @@ TrackExtended * FullLDCTrackingAlg::CombineTracks(TrackExtended * tpcTrack, Trac tpcHitInFit.push_back(tpcHitVec[i]); } } - + debug() << "FullLDCTrackingAlg::CombineTracks: Check for Silicon Hit rejections ... " << endmsg; if ( (int)siOutliers.size() > _maxAllowedSiHitRejectionsForTrackCombination ) {