Dear experts,
I found a trange bug in line 169 of rf708_bphysics.C.
For the RooBDecay, if we change the definition of bcpg
to
RooBDecay bcpg("bcpg", "bcpg", dt, tau, DG, RooConst(1), fsinh, fcos, fsin, RooConst(0.), truthModel, RooBDecay::DoubleSided);
where dm
is changed to constant 0.
The following bug will be obtained:
input_line_61:2:89: error: array subscript is not an integer
Double_t TFormula____id9800548585748267179(Double_t *x){ return TMath::Exp(-TMath::Abs(x[x[2]])/x[1])*TMath::Cos(x[x[2]]*x[2]) ; }
^~~~~
input_line_61:2:115: error: array subscript is not an integer
Double_t TFormula____id9800548585748267179(Double_t *x){ return TMath::Exp(-TMath::Abs(x[x[2]])/x[1])*TMath::Cos(x[x[2]]*x[2]) ; }
^~~~~
input_line_62:2:89: error: array subscript is not an integer
Double_t TFormula____id9800548585748267179(Double_t *x){ return TMath::Exp(-TMath::Abs(x[x[2]])/x[1])*TMath::Cos(x[x[2]]*x[2]) ; }
^~~~~
input_line_62:2:115: error: array subscript is not an integer
Double_t TFormula____id9800548585748267179(Double_t *x){ return TMath::Exp(-TMath::Abs(x[x[2]])/x[1])*TMath::Cos(x[x[2]]*x[2]) ; }
^~~~~
Error in <prepareMethod>: Can't compile function TFormula____id9800548585748267179 prototype with arguments Double_t*
Error in <TFormula::InputFormulaIntoCling>: Error compiling formula expression in Cling
Error in <TFormula::ProcessFormula>: Formula "exp(-abs(x[x[2]])/x[1])*cos(x[x[2]]*x[2])" is invalid !
[#0] FATAL:InputArguments -- RooFormula 'exp(-abs(@0)/@1)*cos(@0*@2)_dt_tau_0' did not compile or is invalid.
Input:
exp(-abs(@0)/@1)*cos(@0*@2)
Passed over to TFormula:
exp(-abs(x[x[2]])/x[1])*cos(x[x[2]]*x[2])
terminate called after throwing an instance of 'std::runtime_error'
what(): RooFormula 'exp(-abs(@0)/@1)*cos(@0*@2)_dt_tau_0' did not compile or is invalid.
Input:
exp(-abs(@0)/@1)*cos(@0*@2)
Passed over to TFormula:
exp(-abs(x[x[2]])/x[1])*cos(x[x[2]]*x[2])
However, when we change the definition of dm
to
RooRealVar dm1("dm1", "delta m(B0)", 0);
The bug disappears.
This is very strange.
Could anyone give me some advide?
My Root version is 6.24.00.
The same bug also appear in ROOT6.22
Thanks inadvance!
Best Wishes,
Zhihong