Skip to content
Snippets Groups Projects
Commit d0b07c90 authored by Carlos Yero's avatar Carlos Yero Committed by Stephen Wood
Browse files

minor bug fix on the beam current BCM saturation correction on the 1st standard scaler event

parent 7b337a1a
No related branches found
No related tags found
1 merge request!16Merge in upstream changes and update CI
......@@ -424,7 +424,8 @@ Int_t THcScalerEvtHandler::AnalyzeBuffer(UInt_t* rdata, Bool_t onlysync)
dvars[ivar]=0.;
if (bcm_ind != -1) {
dvars[ivar]=((scalers[idx]->GetData(ichan))/fDeltaTime-fBCM_Offset[bcm_ind])/fBCM_Gain[bcm_ind];
dvars[ivar]=dvars[ivar]+fBCM_SatOffset[bcm_ind]*TMath::Max(dvars[ivar]-fBCM_SatOffset[i],0.0);
dvars[ivar]=dvars[ivar]+fBCM_SatQuadratic[bcm_ind]*TMath::Power(TMath::Max(dvars[ivar]-fBCM_SatOffset[bcm_ind],0.0),2.0);
}
if (bcm_ind == fbcm_Current_Threshold_Index) scal_current= dvars[ivar];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment