Own layer with IgnoreRaycast

I am trying to create a layer that is ignoring Raycast too. I tried to figure out how it workes but the other comments didn’t help (I am pretty new with Unity). I have the layer 9 (Test) and I want it to be ignored by rayCast.

Check this post.

And check comments about best answer. At the bottom is image of using LayerMasks.