Skip to content
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

TRestGeant4AnalysisProcess should support volume name expressions #109

Open
lobis opened this issue Aug 3, 2023 · 0 comments
Open

TRestGeant4AnalysisProcess should support volume name expressions #109

lobis opened this issue Aug 3, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@lobis
Copy link
Member

lobis commented Aug 3, 2023

When working with geometries with large number of volumes it's tedious and prone to error to manually enumerate volumes for energy deposition. Currently one can skip the enumeration all together and all volumes will be recorded but the user may not want this.

I tried to implement this but it's not straightforward due to how observables are defined.

Example of current usage:

            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop2_assembly-5.veto1_scintillatorVolume-1500.0mm-7326620dVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop2_assembly-5.veto2_scintillatorVolume-1500.0mm-7326620dVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop2_assembly-5.veto3_scintillatorVolume-1500.0mm-7326620dVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop2_assembly-5.veto4_scintillatorVolume-1500.0mm-7326620dVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop3_assembly-5.veto1_scintillatorVolume-1500.0mm-7326620dVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop3_assembly-5.veto2_scintillatorVolume-1500.0mm-7326620dVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop3_assembly-5.veto3_scintillatorVolume-1500.0mm-7326620dVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop3_assembly-5.veto4_scintillatorVolume-1500.0mm-7326620dVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom1_assembly-10.veto1_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom1_assembly-10.veto2_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom1_assembly-10.veto3_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom1_assembly-10.veto4_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom2_assembly-10.veto1_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom2_assembly-10.veto2_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom2_assembly-10.veto3_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom2_assembly-10.veto4_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom3_assembly-10.veto1_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom3_assembly-10.veto2_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom3_assembly-10.veto3_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBottom_vetoLayerBottom3_assembly-10.veto4_scintillatorVolume-1500.0mm-73266212VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemEast_vetoLayerEast1_assembly-13.veto1_scintillatorVolume-1500.0mm-f1a5df68VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemEast_vetoLayerEast1_assembly-13.veto2_scintillatorVolume-1500.0mm-f1a5df68VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemEast_vetoLayerEast1_assembly-13.veto3_scintillatorVolume-1500.0mm-f1a5df68VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemEast_vetoLayerEast2_assembly-13.veto1_scintillatorVolume-1500.0mm-f1a5df68VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemEast_vetoLayerEast2_assembly-13.veto2_scintillatorVolume-1500.0mm-f1a5df68VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemEast_vetoLayerEast2_assembly-13.veto3_scintillatorVolume-1500.0mm-f1a5df68VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemEast_vetoLayerEast3_assembly-13.veto1_scintillatorVolume-1500.0mm-f1a5df68VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemEast_vetoLayerEast3_assembly-13.veto2_scintillatorVolume-1500.0mm-f1a5df68VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemEast_vetoLayerEast3_assembly-13.veto3_scintillatorVolume-1500.0mm-f1a5df68VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemWest_vetoLayerWest1_assembly-16.veto1_scintillatorVolume-1500.0mm-f1a5df6bVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemWest_vetoLayerWest1_assembly-16.veto2_scintillatorVolume-1500.0mm-f1a5df6bVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemWest_vetoLayerWest1_assembly-16.veto3_scintillatorVolume-1500.0mm-f1a5df6bVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemWest_vetoLayerWest2_assembly-16.veto1_scintillatorVolume-1500.0mm-f1a5df6bVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemWest_vetoLayerWest2_assembly-16.veto2_scintillatorVolume-1500.0mm-f1a5df6bVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemWest_vetoLayerWest2_assembly-16.veto3_scintillatorVolume-1500.0mm-f1a5df6bVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemWest_vetoLayerWest3_assembly-16.veto1_scintillatorVolume-1500.0mm-f1a5df6bVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemWest_vetoLayerWest3_assembly-16.veto2_scintillatorVolume-1500.0mm-f1a5df6bVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemWest_vetoLayerWest3_assembly-16.veto3_scintillatorVolume-1500.0mm-f1a5df6bVolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop1_assembly-8.veto1_scintillatorVolume-800.0mm-73266210VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop1_assembly-8.veto2_scintillatorVolume-800.0mm-73266210VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemTop_vetoLayerTop1_assembly-8.veto3_scintillatorVolume-800.0mm-73266210VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBack_vetoLayerBack1_assembly-22.veto1_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBack_vetoLayerBack1_assembly-22.veto2_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBack_vetoLayerBack1_assembly-22.veto3_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBack_vetoLayerBack2_assembly-22.veto1_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBack_vetoLayerBack2_assembly-22.veto2_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBack_vetoLayerBack2_assembly-22.veto3_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBack_vetoLayerBack3_assembly-22.veto1_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBack_vetoLayerBack3_assembly-22.veto2_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemBack_vetoLayerBack3_assembly-22.veto3_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemFront_vetoLayerBack1_assembly-22.veto1_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemFront_vetoLayerBack1_assembly-22.veto2_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemFront_vetoLayerBack1_assembly-22.veto3_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemFront_vetoLayerBack2_assembly-22.veto1_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemFront_vetoLayerBack2_assembly-22.veto2_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemFront_vetoLayerBack2_assembly-22.veto3_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemFront_vetoLayerBack3_assembly-22.veto1_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemFront_vetoLayerBack3_assembly-22.veto2_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>
            <observable
                    name="VetoSystem_vetoSystemFront_vetoLayerBack3_assembly-22.veto3_scintillatorVolume-800.0mm-f1a5df86VolumeEDep"
                    volume="ON"/>

Example of desired usage (syntax subject to change):

            <observable
                    name="*scintillatorVolume*VolumeEDep"
                    volume="ON"/>
@jgalan jgalan added the enhancement New feature or request label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants