MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000430Hall D OfflineGeneralpublic2014-12-03 16:142014-12-04 20:08
Reporterdavidl 
Assigned Todavidl 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0000430: Number of pedestal samples reported by emulation is 4 when it should be 1
DescriptionIt appears that the number of samples being reported in the Digi Hit objects when generated from emulated data is 4 when it should be 1. Simon pointed this out when looking at ST data.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000622)
davidl (administrator)
2014-12-04 20:08

This was fixed in svn revision 16752. Here is the e-mail announcing it:

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

- Issue History
Date Modified Username Field Change
2014-12-03 16:14 davidl New Issue
2014-12-04 20:08 davidl Note Added: 0000622
2014-12-04 20:08 davidl Status new => resolved
2014-12-04 20:08 davidl Resolution open => fixed
2014-12-04 20:08 davidl Assigned To => davidl


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker