[Halld-online] Changes to Df125PulseIntegral and Df250PulseIntegral

David Lawrence davidl at jlab.org
Thu Dec 4 17:43:30 EST 2014


Hi All,

  I have just checked in some changes to the commissioning branch that will hopefully help
improve the situation regarding number of samples used to calculate pedestals to be subtracted
from integrals. These include:

1.) Adding nsamples_integral and nsamples_pedestal fields to the Df125PulseIntegral class as
   well as the DCDCDigiHit and DFDCCathodeDigiHit classes.

2.) Fixed the problem where the value of samples_pedestal was always set to 4 for the Df250PulseIntegral
   objects. Now it is set to 1.

3.) The value of nsamples_integral in both the Df1250PulseIntegral and Df250PulseIntegral objects
   are now set automatically to NSA_NSB iff the values came from mode7 data and a config. object
   was found in the data stream. Otherwise, it is set to what was used in emulation so in all cases, it should
   be valid.


So, for people implementing code that performs pedestal subtraction, you should do something like
the following:

double integral          = (double)pulse_integral->integral;
double single_sample_ped = (double)pulse_integral->pedestal;
double nsamples_integral = (double)pulse_integral->nsamples_integral;
double nsamples_pedestal = (double)pulse_integral->nsamples_pedestal;
double pedestal          = single_sample_ped * nsamples_integral/nsamples_pedestal;
double dE = gain * (integral - pedestal);


i.e. you should no longer reference the NSA_NSB from the config objects directly. This mechanism should
work for both emulated and non-emulated pulse integral objects. Let me know if anyone sees any issues.

Regards,
-David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.jlab.org/pipermail/halld-online/attachments/20141204/41a05997/attachment.html 


More information about the Halld-online mailing list