Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
cortesep committed Sep 14, 2023
1 parent 944a24a commit 286b637
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Detectors/ZDC/calib/include/ZDCCalib/WaveformCalibConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#ifndef O2_ZDC_WAVEFORMCALIBCONFIG_H
#define O2_ZDC_WAVEFORMCALIBCONFIG_H

#define O2_ZDC_WAVEFORMCALIB_DEBUG
//#define O2_ZDC_WAVEFORMCALIB_DEBUG

#include "ZDCBase/Constants.h"
#include <Rtypes.h>
Expand Down
1 change: 1 addition & 0 deletions Detectors/ZDC/calib/include/ZDCCalib/WaveformCalibData.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ struct WaveformCalibData {
int getLastValid(int is) const;
void print() const;
void clear();
void clearWaveforms();
void setCreationTime(uint64_t ctime);
void setN(int n);
int saveDebugHistos(const std::string fn);
Expand Down
4 changes: 2 additions & 2 deletions Detectors/ZDC/calib/src/BaselineCalibConfig.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ void BaselineCalibConfig::setCuts(int low, int high)

void BaselineCalibConfig::setCuts(int isig, int low, int high)
{
cutHigh[isig] = low;
cutLow[isig] = high;
cutLow[isig] = low;
cutHigh[isig] = high;
}
10 changes: 10 additions & 0 deletions Detectors/ZDC/calib/src/WaveformCalibData.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ void WaveformCalibData::clear()
}
}

//______________________________________________________________________________
void WaveformCalibData::clearWaveforms()
{
mCTimeBeg = 0;
mCTimeEnd = 0;
for (int32_t is = 0; is < NChannels; is++) {
mWave[is].clear();
}
}

void WaveformCalibChData::clear()
{
mEntries = 0;
Expand Down
2 changes: 1 addition & 1 deletion Detectors/ZDC/calib/src/WaveformCalibEPNSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void WaveformCalibEPNSpec::run(ProcessingContext& pc)

auto creationTime = pc.services().get<o2::framework::TimingInfo>().creation; // approximate time in ms
WaveformCalibData& data = mWorker.getData();
data.clear();

data.setCreationTime(creationTime);

auto bcrec = pc.inputs().get<gsl::span<o2::zdc::BCRecData>>("bcrec");
Expand Down
1 change: 1 addition & 0 deletions Detectors/ZDC/macro/CreateWaveformCalibConfig.C
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void CreateWaveformCalibConfig(long tmin = 0, long tmax = -1, std::string ccdbHo
// range -2048 : 2047 one should not use signals too close to
// maximum allowed amplitude (1800+2048)
conf.setCuts(100, 3000);
conf.setCuts(o2::zdc::IdZPA1, 50, 3000);

conf.setDescription("Simulated data");
conf.setMinEntries(200);
Expand Down

0 comments on commit 286b637

Please sign in to comment.