[Halld-offline] Changes to Df125PulseIntegral and Df250PulseIntegral

Alexander Ostrovidov ostrov at hadron.physics.fsu.edu
Thu Dec 4 18:34:08 EST 2014


David,

I don't understand the following line in your example:
 double pedestal          = single_sample_ped * nsamples_integral/nsamples_pedestal;

Should this be instead
 double pedestal          = single_sample_ped * nsamples_pedestal;

Sasha


On Thursday, December 04, 2014, David Lawrence wrote:
> 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




More information about the Halld-offline mailing list