From f7a7dff2a3bf1cad6e4696ac6edf58e61b0a0eb8 Mon Sep 17 00:00:00 2001 From: MUSIC Date: Fri, 26 Jul 2024 14:48:20 -0500 Subject: [PATCH 1/3] screen too small fix again --- DigiSettingsPanel.cpp | 8 +++++--- Scope.cpp | 7 +++++-- SingleSpectra.cpp | 8 ++++++-- analyzers/EncoreAnalyzer.h | 9 +++++---- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/DigiSettingsPanel.cpp b/DigiSettingsPanel.cpp index bd94a7e..d6f12e9 100644 --- a/DigiSettingsPanel.cpp +++ b/DigiSettingsPanel.cpp @@ -40,13 +40,15 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr enableSignalSlot = false; setWindowTitle("Digitizer Settings"); - setGeometry(0, 0, 1700, 850); //====== resize window if screen too small QScreen * screen = QGuiApplication::primaryScreen(); QRect screenGeo = screen->geometry(); - if( screenGeo.width() < 1700 || screenGeo.height() < 850) this->showMaximized(); - + if( screenGeo.width() < 1700 || screenGeo.height() < 850) { + setGeometry(0, 0, screenGeo.width() - 100, screenGeo.height() - 100); + }else{ + setGeometry(0, 0, 1700, 850); + } tabWidget = new QTabWidget(this); setCentralWidget(tabWidget); diff --git a/Scope.cpp b/Scope.cpp index 0530d43..1d99c31 100644 --- a/Scope.cpp +++ b/Scope.cpp @@ -54,13 +54,16 @@ Scope::Scope(Digitizer ** digi, unsigned int nDigi, ReadDataThread ** readDataTh this->readDataThread = readDataThread; setWindowTitle("Scope"); - setGeometry(0, 0, 1000, 800); setWindowFlags( this->windowFlags() & ~Qt::WindowCloseButtonHint ); //====== resize window if screen too small QScreen * screen = QGuiApplication::primaryScreen(); QRect screenGeo = screen->geometry(); - if( screenGeo.width() < 1000 || screenGeo.height() < 800) this->showMaximized(); + if( screenGeo.width() < 1000 || screenGeo.height() < 800) { + setGeometry(0, 0, screenGeo.width() - 100, screenGeo.height() - 100); + }else{ + setGeometry(0, 0, 1000, 800); + } enableSignalSlot = false; diff --git a/SingleSpectra.cpp b/SingleSpectra.cpp index 8ae9a92..a563e7a 100644 --- a/SingleSpectra.cpp +++ b/SingleSpectra.cpp @@ -18,13 +18,17 @@ SingleSpectra::SingleSpectra(Digitizer ** digi, unsigned int nDigi, QString rawD isSignalSlotActive = true; setWindowTitle("Single Histograms"); - setGeometry(0, 0, 1000, 800); + //setWindowFlags( this->windowFlags() & ~Qt::WindowCloseButtonHint ); //====== resize window if screen too small QScreen * screen = QGuiApplication::primaryScreen(); QRect screenGeo = screen->geometry(); - if( screenGeo.width() < 1000 || screenGeo.height() < 800) this->showMaximized(); + if( screenGeo.width() < 1000 || screenGeo.height() < 800) { + setGeometry(0, 0, screenGeo.width() - 100, screenGeo.height() - 100); + }else{ + setGeometry(0, 0, 1000, 800); + } QWidget * layoutWidget = new QWidget(this); setCentralWidget(layoutWidget); diff --git a/analyzers/EncoreAnalyzer.h b/analyzers/EncoreAnalyzer.h index bdaed55..79a42b3 100644 --- a/analyzers/EncoreAnalyzer.h +++ b/analyzers/EncoreAnalyzer.h @@ -84,13 +84,14 @@ private: inline void Encore::SetUpCanvas(){ - setGeometry(0, 0, 1600, 1600); - //====== resize window if screen too small QScreen * screen = QGuiApplication::primaryScreen(); QRect screenGeo = screen->geometry(); - if( screenGeo.width() < 1600 || screenGeo.height() < 1600) this->showMaximized(); - + if( screenGeo.width() < 1600 || screenGeo.height() < 1600) { + setGeometry(0, 0, screenGeo.width() - 100, screenGeo.height() -100); + }else{ + setGeometry(0, 0, 1600, 1600); + } chkRunAnalyzer = new QCheckBox("Run Analyzer", this); layout->addWidget(chkRunAnalyzer, 0, 0); From 478d1cdf38c4880662b6a921cf5cdd7e9f71c7f6 Mon Sep 17 00:00:00 2001 From: MUSIC Date: Tue, 30 Jul 2024 11:56:10 -0500 Subject: [PATCH 2/3] add MUSIC Analyr. Online evt buidr fail... --- DigiSettingsPanel.cpp | 1 + FSUDAQ.cpp | 5 +- Scope.cpp | 1 + SingleSpectra.cpp | 1 + analyzers/MUSICAnalyzer.h | 182 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 analyzers/MUSICAnalyzer.h diff --git a/DigiSettingsPanel.cpp b/DigiSettingsPanel.cpp index d6f12e9..ae95f35 100644 --- a/DigiSettingsPanel.cpp +++ b/DigiSettingsPanel.cpp @@ -49,6 +49,7 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr }else{ setGeometry(0, 0, 1700, 850); } + // setGeometry(0, 0, 1700, 850); tabWidget = new QTabWidget(this); setCentralWidget(tabWidget); diff --git a/FSUDAQ.cpp b/FSUDAQ.cpp index 317c392..b118ba7 100644 --- a/FSUDAQ.cpp +++ b/FSUDAQ.cpp @@ -18,9 +18,10 @@ #include "analyzers/CoincidentAnalyzer.h" #include "analyzers/SplitPoleAnalyzer.h" #include "analyzers/EncoreAnalyzer.h" +#include "analyzers/MUSICAnalyzer.h" #include "analyzers/RAISOR.h" -std::vector onlineAnalyzerList = {"Coincident","Splie-Pole", "Encore", "RAISOR"}; +std::vector onlineAnalyzerList = {"Coincident","Splie-Pole", "Encore", "RAISOR", "MUSICS"}; FSUDAQ::FSUDAQ(QWidget *parent) : QMainWindow(parent){ DebugPrint("%s", "FSUDAQ"); @@ -1827,6 +1828,7 @@ void FSUDAQ::OpenAnalyzer(){ if( id == 1 ) onlineAnalyzer = new SplitPole(digi, nDigi); if( id == 2 ) onlineAnalyzer = new Encore(digi, nDigi); if( id == 3 ) onlineAnalyzer = new RAISOR(digi, nDigi); + if( id == 4 ) onlineAnalyzer = new MUSIC(digi, nDigi); if( id >= 0 ) onlineAnalyzer->show(); }else{ @@ -1836,6 +1838,7 @@ void FSUDAQ::OpenAnalyzer(){ if( id == 1 ) onlineAnalyzer = new SplitPole(digi, nDigi); if( id == 2 ) onlineAnalyzer = new Encore(digi, nDigi); if( id == 3 ) onlineAnalyzer = new RAISOR(digi, nDigi); + if( id == 4 ) onlineAnalyzer = new MUSIC(digi, nDigi); if( id >= 0 ){ onlineAnalyzer->show(); diff --git a/Scope.cpp b/Scope.cpp index 1d99c31..18d17f8 100644 --- a/Scope.cpp +++ b/Scope.cpp @@ -64,6 +64,7 @@ Scope::Scope(Digitizer ** digi, unsigned int nDigi, ReadDataThread ** readDataTh }else{ setGeometry(0, 0, 1000, 800); } + // setGeometry(0, 0, 1000, 800); enableSignalSlot = false; diff --git a/SingleSpectra.cpp b/SingleSpectra.cpp index a563e7a..605b5bd 100644 --- a/SingleSpectra.cpp +++ b/SingleSpectra.cpp @@ -29,6 +29,7 @@ SingleSpectra::SingleSpectra(Digitizer ** digi, unsigned int nDigi, QString rawD }else{ setGeometry(0, 0, 1000, 800); } + // setGeometry(0, 0, 1000, 800); QWidget * layoutWidget = new QWidget(this); setCentralWidget(layoutWidget); diff --git a/analyzers/MUSICAnalyzer.h b/analyzers/MUSICAnalyzer.h new file mode 100644 index 0000000..b86626a --- /dev/null +++ b/analyzers/MUSICAnalyzer.h @@ -0,0 +1,182 @@ +#ifndef MUSICANLAYZER_H +#define MUSICANLAYZER_H + +#include "Analyser.h" +#include "Isotope.h" + +#include +#include +#include + +namespace MUSICChMap{ + + const std::map SN2Bd = { + {16828, 0}, + {16829, 1}, + {16827, 2}, + {23986, 3} + }; + + //Left 0->15 + //Right 16->31 + //Individual{32=Grid, 33=S0, 34=cathode, 35=S17, 36=Si_dE, 100>pulser}, + //-1=empty + const int mapping[4][16] = { + // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + {34, -1, 1, -1, 33, 101, 5, -1, 0, -1, 9, -1, 17, 13, -1, 32}, + { 2, -1, 16, -1, 21, 102, 20, -1, 8, -1, 24, -1, 27, 28, -1, 14}, + {19, -1, 3, -1, 6, 103, 7, -1, 25, -1, 11, -1, 12, 15, -1, 10}, + { 4, -1, 18, 36, 23, 104, 22, -1, 29, -1, 26, -1, 31, 30, -1, 35} + }; + + // Gain matching [ch][bd] + const double corr[16][4] = { + { 1.00000, 1.00000, 1.00000, 1.0000}, + { 1.00000, 1.00000, 1.03158, 1.0000}, + { 1.00000, 1.00000, 0.99240, 1.0000}, + { 1.00000, 1.03704, 0.94004, 1.0000}, + { 1.01031, 1.02084, 1.10114, 1.0000}, + { 1.00000, 0.94685, 1.00513, 1.0000}, + { 1.00000, 1.03431, 1.00513, 1.0000}, + { 1.00000, 0.92670, 0.96078, 1.0000}, + { 1.03431, 0.94685, 0.96314, 1.0000}, + { 1.00000, 1.03158, 0.95145, 1.0000}, + { 0.95145, 1.00256, 0.97270, 1.0000}, + { 1.00000, 1.00256, 0.90950, 1.0000}, + { 1.03704, 0.99492, 0.98740, 1.0000}, + { 1.00000, 1.00000, 0.99746, 1.0000}, + { 0.96078, 1.03980, 1.00513, 1.0000}, + { 1.00000, 1.05095, 1.00000, 1.0000}, + }; + + +}; + +class MUSIC : public Analyzer{ + Q_OBJECT +public: + + MUSIC(Digitizer ** digi, unsigned int nDigi, QMainWindow * parent = nullptr): Analyzer(digi, nDigi, parent){ + + SetUpdateTimeInSec(1.0); + + SetBackwardBuild(false, 100); // using normal building (acceding in time) or backward building, int the case of backward building, default events to be build is 100. + evtbder = GetEventBuilder(); + evtbder->SetTimeWindow(10000); + + SetUpCanvas(); + } + + // MUSIC(){}; + + void SetUpCanvas(); + +public slots: + void UpdateHistograms(); + +private: + + MultiBuilder *evtbder; + + Histogram2D * hLeft; + Histogram2D * hRight; + Histogram2D * hLR; + + Histogram1D * hMulti; + + QCheckBox * chkRunAnalyzer; + +}; + + +inline void MUSIC::SetUpCanvas(){ + + //====== resize window if screen too small + QScreen * screen = QGuiApplication::primaryScreen(); + QRect screenGeo = screen->geometry(); + if( screenGeo.width() < 1600 || screenGeo.height() < 1600) { + setGeometry(0, 0, screenGeo.width() - 100, screenGeo.height() -100); + }else{ + setGeometry(0, 0, 1600, 1600); + } + chkRunAnalyzer = new QCheckBox("Run Analyzer", this); + layout->addWidget(chkRunAnalyzer, 0, 0); + + hLeft = new Histogram2D("Left", "Ch", "Energy", 17, 0, 16, 200, 0, 20000, this); + layout->addWidget(hLeft, 1, 0); + hRight = new Histogram2D("Right", "Ch", "Energy", 17, 0, 16, 200, 0, 20000, this); + layout->addWidget(hRight, 1, 1); + hLR = new Histogram2D("Left + Right", "Ch", "Energy", 17, 0, 16, 200, 0, 20000, this); + layout->addWidget(hLR, 2, 0); + hMulti = new Histogram1D("Multi", "multiplicity", 40, 0, 40); + layout->addWidget(hMulti, 2, 1); + +} + +inline void MUSIC::UpdateHistograms(){ + + if( this->isVisible() == false ) return; + if( chkRunAnalyzer->isChecked() == false ) return; + + BuildEvents(); // call the event builder to build events + + printf("MUSIC::%s----------- 1\n", __func__); + + //============ Get events, and do analysis + long eventBuilt = evtbder->eventBuilt; + if( eventBuilt == 0 ) return; + + //============ Processing data and fill histograms + long eventIndex = evtbder->eventIndex; + long eventStart = eventIndex - eventBuilt + 1; + if(eventStart < 0 ) eventStart += MaxNEvent; + + printf("MUSIC::%s----------- 2\n", __func__); + for( long i = eventStart ; i <= eventIndex; i ++ ){ + std::vector event = evtbder->events[i]; + //printf("-------------- %ld\n", i); + + hMulti->Fill((int) event.size()); + //if( event.size() < 9 ) return; + if( event.size() == 0 ) return; + + double sum[17] = {0}; + for( int k = 0; k < (int) event.size(); k++ ){ + + printf("MUSIC::%s----------- i, k %d, %d\n", __func__, i, k); + int bd = MUSICChMap::SN2Bd.at(event[k].sn); + + int ch = event[k].ch; + + int ID = MUSICChMap::mapping[bd][ch]; + + if( ID < 0 ) continue; + + double eC = event[k].energy; + if( 0 <= ID && ID < 100 ) { + eC *= MUSICChMap::corr[ch][bd]; + hLeft->Fill(ID, eC); + sum[ID] += eC; + } + if( 100 <= ID && ID < 200 ) { + eC *= MUSICChMap::corr[ch][bd]; + hRight->Fill(ID-100, eC ); + sum[ID-100] += eC ; + } + } + + for( int ch = 0; ch < 17; ch++){ + if( sum[ch] > 0 ) hLR->Fill(ch, sum[ch]); + //printf("%d | sum %d\n", ch, sum[ch]); + } + + } + + hLeft->UpdatePlot(); + hRight->UpdatePlot(); + hMulti->UpdatePlot(); + hLR->UpdatePlot(); + +} + +#endif \ No newline at end of file From 002a10b4e0883328fb102d380ae347314ef35566 Mon Sep 17 00:00:00 2001 From: MUSIC Date: Thu, 1 Aug 2024 16:03:50 -0500 Subject: [PATCH 3/3] bug fix on MUSICAnalyzer.h --- ClassDigitizer.cpp | 2 +- DigiSettingsPanel.cpp | 2 +- MultiBuilder.cpp | 2 ++ Scope.cpp | 2 +- SingleSpectra.cpp | 2 +- analyzers/Analyser.cpp | 2 +- analyzers/EncoreAnalyzer.h | 7 +++--- analyzers/MUSICAnalyzer.h | 44 +++++++++++++++++--------------------- 8 files changed, 31 insertions(+), 32 deletions(-) diff --git a/ClassDigitizer.cpp b/ClassDigitizer.cpp index 8d10f82..ecf7045 100644 --- a/ClassDigitizer.cpp +++ b/ClassDigitizer.cpp @@ -667,7 +667,7 @@ unsigned int Digitizer::CalByteForBufferCAEN(){ uint32_t AllocatedSize; ret = CAEN_DGTZ_MallocReadoutBuffer(handle, &BufferCAEN, &AllocatedSize); - delete BufferCAEN; + if( BufferCAEN) delete BufferCAEN; return AllocatedSize; } diff --git a/DigiSettingsPanel.cpp b/DigiSettingsPanel.cpp index ae95f35..75fbae3 100644 --- a/DigiSettingsPanel.cpp +++ b/DigiSettingsPanel.cpp @@ -269,7 +269,7 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr // connect(bnSaveSettingsToText, &QPushButton::clicked, this, [=](){ SaveSetting(1);}); //checkBox, to coupled or decouple the setting file. - chkCoupledSettingFile = new QCheckBox("Update Setting", this); + chkCoupledSettingFile = new QCheckBox("Live Setting Update", this); buttonLayout->addWidget(chkCoupledSettingFile, rowID, 2); chkCoupledSettingFile->setCheckState(Qt::CheckState::Unchecked); connect(chkCoupledSettingFile, &QCheckBox::stateChanged, this, [=](int state){ diff --git a/MultiBuilder.cpp b/MultiBuilder.cpp index c7c8228..1b76acc 100644 --- a/MultiBuilder.cpp +++ b/MultiBuilder.cpp @@ -279,6 +279,8 @@ void MultiBuilder::BuildEvents(bool isFinal, bool skipTrace, bool verbose){ if( timeWindow <= 0 ) break; } + if( events[eventIndex].size() == 0 ) continue; + if( events[eventIndex].size() > 1) { std::sort(events[eventIndex].begin(), events[eventIndex].end(), [](const Hit& a, const Hit& b) { return a.timestamp < b.timestamp; diff --git a/Scope.cpp b/Scope.cpp index 18d17f8..c25f1a9 100644 --- a/Scope.cpp +++ b/Scope.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +// #include QVector Scope::TrapezoidFilter(QVector data, int baseLineEndS, int riseTimeS, int flatTopS, float decayTime_ns){ DebugPrint("%s", "Scope"); diff --git a/SingleSpectra.cpp b/SingleSpectra.cpp index 605b5bd..cc2b849 100644 --- a/SingleSpectra.cpp +++ b/SingleSpectra.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +// #include SingleSpectra::SingleSpectra(Digitizer ** digi, unsigned int nDigi, QString rawDataPath, QMainWindow * parent) : QMainWindow(parent){ DebugPrint("%s", "SingleSpectra"); diff --git a/analyzers/Analyser.cpp b/analyzers/Analyser.cpp index 5156c66..9c8d666 100644 --- a/analyzers/Analyser.cpp +++ b/analyzers/Analyser.cpp @@ -98,7 +98,7 @@ void Analyzer::BuildEvents(bool verbose){ if( isBuildBackward ){ mb->BuildEventsBackWard(maxNumEventBuilt, verbose); }else{ - mb->BuildEvents(0, 0, verbose); + mb->BuildEvents(0, true, verbose); } for( unsigned int i = 0; i < nData; i++ ) digiMTX[idList[i]].unlock(); diff --git a/analyzers/EncoreAnalyzer.h b/analyzers/EncoreAnalyzer.h index 79a42b3..ad77632 100644 --- a/analyzers/EncoreAnalyzer.h +++ b/analyzers/EncoreAnalyzer.h @@ -6,7 +6,7 @@ #include #include -#include +// #include namespace EncoreChMap{ @@ -87,11 +87,12 @@ inline void Encore::SetUpCanvas(){ //====== resize window if screen too small QScreen * screen = QGuiApplication::primaryScreen(); QRect screenGeo = screen->geometry(); - if( screenGeo.width() < 1600 || screenGeo.height() < 1600) { + if( screenGeo.width() < 1000 || screenGeo.height() < 1000) { setGeometry(0, 0, screenGeo.width() - 100, screenGeo.height() -100); }else{ - setGeometry(0, 0, 1600, 1600); + setGeometry(0, 0, 1000, 1000); } + // setGeometry(0, 0, 1600, 1600); chkRunAnalyzer = new QCheckBox("Run Analyzer", this); layout->addWidget(chkRunAnalyzer, 0, 0); diff --git a/analyzers/MUSICAnalyzer.h b/analyzers/MUSICAnalyzer.h index b86626a..c1d0913 100644 --- a/analyzers/MUSICAnalyzer.h +++ b/analyzers/MUSICAnalyzer.h @@ -6,7 +6,7 @@ #include #include -#include +// #include namespace MUSICChMap{ @@ -60,7 +60,7 @@ public: SetUpdateTimeInSec(1.0); - SetBackwardBuild(false, 100); // using normal building (acceding in time) or backward building, int the case of backward building, default events to be build is 100. + SetBackwardBuild(true, 100); // using normal building (acceding in time) or backward building, int the case of backward building, default events to be build is 100. evtbder = GetEventBuilder(); evtbder->SetTimeWindow(10000); @@ -94,19 +94,20 @@ inline void MUSIC::SetUpCanvas(){ //====== resize window if screen too small QScreen * screen = QGuiApplication::primaryScreen(); QRect screenGeo = screen->geometry(); - if( screenGeo.width() < 1600 || screenGeo.height() < 1600) { + if( screenGeo.width() < 1000 || screenGeo.height() < 1000) { setGeometry(0, 0, screenGeo.width() - 100, screenGeo.height() -100); }else{ - setGeometry(0, 0, 1600, 1600); + setGeometry(0, 0, 1000, 1000); } + // setGeometry(0, 0, 1600, 1600); chkRunAnalyzer = new QCheckBox("Run Analyzer", this); layout->addWidget(chkRunAnalyzer, 0, 0); - hLeft = new Histogram2D("Left", "Ch", "Energy", 17, 0, 16, 200, 0, 20000, this); + hLeft = new Histogram2D("Left", "Ch", "Energy", 16, 0, 16, 200, 0, 200, this); layout->addWidget(hLeft, 1, 0); - hRight = new Histogram2D("Right", "Ch", "Energy", 17, 0, 16, 200, 0, 20000, this); + hRight = new Histogram2D("Right", "Ch", "Energy", 16, 0, 16, 200, 0, 200, this); layout->addWidget(hRight, 1, 1); - hLR = new Histogram2D("Left + Right", "Ch", "Energy", 17, 0, 16, 200, 0, 20000, this); + hLR = new Histogram2D("Left + Right", "Ch", "Energy", 17, 0, 16, 200, 0, 200, this); layout->addWidget(hLR, 2, 0); hMulti = new Histogram1D("Multi", "multiplicity", 40, 0, 40); layout->addWidget(hMulti, 2, 1); @@ -118,9 +119,7 @@ inline void MUSIC::UpdateHistograms(){ if( this->isVisible() == false ) return; if( chkRunAnalyzer->isChecked() == false ) return; - BuildEvents(); // call the event builder to build events - - printf("MUSIC::%s----------- 1\n", __func__); + BuildEvents(false); // call the event builder to build events //============ Get events, and do analysis long eventBuilt = evtbder->eventBuilt; @@ -131,21 +130,19 @@ inline void MUSIC::UpdateHistograms(){ long eventStart = eventIndex - eventBuilt + 1; if(eventStart < 0 ) eventStart += MaxNEvent; - printf("MUSIC::%s----------- 2\n", __func__); + // printf("MUSIC::%s----------- 2 : %ld %ld \n", __func__, eventStart, eventIndex); for( long i = eventStart ; i <= eventIndex; i ++ ){ std::vector event = evtbder->events[i]; - //printf("-------------- %ld\n", i); + // printf("MUSIC::%s----------- %ld, %zu\n", __func__, i, event.size()); hMulti->Fill((int) event.size()); - //if( event.size() < 9 ) return; if( event.size() == 0 ) return; double sum[17] = {0}; for( int k = 0; k < (int) event.size(); k++ ){ - - printf("MUSIC::%s----------- i, k %d, %d\n", __func__, i, k); + + // printf("--- %d\n", k); int bd = MUSICChMap::SN2Bd.at(event[k].sn); - int ch = event[k].ch; int ID = MUSICChMap::mapping[bd][ch]; @@ -153,23 +150,22 @@ inline void MUSIC::UpdateHistograms(){ if( ID < 0 ) continue; double eC = event[k].energy; - if( 0 <= ID && ID < 100 ) { + if( 0 <= ID && ID < 16 ) { eC *= MUSICChMap::corr[ch][bd]; hLeft->Fill(ID, eC); sum[ID] += eC; } - if( 100 <= ID && ID < 200 ) { + if( 16 <= ID && ID < 32 ) { eC *= MUSICChMap::corr[ch][bd]; - hRight->Fill(ID-100, eC ); - sum[ID-100] += eC ; + hRight->Fill(ID-16, eC ); + sum[ID-16] += eC ; } } for( int ch = 0; ch < 17; ch++){ - if( sum[ch] > 0 ) hLR->Fill(ch, sum[ch]); - //printf("%d | sum %d\n", ch, sum[ch]); - } - + if( sum[ch] > 0 ) hLR->Fill(ch, sum[ch]); + //printf("%d | sum %d\n", ch, sum[ch]); + } } hLeft->UpdatePlot();