Skip to content

Commit a6e67d3

Browse files
cortesepalibuild
andauthored
ZDC - Fixes to intercalibration, waveform extraction. New workflow to parse and analyze CTF data (#13623)
* Fixes + orthogonal regression * Various fixes * Small updates * Digits parser workflow * Digits parser workflow * Digits parser workflow * WIP * WIP * Debugging line shapes and hits directly from CTF * Fixes * Fix bug in hit checking * Please consider the following formatting changes (#89) * Fix missing case * Please consider the following formatting changes (#90) * Small updates * Comments * Please consider the following formatting changes (#91) * Fix compilation error * Just to force new tests --------- Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent 7e24578 commit a6e67d3

28 files changed

+882
-77
lines changed

DataFormats/Detectors/ZDC/include/DataFormatsZDC/BCData.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ struct BCData {
5555
o2::dataformats::RangeRefComp<6> ref;
5656
o2::InteractionRecord ir;
5757
std::array<uint16_t, NModules> moduleTriggers{};
58+
// N.B. channels and triggers have geographical addressing (0x1 << (NChPerModule * im + ic)
5859
uint32_t channels = 0; // pattern of channels it refers to
59-
uint32_t triggers = 0; // pattern of triggered channels (not necessarily stored) in this BC
60+
uint32_t triggers = 0; // pattern of triggered channels (not necessarily stored) in this BC (i.e. with Hit bit on)
6061
uint8_t ext_triggers = 0; // pattern of ALICE triggers
6162

6263
BCData() = default;

Detectors/ZDC/calib/include/ZDCCalib/CalibParamZDC.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace o2
2727
namespace zdc
2828
{
2929
struct CalibParamZDC : public o2::conf::ConfigurableParamHelper<CalibParamZDC> {
30+
bool dumpCalib = false; // Dump partial calibration object
3031
bool debugOutput = false; // Debug output
3132
bool rootOutput = true; // Output histograms to EOS
3233
std::string outputDir = "./"; // ROOT files output directory

Detectors/ZDC/calib/include/ZDCCalib/InterCalib.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ class InterCalib
8080
void setInterCalibConfig(const InterCalibConfig* param) { mInterCalibConfig = param; };
8181
const InterCalibConfig* getInterCalibConfig() const { return mInterCalibConfig; };
8282

83+
InterCalibData& getData() { return mData; };
84+
8385
void setVerbosity(int v) { mVerbosity = v; }
8486
int getVerbosity() const { return mVerbosity; }
8587

Detectors/ZDC/calib/include/ZDCCalib/InterCalibConfig.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@ struct InterCalibConfig {
3636
// Meaningful values are in the range of tower x centers i.e. from
3737
// 2.8 to 19.6 If one puts less than 2.8 then the computation will be
3838
// the same as for ZPA/ZPC with no cuts
39-
double xcut_ZPA = 6;
40-
double xcut_ZPC = 6;
41-
double tower_cut_ZP = 0;
39+
double xcut_ZPA = 0;
40+
double xcut_ZPC = 0;
41+
double rms_cut_ZP = 0; // RMS of ZP centroid can go from 0 to 8.4 cm
42+
double towerCutLow_ZPA[4] = {0, 0, 0, 0}; // Applied to all ZP fits except ZPI
43+
double towerCutLow_ZPC[4] = {0, 0, 0, 0}; // Applied to all ZP fits except ZPI
44+
double towerCutHigh_ZPA[4] = {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}; // Applied to all ZP fits except ZPI
45+
double towerCutHigh_ZPC[4] = {std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()}; // Applied to all ZP fits except ZPI
4246
bool cross_check = false;
4347

4448
int nb1[NH] = {0}; /// 1D histogram: number of bins
@@ -87,7 +91,7 @@ struct InterCalibConfig {
8791
enabled[7] = c7;
8892
enabled[8] = c8;
8993
}
90-
ClassDefNV(InterCalibConfig, 4);
94+
ClassDefNV(InterCalibConfig, 5);
9195
};
9296
} // namespace zdc
9397
} // namespace o2

Detectors/ZDC/calib/include/ZDCCalib/WaveformCalibData.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ struct WaveformCalibData {
8787
void setCreationTime(uint64_t ctime);
8888
void setN(int n);
8989
int saveDebugHistos(const std::string fn);
90+
int dumpCalib(const std::string fn);
9091
ClassDefNV(WaveformCalibData, 1);
9192
};
9293

Detectors/ZDC/calib/include/ZDCCalib/WaveformCalibEPN.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ class WaveformCalibEPN
3737
const gsl::span<const o2::zdc::ZDCWaveform>& wave);
3838
int endOfRun();
3939
int saveDebugHistos(const std::string fn = "ZDCWaveformCalibEPN.root");
40+
int dumpCalib(const std::string fn = "ZDCWaveformCalibEPNDump.root");
4041
void setConfig(const WaveformCalibConfig* param) { mConfig = param; };
4142
const WaveformCalibConfig* getConfig() const { return mConfig; };
4243
void setSaveDebugHistos() { mSaveDebugHistos = true; }
44+
void setDumpCalib() { mDumpCalib = true; }
4345
void setDontSaveDebugHistos() { mSaveDebugHistos = false; }
4446
void setVerbosity(int val) { mVerbosity = val; }
4547
WaveformCalibData mData;
@@ -48,6 +50,7 @@ class WaveformCalibEPN
4850
private:
4951
bool mInitDone = false;
5052
bool mSaveDebugHistos = false;
53+
bool mDumpCalib = false;
5154
int32_t mNBin = 0;
5255
int32_t mVerbosity = DbgMinimal;
5356
const WaveformCalibConfig* mConfig = nullptr; /// Configuration of intercalibration

Detectors/ZDC/calib/src/InterCalib.cxx

Lines changed: 55 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,12 @@ void InterCalib::assign(int ih, bool ismod)
210210
} else if (ih == 5) {
211211
nid = 1;
212212
id = id_5;
213-
LOG(warn) << "InterCalib::assign unimplemented coefficient ih = " << ih;
213+
LOG(warn) << "InterCalib::assign is not implemented for coefficient ih = " << ih;
214214
return;
215215
} else if (ih == 6) {
216216
nid = 1;
217217
id = id_6;
218-
LOG(warn) << "InterCalib::assign unimplemented coefficient ih = " << ih;
218+
LOG(warn) << "InterCalib::assign is not implemented for coefficient ih = " << ih;
219219
return;
220220
} else if (ih == 7 || ih == 8) {
221221
nid = 4;
@@ -246,15 +246,23 @@ void InterCalib::assign(int ih, bool ismod)
246246
if (oldval > 0) {
247247
val = val * mPar[ih][iid + 1];
248248
}
249-
if (mVerbosity > DbgZero) {
249+
if (mTowerParamUpd.modified[ich]) {
250+
LOGF(warn, "%s OVERWRITING MODIFIED PARAMETER %8.6f", ChannelNames[ich].data(), mTowerParamUpd.getTowerCalib(ich));
251+
LOGF(info, "%s updated %8.6f -> %8.6f", ChannelNames[ich].data(), oldval, val);
252+
} else if (mVerbosity > DbgZero) {
250253
LOGF(info, "%s updated %8.6f -> %8.6f", ChannelNames[ich].data(), oldval, val);
251254
}
252255
mTowerParamUpd.setTowerCalib(ich, val, true);
253256
} else {
254-
if (mVerbosity > DbgZero) {
255-
LOGF(info, "%s NOT CHANGED %8.6f", ChannelNames[ich].data(), oldval);
257+
// Check if another fit has already modified the parameters
258+
if (mTowerParamUpd.modified[ich]) {
259+
LOGF(warn, "%s NOT OVERWRITING MODIFIED PARAMETER %8.6f", ChannelNames[ich].data(), mTowerParamUpd.getTowerCalib(ich));
260+
} else {
261+
if (mVerbosity > DbgZero) {
262+
LOGF(info, "%s NOT CHANGED %8.6f", ChannelNames[ich].data(), oldval);
263+
}
264+
mTowerParamUpd.setTowerCalib(ich, oldval, false);
256265
}
257-
mTowerParamUpd.setTowerCalib(ich, oldval, false);
258266
}
259267
}
260268
}
@@ -294,6 +302,10 @@ int InterCalib::process(const char* hname, int ic)
294302
ih = HidZNI;
295303
} else if (hn.EqualTo("hZPI")) {
296304
ih = HidZPI;
305+
} else if (hn.EqualTo("hZPAX")) {
306+
ih = HidZPAX;
307+
} else if (hn.EqualTo("hZPCX")) {
308+
ih = HidZPCX;
297309
} else {
298310
LOGF(error, "Not recognized histogram name: %s\n", hname);
299311
return -1;
@@ -434,18 +446,32 @@ void InterCalib::add(int ih, o2::dataformats::FlatHisto2D<float>& h2)
434446

435447
void InterCalib::cumulate(int ih, double tc, double t1, double t2, double t3, double t4, double w = 1)
436448
{
449+
constexpr double minfty = -std::numeric_limits<double>::infinity();
437450
if (tc < mInterCalibConfig->cutLow[ih] || tc > mInterCalibConfig->cutHigh[ih]) {
438451
return;
439452
}
440-
double val[NPAR] = {0, 0, 0, 0, 0, 1};
441-
val[0] = tc;
442-
val[1] = t1;
443-
val[2] = t2;
444-
val[3] = t3;
445-
val[4] = t4;
446-
for (int32_t i = 0; i < NPAR; i++) {
447-
for (int32_t j = i; j < NPAR; j++) {
448-
mData.mSum[ih][i][j] += val[i] * val[j] * w;
453+
if ((ih == HidZPA || ih == HidZPAX)) {
454+
if (t1 < mInterCalibConfig->towerCutLow_ZPA[0] || t2 < mInterCalibConfig->towerCutLow_ZPA[1] || t3 < mInterCalibConfig->towerCutLow_ZPA[2] || t4 < mInterCalibConfig->towerCutLow_ZPA[3]) {
455+
return;
456+
}
457+
if (t1 > mInterCalibConfig->towerCutHigh_ZPA[0] || t2 > mInterCalibConfig->towerCutHigh_ZPA[1] || t3 > mInterCalibConfig->towerCutHigh_ZPA[2] || t4 > mInterCalibConfig->towerCutHigh_ZPA[3]) {
458+
return;
459+
}
460+
}
461+
if (ih == HidZPC || ih == HidZPCX) {
462+
if (t1 < mInterCalibConfig->towerCutLow_ZPC[0] || t2 < mInterCalibConfig->towerCutLow_ZPC[1] || t3 < mInterCalibConfig->towerCutLow_ZPC[2] || t4 < mInterCalibConfig->towerCutLow_ZPC[3]) {
463+
return;
464+
}
465+
if (t1 > mInterCalibConfig->towerCutHigh_ZPC[0] || t2 > mInterCalibConfig->towerCutHigh_ZPC[1] || t3 > mInterCalibConfig->towerCutHigh_ZPC[2] || t4 > mInterCalibConfig->towerCutHigh_ZPC[3]) {
466+
return;
467+
}
468+
}
469+
double val[NPAR] = {tc, t1, t2, t3, t4, 1};
470+
if (tc > minfty && t1 > minfty && t2 > minfty && t3 > minfty && t4 > minfty) {
471+
for (int32_t i = 0; i < NPAR; i++) {
472+
for (int32_t j = i; j < NPAR; j++) {
473+
mData.mSum[ih][i][j] += val[i] * val[j] * w;
474+
}
449475
}
450476
}
451477
// mData.mSum[ih][5][5] contains the number of analyzed events
@@ -470,6 +496,9 @@ void InterCalib::fcn(int& npar, double* gin, double& chi, double* par, int iflag
470496
chi += (i == 0 ? par[i] : -par[i]) * (j == 0 ? par[j] : -par[j]) * mAdd[i][j];
471497
}
472498
}
499+
// Following line modifies the chisquare computation (sum of squares of residuals)
500+
// to perform orthogonal least squares instead of ordinary least squares minimization
501+
chi = chi / (1 + par[1] * par[1] + par[2] * par[2] + par[3] * par[3] + par[4] * par[4]);
473502
}
474503

475504
int InterCalib::mini(int ih)
@@ -498,15 +527,11 @@ int InterCalib::mini(int ih)
498527
// Calibration cvoefficient is forced to and step is forced to zero
499528
mMn[ih]->mnparm(0, "c0", 1., 0., 1., 1., ierflg);
500529

501-
// Special fit for proton calorimeters: fit least exposed towers with using previous
502-
// fit of all towers
530+
// Special fit for proton calorimeters: fit least exposed towers
531+
// starting from parameters of previous fit to all towers
503532

504533
// Tower 1
505-
if (ih == HidZPCX) {
506-
mMn[ih]->mnparm(1, "c1", mPar[HidZPC][1], 0, l_bnd, u_bnd, ierflg);
507-
} else {
508-
mMn[ih]->mnparm(1, "c1", start, step, l_bnd, u_bnd, ierflg);
509-
}
534+
mMn[ih]->mnparm(1, "c1", start, step, l_bnd, u_bnd, ierflg);
510535

511536
// Tower 2
512537
// Only two ZEM calorimeters: equalize response
@@ -518,20 +543,11 @@ int InterCalib::mini(int ih)
518543
step = 0;
519544
}
520545

521-
if (ih == HidZPCX) {
522-
mMn[ih]->mnparm(2, "c2", mPar[HidZPC][2], 0, l_bnd, u_bnd, ierflg);
523-
} else {
524-
mMn[ih]->mnparm(2, "c2", start, step, l_bnd, u_bnd, ierflg);
525-
}
546+
mMn[ih]->mnparm(2, "c2", start, step, l_bnd, u_bnd, ierflg);
526547

527548
// Towers 3 and 4
528-
if (ih == HidZPAX) {
529-
mMn[ih]->mnparm(3, "c3", mPar[HidZPA][3], 0, l_bnd, u_bnd, ierflg);
530-
mMn[ih]->mnparm(4, "c4", mPar[HidZPA][4], 0, l_bnd, u_bnd, ierflg);
531-
} else {
532-
mMn[ih]->mnparm(3, "c3", start, step, l_bnd, u_bnd, ierflg);
533-
mMn[ih]->mnparm(4, "c4", start, step, l_bnd, u_bnd, ierflg);
534-
}
549+
mMn[ih]->mnparm(3, "c3", start, step, l_bnd, u_bnd, ierflg);
550+
mMn[ih]->mnparm(4, "c4", start, step, l_bnd, u_bnd, ierflg);
535551

536552
// Offset
537553
l_bnd = mInterCalibConfig->l_bnd_o[ih];
@@ -551,13 +567,15 @@ int InterCalib::mini(int ih)
551567
l_bnd = mInterCalibConfig->l_bnd[ih];
552568
u_bnd = mInterCalibConfig->u_bnd[ih];
553569
for (int i = 1; i <= 4; i++) {
554-
if (TMath::Abs(mPar[ih][i] - l_bnd) < 1e-3 || TMath::Abs(mPar[ih][i] - u_bnd) < 1e-3) {
570+
if (TMath::Abs(mPar[ih][i] - l_bnd) < 1e-2 || TMath::Abs(mPar[ih][i] - u_bnd) < 1e-2) {
555571
retry = true;
556572
LOG(warn) << "ih=" << ih << " par " << i << " too close to boundaries";
557573
if (ih == 1 || ih == 7) {
558-
mMn[ih]->mnparm(i, parn[i], mTowerParam->tower_calib[IdZPAC + i], 0, l_bnd, u_bnd, ierflg);
574+
// mMn[ih]->mnparm(i, parn[i], mTowerParam->tower_calib[IdZPAC + i], 0, l_bnd, u_bnd, ierflg);
575+
mMn[ih]->mnparm(i, parn[i], mInterCalibConfig->start[ih], 0, l_bnd, u_bnd, ierflg);
559576
} else if (ih == 3 || ih == 8) {
560-
mMn[ih]->mnparm(i, parn[i], mTowerParam->tower_calib[IdZPCC + i], 0, l_bnd, u_bnd, ierflg);
577+
// mMn[ih]->mnparm(i, parn[i], mTowerParam->tower_calib[IdZPCC + i], 0, l_bnd, u_bnd, ierflg);
578+
mMn[ih]->mnparm(i, parn[i], mInterCalibConfig->start[ih], 0, l_bnd, u_bnd, ierflg);
561579
} else {
562580
LOG(fatal) << "ERROR on InterCalib minimization ih=" << ih;
563581
}

Detectors/ZDC/calib/src/InterCalibConfig.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ void InterCalibConfig::print() const
2828
}
2929
LOG(info) << "xcut_ZPA = " << xcut_ZPA;
3030
LOG(info) << "xcut_ZPC = " << xcut_ZPC;
31-
LOG(info) << "tower_cut_ZP = " << tower_cut_ZP;
31+
LOG(info) << "towerCutLow_ZPA = {" << towerCutLow_ZPA[0] << ", " << towerCutLow_ZPA[1] << ", " << towerCutLow_ZPA[2] << ", " << towerCutLow_ZPA[3] << "};";
32+
LOG(info) << "towerCutHigh_ZPA = {" << towerCutHigh_ZPA[0] << ", " << towerCutHigh_ZPA[1] << ", " << towerCutHigh_ZPA[2] << ", " << towerCutHigh_ZPA[3] << "};";
33+
LOG(info) << "towerCutLow_ZPC = {" << towerCutLow_ZPC[0] << ", " << towerCutLow_ZPC[1] << ", " << towerCutLow_ZPC[2] << ", " << towerCutLow_ZPC[3] << "};";
34+
LOG(info) << "towerCutHigh_ZPC = {" << towerCutHigh_ZPC[0] << ", " << towerCutHigh_ZPC[1] << ", " << towerCutHigh_ZPC[2] << ", " << towerCutHigh_ZPC[3] << "};";
35+
LOG(info) << "rms_cut_ZP = " << rms_cut_ZP;
3236
if (cross_check) {
3337
LOG(warn) << "THIS IS A CROSS CHECK CONFIGURATION (vs SUM)";
3438
}

Detectors/ZDC/calib/src/InterCalibEPN.cxx

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int InterCalibEPN::process(const gsl::span<const o2::zdc::BCRecData>& RecBC,
106106
float x, rms;
107107
ev.centroidZPA(x, rms);
108108
cumulate(HidZPA, ev.EZDC(IdZPAC), ev.EZDC(IdZPA1), ev.EZDC(IdZPA2), ev.EZDC(IdZPA3), ev.EZDC(IdZPA4), 1.);
109-
if (x < -(mInterCalibConfig->xcut_ZPA)) {
109+
if (x < -(mInterCalibConfig->xcut_ZPA) && rms >= mInterCalibConfig->rms_cut_ZP) {
110110
cumulate(HidZPAX, ev.EZDC(IdZPAC), ev.EZDC(IdZPA1), ev.EZDC(IdZPA2), ev.EZDC(IdZPA3), ev.EZDC(IdZPA4), 1.);
111111
}
112112
}
@@ -117,7 +117,7 @@ int InterCalibEPN::process(const gsl::span<const o2::zdc::BCRecData>& RecBC,
117117
float x, rms;
118118
ev.centroidZPC(x, rms);
119119
cumulate(HidZPC, ev.EZDC(IdZPCC), ev.EZDC(IdZPC1), ev.EZDC(IdZPC2), ev.EZDC(IdZPC3), ev.EZDC(IdZPC4), 1.);
120-
if (x > (mInterCalibConfig->xcut_ZPC)) {
120+
if (x > (mInterCalibConfig->xcut_ZPC) && rms >= mInterCalibConfig->rms_cut_ZP) {
121121
cumulate(HidZPCX, ev.EZDC(IdZPCC), ev.EZDC(IdZPC1), ev.EZDC(IdZPC2), ev.EZDC(IdZPC3), ev.EZDC(IdZPC4), 1.);
122122
}
123123
}
@@ -266,22 +266,33 @@ void InterCalibEPN::clear(int ih)
266266

267267
void InterCalibEPN::cumulate(int ih, double tc, double t1, double t2, double t3, double t4, double w = 1)
268268
{
269+
constexpr double minfty = -std::numeric_limits<double>::infinity();
269270
// printf("%s: ih=%d tc=%g t1=%g t2=%g t3=%g t4=%g w=%g\n",__func__,ih, tc, t1, t2, t3, t4, w); fflush(stdout);
270271
if (tc < mInterCalibConfig->cutLow[ih] || tc > mInterCalibConfig->cutHigh[ih]) {
271272
return;
272273
}
273-
if ((ih == 7 || ih == 8) && (t1 < mInterCalibConfig->tower_cut_ZP || t2 < mInterCalibConfig->tower_cut_ZP || t3 < mInterCalibConfig->tower_cut_ZP || t4 < mInterCalibConfig->tower_cut_ZP)) {
274-
return;
274+
if ((ih == HidZPA || ih == HidZPAX)) {
275+
if (t1 < mInterCalibConfig->towerCutLow_ZPA[0] || t2 < mInterCalibConfig->towerCutLow_ZPA[1] || t3 < mInterCalibConfig->towerCutLow_ZPA[2] || t4 < mInterCalibConfig->towerCutLow_ZPA[3]) {
276+
return;
277+
}
278+
if (t1 > mInterCalibConfig->towerCutHigh_ZPA[0] || t2 > mInterCalibConfig->towerCutHigh_ZPA[1] || t3 > mInterCalibConfig->towerCutHigh_ZPA[2] || t4 > mInterCalibConfig->towerCutHigh_ZPA[3]) {
279+
return;
280+
}
275281
}
276-
double val[NPAR] = {0, 0, 0, 0, 0, 1};
277-
val[0] = tc;
278-
val[1] = t1;
279-
val[2] = t2;
280-
val[3] = t3;
281-
val[4] = t4;
282-
for (int32_t i = 0; i < NPAR; i++) {
283-
for (int32_t j = i; j < NPAR; j++) {
284-
mData.mSum[ih][i][j] += val[i] * val[j] * w;
282+
if (ih == HidZPC || ih == HidZPCX) {
283+
if (t1 < mInterCalibConfig->towerCutLow_ZPC[0] || t2 < mInterCalibConfig->towerCutLow_ZPC[1] || t3 < mInterCalibConfig->towerCutLow_ZPC[2] || t4 < mInterCalibConfig->towerCutLow_ZPC[3]) {
284+
return;
285+
}
286+
if (t1 > mInterCalibConfig->towerCutHigh_ZPC[0] || t2 > mInterCalibConfig->towerCutHigh_ZPC[1] || t3 > mInterCalibConfig->towerCutHigh_ZPC[2] || t4 > mInterCalibConfig->towerCutHigh_ZPC[3]) {
287+
return;
288+
}
289+
}
290+
double val[NPAR] = {tc, t1, t2, t3, t4, 1};
291+
if (tc > minfty && t1 > minfty && t2 > minfty && t3 > minfty && t4 > minfty) {
292+
for (int32_t i = 0; i < NPAR; i++) {
293+
for (int32_t j = i; j < NPAR; j++) {
294+
mData.mSum[ih][i][j] += val[i] * val[j] * w;
295+
}
285296
}
286297
}
287298
// mData.mSum[ih][5][5] contains the number of analyzed events

Detectors/ZDC/calib/src/WaveformCalibConfig.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ WaveformCalibConfig::WaveformCalibConfig()
2020
cutLow[isig] = -std::numeric_limits<float>::infinity();
2121
cutHigh[isig] = std::numeric_limits<float>::infinity();
2222
}
23+
// Firmware aligns signals within one sample
2324
for (int itdc = 0; itdc < NTDCChannels; itdc++) {
24-
cutTimeLow[itdc] = -1.25;
25-
cutTimeHigh[itdc] = 1.25;
25+
cutTimeHigh[itdc] = o2::constants::lhc::LHCBunchSpacingNS / NTimeBinsPerBC;
26+
cutTimeLow[itdc] = -cutTimeHigh[itdc];
2627
}
2728
}
2829

0 commit comments

Comments
 (0)