The .40 caliber barrel will be a great starting size, as will the barrel length...
The rate of twist will somewhat dictate what she will shoot out of it, I will assume its a patch round ball.
My Lyman book has loads for the .40 caliber round ball (92 grain .395 diameter and a .028 patch) in a 44 inch, 1-in-66 inch twist barrel.
If the barrel is cut to 20 inches and she is still using round balls, the 1-in-66 inct twist will still be needed...
I thought a 1-48 twist is kind of like a "middle of the road" twist to cover both RB and Bullets somewhat well, but not favoring any one projectile.
So, cut your barrel at 20 inches, (if you're working in centimeters, make sure there's enough centimeters to make 20 inches) this should balance well for her and she can grow into the muzzleloader.
Like clothes and shoes, (kids outgrow them quickly) she may outgrow the rifle soon, you might want to make it just slightly bigger in size than she needs today, so that tomorrow she can still shoot.