<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi All,<div><br></div><div> I have just checked in some changes to the commissioning branch that will hopefully help</div><div>improve the situation regarding number of samples used to calculate pedestals to be subtracted</div><div>from integrals. These include:</div><div><br></div><div>1.) Adding nsamples_integral and nsamples_pedestal fields to the Df125PulseIntegral class as</div><div> well as the DCDCDigiHit and DFDCCathodeDigiHit classes.</div><div><br></div><div>2.) Fixed the problem where the value of samples_pedestal was always set to 4 for the Df250PulseIntegral</div><div> objects. Now it is set to 1.</div><div><br></div><div>3.) The value of nsamples_integral in both the Df1250PulseIntegral and Df250PulseIntegral objects</div><div> are now set automatically to NSA_NSB iff the values came from mode7 data and a config. object</div><div> was found in the data stream. Otherwise, it is set to what was used in emulation so in all cases, it should</div><div> be valid.</div><div><br></div><div><br></div><div>So, for people implementing code that performs pedestal subtraction, you should do something like</div><div>the following:</div><div><br></div><div><font face="Courier">double integral = (double)pulse_integral->integral;</font></div><div><font face="Courier">double single_sample_ped = (double)pulse_integral->pedestal;</font></div><div><font face="Courier">double nsamples_integral = (double)pulse_integral->nsamples_integral;</font></div><div><font face="Courier">double nsamples_pedestal = (double)pulse_integral->nsamples_pedestal;</font></div><div><font face="Courier">double pedestal = </font><span style="font-family: Courier;">single_sample_ped</span><font face="Courier"> * nsamples_integral/nsamples_pedestal;</font></div><div><font face="Courier">double dE = gain * (</font><span style="font-family: Courier;">integral - pedestal);</span></div><div><br></div><div><br></div><div>i.e. you should no longer reference the NSA_NSB from the config objects directly. This mechanism should</div><div>work for both emulated and non-emulated pulse integral objects. Let me know if anyone sees any issues.</div><div><br></div><div>Regards,</div><div>-David</div></body></html>