How to determing the number of tower?

As the title, how to determine the number of tower? which is the parameter numTower in OpenFHE.

Once the crypto context is initialized, encrypt a plaintext to generate a ciphertext, say ctxt. Then you can print out the number of towers in the primary ciphertext coefficient modulus (Q) as follows:

std::vector<double> x = {0.25, 0.75, 2.0, 4.0};
Plaintext ptxt = cryptoContext->MakeCKKSPackedPlaintext(x);
auto ctxt= cryptoContext->Encrypt(keyPair.publicKey, ptxt);
std::cout << "numTowers: " << ctxt->GetElements()[0].GetAllElements().size() << std::endl;

Note that, OpenFHE uses “extra” auxiliary towers - as part of auxiliary RNS modulus P - which are only used in some intermediate computations. The commands above do not show those extra towers.