If you have the latest version of ROOT, you do not need to define the gaussian 2D equation by yourself, there is a predefined one:
bigaus
If you have the latest version of ROOT, you do not need to define the gaussian 2D equation by yourself, there is a predefined one:
bigaus