Apply quadrature in a piecewise way

For my problem I have two meshes, finer mesh by splitting the coarse one by half.

I want to do an intalledges over the coarse mesh. As one field is defined on the fine mesh, I need the quadrature to be applied in a piecewise way on each half piece of the edge.

mesh Th1 = trunc(Th,1,split=2);
fespace Vh(Th1,P1);
fespace Qh(Th,P1);
Vh fh = x;
varf RHS(p,q) = intalledges(Th,qforder=2)( fh*q );
real[int] rhs = RHS(0,Qh);

The above won’t work properly as fh*q has two pieces on the edge and we should apply the quadrature on each piece. Is there any straightforward way to make this work?