Error in <TTreeFormula::Compile>: Bad numerical expression

Hello all,
I have a Tfile with one tree included some branches that one of them is an array called “BSE” with size of 25. I want to use TTree::Draw to draw maximum of BSE array versus another variable as following program but encountered with this error:

here is the my program:

[code]#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include

void MaxBSE_Mutiplicity ()
{

gStyle->SetOptStat(111);
gStyle->SetOptDate(0);
gROOT->Macro(“openntuple.cxx”);
char name[15][250];
TPostScript *ps = new TPostScript("…/prints/MaxBSE_Mutiplicity_83_109.ps",111); ps->Range(19,25);

TCanvas *c2 = new TCanvas(“c2”,“BINA Canvas 2”); c2->SetFillColor(10); c2->Size(19,25);

c2->cd();
int arraysize=25;
double BSE[25];
TH2F *Mutiplicity = new TH2F(“Mutiplicity”,“Detectors(83-109)(without any condition) ; Mutiplicity ; maxBSE”,20,0,20,2000,0,2000);
sprintf(name[1],“GetMax(BSE):ballhits >> Mutiplicity”);
sprintf(name[2],"");
elasticchain->Draw(name[1],name[2],“colz”,30);
c2->Update();
ps->Close();

}
double GetMax(double dArray[])
{
int iCurrMax = 0;

for (int i = 1 ; i < 25 ; i++)
   {
    if (dArray[iCurrMax] > dArray[i])
      {
        iCurrMax = i;
      }
   }

return dArray[iCurrMax];
}
[/code]

would you please help me to solve this error?
Thanks

Try: “Max$(BSE):ballhits >> Mutiplicity”

Thank you very much.