8 #include <onlmon/OnlMon.h>
9 #include <onlmon/OnlMonDB.h>
10 #include <onlmon/OnlMonServer.h>
12 #include <Event/msg_profile.h>
13 #include <calobase/TowerInfoDefs.h>
14 #include <caloreco/CaloWaveformFitting.h>
16 #include <Event/Event.h>
17 #include <Event/EventTypes.h>
18 #include <Event/msg_profile.h>
54 const float MAX_ENERGY1 = 15000.;
55 const float MAX_ENERGY2 = 15000.;
56 const int BIN_NUMBER = 1500;
60 const char *zdccalib = getenv(
"ZDCCALIB");
63 std::cout <<
"ZDCCALIB environment variable not set" << std::endl;
67 std::ifstream calib(fullfile);
71 printf(
"doing the Init\n");
73 zdc_adc_north =
new TH1F(
"zdc_adc_north",
"ZDC ADC north", BIN_NUMBER, 0, MAX_ENERGY1);
74 zdc_adc_south =
new TH1F(
"zdc_adc_south",
"ZDC ADC south", BIN_NUMBER, 0, MAX_ENERGY2);
96 std::vector<float> waveform;
97 for (
int s = 0;
s < p->
iValue(0,
"SAMPLES");
s++)
99 waveform.push_back(p->
iValue(
s, channel));
101 std::vector<std::vector<float>> multiple_wfs;
102 multiple_wfs.push_back(waveform);
104 std::vector<std::vector<float>> fitresults_zdc;
107 std::vector<float> result;
108 result = fitresults_zdc.at(0);
118 float totalzdcsouthsignal = 0.;
119 float totalzdcnorthsignal = 0.;
126 for (
int c = 0;
c < p->
iValue(0,
"CHANNELS");
c++)
129 float signalFast = resultFast.at(0);
130 float signal = signalFast;
136 if (mod != 0)
continue;
137 if((
c < 16) && ((
c != 6) && (
c != 14)))
141 totalzdcsouthsignal+=
signal;
143 else if (zdc_side == 1)
145 totalzdcnorthsignal+=
signal;
149 std::cout <<
"arm bin not assigned ... " << std::endl;