Determination of the optimum working conditions of photomultipliers