-
Notifications
You must be signed in to change notification settings - Fork 225
Alignment updates #4413
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?
Alignment updates #4413
Changes from all commits
78fca5e
32a6a61
886f0c1
e827b35
b473ad3
f4ef99a
7bb7d16
879068a
72e1d6a
30f363f
7a16a21
f800322
ce02c5e
3c0045e
96ccfed
0684b02
101cea4
682f004
561241e
305d23a
fbde6be
58c1368
b2cfb80
8050b68
c62f7f8
bd5618f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -538,6 +538,12 @@ void TrackResiduals::fillVertexTree(PHCompositeNode* topNode) | |
| { | ||
| continue; | ||
| } | ||
| m_pcax_vtx_trk.push_back(track->get_x()); | ||
| m_pcay_vtx_trk.push_back(track->get_y()); | ||
| m_pcaz_vtx_trk.push_back(track->get_z()); | ||
| m_px_vtx_trk.push_back(track->get_px()); | ||
| m_py_vtx_trk.push_back(track->get_py()); | ||
| m_pz_vtx_trk.push_back(track->get_pz()); | ||
|
Comment on lines
+541
to
+546
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. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Reset the vertex-track vectors for each tree entry. These vectors are appended here, but Clear all six vectors before filling each vertex and at the event boundary. As per path instructions, this C++ correctness issue is raised at Major severity. Proposed reset void TrackResiduals::clearClusterStateVectors()
{
+ m_pcax_vtx_trk.clear();
+ m_pcay_vtx_trk.clear();
+ m_pcaz_vtx_trk.clear();
+ m_px_vtx_trk.clear();
+ m_py_vtx_trk.clear();
+ m_pz_vtx_trk.clear();
}Also clear the six vectors at the start of each vertex iteration. Source: Path instructions |
||
| for (const auto& ckey : get_cluster_keys(track)) | ||
| { | ||
| TrkrCluster* cluster = clustermap->findCluster(ckey); | ||
|
|
@@ -600,7 +606,7 @@ void TrackResiduals::circleFitClusters( | |
|
|
||
| auto xyparams = TrackFitUtils::line_fit(xypoints); | ||
| auto yzLineParams = TrackFitUtils::line_fit(yzpoints); | ||
| auto fitpars = TrackFitUtils::fitClusters(global_vec, keys, false); | ||
| auto fitpars = TrackFitUtils::fitClusters(global_vec, keys, false,false,false,true); | ||
|
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. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- applicable repository guidance ---'
find /tmp/coderabbit-repo-knowledge/sphenix-collaboration-coresoftware-9416dca5 -type f -name '*.md' -maxdepth 3 -print
printf '%s\n' '--- target file context ---'
sed -n '500,630p' offline/packages/TrackingDiagnostics/TrackResiduals.cc
printf '%s\n' '--- relevant TrackResiduals definitions and callers ---'
rg -n -C 6 'clearClusterStateVectors|fillResidualTreeSeeds|fitClusters|circleFitClusters|is_cosmics|m_rzslope|m_rzint' offline/packages/TrackingDiagnostics/TrackResiduals.cc offline/packages/trackbaseRepository: sPHENIX-Collaboration/coresoftware Length of output: 44747 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- repository convention and scoped learning ---'
cat /tmp/coderabbit-repo-knowledge/sphenix-collaboration-coresoftware-9416dca5/conventions/repo-wide.md
printf '%s\n' '--- target header/configuration declarations ---'
fd -i 'TrackResiduals' offline/packages/TrackingDiagnostics
rg -n -C 5 'cosmic|m_convertSeeds|m_linefitTPCOnly|circleFitClusters|fillClusterBranchesSeeds' offline/packages/TrackingDiagnostics
printf '%s\n' '--- seed-track fit branch and parameter consumption ---'
sed -n '2460,2710p' offline/packages/TrackingDiagnostics/TrackResiduals.cc
sed -n '1625,1670p' offline/packages/TrackingDiagnostics/TrackResiduals.cc
printf '%s\n' '--- resolved helix-intersection contract ---'
rg -n -C 12 'get_helix_surface_intersection' offline/packages/trackbase/TrackFitUtils.h offline/packages/trackbase/TrackFitUtils.ccRepository: sPHENIX-Collaboration/coresoftware Length of output: 42268 Pass the cosmic-mode flag to On the non-zero-field, non-alignment path, Sources: Path instructions, MCP tools |
||
| // auto fitpars = TrackFitUtils::fitClusters(global_vec, keys, !m_linefitTPCOnly); | ||
| m_xyint = std::get<1>(xyparams); | ||
| m_xyslope = std::get<0>(xyparams); | ||
|
|
@@ -1783,6 +1789,12 @@ void TrackResiduals::createBranches() | |
| m_vertextree->Branch("gz", &m_clusgz); | ||
| m_vertextree->Branch("gr", &m_clusgr); | ||
| m_vertextree->Branch("mbdcharge", &m_totalmbd, "m_totalmbd/F"); | ||
| m_vertextree->Branch("pcax_vtx_trk", &m_pcax_vtx_trk); | ||
| m_vertextree->Branch("pcay_vtx_trk", &m_pcay_vtx_trk); | ||
| m_vertextree->Branch("pcaz_vtx_trk", &m_pcaz_vtx_trk); | ||
| m_vertextree->Branch("px_vtx_trk", &m_px_vtx_trk); | ||
| m_vertextree->Branch("py_vtx_trk", &m_py_vtx_trk); | ||
| m_vertextree->Branch("pz_vtx_trk", &m_pz_vtx_trk); | ||
|
|
||
| m_hittree = new TTree("hittree", "A tree with all hits"); | ||
| m_hittree->Branch("run", &m_runnumber, "m_runnumber/I"); | ||
|
|
||
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Preserve calibrated TPC uncertainties.
When
m_ignore_tpcis false, these lines bypass_ClusErrPara.get_clusterv5_modified_error(...), which applies TPC layer, edge, overlap, and cluster-size corrections. Restore the calibrated error path, or define and validate the raw-error policy because the current code changes TPC measurement weights and can bias the alignment solution.