Dear @marziyeh.tavakkoly,
Before getting to your question, I’d like to remind the replies you received in this one year old thread of yours. Your geometry, with a 50 nanometer layer, is really at the edge of (if not beyond) what Monte Carlo codes can do.
Now, getting to your specific question, how to estimate a quantity as function of the grazing angle. To do this, I would run separate simulations, each having the beam impinging on the target at a different angles.