alcap-org / g4sim

Simulation toolkit based on Geant4 and ROOT
http://wuchen1106.github.io/g4sim/
2 stars 2 forks source link

Ae reconfigure geom configure files #56

Closed AndrewEdmonds11 closed 9 years ago

AndrewEdmonds11 commented 9 years ago

Ok, so I've managed to restructure the geometry files a little to make them more manageable.

I have created a new folder to store all the R2013 geometry: configure/geometry_R2013 so that we can add folders for future runs.

In configure/geometry_R2013 I have created a few geometry files as examples:

As an example, here is andy_geometry_Al50_default:

# The Segment which includes World should be put at the first line!!
        VerboseLevel    1

#ServiceName        ServiceType         FileName
        World           Simple              world_AlCap
        PSI             Simple              geometry_R2013/germanium/subgeo_germanium_with-ge-monitor

        PSI             Simple              geometry_R2013/upstream_counter/subgeo_trigger-box
        PSI             Simple              geometry_R2013/upstream_counter/subgeo_muPC
        PSI             Simple              geometry_R2013/upstream_counter/subgeo_muScA
        PSI             Simple              geometry_R2013/upstream_counter/subgeo_muSc_with-monitor
        PSI             Simple              geometry_R2013/upstream_counter/subgeo_mu-foil

        PSI             Simple              geometry_R2013/chamber/subgeo_chamber
        PSI             Simple              geometry_R2013/collimator/subgeo_collimator
        PSI             Simple              geometry_R2013/collimator/subgeo_col-mon

        PSI             Simple              geometry_R2013/detector_packages/subgeo_common-variables
        PSI             Simple              geometry_R2013/detector_packages/subgeo_left-detector-package_with-all-monitors
        PSI             Simple              geometry_R2013/detector_packages/subgeo_right-detector-package_with-all-monitors

        PSI             Simple              geometry_R2013/targets/subgeo_target-Al50_with-monitor

        PSI             Simple              geometry_R2013/behind_target/subgeo_back-wall
        PSI             Simple              geometry_R2013/behind_target/subgeo_veto-scintillator

I've tried to keep each part (whether it's a detector or the back wall) of the experiment in its own file so that we can have, for example, a version with monitors and a version without. Then we just have a series of these main geometry files (one for each simulation study/task) and we don't end up editing the same files and can maintain consistency and see better where differences come in.

For example, if I find that the MuFoil is causing me pain and it needs to be made thicker/thinner, then I can create a copy of geometry_R2013/upstream_counter/subgeo_mu-foil, change whatever I want and point to the copy in my main geometry file. If I become convinced that this should be the new default then we can discuss it as a group.

I have tested that all volumes still work, by setting them all to have monitors and firing geantinos from the centre of the experiment and in all directions. Here is the plot of volume names from that run (commit: a6c1157):

reconfigured-geometry-test

I have also taken the opportunity to rename some volumes to match what we have in the data:

This may affect any scripts that you use to analyse the g4sim output so be aware if you run an old script and it doesn't work, then this may be the cause.

NB All old geometry files have been moved into geometry_R2013/archive if you need to refer back to any old work you've done.

I will leave this pull request open for a few days for people to leave comments and I will update the GitHub wiki (BTW, are we still using this or are we moving software documentation to the twiki as well?)

AndrewEdmonds11 commented 9 years ago

I've had no objections so I'm going to merge this in.