Closed gondiaz closed 2 years ago
I have modified the previous implementation: now the lab-wall geometry only consists of a semi cilinder, and the generation is done in this part. The detector is properly placed inside this cilinder, see figure (assuming the previous values of y and z translations are correct).
On the other hand, MuonAngleGeneration uses a CheckOverlap function that was biasing the vertex generation positions. Since it doesnt seems relevant and creates a significant issue in the simulation, I removed it.
The overlap check was done to avoid generating particles that don't cross the geometry, therefore wouldn't create a useful event. Which bias do you see?
About the overlap: you can see it in the master
, using the angular distribution file in nexus (SimulatedMuonsProposalMCEq.csv
) and the HALLA_OUTER
vertex. In the two figures above I show the vertex generated using the overlap check, and removing it, respectively. The generation is expected to be uniformly distributed in the full cilinder that represents the HallA walls, but it is not the case when the check-overlap.
About the overlap: you can see it in the
master
, using the angular distribution file in nexus (SimulatedMuonsProposalMCEq.csv
) and theHALLA_OUTER
vertex. In the two figures above I show the vertex generated using the overlap check, and removing it, respectively. The generation is expected to be uniformly distributed in the full cilinder that represents the HallA walls, but it is not the case when the check-overlap.
The check overlap should avoid generating muons with a direction that does not intersect the geometry, therefore I expect that it will bias the vertices. From your plot I'm not sure if the missing vertices are the ones that would not intersect the geometry. The question is if we want to save time doing that or we need to generate all the muons for accounting, for instance, or any other reason.
Change the order of the initialization of variables, to avoid compilation warnings. Specifically, geom_solid_
, bInitialize_
and dist_name
.
On removing the checking overlap, I think this is fine since we don't want all muons to intersect the detector. I am sure that we want to generate some that interact near the detector to model the daughter neutrons which may make it inside the active. We probably want to set a minimum distance because if the muons are too far away to create any backgrounds reaching the active, then these events are simply inefficient to make. However, this would require some optimisation work.
The suggested generation from a semi cylinder looks good to me.
Muons are simulated by default with downward direction, therefore they should come from above the detector.