Multi scalar field in a multi grid lattice

Hello, i’m working on a code with the idea to simulate a 2D flow through a refined grid. I’m trying to use a boolean mask to load my geometry into the finest level of the grid. I am not an experienced programmer, so i took the code i needed from the palabos’ example “loadGeometry.cpp”, where the boolean mask solution is showed, and i try to adapt it to the multigrid environment, but the code doesnt work with those code lines.
Original lines from “loadGeometry.cpp”:

[code=“cpp”]
MultiScalarField2D boolMask(parameters.getNx(), parameters.getNy());

plb_ifstream ifile("vectorBM.dat");
ifile >> boolMask;

defineDynamics(lattice, boolMask, new BounceBack<T,DESCRIPTOR>, true);


For my code, i changed the last line to this:
[code="cpp"]
defineDynamics(lattice.getComponent(2), boolMask, new BounceBack<T,DESCRIPTOR>, true);

And i create the boolMask with the finest grid level’s size.

I have 2 questions at this point:
1- Should i create the boolMask with the original size of the finest level, or should i add the overlapWidth parameter to it?
2- What do i have to change in that code to make it work? Does Palabos allow me to apply the boolean mask only to the finest level?

I need help to make it work, thank you very much =)