next-exp / nexus

Geant4 simulation framework of the NEXT Collaboration
5 stars 55 forks source link

Allow projection only with specific regions #238

Closed paolafer closed 7 months ago

paolafer commented 7 months ago

This PR modifies the muon generator in the following way. When simulating muons from the LSC rock (HALLA_INNER and HALL_OUTER regions), the method of projection is used to improve the efficiency and simulate only muons in the directions that cross the detector. For any other region, a normal generation is applied. The problem was twofold: on the one hand, the EXTERNAL region produced an exception when used together with the muon generator; on the other hand, the muon generator employed the projection with any regions, while the Next100 geometry only accepted three (EXTERNAL, HALLA_INNER and HALL_OUTER) and other geometries did not accept any, which made impossible to use the muon generator together with other geometries or regions. After discussing with @pnovella we came to the conclusion that the only regions where we want to boost the efficiency (therefore use the projection method) are those related to the LSC rock. With this modification, one can use the muon generator without projection with custom-made regions without the need of modifying the code, while before it was not possible.