Problem running Background_compton.C


ROOT Version: 5.34/09
Platform: Linux 3.11.10-100.fc18.x86_64
Compiler: gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC)


Hello,

I am trying to run the script “Background_compton.C”. While doing so it get the following errors:

+++++++++++++++++++++++++++++++++++
root [0] .x Background_compton.C
Error: Symbol kBackDecreasingWindow is not defined in current scope Background_compton.C:22:
Error: Symbol kBackOrder8 is not defined in current scope Background_compton.C:22:
Error: Symbol kBackSmoothing5 is not defined in current scope Background_compton.C:22:
Warning: Empty arg8 Background_compton.C:22:
*** Interpreter error recovered ***
+++++++++++++++++++++++++++++++++++

I must be doing something stupid, am I? Please let me know what is wrong.

Pleasefind attached macro and the root file for your reference.

Regards,

Ajay

Background_compton.C (1006 Bytes)

hist.root (9.6 KB)

Hi,

Here is the solution:

   Float_t *source = new Float_t[nbins];
   ...
   for (i = 0; i < nbins; i++) source[i] = (Float_t)h->GetBinContent(i + 1);
   s->Background(source, nbins, 10, TSpectrum::kBackDecreasingWindow, TSpectrum::kBackOrder8, kTRUE, TSpectrum::kBackSmoothing5, kTRUE);

Cheers, Bertrand.

1 Like

Thank you very much for the solution.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.