# peaks2¶

Example to illustrate the 2-d peak finder (class TSpectrum2).

This script generates a random number of 2-d gaussian peaks The position of the peaks is found via TSpectrum2 To execute this example, do:

root > .x peaks2.C  (generate up to 50 peaks by default)
root > .x peaks2.C(10) (generate up to 10 peaks)
root > .x peaks2.C+(200) (generate up to 200 peaks via ACLIC)


The script will iterate generating a new histogram having between 5 and the maximun number of peaks specified. Double Click on the bottom right corner of the pad to go to a new spectrum To Quit, select the "quit" item in the canvas "File" menu

Author: Rene Brun
This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, August 09, 2022 at 09:43 AM.

In :
%%cpp -d
#include "TSpectrum2.h"
#include "TCanvas.h"
#include "TRandom.h"
#include "TH2.h"
#include "TF2.h"
#include "TMath.h"
#include "TROOT.h"

TSpectrum2 *s;
TH2F *h2 = 0;
Int_t npeaks = 30;


Definition of a helper function:

In :
%%cpp -d
Double_t fpeaks2(Double_t *x, Double_t *par) {
Double_t result = 0.1;
for (Int_t p=0;p<npeaks;p++) {
Double_t norm   = par[5*p+0];
Double_t mean1  = par[5*p+1];
Double_t sigma1 = par[5*p+2];
Double_t mean2  = par[5*p+3];
Double_t sigma2 = par[5*p+4];
result += norm*TMath::Gaus(x,mean1,sigma1)*TMath::Gaus(x,mean2,sigma2);
}
return result;
}


Definition of a helper function:

In :
%%cpp -d
void findPeak2() {
printf("Generating histogram with %d peaks\n",npeaks);
Int_t nbinsx = 200;
Int_t nbinsy = 200;
Double_t xmin   = 0;
Double_t xmax   = (Double_t)nbinsx;
Double_t ymin   = 0;
Double_t ymax   = (Double_t)nbinsy;
Double_t dx = (xmax-xmin)/nbinsx;
Double_t dy = (ymax-ymin)/nbinsy;
delete h2;
h2 = new TH2F("h2","test",nbinsx,xmin,xmax,nbinsy,ymin,ymax);
h2->SetStats(0);
//generate n peaks at random
Double_t par;
Int_t p;
for (p=0;p<npeaks;p++) {
par[5*p+0] = gRandom->Uniform(0.2,1);
par[5*p+1] = gRandom->Uniform(xmin,xmax);
par[5*p+2] = gRandom->Uniform(dx,5*dx);
par[5*p+3] = gRandom->Uniform(ymin,ymax);
par[5*p+4] = gRandom->Uniform(dy,5*dy);
}
TF2 *f2 = new TF2("f2",fpeaks2,xmin,xmax,ymin,ymax,5*npeaks);
f2->SetNpx(100);
f2->SetNpy(100);
f2->SetParameters(par);
TCanvas *c1 = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("c1");
if (!c1) c1 = new TCanvas("c1","c1",10,10,1000,700);
h2->FillRandom("f2",500000);

//now the real stuff: Finding the peaks
Int_t nfound = s->Search(h2,2,"col");

//searching good and ghost peaks (approximation)
Int_t pf,ngood = 0;
Double_t *xpeaks = s->GetPositionX();
Double_t *ypeaks = s->GetPositionY();
for (p=0;p<npeaks;p++) {
for (pf=0;pf<nfound;pf++) {
Double_t diffx = TMath::Abs(xpeaks[pf] - par[5*p+1]);
Double_t diffy = TMath::Abs(ypeaks[pf] - par[5*p+3]);
if (diffx < 2*dx && diffy < 2*dy) ngood++;
}
}
if (ngood > nfound) ngood = nfound;
//Search ghost peaks (approximation)
Int_t nghost = 0;
for (pf=0;pf<nfound;pf++) {
Int_t nf=0;
for (p=0;p<npeaks;p++) {
Double_t diffx = TMath::Abs(xpeaks[pf] - par[5*p+1]);
Double_t diffy = TMath::Abs(ypeaks[pf] - par[5*p+3]);
if (diffx < 2*dx && diffy < 2*dy) nf++;
}
if (nf == 0) nghost++;
}
c1->Update();

s->Print();
printf("Gener=%d, Found=%d, Good=%d, Ghost=%d\n",npeaks,nfound,ngood,nghost);
if (!gROOT->IsBatch()) {
printf("\nDouble click in the bottom right corner of the pad to continue\n");
c1->WaitPrimitive();
}
}


Arguments are defined.

In :
Int_t maxpeaks=50;

In :
s = new TSpectrum2(2*maxpeaks);
for (int i=0; i<10; ++i) {
npeaks = (Int_t)gRandom->Uniform(5,maxpeaks);
findPeak2();
}

Generating histogram with 49 peaks

Number of positions = 70
x = 150.5, y = 81.5
x = 99.5, y = 92.5
x = 60.5, y = 60.5
x = 17.5, y = 95.5
x = 21.5, y = 21.5
x = 190.5, y = 153.5
x = 148.5, y = 149.5
x = 99.5, y = 36.5
x = 29.5, y = 62.5
x = 134.5, y = 190.5
x = 5.5, y = 165.5
x = 135.5, y = 95.5
x = 41.5, y = 16.5
x = 51.5, y = 115.5
x = 146.5, y = 52.5
x = 27.5, y = 137.5
x = 148.5, y = 32.5
x = 9.5, y = 113.5
x = 78.5, y = 42.5
x = 125.5, y = 74.5
x = 47.5, y = 136.5
x = 111.5, y = 128.5
x = 139.5, y = 23.5
x = 64.5, y = 103.5
x = 8.5, y = 101.5
x = 67.5, y = 173.5
x = 16.5, y = 178.5
x = 188.5, y = 66.5
x = 136.5, y = 4.5
x = 75.5, y = 22.5
x = 143.5, y = 139.5
x = 190.5, y = 123.5
x = 2.5, y = 146.5
x = 75.5, y = 35.5
x = 56.5, y = 187.5
x = 56.5, y = 46.5
x = 132.5, y = 121.5
x = 35.5, y = 133.5
x = 75.5, y = 121.5
x = 13.5, y = 145.5
x = 24.5, y = 164.5
x = 38.5, y = 117.5
x = 50.5, y = 74.5
x = 89.5, y = 173.5
x = 173.5, y = 185.5
x = 173.5, y = 144.5
x = 185.5, y = 103.5
x = 195.5, y = 163.5
x = 145.5, y = 125.5
x = 151.5, y = 197.5
x = 127.5, y = 107.5
x = 115.5, y = 97.5
x = 141.5, y = 112.5
x = 85.5, y = 140.5
x = 164.5, y = 150.5
x = 155.5, y = 165.5
x = 169.5, y = 178.5
x = 182.5, y = 169.5
x = 184.5, y = 193.5
x = 161.5, y = 171.5
x = 162.5, y = 133.5
x = 168.5, y = 86.5
x = 176.5, y = 192.5
x = 146.5, y = 192.5
x = 152.5, y = 124.5
x = 153.5, y = 162.5
x = 161.5, y = 145.5
x = 167.5, y = 183.5
x = 172.5, y = 153.5
x = 174.5, y = 157.5
Gener=49, Found=70, Good=45, Ghost=27
Generating histogram with 27 peaks

Number of positions = 41
x = 155.5, y = 29.5
x = 143.5, y = 153.5
x = 55.5, y = 77.5
x = 47.5, y = 158.5
x = 101.5, y = 186.5
x = 86.5, y = 7.5
x = 16.5, y = 97.5
x = 115.5, y = 14.5
x = 76.5, y = 34.5
x = 64.5, y = 114.5
x = 9.5, y = 44.5
x = 7.5, y = 147.5
x = 2.5, y = 187.5
x = 177.5, y = 52.5
x = 17.5, y = 29.5
x = 19.5, y = 150.5
x = 188.5, y = 23.5
x = 56.5, y = 59.5
x = 88.5, y = 41.5
x = 46.5, y = 94.5
x = 48.5, y = 10.5
x = 94.5, y = 55.5
x = 71.5, y = 58.5
x = 192.5, y = 40.5
x = 168.5, y = 14.5
x = 167.5, y = 168.5
x = 147.5, y = 167.5
x = 163.5, y = 161.5
x = 173.5, y = 191.5
x = 164.5, y = 142.5
x = 190.5, y = 147.5
x = 163.5, y = 186.5
x = 174.5, y = 171.5
x = 195.5, y = 190.5
x = 156.5, y = 156.5
x = 156.5, y = 180.5
x = 174.5, y = 176.5
x = 183.5, y = 177.5
x = 184.5, y = 135.5
x = 184.5, y = 183.5
x = 188.5, y = 181.5
Gener=27, Found=41, Good=24, Ghost=17
Generating histogram with 18 peaks

Number of positions = 100
x = 67.5, y = 168.5
x = 100.5, y = 181.5
x = 135.5, y = 114.5
x = 156.5, y = 37.5
x = 14.5, y = 9.5
x = 98.5, y = 99.5
x = 76.5, y = 96.5
x = 58.5, y = 46.5
x = 113.5, y = 7.5
x = 149.5, y = 75.5
x = 151.5, y = 57.5
x = 18.5, y = 19.5
x = 47.5, y = 124.5
x = 99.5, y = 155.5
x = 91.5, y = 72.5
x = 163.5, y = 154.5
x = 164.5, y = 195.5
x = 141.5, y = 167.5
x = 111.5, y = 140.5
x = 127.5, y = 97.5
x = 141.5, y = 185.5
x = 100.5, y = 76.5
x = 152.5, y = 179.5
x = 152.5, y = 197.5
x = 151.5, y = 192.5
x = 152.5, y = 122.5
x = 163.5, y = 145.5
x = 88.5, y = 198.5
x = 81.5, y = 111.5
x = 160.5, y = 132.5
x = 118.5, y = 128.5
x = 105.5, y = 136.5
x = 156.5, y = 185.5
x = 139.5, y = 152.5
x = 164.5, y = 110.5
x = 151.5, y = 170.5
x = 138.5, y = 174.5
x = 120.5, y = 78.5
x = 140.5, y = 139.5
x = 142.5, y = 97.5
x = 129.5, y = 125.5
x = 148.5, y = 155.5
x = 121.5, y = 110.5
x = 130.5, y = 74.5
x = 125.5, y = 164.5
x = 71.5, y = 181.5
x = 126.5, y = 138.5
x = 95.5, y = 134.5
x = 159.5, y = 94.5
x = 133.5, y = 185.5
x = 139.5, y = 128.5
x = 115.5, y = 102.5
x = 56.5, y = 163.5
x = 121.5, y = 166.5
x = 130.5, y = 82.5
x = 134.5, y = 100.5
x = 86.5, y = 118.5
x = 147.5, y = 195.5
x = 165.5, y = 60.5
x = 123.5, y = 174.5
x = 105.5, y = 116.5
x = 166.5, y = 83.5
x = 145.5, y = 101.5
x = 145.5, y = 90.5
x = 165.5, y = 102.5
x = 125.5, y = 63.5
x = 114.5, y = 162.5
x = 80.5, y = 173.5
x = 104.5, y = 165.5
x = 123.5, y = 186.5
x = 139.5, y = 158.5
x = 163.5, y = 177.5
x = 120.5, y = 157.5
x = 85.5, y = 179.5
x = 154.5, y = 104.5
x = 154.5, y = 144.5
x = 164.5, y = 187.5
x = 77.5, y = 188.5
x = 78.5, y = 141.5
x = 79.5, y = 58.5
x = 86.5, y = 64.5
x = 95.5, y = 127.5
x = 96.5, y = 80.5
x = 97.5, y = 141.5
x = 105.5, y = 196.5
x = 111.5, y = 81.5
x = 111.5, y = 148.5
x = 115.5, y = 91.5
x = 119.5, y = 182.5
x = 120.5, y = 133.5
x = 129.5, y = 192.5
x = 130.5, y = 157.5
x = 135.5, y = 143.5
x = 135.5, y = 192.5
x = 136.5, y = 89.5
x = 145.5, y = 145.5
x = 147.5, y = 117.5
x = 148.5, y = 136.5
x = 153.5, y = 87.5
x = 158.5, y = 114.5
Gener=18, Found=100, Good=12, Ghost=88
Generating histogram with 24 peaks

Number of positions = 100
x = 20.5, y = 17.5
x = 102.5, y = 22.5
x = 81.5, y = 168.5
x = 51.5, y = 115.5
x = 88.5, y = 47.5
x = 89.5, y = 157.5
x = 38.5, y = 51.5
x = 60.5, y = 4.5
x = 21.5, y = 39.5
x = 104.5, y = 96.5
x = 15.5, y = 79.5
x = 18.5, y = 115.5
x = 7.5, y = 83.5
x = 31.5, y = 68.5
x = 85.5, y = 119.5
x = 70.5, y = 89.5
x = 111.5, y = 58.5
x = 110.5, y = 162.5
x = 126.5, y = 72.5
x = 60.5, y = 140.5
x = 119.5, y = 101.5
x = 107.5, y = 77.5
x = 123.5, y = 197.5
x = 94.5, y = 128.5
x = 90.5, y = 190.5
x = 105.5, y = 118.5
x = 64.5, y = 118.5
x = 114.5, y = 116.5
x = 92.5, y = 196.5
x = 123.5, y = 164.5
x = 113.5, y = 171.5
x = 55.5, y = 131.5
x = 81.5, y = 87.5
x = 116.5, y = 145.5
x = 128.5, y = 134.5
x = 109.5, y = 152.5
x = 63.5, y = 65.5
x = 69.5, y = 120.5
x = 54.5, y = 83.5
x = 100.5, y = 73.5
x = 103.5, y = 156.5
x = 73.5, y = 127.5
x = 48.5, y = 77.5
x = 132.5, y = 190.5
x = 61.5, y = 85.5
x = 105.5, y = 35.5
x = 103.5, y = 129.5
x = 135.5, y = 86.5
x = 94.5, y = 147.5
x = 76.5, y = 152.5
x = 114.5, y = 122.5
x = 53.5, y = 55.5
x = 100.5, y = 137.5
x = 114.5, y = 188.5
x = 67.5, y = 144.5
x = 125.5, y = 180.5
x = 74.5, y = 106.5
x = 130.5, y = 165.5
x = 102.5, y = 49.5
x = 115.5, y = 139.5
x = 133.5, y = 176.5
x = 106.5, y = 184.5
x = 96.5, y = 195.5
x = 100.5, y = 175.5
x = 133.5, y = 112.5
x = 108.5, y = 134.5
x = 89.5, y = 99.5
x = 101.5, y = 146.5
x = 45.5, y = 70.5
x = 67.5, y = 66.5
x = 124.5, y = 147.5
x = 128.5, y = 100.5
x = 121.5, y = 97.5
x = 126.5, y = 109.5
x = 123.5, y = 54.5
x = 119.5, y = 91.5
x = 132.5, y = 106.5
x = 56.5, y = 59.5
x = 68.5, y = 95.5
x = 74.5, y = 98.5
x = 77.5, y = 77.5
x = 84.5, y = 183.5
x = 86.5, y = 111.5
x = 86.5, y = 134.5
x = 92.5, y = 91.5
x = 92.5, y = 139.5
x = 93.5, y = 63.5
x = 93.5, y = 117.5
x = 96.5, y = 171.5
x = 104.5, y = 162.5
x = 106.5, y = 55.5
x = 109.5, y = 110.5
x = 113.5, y = 155.5
x = 119.5, y = 172.5
x = 119.5, y = 175.5
x = 123.5, y = 128.5
x = 125.5, y = 113.5
x = 129.5, y = 118.5
x = 130.5, y = 147.5
x = 130.5, y = 183.5
Gener=24, Found=100, Good=13, Ghost=87
Generating histogram with 33 peaks

Number of positions = 50
x = 171.5, y = 103.5
x = 70.5, y = 188.5
x = 100.5, y = 42.5
x = 120.5, y = 160.5
x = 48.5, y = 54.5
x = 56.5, y = 106.5
x = 127.5, y = 17.5
x = 27.5, y = 6.5
x = 40.5, y = 71.5
x = 115.5, y = 177.5
x = 119.5, y = 192.5
x = 155.5, y = 189.5
x = 105.5, y = 119.5
x = 186.5, y = 138.5
x = 72.5, y = 74.5
x = 92.5, y = 18.5
x = 115.5, y = 92.5
x = 152.5, y = 149.5
x = 161.5, y = 113.5
x = 49.5, y = 61.5
x = 32.5, y = 196.5
x = 5.5, y = 50.5
x = 88.5, y = 90.5
x = 71.5, y = 44.5
x = 104.5, y = 26.5
x = 24.5, y = 120.5
x = 126.5, y = 150.5
x = 29.5, y = 21.5
x = 158.5, y = 169.5
x = 176.5, y = 163.5
x = 197.5, y = 175.5
x = 184.5, y = 172.5
x = 154.5, y = 164.5
x = 127.5, y = 119.5
x = 132.5, y = 183.5
x = 142.5, y = 173.5
x = 141.5, y = 137.5
x = 198.5, y = 162.5
x = 182.5, y = 124.5
x = 174.5, y = 115.5
x = 190.5, y = 112.5
x = 167.5, y = 154.5
x = 132.5, y = 164.5
x = 189.5, y = 197.5
x = 182.5, y = 104.5
x = 194.5, y = 157.5
x = 128.5, y = 178.5
x = 163.5, y = 127.5
x = 171.5, y = 195.5
x = 189.5, y = 153.5
Gener=33, Found=50, Good=27, Ghost=23
Generating histogram with 29 peaks

Number of positions = 30
x = 77.5, y = 86.5
x = 171.5, y = 140.5
x = 9.5, y = 59.5
x = 126.5, y = 99.5
x = 152.5, y = 43.5
x = 111.5, y = 169.5
x = 183.5, y = 116.5
x = 71.5, y = 166.5
x = 144.5, y = 59.5
x = 84.5, y = 191.5
x = 146.5, y = 109.5
x = 193.5, y = 144.5
x = 36.5, y = 24.5
x = 64.5, y = 82.5
x = 26.5, y = 97.5
x = 131.5, y = 77.5
x = 10.5, y = 13.5
x = 77.5, y = 25.5
x = 156.5, y = 62.5
x = 82.5, y = 13.5
x = 14.5, y = 29.5
x = 39.5, y = 96.5
x = 169.5, y = 107.5
x = 108.5, y = 62.5
x = 89.5, y = 4.5
x = 171.5, y = 15.5
x = 143.5, y = 2.5
x = 195.5, y = 155.5
x = 175.5, y = 155.5
x = 183.5, y = 131.5
Gener=29, Found=30, Good=27, Ghost=3
Generating histogram with 23 peaks

Number of positions = 49
x = 50.5, y = 167.5
x = 125.5, y = 79.5
x = 12.5, y = 105.5
x = 26.5, y = 109.5
x = 186.5, y = 188.5
x = 110.5, y = 138.5
x = 22.5, y = 173.5
x = 141.5, y = 152.5
x = 89.5, y = 157.5
x = 153.5, y = 21.5
x = 139.5, y = 66.5
x = 84.5, y = 195.5
x = 141.5, y = 36.5
x = 58.5, y = 45.5
x = 127.5, y = 170.5
x = 189.5, y = 164.5
x = 108.5, y = 26.5
x = 146.5, y = 49.5
x = 121.5, y = 99.5
x = 166.5, y = 139.5
x = 96.5, y = 9.5
x = 168.5, y = 171.5
x = 171.5, y = 92.5
x = 93.5, y = 195.5
x = 197.5, y = 190.5
x = 140.5, y = 107.5
x = 152.5, y = 118.5
x = 132.5, y = 100.5
x = 167.5, y = 82.5
x = 139.5, y = 82.5
x = 151.5, y = 172.5
x = 175.5, y = 177.5
x = 155.5, y = 176.5
x = 185.5, y = 147.5
x = 194.5, y = 178.5
x = 175.5, y = 169.5
x = 131.5, y = 186.5
x = 179.5, y = 143.5
x = 78.5, y = 182.5
x = 112.5, y = 154.5
x = 116.5, y = 160.5
x = 139.5, y = 189.5
x = 141.5, y = 196.5
x = 156.5, y = 182.5
x = 160.5, y = 161.5
x = 164.5, y = 77.5
x = 165.5, y = 191.5
x = 179.5, y = 178.5
x = 194.5, y = 150.5
Gener=23, Found=49, Good=23, Ghost=27
Generating histogram with 47 peaks

Number of positions = 77
x = 25.5, y = 97.5
x = 144.5, y = 144.5
x = 25.5, y = 147.5
x = 166.5, y = 122.5
x = 105.5, y = 112.5
x = 30.5, y = 77.5
x = 60.5, y = 182.5
x = 110.5, y = 104.5
x = 131.5, y = 154.5
x = 177.5, y = 186.5
x = 193.5, y = 169.5
x = 51.5, y = 134.5
x = 23.5, y = 113.5
x = 73.5, y = 183.5
x = 147.5, y = 177.5
x = 112.5, y = 158.5
x = 196.5, y = 145.5
x = 71.5, y = 13.5
x = 77.5, y = 73.5
x = 153.5, y = 80.5
x = 40.5, y = 93.5
x = 166.5, y = 21.5
x = 196.5, y = 46.5
x = 109.5, y = 186.5
x = 128.5, y = 64.5
x = 3.5, y = 64.5
x = 96.5, y = 95.5
x = 74.5, y = 139.5
x = 149.5, y = 24.5
x = 166.5, y = 51.5
x = 119.5, y = 140.5
x = 194.5, y = 27.5
x = 152.5, y = 166.5
x = 96.5, y = 110.5
x = 26.5, y = 16.5
x = 14.5, y = 160.5
x = 163.5, y = 156.5
x = 47.5, y = 103.5
x = 188.5, y = 99.5
x = 128.5, y = 76.5
x = 179.5, y = 25.5
x = 107.5, y = 80.5
x = 92.5, y = 144.5
x = 92.5, y = 164.5
x = 132.5, y = 168.5
x = 191.5, y = 196.5
x = 134.5, y = 117.5
x = 164.5, y = 171.5
x = 114.5, y = 171.5
x = 174.5, y = 158.5
x = 187.5, y = 188.5
x = 127.5, y = 109.5
x = 124.5, y = 180.5
x = 178.5, y = 148.5
x = 51.5, y = 114.5
x = 119.5, y = 176.5
x = 182.5, y = 126.5
x = 132.5, y = 194.5
x = 182.5, y = 152.5
x = 96.5, y = 171.5
x = 167.5, y = 173.5
x = 179.5, y = 164.5
x = 60.5, y = 122.5
x = 80.5, y = 154.5
x = 99.5, y = 153.5
x = 118.5, y = 187.5
x = 120.5, y = 104.5
x = 125.5, y = 191.5
x = 142.5, y = 195.5
x = 145.5, y = 128.5
x = 148.5, y = 157.5
x = 153.5, y = 193.5
x = 155.5, y = 144.5
x = 171.5, y = 138.5
x = 182.5, y = 196.5
x = 191.5, y = 130.5
x = 195.5, y = 182.5
Gener=47, Found=77, Good=42, Ghost=35
Generating histogram with 16 peaks

Number of positions = 49
x = 170.5, y = 145.5
x = 179.5, y = 180.5
x = 71.5, y = 48.5
x = 62.5, y = 131.5
x = 125.5, y = 127.5
x = 147.5, y = 23.5
x = 72.5, y = 31.5
x = 35.5, y = 11.5
x = 6.5, y = 117.5
x = 101.5, y = 17.5
x = 81.5, y = 25.5
x = 171.5, y = 189.5
x = 71.5, y = 8.5
x = 51.5, y = 136.5
x = 121.5, y = 142.5
x = 83.5, y = 139.5
x = 177.5, y = 130.5
x = 184.5, y = 168.5
x = 84.5, y = 52.5
x = 155.5, y = 116.5
x = 170.5, y = 122.5
x = 196.5, y = 186.5
x = 164.5, y = 167.5
x = 126.5, y = 187.5
x = 153.5, y = 141.5
x = 151.5, y = 161.5
x = 192.5, y = 149.5
x = 146.5, y = 112.5
x = 145.5, y = 135.5
x = 155.5, y = 147.5
x = 197.5, y = 164.5
x = 151.5, y = 166.5
x = 179.5, y = 164.5
x = 151.5, y = 179.5
x = 192.5, y = 174.5
x = 161.5, y = 178.5
x = 130.5, y = 170.5
x = 130.5, y = 180.5
x = 133.5, y = 145.5
x = 140.5, y = 151.5
x = 141.5, y = 184.5
x = 144.5, y = 155.5
x = 159.5, y = 147.5
x = 159.5, y = 191.5
x = 171.5, y = 156.5
x = 182.5, y = 191.5
x = 183.5, y = 148.5
x = 190.5, y = 181.5
x = 191.5, y = 156.5
Gener=16, Found=49, Good=14, Ghost=35
Generating histogram with 22 peaks

Number of positions = 22
x = 118.5, y = 155.5
x = 192.5, y = 133.5
x = 82.5, y = 190.5
x = 46.5, y = 13.5
x = 137.5, y = 105.5
x = 161.5, y = 121.5
x = 79.5, y = 154.5
x = 92.5, y = 27.5
x = 16.5, y = 105.5
x = 26.5, y = 123.5
x = 86.5, y = 15.5
x = 60.5, y = 58.5
x = 127.5, y = 181.5
x = 46.5, y = 108.5
x = 147.5, y = 29.5
x = 3.5, y = 26.5
x = 150.5, y = 172.5
x = 74.5, y = 133.5
x = 105.5, y = 125.5
x = 50.5, y = 198.5
x = 181.5, y = 64.5
x = 194.5, y = 144.5
Gener=22, Found=22, Good=21, Ghost=1


Draw all canvases

In :
gROOT->GetListOfCanvases()->Draw() 