16 const Int_t nbinsx = 64;
17 const Int_t nbinsy = 64;
18 std::vector<Double_t *> source(nbinsx),
dest(nbinsx);
19 for (
Int_t i = 0; i < nbinsx; i++) {
24 TString file = dir +
"/spectrum/TSpectrum2.root";
27 auto search = (
TH2F *)
f->Get(
"search3;1");
29 for (
Int_t i = 0; i < nbinsx; i++) {
30 for (
Int_t j = 0; j < nbinsy; j++) {
31 source[i][j] = search->GetBinContent(i + 1, j + 1);
35 printf(
"Found %d candidate peaks\n", nfound);
42 for (
Int_t i = 0; i < nfound; i++) {
43 printf(
"posx= %d, posy= %d, value=%d\n", (
Int_t)(PositionX[i] + 0.5), (
Int_t)(PositionY[i] + 0.5),
44 (
Int_t)source[(
Int_t)(PositionX[i] + 0.5)][(
Int_t)(PositionY[i] + 0.5)]);
48 for (
Int_t i = 0; i < nbinsx; i++) {
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest
R__EXTERN TStyle * gStyle
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
2-D histogram with a float per channel (see TH1 documentation)
virtual TMarker * DrawMarker(Double_t x, Double_t y)
Draw this marker with new coordinates.
Advanced 2-dimensional spectra processing.
Double_t * GetPositionY() const
Int_t SearchHighRes(Double_t **source, Double_t **dest, Int_t ssizex, Int_t ssizey, Double_t sigma, Double_t threshold, Bool_t backgroundRemove, Int_t deconIterations, Bool_t markov, Int_t averWindow)
This function searches for peaks in source spectrum It is based on deconvolution method.
Double_t * GetPositionX() const
const char * Data() const
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...