Skip to content

feat: Add the option of bin counting histograms for the surfaces material maps#5567

Draft
dimitra97 wants to merge 5 commits into
acts-project:mainfrom
dimitra97:binnedmaterial-bincounts
Draft

feat: Add the option of bin counting histograms for the surfaces material maps#5567
dimitra97 wants to merge 5 commits into
acts-project:mainfrom
dimitra97:binnedmaterial-bincounts

Conversation

@dimitra97

@dimitra97 dimitra97 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

This PR introduces the possibility of recording the bin counts optionally and create an extra histogram in the material maps for every mapped surface.

It has been enabled by a flag when estimating the total average material to optionally record the bin counts and pass it in the constructor of the BinnedSurfaceMaterial (otherwise an empty matrix is passed).

It can be useful for statistical studies (how many bins have been mapped with how many hits etc during the material mapping) as a root macro that I have included can show this use case.

I tried to make it as simple as possible and not to affect much clients' side and experiments that already rely on these functions.

--- END COMMIT MESSAGE ---

Tagging @asalzburger @noemina

@github-actions github-actions Bot added Component - Core Affects the Core module Component - Examples Affects the Examples module Component - Plugins Affects one or more Plugins labels Jun 9, 2026
@github-actions github-actions Bot added this to the next milestone Jun 9, 2026
Comment thread Examples/Scripts/MaterialMapping/Mat_map_stats.C Outdated
@andiwand andiwand changed the title feat: Addd the option of bin counting histograms for the surfaces material maps feat: Add the option of bin counting histograms for the surfaces material maps Jun 10, 2026
BinnedSurfaceMaterial(const BinUtility& binUtility,
MaterialSlabVector materialVector,
double splitFactor = 0.,
std::vector<unsigned int> binCounts = {},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this to be non-breaking the parameter would have to be the last one

BinnedSurfaceMaterial(const BinUtility& binUtility,
MaterialSlabMatrix materialMatrix,
double splitFactor = 0.,
std::vector<std::vector<unsigned int>> binCounts = {},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Comment on lines +147 to +148
std::unique_ptr<const ISurfaceMaterial> totalAverage(
bool recordBinCounts = false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we really want to pipe everything through the reconstruction abstraction. if these were two different interfaces we could leave the reco untouched

one way out might be to containerize the accumulated material with dynamic columns and trimming that for reconstruction purposes

but all of this is rather long term compared to this change here

cc @asalzburger

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, the GridSurfaceMaterial has already some sort of containerized option. I am sort of waiting until we have the axis work through to clean this one up - probably we wait for the binCounts to added at that stage then?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok sounds like an option. I draft it for now and go with the containerized option, once the axis refactoring is also done

@dimitra97 dimitra97 marked this pull request as draft June 16, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component - Core Affects the Core module Component - Examples Affects the Examples module Component - Plugins Affects one or more Plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants