# CMS convexity adjustment in a range accrual Monte Carlo

I'm trying to price a CMS indexed range accrual using Monte Carlo simulations. Let's say i have n trajectories of ZC rates using G2++ model under risk neutral measure. My question is how do i take into account the convexity adjustment and compute it using monte carlo simulation? What i'm trying to compute is the expectation of the indicator function of my 10 Y swap rate at time $T_i$ being between $K1$ and $K2$ under the forward measure $T_p$ (the payment measure) at time t: $$\mathbb{E_t}^{Q^{Tp}}(\mathbb{1}_{K_{min} <S^{i,i+10Y}(T_i)<K_{max}})$$ however my Monte carlo trajectories are under the risk neutral measure.

If you have done your simulation under the payment date forward measure then you only need to take the expectation of the indicator of the swap rate being between $K_1$ and $K_2$.
If you have done your simulation under the risk neutral measure (which is associated with the savings account as numeraire) then you take the expectation of the indicator of the swap rate being between $K_1$ and $K_2$ divided by the savings account value on the payment date (your numeraire) to obtain the PV of the payoff. Should you want the expectation of the indicator under the payment date forward measure, you only have to divide the PV with the initial discount to payment date.