Set LayerMask on OnMouseOver() method

Can I set LayerMask for OnMouseOver() or OnMouseEnter() method as well as Physics.Raycast()?

I would like to detect the collider which is not in ‘Ignore Raycast’ layer inside another collider which is in another layer by using OnMouseEnter()?

It is impossible to set layer mask in OnMouse~ methods.
So I replace it with Physics.Raycast() in Update() method.