Conversation
|
Hi @bechenard,
which require these tests: build. @Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main. ⌛ The following tests have been triggered for 5ec3ee4: build (Build queue - API unavailable) |
|
☔ The build tests failed for 5ec3ee4.
N.B. These results were obtained from a build of this Pull Request at 5ec3ee4 after being merged into the base branch at a500268. For more information, please check the job page here. |
|
@FNALbuild run build test with Mu2e/mu2e-trig-config#140 |
|
⌛ The following tests have been triggered for 01e646a: build (Build queue - API unavailable) |
|
☀️ The build tests passed at 01e646a.
N.B. These results were obtained from a build of this Pull Request at 01e646a after being merged into the base branch at a500268. For more information, please check the job page here. |
|
I'll review this pull request by first loading the PR details and its changes.Now let me look at a few more key files to check for remaining references and the PR Review: Calo cond removeSummary: This PR removes the
Potential Issues Found1. 🔴 Copy-paste bug in
|
| Old Parameter | Old Config Key | Replacement in PR? |
|---|---|---|
BirkCorrHadron() |
"BirkCorrHadron" |
❌ Not addressed |
ROnoise() |
"ReadOutElectronicNoise" |
❌ Not addressed |
Peak2MeV() |
"Peak2MeVConversionFactor" |
❌ Not addressed |
If these were still in use elsewhere in the codebase (outside the 32 files changed), removing CalorimeterCalibrations would break those consumers. The search suggests these may not be actively used, but this warrants verification.
4. 🟡 conditions_01.txt data file not deleted but its configure_file removed
In ConditionsService/CMakeLists.txt, the configure_file command for conditions_01.txt is removed:
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/conditions_01.txt ${CURRENT_BINARY_DIR} data/conditions_01.txt)However, conditions_01.txt is still referenced in many other FCL files across the codebase (e.g., fcl/standardServices.fcl, Mu2eG4/fcl/rantest.fcl, ExtinctionMonitorFNAL/test/digiTuning.fcl, CalPatRec/test/trkPatRec_display_read.fcl, and many more). Those files still have:
ConditionsService : { conditionsfile : "Offline/ConditionsService/data/conditions_01.txt" }
The ConditionsService itself still exists (for non-calorimeter conditions), so this should still work. But the conditions_01.txt file itself is no longer being installed by CMake, which could cause a runtime error if the file can't be found. The actual data file (ConditionsService/data/conditions_01.txt) does not appear to be deleted in this PR, only the install rule is removed.
5. 🟡 Loss of per-SiPM calibration granularity
The old CalorimeterCalibrations accepted a SiPM ID for methods like peMeV(int roId), ADC2MeV(int roId), and MeV2ADC(int roId). While the old implementation returned the same constant regardless of roId, the interface allowed per-channel calibration in the future. The new approach uses a single global constant:
float scaleFactor(MeVToADC_/pePerMeV_); // same for all channelsThis is an intentional simplification, but if per-channel calibration is needed later, the parameters would need to be changed to arrays/maps.
6. 🟡 Naming inconsistency: MeVToADC_ vs ADCToMeV
The member variable is named MeVToADC_ but the FCL parameter it reads from is named ADCToMeV, and it's computed as 1.0/config().ADCToMeV(). This inverse naming appears in three different modules (CaloDigiMaker, CaloHitTruthMatch, CaloNoiseSimGenerator), which is at least internally consistent, but could be confusing for future maintainers since the variable name suggests it stores MeV→ADC but the config name says the opposite direction.
7. 🟢 CaloHitMakerFast — Missing ADCToMeV in FCL prolog
The CaloHitMakerFast module now requires an ADCToMeV config parameter, but I don't see it being added to the CaloReco prolog for the CaloHitMakerFast configuration. The CaloReco/fcl/prolog.fcl only adds pulseFileName and pulseHistName to the TemplateProcessor. If the CaloHitMakerFast module is configured via a separate prolog (possibly in files beyond the 30 shown), this may already be handled. Otherwise, it would result in a missing parameter error at runtime.
8. 🟢 Pedestal type change: int → double
The pedestal() return type in CaloNoiseSimGenerator changed from int to double, and the computation changed from int(...) to std::floor(...). The buildOutputDigi method in CaloDigiMaker was also updated to accept double pedestal. This is a good improvement for precision, but note that the comparison if (waveform[i] > pedestal) now compares doubles, which is fine since std::floor returns a whole number as a double.
Summary of Risk Assessment
| Severity | Issue | Action |
|---|---|---|
| 🔴 High | digitizationBuffer_ copy-paste bug (pre-existing) |
Should fix while touching this code |
| 🟡 Medium | Stale ConditionsHandle.hh include in CaloPulseShape.cc |
Clean up |
| 🟡 Medium | conditions_01.txt CMake install rule removed but file still referenced |
Verify runtime behavior |
| 🟡 Medium | Orphaned parameters (BirkCorrHadron, ROnoise, Peak2MeV) |
Verify no other consumers |
| 🟡 Medium | CaloHitMakerFast may be missing ADCToMeV in FCL prolog |
Verify complete FCL config |
| 🟡 Low | Loss of per-channel calibration interface | Intentional design choice |
| 🟡 Low | MeVToADC_ vs ADCToMeV naming confusion |
Consider renaming for clarity |
|
📝 The HEAD of |
|
@FNALbuild run build test |
|
⌛ The following tests have been triggered for 82d70f5: build (Build queue - API unavailable) |
|
☔ The build tests failed for 82d70f5.
N.B. These results were obtained from a build of this Pull Request at 82d70f5 after being merged into the base branch at 9f2c9c8. For more information, please check the job page here. |
|
The service is now "blank" i.e. no service provided, which is fine, since the there should be no requests for information from the service. But there are still many references to the Service out there, and even in private areas. So when these run, the service will attempt to start and then fail to find the conditions_01.txt file. I think if you restore that file, then it should work. The plan then would be to find and fix the outlying references, and give some warning to users. Once that step is done, we can delete the service itself. |
|
I can do that, and add a warning that this file will be deleted soon and people should update their scripts. I'll see if I find more services mentioned in the code or production scripts. |
|
@FNALbuild run build test with Mu2e/mu2e-trig-config#140 |
|
⌛ The following tests have been triggered for 90a2cf6: build (Build queue - API unavailable) |
|
@rlcee I have added a dummy conditions_01.txt file, and done a bit more cleaning. I think this covers the removal of the calorimeter conditions, I'll let you deal with the rest unless there is specific for me to do. |
|
☀️ The build tests passed at 90a2cf6.
N.B. These results were obtained from a build of this Pull Request at 90a2cf6 after being merged into the base branch at 7a15006. For more information, please check the job page here. |
|
I pulled, built, and ran it with a ConditionsService in the fcl and throws. Is that the behavior you expect? It runs if you add "//" to the front of your comment |
rlcee
left a comment
There was a problem hiding this comment.
I think we can go with this version. Thanks
|
I'll review this pull request by first loading its details and the diff.Let me get the remaining files to see the full scope of changes, especially the C++ source files which are more likely to have code-level issues.Now let me get the remaining files and look specifically at the C++ source code changes, which are the most likely to have issues:Now I have a thorough understanding of this PR. Let me provide a comprehensive review. PR Review: Calo cond remove (#1722)Author: @bechenard | Addresses: Issue #1053 | Changed Files: 113 | +181 / -460 SummaryThis PR removes the Issues Found1. 🔴 Commented-out
|
| Severity | Count | Description |
|---|---|---|
| 🔴 High | 2 | Commented-out include should be deleted; buried bug fix needs documentation |
| 🟡 Medium | 5 | Integer vs float constant, inverse parameter duplication risk, dropped calibration params, pedestal type change semantics, incorrect GlobalConstantsService removal |
| 🟢 Low | 2 | Extra blank lines, pre-existing typo |
Note: This review covers only the first ~90 of the 113 changed files. You can view the complete file changes on GitHub for the remaining files.
… CaloShowerROMaker, restored copy of conditions_01.txt
|
@FNALbuild run build test with Mu2e/mu2e-trig-config#140 |
|
⌛ The following tests have been triggered for abf10fa: build (Build queue - API unavailable) |
|
☀️ The build tests passed at abf10fa.
N.B. These results were obtained from a build of this Pull Request at abf10fa after being merged into the base branch at 2fed5e8. For more information, please check the job page here. |
Address issue #1053 to remove calorimeterConditions text