1. A computer implemented method for optimizing the number of conditioning data to use in multiple point statistics simulation, the method comprising: inputting, into the computer, a training image representative of subsurface geological heterogeneity; inputting, into the computer, an initial conservative number of conditioning data; selecting, by the computer, a geometry of a template wherein a size of the template is defined by the initial conservative number of conditioning data; building, using the computer, a search tree by scanning the training image with the template and storing data patterns present in the training image in the search tree to obtain a plurality of patterns; and determining, by the computer, a threshold number of conditioning data, smaller than the initial conservative number of conditioning data, beyond which estimated facies probabilities are not significantly modified by additional conditioning data, wherein the determining comprises: computing, by the computer, using the search tree, a probability of a facies at a central location of a first pattern in the plurality of patterns, using an initial number of conditioning data; incrementing, by the computer, the initial number of conditioning data and repeating the computing using the search tree the probability of the facies at the central location of the first pattern in the plurality of patterns until the probability of the facies at the central location of the first pattern is substantially invariable by incrementing the initial number of conditioning data; and determining, by the computer, a first threshold number of conditioning data from which the probability of the facies at the central location of the first pattern becomes substantially invariable.