Skip to content
Snippets Groups Projects
Commit 7e3aa1f1 authored by Lorenzo Moneta's avatar Lorenzo Moneta
Browse files

Fix definition ofarray sizes also for the other TSpectrum2 new tutorials

parent c72d5585
No related branches found
No related tags found
No related merge requests found
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
void Background_gamma256() { void Background_gamma256() {
Int_t i, j; Int_t i, j;
Double_t nbinsx = 64; const Int_t nbinsx = 64;
Double_t nbinsy = 64; const Int_t nbinsy = 64;
Double_t xmin = 0; Double_t xmin = 0;
Double_t xmax = (Double_t)nbinsx; Double_t xmax = (Double_t)nbinsx;
Double_t ymin = 0; Double_t ymin = 0;
...@@ -38,4 +38,4 @@ void Background_gamma256() { ...@@ -38,4 +38,4 @@ void Background_gamma256() {
back->SetBinContent(i + 1,j + 1, source[i][j]); back->SetBinContent(i + 1,j + 1, source[i][j]);
} }
back->Draw("SURF2"); back->Draw("SURF2");
} }
\ No newline at end of file
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#include <TSpectrum2.h> #include <TSpectrum2.h>
void Background_gamma64() { void Background_gamma64() {
Int_t i, j; Int_t i, j;
Double_t nbinsx = 64; const Int_t nbinsx = 64;
Double_t nbinsy = 64; const Int_t nbinsy = 64;
Double_t xmin = 0; Double_t xmin = 0;
Double_t xmax = (Double_t)nbinsx; Double_t xmax = (Double_t)nbinsx;
Double_t ymin = 0; Double_t ymin = 0;
...@@ -39,4 +39,4 @@ void Background_gamma64() { ...@@ -39,4 +39,4 @@ void Background_gamma64() {
back->SetBinContent(i + 1,j + 1, source[i][j]); back->SetBinContent(i + 1,j + 1, source[i][j]);
} }
back->Draw("SURF1"); back->Draw("SURF1");
} }
\ No newline at end of file
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
void Background_synt256() { void Background_synt256() {
Int_t i, j; Int_t i, j;
Double_t nbinsx = 64; const Int_t nbinsx = 64;
Double_t nbinsy = 64; const Int_t nbinsy = 64;
Double_t xmin = 0; Double_t xmin = 0;
Double_t xmax = (Double_t)nbinsx; Double_t xmax = (Double_t)nbinsx;
Double_t ymin = 0; Double_t ymin = 0;
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
void Deconvolution2_1() { void Deconvolution2_1() {
Int_t i, j; Int_t i, j;
Double_t nbinsx = 256; const Int_t nbinsx = 256;
Double_t nbinsy = 256; const Int_t nbinsy = 256;
Double_t xmin = 0; Double_t xmin = 0;
Double_t xmax = (Double_t)nbinsx; Double_t xmax = (Double_t)nbinsx;
Double_t ymin = 0; Double_t ymin = 0;
...@@ -47,4 +47,4 @@ void Deconvolution2_1() { ...@@ -47,4 +47,4 @@ void Deconvolution2_1() {
decon->SetBinContent(i + 1,j + 1, source[i][j]); decon->SetBinContent(i + 1,j + 1, source[i][j]);
} }
decon->Draw("SURF2"); decon->Draw("SURF2");
} }
\ No newline at end of file
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
void Deconvolution2_2() { void Deconvolution2_2() {
Int_t i, j; Int_t i, j;
Double_t nbinsx = 64; const Int_t nbinsx = 64;
Double_t nbinsy = 64; const Int_t nbinsy = 64;
Double_t xmin = 0; Double_t xmin = 0;
Double_t xmax = (Double_t)nbinsx; Double_t xmax = (Double_t)nbinsx;
Double_t ymin = 0; Double_t ymin = 0;
...@@ -47,4 +47,4 @@ void Deconvolution2_2() { ...@@ -47,4 +47,4 @@ void Deconvolution2_2() {
decon->SetBinContent(i + 1,j + 1, source[i][j]); decon->SetBinContent(i + 1,j + 1, source[i][j]);
} }
decon->Draw("SURF2"); decon->Draw("SURF2");
} }
\ No newline at end of file
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
void Deconvolution2_HR() { void Deconvolution2_HR() {
Int_t i, j; Int_t i, j;
Double_t nbinsx = 64; const Int_t nbinsx = 64;
Double_t nbinsy = 64; const Int_t nbinsy = 64;
Double_t xmin = 0; Double_t xmin = 0;
Double_t xmax = (Double_t)nbinsx; Double_t xmax = (Double_t)nbinsx;
Double_t ymin = 0; Double_t ymin = 0;
...@@ -47,4 +47,4 @@ void Deconvolution2_HR() { ...@@ -47,4 +47,4 @@ void Deconvolution2_HR() {
decon->SetBinContent(i + 1,j + 1, source[i][j]); decon->SetBinContent(i + 1,j + 1, source[i][j]);
} }
decon->Draw("SURF2"); decon->Draw("SURF2");
} }
\ No newline at end of file
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
void Smooth() { void Smooth() {
Int_t i, j; Int_t i, j;
Double_t nbinsx = 256; const Int_t nbinsx = 256;
Double_t nbinsy = 256; const Int_t nbinsy = 256;
Double_t xmin = 0; Double_t xmin = 0;
Double_t xmax = (Double_t)nbinsx; Double_t xmax = (Double_t)nbinsx;
Double_t ymin = 0; Double_t ymin = 0;
...@@ -38,4 +38,4 @@ void Smooth() { ...@@ -38,4 +38,4 @@ void Smooth() {
smooth->SetBinContent(i + 1,j + 1, source[i][j]); smooth->SetBinContent(i + 1,j + 1, source[i][j]);
} }
smooth->Draw("SURF2"); smooth->Draw("SURF2");
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment