Data Analysis - Commissioning Tasks

From Xem2
Jump to navigationJump to search

Pedestal Defaults

The FADC250 modules used in the SHMS and HMS automatically determine the pedestal by looking at the first 4 samples of the programmable lookback (PL), which corresponds to the same four samples of the programmable trigger window (PTW). The average of the first four samples is saved as the Pulse Pedestal, which is written from the DAQ to an the EVIO file used by hcana to calculate the pulse integral PulseInt = PulseIntRaw - PulsePed. When any of the first 4 samples are above threshold of the PTW, the FADC250 sets the Pulse Pedestal to zero. Prior to the April 2020 version of hcana events with a pulse in the first 4 samples of the PL were ignored. These events can be counted by looking at events with a PulseAmpRaw==0. In the April 2020 hcana update, Mark Jones added parameters to set a default pedestal for all detector ADCs except the hodoscope. The change for the hodoscope is outlined below for the ScintillatorPlane::ProcessHits function of the THcScintillatorPlane Class (hodoscope).

hcana April-2020 Changes to Non-hodoscope Detectors

  • The FADC uses the first four samples of the FADC time window to determine the pedestal.
  • If a pulse is detected in the first four samples
    • FADC sets the raw pulse amp for all pulses in the window to zero
    • The pedestal is not the true pedestal for later pulses in the window.
  • Old Code : Throw out the detector hits when found PulseAmpRaw ==0
  • New Code: When PulseAmpRaw ==0
    • Uses an average pedestal value, PedDefault, that is a parameter for each detector PMT.
    • Calculates the PulseInt = PulseIntRaw – PedDefault
    • Set PulseAmp=0. Can be used as tag to look for these events.
    • Hodoscope detector is special. It does not use PedDefault. The PulseAmp is used for time walk correction. So when PulseAmpRaw==0, set PulseAmp=200.
Mark Jones DocDB ref. 1056 v1.

Takeaways

  • There is a new parameter that can optionally be set in hcana-april2020 version to set a default pedestal if there is a pulse in the first 4 ADC samples
  • The hodoscope is special, and does not have a pedestal default parameter.
  • Events that would have been ignored are now processed!

THcScintillatorPlane.cxx Changes

ScintillatorPlane::ProcessHits

  • Selects first TDC PMT hit within the TDC_min and TDC_max windows.
  • Old code
    • If Raw ADC Amp = 0 , then do not use hit.
    • First ADC hit within ADCTDC_min < TDC_time – ADC_time < ADCTDC_max
    • If no ADC hit is found then PMT hit is not “good”. Need both ADC and TDC info for “good” PMT hit.
  • New Code
    • If Raw ADC amp = 0, then use hit and test ADC hit setting ADC Amp =200.
      • Adc Amp=200 sets the timewalk correction to zero (refer to hodoscope calibration section).
    • First ADC hit within ADCTDC_min < TDC_time – ADC_time < ADCTDC_max with largest ADC value
    • If none found then selects one with smallest TDC_time – ADC_time .
    • So if there is an ADC hit for paddle PMT, then it will set “good” PMT hit if there is TDC PMT hit.
Mark Jones DocDB ref. 1055 v2.

Takeaway from hodoscope changes:

  • If there is any hit in a hodoscope PMT it will be set to good and used.
    • Even if there was a pulse in the first 4 samples, which sets PulseAmpRaw=0
    • Events with PulseAmpRaw==0 set the AdcAmp=200 and test hit anyways (effects time walk correction)
  • Good events that would have otherwise been ignored because a pulse in the pedestal region in the old analyzer are now accepted!

Setting Pedestal Defaults (XEM)

  • Ensure you have the ROOTfiles/<detector>/CALIBRATION/ directory in hallc_replay_XEM's top directory
  • Ensure you have the REPORT_OUTPUT/<detector>/CALIBRATION/ in hallc_replay_XEM's top directory
  • Ensure you have loaded the XEM2 software with the setup script.

source /group/c-xem2/software/setup.csh (or setup.sh if using bash)

  • All of the code below is run from the hallc_replay_XEM directory
  1. Run the hcana to create the replay and exit when finished
    hcana[0] .L SCRIPTS/<spectrometer>/CALIBRATION/replay_setPedDefault_shms.C
    hcana[1] replay_setPedDefault_<spectrometer>(RunNumber,Nevents)
    Try to use runs with 1M or more events. This makes it more likely the edge blocks of the calorimeters have default pedestals.
  2. Run the set_peddefault CALIBRATION script for the given detector
    hcana[0] .L CALIBRATION/set_peddefault/run_ped_default.C
    hcana[1] run_<spectrometer>_ped_default("<path_to_file/replayed_file.root>")
  3. Move the output root file to the JSROOT web location with a different name than move_me.root
    NOTE: This is only acceptable because the output pedestal default file has only a few histograms, do not save large root files to the /group/ disk!
    You can optionally put the output path and filename as the second parameter of the CALIBRATION script.
    For proper file placement and viewing, following the insturctions in the web location guide (to be linked)
  4. Copy the determined pedestal defaults to the relevant 'CUT' files by hand (First time)
    • If the pedestal defaults have not changed significantly, make note and keep the existing defaults.
    • If the pedestal defaults have changed, add a new 'CUT' file with a relevant name and associate it with the run number range (advanced).

HCANA parameters Set Here

Pedestal Parameters

SHMS

  • Parameter, number of elements, typical CUT file

HMS

  • To be added by Cameron when he runs the HMS 21 degree runs.
Online Running Information
Responsibility Check Frequency Reporting Sections
Casey Morean Every 100 runs Commissioning Activity
Page on XEM Web JSROOT