15 const Int_t nbinsx = 64;
16 const Int_t nbinsy = 64;
17 std::vector<Double_t *> source(nbinsx), dest(nbinsx);
18 for (
Int_t i = 0; i < nbinsx; i++) {
23 TString file = dir +
"/legacy/spectrum/TSpectrum2.root";
26 auto search = (
TH2F *)
f->Get(
"search1");
28 for (
Int_t i = 0; i < nbinsx; i++) {
29 for (
Int_t j = 0; j < nbinsy; j++) {
30 source[i][j] = search->GetBinContent(i + 1, j + 1);
34 printf(
"Found %d candidate peaks\n", nfound);
40 m.SetMarkerColor(
kRed);
41 for (
Int_t i = 0; i < nfound; i++) {
42 printf(
"posx= %d, posy= %d, value=%d\n", (
Int_t)(PositionX[i] + 0.5), (
Int_t)(PositionY[i] + 0.5),
43 (
Int_t)source[(
Int_t)(PositionX[i] + 0.5)][(
Int_t)(PositionY[i] + 0.5)]);
44 m.DrawMarker(PositionX[i], PositionY[i]);
47 for (
Int_t i = 0; i < nbinsx; i++) {
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 ...
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)
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)
Double_t * GetPositionX() const
const char * Data() const