Bug #16038

Updated by Gianluca Petrillo about 4 years ago

The behaviour of @SpaceChargeMicroBooNE@ service provider is undefined when the corrections are not enabled.

The type of correction is not initialised when the corrections are not requested.
When @GetPosOffset()@ is called, the provider always attempts to compute a correction, even when corrections are disabled.
The way this attempt is performed depends on the type of correction. When the correction is disabled and the correction type is not defined, the action is also unpredictable.

This bug escaped diagnosis because:
* @LArG4@, the only user to date, calls the correction only when the correction is enabled
* the failure of the unit test is still to be explained

The same is likely true for the electric field distortion.

Thanks to Varuna Meddage and Tingjun Yang for reporting the problem.