Methodology of optimisation for a nanostructured two-photon absorption photodetector