Skip to content

Commit 4ab6c30

Browse files
authored
Merge pull request #95 from rest-for-physics/Andrii01L-patch-1
Rounding AddPoint input
2 parents a68a231 + 6ea5f2c commit 4ab6c30

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pipeline/processes/shaping/shaping.C

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,23 @@ Int_t shaping(Bool_t draw = false) {
5353
combinedEv->DrawEvent();
5454
}
5555

56-
if (gausMaxPeakPosition != 249) {
57-
cout << "Problem on gaussian convolution! Position of the most intense peak should be 248!!" << endl;
56+
if (gausMaxPeakPosition != 250) {
57+
cout << "Problem on gaussian convolution! Position of the most intense peak should be 250!!" << endl;
5858
return 1;
5959
}
6060

61-
if (gausMaxPeakValue != 199) {
62-
cout << "Problem on gaussian convolution! Ampltude of the most intense peak should be 124!!" << endl;
61+
if (gausMaxPeakValue != 200) {
62+
cout << "Problem on gaussian convolution! Amplitude of the most intense peak should be 200!!" << endl;
6363
return 2;
6464
}
6565

66-
if (agetMaxPeakPosition != 288) {
67-
cout << "Problem on shaperSin convolution! Position of the most intense peak should be 287!!" << endl;
66+
if (agetMaxPeakPosition != 289) {
67+
cout << "Problem on shaperSin convolution! Position of the most intense peak should be 289!!" << endl;
6868
return 3;
6969
}
7070

71-
if (agetMaxPeakValue != 172) {
72-
cout << "Problem on shaperSin convolution! Amplitude of the most intense peak should be 107!!"
71+
if (agetMaxPeakValue != 173) {
72+
cout << "Problem on shaperSin convolution! Amplitude of the most intense peak should be 173!!"
7373
<< endl;
7474
return 4;
7575
}

src/TRestRawSignalShapingProcess.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TRestEvent* TRestRawSignalShapingProcess::ProcessEvent(TRestEvent* inputEvent) {
270270
}
271271

272272
for (int i = 0; i < nBins; i++) {
273-
shapingSignal.AddPoint((Short_t)out[i]);
273+
shapingSignal.AddPoint((Short_t)round(out[i]));
274274
}
275275
shapingSignal.SetSignalID(inSignal.GetSignalID());
276276

0 commit comments

Comments
 (0)