Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
This seems more complicated than it needs to be. Review comments to follow, including some suggestions for simplification, but in general this could be a lot simpler, if we just remove the shield_db. With TRY2026, it has now outlived its purpose and we can just implement the one shield configuration directly in C++. |
|
@coderabbitai review |
Action not completed
|
|
Please resolve the merge conflicts and trigger a coderabbit review |
olantwin
left a comment
There was a problem hiding this comment.
One real problem is the block naming, which the muon DIS code picks up (inline). I also think the configuration can be cut down a lot without changing which blocks get built; there's a suggestion inline.
Please rebase to resolve the merge conflicts.
| if (z2 <= z1 || y_top <= y_bottom) { | ||
| continue; | ||
| } | ||
| TString name = magnetName + Form("_FloorBlock%d", ++n_blocks); |
There was a problem hiding this comment.
The blocks are named Magn2_FloorBlock1 and so on, and newMuonDIS decides what belongs to the muon shield by looking for "Magn" in the volume name (MuGeoProcessor::CacheGeometry, MuonPath::GetLabel). The concrete therefore ends up in fShieldVolumes and is labelled "MS". It counts towards the 20 cm kMuonShieldTailZ cut-off in backward tracing, and DIS sampled "in the shield" can land in it. Could you give the blocks a name without "Magn", e.g. FloorBlock_M2_1?
There was a problem hiding this comment.
the blocks are renamed FloorBlock_M_, so newMuonDIS no longer picks them up.
| # FloorGap above the floor and MagnetGap below the magnet. Set FirstMagnet | ||
| # to -1 to build none. | ||
| c.muShield.FloorBlocks = AttrDict() | ||
| c.muShield.FloorBlocks.FirstMagnet = 2 |
There was a problem hiding this comment.
I think this could be simpler for the same result. M4 and M5 are the only magnets over the stair step, and NoStairStep = [4, 5] skips both, so the stair segment never builds a block. The three knobs are also row numbers for TRY_2026 that get set for every shieldName.
How about one list per shield in shield_db, next to params:
# [magnet row, floor gap]: concrete from the floor (+ gap) to 30 cm below the magnet.
# M5 leaves 1 m of air above the ECN3 floor for electronics.
"floor_blocks": [[2, 0.1], [3, 0.1], [4, 0.1], [5, 100.0], [6, 0.1], [7, 0.1]], and never building over the stair? CreateFloorBlocks then only needs two floor levels (TCC8 up to z_transition, ECN3 from the end of the step), and the C++ side gets a single AddFloorBlock(magnet, floor_gap). That removes FirstMagnet and its -1 sentinel, NoStairStep, SkipFloorBlockOnStair and FloorGapPerMagnet. It also makes a new shield state its own blocks. (Pairs rather than a dict, since dumps_json would turn int keys into strings.)
Or as mentioned in my previous comment, we could probably now just hard code things and remove a lot of config code for the muon shield.
| ship_geo.cave.z_transition, | ||
| ship_geo.cave.stair_step_length, | ||
| ) | ||
| for magnet in blocks.get("NoStairStep", []): # absent in older geometry files |
There was a problem hiding this comment.
With the list above this becomes a single for magnet, gap in ship_geo.muShield.get("floor_blocks", []):. As it stands, the .get() fallbacks for NoStairStep/FloorGapPerMagnet aren't needed: those keys arrived with FloorBlocks. And a typo would quietly build the stair blocks.
| continue; | ||
| } | ||
| TString name = magnetName + Form("_FloorBlock%d", ++n_blocks); | ||
| LOG(info) << "Floor block " << name << ": y = [" << y_bottom << ", " |
There was a problem hiding this comment.
CreateMagnet logs at debug; info here adds six lines to every job.
Fill the space between the cavern floor and the muon shield magnets M2 to M7 with concrete blocks of the magnet width and length, from a floor gap above the floor to 30 cm below the magnet. A block is split where the floor steps down from TCC8 to ECN3, and none is built over the stair step itself. The blocks are listed per shield in shield_db as [magnet row, floor gap] pairs; M5 leaves 1 m of air above the ECN3 floor for electronics. They are named FloorBlock_M<n>_<i>, without "Magn", so newMuonDIS does not count them as muon shield. Geometry files made before this do not build the blocks. Assisted-by: Claude Code:claude-opus-5-5
234e139 to
341bb0f
Compare
Fill the space between the cavern floor and the muon shield magnets M2 to M7 with concrete blocks of the magnet width and length, from a floor gap above the floor to 30 cm below the magnet. A block is split where the floor steps down from TCC8 to ECN3, and none is built over the stair step itself.
The blocks are listed per shield in
shield_dbas[magnet row, floor gap]pairs; M5 leaves 1 m of air above the ECN3 floor for electronics. They are namedFloorBlock_M<n>_<i>, without "Magn", so newMuonDIS does not count them as muon shield. Geometry files made before this do not build the blocks.Assisted-by: Claude Code:claude-opus-5-5
Checklist
Summary by CodeRabbit