-
Notifications
You must be signed in to change notification settings - Fork 220
CM Distortion dPhi vs R*dPhi #4184
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
Changes from all commits
e13a266
e6f71b2
5951a0e
008a012
3ec981b
0eafbd4
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 |
|---|---|---|
|
|
@@ -412,22 +412,22 @@ int TpcLaminationFitting::process_event(PHCompositeNode *topNode) | |
| { | ||
| for (int l = 0; l < 18; l++) | ||
| { | ||
| double shift = m_laminationIdeal[l][side]; | ||
| double shift = m_laminationIdeal[l][side]; | ||
|
|
||
| double phi2pi = tmp_pos.Phi(); | ||
| if (side && phi2pi < -0.2) | ||
| { | ||
| phi2pi += 2 * M_PI; | ||
| } | ||
| if (!side && phi2pi < M_PI / 18 - 0.2) | ||
| { | ||
| phi2pi += 2 * M_PI; | ||
| } | ||
| double phi2pi = tmp_pos.Phi(); | ||
| if (side && phi2pi < -0.2) | ||
| { | ||
| phi2pi += 2 * M_PI; | ||
| } | ||
| if (!side && phi2pi < M_PI / 18 - 0.2) | ||
| { | ||
| phi2pi += 2 * M_PI; | ||
| } | ||
|
|
||
| if (phi2pi > shift - 0.2 && phi2pi < shift + 0.2) | ||
| { | ||
| m_hLamination[l][side]->Fill(tmp_pos.Perp(), phi2pi); | ||
| } | ||
| if (phi2pi > shift - 0.2 && phi2pi < shift + 0.2) | ||
| { | ||
| m_hLamination[l][side]->Fill(tmp_pos.Perp(), phi2pi); | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -745,15 +745,19 @@ int TpcLaminationFitting::InterpolatePhiDistortions() | |
| int phiBin = phiDistortionLamination[s]->GetXaxis()->FindBin(phi); | ||
| if(m_fieldOff) | ||
| { | ||
| m_laminationOffset[l][s] = m_fLamination[l][s]->GetParameter(0); | ||
| m_laminationOffset[l][s] = m_fLamination[l][s]->GetParameter(0); | ||
| m_fLamination[l][s]->SetParameter(1, 0.0); | ||
| } | ||
| else | ||
| { | ||
| //m_fLamination[l][s]->SetParameter(3, -1.0*m_laminationOffset[l][s]); | ||
| m_fLamination[l][s]->SetParameter(3, 0.0); | ||
| } | ||
| double phiDistortion = R * m_fLamination[l][s]->Integral(phiDistortionLamination[s]->GetYaxis()->GetBinLowEdge(i), phiDistortionLamination[s]->GetYaxis()->GetBinLowEdge(i + 1)) / (phiDistortionLamination[s]->GetYaxis()->GetBinLowEdge(i + 1) - phiDistortionLamination[s]->GetYaxis()->GetBinLowEdge(i)); | ||
| double phiDistortion = m_fLamination[l][s]->Integral(phiDistortionLamination[s]->GetYaxis()->GetBinLowEdge(i), phiDistortionLamination[s]->GetYaxis()->GetBinLowEdge(i + 1)) / (phiDistortionLamination[s]->GetYaxis()->GetBinLowEdge(i + 1) - phiDistortionLamination[s]->GetYaxis()->GetBinLowEdge(i)); | ||
| if(!m_phiHist_in_rad) | ||
| { | ||
| phiDistortion *= R; | ||
| } | ||
|
Comment on lines
+757
to
+760
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. 🧩 Analysis chain🏁 Script executed: fd "TpcDistortionCorrection" --type fRepository: sPHENIX-Collaboration/coresoftware Length of output: 228 🏁 Script executed: rg -n "m_hDPint|hDPint|DPint" --type cpp -C 3 | head -100Repository: sPHENIX-Collaboration/coresoftware Length of output: 9481 🏁 Script executed: rg -n "get_corrected_position" --type cpp -A 20 -B 2 | head -150Repository: sPHENIX-Collaboration/coresoftware Length of output: 13348 🏁 Script executed: rg -n "phiHist_in_rad|phiHistInRad|set_phiHistInRad" --type cppRepository: sPHENIX-Collaboration/coresoftware Length of output: 969 🏁 Script executed: sed -n '70,120p' offline/packages/tpc/TpcDistortionCorrection.ccRepository: sPHENIX-Collaboration/coresoftware Length of output: 1642 🏁 Script executed: rg -n "m_phi_hist_in_radians|divisor" offline/packages/tpc/TpcDistortionCorrection.ccRepository: sPHENIX-Collaboration/coresoftware Length of output: 305 🏁 Script executed: cat -n offline/packages/tpc/TpcDistortionCorrectionContainer.h | head -60Repository: sPHENIX-Collaboration/coresoftware Length of output: 1738 🏁 Script executed: rg -n "m_dcc_out\|m_dcc_in" offline/packages/tpccalib/TpcLaminationFitting.cc | grep -E "(set_phiHistInRad|m_phi_hist_in_radians)" | head -5Repository: sPHENIX-Collaboration/coresoftware Length of output: 60 🏁 Script executed: git log --oneline -1 --format="%B" 2>/dev/null | head -20 || echo "PR description not directly accessible in repo context"Repository: sPHENIX-Collaboration/coresoftware Length of output: 209 PR description must document the default calibration output unit change and reprocessing implications. The code change itself is internally consistent—the container flag With Before merging, the PR description must explicitly state:
|
||
| if(m_fieldOff) | ||
| { | ||
| m_fLamination[l][s]->SetParameter(1, m_laminationIdeal[l][s]); | ||
|
|
@@ -1207,9 +1211,22 @@ int TpcLaminationFitting::End(PHCompositeNode * /*topNode*/) | |
| } | ||
| m_laminationTree->Write(); | ||
|
|
||
| m_hLamination[13][0]->Write(); | ||
| m_hLamination[13][1]->Write(); | ||
| m_hLamination[14][1]->Write(); | ||
| if(m_saveAllLaminationHistograms) | ||
| { | ||
| for(auto &i : m_hLamination) | ||
| { | ||
| for(auto &j : i) | ||
| { | ||
| j->Write(); | ||
| } | ||
| } | ||
| } | ||
| else | ||
| { | ||
| m_hLamination[13][0]->Write(); | ||
| m_hLamination[13][1]->Write(); | ||
| m_hLamination[14][1]->Write(); | ||
| } | ||
|
Comment on lines
+1224
to
+1229
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.
The 🐛 Proposed fix m_hLamination[13][0]->Write();
m_hLamination[13][1]->Write();
+ m_hLamination[14][0]->Write();
m_hLamination[14][1]->Write(); |
||
|
|
||
|
|
||
| outputfile->Close(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,10 @@ class TpcLaminationFitting : public SubsysReco | |
|
|
||
| void set_ppMode(bool mode){ ppMode = mode; } | ||
|
|
||
| void set_phiHistInRad(bool rad){ m_phiHist_in_rad = rad; } | ||
|
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. 🧩 Analysis chain🏁 Script executed: rg -n "m_phiHist_in_rad" --type cpp -C 3Repository: sPHENIX-Collaboration/coresoftware Length of output: 5757 🏁 Script executed: fd "TpcLaminationFitting\.cc" --type fRepository: sPHENIX-Collaboration/coresoftware Length of output: 127 Remove The member declared at line 126 and setter at line 53 are never read in |
||
|
|
||
| void set_saveAllLaminationHistograms(bool save){ m_saveAllLaminationHistograms = save; } | ||
|
|
||
| void set_fieldOff(bool fieldOff){ m_fieldOff = fieldOff; } | ||
|
|
||
| void set_grid_dimensions(int phibins, int rbins); | ||
|
|
@@ -121,6 +125,9 @@ class TpcLaminationFitting : public SubsysReco | |
| //std::map<int, float> m_run_ZDC_map_pp; | ||
| //std::map<int, float> m_run_ZDC_map_auau; | ||
|
|
||
| bool m_phiHist_in_rad{true}; | ||
| bool m_saveAllLaminationHistograms{false}; | ||
|
|
||
| std::string m_stripePatternFile = "/sphenix/u/bkimelman/CMStripePattern.root"; | ||
|
|
||
| bool m_fieldOff{false}; | ||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
rg -n "m_interpolate_z" --type cpp -C 4Repository: sPHENIX-Collaboration/coresoftware
Length of output: 6813
🏁 Script executed:
Repository: sPHENIX-Collaboration/coresoftware
Length of output: 5887
🏁 Script executed:
Repository: sPHENIX-Collaboration/coresoftware
Length of output: 2458
Confirm the PR description documents this z-interpolation change and its analysis impact.
The
m_interpolate_z = falseassignment is intentional and physically justified. The code comment at line 2934 explicitly states that CM-derived corrections are 2D because "central membrane flashes only provide distortions at z = 0". Settingm_interpolate_z = falselogically follows: since the correction has no z-dependence information, applying z-interpolation to zero at readout would be meaningless.However, this is still a reconstruction behavior change affecting downstream analyses. Per standard practices, the PR description should document the expected impact on analysis outputs and whether reprocessing of existing data is required.