!README_TREE Documentation of trees produced by standard Pan analysis Pan's flexibility with regard to what devices it reads implies a good deal of variability in the details of what appears in the ROOT trees it produces, but the general content is as follows. Two trees are produced, a 'raw' tree and a 'pair' tree. Names of these trees are 'R' and 'P' respectively. In the following, angle brackets (<>) surround variable parts of a leaf name; for example, batt refers to leaf names like batt1, batt2, and so forth. All references to "helicity" refer to the signal sent from the source corresponding to the sign of the offset applied to the helicity Pockels cell. The labels "right" and "left" are arbitrary and do not necessarily correspond to the actual sign of the helicity in the hall. No sign flip due to half wave plate insertion and/or g-2 precession is applied. It is up to the user to determine and apply the correct sign run by run or slug by slug. The raw tree contains a leaf for each event. There are the following branches: (*) - Variables included if "calvar true" is set in the database. Data for each ADC or scaler: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ adc_ ......... Raw values read from ADC in ADC board . ranges from 0 to 3; from 0 to (number of boards - 1). (*) adc__dacsub .. Same data after DAC noise subtraction. adc__cal ..... Same data after DAC noise AND pedestal subtraction. scaler_ ...... Raw values read from scaler in scaler board . ranges from 0 to 31; from 0 to (number of boards - 1). (*) scaler__clkdiv Same data after v/f clock division. scaler__cal .. Same data after v/f clock division AND pedestal subtraction. Additional ADC data: ^^^^^^^^^^^^^^^^^^^^ csr ............ CSR status for ADC board ; from 0 to (number of boards - 1). dac ............ DAC noise value for ADC board ; from 0 to (number of boards - 1). integtime ...... Integration time; is null for crate 0 or crate number for crates 1-3. rampdelay ...... Ramp delay time; is null for crate 0 or crate number for crates 1-3. Data for each device read by an ADC or scaler: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (List of devices will in general vary depending on the configuration. The following are typical but a given root file may lack some of these devices or have other devices not listed here. Some of these branches contain copies of values from above, e.g. if BCM1 is read by ADC3_0, then bcm1r and adc3_0 contain the same value, as do bcm1 and adc3_0_cal.) batt ........... Battery (for crosstalk checking); ranges from 1. (Pedestal/DAC noise subtracted.) bcm ............ HAPPEX-I style beam current monitors; ranges from 1. (Pedestal/DAC noise subtracted.) (*) bcmc ........... Same, before pedestal subtraction. bcmr ........... Same, before DAC noise/clock calibration and pedestal subtraction bcmcav ......... G0 style beam current monitors; ranges from 1. (Pedestal/DAC noise subtracted.) (*) bcmcavc ........ Same, before DAC noise/clock calibration and pedestal subtraction bcmcavr ........ Same, before subtraction. bpm ...... Data for stripline position monitor BPM. Present legal values for are 8, 10, 12, 4a, 4b, 1I02, 1I04, 1I06, 0I02, 0L01, 0L02, 0L03, 0L04, 0L06. may be: mx .. Maximum of 4 wire signals (Pedestal/DAC noise not subtracted.). ws .. 4-wire sum (Pedestal/DAC noise subtracted.) x ... x position (in mm, rotation applied if appropriate). (*) xmc . x- wire value (Pedestal not subtracted.) xm .. x- wire value (Pedestal/DAC noise not subtracted.) (*) xpc . Same for x+ wire. xp .. Same for x+ wire. xws . x wire sum for BPM (Pedestal/DAC noise subtracted.) y ... Same as x, for y position. (*) ymc . Same as xmc, for y. ym .. Same as xm, for y. (*) ypc . Same as xpc, for y. yp .. Same as xp, for y. yws . Same as xws, for y. bpmcav ... Data for G0 type cavity position monitor BPMCAV. Present legal values for are 1, 2, 3, 4. may be x ... x position (in mm). (*) xc .. x position data before pedestal subtraction. xr .. x position data before calibration. y ... Same as x, for y position. (*) yc .. Same as x, for y. yr .. Same as x, for y. det ............ Cherenkov detectors; ranges from 1. (Pedestal/DAC noise subtracted.) (*) detc ........... Same, before pedestal subtraction. detr ........... Same, before subtraction. dets ........... Flag for detector saturation (> 60000). det_all ........... Sum of all Cherenkov signals. det_hi ............ Sum of two high-Q^2 Cherenkovs. det_l ............. Sum of two left-arm Cherenkovs. det_lo ............ Sum of two low-Q^2 Cherenkovs. det_r ............. Sum of two right-arm Cherenkovs. lumi ........ Luminosity monitors; is b or f for back or front lumi; ranges from 1. (Pedestal/DAC noise subtracted.) (*) lumic ....... Same, before pedestal subtraction. lumir ....... Same, before subtraction. prof ..... Profile detectors: is l or r for left or right arm. may be: ..... Amplitude. (Pedestal/DAC noise subtracted.) c .......... Same, before pedestal subtraction. r .......... Same, before subtraction. v ....... Control voltage; ranges from 1 to 3. (Pedestal/DAC noise subtracted.) vc ...... Same, before pedestal subtraction. vr ...... Same, before subtraction. x .......... x position. y .......... y position. qpd ...... Data for quad photodiode . may be: mm, mp, pm, pp .. Values for 4 quadrants sum ............. Total of 4 quadrants x ............... x position y ............... y position Sequencing/helicity information for the window containing this event: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In each of the following (except timeslot), is null for crate 0 or crate number for crates 1-3. helicity ....... Value of helicity flag (0 for "right" or 1 for "left"). Note that this normally is the helicity belonging to the 8th previous window. pairsynch ...... Value of pairsynch flag (1 for first window of a pair, 0 for the second). quadsynch ...... Value of quadsynch flag (1 for first window of a quadruple, 0 for the second through fourth). oversample ..... Raw value from oversample register. timeslot .......... Oversample timeslot number (from 1 to oversample value) (crate 0). pitadac ........ 12-bit DAC value. precdac ........ 16-bit DAC value. Cuts: ^^^^^ cond_ ....... Nonzero if event fails cut condition . can be: beam_burp ..... Abrupt change in beam intensity c_burp ........ Same for Hall C beam det_saturate .. Detector saturation evt_seq ....... Event sequence failure low_beam ...... Beam intensity below threshold low_beam_c .... Same for Hall C beam pair_seq ...... Pair sequence failure pos_burp ...... Abrupt change in beam position startup ....... First event(s) of run EPICS data: ^^^^^^^^^^^ EPICS data are read periodically, and selected data can be written into the event tree. Branch names correspond to EPICS variable names with colons (":") changed to underscores ("_"). Also written are: epics_evnum ....... Event number during which the EPICS data were collected. epics_timestamp ... Timestamp for EPICS data. Miscellaneous: ^^^^^^^^^^^^^^ bmw ......... Beam modulation data. may be: cln ........... Tags events where modulation system is in a stable state cyc ........... Modulation cycle number obj ........... Index of object being modulated val ........... Value applied to modulation object daq1flag .......... Count of interrupts. daq2flag .......... Count of VxWorks ticks. ev_num ............ Number of this event (starting with 1). scanclean ......... Data for various "scans" of non-readout devices. scandata ....... Likewise. sync ........ Synchronization data. is "ch" for counting house, "i" for injector, "l" for left arm, "r" for right arm. is 0 for ungated reference frequency, 1 for gated, 2 for gated-bar. ( = 0 only for injector crate, 1 or 2 only for left and right arm crates.) tirdata ........ Trigger Interrupt Register data. is null for crate 0 or crate number for crates 1-3. v2f_clk ........ Clock for voltage to frequency. ranges over 0 to number of v2fs minus 1. The pair tree contains a leaf for each helicity pair of events. Some branches are arrays with a single index which can be 0 or 1; these correspond to values for the "right" and "left" events, respectively, of the pair. There are the following branches: Paired event data ^^^^^^^^^^^^^^^^^ evt_[2] .............. Copies of the corresponding data (branch ) in the raw tree, for right helicity (index 0) and left helicity (index 1) event of pair. To reduce confusion, the "helicity" event data are stored as "evt_readout_helicity". "Readout" is supposed to remind you that this is the helicity read out with this event, and typically belonging to the 8th previous window. Quantities calculated from above data: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff_ ................ Helicity correlated difference (right minus left) for device . Devices include batt, bpm, qpd. asym_ ................ Helicity correlated asymmetry (right minus left over right plus left) for device . Devices include bcm, lumi, qpd. asym_n_ .............. Normalized helicity correlated asymmetry (as above but device data divided by beam current, typically measured by bcm1) for device . Devices include det, lumi. avg_ ................. Average (right plus left over 2) for device . Devices include bcm, bpm, lumi, det. avg_n_ .............. Normalized average (as above but device data divided by beam current, typically measured by bcm1) for device . Devices include det, lumi. (The following asymmetries are for unweighted sums of devices.) asym_n_lumi_sum ......... Normalized asymmetry for sum of lumi channels. asym_n_lumi_ave ......... Average of normalized asymmetries for lumi channels. asym_n_det_l ............... Normalized asymmetry for sum of detectors in left spectrometer arm. asym_n_det_r ............... Normalized asymmetry for sum of detectors in right spectrometer arm. asym_n_det_lo .............. Normalized asymmetry for sum of detectors at lower Q^2 (one in each arm). asym_n_det_hi .............. Normalized asymmetry for sum of detectors at higher Q^2 (one in each arm). asym_n_det_all ............. Normalized asymmetry for sum of all detectors. asym_n_det_ave ............. Average of normalized asymmetries for all detectors. Sequencing/helicity information ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ prev_hel ................... Helicity of the event previous to the first event of this pair. prev_readout_hel ........... Helicity read out in event previous to the first event of this pair (and typically belonging to the eighth previous event). Cuts: ^^^^^ ok_cond .................... Nonzero if this pair passes all cut conditions. ok_cut ..................... Nonzero if this pair is not inside any cut interval, for cuts pertaining to Hall A. ok_cutC .................... Nonzero if this pair is not inside any cut interval, for cuts pertaining to Hall C. cond_[2] ............. Nonzero if right, left event fails cut condition . can be as above in raw tree description. cut_[2] .............. Nonzero if right, left event falls within cut interval for cut type . Miscellaneous: ^^^^^^^^^^^^^^ m_ev_num ................... Mean value of evt_ev_num[0] and evt_ev_num[1]. Cuts ^^^^ Events and pairs that fail cut conditions are not omitted from the trees. Instead, one must use the cut information included in the tree to impose cuts. Generally one wants to cut not only events that fail a cut condition but events occurring near such events in time, i.e., events within a cut interval around those that fail the cut condition. Any pair in which both events fall outside all cut intervals pertaining to Hall A has nonzero value for ok_cut. Therefore to impose all such cuts just select on ok_cut, e.g. P->Draw ("asym_bcm1", "ok_cut") Similarly, ok_cutC has nonzero value for any pair in which both events fall outside all cut intervals pertaining to Hall C. For specialized analyses in which some cuts are to be ignored, you can test cuts individually with the cut_ leaves. Here the value is nonzero if the event *is* within a cut interval of the corresponding type. So e.g. to impose only low beam cuts, P->Draw ("asym_bcm1", "!cut_low_beam[0] && !cut_low_beam[1]")