-
Notifications
You must be signed in to change notification settings - Fork 225
Subdet track fits ii #4263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Subdet track fits ii #4263
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -526,11 +526,11 @@ void PHActsTrkFitter::loopTracks(Acts::Logging::Level logLevel) | |
|
|
||
| // position comes from the silicon seed, unless there is no silicon seed | ||
| Acts::Vector3 position(0, 0, 0); | ||
| if (siseed) | ||
| if (siseed && !m_ignoreSilicon) | ||
| { | ||
| position = TrackSeedHelper::get_xyz(siseed) * Acts::UnitConstants::cm; | ||
| } | ||
| if (!siseed || !is_valid(position) || m_ignoreSilicon) | ||
| if (!siseed || !is_valid(position) || m_forceTpcOnlyFit) | ||
| { | ||
| position = TrackSeedHelper::get_xyz(tpcseed) * Acts::UnitConstants::cm; | ||
| } | ||
|
|
@@ -574,6 +574,13 @@ void PHActsTrkFitter::loopTracks(Acts::Logging::Level logLevel) | |
| continue; | ||
| } | ||
| } | ||
| //else if (m_forceTpcOnlyFit) | ||
| //{ | ||
| // if (surface_apr->geometryId().volume() < 14) | ||
| // { | ||
| // continue; | ||
| // } | ||
| //} | ||
| bool pop_flag = false; | ||
| if (surface_apr->geometryId().approach() == 1) | ||
| { | ||
|
|
@@ -643,7 +650,7 @@ void PHActsTrkFitter::loopTracks(Acts::Logging::Level logLevel) | |
| float seedphi = 0; | ||
| float seedtheta = 0; | ||
| float seedeta = 0; | ||
| if (siseed) | ||
| if (siseed && !m_forceTpcOnlyFit) | ||
| { | ||
| seedphi = siseed->get_phi(); | ||
| seedtheta = siseed->get_theta(); | ||
|
|
@@ -984,6 +991,9 @@ SourceLinkVec PHActsTrkFitter::filterSourceLinks(const SourceLinkVec& sourceLink | |
| if (m_forceSiOnlyFit && (m_tGeometry->maps().isMicromegasSurface(surf) || m_tGeometry->maps().isTpcSurface(surf)) ) | ||
| { continue; } | ||
|
|
||
| if (m_forceTpcOnlyFit && (m_tGeometry->maps().isMicromegasSurface(surf) || m_tGeometry->maps().isSiSurface(surf)) ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to be only skipping the non TPC surfaces, but the source links are still added right?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I didn't try and skip adding sourcelinks, I just ignored them in the fitting process.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That means this will only work for the direct navigator then, I think |
||
| { continue; } | ||
|
|
||
| // update vectors | ||
| filtered.push_back(sl); | ||
| } | ||
|
|
@@ -1070,7 +1080,7 @@ void PHActsTrkFitter::updateSvtxTrack( | |
| track->identify(); | ||
| } | ||
|
|
||
| if (!m_fitSiliconMMs && !m_forceSiOnlyFit) | ||
| if (!m_fitSiliconMMs && !m_forceSiOnlyFit && !m_forceTpcOnlyFit) | ||
| { | ||
| track->clear_states(); | ||
| } | ||
|
|
@@ -1097,9 +1107,20 @@ void PHActsTrkFitter::updateSvtxTrack( | |
| track->set_y(params.position(m_transient_geocontext)(1) / Acts::UnitConstants::cm); | ||
| track->set_z(params.position(m_transient_geocontext)(2) / Acts::UnitConstants::cm); | ||
|
|
||
| track->set_px(params.momentum()(0)); | ||
| track->set_py(params.momentum()(1)); | ||
| track->set_pz(params.momentum()(2)); | ||
| auto* seed = track->get_tpc_seed(); | ||
|
|
||
| if(!m_forceSiOnlyFit) | ||
| { | ||
| track->set_px(params.momentum()(0)); | ||
| track->set_py(params.momentum()(1)); | ||
| track->set_pz(params.momentum()(2)); | ||
| } | ||
| else | ||
| { | ||
| track->set_px(seed->get_px()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand this, why would we set the output track to have momentum from the seed parameters?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the case of the Si only track fit, the pT resolution is so bad it actually is a huge improvement to use the TPC seed pT for the final value of pT instead of the Si fitted pT.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So what happens if the silicon-TPC match was wrong? I'm not sure we can just unilaterally do this for all attempted track fits |
||
| track->set_py(seed->get_py()); | ||
| track->set_pz(seed->get_pz()); | ||
| } | ||
|
|
||
| track->set_charge(params.charge()); | ||
| track->set_chisq(trajState.chi2Sum); | ||
|
|
@@ -1134,7 +1155,7 @@ void PHActsTrkFitter::updateSvtxTrack( | |
|
|
||
| // in using silicon mm fit also extrapolate track parameters to all TPC surfaces with clusters | ||
| // get all tpc clusters | ||
| auto* seed = track->get_tpc_seed(); | ||
|
|
||
| if (m_fitSiliconMMs && seed) | ||
| { | ||
| // acts propagator | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Position regression when
m_ignoreSilicon=true: seed perigee is created at the origin instead of the TPC seed position.When
m_ignoreSilicon=true,siseedis non-null, andm_forceTpcOnlyFit=false:if (siseed && !m_ignoreSilicon)isfalse→positionstays(0, 0, 0).!siseedisfalse,!is_valid((0,0,0))isfalse(no NaN),m_forceTpcOnlyFitisfalse→ the TPC fallback is never reached.The
Acts::PerigeeSurface(line 695) and the four-vector seed (line 697) are then anchored at the origin, which can cause propagation failures or severely biased fits for any run usingignoreSilicon().The
!m_ignoreSiliconguard was correctly added to line 529 to stop seeding from silicon when its clusters are excluded, but the corresponding fallback on line 533 was not extended to cover that case.🔧 Proposed fix
Or, equivalently, restructure as a single conditional:
Note: the restructured form always falls back to the TPC position for any uncovered case (no silicon, silicon ignored, TPC-only mode, or invalid position).
📝 Committable suggestion