Error in compiling Draw(TString::Format)

Hi everyone, I’m trying to run the macro with the following command.

ch1->Draw(TString::Format("F3PLA_TR_ns - F3PLA_TL_ns: (1-%f)/TMath::Sqrt(F3PLA_QL)", slope1)>>hist1,"(PPACX[0][3]>4.5 && PPACX[0][3]<5.5)","colz");

now what I’m trying to do there is to plot a 2D histo of (A-B) : (1-f)/Q where A, B and Q are different branches of the tree. and f is a double obtained by fit2->GetParameter(1);

The error I’m getting is something like this:

 /usr/include/c++/7/iomanip:418:5: note: candidate template ignored: could not match 'basic_istream<type-parameter-0-0, type-parameter-0-1>' against 'TString'
    operator>>(basic_istream<_CharT, _Traits>& __is, _Get_time<_CharT> __f)

Any suggestions on how to get rid of this or any other suggestions about plotting a 2D histo of (A-B) : (1-f)/Q?


ch1->Draw(TString::Format("F3PLA_TR_ns - F3PLA_TL_ns : (1-%f)/TMath::Sqrt(F3PLA_QL) >> hist1", slope1), "(PPACX[0][3]>4.5 && PPACX[0][3]<5.5)", "colz");

1 Like