Example to illustrate the background estimator (class TSpectrum2).
ðè‡_␅
void Background_gamma256()
{
for (i = 0; i < nbinsx; i++)
TString file = dir +
"/legacy/spectrum/TSpectrum2.root";
auto back = (
TH2F *)
f->Get(
"back2");
for (i = 0; i < nbinsx; i++) {
for (j = 0; j < nbinsy; j++) {
source[i][j] = back->GetBinContent(i + 1, j + 1);
}
}
for (i = 0; i < nbinsx; i++) {
for (j = 0; j < nbinsy; j++)
back->SetBinContent(i + 1, j + 1, source[i][j]);
}
back->Draw("SURF2");
}
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
2-D histogram with a float per channel (see TH1 documentation)
Advanced 2-dimensional spectra processing.
@ kBackSuccessiveFiltering
const char * Data() const
- Authors
- Miroslav Morhac, Olivier Couet
Definition in file Background_gamma256.C.