Hi,

I want to plot a 2D histogram (TKE:M_Tot) from a TTree with the constraint condition “Psd_All[i]>=1000 && Psd_All[i]<=2500”, where i =34 as Psd_All is an array of size 34. The following is the small peice of code :

```
void Noconstrain_3gauss_try()
{
Double_t s1;
// DEFINING CANVAS
TCanvas *c1 = new TCanvas("c1","Without constraint",800,600);
gStyle->SetOptStat(2211);
gStyle->SetOptFit(1111);
/////////////////// Tree opening \\\\\\\\\\\\\\\\\\\\\\\\\\\\\
TFile *file1=TFile::Open("RAW1_treeFF01.root");
TTree *tree1=(TTree*)file1->Get("Analysis");
TH2D*h1 = new TH2D("h1","With_Constraint",81.,49.5,130.5, 101., 79.5, 180.5);
c1->cd();
for (int i=0; i<34 ; i++){
TString str1("");
str1.Form("Psd_All[%d]>=1000.0 && Psd_All[%d] <= 2500.0",i);
tree1->Draw("Tke:M_Tot>>h1", str1.Data());
}
}
```

but when I run this I get the error shown in the attachment. I want to plot the2D histogram by constarining my Psd_all, can someone tell me what is my mistake ??

Thank you !