Hi, I’m trying to have a correlation plot (6 columns * 4 rows) between two branches inside two “for” loops. A snippet of the code is below:
for(int ippac=0; ippac<7; ippac++){
if (ippac == 5) {
continue;
} //This is to ignore ippac = 5 coz that is a faulty detector
for (int j=0; j<4; j++){
c1->Divide(ippac,j);
c1->cd(ippac+j*6+1);
gPad-> SetLogz();
gPad->SetGrid(1,1);
gStyle->SetPalette(kRainBow);
//ch1 is the chain of root files. and greater than >-9999 just to plot the meaningful values.
ch1->Draw(("PPAC_Tx2[%d][%d] : PPAC_Tx1[%d][%d]",ippac,j,ippac,j), ("PPAC_Tx2[%d][%d]>-9999 && PPAC_Tx1[%d][%d]>-9999",ippac,j,ippac,j));
//this is where I’m getting the error. and it’s obvious why I’m getting the error because Draw() takes 5 arguments at most but I’m giving more than that; Not sure how I can accommodate all the indexes;
}
}
//FYI: PPAC_Tx1[ippac][j] or PPAC_Tx2[ippac][j] has a dimension of [7][4]
Thanks for any suggestions. Also, let me know if you need more info to assist.