Skip to content

Commit

Permalink
Merge pull request #95 from rest-for-physics/Andrii01L-patch-1
Browse files Browse the repository at this point in the history
Rounding AddPoint input
  • Loading branch information
jgalan authored Feb 10, 2023
2 parents a68a231 + 6ea5f2c commit 4ab6c30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions pipeline/processes/shaping/shaping.C
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ Int_t shaping(Bool_t draw = false) {
combinedEv->DrawEvent();
}

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

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

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

if (agetMaxPeakValue != 172) {
cout << "Problem on shaperSin convolution! Amplitude of the most intense peak should be 107!!"
if (agetMaxPeakValue != 173) {
cout << "Problem on shaperSin convolution! Amplitude of the most intense peak should be 173!!"
<< endl;
return 4;
}
Expand Down
2 changes: 1 addition & 1 deletion src/TRestRawSignalShapingProcess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ TRestEvent* TRestRawSignalShapingProcess::ProcessEvent(TRestEvent* inputEvent) {
}

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

Expand Down

0 comments on commit 4ab6c30

Please sign in to comment.