Relation between crystal chemistry and genetic processes in sedimentary dolomites