gcowan / RapidSim

Phase space generation of b hadron decays
MIT License
18 stars 29 forks source link

Include invisible particles in acceptance cut? #5

Closed alexpearce closed 6 years ago

alexpearce commented 8 years ago

The allInAcceptance method, applied to a decay when AllIn is specified in the config file, applies the acceptance requirements to all particles in the decay.

Generally, you don't care if particles that you cannot detect go outside of your acceptance. Should allInAcceptance ignore invisible particles? It would be little sneaky as then the method wouldn't really be checking ‘all’ particles, but it's maybe more pragmatic.

dcraik commented 8 years ago

I agree there should be a "visibleInAcceptance" (either replacing or in addition to allInAcceptance). The easiest fix is to only add visible particles to the parts_ vector in setup and make clear in the documentation that invisible particles are ignored. If we want to retain both functionalities we should add a second vector to avoid performing the checks each time.

I'm currently leaning towards replacing the existing method - the only case I can think of for keeping the existing functionality is to investigate the effect of invisible daughters on the motherInAcceptance requirement but this could be easily replicated by making the daughters visible.