From 36a7d550eb634baf18d3d528ea0b26d94d7ee870 Mon Sep 17 00:00:00 2001 From: Chengdong Fu Date: Mon, 16 Oct 2023 15:12:55 +0800 Subject: [PATCH 1/5] avoid null hit for strip dV=0 --- Digitisers/SimpleDigi/src/PlanarDigiAlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Digitisers/SimpleDigi/src/PlanarDigiAlg.cpp b/Digitisers/SimpleDigi/src/PlanarDigiAlg.cpp index 2a4ee084e..973a55628 100644 --- a/Digitisers/SimpleDigi/src/PlanarDigiAlg.cpp +++ b/Digitisers/SimpleDigi/src/PlanarDigiAlg.cpp @@ -259,7 +259,7 @@ StatusCode PlanarDigiAlg::execute() localPointSmeared.setY( localPoint.y() + dy ); //check if hit is in boundaries - if ( ms->isLocalInBoundary( localPointSmeared ) && fabs(dx)<_maxPull*resU && fabs(dy)<_maxPull*resV ) { + if ( ms->isLocalInBoundary( localPointSmeared ) && fabs(dx)<=_maxPull*resU && fabs(dy)<=_maxPull*resV ) { //if ( ms->isLocalInBoundary( localPointSmeared ) ) { accept_hit = true; break; From 027ba4012bcda3b49a976ce3f667a28174e140b8 Mon Sep 17 00:00:00 2001 From: Chengdong Fu Date: Mon, 16 Oct 2023 15:13:53 +0800 Subject: [PATCH 2/5] fix run error --- Examples/options/sim-rec-trackerecal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Examples/options/sim-rec-trackerecal.py b/Examples/options/sim-rec-trackerecal.py index 1117e414a..3e307aaf0 100644 --- a/Examples/options/sim-rec-trackerecal.py +++ b/Examples/options/sim-rec-trackerecal.py @@ -79,7 +79,7 @@ from Configurables import GearSvc gearsvc = GearSvc("GearSvc") -gearsvc.GearXMLFile = "Detector/DetCEPCv4/compact/FullDetGear.xml" +#gearsvc.GearXMLFile = "Detector/DetCEPCv4/compact/FullDetGear.xml" from Configurables import TrackSystemSvc tracksystemsvc = TrackSystemSvc("TrackSystemSvc") @@ -148,7 +148,7 @@ from Configurables import ClupatraAlg clupatra = ClupatraAlg("Clupatra") clupatra.TPCHitCollection = tpchitname -#clupatra.OutputLevel = DEBUG +clupatra.OutputLevel = DEBUG from Configurables import SiliconTrackingAlg tracking = SiliconTrackingAlg("SiliconTracking") @@ -331,7 +331,7 @@ TopAlg = [genalg, detsimalg, digiVXD, digiSIT, digiSET, digiFTD, spSIT, spFTD, digiTPC, clupatra, tracking, forward, subset, full, simHitMerge, caloDigi, pandoralg, write], EvtSel = 'NONE', EvtMax = 10, - ExtSvc = [rndmengine, dsvc, evtseeder, gearsvc, geosvc, tracksystemsvc], + ExtSvc = [rndmengine, dsvc, evtseeder, geosvc, gearsvc, tracksystemsvc], HistogramPersistency='ROOT', OutputLevel=INFO ) From 4c5c921269d0eef760dcce256d393e87938fcfab Mon Sep 17 00:00:00 2001 From: Chengdong Fu Date: Mon, 16 Oct 2023 15:21:36 +0800 Subject: [PATCH 3/5] add unlink while create TrackerHit object --- Reconstruction/Tracking/src/Clupatra/clupatra_new.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Reconstruction/Tracking/src/Clupatra/clupatra_new.cpp b/Reconstruction/Tracking/src/Clupatra/clupatra_new.cpp index 9ecee5641..6ff24484f 100644 --- a/Reconstruction/Tracking/src/Clupatra/clupatra_new.cpp +++ b/Reconstruction/Tracking/src/Clupatra/clupatra_new.cpp @@ -287,7 +287,8 @@ namespace clupatra_new{ UTIL::BitField64 encoder( UTIL::ILDCellID0::encoder_string ) ; encoder[UTIL::ILDCellID0::subdet] = UTIL::ILDDetID::TPC ; - edm4hep::TrackerHit firstHit; // = 0 ; + edm4hep::TrackerHit firstHit = 0; + // = 0 equal to unlink() //firstHit.unlink(); IMarlinTrack* bwTrk = 0 ; From e8835768fd443b39b6e0f083a4713986407bcb8f Mon Sep 17 00:00:00 2001 From: Chengdong Fu Date: Mon, 16 Oct 2023 15:31:59 +0800 Subject: [PATCH 4/5] 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 ) { From 293277b22c059024f1c3b27537077d3b7a7e0984 Mon Sep 17 00:00:00 2001 From: Chengdong Fu Date: Tue, 17 Oct 2023 15:30:31 +0800 Subject: [PATCH 5/5] remove DEBUG for Clupatra --- Examples/options/sim-rec-trackerecal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/options/sim-rec-trackerecal.py b/Examples/options/sim-rec-trackerecal.py index 3e307aaf0..c3a8f6d68 100644 --- a/Examples/options/sim-rec-trackerecal.py +++ b/Examples/options/sim-rec-trackerecal.py @@ -148,7 +148,7 @@ from Configurables import ClupatraAlg clupatra = ClupatraAlg("Clupatra") clupatra.TPCHitCollection = tpchitname -clupatra.OutputLevel = DEBUG +#clupatra.OutputLevel = DEBUG from Configurables import SiliconTrackingAlg tracking = SiliconTrackingAlg("SiliconTracking")