Skip to content

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

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

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

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.

2 participants