Skip to content

Revert "feat: implement v6 option in tpc clusterizer"#4316

Merged
osbornjd merged 1 commit into
masterfrom
revert-4312-branch
Jun 24, 2026
Merged

Revert "feat: implement v6 option in tpc clusterizer"#4316
osbornjd merged 1 commit into
masterfrom
revert-4312-branch

Conversation

@osbornjd

@osbornjd osbornjd commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Reverts #4312

AI can make mistakes, so please use best judgment when reviewing this summary.

Motivation / context

  • Revert the TPC clusterizer “v6 option” changes and restore the prior cluster data model / reconstruction flow on master.

Key changes

  • Reverted the TpcClusterizer pipeline away from the new ClusterCounters/edge-flag flow and removed the TrkrClusterv6 cluster creation path.
  • Simplified cluster parameter propagation to the reduced touch/edge counters used by the legacy flow.
  • Pruned TrackingDiagnostics::TrackResiduals output:
    • removed many detailed cluster-edge / mix / bin / center fields
    • removed evt_id from multiple trees
    • updated cluster/residual filling and tree branch definitions accordingly
  • Updated TrkrNtuplizer cluster schema and fill logic to match the reduced cluster content.
  • Adjusted TrkrCluster / TrkrClusterv4 / TrkrClusterv5 / TrkrClusterv6 interfaces and defaults to reflect the reverted/streamlined cluster representation.
  • Removed obsolete debug/helper state from TpcClusterizer.

Potential risk areas

  • IO format changes: ROOT tree branch removals/renames and type changes may affect downstream analysis scripts and replay compatibility.
  • Reconstruction behavior: cluster size/edge/overlap handling changed, which can alter cluster properties and derived tracking diagnostics.
  • Thread-safety: TPC clusterizer threading paths were touched; masking/data flow changes should be checked carefully.
  • Performance: clusterization and ntupling logic changed enough to warrant runtime comparison.

Possible future improvements

  • Add explicit schema/version handling for cluster and diagnostics ntuples.
  • Provide migration notes for downstream analysis users.
  • Add focused validation on cluster property distributions and tracking residuals after the revert.

@osbornjd

Copy link
Copy Markdown
Contributor Author

This wasn't ready to merge, we are investigating changes in the real data QA

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 017e2ddd-f9d1-459f-837e-0f045a344ac9

📥 Commits

Reviewing files that changed from the base of the PR and between cebff85 and 62cc591.

📒 Files selected for processing (11)
  • offline/packages/TrackingDiagnostics/TrackResiduals.cc
  • offline/packages/TrackingDiagnostics/TrackResiduals.h
  • offline/packages/TrackingDiagnostics/TrkrNtuplizer.cc
  • offline/packages/tpc/TpcClusterizer.cc
  • offline/packages/tpc/TpcClusterizer.h
  • offline/packages/trackbase/TrkrCluster.h
  • offline/packages/trackbase/TrkrClusterv4.cc
  • offline/packages/trackbase/TrkrClusterv4.h
  • offline/packages/trackbase/TrkrClusterv5.cc
  • offline/packages/trackbase/TrkrClusterv5.h
  • offline/packages/trackbase/TrkrClusterv6.h

📝 Walkthrough

Walkthrough

The PR simplifies the TPC cluster data model by replacing ClusterCounters/TrkrClusterv6 creation with integer touch/edge counters in TpcClusterizer, removes legacy virtual setters from the TrkrCluster base interface and updates v5/v6 implementations, and prunes evt_id plus numerous ADC/bin/edge/mix/phase fields from TrackResiduals and TrkrNtuplizer output trees.

Changes

TPC Cluster Interface Simplification and Diagnostics Pruning

Layer / File(s) Summary
TrkrCluster base interface: type and setter changes
offline/packages/trackbase/TrkrCluster.h
Removes const qualifiers from virtual setter parameters, changes getPadMax/getTBinMax return type from int to float, changes mix getter returns from char to int and bin getters from unsigned short to float, and removes a large block of virtual setter declarations for edges, mixes, bin fields, phase, ADC, and size/error methods.
TrkrClusterv4/v5/v6 override and type alignment
offline/packages/trackbase/TrkrClusterv4.h, TrkrClusterv4.cc, TrkrClusterv5.h, TrkrClusterv5.cc, TrkrClusterv6.h
Drops override from setPhiSize/setZSize in v4; drops override and removes const params from setPhiError/setZError/setPhiSize/setZSize/setOverlap/setEdge in v5; rewrites v6 inline API with float storage for pad/tbin max and bin fields, zero-based defaults, and drops override on many setters. Changes square to inline constexpr in v4/v5.
TpcClusterizer: replace ClusterCounters with integer touch/edge
offline/packages/tpc/TpcClusterizer.cc, offline/packages/tpc/TpcClusterizer.h
Removes TrkrClusterv6.h include and the ClusterCounters/adcval_orig/check_cluster_touching path. Refactors find_t_range, find_phi_range, get_cluster, and calc_cluster_parameter to propagate integer ntouch/nedge. Cluster creation uses TrkrClusterv5 exclusively. Extends thread_data with dead/hot mask fields; removes m_debug and DetailedClusterAnalysis().
TrackResiduals: remove evt_id and legacy cluster fields
offline/packages/TrackingDiagnostics/TrackResiduals.cc, offline/packages/TrackingDiagnostics/TrackResiduals.h
Removes EventHeader/recoConsts includes and m_evt_id. Drops evt_id from all six output TTrees. Replaces clustertree bin/phase branches with phisize/zsize/erphi/ez. Removes edge/mix/phase/bin vector filling in fillClusterBranchesKF and fillClusterBranchesSeeds, replacing with layer/phisize/zsize. Updates clearClusterStateVectors and header members accordingly.
TrkrNtuplizer: prune legacy cluster NTuple columns
offline/packages/TrackingDiagnostics/TrkrNtuplizer.cc
Removes centered ADC/pad/tbin-max and edge/mix/phase fields from n_cluster enum and str_cluster column list. In FillCluster, drops writes to removed fields, changes nclusize to cluster->getSize(), and hardcodes ncluovlp to 3. Minor vertex null-check brace and formatting fixes.

Possibly related PRs

  • sPHENIX-Collaboration/coresoftware#4135: Directly modifies TrackResiduals.cc clustertree ROOT branch definitions (adds a layer branch), overlapping with this PR's cluster branch pruning and restructuring.
  • sPHENIX-Collaboration/coresoftware#4291: Modifies the same TrkrCluster.h pad/tbin max and mix/bin getter interface that this PR refactors (return type changes and setter removals).
  • sPHENIX-Collaboration/coresoftware#4312: Overlaps with this PR on TrackResiduals.cc/h evt_id/cluster-branch content and TpcClusterizer.cc/h v6/ClusterCounters diagnostics paths being modified in both.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@osbornjd osbornjd merged commit 3fd5b69 into master Jun 24, 2026
1 of 3 checks passed
@osbornjd osbornjd deleted the revert-4312-branch branch June 24, 2026 14:58
@sphenix-jenkins-ci

Copy link
Copy Markdown

Build & test report

Report for commit 62cc59121ad8b3d5138df725d674eaeec82cc928:
Jenkins on fire


Automatically generated by sPHENIX Jenkins continuous integration
sPHENIX             jenkins.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant