Difference between revisions of "Data Analysis - Timing Windows and Reference Times"

From Xem2
Jump to navigationJump to search
Line 2: Line 2:
  
 
===Selecting Proper Reference Times===
 
===Selecting Proper Reference Times===
Reference times are a copy of the pre-trigger that is distributed to all read-out controllers (ROCs), which subsequently read out the detector signals associated with the signal.  Hall C uses multi-hit TDCs and ADCs, so there can be multiple hits within the match window width of the TDC or within the programmable trigger window of the ADC.  The reference time is subtracted from the detector signals within hcana, and '''hcana uses the first hit within the window if multiple hits are present.'''  The number of hits within a TWW or PTW is dependent on the physics data rate, the TWW or PTW length, and the number of pre-triggers required to fire the DAQ.  Refer to accidental rate exercise below to understand this more.  In order to subtract the correct reference time from all detectors, we must set the reference time, which decreases the probability hcana chooses the incorrect hit in the ADC or TDC of the reference time (copy of the pre-trigger).  This type of data analysis procedure is generally considered a 'Cut' because we are restricting ourselves to the data that falls after or within a range that is motivated by physics.
+
Reference times are a copy of the pre-trigger that is distributed to all read-out controllers (ROCs). A copy of the reference signal <code>T.<spec>.<det>_tdcTimeRaw or T.<spec>.<det>_tdcTimeRaw</code> as well as the detector signal is saved from the DAQ to the EVIO file for that run, which is used in hcana.  Hall C uses multi-hit TDCs and ADCs, so there can be multiple hits within the match window width of the TDC or within the programmable trigger window of the ADC.  The reference time is subtracted from the detector signals within hcana and saved to the <code>T.<spec>.<det>_adcTime or T.<spec>.<det>_tdcTime</code> variables.  '''hcana uses the first hit within the TWW or PTW if multiple hits are present.'''  <br>
Carlos Yero has created an '''Analysis Notes''' document, which contains important information about the possible reference times in different trigger configurations.  Most of the information in this section is based on that document.
+
The number of hits within a TWW or PTW is dependent on the physics data rate, the TWW or PTW length, and the number of pre-triggers required to fire the DAQ.  Refer to the accidental rate exercise below to understand this in more detail.  In order to subtract the correct reference time from all detectors, we must set the '''reference time cut''', which decreases the probability hcana chooses the incorrect hit in the ADC or TDC of the reference time (copy of the pre-trigger).  This type of data analysis procedure is generally considered a 'Cut' because we are restricting ourselves to the data that falls after a value or within a range that is motivated by physics by using a large number of events to inform our decision (statistical distribution).
 +
<br><br>
 +
TDC and ADC detector related reference time cuts are added to <code>PARAM/<spec>/GEN/<spec_letter>_reftime_cut_<run_period>.param</code> files within the hallc_replay_XEM framework.  The naming scheme for these parameters is <code><spec_letter><det>_<adc|tdc>refcut</code>.  The <code>T.<spec>.<det>_tdcTimeRaw</code> branches are not effected by reference time cuts.  Only the <code>T.<spec>.<det>_tdcTime</code> branches (and any other reference time subtracted branches) are effected.  One can apply reference time cuts to the Trigger Apparatus as well using the <code>t_<spec>_trig_adcrefcut and t_<spec>_trig_tdcrefcut</code> located in <code>PARAM/TRIG/t<spec>.param</code> file.  These branches are less significant when the DAQ is only using one trigger type, which is explained in more detail in the histogram interpretation section.
 +
<br><br>
 +
Carlos Yero has created an '''Analysis Notes''' document, which contains important information about the possible reference times in different trigger configurations.  Most of the information in this section is based on his document.
 
; Carlos Yero DocDB ref. 1032 v1.
 
; Carlos Yero DocDB ref. 1032 v1.
  

Revision as of 12:07, 2 September 2021

Reference Times

Selecting Proper Reference Times

Reference times are a copy of the pre-trigger that is distributed to all read-out controllers (ROCs). A copy of the reference signal T.<spec>.<det>_tdcTimeRaw or T.<spec>.<det>_tdcTimeRaw as well as the detector signal is saved from the DAQ to the EVIO file for that run, which is used in hcana. Hall C uses multi-hit TDCs and ADCs, so there can be multiple hits within the match window width of the TDC or within the programmable trigger window of the ADC. The reference time is subtracted from the detector signals within hcana and saved to the T.<spec>.<det>_adcTime or T.<spec>.<det>_tdcTime variables. hcana uses the first hit within the TWW or PTW if multiple hits are present.
The number of hits within a TWW or PTW is dependent on the physics data rate, the TWW or PTW length, and the number of pre-triggers required to fire the DAQ. Refer to the accidental rate exercise below to understand this in more detail. In order to subtract the correct reference time from all detectors, we must set the reference time cut, which decreases the probability hcana chooses the incorrect hit in the ADC or TDC of the reference time (copy of the pre-trigger). This type of data analysis procedure is generally considered a 'Cut' because we are restricting ourselves to the data that falls after a value or within a range that is motivated by physics by using a large number of events to inform our decision (statistical distribution).

TDC and ADC detector related reference time cuts are added to PARAM/<spec>/GEN/<spec_letter>_reftime_cut_<run_period>.param files within the hallc_replay_XEM framework. The naming scheme for these parameters is <spec_letter><det>_<adc|tdc>refcut. The T.<spec>.<det>_tdcTimeRaw branches are not effected by reference time cuts. Only the T.<spec>.<det>_tdcTime branches (and any other reference time subtracted branches) are effected. One can apply reference time cuts to the Trigger Apparatus as well using the t_<spec>_trig_adcrefcut and t_<spec>_trig_tdcrefcut located in PARAM/TRIG/t<spec>.param file. These branches are less significant when the DAQ is only using one trigger type, which is explained in more detail in the histogram interpretation section.

Carlos Yero has created an Analysis Notes document, which contains important information about the possible reference times in different trigger configurations. Most of the information in this section is based on his document.

Carlos Yero DocDB ref. 1032 v1.

Accidental Rate Example

For the time being, follow along with Carlos Yero's example in his Analysis Note

Reference Time Histogram Interpretation

Interpreting results requiring the tdcTimeRaw branches becomes complicated when multiple triggers are in use. When only one trigger type is used, in singles mode for instance, that trigger must have triggered to read out the data. In hcana-april2020 version and later, events that had a value of T.<trig>.<signal>_tdcTimeRaw==0 means that that trigger did not fire. In the case for spring 2018 XEM production data was taken with EL-REAL trigger (pTRIG2). Drawing a histogram of the pTRIG2_tdcTimeRaw requiring the value to be zero will result in zero events being displayed (an empty histogram). You can have multiple hits within the window, and this is especially true when the trigger is heavily pre-scaled. When there are multiple hits on a TDC or ADC channel, the first event after a reference time cut is used to set the tdcTime branch (no Raw). The reference time cut is not applied to the tdcTimeRaw branch.

  • Add two plots. One with tdcTimeRaw branches (with and without reftime cut) and one with tdcTime with and without reftime cut. Notice nothing changes in the RAW histogram while some events move around in the tdcTime histogram.
  • Add plots illustrating the tdcTime is offset using the t_shms_tdcoffset and the adcTime plots are offset by t_shms_adc_tdc_offset compared to the tdcTime.

Determining Reference Time Cuts

Within the hallc_replay_XEM framework there are PARAM files that ignore the previously set reference time cuts for each trigger configuration expected in the XEM analysis (SHMS singles, HMS singles, COIN). There are specific DEF-files, which define the histograms used for determining good Reference Times (See Carlos Yero's Analysis Note). A corresponding SCRIPT for each configuration exists that uses the relevant PARAM file and DEF-files. The reference time and timing windows portions of data analysis can be found in the TIMING directories because we are looking at the timing of incoming detector hits and ignoring accidental signals based on those TIMING cuts.

Location of PARAM files
PARAM/SHMS/GEN/p_no_reference_times.param
PARAM/HMS/GEN/h_no_reference_times.param
COIN Not added yet
Location of DEF-files
DEF-files/<trig>/TIMING/no_reference_times.def, <trig> = (SHMS,HMS,COIN)
Location of SCRIPTS
SCRIPTS/<trig>/TIMING/replay_no_timing_windows_<det>.C, <trig>=(SHMS,HMS,COIN), <det>=(shms,hms,coin)
Output ROOTfiles
ROOTfiles/<trig>/TIMING/<det>_noReferenceTime_runNo_Nevents.root, <trig>=(SHMS,HMS,COIN), <det>=(shms,hms,coin)
Post-replay analysis
(I will be adding a script that color-codes the histograms with multiplicity cuts and adds them all to a GUI on the web)
The output histograms are visually inspected, and the corresponding cut is determined by a trained eye.
Saving results
Place reftime cut rootfile in online location
Web location to be determind


Online Running Information
Responsibility Check Frequency Reporting Sections
Casey Morean Every kinematic change Commissioning Activity
Every trigger change Page on XEM Web JSROOT

Timing window Calibration

Online Running Information
Responsibility Check Frequency Reporting Sections
Casey Morean Every kinematic change Commissioning Activity
Every trigger change Page on XEM Web JSROOT