From ce06f358537c86fc82aa54d2343b56857267386f Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 6 Feb 2019 09:10:42 -0500 Subject: [PATCH 001/102] Added the ROOT "New" library as a requirement. This library is required to be able to use the TMapFile for our online display process. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f12eb070..5bbfba8de 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ link_directories(${Boost_LIBRARY_DIR}) # ROOT # set(minimum_root_version 6.0) -find_package(ROOT ${minimum_root_version} REQUIRED) +find_package(ROOT ${minimum_root_version} REQUIRED New) config_add_dependency(ROOT ${minimum_root_version}) From 6b7803bcf46adc3b25e4a6258e55370e0cffa8c1 Mon Sep 17 00:00:00 2001 From: Paul King Date: Fri, 8 Feb 2019 20:26:03 -0500 Subject: [PATCH 002/102] Added two injector channel maps which include the addition of two 0R BPMs The two 0R BPMs replaced two 0L BPMs before run 1047. Run 1199 is the beginning of consistent 30Hz running in all crates --- Parity/prminput/prexinj_beamline.1047-.map | 167 +++++++++++++++++++++ Parity/prminput/prexinj_beamline.1199-.map | 167 +++++++++++++++++++++ 2 files changed, 334 insertions(+) create mode 100644 Parity/prminput/prexinj_beamline.1047-.map create mode 100644 Parity/prminput/prexinj_beamline.1199-.map diff --git a/Parity/prminput/prexinj_beamline.1047-.map b/Parity/prminput/prexinj_beamline.1047-.map new file mode 100644 index 000000000..ea4720dd8 --- /dev/null +++ b/Parity/prminput/prexinj_beamline.1047-.map @@ -0,0 +1,167 @@ + +ROC=24 +Bank=0x02 +vqwk_buffer_offset=1 + +!same sample size for ADCs in a given bank +sample_size=16564 +! +! +! module.type, module.num chan.num, det.type, det.name + + +!ADC0 + VQWK, 0, 0, bpmstripline, bpm0I01Axp + VQWK, 0, 1, bpmstripline, bpm0I01Axm + VQWK, 0, 2, bpmstripline, bpm0I01Ayp + VQWK, 0, 3, bpmstripline, bpm0I01Aym + VQWK, 0, 4, bpmstripline, bpm1I04xp + VQWK, 0, 5, bpmstripline, bpm1I04xm + VQWK, 0, 6, bpmstripline, bpm1I04yp + VQWK, 0, 7, bpmstripline, bpm1I04ym + +!ADC1 + VQWK, 1, 0, bpmstripline, bpm1I02xp + VQWK, 1, 1, bpmstripline, bpm1I02xm + VQWK, 1, 2, bpmstripline, bpm1I02yp + VQWK, 1, 3, bpmstripline, bpm1I02ym + VQWK, 1, 4, bpmstripline, bpm0I01xp + VQWK, 1, 5, bpmstripline, bpm0I01xm + VQWK, 1, 6, bpmstripline, bpm0I01yp + VQWK, 1, 7, bpmstripline, bpm0I01ym + + +!ADC2 + VQWK, 2, 0, bpmstripline, bpm1I06xp + VQWK, 2, 1, bpmstripline, bpm1I06xm + VQWK, 2, 2, bpmstripline, bpm1I06yp + VQWK, 2, 3, bpmstripline, bpm1I06ym + VQWK, 2, 4, bpmstripline, bpm0I02xp + VQWK, 2, 5, bpmstripline, bpm0I02xm + VQWK, 2, 6, bpmstripline, bpm0I02yp + VQWK, 2, 7, bpmstripline, bpm0I02ym + +!ADC3 + VQWK, 3, 0, bpmstripline, bpm0I02Axp + VQWK, 3, 1, bpmstripline, bpm0I02Axm + VQWK, 3, 2, bpmstripline, bpm0I02Ayp + VQWK, 3, 3, bpmstripline, bpm0I02Aym + VQWK, 3, 4, bpmstripline, bpm0I05xp + VQWK, 3, 5, bpmstripline, bpm0I05xm + VQWK, 3, 6, bpmstripline, bpm0I05yp + VQWK, 3, 7, bpmstripline, bpm0I05ym + +!ADC4 + VQWK, 4, 0, bpmstripline, bpm0I07xp + VQWK, 4, 1, bpmstripline, bpm0I07xm + VQWK, 4, 2, bpmstripline, bpm0I07yp + VQWK, 4, 3, bpmstripline, bpm0I07ym + VQWK, 4, 4, bpmstripline, bpm0L01xp + VQWK, 4, 5, bpmstripline, bpm0L01xm + VQWK, 4, 6, bpmstripline, bpm0L01yp + VQWK, 4, 7, bpmstripline, bpm0L01ym + + +!ADC5 + VQWK, 5, 0, bpmstripline, bpm0L02xp + VQWK, 5, 1, bpmstripline, bpm0L02xm + VQWK, 5, 2, bpmstripline, bpm0L02yp + VQWK, 5, 3, bpmstripline, bpm0L02ym + VQWK, 5, 4, bpmstripline, bpm0L03xp + VQWK, 5, 5, bpmstripline, bpm0L03xm + VQWK, 5, 6, bpmstripline, bpm0L03yp + VQWK, 5, 7, bpmstripline, bpm0L03ym + +!ADC6 + VQWK, 6, 0, bpmstripline, bpm0L04xp + VQWK, 6, 1, bpmstripline, bpm0L04xm + VQWK, 6, 2, bpmstripline, bpm0L04yp + VQWK, 6, 3, bpmstripline, bpm0L04ym + VQWK, 6, 4, bpmstripline, bpm0L05xp + VQWK, 6, 5, bpmstripline, bpm0L05xm + VQWK, 6, 6, bpmstripline, bpm0L05yp + VQWK, 6, 7, bpmstripline, bpm0L05ym + +!ADC7 + VQWK, 7, 0, bpmstripline, bpm0L06xp + VQWK, 7, 1, bpmstripline, bpm0L06xm + VQWK, 7, 2, bpmstripline, bpm0L06yp + VQWK, 7, 3, bpmstripline, bpm0L06ym + VQWK, 7, 4, bpmstripline, bpm0L07xp + VQWK, 7, 5, bpmstripline, bpm0L07xm + VQWK, 7, 6, bpmstripline, bpm0L07yp + VQWK, 7, 7, bpmstripline, bpm0L07ym + +!ADC8 + VQWK, 8, 0, bpmstripline, bpm0R02xp + VQWK, 8, 1, bpmstripline, bpm0R02xm + VQWK, 8, 2, bpmstripline, bpm0R02yp + VQWK, 8, 3, bpmstripline, bpm0R02ym + VQWK, 8, 4, bpmstripline, bpm0R05xp + VQWK, 8, 5, bpmstripline, bpm0R05xm + VQWK, 8, 6, bpmstripline, bpm0R05yp + VQWK, 8, 7, bpmstripline, bpm0R05ym + +!ADC9 + VQWK, 9, 0, bpmstripline, bpm0L10xp + VQWK, 9, 1, bpmstripline, bpm0L10xm + VQWK, 9, 2, bpmstripline, bpm0L10yp + VQWK, 9, 3, bpmstripline, bpm0L10ym + VQWK, 9, 4, bpmstripline, bpm2I02xp + VQWK, 9, 5, bpmstripline, bpm2I02xm + VQWK, 9, 6, bpmstripline, bpm2I02yp + VQWK, 9, 7, bpmstripline, bpm2I02ym + +!ADC10 + VQWK, 10, 0, bpmstripline, bpm2I01xp + VQWK, 10, 1, bpmstripline, bpm2I01xm + VQWK, 10, 2, bpmstripline, bpm2I01yp + VQWK, 10, 3, bpmstripline, bpm2I01ym + VQWK, 10, 4, bcm, BCM0L02 + VQWK, 10, 5, bcm, Batery6 + VQWK, 10, 6, bcm, Batery7 + VQWK, 10, 7, bcm, PhaseMonitor + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +Bank=0x01 +scaler_buffer_offset=6 +normclock=clk4MHz_1 + + SCALER, 0, 0, clock, sca0_0 + SCALER, 0, 1, clock, sca0_1 + SCALER, 0, 2, clock, sca0_2 + SCALER, 0, 3, clock, sca0_3 + SCALER, 0, 4, clock, sca0_4 + SCALER, 0, 5, clock, sca0_5 + SCALER, 0, 6, clock, sca0_6 + SCALER, 0, 7, clock, sca0_7 + SCALER, 0, 8, clock, sca0_8 + SCALER, 0, 9, clock, sca0_9 + SCALER, 0, 10, clock, sca0_10 + SCALER, 0, 11, clock, sca0_11 + SCALER, 0, 12, clock, sca0_12 + SCALER, 0, 13, clock, sca0_13 + SCALER, 0, 14, clock, sca0_14 + SCALER, 0, 15, clock, sca0_15 + + SCALER, 0, 16, halomonitor, sca0_16 + SCALER, 0, 17, clock, clk4MHz_1 + SCALER, 0, 18, clock, clk4MHz_2 + SCALER, 0, 19, clock, clk4MHz_3 + SCALER, 0, 20, halomonitor, sca0_20 + SCALER, 0, 21, halomonitor, sca0_21 + SCALER, 0, 22, halomonitor, sca0_22 + SCALER, 0, 23, halomonitor, sca0_23 + SCALER, 0, 24, halomonitor, sca0_24 + SCALER, 0, 25, halomonitor, sca0_25 + SCALER, 0, 26, halomonitor, sca0_26 + SCALER, 0, 27, halomonitor, sca0_27 + SCALER, 0, 28, halomonitor, sca0_28 + SCALER, 0, 29, halomonitor, sca0_29 + SCALER, 0, 30, halomonitor, sca0_30 + SCALER, 0, 31, halomonitor, sca0_31 + + +[PUBLISH] +# # q_targ, bcm, bcm0l02, c +# q_targ, bpmstripline, bpm0i02, ef ### Effective charge of BPM0i02 diff --git a/Parity/prminput/prexinj_beamline.1199-.map b/Parity/prminput/prexinj_beamline.1199-.map new file mode 100644 index 000000000..ea4720dd8 --- /dev/null +++ b/Parity/prminput/prexinj_beamline.1199-.map @@ -0,0 +1,167 @@ + +ROC=24 +Bank=0x02 +vqwk_buffer_offset=1 + +!same sample size for ADCs in a given bank +sample_size=16564 +! +! +! module.type, module.num chan.num, det.type, det.name + + +!ADC0 + VQWK, 0, 0, bpmstripline, bpm0I01Axp + VQWK, 0, 1, bpmstripline, bpm0I01Axm + VQWK, 0, 2, bpmstripline, bpm0I01Ayp + VQWK, 0, 3, bpmstripline, bpm0I01Aym + VQWK, 0, 4, bpmstripline, bpm1I04xp + VQWK, 0, 5, bpmstripline, bpm1I04xm + VQWK, 0, 6, bpmstripline, bpm1I04yp + VQWK, 0, 7, bpmstripline, bpm1I04ym + +!ADC1 + VQWK, 1, 0, bpmstripline, bpm1I02xp + VQWK, 1, 1, bpmstripline, bpm1I02xm + VQWK, 1, 2, bpmstripline, bpm1I02yp + VQWK, 1, 3, bpmstripline, bpm1I02ym + VQWK, 1, 4, bpmstripline, bpm0I01xp + VQWK, 1, 5, bpmstripline, bpm0I01xm + VQWK, 1, 6, bpmstripline, bpm0I01yp + VQWK, 1, 7, bpmstripline, bpm0I01ym + + +!ADC2 + VQWK, 2, 0, bpmstripline, bpm1I06xp + VQWK, 2, 1, bpmstripline, bpm1I06xm + VQWK, 2, 2, bpmstripline, bpm1I06yp + VQWK, 2, 3, bpmstripline, bpm1I06ym + VQWK, 2, 4, bpmstripline, bpm0I02xp + VQWK, 2, 5, bpmstripline, bpm0I02xm + VQWK, 2, 6, bpmstripline, bpm0I02yp + VQWK, 2, 7, bpmstripline, bpm0I02ym + +!ADC3 + VQWK, 3, 0, bpmstripline, bpm0I02Axp + VQWK, 3, 1, bpmstripline, bpm0I02Axm + VQWK, 3, 2, bpmstripline, bpm0I02Ayp + VQWK, 3, 3, bpmstripline, bpm0I02Aym + VQWK, 3, 4, bpmstripline, bpm0I05xp + VQWK, 3, 5, bpmstripline, bpm0I05xm + VQWK, 3, 6, bpmstripline, bpm0I05yp + VQWK, 3, 7, bpmstripline, bpm0I05ym + +!ADC4 + VQWK, 4, 0, bpmstripline, bpm0I07xp + VQWK, 4, 1, bpmstripline, bpm0I07xm + VQWK, 4, 2, bpmstripline, bpm0I07yp + VQWK, 4, 3, bpmstripline, bpm0I07ym + VQWK, 4, 4, bpmstripline, bpm0L01xp + VQWK, 4, 5, bpmstripline, bpm0L01xm + VQWK, 4, 6, bpmstripline, bpm0L01yp + VQWK, 4, 7, bpmstripline, bpm0L01ym + + +!ADC5 + VQWK, 5, 0, bpmstripline, bpm0L02xp + VQWK, 5, 1, bpmstripline, bpm0L02xm + VQWK, 5, 2, bpmstripline, bpm0L02yp + VQWK, 5, 3, bpmstripline, bpm0L02ym + VQWK, 5, 4, bpmstripline, bpm0L03xp + VQWK, 5, 5, bpmstripline, bpm0L03xm + VQWK, 5, 6, bpmstripline, bpm0L03yp + VQWK, 5, 7, bpmstripline, bpm0L03ym + +!ADC6 + VQWK, 6, 0, bpmstripline, bpm0L04xp + VQWK, 6, 1, bpmstripline, bpm0L04xm + VQWK, 6, 2, bpmstripline, bpm0L04yp + VQWK, 6, 3, bpmstripline, bpm0L04ym + VQWK, 6, 4, bpmstripline, bpm0L05xp + VQWK, 6, 5, bpmstripline, bpm0L05xm + VQWK, 6, 6, bpmstripline, bpm0L05yp + VQWK, 6, 7, bpmstripline, bpm0L05ym + +!ADC7 + VQWK, 7, 0, bpmstripline, bpm0L06xp + VQWK, 7, 1, bpmstripline, bpm0L06xm + VQWK, 7, 2, bpmstripline, bpm0L06yp + VQWK, 7, 3, bpmstripline, bpm0L06ym + VQWK, 7, 4, bpmstripline, bpm0L07xp + VQWK, 7, 5, bpmstripline, bpm0L07xm + VQWK, 7, 6, bpmstripline, bpm0L07yp + VQWK, 7, 7, bpmstripline, bpm0L07ym + +!ADC8 + VQWK, 8, 0, bpmstripline, bpm0R02xp + VQWK, 8, 1, bpmstripline, bpm0R02xm + VQWK, 8, 2, bpmstripline, bpm0R02yp + VQWK, 8, 3, bpmstripline, bpm0R02ym + VQWK, 8, 4, bpmstripline, bpm0R05xp + VQWK, 8, 5, bpmstripline, bpm0R05xm + VQWK, 8, 6, bpmstripline, bpm0R05yp + VQWK, 8, 7, bpmstripline, bpm0R05ym + +!ADC9 + VQWK, 9, 0, bpmstripline, bpm0L10xp + VQWK, 9, 1, bpmstripline, bpm0L10xm + VQWK, 9, 2, bpmstripline, bpm0L10yp + VQWK, 9, 3, bpmstripline, bpm0L10ym + VQWK, 9, 4, bpmstripline, bpm2I02xp + VQWK, 9, 5, bpmstripline, bpm2I02xm + VQWK, 9, 6, bpmstripline, bpm2I02yp + VQWK, 9, 7, bpmstripline, bpm2I02ym + +!ADC10 + VQWK, 10, 0, bpmstripline, bpm2I01xp + VQWK, 10, 1, bpmstripline, bpm2I01xm + VQWK, 10, 2, bpmstripline, bpm2I01yp + VQWK, 10, 3, bpmstripline, bpm2I01ym + VQWK, 10, 4, bcm, BCM0L02 + VQWK, 10, 5, bcm, Batery6 + VQWK, 10, 6, bcm, Batery7 + VQWK, 10, 7, bcm, PhaseMonitor + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +Bank=0x01 +scaler_buffer_offset=6 +normclock=clk4MHz_1 + + SCALER, 0, 0, clock, sca0_0 + SCALER, 0, 1, clock, sca0_1 + SCALER, 0, 2, clock, sca0_2 + SCALER, 0, 3, clock, sca0_3 + SCALER, 0, 4, clock, sca0_4 + SCALER, 0, 5, clock, sca0_5 + SCALER, 0, 6, clock, sca0_6 + SCALER, 0, 7, clock, sca0_7 + SCALER, 0, 8, clock, sca0_8 + SCALER, 0, 9, clock, sca0_9 + SCALER, 0, 10, clock, sca0_10 + SCALER, 0, 11, clock, sca0_11 + SCALER, 0, 12, clock, sca0_12 + SCALER, 0, 13, clock, sca0_13 + SCALER, 0, 14, clock, sca0_14 + SCALER, 0, 15, clock, sca0_15 + + SCALER, 0, 16, halomonitor, sca0_16 + SCALER, 0, 17, clock, clk4MHz_1 + SCALER, 0, 18, clock, clk4MHz_2 + SCALER, 0, 19, clock, clk4MHz_3 + SCALER, 0, 20, halomonitor, sca0_20 + SCALER, 0, 21, halomonitor, sca0_21 + SCALER, 0, 22, halomonitor, sca0_22 + SCALER, 0, 23, halomonitor, sca0_23 + SCALER, 0, 24, halomonitor, sca0_24 + SCALER, 0, 25, halomonitor, sca0_25 + SCALER, 0, 26, halomonitor, sca0_26 + SCALER, 0, 27, halomonitor, sca0_27 + SCALER, 0, 28, halomonitor, sca0_28 + SCALER, 0, 29, halomonitor, sca0_29 + SCALER, 0, 30, halomonitor, sca0_30 + SCALER, 0, 31, halomonitor, sca0_31 + + +[PUBLISH] +# # q_targ, bcm, bcm0l02, c +# q_targ, bpmstripline, bpm0i02, ef ### Effective charge of BPM0i02 From 811532f4f8f1f5d8e5475f0af84ae3106bd524dc Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Fri, 8 Feb 2019 20:56:16 -0500 Subject: [PATCH 003/102] Add SAMs pedestals; Update Hall A BPM channel map; Update UNSER channel map, pedestal and gain. --- Parity/prminput/prexCH_beamline.1199-.map | 34 ++++++++++---------- Parity/prminput/prexCH_beamline_pedestal.map | 4 ++- Parity/prminput/prex_sam_pedestal.1221-.map | 9 ++++++ Parity/prminput/prex_sam_pedestal.map | 17 +++++----- 4 files changed, 38 insertions(+), 26 deletions(-) create mode 100644 Parity/prminput/prex_sam_pedestal.1221-.map diff --git a/Parity/prminput/prexCH_beamline.1199-.map b/Parity/prminput/prexCH_beamline.1199-.map index 9196e9036..8efa8d205 100644 --- a/Parity/prminput/prexCH_beamline.1199-.map +++ b/Parity/prminput/prexCH_beamline.1199-.map @@ -24,16 +24,16 @@ sample_size=16564 VQWK, 1, 1, bpmstripline, BPM4Exm VQWK, 1, 2, bpmstripline, BPM4Eyp VQWK, 1, 3, bpmstripline, BPM4Eym - VQWK, 1, 4, bcm, QWK_1_4 - VQWK, 1, 5, bcm, QWK_1_5 - VQWK, 1, 6, bcm, QWK_1_6 - VQWK, 1, 7, bcm, QWK_1_7 + VQWK, 1, 4, bpmstripline, BPM8xp + VQWK, 1, 5, bpmstripline, BPM8xm + VQWK, 1, 6, bpmstripline, BPM8yp + VQWK, 1, 7, bpmstripline, BPM8ym !ADC2 - VQWK, 2, 0, bcm, QWK_2_0 - VQWK, 2, 1, bcm, QWK_2_1 - VQWK, 2, 2, bcm, QWK_2_2 - VQWK, 2, 3, bcm, QWK_2_3 + VQWK, 2, 0, bpmstripline, BPM12xp + VQWK, 2, 1, bpmstripline, BPM12xm + VQWK, 2, 2, bpmstripline, BPM12yp + VQWK, 2, 3, bpmstripline, BPM12ym VQWK, 2, 4, bpmstripline, BPM4Axp VQWK, 2, 5, bpmstripline, BPM4Axm VQWK, 2, 6, bpmstripline, BPM4Ayp @@ -43,21 +43,21 @@ sample_size=16564 VQWK, 3, 0, bcm, CAV4BX VQWK, 3, 1, bcm, CAV4BY VQWK, 3, 2, bcm, CAV4BQ - VQWK, 3, 3, bcm, QWK_3_3 - VQWK, 3, 4, bcm, CAV4CX - VQWK, 3, 5, bcm, CAV4CY - VQWK, 3, 6, bcm, CAV4CQ - VQWK, 3, 7, bcm, unser + VQWK, 3, 3, bcm, CAV4CX + VQWK, 3, 4, bcm, CAV4CY + VQWK, 3, 5, bcm, CAV4CQ + VQWK, 3, 6, bcm, QWK_3_6 + VQWK, 3, 7, bcm, UNSER !ADC4 VQWK, 4, 0, bcm, CAV4DX VQWK, 4, 1, bcm, CAV4DY VQWK, 4, 2, bcm, CAV4DQ VQWK, 4, 3, bcm, QWK_4_3 - VQWK, 4, 4, bcm, QWK_4_4 - VQWK, 4, 5, bcm, QWK_4_5 - VQWK, 4, 6, bcm, QWK_4_6 - VQWK, 4, 7, bcm, QWK_4_7 + VQWK, 4, 4, bpmstripline, BPM10xm + VQWK, 4, 5, bpmstripline, BPM10xp + VQWK, 4, 6, bpmstripline, BPM10yp + VQWK, 4, 7, bpmstripline, BPM10ym [PUBLISH] diff --git a/Parity/prminput/prexCH_beamline_pedestal.map b/Parity/prminput/prexCH_beamline_pedestal.map index a0af6f9fd..ad971f725 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.map +++ b/Parity/prminput/prexCH_beamline_pedestal.map @@ -9,4 +9,6 @@ !---- !bpm1i02XP , 1204.2 , 1. !END - + + ! Based on Run 1214 , HAPLOG 3609 + UNSER, -174.1, 2.066e-2 diff --git a/Parity/prminput/prex_sam_pedestal.1221-.map b/Parity/prminput/prex_sam_pedestal.1221-.map new file mode 100644 index 000000000..b92ab2454 --- /dev/null +++ b/Parity/prminput/prex_sam_pedestal.1221-.map @@ -0,0 +1,9 @@ +!! SAM Pedestal based on run 1221, ELOG 3608 +sam1 , -0.011181 , 76.293e-6 +sam2 , 0.995808 , 76.293e-6 +sam3 , 0.973865 , 76.293e-6 +sam4 , 0.956836 , 76.293e-6 +sam5 , 0.959412 , 76.293e-6 +sam6 , 0.997675 , 76.293e-6 +sam7 , 0.983060 , 76.293e-6 +sam8 , 0.970250 , 76.293e-6 diff --git a/Parity/prminput/prex_sam_pedestal.map b/Parity/prminput/prex_sam_pedestal.map index 8d89ae98f..b92ab2454 100644 --- a/Parity/prminput/prex_sam_pedestal.map +++ b/Parity/prminput/prex_sam_pedestal.map @@ -1,8 +1,9 @@ -sam1 , 0 , 76.293e-6 -sam2 , 0 , 76.293e-6 -sam3 , 0 , 76.293e-6 -sam4 , 0 , 76.293e-6 -sam5 , 0 , 76.293e-6 -sam6 , 0 , 76.293e-6 -sam7 , 0 , 76.293e-6 -sam8 , 0 , 76.293e-6 +!! SAM Pedestal based on run 1221, ELOG 3608 +sam1 , -0.011181 , 76.293e-6 +sam2 , 0.995808 , 76.293e-6 +sam3 , 0.973865 , 76.293e-6 +sam4 , 0.956836 , 76.293e-6 +sam5 , 0.959412 , 76.293e-6 +sam6 , 0.997675 , 76.293e-6 +sam7 , 0.983060 , 76.293e-6 +sam8 , 0.970250 , 76.293e-6 From 43a236a6634134efaead90e0a2e4dad9506f588f Mon Sep 17 00:00:00 2001 From: Paul King Date: Sat, 9 Feb 2019 19:15:46 -0500 Subject: [PATCH 004/102] Changed CHA beam current monitor names and added rough calibration We realized that the channels previously labeled "bcm_us" and "bcm_ds" were the unity-gain analog signals, and we didn't have the DSx3 and DSx10 signals decoded. We've changed these names to be "bcm_an_*" to be the analog BCMs. The BCM DSx3 has been aliased as "q_targ". Rough calibrations for pedestal and gain were entered for US, DS, DSx3, and DSx10 based on 2uA nd 5uA data in run 1224. An event cut on bcm_an_ds3 has been applied of >1uA for good events, with a stability threshhold of 0.25. --- Parity/prminput/prexCH_beamline.1199-.map | 10 +++++----- Parity/prminput/prexCH_beamline_eventcuts.map | 2 +- Parity/prminput/prexCH_beamline_pedestal.1199-.map | 12 ++++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 Parity/prminput/prexCH_beamline_pedestal.1199-.map diff --git a/Parity/prminput/prexCH_beamline.1199-.map b/Parity/prminput/prexCH_beamline.1199-.map index 8efa8d205..ed599aeb4 100644 --- a/Parity/prminput/prexCH_beamline.1199-.map +++ b/Parity/prminput/prexCH_beamline.1199-.map @@ -12,10 +12,10 @@ sample_size=16564 !ADC0 VQWK, 0, 0, bcm, QWK_0_0 VQWK, 0, 1, bcm, QWK_0_1 - VQWK, 0, 2, bcm, BCM_US - VQWK, 0, 3, bcm, BCM_DS - VQWK, 0, 4, bcm, QWK_0_4 - VQWK, 0, 5, bcm, QWK_0_5 + VQWK, 0, 2, bcm, BCM_AN_US + VQWK, 0, 3, bcm, BCM_AN_DS + VQWK, 0, 4, bcm, BCM_AN_DS3 + VQWK, 0, 5, bcm, BCM_AN_DS10 VQWK, 0, 6, bcm, QWK_0_6 VQWK, 0, 7, bcm, QWK_0_7 @@ -62,4 +62,4 @@ sample_size=16564 [PUBLISH] ! new.tree.variable.name, analysis.class, old.tree.variable.name, element.to.store - q_targ, bcm, bcm_us, c + q_targ, bcm, bcm_an_ds3, c diff --git a/Parity/prminput/prexCH_beamline_eventcuts.map b/Parity/prminput/prexCH_beamline_eventcuts.map index f7391f4cc..b07c07eea 100644 --- a/Parity/prminput/prexCH_beamline_eventcuts.map +++ b/Parity/prminput/prexCH_beamline_eventcuts.map @@ -27,7 +27,7 @@ EVENTCUTS = 3 !*************************************************** !for bcm devices !device_type, device_name, lower limit, upper limit, local(l)/global(g), stability percentage - bcm, bcmUS, 1, 1e6, l, 0 + bcm, bcm_an_ds3, 1.0, 1e6, g, 0.2 !for parity mock data run 1000 9.98608e+06 !bcm, qwk_bcm0l03, 8.00e+06, 1.20e+07, 1, 0 diff --git a/Parity/prminput/prexCH_beamline_pedestal.1199-.map b/Parity/prminput/prexCH_beamline_pedestal.1199-.map new file mode 100644 index 000000000..fc6db2108 --- /dev/null +++ b/Parity/prminput/prexCH_beamline_pedestal.1199-.map @@ -0,0 +1,12 @@ +! adc sample size 16564 +!---- +!END + +! Unser calibration based on Run 1214 , HAPLOG 3609 +UNSER, -174.1, 2.066e-2 + +! Rough BCM calibration from 2uA and 5uA during run 1224. +bcm_an_us, -634.1 0.00306062 +bcm_an_ds, -810.6 0.00300731 +bcm_an_ds3, -662.6 0.00088747 +bcm_an_ds10, -255.9, 0.00031405 From ddaca24a938933ba03f76bdbf240d7424cf799ff Mon Sep 17 00:00:00 2001 From: Paul King Date: Sat, 9 Feb 2019 19:26:49 -0500 Subject: [PATCH 005/102] Added injector map files for 30 Hz and 240 Hz PQB running before APEX. These just set the helicity pattern length and VQWK samples for these runs. Pedestals would still need to be entered. --- .../prminput/prexinj_beamline.1062-1198.map | 167 ++++++++++++++++++ .../prminput/prexinj_helicity.1062-1076.map | 86 +++++++++ .../prminput/prexinj_helicity.1129-1192.map | 86 +++++++++ 3 files changed, 339 insertions(+) create mode 100644 Parity/prminput/prexinj_beamline.1062-1198.map create mode 100644 Parity/prminput/prexinj_helicity.1062-1076.map create mode 100644 Parity/prminput/prexinj_helicity.1129-1192.map diff --git a/Parity/prminput/prexinj_beamline.1062-1198.map b/Parity/prminput/prexinj_beamline.1062-1198.map new file mode 100644 index 000000000..8a7604d3c --- /dev/null +++ b/Parity/prminput/prexinj_beamline.1062-1198.map @@ -0,0 +1,167 @@ + +ROC=24 +Bank=0x02 +vqwk_buffer_offset=1 + +!same sample size for ADCs in a given bank +sample_size=1984 +! +! +! module.type, module.num chan.num, det.type, det.name + + +!ADC0 + VQWK, 0, 0, bpmstripline, bpm0I01Axp + VQWK, 0, 1, bpmstripline, bpm0I01Axm + VQWK, 0, 2, bpmstripline, bpm0I01Ayp + VQWK, 0, 3, bpmstripline, bpm0I01Aym + VQWK, 0, 4, bpmstripline, bpm1I04xp + VQWK, 0, 5, bpmstripline, bpm1I04xm + VQWK, 0, 6, bpmstripline, bpm1I04yp + VQWK, 0, 7, bpmstripline, bpm1I04ym + +!ADC1 + VQWK, 1, 0, bpmstripline, bpm1I02xp + VQWK, 1, 1, bpmstripline, bpm1I02xm + VQWK, 1, 2, bpmstripline, bpm1I02yp + VQWK, 1, 3, bpmstripline, bpm1I02ym + VQWK, 1, 4, bpmstripline, bpm0I01xp + VQWK, 1, 5, bpmstripline, bpm0I01xm + VQWK, 1, 6, bpmstripline, bpm0I01yp + VQWK, 1, 7, bpmstripline, bpm0I01ym + + +!ADC2 + VQWK, 2, 0, bpmstripline, bpm1I06xp + VQWK, 2, 1, bpmstripline, bpm1I06xm + VQWK, 2, 2, bpmstripline, bpm1I06yp + VQWK, 2, 3, bpmstripline, bpm1I06ym + VQWK, 2, 4, bpmstripline, bpm0I02xp + VQWK, 2, 5, bpmstripline, bpm0I02xm + VQWK, 2, 6, bpmstripline, bpm0I02yp + VQWK, 2, 7, bpmstripline, bpm0I02ym + +!ADC3 + VQWK, 3, 0, bpmstripline, bpm0I02Axp + VQWK, 3, 1, bpmstripline, bpm0I02Axm + VQWK, 3, 2, bpmstripline, bpm0I02Ayp + VQWK, 3, 3, bpmstripline, bpm0I02Aym + VQWK, 3, 4, bpmstripline, bpm0I05xp + VQWK, 3, 5, bpmstripline, bpm0I05xm + VQWK, 3, 6, bpmstripline, bpm0I05yp + VQWK, 3, 7, bpmstripline, bpm0I05ym + +!ADC4 + VQWK, 4, 0, bpmstripline, bpm0I07xp + VQWK, 4, 1, bpmstripline, bpm0I07xm + VQWK, 4, 2, bpmstripline, bpm0I07yp + VQWK, 4, 3, bpmstripline, bpm0I07ym + VQWK, 4, 4, bpmstripline, bpm0L01xp + VQWK, 4, 5, bpmstripline, bpm0L01xm + VQWK, 4, 6, bpmstripline, bpm0L01yp + VQWK, 4, 7, bpmstripline, bpm0L01ym + + +!ADC5 + VQWK, 5, 0, bpmstripline, bpm0L02xp + VQWK, 5, 1, bpmstripline, bpm0L02xm + VQWK, 5, 2, bpmstripline, bpm0L02yp + VQWK, 5, 3, bpmstripline, bpm0L02ym + VQWK, 5, 4, bpmstripline, bpm0L03xp + VQWK, 5, 5, bpmstripline, bpm0L03xm + VQWK, 5, 6, bpmstripline, bpm0L03yp + VQWK, 5, 7, bpmstripline, bpm0L03ym + +!ADC6 + VQWK, 6, 0, bpmstripline, bpm0L04xp + VQWK, 6, 1, bpmstripline, bpm0L04xm + VQWK, 6, 2, bpmstripline, bpm0L04yp + VQWK, 6, 3, bpmstripline, bpm0L04ym + VQWK, 6, 4, bpmstripline, bpm0L05xp + VQWK, 6, 5, bpmstripline, bpm0L05xm + VQWK, 6, 6, bpmstripline, bpm0L05yp + VQWK, 6, 7, bpmstripline, bpm0L05ym + +!ADC7 + VQWK, 7, 0, bpmstripline, bpm0L06xp + VQWK, 7, 1, bpmstripline, bpm0L06xm + VQWK, 7, 2, bpmstripline, bpm0L06yp + VQWK, 7, 3, bpmstripline, bpm0L06ym + VQWK, 7, 4, bpmstripline, bpm0L07xp + VQWK, 7, 5, bpmstripline, bpm0L07xm + VQWK, 7, 6, bpmstripline, bpm0L07yp + VQWK, 7, 7, bpmstripline, bpm0L07ym + +!ADC8 + VQWK, 8, 0, bpmstripline, bpm0R02xp + VQWK, 8, 1, bpmstripline, bpm0R02xm + VQWK, 8, 2, bpmstripline, bpm0R02yp + VQWK, 8, 3, bpmstripline, bpm0R02ym + VQWK, 8, 4, bpmstripline, bpm0R05xp + VQWK, 8, 5, bpmstripline, bpm0R05xm + VQWK, 8, 6, bpmstripline, bpm0R05yp + VQWK, 8, 7, bpmstripline, bpm0R05ym + +!ADC9 + VQWK, 9, 0, bpmstripline, bpm0L10xp + VQWK, 9, 1, bpmstripline, bpm0L10xm + VQWK, 9, 2, bpmstripline, bpm0L10yp + VQWK, 9, 3, bpmstripline, bpm0L10ym + VQWK, 9, 4, bpmstripline, bpm2I02xp + VQWK, 9, 5, bpmstripline, bpm2I02xm + VQWK, 9, 6, bpmstripline, bpm2I02yp + VQWK, 9, 7, bpmstripline, bpm2I02ym + +!ADC10 + VQWK, 10, 0, bpmstripline, bpm2I01xp + VQWK, 10, 1, bpmstripline, bpm2I01xm + VQWK, 10, 2, bpmstripline, bpm2I01yp + VQWK, 10, 3, bpmstripline, bpm2I01ym + VQWK, 10, 4, bcm, BCM0L02 + VQWK, 10, 5, bcm, Batery6 + VQWK, 10, 6, bcm, Batery7 + VQWK, 10, 7, bcm, PhaseMonitor + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +Bank=0x01 +scaler_buffer_offset=6 +normclock=clk4MHz_1 + + SCALER, 0, 0, clock, sca0_0 + SCALER, 0, 1, clock, sca0_1 + SCALER, 0, 2, clock, sca0_2 + SCALER, 0, 3, clock, sca0_3 + SCALER, 0, 4, clock, sca0_4 + SCALER, 0, 5, clock, sca0_5 + SCALER, 0, 6, clock, sca0_6 + SCALER, 0, 7, clock, sca0_7 + SCALER, 0, 8, clock, sca0_8 + SCALER, 0, 9, clock, sca0_9 + SCALER, 0, 10, clock, sca0_10 + SCALER, 0, 11, clock, sca0_11 + SCALER, 0, 12, clock, sca0_12 + SCALER, 0, 13, clock, sca0_13 + SCALER, 0, 14, clock, sca0_14 + SCALER, 0, 15, clock, sca0_15 + + SCALER, 0, 16, halomonitor, sca0_16 + SCALER, 0, 17, clock, clk4MHz_1 + SCALER, 0, 18, clock, clk4MHz_2 + SCALER, 0, 19, clock, clk4MHz_3 + SCALER, 0, 20, halomonitor, sca0_20 + SCALER, 0, 21, halomonitor, sca0_21 + SCALER, 0, 22, halomonitor, sca0_22 + SCALER, 0, 23, halomonitor, sca0_23 + SCALER, 0, 24, halomonitor, sca0_24 + SCALER, 0, 25, halomonitor, sca0_25 + SCALER, 0, 26, halomonitor, sca0_26 + SCALER, 0, 27, halomonitor, sca0_27 + SCALER, 0, 28, halomonitor, sca0_28 + SCALER, 0, 29, halomonitor, sca0_29 + SCALER, 0, 30, halomonitor, sca0_30 + SCALER, 0, 31, halomonitor, sca0_31 + + +[PUBLISH] +# # q_targ, bcm, bcm0l02, c +# q_targ, bpmstripline, bpm0i02, ef ### Effective charge of BPM0i02 diff --git a/Parity/prminput/prexinj_helicity.1062-1076.map b/Parity/prminput/prexinj_helicity.1062-1076.map new file mode 100644 index 000000000..19335eb6d --- /dev/null +++ b/Parity/prminput/prexinj_helicity.1062-1076.map @@ -0,0 +1,86 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! input file for decoding the helicity subsystem +!! Of note in this file: +!! HelicityDecodingMode : will tell which mode of decoding is in use +!! : for now it can be InputRegisterMode, UserbitMode +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!Injector data during happex data taking: run 12331, 12354, 12356 +!HelicityDecodingMode=InputRegisterMode +!PatternPhase=4 +!ROC=23 +! +! Header=0xfdacf000 +! HAPPEX BMW words +!SKIP 148 +!WORD, 0, 0, helicitydata, ha_cleandata +!WORD, 0, 0, helicitydata, ha_scandata1 +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!INPUT REGISTER MODE +HelicityDecodingMode=InputRegisterMode + +InputRegMask_FakeMPS=0 !!! Do not use a input register bit to indicate a "fake" set of helicity bits + +! Set the patternPhase (number of windows in a pattern) for each run range. +! If patternPhase!=4, then also set the NumberPatternsDelayed +! so the reported helicity is delayed by 8 windows (default 2). +!NumberPatternsDelayed=4 +PatternPhase=8 + + + +!Need to set PATTERNPHASEOFFSET = 1 (when pattern phase starts with 1) or 0 (when pattern phase starts with 0) +!default value for PATTERNPHASEOFFSET = 1 is set within the code itself which works fine with regular injector/beamline/parity mock data +!uncomment below line only if phase number start from 0 +PATTERNPHASEOFFSET=0 + + +!seed size is either 24 bit or 30 bit. default is 30 bit +!RandSeedBits=24 + +ROC=24 +Bank=0x3 + +! +! module.type, module.num chan.num, det.type, det.name +! +SKIP 1 ! This is the marker word for PAN +WORD, 0, 0, helicitydata, input_register +WORD, 0, 0, helicitydata, output_register +SKIP 1 ! WORD, 0, 0, helicitydata, sca_MPS_num +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_counter +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_phase +SKIP 3 +WORD, 0, 0, helicitydata, cleandata +WORD, 0, 0, helicitydata, scandata1 +WORD, 0, 0, helicitydata, scandata2 +SKIP 1 +!END +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!USER BIT MODE + +!HelicityDecodingMode= UserbitMode +!PatternPhase=4 +!seed size is either 24 bit or 30 bit. default is 24 bit +!RandSeedBits=24 +!RandSeedBits=30 +!ROC=31 +!Bank=0x3101 +! +! module.type, module.num chan.num, det.type, det.name +! +!WORD, 0, 0, helicitydata, cleandata +!WORD, 0, 0, helicitydata, scandata1 +!WORD, 0, 0, helicitydata, scandata2 +!WORD, 0, 0, helicitydata, scalerheader +!WORD, 0, 0, helicitydata, scalercounter +!WORD, 0, 0, helicitydata, userbit +!END diff --git a/Parity/prminput/prexinj_helicity.1129-1192.map b/Parity/prminput/prexinj_helicity.1129-1192.map new file mode 100644 index 000000000..19335eb6d --- /dev/null +++ b/Parity/prminput/prexinj_helicity.1129-1192.map @@ -0,0 +1,86 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! input file for decoding the helicity subsystem +!! Of note in this file: +!! HelicityDecodingMode : will tell which mode of decoding is in use +!! : for now it can be InputRegisterMode, UserbitMode +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!Injector data during happex data taking: run 12331, 12354, 12356 +!HelicityDecodingMode=InputRegisterMode +!PatternPhase=4 +!ROC=23 +! +! Header=0xfdacf000 +! HAPPEX BMW words +!SKIP 148 +!WORD, 0, 0, helicitydata, ha_cleandata +!WORD, 0, 0, helicitydata, ha_scandata1 +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!INPUT REGISTER MODE +HelicityDecodingMode=InputRegisterMode + +InputRegMask_FakeMPS=0 !!! Do not use a input register bit to indicate a "fake" set of helicity bits + +! Set the patternPhase (number of windows in a pattern) for each run range. +! If patternPhase!=4, then also set the NumberPatternsDelayed +! so the reported helicity is delayed by 8 windows (default 2). +!NumberPatternsDelayed=4 +PatternPhase=8 + + + +!Need to set PATTERNPHASEOFFSET = 1 (when pattern phase starts with 1) or 0 (when pattern phase starts with 0) +!default value for PATTERNPHASEOFFSET = 1 is set within the code itself which works fine with regular injector/beamline/parity mock data +!uncomment below line only if phase number start from 0 +PATTERNPHASEOFFSET=0 + + +!seed size is either 24 bit or 30 bit. default is 30 bit +!RandSeedBits=24 + +ROC=24 +Bank=0x3 + +! +! module.type, module.num chan.num, det.type, det.name +! +SKIP 1 ! This is the marker word for PAN +WORD, 0, 0, helicitydata, input_register +WORD, 0, 0, helicitydata, output_register +SKIP 1 ! WORD, 0, 0, helicitydata, sca_MPS_num +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_counter +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_phase +SKIP 3 +WORD, 0, 0, helicitydata, cleandata +WORD, 0, 0, helicitydata, scandata1 +WORD, 0, 0, helicitydata, scandata2 +SKIP 1 +!END +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!USER BIT MODE + +!HelicityDecodingMode= UserbitMode +!PatternPhase=4 +!seed size is either 24 bit or 30 bit. default is 24 bit +!RandSeedBits=24 +!RandSeedBits=30 +!ROC=31 +!Bank=0x3101 +! +! module.type, module.num chan.num, det.type, det.name +! +!WORD, 0, 0, helicitydata, cleandata +!WORD, 0, 0, helicitydata, scandata1 +!WORD, 0, 0, helicitydata, scandata2 +!WORD, 0, 0, helicitydata, scalerheader +!WORD, 0, 0, helicitydata, scalercounter +!WORD, 0, 0, helicitydata, userbit +!END From b9c76cc74708048fe4c32627e9b01b47c3639af9 Mon Sep 17 00:00:00 2001 From: Paul King Date: Sat, 9 Feb 2019 19:31:21 -0500 Subject: [PATCH 006/102] Activated the event ring stability cut in the full PREX configuration. --- Parity/prminput/prex.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parity/prminput/prex.conf b/Parity/prminput/prex.conf index 01aca8ef3..4b23f2630 100644 --- a/Parity/prminput/prex.conf +++ b/Parity/prminput/prex.conf @@ -19,4 +19,4 @@ codafile-stem = parity_ALL_ codafile-ext = dat ring.size = 200 -ring.stability_cut = -1 +ring.stability_cut = 1 From 71859928c774e91f9a143a3afe0dff90be5d0fb0 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 9 Feb 2019 19:57:12 -0500 Subject: [PATCH 007/102] update macros for japan and default use of protofiles --- panguin/macros/default.cfg | 26 +++++++++++--------------- panguin/macros/exampleMacro1.C | 4 ++-- panguin/macros/exampleMacro2.C | 2 +- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/panguin/macros/default.cfg b/panguin/macros/default.cfg index 93d64fbd0..5ceece909 100644 --- a/panguin/macros/default.cfg +++ b/panguin/macros/default.cfg @@ -7,35 +7,31 @@ # the histogram # Default root file to look at -#rootfile pan.root -rootfile /adaqfs/home/apar/ciprian/pan/ROOTfiles/parity18_4416_standard.root -##rootfile /adaq1/work1/apar/ciprian/parity18_4416_standard.root -##rootfile /dev/shm//QwMemMapFile.map +#rootfile $QW_ROOTFILES/prexALL_1227.root # Prototype rootfilename.. overrides GetRootFileName.C - ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root -#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root +protorootfile $QW_ROOTFILES/prexALL_XXXXX.root # Defined cuts -definecut evcut (ev_num>1000) -definecut mevcut (m_ev_num>1000) +definecut evcut (CodaEventNumber>1000) # Uncomment the below line to monitor the fill of a ROOTfile. #watchfile +### column row newpage 1 4 title BCMs vs Event Number - bcm1:ev_num evcut -type scat -title "BCM1 vs Eventnumber" - bcm2:ev_num -title "BCM2 vs Event Number" -type box - bcm5:ev_num evcut -type prof -title "Prof example" - (1-bcm1/bcm2):(ev_num*3600) abs(bcm1<5e4) -title "What is this?" -tree R + bcm_an_us:CodaEventNumber evcut -type scat -title "BCM1 vs Eventnumber" + bcm_an_ds:CodaEventNumber -title "BCM2 vs Event Number" -type box + bcm_an_ds10:CodaEventNumber evcut -type prof -title "Prof example" + (1-bcm_an_us/bcm_an_ds):(CodaEventNumber/30) ErrorFlag==0 -title "What is this?" -tree evt newpage 1 2 title BCM asymmetries - asym_bcm1 ok_cut - asym_bcm2 ok_cut + asym_bcm_an_us ErrorFlag==0 + asym_bcm_an_ds ErrorFlag==0 newpage 1 3 title Use some macros - macro exampleMacro1.C + macro exampleMacro1.C(10) macro exampleMacro2.C diff --git a/panguin/macros/exampleMacro1.C b/panguin/macros/exampleMacro1.C index fd8293205..dda1aa435 100644 --- a/panguin/macros/exampleMacro1.C +++ b/panguin/macros/exampleMacro1.C @@ -1,4 +1,4 @@ -void exampleMacro1(){ - TF1 *f=new TF1("f1","sin(x)/x",0.,10.); +void exampleMacro1(double scale=4){ + TF1 *f=new TF1("f1",Form("sin(x)/x*%f",scale),0.,10.); f->Draw(); } diff --git a/panguin/macros/exampleMacro2.C b/panguin/macros/exampleMacro2.C index 6eba9d33e..d6526cba3 100644 --- a/panguin/macros/exampleMacro2.C +++ b/panguin/macros/exampleMacro2.C @@ -1,3 +1,3 @@ void exampleMacro2(){ - R->Draw("bcm1:ev_num","ev_num>1000"); + mul->Draw("asym_bcm_an_us","ErrorFlag==0"); } From 60eefae65d4f47e641b7d6297e413104e0c545bf Mon Sep 17 00:00:00 2001 From: Paul King Date: Sat, 9 Feb 2019 23:17:42 -0500 Subject: [PATCH 008/102] Used "git update-index --chmod=-x " to clear the executable bit as described in issue #4 I repeatedly used a command like "find -type f -executable" to find the files with executable bits set, and executed the git update-index command on them. There remain several files in "Feedback" and "Tests" which have the executable bit, but I think they ought to. There are several executables in "SetupFiles" which I think are no longer needed and could be removed from the distribution. That's for another day. --- Analysis/include/MQwCodaControlEvent.h | 0 Analysis/include/MQwF1TDC.h | 0 Analysis/include/MQwHistograms.h | 0 Analysis/include/MQwMockable.h | 0 Analysis/include/MQwV775TDC.h | 0 Analysis/include/QwADC18_Channel.h | 0 Analysis/include/QwColor.h | 0 Analysis/include/QwDatabase.h | 0 Analysis/include/QwEPICSEvent.h | 0 Analysis/include/QwEventBuffer.h | 0 Analysis/include/QwF1TDContainer.h | 0 Analysis/include/QwF1TDContainerLinkDef.h | 0 Analysis/include/QwFactory.h | 0 Analysis/include/QwHistogramHelper.h | 0 Analysis/include/QwInterpolator.h | 0 Analysis/include/QwLog.h | 0 Analysis/include/QwObjectCounter.h | 0 Analysis/include/QwOmnivore.h | 0 Analysis/include/QwOptions.h | 0 Analysis/include/QwPMT_Channel.h | 0 Analysis/include/QwParameterFile.h | 0 Analysis/include/QwPromptSummary.h | 0 Analysis/include/QwPromptSummaryLinkDef.h | 0 Analysis/include/QwRint.h | 0 Analysis/include/QwRootFile.h | 0 Analysis/include/QwRunCondition.h | 0 Analysis/include/QwSIS3320_Accumulator.h | 0 Analysis/include/QwSIS3320_LogicalAccumulator.h | 0 Analysis/include/QwSIS3320_Samples.h | 0 Analysis/include/QwSIS3320_SamplesLinkDef.h | 0 Analysis/include/QwScaler_Channel.h | 0 Analysis/include/QwSubsystemArray.h | 0 Analysis/include/QwTypes.h | 0 Analysis/include/QwUnits.h | 0 Analysis/include/QwVQWK_Channel.h | 0 Analysis/include/QwWord.h | 0 Analysis/include/VQwAnalyzer.h | 0 Analysis/include/VQwDataElement.h | 0 Analysis/include/VQwDataserver.h | 0 Analysis/include/VQwHardwareChannel.h | 0 Analysis/include/VQwSubsystem.h | 0 Analysis/include/VQwSystem.h | 0 Analysis/main/QwRoot.cc | 0 Analysis/src/MQwCodaControlEvent.cc | 0 Analysis/src/MQwF1TDC.cc | 0 Analysis/src/MQwMockable.cc | 0 Analysis/src/MQwV775TDC.cc | 0 Analysis/src/QwADC18_Channel.cc | 0 Analysis/src/QwColor.cc | 0 Analysis/src/QwDatabase.cc | 0 Analysis/src/QwEPICSEvent.cc | 0 Analysis/src/QwEventBuffer.cc | 0 Analysis/src/QwF1TDContainer.cc | 0 Analysis/src/QwHistogramHelper.cc | 0 Analysis/src/QwLog.cc | 0 Analysis/src/QwOmnivore.cc | 0 Analysis/src/QwOptions.cc | 0 Analysis/src/QwPMT_Channel.cc | 0 Analysis/src/QwParameterFile.cc | 0 Analysis/src/QwPromptSummary.cc | 0 Analysis/src/QwRint.cc | 0 Analysis/src/QwRootFile.cc | 0 Analysis/src/QwRunCondition.cc | 0 Analysis/src/QwSIS3320_Accumulator.cc | 0 Analysis/src/QwSIS3320_LogicalAccumulator.cc | 0 Analysis/src/QwSIS3320_Samples.cc | 0 Analysis/src/QwScaler_Channel.cc | 0 Analysis/src/QwSubsystemArray.cc | 0 Analysis/src/QwTypes.cc | 0 Analysis/src/QwVQWK_Channel.cc | 0 Analysis/src/VQwHardwareChannel.cc | 0 Analysis/src/VQwSubsystem.cc | 0 CMakeLists.txt | 0 Doxygen/images/QwTrackingTreeMatch-1.jpg | Bin Doxygen/images/QwTrackingTreeMatch-2.jpg | Bin Doxygen/images/QwTrackingTreeMatch-3.jpg | Bin Doxygen/images/QwTrackingTreeMatch-4.jpg | Bin Doxygen/images/QwTrackingTreeMatch-5.jpg | Bin INSTALL | 0 PackageInfo.dox | 0 Parity/include/QwBCM.h | 0 Parity/include/QwBPMCavity.h | 0 Parity/include/QwBPMStripline.h | 0 Parity/include/QwBeamDetectorID.h | 0 Parity/include/QwBeamLine.h | 0 Parity/include/QwBeamMod.h | 0 Parity/include/QwBlinder.h | 0 Parity/include/QwClock.h | 0 Parity/include/QwCombinedBCM.h | 0 Parity/include/QwCombinedBPM.h | 0 Parity/include/QwCombinedPMT.h | 0 Parity/include/QwCombinerSubsystem.h | 0 Parity/include/QwComptonElectronDetector.h | 0 Parity/include/QwEnergyCalculator.h | 0 Parity/include/QwEventRing.h | 0 Parity/include/QwFakeHelicity.h | 0 Parity/include/QwHaloMonitor.h | 0 Parity/include/QwHelicity.h | 0 Parity/include/QwHelicityPattern.h | 0 Parity/include/QwIntegratedRaster.h | 0 Parity/include/QwIntegratedRasterChannel.h | 0 Parity/include/QwIntegrationPMT.h | 0 Parity/include/QwLinearDiodeArray.h | 0 Parity/include/QwMollerDetector.h | 0 Parity/include/QwOptionsParity.h | 0 Parity/include/QwParityDB.h | 0 Parity/include/QwParitySSQLS.h | 0 Parity/include/QwQPD.h | 0 Parity/include/QwScaler.h | 0 Parity/include/QwSubsystemArrayParity.h | 0 Parity/include/VQwBCM.h | 0 Parity/include/VQwBPM.h | 0 Parity/include/VQwClock.h | 0 Parity/include/VQwSubsystemParity.h | 0 Parity/prminput/adc18.conf | 0 Parity/prminput/adc18_beamline.map | 0 Parity/prminput/adc18_detectors.map | 0 Parity/prminput/isu_channels.map | 0 Parity/prminput/isu_detectors.map | 0 Parity/prminput/isu_eventcuts.in | 0 Parity/prminput/isu_pedestals.map | 0 Parity/prminput/mock_beamline_geometry.map | 0 Parity/prminput/mock_data_parameters.map | 0 Parity/prminput/mock_detectors.map | 0 Parity/prminput/mock_moller_maindet_adc.map | 0 Parity/prminput/mock_moller_maindet_pedestal.map | 0 Parity/prminput/mock_qweak_adc.map | 0 Parity/prminput/mock_qweak_adc_short.map | 0 Parity/prminput/mock_qweak_beamline.map | 0 Parity/prminput/mock_qweak_helicity.map | 0 Parity/prminput/mock_qweak_pedestal.map | 0 Parity/prminput/parity_hist.in | 0 Parity/prminput/qwparity_simple.conf | 0 Parity/src/QwBCM.cc | 0 Parity/src/QwBPMCavity.cc | 0 Parity/src/QwBPMStripline.cc | 0 Parity/src/QwBeamDetectorID.cc | 0 Parity/src/QwBeamLine.cc | 0 Parity/src/QwBlinder.cc | 0 Parity/src/QwClock.cc | 0 Parity/src/QwCombinedBCM.cc | 0 Parity/src/QwCombinedBPM.cc | 0 Parity/src/QwCombinedPMT.cc | 0 Parity/src/QwComptonElectronDetector.cc | 0 Parity/src/QwDetectorArray.cc | 0 Parity/src/QwEnergyCalculator.cc | 0 Parity/src/QwEventRing.cc | 0 Parity/src/QwFakeHelicity.cc | 0 Parity/src/QwHaloMonitor.cc | 0 Parity/src/QwHelicityPattern.cc | 0 Parity/src/QwIntegrationPMT.cc | 0 Parity/src/QwLinearDiodeArray.cc | 0 Parity/src/QwMollerDetector.cc | 0 Parity/src/QwParityDB.cc | 0 Parity/src/QwQPD.cc | 0 Parity/src/QwScaler.cc | 0 Parity/src/QwSubsystemArrayParity.cc | 0 Parity/src/VQwBCM.cc | 0 Parity/src/VQwBPM.cc | 0 Parity/src/VQwClock.cc | 0 cmake/modules/CMakeMacroParseArguments.cmake | 0 cmake/modules/COPYING-CMAKE-SCRIPTS | 0 cmake/modules/FindMYSQLPP.cmake | 0 cmake/modules/FindSqlite3.cmake | 0 evio/Makefile | 0 evio/README | 0 evio/include/THaCodaData.h | 0 evio/include/THaCodaFile.h | 0 evio/include/THaEtClient.h | 0 evio/include/evio.h | 0 evio/snippet.dat | Bin evio/src/THaCodaData.C | 0 evio/src/THaCodaFile.C | 0 evio/src/THaEtClient.C | 0 evio/src/etHeartbeat_main.C | 0 evio/src/etclient_main.C | 0 evio/src/etclient_main_nonptr.C | 0 evio/src/etclient_main_ptr.C | 0 evio/src/evio.C | 0 evio/src/swap_util.C | 0 evio/src/tstcoda_main.C | 0 evio/src/tstcoda_main_brief.C | 0 evio/src/tstio_main.C | 0 panguin/CMakeLists.txt | 0 qweak-config.in | 0 185 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 Analysis/include/MQwCodaControlEvent.h mode change 100755 => 100644 Analysis/include/MQwF1TDC.h mode change 100755 => 100644 Analysis/include/MQwHistograms.h mode change 100755 => 100644 Analysis/include/MQwMockable.h mode change 100755 => 100644 Analysis/include/MQwV775TDC.h mode change 100755 => 100644 Analysis/include/QwADC18_Channel.h mode change 100755 => 100644 Analysis/include/QwColor.h mode change 100755 => 100644 Analysis/include/QwDatabase.h mode change 100755 => 100644 Analysis/include/QwEPICSEvent.h mode change 100755 => 100644 Analysis/include/QwEventBuffer.h mode change 100755 => 100644 Analysis/include/QwF1TDContainer.h mode change 100755 => 100644 Analysis/include/QwF1TDContainerLinkDef.h mode change 100755 => 100644 Analysis/include/QwFactory.h mode change 100755 => 100644 Analysis/include/QwHistogramHelper.h mode change 100755 => 100644 Analysis/include/QwInterpolator.h mode change 100755 => 100644 Analysis/include/QwLog.h mode change 100755 => 100644 Analysis/include/QwObjectCounter.h mode change 100755 => 100644 Analysis/include/QwOmnivore.h mode change 100755 => 100644 Analysis/include/QwOptions.h mode change 100755 => 100644 Analysis/include/QwPMT_Channel.h mode change 100755 => 100644 Analysis/include/QwParameterFile.h mode change 100755 => 100644 Analysis/include/QwPromptSummary.h mode change 100755 => 100644 Analysis/include/QwPromptSummaryLinkDef.h mode change 100755 => 100644 Analysis/include/QwRint.h mode change 100755 => 100644 Analysis/include/QwRootFile.h mode change 100755 => 100644 Analysis/include/QwRunCondition.h mode change 100755 => 100644 Analysis/include/QwSIS3320_Accumulator.h mode change 100755 => 100644 Analysis/include/QwSIS3320_LogicalAccumulator.h mode change 100755 => 100644 Analysis/include/QwSIS3320_Samples.h mode change 100755 => 100644 Analysis/include/QwSIS3320_SamplesLinkDef.h mode change 100755 => 100644 Analysis/include/QwScaler_Channel.h mode change 100755 => 100644 Analysis/include/QwSubsystemArray.h mode change 100755 => 100644 Analysis/include/QwTypes.h mode change 100755 => 100644 Analysis/include/QwUnits.h mode change 100755 => 100644 Analysis/include/QwVQWK_Channel.h mode change 100755 => 100644 Analysis/include/QwWord.h mode change 100755 => 100644 Analysis/include/VQwAnalyzer.h mode change 100755 => 100644 Analysis/include/VQwDataElement.h mode change 100755 => 100644 Analysis/include/VQwDataserver.h mode change 100755 => 100644 Analysis/include/VQwHardwareChannel.h mode change 100755 => 100644 Analysis/include/VQwSubsystem.h mode change 100755 => 100644 Analysis/include/VQwSystem.h mode change 100755 => 100644 Analysis/main/QwRoot.cc mode change 100755 => 100644 Analysis/src/MQwCodaControlEvent.cc mode change 100755 => 100644 Analysis/src/MQwF1TDC.cc mode change 100755 => 100644 Analysis/src/MQwMockable.cc mode change 100755 => 100644 Analysis/src/MQwV775TDC.cc mode change 100755 => 100644 Analysis/src/QwADC18_Channel.cc mode change 100755 => 100644 Analysis/src/QwColor.cc mode change 100755 => 100644 Analysis/src/QwDatabase.cc mode change 100755 => 100644 Analysis/src/QwEPICSEvent.cc mode change 100755 => 100644 Analysis/src/QwEventBuffer.cc mode change 100755 => 100644 Analysis/src/QwF1TDContainer.cc mode change 100755 => 100644 Analysis/src/QwHistogramHelper.cc mode change 100755 => 100644 Analysis/src/QwLog.cc mode change 100755 => 100644 Analysis/src/QwOmnivore.cc mode change 100755 => 100644 Analysis/src/QwOptions.cc mode change 100755 => 100644 Analysis/src/QwPMT_Channel.cc mode change 100755 => 100644 Analysis/src/QwParameterFile.cc mode change 100755 => 100644 Analysis/src/QwPromptSummary.cc mode change 100755 => 100644 Analysis/src/QwRint.cc mode change 100755 => 100644 Analysis/src/QwRootFile.cc mode change 100755 => 100644 Analysis/src/QwRunCondition.cc mode change 100755 => 100644 Analysis/src/QwSIS3320_Accumulator.cc mode change 100755 => 100644 Analysis/src/QwSIS3320_LogicalAccumulator.cc mode change 100755 => 100644 Analysis/src/QwSIS3320_Samples.cc mode change 100755 => 100644 Analysis/src/QwScaler_Channel.cc mode change 100755 => 100644 Analysis/src/QwSubsystemArray.cc mode change 100755 => 100644 Analysis/src/QwTypes.cc mode change 100755 => 100644 Analysis/src/QwVQWK_Channel.cc mode change 100755 => 100644 Analysis/src/VQwHardwareChannel.cc mode change 100755 => 100644 Analysis/src/VQwSubsystem.cc mode change 100755 => 100644 CMakeLists.txt mode change 100755 => 100644 Doxygen/images/QwTrackingTreeMatch-1.jpg mode change 100755 => 100644 Doxygen/images/QwTrackingTreeMatch-2.jpg mode change 100755 => 100644 Doxygen/images/QwTrackingTreeMatch-3.jpg mode change 100755 => 100644 Doxygen/images/QwTrackingTreeMatch-4.jpg mode change 100755 => 100644 Doxygen/images/QwTrackingTreeMatch-5.jpg mode change 100755 => 100644 INSTALL mode change 100755 => 100644 PackageInfo.dox mode change 100755 => 100644 Parity/include/QwBCM.h mode change 100755 => 100644 Parity/include/QwBPMCavity.h mode change 100755 => 100644 Parity/include/QwBPMStripline.h mode change 100755 => 100644 Parity/include/QwBeamDetectorID.h mode change 100755 => 100644 Parity/include/QwBeamLine.h mode change 100755 => 100644 Parity/include/QwBeamMod.h mode change 100755 => 100644 Parity/include/QwBlinder.h mode change 100755 => 100644 Parity/include/QwClock.h mode change 100755 => 100644 Parity/include/QwCombinedBCM.h mode change 100755 => 100644 Parity/include/QwCombinedBPM.h mode change 100755 => 100644 Parity/include/QwCombinedPMT.h mode change 100755 => 100644 Parity/include/QwCombinerSubsystem.h mode change 100755 => 100644 Parity/include/QwComptonElectronDetector.h mode change 100755 => 100644 Parity/include/QwEnergyCalculator.h mode change 100755 => 100644 Parity/include/QwEventRing.h mode change 100755 => 100644 Parity/include/QwFakeHelicity.h mode change 100755 => 100644 Parity/include/QwHaloMonitor.h mode change 100755 => 100644 Parity/include/QwHelicity.h mode change 100755 => 100644 Parity/include/QwHelicityPattern.h mode change 100755 => 100644 Parity/include/QwIntegratedRaster.h mode change 100755 => 100644 Parity/include/QwIntegratedRasterChannel.h mode change 100755 => 100644 Parity/include/QwIntegrationPMT.h mode change 100755 => 100644 Parity/include/QwLinearDiodeArray.h mode change 100755 => 100644 Parity/include/QwMollerDetector.h mode change 100755 => 100644 Parity/include/QwOptionsParity.h mode change 100755 => 100644 Parity/include/QwParityDB.h mode change 100755 => 100644 Parity/include/QwParitySSQLS.h mode change 100755 => 100644 Parity/include/QwQPD.h mode change 100755 => 100644 Parity/include/QwScaler.h mode change 100755 => 100644 Parity/include/QwSubsystemArrayParity.h mode change 100755 => 100644 Parity/include/VQwBCM.h mode change 100755 => 100644 Parity/include/VQwBPM.h mode change 100755 => 100644 Parity/include/VQwClock.h mode change 100755 => 100644 Parity/include/VQwSubsystemParity.h mode change 100755 => 100644 Parity/prminput/adc18.conf mode change 100755 => 100644 Parity/prminput/adc18_beamline.map mode change 100755 => 100644 Parity/prminput/adc18_detectors.map mode change 100755 => 100644 Parity/prminput/isu_channels.map mode change 100755 => 100644 Parity/prminput/isu_detectors.map mode change 100755 => 100644 Parity/prminput/isu_eventcuts.in mode change 100755 => 100644 Parity/prminput/isu_pedestals.map mode change 100755 => 100644 Parity/prminput/mock_beamline_geometry.map mode change 100755 => 100644 Parity/prminput/mock_data_parameters.map mode change 100755 => 100644 Parity/prminput/mock_detectors.map mode change 100755 => 100644 Parity/prminput/mock_moller_maindet_adc.map mode change 100755 => 100644 Parity/prminput/mock_moller_maindet_pedestal.map mode change 100755 => 100644 Parity/prminput/mock_qweak_adc.map mode change 100755 => 100644 Parity/prminput/mock_qweak_adc_short.map mode change 100755 => 100644 Parity/prminput/mock_qweak_beamline.map mode change 100755 => 100644 Parity/prminput/mock_qweak_helicity.map mode change 100755 => 100644 Parity/prminput/mock_qweak_pedestal.map mode change 100755 => 100644 Parity/prminput/parity_hist.in mode change 100755 => 100644 Parity/prminput/qwparity_simple.conf mode change 100755 => 100644 Parity/src/QwBCM.cc mode change 100755 => 100644 Parity/src/QwBPMCavity.cc mode change 100755 => 100644 Parity/src/QwBPMStripline.cc mode change 100755 => 100644 Parity/src/QwBeamDetectorID.cc mode change 100755 => 100644 Parity/src/QwBeamLine.cc mode change 100755 => 100644 Parity/src/QwBlinder.cc mode change 100755 => 100644 Parity/src/QwClock.cc mode change 100755 => 100644 Parity/src/QwCombinedBCM.cc mode change 100755 => 100644 Parity/src/QwCombinedBPM.cc mode change 100755 => 100644 Parity/src/QwCombinedPMT.cc mode change 100755 => 100644 Parity/src/QwComptonElectronDetector.cc mode change 100755 => 100644 Parity/src/QwDetectorArray.cc mode change 100755 => 100644 Parity/src/QwEnergyCalculator.cc mode change 100755 => 100644 Parity/src/QwEventRing.cc mode change 100755 => 100644 Parity/src/QwFakeHelicity.cc mode change 100755 => 100644 Parity/src/QwHaloMonitor.cc mode change 100755 => 100644 Parity/src/QwHelicityPattern.cc mode change 100755 => 100644 Parity/src/QwIntegrationPMT.cc mode change 100755 => 100644 Parity/src/QwLinearDiodeArray.cc mode change 100755 => 100644 Parity/src/QwMollerDetector.cc mode change 100755 => 100644 Parity/src/QwParityDB.cc mode change 100755 => 100644 Parity/src/QwQPD.cc mode change 100755 => 100644 Parity/src/QwScaler.cc mode change 100755 => 100644 Parity/src/QwSubsystemArrayParity.cc mode change 100755 => 100644 Parity/src/VQwBCM.cc mode change 100755 => 100644 Parity/src/VQwBPM.cc mode change 100755 => 100644 Parity/src/VQwClock.cc mode change 100755 => 100644 cmake/modules/CMakeMacroParseArguments.cmake mode change 100755 => 100644 cmake/modules/COPYING-CMAKE-SCRIPTS mode change 100755 => 100644 cmake/modules/FindMYSQLPP.cmake mode change 100755 => 100644 cmake/modules/FindSqlite3.cmake mode change 100755 => 100644 evio/Makefile mode change 100755 => 100644 evio/README mode change 100755 => 100644 evio/include/THaCodaData.h mode change 100755 => 100644 evio/include/THaCodaFile.h mode change 100755 => 100644 evio/include/THaEtClient.h mode change 100755 => 100644 evio/include/evio.h mode change 100755 => 100644 evio/snippet.dat mode change 100755 => 100644 evio/src/THaCodaData.C mode change 100755 => 100644 evio/src/THaCodaFile.C mode change 100755 => 100644 evio/src/THaEtClient.C mode change 100755 => 100644 evio/src/etHeartbeat_main.C mode change 100755 => 100644 evio/src/etclient_main.C mode change 100755 => 100644 evio/src/etclient_main_nonptr.C mode change 100755 => 100644 evio/src/etclient_main_ptr.C mode change 100755 => 100644 evio/src/evio.C mode change 100755 => 100644 evio/src/swap_util.C mode change 100755 => 100644 evio/src/tstcoda_main.C mode change 100755 => 100644 evio/src/tstcoda_main_brief.C mode change 100755 => 100644 evio/src/tstio_main.C mode change 100755 => 100644 panguin/CMakeLists.txt mode change 100755 => 100644 qweak-config.in diff --git a/Analysis/include/MQwCodaControlEvent.h b/Analysis/include/MQwCodaControlEvent.h old mode 100755 new mode 100644 diff --git a/Analysis/include/MQwF1TDC.h b/Analysis/include/MQwF1TDC.h old mode 100755 new mode 100644 diff --git a/Analysis/include/MQwHistograms.h b/Analysis/include/MQwHistograms.h old mode 100755 new mode 100644 diff --git a/Analysis/include/MQwMockable.h b/Analysis/include/MQwMockable.h old mode 100755 new mode 100644 diff --git a/Analysis/include/MQwV775TDC.h b/Analysis/include/MQwV775TDC.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwADC18_Channel.h b/Analysis/include/QwADC18_Channel.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwColor.h b/Analysis/include/QwColor.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwDatabase.h b/Analysis/include/QwDatabase.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwEPICSEvent.h b/Analysis/include/QwEPICSEvent.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwEventBuffer.h b/Analysis/include/QwEventBuffer.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwF1TDContainer.h b/Analysis/include/QwF1TDContainer.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwF1TDContainerLinkDef.h b/Analysis/include/QwF1TDContainerLinkDef.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwFactory.h b/Analysis/include/QwFactory.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwHistogramHelper.h b/Analysis/include/QwHistogramHelper.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwInterpolator.h b/Analysis/include/QwInterpolator.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwLog.h b/Analysis/include/QwLog.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwObjectCounter.h b/Analysis/include/QwObjectCounter.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwOmnivore.h b/Analysis/include/QwOmnivore.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwOptions.h b/Analysis/include/QwOptions.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwPMT_Channel.h b/Analysis/include/QwPMT_Channel.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwParameterFile.h b/Analysis/include/QwParameterFile.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwPromptSummary.h b/Analysis/include/QwPromptSummary.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwPromptSummaryLinkDef.h b/Analysis/include/QwPromptSummaryLinkDef.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwRint.h b/Analysis/include/QwRint.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwRootFile.h b/Analysis/include/QwRootFile.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwRunCondition.h b/Analysis/include/QwRunCondition.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwSIS3320_Accumulator.h b/Analysis/include/QwSIS3320_Accumulator.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwSIS3320_LogicalAccumulator.h b/Analysis/include/QwSIS3320_LogicalAccumulator.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwSIS3320_Samples.h b/Analysis/include/QwSIS3320_Samples.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwSIS3320_SamplesLinkDef.h b/Analysis/include/QwSIS3320_SamplesLinkDef.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwScaler_Channel.h b/Analysis/include/QwScaler_Channel.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwSubsystemArray.h b/Analysis/include/QwSubsystemArray.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwTypes.h b/Analysis/include/QwTypes.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwUnits.h b/Analysis/include/QwUnits.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwVQWK_Channel.h b/Analysis/include/QwVQWK_Channel.h old mode 100755 new mode 100644 diff --git a/Analysis/include/QwWord.h b/Analysis/include/QwWord.h old mode 100755 new mode 100644 diff --git a/Analysis/include/VQwAnalyzer.h b/Analysis/include/VQwAnalyzer.h old mode 100755 new mode 100644 diff --git a/Analysis/include/VQwDataElement.h b/Analysis/include/VQwDataElement.h old mode 100755 new mode 100644 diff --git a/Analysis/include/VQwDataserver.h b/Analysis/include/VQwDataserver.h old mode 100755 new mode 100644 diff --git a/Analysis/include/VQwHardwareChannel.h b/Analysis/include/VQwHardwareChannel.h old mode 100755 new mode 100644 diff --git a/Analysis/include/VQwSubsystem.h b/Analysis/include/VQwSubsystem.h old mode 100755 new mode 100644 diff --git a/Analysis/include/VQwSystem.h b/Analysis/include/VQwSystem.h old mode 100755 new mode 100644 diff --git a/Analysis/main/QwRoot.cc b/Analysis/main/QwRoot.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/MQwCodaControlEvent.cc b/Analysis/src/MQwCodaControlEvent.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/MQwF1TDC.cc b/Analysis/src/MQwF1TDC.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/MQwMockable.cc b/Analysis/src/MQwMockable.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/MQwV775TDC.cc b/Analysis/src/MQwV775TDC.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwADC18_Channel.cc b/Analysis/src/QwADC18_Channel.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwColor.cc b/Analysis/src/QwColor.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwDatabase.cc b/Analysis/src/QwDatabase.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwEPICSEvent.cc b/Analysis/src/QwEPICSEvent.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwEventBuffer.cc b/Analysis/src/QwEventBuffer.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwF1TDContainer.cc b/Analysis/src/QwF1TDContainer.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwHistogramHelper.cc b/Analysis/src/QwHistogramHelper.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwLog.cc b/Analysis/src/QwLog.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwOmnivore.cc b/Analysis/src/QwOmnivore.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwOptions.cc b/Analysis/src/QwOptions.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwPMT_Channel.cc b/Analysis/src/QwPMT_Channel.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwParameterFile.cc b/Analysis/src/QwParameterFile.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwPromptSummary.cc b/Analysis/src/QwPromptSummary.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwRint.cc b/Analysis/src/QwRint.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwRootFile.cc b/Analysis/src/QwRootFile.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwRunCondition.cc b/Analysis/src/QwRunCondition.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwSIS3320_Accumulator.cc b/Analysis/src/QwSIS3320_Accumulator.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwSIS3320_LogicalAccumulator.cc b/Analysis/src/QwSIS3320_LogicalAccumulator.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwSIS3320_Samples.cc b/Analysis/src/QwSIS3320_Samples.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwScaler_Channel.cc b/Analysis/src/QwScaler_Channel.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwSubsystemArray.cc b/Analysis/src/QwSubsystemArray.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwTypes.cc b/Analysis/src/QwTypes.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/QwVQWK_Channel.cc b/Analysis/src/QwVQWK_Channel.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/VQwHardwareChannel.cc b/Analysis/src/VQwHardwareChannel.cc old mode 100755 new mode 100644 diff --git a/Analysis/src/VQwSubsystem.cc b/Analysis/src/VQwSubsystem.cc old mode 100755 new mode 100644 diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/Doxygen/images/QwTrackingTreeMatch-1.jpg b/Doxygen/images/QwTrackingTreeMatch-1.jpg old mode 100755 new mode 100644 diff --git a/Doxygen/images/QwTrackingTreeMatch-2.jpg b/Doxygen/images/QwTrackingTreeMatch-2.jpg old mode 100755 new mode 100644 diff --git a/Doxygen/images/QwTrackingTreeMatch-3.jpg b/Doxygen/images/QwTrackingTreeMatch-3.jpg old mode 100755 new mode 100644 diff --git a/Doxygen/images/QwTrackingTreeMatch-4.jpg b/Doxygen/images/QwTrackingTreeMatch-4.jpg old mode 100755 new mode 100644 diff --git a/Doxygen/images/QwTrackingTreeMatch-5.jpg b/Doxygen/images/QwTrackingTreeMatch-5.jpg old mode 100755 new mode 100644 diff --git a/INSTALL b/INSTALL old mode 100755 new mode 100644 diff --git a/PackageInfo.dox b/PackageInfo.dox old mode 100755 new mode 100644 diff --git a/Parity/include/QwBCM.h b/Parity/include/QwBCM.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwBPMCavity.h b/Parity/include/QwBPMCavity.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwBPMStripline.h b/Parity/include/QwBPMStripline.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwBeamDetectorID.h b/Parity/include/QwBeamDetectorID.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwBeamLine.h b/Parity/include/QwBeamLine.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwBeamMod.h b/Parity/include/QwBeamMod.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwBlinder.h b/Parity/include/QwBlinder.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwClock.h b/Parity/include/QwClock.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwCombinedBCM.h b/Parity/include/QwCombinedBCM.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwCombinedBPM.h b/Parity/include/QwCombinedBPM.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwCombinedPMT.h b/Parity/include/QwCombinedPMT.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwCombinerSubsystem.h b/Parity/include/QwCombinerSubsystem.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwComptonElectronDetector.h b/Parity/include/QwComptonElectronDetector.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwEnergyCalculator.h b/Parity/include/QwEnergyCalculator.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwEventRing.h b/Parity/include/QwEventRing.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwFakeHelicity.h b/Parity/include/QwFakeHelicity.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwHaloMonitor.h b/Parity/include/QwHaloMonitor.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwHelicity.h b/Parity/include/QwHelicity.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwHelicityPattern.h b/Parity/include/QwHelicityPattern.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwIntegratedRaster.h b/Parity/include/QwIntegratedRaster.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwIntegratedRasterChannel.h b/Parity/include/QwIntegratedRasterChannel.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwIntegrationPMT.h b/Parity/include/QwIntegrationPMT.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwLinearDiodeArray.h b/Parity/include/QwLinearDiodeArray.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwMollerDetector.h b/Parity/include/QwMollerDetector.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwOptionsParity.h b/Parity/include/QwOptionsParity.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwParityDB.h b/Parity/include/QwParityDB.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwParitySSQLS.h b/Parity/include/QwParitySSQLS.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwQPD.h b/Parity/include/QwQPD.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwScaler.h b/Parity/include/QwScaler.h old mode 100755 new mode 100644 diff --git a/Parity/include/QwSubsystemArrayParity.h b/Parity/include/QwSubsystemArrayParity.h old mode 100755 new mode 100644 diff --git a/Parity/include/VQwBCM.h b/Parity/include/VQwBCM.h old mode 100755 new mode 100644 diff --git a/Parity/include/VQwBPM.h b/Parity/include/VQwBPM.h old mode 100755 new mode 100644 diff --git a/Parity/include/VQwClock.h b/Parity/include/VQwClock.h old mode 100755 new mode 100644 diff --git a/Parity/include/VQwSubsystemParity.h b/Parity/include/VQwSubsystemParity.h old mode 100755 new mode 100644 diff --git a/Parity/prminput/adc18.conf b/Parity/prminput/adc18.conf old mode 100755 new mode 100644 diff --git a/Parity/prminput/adc18_beamline.map b/Parity/prminput/adc18_beamline.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/adc18_detectors.map b/Parity/prminput/adc18_detectors.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/isu_channels.map b/Parity/prminput/isu_channels.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/isu_detectors.map b/Parity/prminput/isu_detectors.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/isu_eventcuts.in b/Parity/prminput/isu_eventcuts.in old mode 100755 new mode 100644 diff --git a/Parity/prminput/isu_pedestals.map b/Parity/prminput/isu_pedestals.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_beamline_geometry.map b/Parity/prminput/mock_beamline_geometry.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_data_parameters.map b/Parity/prminput/mock_data_parameters.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_detectors.map b/Parity/prminput/mock_detectors.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_moller_maindet_adc.map b/Parity/prminput/mock_moller_maindet_adc.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_moller_maindet_pedestal.map b/Parity/prminput/mock_moller_maindet_pedestal.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_qweak_adc.map b/Parity/prminput/mock_qweak_adc.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_qweak_adc_short.map b/Parity/prminput/mock_qweak_adc_short.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_qweak_beamline.map b/Parity/prminput/mock_qweak_beamline.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_qweak_helicity.map b/Parity/prminput/mock_qweak_helicity.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/mock_qweak_pedestal.map b/Parity/prminput/mock_qweak_pedestal.map old mode 100755 new mode 100644 diff --git a/Parity/prminput/parity_hist.in b/Parity/prminput/parity_hist.in old mode 100755 new mode 100644 diff --git a/Parity/prminput/qwparity_simple.conf b/Parity/prminput/qwparity_simple.conf old mode 100755 new mode 100644 diff --git a/Parity/src/QwBCM.cc b/Parity/src/QwBCM.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwBPMCavity.cc b/Parity/src/QwBPMCavity.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwBPMStripline.cc b/Parity/src/QwBPMStripline.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwBeamDetectorID.cc b/Parity/src/QwBeamDetectorID.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwBeamLine.cc b/Parity/src/QwBeamLine.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwBlinder.cc b/Parity/src/QwBlinder.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwClock.cc b/Parity/src/QwClock.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwCombinedBCM.cc b/Parity/src/QwCombinedBCM.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwCombinedBPM.cc b/Parity/src/QwCombinedBPM.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwCombinedPMT.cc b/Parity/src/QwCombinedPMT.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwComptonElectronDetector.cc b/Parity/src/QwComptonElectronDetector.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwDetectorArray.cc b/Parity/src/QwDetectorArray.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwEnergyCalculator.cc b/Parity/src/QwEnergyCalculator.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwEventRing.cc b/Parity/src/QwEventRing.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwFakeHelicity.cc b/Parity/src/QwFakeHelicity.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwHaloMonitor.cc b/Parity/src/QwHaloMonitor.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwHelicityPattern.cc b/Parity/src/QwHelicityPattern.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwIntegrationPMT.cc b/Parity/src/QwIntegrationPMT.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwLinearDiodeArray.cc b/Parity/src/QwLinearDiodeArray.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwMollerDetector.cc b/Parity/src/QwMollerDetector.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwParityDB.cc b/Parity/src/QwParityDB.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwQPD.cc b/Parity/src/QwQPD.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwScaler.cc b/Parity/src/QwScaler.cc old mode 100755 new mode 100644 diff --git a/Parity/src/QwSubsystemArrayParity.cc b/Parity/src/QwSubsystemArrayParity.cc old mode 100755 new mode 100644 diff --git a/Parity/src/VQwBCM.cc b/Parity/src/VQwBCM.cc old mode 100755 new mode 100644 diff --git a/Parity/src/VQwBPM.cc b/Parity/src/VQwBPM.cc old mode 100755 new mode 100644 diff --git a/Parity/src/VQwClock.cc b/Parity/src/VQwClock.cc old mode 100755 new mode 100644 diff --git a/cmake/modules/CMakeMacroParseArguments.cmake b/cmake/modules/CMakeMacroParseArguments.cmake old mode 100755 new mode 100644 diff --git a/cmake/modules/COPYING-CMAKE-SCRIPTS b/cmake/modules/COPYING-CMAKE-SCRIPTS old mode 100755 new mode 100644 diff --git a/cmake/modules/FindMYSQLPP.cmake b/cmake/modules/FindMYSQLPP.cmake old mode 100755 new mode 100644 diff --git a/cmake/modules/FindSqlite3.cmake b/cmake/modules/FindSqlite3.cmake old mode 100755 new mode 100644 diff --git a/evio/Makefile b/evio/Makefile old mode 100755 new mode 100644 diff --git a/evio/README b/evio/README old mode 100755 new mode 100644 diff --git a/evio/include/THaCodaData.h b/evio/include/THaCodaData.h old mode 100755 new mode 100644 diff --git a/evio/include/THaCodaFile.h b/evio/include/THaCodaFile.h old mode 100755 new mode 100644 diff --git a/evio/include/THaEtClient.h b/evio/include/THaEtClient.h old mode 100755 new mode 100644 diff --git a/evio/include/evio.h b/evio/include/evio.h old mode 100755 new mode 100644 diff --git a/evio/snippet.dat b/evio/snippet.dat old mode 100755 new mode 100644 diff --git a/evio/src/THaCodaData.C b/evio/src/THaCodaData.C old mode 100755 new mode 100644 diff --git a/evio/src/THaCodaFile.C b/evio/src/THaCodaFile.C old mode 100755 new mode 100644 diff --git a/evio/src/THaEtClient.C b/evio/src/THaEtClient.C old mode 100755 new mode 100644 diff --git a/evio/src/etHeartbeat_main.C b/evio/src/etHeartbeat_main.C old mode 100755 new mode 100644 diff --git a/evio/src/etclient_main.C b/evio/src/etclient_main.C old mode 100755 new mode 100644 diff --git a/evio/src/etclient_main_nonptr.C b/evio/src/etclient_main_nonptr.C old mode 100755 new mode 100644 diff --git a/evio/src/etclient_main_ptr.C b/evio/src/etclient_main_ptr.C old mode 100755 new mode 100644 diff --git a/evio/src/evio.C b/evio/src/evio.C old mode 100755 new mode 100644 diff --git a/evio/src/swap_util.C b/evio/src/swap_util.C old mode 100755 new mode 100644 diff --git a/evio/src/tstcoda_main.C b/evio/src/tstcoda_main.C old mode 100755 new mode 100644 diff --git a/evio/src/tstcoda_main_brief.C b/evio/src/tstcoda_main_brief.C old mode 100755 new mode 100644 diff --git a/evio/src/tstio_main.C b/evio/src/tstio_main.C old mode 100755 new mode 100644 diff --git a/panguin/CMakeLists.txt b/panguin/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/qweak-config.in b/qweak-config.in old mode 100755 new mode 100644 From 4b0f6bbf391483eab07bc905d0ee4d8d0847ff13 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Mon, 11 Feb 2019 13:33:03 -0500 Subject: [PATCH 009/102] Correct pedestals for SAMs --- Parity/prminput/prex_sam_pedestal.1221-.map | 16 ++++++++-------- Parity/prminput/prex_sam_pedestal.map | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Parity/prminput/prex_sam_pedestal.1221-.map b/Parity/prminput/prex_sam_pedestal.1221-.map index b92ab2454..a63bd6477 100644 --- a/Parity/prminput/prex_sam_pedestal.1221-.map +++ b/Parity/prminput/prex_sam_pedestal.1221-.map @@ -1,9 +1,9 @@ !! SAM Pedestal based on run 1221, ELOG 3608 -sam1 , -0.011181 , 76.293e-6 -sam2 , 0.995808 , 76.293e-6 -sam3 , 0.973865 , 76.293e-6 -sam4 , 0.956836 , 76.293e-6 -sam5 , 0.959412 , 76.293e-6 -sam6 , 0.997675 , 76.293e-6 -sam7 , 0.983060 , 76.293e-6 -sam8 , 0.970250 , 76.293e-6 +sam1 , -146.90 , 76.293e-6 +sam2 , 13052.83 , 76.293e-6 +sam3 , 12764.05 , 76.293e-6 +sam4 , 12540.92 , 76.293e-6 +sam5 , 12574.12 , 76.293e-6 +sam6 , 13078.08 , 76.293e-6 +sam7 , 12884.76 , 76.293e-6 +sam8 , 12717.26 , 76.293e-6 diff --git a/Parity/prminput/prex_sam_pedestal.map b/Parity/prminput/prex_sam_pedestal.map index b92ab2454..a63bd6477 100644 --- a/Parity/prminput/prex_sam_pedestal.map +++ b/Parity/prminput/prex_sam_pedestal.map @@ -1,9 +1,9 @@ !! SAM Pedestal based on run 1221, ELOG 3608 -sam1 , -0.011181 , 76.293e-6 -sam2 , 0.995808 , 76.293e-6 -sam3 , 0.973865 , 76.293e-6 -sam4 , 0.956836 , 76.293e-6 -sam5 , 0.959412 , 76.293e-6 -sam6 , 0.997675 , 76.293e-6 -sam7 , 0.983060 , 76.293e-6 -sam8 , 0.970250 , 76.293e-6 +sam1 , -146.90 , 76.293e-6 +sam2 , 13052.83 , 76.293e-6 +sam3 , 12764.05 , 76.293e-6 +sam4 , 12540.92 , 76.293e-6 +sam5 , 12574.12 , 76.293e-6 +sam6 , 13078.08 , 76.293e-6 +sam7 , 12884.76 , 76.293e-6 +sam8 , 12717.26 , 76.293e-6 From c0e5785e691447b2186c7525884aeea385708c34 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Mon, 11 Feb 2019 22:21:10 -0500 Subject: [PATCH 010/102] Added stripline BPM 4a and 4e wire pedestals from zero-gain run 1219. --- Parity/prminput/prexCH_beamline_pedestal.1199-.map | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Parity/prminput/prexCH_beamline_pedestal.1199-.map b/Parity/prminput/prexCH_beamline_pedestal.1199-.map index fc6db2108..ecb32153c 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.1199-.map +++ b/Parity/prminput/prexCH_beamline_pedestal.1199-.map @@ -10,3 +10,13 @@ bcm_an_us, -634.1 0.00306062 bcm_an_ds, -810.6 0.00300731 bcm_an_ds3, -662.6 0.00088747 bcm_an_ds10, -255.9, 0.00031405 + +! BPMs pedestal calibration from zero gain run 1219, HAPLOG 3606 + bpm4aXM, 3600.52, 1 + bpm4aXP, 3311.63, 1 + bpm4aYM, -534.502, 1 + bpm4aYP, -527.499, 1 + bpm4eXM, -1478.97, 1 + bpm4eXP, -1324.53, 1 + bpm4eYM, -1231.63, 1 + bpm4eYP, -1244.23, 1 From c2f482e79658c4aff7bdd7d080ff4632b9bd4758 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Tue, 12 Feb 2019 09:54:52 -0500 Subject: [PATCH 011/102] Added digital BCM outputs. --- Parity/prminput/prexCH_beamline.1230-.map | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Parity/prminput/prexCH_beamline.1230-.map diff --git a/Parity/prminput/prexCH_beamline.1230-.map b/Parity/prminput/prexCH_beamline.1230-.map new file mode 100644 index 000000000..53ebb989d --- /dev/null +++ b/Parity/prminput/prexCH_beamline.1230-.map @@ -0,0 +1,65 @@ + +ROC=23 +Bank=0x05 +vqwk_buffer_offset = 1 +!same sample size for ADCs in a given bank +sample_size=16564 +!Sample size should be unchanged - ask Paul King +! +! module.type, module.num chan.num, det.type, det.name, if unrotated then last column ->UNROTATED + + +!ADC0 + VQWK, 0, 0, bcm, QWK_0_0 + VQWK, 0, 1, bcm, QWK_0_1 + VQWK, 0, 2, bcm, BCM_AN_US + VQWK, 0, 3, bcm, BCM_AN_DS + VQWK, 0, 4, bcm, BCM_AN_DS3 + VQWK, 0, 5, bcm, BCM_AN_DS10 + VQWK, 0, 6, bcm, BCM_DG_US + VQWK, 0, 7, bcm, BCM_DG_DS + +!ADC1 + VQWK, 1, 0, bpmstripline, BPM4Exp + VQWK, 1, 1, bpmstripline, BPM4Exm + VQWK, 1, 2, bpmstripline, BPM4Eyp + VQWK, 1, 3, bpmstripline, BPM4Eym + VQWK, 1, 4, bpmstripline, BPM8xp + VQWK, 1, 5, bpmstripline, BPM8xm + VQWK, 1, 6, bpmstripline, BPM8yp + VQWK, 1, 7, bpmstripline, BPM8ym + +!ADC2 + VQWK, 2, 0, bpmstripline, BPM12xp + VQWK, 2, 1, bpmstripline, BPM12xm + VQWK, 2, 2, bpmstripline, BPM12yp + VQWK, 2, 3, bpmstripline, BPM12ym + VQWK, 2, 4, bpmstripline, BPM4Axp + VQWK, 2, 5, bpmstripline, BPM4Axm + VQWK, 2, 6, bpmstripline, BPM4Ayp + VQWK, 2, 7, bpmstripline, BPM4Aym + +!ADC3 + VQWK, 3, 0, bcm, CAV4BX + VQWK, 3, 1, bcm, CAV4BY + VQWK, 3, 2, bcm, CAV4BQ + VQWK, 3, 3, bcm, CAV4CX + VQWK, 3, 4, bcm, CAV4CY + VQWK, 3, 5, bcm, CAV4CQ + VQWK, 3, 6, bcm, QWK_3_6 + VQWK, 3, 7, bcm, UNSER + +!ADC4 + VQWK, 4, 0, bcm, CAV4DX + VQWK, 4, 1, bcm, CAV4DY + VQWK, 4, 2, bcm, CAV4DQ + VQWK, 4, 3, bcm, QWK_4_3 + VQWK, 4, 4, bpmstripline, BPM10xm + VQWK, 4, 5, bpmstripline, BPM10xp + VQWK, 4, 6, bpmstripline, BPM10yp + VQWK, 4, 7, bpmstripline, BPM10ym + + +[PUBLISH] +! new.tree.variable.name, analysis.class, old.tree.variable.name, element.to.store + q_targ, bcm, bcm_an_ds3, c From dd48d9a52936f8cd49ce686bebd0fa5d071795fa Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Tue, 12 Feb 2019 12:59:31 -0500 Subject: [PATCH 012/102] Added digital BCMs pedestals with rough calibration at 2 uA ~ 5 uA --- .../prexCH_beamline_pedestal.1230-.map | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Parity/prminput/prexCH_beamline_pedestal.1230-.map diff --git a/Parity/prminput/prexCH_beamline_pedestal.1230-.map b/Parity/prminput/prexCH_beamline_pedestal.1230-.map new file mode 100644 index 000000000..7843b5643 --- /dev/null +++ b/Parity/prminput/prexCH_beamline_pedestal.1230-.map @@ -0,0 +1,28 @@ +! adc sample size 16564 +!---- +!END + +! Unser calibration based on Run 1214 , HAPLOG 3609 +UNSER, -174.1, 2.066e-2 + +! Rough BCM calibration from 2uA and 5uA during run 1224. + bcm_an_us, -634.1, 0.00306062 + bcm_an_ds, -810.6, 0.00300731 + bcm_an_ds3, -662.6, 0.00088747 + bcm_an_ds10, -255.9, 0.00031405 + + +! Rough Digital BCM Calibration from 2uA to 5uA during run 1230 + bcm_dg_us, -203, 0.0034084 + bcm_dg_ds, -656, 0.0033521 + + +! BPMs pedestal calibration from zero gain run 1219, HAPLOG 3606 + bpm4aXM, 3600.52, 1 + bpm4aXP, 3311.63, 1 + bpm4aYM, -534.502, 1 + bpm4aYP, -527.499, 1 + bpm4eXM, -1478.97, 1 + bpm4eXP, -1324.53, 1 + bpm4eYM, -1231.63, 1 + bpm4eYP, -1244.23, 1 From 33ec28ae768613e6f7b192f55ea709f970e1f5bc Mon Sep 17 00:00:00 2001 From: Paul King Date: Tue, 12 Feb 2019 14:25:47 -0500 Subject: [PATCH 013/102] Defined kNullROCID and kBankID and used them as the initialization value. These replaces the initialization of ROCID_t and BankID_t objects with the value "-1", and replaces checks against "-1" to determine the validity of ROC ID and Bank ID values. This addresses the bug reported in issue #60. --- Analysis/include/QwTypes.h | 2 ++ Analysis/src/VQwSubsystem.cc | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Analysis/include/QwTypes.h b/Analysis/include/QwTypes.h index d57e4e608..22487bc3c 100644 --- a/Analysis/include/QwTypes.h +++ b/Analysis/include/QwTypes.h @@ -15,6 +15,8 @@ class TString; // Types for the ROC_ID and Bank_ID used in decoding and destributing data typedef UInt_t ROCID_t; typedef ULong64_t BankID_t; /// Bank ID will combine both bank and marker words +static const ROCID_t kNullROCID = kMaxUInt; +static const BankID_t kNullBankID = kMaxULong64; // Enumerator types for regions and directions diff --git a/Analysis/src/VQwSubsystem.cc b/Analysis/src/VQwSubsystem.cc index 8ef78dc17..3895e4d0b 100644 --- a/Analysis/src/VQwSubsystem.cc +++ b/Analysis/src/VQwSubsystem.cc @@ -230,8 +230,8 @@ void VQwSubsystem::ClearAllBankRegistrations() { fBank_IDs.clear(); fROC_IDs.clear(); - fCurrentROC_ID = -1; - fCurrentBank_ID = -1; + fCurrentROC_ID = kNullROCID; + fCurrentBank_ID = kNullBankID; } Int_t VQwSubsystem::GetSubbankIndex(const ROCID_t roc_id, const BankID_t bank_id) const @@ -293,8 +293,8 @@ Int_t VQwSubsystem::RegisterROCNumber(const ROCID_t roc_id, const BankID_t bank_ fCurrentROC_ID = roc_id; fCurrentBank_ID = bank_id; } else { - fCurrentROC_ID = -1; - fCurrentBank_ID = -1; + fCurrentROC_ID = kNullROCID; + fCurrentBank_ID = kNullBankID; } return stat; } @@ -302,7 +302,7 @@ Int_t VQwSubsystem::RegisterROCNumber(const ROCID_t roc_id, const BankID_t bank_ Int_t VQwSubsystem::RegisterSubbank(const BankID_t bank_id) { Int_t stat = 0; - if (fCurrentROC_ID != -1){ + if (fCurrentROC_ID != kNullROCID){ stat = RegisterROCNumber(fCurrentROC_ID, bank_id); fCurrentBank_ID = bank_id; } else { @@ -313,8 +313,8 @@ Int_t VQwSubsystem::RegisterSubbank(const BankID_t bank_id) << "Add a 'ROC=#' line to the map file." << std::dec << QwLog::endl; stat = ERROR; - fCurrentROC_ID = -1; - fCurrentBank_ID = -1; + fCurrentROC_ID = kNullROCID; + fCurrentBank_ID = kNullBankID; } return stat; } @@ -324,7 +324,7 @@ Int_t VQwSubsystem::RegisterMarkerWord(const UInt_t markerword) { static BankID_t bankIDmask = 0xffffffff; Int_t stat = 0; - if (fCurrentROC_ID != -1){ + if (fCurrentROC_ID != kNullROCID){ Int_t roc_index = FindIndex(fROC_IDs, fCurrentROC_ID); Int_t bank_index = FindIndex(fBank_IDs[roc_index],(fCurrentBank_ID&bankIDmask)); fMarkerWords.at(roc_index).at(bank_index).push_back(markerword); @@ -339,8 +339,8 @@ Int_t VQwSubsystem::RegisterMarkerWord(const UInt_t markerword) << "Add a 'ROC=#' line to the map file." << std::dec << QwLog::endl; stat = ERROR; - fCurrentROC_ID = -1; - fCurrentBank_ID = -1; + fCurrentROC_ID = kNullROCID; + fCurrentBank_ID = kNullBankID; } return stat; } From b832949d85b82386ee3898bcca42ea50d38b398f Mon Sep 17 00:00:00 2001 From: Paul King Date: Tue, 12 Feb 2019 15:10:09 -0500 Subject: [PATCH 014/102] Encloded bit shift operators in parenthases to clairify order of operation. This addresses issue #63, in which confusing operator precedence was pointed out. The primary fixes were in the routines realted to marker-word decoding in QwEventBuffer and VQwSubsystem. Likely the confusing precedence didn't matter in the test case, because in the marker-word usage so far, the bank ID was forced to zero. But it should be clearer now. Also changed the initalization order of one object in the QwEventBuffer constructor to eliminate a compilation warning message. --- Analysis/src/QwEventBuffer.cc | 6 +++--- Analysis/src/VQwSubsystem.cc | 2 +- Parity/src/QwHelicity.cc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Analysis/src/QwEventBuffer.cc b/Analysis/src/QwEventBuffer.cc index 82a506931..9cd11b202 100644 --- a/Analysis/src/QwEventBuffer.cc +++ b/Analysis/src/QwEventBuffer.cc @@ -40,11 +40,11 @@ const UInt_t QwEventBuffer::kNullDataWord = 0x4e554c4c; /// Default constructor QwEventBuffer::QwEventBuffer() - : fDataFileStem(fDefaultDataFileStem), + : fRunListFile(NULL), + fDataFileStem(fDefaultDataFileStem), fDataFileExtension(fDefaultDataFileExtension), fEvStreamMode(fEvStreamNull), fEvStream(NULL), - fRunListFile(NULL), fCurrentRun(-1), fRunIsSegmented(kFALSE), fPhysicsEventFlag(kFALSE), @@ -815,7 +815,7 @@ Bool_t QwEventBuffer::FillSubsystemData(QwSubsystemArray &subsystems) for (size_t i=0; i=1;i--) ranseed=ranseed << 1|(b[i]&1); + for(size_t i=24;i>=1;i--) ranseed = (ranseed << 1) | (b[i]&1); ranseed = ranseed&0xFFFFFF; //put a mask From 9edb18b1d656f8df44569503038b64e9a224aa39 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Tue, 12 Feb 2019 17:21:48 -0500 Subject: [PATCH 015/102] Added BPM 10 and BPM 12 pedestals from a zero-gain beam off run. --- Parity/prminput/prexCH_beamline_pedestal.1199-.map | 12 ++++++++++++ Parity/prminput/prexCH_beamline_pedestal.1230-.map | 12 +++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Parity/prminput/prexCH_beamline_pedestal.1199-.map b/Parity/prminput/prexCH_beamline_pedestal.1199-.map index ecb32153c..8c98d7d18 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.1199-.map +++ b/Parity/prminput/prexCH_beamline_pedestal.1199-.map @@ -16,7 +16,19 @@ bcm_an_ds10, -255.9, 0.00031405 bpm4aXP, 3311.63, 1 bpm4aYM, -534.502, 1 bpm4aYP, -527.499, 1 + bpm4eXM, -1478.97, 1 bpm4eXP, -1324.53, 1 bpm4eYM, -1231.63, 1 bpm4eYP, -1244.23, 1 + + bpm10XM, 245.591, 1 + bpm10XP, 973.781, 1 + bpm10YM, 1003.06, 1 + bpm10YP, 882.076, 1 + + bpm12XM, 7885.14, 1 + bpm12XP, 7723.38, 1 + bpm12YM, 9026.79, 1 + bpm12YP, 10005.1, 1 + diff --git a/Parity/prminput/prexCH_beamline_pedestal.1230-.map b/Parity/prminput/prexCH_beamline_pedestal.1230-.map index 7843b5643..56437b9d7 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.1230-.map +++ b/Parity/prminput/prexCH_beamline_pedestal.1230-.map @@ -16,13 +16,23 @@ UNSER, -174.1, 2.066e-2 bcm_dg_us, -203, 0.0034084 bcm_dg_ds, -656, 0.0033521 - ! BPMs pedestal calibration from zero gain run 1219, HAPLOG 3606 bpm4aXM, 3600.52, 1 bpm4aXP, 3311.63, 1 bpm4aYM, -534.502, 1 bpm4aYP, -527.499, 1 + bpm4eXM, -1478.97, 1 bpm4eXP, -1324.53, 1 bpm4eYM, -1231.63, 1 bpm4eYP, -1244.23, 1 + + bpm10XM, 245.591, 1 + bpm10XP, 973.781, 1 + bpm10YM, 1003.06, 1 + bpm10YP, 882.076, 1 + + bpm12XM, 7885.14, 1 + bpm12XP, 7723.38, 1 + bpm12YM, 9026.79, 1 + bpm12YP, 10005.1, 1 From 60988f48a5ffef98c83bb01957ee73887e7f0b30 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 13 Feb 2019 10:27:02 -0500 Subject: [PATCH 016/102] Use a map file allocation of 2 GiB while figuring out if mem leaks --- Analysis/src/QwRootFile.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Analysis/src/QwRootFile.cc b/Analysis/src/QwRootFile.cc index 10d984e89..f9df9c9ab 100755 --- a/Analysis/src/QwRootFile.cc +++ b/Analysis/src/QwRootFile.cc @@ -8,8 +8,8 @@ std::string QwRootFile::fDefaultRootFileStem = "Qweak_"; const Long64_t QwRootFile::kMaxTreeSize = 100000000000LL; -//const Int_t QwRootFile::kMaxMapFileSize = 0x20000000; // 512 MiB -const Int_t QwRootFile::kMaxMapFileSize = 0x10000000; // 256 MiB +const Int_t QwRootFile::kMaxMapFileSize = 0x7fffffff; // 2 GiB +//const Int_t QwRootFile::kMaxMapFileSize = 0x10000000; // 256 MiB /** * Constructor with relative filename From 726188b1d3f39e9de17dd733abe5590da88ab128 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 13 Feb 2019 10:29:58 -0500 Subject: [PATCH 017/102] Print current mapfile usage upon Update() (i.e. every 1k evs or so) --- Analysis/include/QwRootFile.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Analysis/include/QwRootFile.h b/Analysis/include/QwRootFile.h index e97ef91c6..ec9175c9f 100755 --- a/Analysis/include/QwRootFile.h +++ b/Analysis/include/QwRootFile.h @@ -409,7 +409,15 @@ class QwRootFile { // Wrapped functionality - void Update() { if (fMapFile) fMapFile->Update(); } // not for TFile + void Update() { + if (fMapFile) { + QwMessage << "TMapFile size: " + << ((int*)fMapFile->GetBreakval() - (int*)fMapFile->GetBaseAddr()) * + 4 / sizeof(int32_t) / 1024 / 1024 << " MiB" + << QwLog::endl; + fMapFile->Update(); + } // not for TFile + } void Print() { if (fMapFile) fMapFile->Print(); if (fRootFile) fRootFile->Print(); } void ls() { if (fMapFile) fMapFile->ls(); if (fRootFile) fRootFile->ls(); } void Map() { if (fRootFile) fRootFile->Map(); } From 07382a206088246d61966ca895c328cd516eeef0 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 13 Feb 2019 10:43:48 -0500 Subject: [PATCH 018/102] List map file contents (incl each size) upon Update() --- Analysis/include/QwRootFile.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Analysis/include/QwRootFile.h b/Analysis/include/QwRootFile.h index ec9175c9f..0b76a7b50 100755 --- a/Analysis/include/QwRootFile.h +++ b/Analysis/include/QwRootFile.h @@ -416,6 +416,7 @@ class QwRootFile { 4 / sizeof(int32_t) / 1024 / 1024 << " MiB" << QwLog::endl; fMapFile->Update(); + fMapFile->ls(); } // not for TFile } void Print() { if (fMapFile) fMapFile->Print(); if (fRootFile) fRootFile->Print(); } From 9d43fd4f6f88c5e11c9f5a9c690e22942bdd4f1e Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 13 Feb 2019 12:31:45 -0500 Subject: [PATCH 019/102] TMapFile example producer and consumer. Qweak map file consumer. Also, docs added. --- rootScripts/mapfile/README.md | 29 +++++++++++++ rootScripts/mapfile/hcons.C | 76 +++++++++++++++++++++++++++++++++++ rootScripts/mapfile/hprod.C | 66 ++++++++++++++++++++++++++++++ rootScripts/mapfile/qwcons.C | 62 ++++++++++++++++++++++++++++ 4 files changed, 233 insertions(+) create mode 100644 rootScripts/mapfile/README.md create mode 100644 rootScripts/mapfile/hcons.C create mode 100644 rootScripts/mapfile/hprod.C create mode 100644 rootScripts/mapfile/qwcons.C diff --git a/rootScripts/mapfile/README.md b/rootScripts/mapfile/README.md new file mode 100644 index 000000000..f6c1704ec --- /dev/null +++ b/rootScripts/mapfile/README.md @@ -0,0 +1,29 @@ +## Compilation +Compile with the `--new` library first (even though it doesn't seem to make +a difference due to lazy linking). +``` +for i in hprod hcons qwcons ; do + g++ $i.C -o $i `root-config --cflags --ldflags --new --libs` +done +``` + +## Mapfile producer and consumer tests + +### Running +Preload libNew and produce data in the background with +``` +LD_PRELOAD=$(root-config --libdir)/libNew.so ./hprod & +``` +while consuming data with +``` +LD_PRELOAD=$(root-config --libdir)/libNew.so ./hcons +``` + +## Qweak mapfile consumer tests + +### Running +Preload libNew and consume data with +``` +LD_PRELOAD=$(root-config --libdir)/libNew.so ./qwcons +``` + diff --git a/rootScripts/mapfile/hcons.C b/rootScripts/mapfile/hcons.C new file mode 100644 index 000000000..d0caf77e8 --- /dev/null +++ b/rootScripts/mapfile/hcons.C @@ -0,0 +1,76 @@ +/// \file +/// \ingroup tutorial_net +/// Histogram consumer script. Create a canvas and 3 pads. Connect +/// to memory mapped file "hsimple.map", that was created by hprod.C. +/// It reads the histograms from shared memory and displays them +/// in the pads (sleeping for 0.1 seconds before starting a new read-out +/// cycle). This script runs in an infinite loop, so use ctrl-c to stop it. +/// +/// \macro_code +/// +/// \author Fons Rademakers + +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char** argv) +{ + gROOT->Reset(); + + // Create a new canvas and 3 pads + TCanvas *c1; + TPad *pad1, *pad2, *pad3; + if (!gROOT->IsBatch()) { + c1 = new TCanvas("c1","Shared Memory Consumer Example",200,10,700,780); + pad1 = new TPad("pad1","This is pad1",0.02,0.52,0.98,0.98,21); + pad2 = new TPad("pad2","This is pad2",0.02,0.02,0.48,0.48,21); + pad3 = new TPad("pad3","This is pad3",0.52,0.02,0.98,0.48,21); + pad1->Draw(); + pad2->Draw(); + pad3->Draw(); + } + + // Open the memory mapped file "hsimple.map" in "READ" (default) mode. + TMapFile* mfile = TMapFile::Create("hsimple.map"); + + // Print status of mapped file and list its contents + mfile->Print(); + mfile->ls(); + + // Create pointers to the objects in shared memory. + TH1F *hpx = 0; + TH2F *hpxpy = 0; + TProfile *hprof = 0; + + // Loop displaying the histograms. Once the producer stops this + // script will break out of the loop. + Double_t oldentries = 0; + while (1) { + hpx = (TH1F *) mfile->Get("hpx", hpx); + hpxpy = (TH2F *) mfile->Get("hpxpy", hpxpy); + hprof = (TProfile *) mfile->Get("hprof", hprof); + if (hpx->GetEntries() == oldentries) break; + oldentries = hpx->GetEntries(); + if (!gROOT->IsBatch()) { + pad1->cd(); + hpx->Draw(); + pad2->cd(); + hprof->Draw(); + pad3->cd(); + hpxpy->Draw("cont"); + c1->Modified(); + c1->Update(); + } else { + printf("Entries, hpx=%g, Mean=%g, RMS=%g\n",hpx->GetEntries(),hpx->GetMean(),hpx->GetRMS()); + } + gSystem->Sleep(100); // sleep for 0.1 seconds + if (gSystem->ProcessEvents()) + break; + } +} diff --git a/rootScripts/mapfile/hprod.C b/rootScripts/mapfile/hprod.C new file mode 100644 index 000000000..84cd0d99d --- /dev/null +++ b/rootScripts/mapfile/hprod.C @@ -0,0 +1,66 @@ +/// \file +/// \ingroup tutorial_net +/// Histogram producer script. This script creates a memory mapped +/// file and stores three histogram objects in it (a TH1F, a TH2F and a +/// TProfile). It then fills, in an infinite loop (so use ctrl-c to +/// stop this script), the three histogram objects with random numbers. +/// Every 10 fills the objects are updated in shared memory. +/// Use the hcons.C script to map this file and display the histograms. +/// +/// \macro_code +/// +/// \author Fons Rademakers + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char** argv) +{ + gROOT->Reset(); + + // Create a new memory mapped file. The memory mapped file can be + // opened in an other process on the same machine and the objects + // stored in it can be accessed. + TStorage::PrintStatistics(); + + TMapFile::SetMapAddress(0xb46a5000); + TMapFile* mfile = TMapFile::Create("hsimple.map","RECREATE", 1000000, + "Demo memory mapped file with histograms"); + + // Create a 1d, a 2d and a profile histogram. These objects will + // be automatically added to the current directory, i.e. mfile. + TH1F* hpx = new TH1F("hpx","This is the px distribution",100,-4,4); + TH2F* hpxpy = new TH2F("hpxpy","py vs px",40,-4,4,40,-4,4); + TProfile* hprof = new TProfile("hprof","Profile of pz versus px",100,-4,4,0,20); + + // Set a fill color for the TH1F + hpx->SetFillColor(48); + + // Print status of mapped file + mfile->Print(); + + // Endless loop filling histograms with random numbers + Float_t px, py, pz; + int ii = 0; + while (1) { + gRandom->Rannor(px,py); + pz = px*px + py*py; + hpx->Fill(px); + hpxpy->Fill(px,py); + hprof->Fill(px,pz); + if (!(ii % 10)) { + mfile->Update(); // updates all objects in shared memory + if (!ii) mfile->ls(); // print contents of mapped file after + } // first update + ii++; + } +} diff --git a/rootScripts/mapfile/qwcons.C b/rootScripts/mapfile/qwcons.C new file mode 100644 index 000000000..ee10859c3 --- /dev/null +++ b/rootScripts/mapfile/qwcons.C @@ -0,0 +1,62 @@ +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char** argv) +{ + gROOT->Reset(); + + // Create a new canvas and 3 pads + TCanvas *c1; + TPad *pad1, *pad2; + if (!gROOT->IsBatch()) { + c1 = new TCanvas("c1","Shared Memory Consumer Example",200,10,700,780); + pad1 = new TPad("pad1","This is pad1",0.02,0.52,0.98,0.98,21); + pad2 = new TPad("pad2","This is pad2",0.02,0.02,0.48,0.48,21); + pad1->Draw(); + pad2->Draw(); + } + + // Open the memory mapped file "hsimple.map" in "READ" (default) mode. + TMapFile* mfile = 0; + while (mfile == 0) { + mfile = TMapFile::Create("/dev/shm//QwMemMapFile.map"); + if (mfile->IsZombie()) { + delete mfile; + mfile = 0; + } + gSystem->Sleep(1000); // sleep for 1 seconds + } + + // Print status of mapped file and list its contents + mfile->Print(); + mfile->ls(); + + // Create pointers to the objects in shared memory. + TTree *mps = 0; + TTree *hel = 0; + + // Loop displaying the histograms. Once the producer stops this + // script will break out of the loop. + while (1) { + mps = (TTree *) mfile->Get("Mps_Tree", mps); + hel = (TTree *) mfile->Get("Hel_Tree", hel); + if (!gROOT->IsBatch()) { + pad1->cd(); + mps->Draw("CodaEventNumber"); + pad2->cd(); + hel->Draw("CodaEventNumber"); + c1->Modified(); + c1->Update(); + } else { + printf("Entries, mps=%lld, hel=%lld\n",mps->GetEntries(),hel->GetEntries()); + } + gSystem->Sleep(1000); // sleep for 1 seconds + if (gSystem->ProcessEvents()) + break; + } +} From f2f8be7f630ba74475e993cfd212738954a542f2 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 13 Feb 2019 14:50:22 -0500 Subject: [PATCH 020/102] Ignore binaries, pcm, map files --- rootScripts/mapfile/.gitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 rootScripts/mapfile/.gitignore diff --git a/rootScripts/mapfile/.gitignore b/rootScripts/mapfile/.gitignore new file mode 100644 index 000000000..77fb1aa9b --- /dev/null +++ b/rootScripts/mapfile/.gitignore @@ -0,0 +1,5 @@ +*.pcm +*.map +hcons +hprod +qwcons From 9ad68180f43c9a2acc42a0807451ece83438c3de Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 13 Feb 2019 15:00:02 -0500 Subject: [PATCH 021/102] New conf file for mapfile running --- Parity/prminput/qwparity_mapfile.conf | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 Parity/prminput/qwparity_mapfile.conf diff --git a/Parity/prminput/qwparity_mapfile.conf b/Parity/prminput/qwparity_mapfile.conf new file mode 100755 index 000000000..e293fde88 --- /dev/null +++ b/Parity/prminput/qwparity_mapfile.conf @@ -0,0 +1,37 @@ +# +# Configuration file for the ISU tests. +# + +detectors = mock_detectors.map + +enable-mapfile = true +mapfile-update-interval = 1000 +circular-buffer = 10000 + +rootfile-stem = QwMock_ +codafile-stem = QwMock_ +codafile-ext = log + +chainfiles = no +single-output-file = TRUE +disable-slow-tree = yes +disable-burst-tree = yes +enable-burstsum = no +enable-differences = no +enable-alternateasym = no + +ring.size = 1 +ring.stability_cut = 0 + +QwBlindDetectorArray.normalize = no +QwDetectorArray.normalize = yes + +write-promptsummary = no +blinder.force-target-out = true + +[QwLog] +color = no +loglevel-file = 0 +#loglevel-screen = 0 +print-function = no +print-signature = no From 1ccb6c06439ff54ed54fd24892d336d4e4482eb8 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 13 Feb 2019 15:03:24 -0500 Subject: [PATCH 022/102] Open TMapFile as UPDATE, not RECREATE. Don't ls() on Update(). Also doc on circular-buffer and improve message on memory usage. --- Analysis/include/QwRootFile.h | 3 +-- Analysis/src/QwRootFile.cc | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Analysis/include/QwRootFile.h b/Analysis/include/QwRootFile.h index 0b76a7b50..28efdac73 100755 --- a/Analysis/include/QwRootFile.h +++ b/Analysis/include/QwRootFile.h @@ -411,12 +411,11 @@ class QwRootFile { // Wrapped functionality void Update() { if (fMapFile) { - QwMessage << "TMapFile size: " + QwMessage << "TMapFile memory resident size: " << ((int*)fMapFile->GetBreakval() - (int*)fMapFile->GetBaseAddr()) * 4 / sizeof(int32_t) / 1024 / 1024 << " MiB" << QwLog::endl; fMapFile->Update(); - fMapFile->ls(); } // not for TFile } void Print() { if (fMapFile) fMapFile->Print(); if (fRootFile) fRootFile->Print(); } diff --git a/Analysis/src/QwRootFile.cc b/Analysis/src/QwRootFile.cc index f9df9c9ab..0fe422f0a 100755 --- a/Analysis/src/QwRootFile.cc +++ b/Analysis/src/QwRootFile.cc @@ -36,7 +36,7 @@ QwRootFile::QwRootFile(const TString& run_label) mapfilename += "/QwMemMapFile.map"; - fMapFile = TMapFile::Create(mapfilename,"RECREATE", kMaxMapFileSize, "RealTime Producer File"); + fMapFile = TMapFile::Create(mapfilename,"UPDATE", kMaxMapFileSize, "RealTime Producer File"); if (not fMapFile) { QwError << "Memory-mapped file " << mapfilename @@ -178,7 +178,7 @@ void QwRootFile::DefineOptions(QwOptions &options) // Define the memory map option options.AddOptions() ("enable-mapfile", po::value()->default_bool_value(false), - "enable output to memory-mapped file"); + "enable output to memory-mapped file\n(likely requires circular-buffer too)"); // Define the histogram and tree options options.AddOptions("ROOT output options") From f0acc722ec8735ff10cf812f66602fc0d647c573 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 13 Feb 2019 15:11:27 -0500 Subject: [PATCH 023/102] Request only 1 GiB (for 10k events on mock data stream) --- Analysis/src/QwRootFile.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Analysis/src/QwRootFile.cc b/Analysis/src/QwRootFile.cc index 0fe422f0a..5d76bfadb 100755 --- a/Analysis/src/QwRootFile.cc +++ b/Analysis/src/QwRootFile.cc @@ -8,8 +8,7 @@ std::string QwRootFile::fDefaultRootFileStem = "Qweak_"; const Long64_t QwRootFile::kMaxTreeSize = 100000000000LL; -const Int_t QwRootFile::kMaxMapFileSize = 0x7fffffff; // 2 GiB -//const Int_t QwRootFile::kMaxMapFileSize = 0x10000000; // 256 MiB +const Int_t QwRootFile::kMaxMapFileSize = 0x3fffffff; // 1 GiB /** * Constructor with relative filename From 5eadcf4c7ff928332beb6db087bdd7f630468302 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Wed, 13 Feb 2019 15:12:11 -0500 Subject: [PATCH 024/102] Removed extraneous help in runlist command. Doc string only change. --- Analysis/src/QwEventBuffer.cc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Analysis/src/QwEventBuffer.cc b/Analysis/src/QwEventBuffer.cc index 82a506931..4be669819 100644 --- a/Analysis/src/QwEventBuffer.cc +++ b/Analysis/src/QwEventBuffer.cc @@ -90,7 +90,7 @@ void QwEventBuffer::DefineOptions(QwOptions &options) "run range in format #[:#]"); options.AddDefaultOptions() ("runlist", po::value()->default_value(""), - "run list file example \n[5253]\n 234\n 246\n 256\n 345:456\n 567:789\n [5259]\n [5260]\n 0:10000\n [5261:5270]\n 9000:10000\n- for run 5253 it will analyze three individual events, and two event ranges \n- for run 5259 it will analyze the entire run (all segments) \n- for run 5260 it will analyze the first 10000 events \n- for runs 5261 through 5270 it will analyze the events 9000 through 10000)"); + "run list file name"); options.AddDefaultOptions() ("event,e", po::value()->default_value("0:"), "event range in format #[:#]"); @@ -177,6 +177,23 @@ void QwEventBuffer::ProcessOptions(QwOptions &options) fAllowLowSubbankIDs = options.GetValue("allow-low-subbank-ids"); // Open run list file + /* runlist file format example: + [5253] + 234 + 246 + 256 + 345:456 + 567:789 + [5259] + [5260] + 0:10000 + [5261:5270] + 9000:10000 + - for run 5253 it will analyze three individual events, and two event ranges + - for run 5259 it will analyze the entire run (all segments) + - for run 5260 it will analyze the first 10000 events + - for runs 5261 through 5270 it will analyze the events 9000 through 10000) + */ if (fRunListFileName.size() > 0) { fRunListFile = new QwParameterFile(fRunListFileName); fEventListFile = 0; From 1df44b5b4a6be598f9caa870d24277ea922fdbe3 Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 13 Feb 2019 21:27:30 -0500 Subject: [PATCH 025/102] Disabled the compliation of the Feedback executable in the develop branch. I have commented out the compilation of the Feedback executable in the CMakeLists file. It would have been more clever to use an run-time flag for cmake, but this will do for now. Also, I have unset the executable bit for the remaining scripts in the JAPAN Feedback directory. --- CMakeLists.txt | 2 +- Feedback/FlipPCValues | 0 Feedback/GetGoodPC | 0 Feedback/SetLargeNegative_A_q | 0 Feedback/SetLargePositive_A_q | 0 Feedback/SetNominalPC | 0 6 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 Feedback/FlipPCValues mode change 100755 => 100644 Feedback/GetGoodPC mode change 100755 => 100644 Feedback/SetLargeNegative_A_q mode change 100755 => 100644 Feedback/SetLargePositive_A_q mode change 100755 => 100644 Feedback/SetNominalPC diff --git a/CMakeLists.txt b/CMakeLists.txt index 52a957967..8d5285d3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,7 +216,7 @@ endforeach() #---------------------------------------------------------------------------- # Build feedback library and executable -add_subdirectory(Feedback) +### add_subdirectory(Feedback) #---------------------------------------------------------------------------- # uninstall diff --git a/Feedback/FlipPCValues b/Feedback/FlipPCValues old mode 100755 new mode 100644 diff --git a/Feedback/GetGoodPC b/Feedback/GetGoodPC old mode 100755 new mode 100644 diff --git a/Feedback/SetLargeNegative_A_q b/Feedback/SetLargeNegative_A_q old mode 100755 new mode 100644 diff --git a/Feedback/SetLargePositive_A_q b/Feedback/SetLargePositive_A_q old mode 100755 new mode 100644 diff --git a/Feedback/SetNominalPC b/Feedback/SetNominalPC old mode 100755 new mode 100644 From 814d38675c31b0ca77d2384b49eccb509b1a6d5c Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 13 Feb 2019 21:37:29 -0500 Subject: [PATCH 026/102] Fix to "online" mode so it doesn't wait forever to see the first EPICS event. If we are in "online" mode, the engine will skip the initial attempt to find an EPICS event, and just begin the main event processing loop right away. This was a problem for us, because the PREX data stream has no EPICS events yet, so we'd never actually decode any events from the ET system. --- Analysis/include/QwEventBuffer.h | 2 ++ Parity/main/QwParity.cc | 28 +++++++++++++++------------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Analysis/include/QwEventBuffer.h b/Analysis/include/QwEventBuffer.h index 9f8573dd5..b813c8d75 100644 --- a/Analysis/include/QwEventBuffer.h +++ b/Analysis/include/QwEventBuffer.h @@ -126,6 +126,8 @@ class QwEventBuffer: public MQwCodaControlEvent{ Int_t GetEvent(); Int_t WriteEvent(int* buffer); + Bool_t IsOnline(){return fOnline;}; + Bool_t IsROCConfigurationEvent(){ return (fEvtType>=0x90 && fEvtType<=0xaf); }; diff --git a/Parity/main/QwParity.cc b/Parity/main/QwParity.cc index 2988a5c48..b2b8db699 100644 --- a/Parity/main/QwParity.cc +++ b/Parity/main/QwParity.cc @@ -213,22 +213,24 @@ Int_t main(Int_t argc, Char_t* argv[]) #endif // __USE_DATABASE__ // Find the first EPICS event and try to initialize - // the blinder. - QwMessage << "Finding first EPICS event" << QwLog::endl; - while (eventbuffer.GetNextEvent() == CODA_OK) { - if (eventbuffer.IsEPICSEvent()) { - eventbuffer.FillEPICSData(epicsevent); - if (epicsevent.HasDataLoaded()) { - helicitypattern.UpdateBlinder(epicsevent); - // and break out of this event loop - break; + // the blinder, but only for disk files, not online. + if (! eventbuffer.IsOnline() ){ + QwMessage << "Finding first EPICS event" << QwLog::endl; + while (eventbuffer.GetNextEvent() == CODA_OK) { + if (eventbuffer.IsEPICSEvent()) { + eventbuffer.FillEPICSData(epicsevent); + if (epicsevent.HasDataLoaded()) { + helicitypattern.UpdateBlinder(epicsevent); + // and break out of this event loop + break; + } } } + epicsevent.ResetCounters(); + // Rewind stream + QwMessage << "Rewinding stream" << QwLog::endl; + eventbuffer.ReOpenStream(); } - epicsevent.ResetCounters(); - // Rewind stream - QwMessage << "Rewinding stream" << QwLog::endl; - eventbuffer.ReOpenStream(); /// Start loop over events while (eventbuffer.GetNextEvent() == CODA_OK) { From b3b73a88b5d1569452812d269aaf7336587611b5 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Thu, 14 Feb 2019 14:44:05 -0500 Subject: [PATCH 027/102] Ye Tian added cavity BPMs pedestal from a beam off run --- .../prexCH_beamline_pedestal.1199-.map | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Parity/prminput/prexCH_beamline_pedestal.1199-.map b/Parity/prminput/prexCH_beamline_pedestal.1199-.map index 8c98d7d18..0165b1730 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.1199-.map +++ b/Parity/prminput/prexCH_beamline_pedestal.1199-.map @@ -22,13 +22,18 @@ bcm_an_ds10, -255.9, 0.00031405 bpm4eYM, -1231.63, 1 bpm4eYP, -1244.23, 1 - bpm10XM, 245.591, 1 - bpm10XP, 973.781, 1 - bpm10YM, 1003.06, 1 - bpm10YP, 882.076, 1 - - bpm12XM, 7885.14, 1 - bpm12XP, 7723.38, 1 - bpm12YM, 9026.79, 1 - bpm12YP, 10005.1, 1 +! cavity BPMs pedestal calibration from zero gain run 1219 + cav4bq, -167.527, 1 + cav4bx, -379.812, 1 + cav4by, -550.257, 1 + + cav4cq, -403.997, 1 + cav4cx, -634.063, 1 + cav4cy, -357.001, 1 + + cav4dq, -216.942, 1 + cav4dx, -242.757, 1 + cav4dy, -203.538, 1 + + From 039a3919b5ed1422e2b2a426a466d3c35f86a66d Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Thu, 14 Feb 2019 14:53:30 -0500 Subject: [PATCH 028/102] Updated BPMs pedestal from new run 1245 after replacing new ADC. Ye Tian added cavity BPMs pedestal. --- .../prexCH_beamline_pedestal.1199-.map | 30 +++++++---- .../prexCH_beamline_pedestal.1230-.map | 54 ++++++++++++------- 2 files changed, 54 insertions(+), 30 deletions(-) diff --git a/Parity/prminput/prexCH_beamline_pedestal.1199-.map b/Parity/prminput/prexCH_beamline_pedestal.1199-.map index 0165b1730..ece05c295 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.1199-.map +++ b/Parity/prminput/prexCH_beamline_pedestal.1199-.map @@ -11,16 +11,26 @@ bcm_an_ds, -810.6 0.00300731 bcm_an_ds3, -662.6 0.00088747 bcm_an_ds10, -255.9, 0.00031405 -! BPMs pedestal calibration from zero gain run 1219, HAPLOG 3606 - bpm4aXM, 3600.52, 1 - bpm4aXP, 3311.63, 1 - bpm4aYM, -534.502, 1 - bpm4aYP, -527.499, 1 - - bpm4eXM, -1478.97, 1 - bpm4eXP, -1324.53, 1 - bpm4eYM, -1231.63, 1 - bpm4eYP, -1244.23, 1 +! BPM pedestal from run 1245 + bpm4aXM, 3597, 1 + bpm4aXP, 3316, 1 + bpm4aYM, -537.1, 1 + bpm4aYP, -531.5, 1 + + bpm4eXM, -1584, 1 + bpm4eXP, -1512, 1 + bpm4eYM, -1293, 1 + bpm4eYP, -1168, 1 + + bpm10XM, -3190, 1 + bpm10XP, -2872, 1 + bpm10YM, -2744, 1 + bpm10YP, -2850, 1 + + bpm12XM, -3976, 1 + bpm12XP, -4184, 1 + bpm12YM, -3868, 1 + bpm12YP, -3587, 1 ! cavity BPMs pedestal calibration from zero gain run 1219 cav4bq, -167.527, 1 diff --git a/Parity/prminput/prexCH_beamline_pedestal.1230-.map b/Parity/prminput/prexCH_beamline_pedestal.1230-.map index 56437b9d7..e510c4356 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.1230-.map +++ b/Parity/prminput/prexCH_beamline_pedestal.1230-.map @@ -16,23 +16,37 @@ UNSER, -174.1, 2.066e-2 bcm_dg_us, -203, 0.0034084 bcm_dg_ds, -656, 0.0033521 -! BPMs pedestal calibration from zero gain run 1219, HAPLOG 3606 - bpm4aXM, 3600.52, 1 - bpm4aXP, 3311.63, 1 - bpm4aYM, -534.502, 1 - bpm4aYP, -527.499, 1 - - bpm4eXM, -1478.97, 1 - bpm4eXP, -1324.53, 1 - bpm4eYM, -1231.63, 1 - bpm4eYP, -1244.23, 1 - - bpm10XM, 245.591, 1 - bpm10XP, 973.781, 1 - bpm10YM, 1003.06, 1 - bpm10YP, 882.076, 1 - - bpm12XM, 7885.14, 1 - bpm12XP, 7723.38, 1 - bpm12YM, 9026.79, 1 - bpm12YP, 10005.1, 1 +! BPM pedestal from run 1245 + bpm4aXM, 3597, 1 + bpm4aXP, 3316, 1 + bpm4aYM, -537.1, 1 + bpm4aYP, -531.5, 1 + + bpm4eXM, -1584, 1 + bpm4eXP, -1512, 1 + bpm4eYM, -1293, 1 + bpm4eYP, -1168, 1 + + bpm10XM, -3190, 1 + bpm10XP, -2872, 1 + bpm10YM, -2744, 1 + bpm10YP, -2850, 1 + + bpm12XM, -3976, 1 + bpm12XP, -4184, 1 + bpm12YM, -3868, 1 + bpm12YP, -3587, 1 + +! cavity BPMs pedestal calibration from zero gain run 1219 + cav4bq, -167.527, 1 + cav4bx, -379.812, 1 + cav4by, -550.257, 1 + + cav4cq, -403.997, 1 + cav4cx, -634.063, 1 + cav4cy, -357.001, 1 + + cav4dq, -216.942, 1 + cav4dx, -242.757, 1 + cav4dy, -203.538, 1 + From ecbca5a69d6d26af074ca1e5d25e5ed434596f8b Mon Sep 17 00:00:00 2001 From: Paul King Date: Fri, 15 Feb 2019 21:46:21 -0500 Subject: [PATCH 029/102] Wrap all EPICS "ca_put" commands in preprocessor check. I have wrapped all the the EPICS "ca_put" commnads in teh Feedback routines in a preprocessor variable check. If you needed to enable the "ca_put" you would need to define "__QWFEEDBACK_ALLOW_EPIPCS_CA_PUT". --- Feedback/include/QwEPICSControl.h | 46 +++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/Feedback/include/QwEPICSControl.h b/Feedback/include/QwEPICSControl.h index dc881a8fd..2ec786963 100644 --- a/Feedback/include/QwEPICSControl.h +++ b/Feedback/include/QwEPICSControl.h @@ -75,31 +75,39 @@ class QwEPICSControl{ Int_t status; switch(mode){ case 0: +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDHall_C_IA_A0, &value); status = ca_pend_io(10); status = ca_get(DBR_DOUBLE, fIDHall_C_IA_A0, &value); status = ca_pend_io(10); +#endif std::cout << "Hall C IA value A0: " << value << std::endl; break; case 1: +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDHall_C_IA_A1, &value); status = ca_pend_io(10); status = ca_get(DBR_DOUBLE, fIDHall_C_IA_A1, &value); status = ca_pend_io(10); +#endif std::cout << "Hall C IA value A1: " << value << std::endl; break; case 2: +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDHall_C_IA_A2, &value); status = ca_pend_io(10); status = ca_get(DBR_DOUBLE, fIDHall_C_IA_A2, &value); status = ca_pend_io(10); +#endif std::cout << "Hall C IA value A2: " << value << std::endl; break; case 3: +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDHall_C_IA_A3, &value); status = ca_pend_io(10); status = ca_get(DBR_DOUBLE, fIDHall_C_IA_A3, &value); status = ca_pend_io(10); +#endif std::cout << "Hall C IA value A3: " << value << std::endl; break; } @@ -110,31 +118,39 @@ class QwEPICSControl{ Int_t status; switch(mode){ case 0: +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDHall_A_IA_A0, &value); status = ca_pend_io(10); status = ca_get(DBR_DOUBLE, fIDHall_A_IA_A0, &value); status = ca_pend_io(10); +#endif std::cout << "Hall A IA value A0: " << value << std::endl; break; case 1: +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDHall_A_IA_A1, &value); status = ca_pend_io(10); status = ca_get(DBR_DOUBLE, fIDHall_A_IA_A1, &value); status = ca_pend_io(10); +#endif std::cout << "Hall A IA value A1: " << value << std::endl; break; case 2: +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDHall_A_IA_A2, &value); status = ca_pend_io(10); status = ca_get(DBR_DOUBLE, fIDHall_A_IA_A2, &value); status = ca_pend_io(10); +#endif std::cout << "Hall A IA value A2: " << value << std::endl; break; case 3: +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDHall_A_IA_A3, &value); status = ca_pend_io(10); status = ca_get(DBR_DOUBLE, fIDHall_A_IA_A3, &value); status = ca_pend_io(10); +#endif std::cout << "Hall A IA value A3: " << value << std::endl; break; } @@ -144,10 +160,12 @@ class QwEPICSControl{ void Set_HelicityMagnet(size_t magnet_index, size_t helicity_index, Double_t &value){ Int_t status; if (magnet_index<4 && helicity_index<2){ +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDHelMag[magnet_index][helicity_index], &value); status = ca_pend_io(10); status = ca_get(DBR_DOUBLE, fIDHelMag[magnet_index][helicity_index], &value); status = ca_pend_io(10); +#endif std::cout << "Helicity Magnet, " << fHelMagNames[magnet_index] << "," << fHelicityNames[helicity_index] << " setpoint: " << value << std::endl; @@ -236,19 +254,23 @@ class QwEPICSControl{ //I removed followup read after eahc ca_put command - rakithab (02-29-2012) void Set_Pockels_Cell_plus(Double_t &value){ Int_t status; +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDPockels_Cell_plus, &value); status = ca_pend_io(10); status = ca_put(DBR_DOUBLE, fIDPockels_Cell_plus, &value); status = ca_pend_io(10); +#endif std::cout << "Pockels Cell pos HW-count value: " << value << std::endl; }; void Set_Pockels_Cell_minus(Double_t &value){ Int_t status; +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE, fIDPockels_Cell_minus, &value); status = ca_pend_io(10); status = ca_put(DBR_DOUBLE, fIDPockels_Cell_minus, &value); status = ca_pend_io(10); +#endif std::cout << "Pockels Cell minus HW-count value: " << value << std::endl; }; @@ -268,6 +290,7 @@ class QwEPICSControl{ void Set_ChargeAsymmetry(Double_t &value, Double_t &value_error, Double_t &value_width){ Int_t status; +#ifdef(__QWFEEDBACK_ALLOW_EPICS_CA_PUT) status = ca_put(DBR_DOUBLE,fChargeAsymmetry , &value); status = ca_pend_io(10); //status = ca_get(DBR_DOUBLE,fChargeAsymmetry , &value); @@ -280,6 +303,7 @@ class QwEPICSControl{ status = ca_pend_io(10); //status = ca_get(DBR_DOUBLE,fChargeAsymmetryWidth , &value_width); //status = ca_pend_io(10); +#endif std::cout << "EPICS Charge asymmetry updated " << value <<" +/- "< Date: Sat, 16 Feb 2019 15:12:03 -0500 Subject: [PATCH 030/102] Added new pedestals for the injector taken from Caryn's analysis from 22JAN2019 The pan control.db file from which the pedestals were extracted was /adaqfs/home/apar/caryn/paninj2018/pan/controldb/control.db_inj_20190122_20uAHallB --- .../prexinj_beamline_pedestal.1047-.map | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Parity/prminput/prexinj_beamline_pedestal.1047-.map diff --git a/Parity/prminput/prexinj_beamline_pedestal.1047-.map b/Parity/prminput/prexinj_beamline_pedestal.1047-.map new file mode 100644 index 000000000..472c43597 --- /dev/null +++ b/Parity/prminput/prexinj_beamline_pedestal.1047-.map @@ -0,0 +1,94 @@ +! Pedestals are taken from Caryn's analysis from 22 JAN 2019 +! /adaqfs/home/apar/caryn/paninj2018/pan/controldb/control.db_inj_20190122_20uAHallB +! These are expected to be reasonable for the running through APEX. +! +bpm0i01aXP -2604.930 1.0 +bpm0i01aXM -2601.160 1.0 +bpm0i01aYP -1654.810 1.0 +bpm0i01aYM -1605.750 1.0 +bpm1i04XP -2405.910 1.0 +bpm1i04XM -2585.200 1.0 +bpm1i04YP -976.762 1.0 +bpm1i04YM -713.547 1.0 +bpm1i02XP -2623.490 1.0 +bpm1i02XM -2811.160 1.0 +bpm1i02YP -2892.070 1.0 +bpm1i02YM -2897.230 1.0 +bpm0i01XP -1964.850 1.0 +bpm0i01XM -1426.040 1.0 +bpm0i01YP -1914.250 1.0 +bpm0i01YM -2197.040 1.0 +bpm1i06XP -1469.110 1.0 +bpm1i06XM -1730.260 1.0 +bpm1i06YP -2418.180 1.0 +bpm1i06YM -2378.630 1.0 +bpm0i02XP -1768.670 1.0 +bpm0i02XM -1639.520 1.0 +bpm0i02YP -1625.830 1.0 +bpm0i02YM -1834.070 1.0 +bpm0i02aXP 1478.670 1.0 +bpm0i02aXM -541.400 1.0 +bpm0i02aYP 378.088 1.0 +bpm0i02aYM 790.322 1.0 +bpm0i05XP 661.991 1.0 +bpm0i05XM 585.144 1.0 +bpm0i05YP 411.779 1.0 +bpm0i05YM 895.267 1.0 +bpm0i07XP -964.191 1.0 +bpm0i07XM -157.813 1.0 +bpm0i07YP -135.109 1.0 +bpm0i07YM 299.847 1.0 +bpm0l01XP -627.405 1.0 +bpm0l01XM -493.821 1.0 +bpm0l01YP -1277.160 1.0 +bpm0l01YM -679.362 1.0 +bpm0l02XP 446.173 1.0 +bpm0l02XM -310.379 1.0 +bpm0l02YP -897.325 1.0 +bpm0l02YM -80.647 1.0 +bpm0l03XP -24.343 1.0 +bpm0l03XM 545.542 1.0 +bpm0l03YP 72.308 1.0 +bpm0l03YM -559.071 1.0 +bpm0l04XP -667.464 1.0 +bpm0l04XM -56.794 1.0 +bpm0l04YP 48.150 1.0 +bpm0l04YM -513.805 1.0 +bpm0l05XP -163.069 1.0 +bpm0l05XM -497.898 1.0 +bpm0l05YP 115.034 1.0 +bpm0l05YM -63.297 1.0 +bpm0l06XP -675.142 1.0 +bpm0l06XM -662.160 1.0 +bpm0l06YP -591.049 1.0 +bpm0l06YM 305.864 1.0 +bpm0l07XP 512.767 1.0 +bpm0l07XM 512.755 1.0 +bpm0l07YP 946.555 1.0 +bpm0l07YM 734.040 1.0 +bpm0r02XP 265.510 1.0 +bpm0r02XM 424.975 1.0 +bpm0r02YP 268.745 1.0 +bpm0r02YM 269.683 1.0 +bpm0r05XP -1014.460 1.0 +bpm0r05XM 100.906 1.0 +bpm0r05YP -115.385 1.0 +bpm0r05YM -918.480 1.0 +bpm0l10XP -342.079 1.0 +bpm0l10XM -24.541 1.0 +bpm0l10YP 31.786 1.0 +bpm0l10YM -133.045 1.0 +bpm2i02XP -2865.740 1.0 +bpm2i02XM -3085.900 1.0 +bpm2i02YP -2488.110 1.0 +bpm2i02YM -2293.440 1.0 +bpm2i01XP -2296.850 1.0 +bpm2i01XM -1924.620 1.0 +bpm2i01YP -488.405 1.0 +bpm2i01YM -1005.620 1.0 +! BCM gain for 0L02 is from Qweak parameter files +bcm0l02 -327.751 0.00150841 +! Use calibration into volts for batteries and phase monitor. +batery6 -295.052 76.2939e-6 +batery7 -445.764 76.2939e-6 +phasemonitor -162.172 76.2939e-6 From ac1bda7209796e4d740a4073f767f4c9db3f09f7 Mon Sep 17 00:00:00 2001 From: Parity Account Date: Tue, 19 Feb 2019 19:13:11 -0500 Subject: [PATCH 031/102] Adding new example macro (exampleMacro2) and corresponding config file. This example macro will take as input the draw, cuts, and histogram bin numbers and limits for a TH2F histogram, allowing for user control of the binning of a standard Draw() command, but with arbitrary draw statements and cuts, instead of relying on panguin to select the correct limits or writing a new macro for each specific intentionally binned draw command. This macro also serves as the bare minimum example of how to select a tree, draw from that tree, and manipulate the resultant object. Further generalization can be taken with adding another argument for which tree to draw from, etc. --- panguin/macros/exampleCFG2.cfg | 32 ++++++++++++++++++++++ panguin/macros/exampleMacro2.C | 28 +++++++++++++++++-- panguin/macros/japantypes.hh | 9 +++++++ panguin/macros/sams.cfg | 49 +++++++++++++++++----------------- 4 files changed, 91 insertions(+), 27 deletions(-) create mode 100644 panguin/macros/exampleCFG2.cfg diff --git a/panguin/macros/exampleCFG2.cfg b/panguin/macros/exampleCFG2.cfg new file mode 100644 index 000000000..fb44286ef --- /dev/null +++ b/panguin/macros/exampleCFG2.cfg @@ -0,0 +1,32 @@ +# Configuration file for the online GUI +# This file is for ADCs +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +# Usage: exampleMacro2(std::string title, std::string draws, std:;string cuts,int binsx, double binlowx, double binhighx, int binsy, double binlowy, double binhighy) + +# Default root file to look at +#rootfile pan.root +rootfile /adaq1/work1/apar/japanOutput/prexALL_1098.root +##rootfile /adaq1/work1/apar/ciprian/parity18_4416_standard.root +##rootfile /dev/shm//QwMemMapFile.map + +# Prototype rootfilename.. overrides GetRootFileName.C +##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root +#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root + +# Defined cuts +definecut evcut (pattern_number>1) +definecut cuts (CodaEventNumber>10) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 1 2 + title SAMs test + macro ./macros/exampleMacro2.C("BPM4A-x-vs-y","bpm4aX:bpm4aY","bcm_an_ds10>10",100,2.4,2.55,100,1.9,2.1) + macro ./macros/exampleMacro2.C("BPM4E-x-vs-y","bpm4eX:bpm4eY","bcm_an_ds10>10",100,2.1,2.4,100,0.90,1.30) diff --git a/panguin/macros/exampleMacro2.C b/panguin/macros/exampleMacro2.C index 6eba9d33e..6be1bbea2 100644 --- a/panguin/macros/exampleMacro2.C +++ b/panguin/macros/exampleMacro2.C @@ -1,3 +1,27 @@ -void exampleMacro2(){ - R->Draw("bcm1:ev_num","ev_num>1000"); +#include +#include +#include +#include "TTree.h" +#include "japantypes.hh" + +void exampleMacro2(std::string title, std::string draws, std::string cuts,int binsx, double binlowx, double binhighx, int binsy, double binlowy, double binhighy){ + gStyle->SetOptStat(0); + TTree *evtTree = (TTree*)gDirectory->Get("evt"); + // Make an instance of the relevant data type's struct +// EVTTREE evtTreeVal; +// evtTree->SetBranchAddress( Form("%s",draws.c_str()), &evtTreeVal ); + TH2F *h1=new TH2F("h1",title.c_str(),binsx,binlowx,binhighx,binsy,binlowy,binhighy); + +// Int_t numEntries = evtTree->GetEntries(); +// +// for (int j = 0; j < numEntries; j++) { +// // Loop over the input file's entries and fill the new stuff with the results of one of the leaves +// evtTree->GetEntry(j); +// variable = evtTreeVal.hw_sum; +// } + // Draw your results + h1->SetMarkerStyle(20); + h1->SetMarkerSize(0.4); + evtTree->Draw(Form("%s>>h1",draws.c_str()),Form("%s",cuts.c_str())); + h1->Draw(); } diff --git a/panguin/macros/japantypes.hh b/panguin/macros/japantypes.hh index 2bb7e6267..5f5f0dd77 100644 --- a/panguin/macros/japantypes.hh +++ b/panguin/macros/japantypes.hh @@ -8,3 +8,12 @@ typedef struct { Double_t numsamp; Double_t errorcode; } PATTERNASYMS; +typedef struct { + Double_t hw_sum; + Double_t block0; + Double_t block1; + Double_t block2; + Double_t block3; + Double_t numsamp; + Double_t errorcode; +} EVTTREE; diff --git a/panguin/macros/sams.cfg b/panguin/macros/sams.cfg index db49108db..32b3271a2 100644 --- a/panguin/macros/sams.cfg +++ b/panguin/macros/sams.cfg @@ -13,41 +13,40 @@ rootfile /adaq1/work1/apar/japanOutput/prexALL_1098.root ##rootfile /dev/shm//QwMemMapFile.map # Prototype rootfilename.. overrides GetRootFileName.C - ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root +##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root #protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root # Defined cuts definecut evcut (pattern_number>1) -definecut cuts (event_number>1) +definecut cuts (CodaEventNumber>10) definecut bcmds_cut (-1*bcm_ds>1) # Uncomment the below line to monitor the fill of a ROOTfile. #watchfile -newpage 1 3 +newpage 2 4 title SAMs test - sam1>>g1(100,-0.0112,-0.0108) cuts -tree Mps_Tree -title Volts - sam1:event_number>>g2(2500,0,2500,100,-0.0112,-0.0108) cuts -tree Mps_Tree -type * -title Volts vs Event - asym_sam1*yield_sam1/7 -title PPM noise floor at max 7V signal + sam1.hw_sum:CodaEventNumber>>g1 cuts -tree evt -type . -title Volts vs Event + sam2.hw_sum:CodaEventNumber>>g2 cuts -tree evt -type . -title Volts vs Event + sam3.hw_sum:CodaEventNumber>>g3 cuts -tree evt -type . -title Volts vs Event + sam4.hw_sum:CodaEventNumber>>g4 cuts -tree evt -type . -title Volts vs Event + sam5.hw_sum:CodaEventNumber>>g5 cuts -tree evt -type . -title Volts vs Event + sam6.hw_sum:CodaEventNumber>>g6 cuts -tree evt -type . -title Volts vs Event + sam7.hw_sum:CodaEventNumber>>g7 cuts -tree evt -type . -title Volts vs Event + sam8.hw_sum:CodaEventNumber>>g8 cuts -tree evt -type . -title Volts vs Event newpage 2 4 - title SAMs PPM noise floor at max 7V signal - asym_sam1*yield_sam1/7>>h1(100,-1e-5,1e-5) evcut -tree Hel_Tree - asym_sam2*yield_sam2/7>>h2(100,-1e-5,1e-5) evcut -tree Hel_Tree - asym_sam3*yield_sam3/7>>h3(100,-1e-5,1e-5) evcut -tree Hel_Tree - asym_sam4*yield_sam4/7>>h4(100,-1e-5,1e-5) evcut -tree Hel_Tree - asym_sam5*yield_sam5/7>>h5(100,-1e-5,1e-5) evcut -tree Hel_Tree - asym_sam6*yield_sam6/7>>h6(100,-1e-5,1e-5) evcut -tree Hel_Tree - asym_sam7*yield_sam7/7>>h7(100,-1e-5,1e-5) evcut -tree Hel_Tree - asym_sam8*yield_sam8/7>>h8(100,-1e-5,1e-5) evcut -tree Hel_Tree + title SAMs PPM noise floor signal + yield_sam1>>h1 evcut -tree mul -title yield_sam1 + yield_sam2>>h2 evcut -tree mul -title yield_sam2 + yield_sam3>>h3 evcut -tree mul -title yield_sam3 + yield_sam4>>h4 evcut -tree mul -title yield_sam4 + yield_sam5>>h5 evcut -tree mul -title yield_sam5 + yield_sam6>>h6 evcut -tree mul -title yield_sam6 + yield_sam7>>h7 evcut -tree mul -title yield_sam7 + yield_sam8>>h8 evcut -tree mul -title yield_sam8 -newpage 2 4 - title SAMs (PPM noise floor at max 7V signal) correlations w.r.t. SAM 1 - asym_sam1*yield_sam1/7:asym_sam1*yield_sam1/7>>j1(100,-1e-5,1e-5,100,-1e-5,1e-5) evcut -tree Hel_Tree -type . - asym_sam2*yield_sam2/7:asym_sam1*yield_sam1/7>>j2(100,-1e-5,1e-5,100,-1e-5,1e-5) evcut -tree Hel_Tree -type . - asym_sam3*yield_sam3/7:asym_sam1*yield_sam1/7>>j3(100,-1e-5,1e-5,100,-1e-5,1e-5) evcut -tree Hel_Tree -type . - asym_sam4*yield_sam4/7:asym_sam1*yield_sam1/7>>j4(100,-1e-5,1e-5,100,-1e-5,1e-5) evcut -tree Hel_Tree -type . - asym_sam5*yield_sam5/7:asym_sam1*yield_sam1/7>>j5(100,-1e-5,1e-5,100,-1e-5,1e-5) evcut -tree Hel_Tree -type . - asym_sam6*yield_sam6/7:asym_sam1*yield_sam1/7>>j6(100,-1e-5,1e-5,100,-1e-5,1e-5) evcut -tree Hel_Tree -type . - asym_sam7*yield_sam7/7:asym_sam1*yield_sam1/7>>j7(100,-1e-5,1e-5,100,-1e-5,1e-5) evcut -tree Hel_Tree -type . - asym_sam8*yield_sam8/7:asym_sam1*yield_sam1/7>>j8(100,-1e-5,1e-5,100,-1e-5,1e-5) evcut -tree Hel_Tree -type . +newpage 1 2 + title BPM BCM + yield_bcm_an_ds10:pattern_number>>b1(100,0,nentries,100,0,6) evcut -tree mul -type . -title yield_bcm_an_ds10 vs pattern_number + yield_bpm4eY:yield_bpm4eX>>b2(100,-2.5,1,100,-2,4) evcut -tree mul -type . -title yield_bpm4eY vs yield_bpm4eX From 606673c6ab9be26fdfb74535e1898daaa5b51551 Mon Sep 17 00:00:00 2001 From: Paul King Date: Tue, 19 Feb 2019 22:47:32 -0500 Subject: [PATCH 032/102] Modified the extra config file online_apar.conf to connect to 2ET system. --- Parity/prminput/online_apar.conf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Parity/prminput/online_apar.conf b/Parity/prminput/online_apar.conf index 100fe7a86..3b8d9da7c 100644 --- a/Parity/prminput/online_apar.conf +++ b/Parity/prminput/online_apar.conf @@ -1,9 +1,8 @@ online = yes ET.hostname = adaq3.jlab.org -ET.session = par1 +ET.session = par2 ET.station = realtime -enable-mapfile = yes -circular-buffer = 10000 - -enable-tree-trim = no +##enable-mapfile = yes +##circular-buffer = 10000 +##enable-tree-trim = no From c8729368405559d326a75c08ea1539cdfc4ec3bf Mon Sep 17 00:00:00 2001 From: Paul King Date: Tue, 19 Feb 2019 23:24:29 -0500 Subject: [PATCH 033/102] Adding deliberate cast from Int_t to UInt_t for comparisons between bank index values in QwHelicity. By doing the casting deliberately and testing the Int_t value first, I can remove a wanring, and (hopefully) make sure it does what we meant. --- Parity/src/QwHelicity.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Parity/src/QwHelicity.cc b/Parity/src/QwHelicity.cc index f348a6e48..c0108e740 100644 --- a/Parity/src/QwHelicity.cc +++ b/Parity/src/QwHelicity.cc @@ -914,9 +914,12 @@ Int_t QwHelicity::LoadChannelMap(TString mapfile) if(bankindex!=GetSubbankIndex(fCurrentROC_ID,fCurrentBank_ID)) { bankindex=GetSubbankIndex(fCurrentROC_ID,fCurrentBank_ID); - if (fWordsPerSubbank.size()(fWord.size(),fWord.size())); + if ((bankindex+1)>0){ + UInt_t numbanks = UInt_t(bankindex+1); + if (fWordsPerSubbank.size()(fWord.size(),fWord.size())); + } } wordsofar=0; } From 6c4c66d402e3ce1440355a6205531c46a1b1b896 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Sun, 24 Feb 2019 12:46:37 -0500 Subject: [PATCH 034/102] Ye Tian Updated cavity BPM pedestals and gains. --- .../prexCH_beamline_pedestal.1230-.map | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Parity/prminput/prexCH_beamline_pedestal.1230-.map b/Parity/prminput/prexCH_beamline_pedestal.1230-.map index e510c4356..1ca0db426 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.1230-.map +++ b/Parity/prminput/prexCH_beamline_pedestal.1230-.map @@ -38,15 +38,15 @@ UNSER, -174.1, 2.066e-2 bpm12YP, -3587, 1 ! cavity BPMs pedestal calibration from zero gain run 1219 - cav4bq, -167.527, 1 - cav4bx, -379.812, 1 - cav4by, -550.257, 1 + cav4bq, -167.527, 0.00529310 + cav4bx, -379.812, 0.00089542 + cav4by, -550.257, 0.00060837 - cav4cq, -403.997, 1 - cav4cx, -634.063, 1 - cav4cy, -357.001, 1 + cav4cq, -403.997, 0.0071337 + cav4cx, -634.063, 0.0007546 + cav4cy, -357.001, 0.0008082 - cav4dq, -216.942, 1 - cav4dx, -242.757, 1 - cav4dy, -203.538, 1 + cav4dq, -216.942, 0.0078974 + cav4dx, -242.757, 0.0007698 + cav4dy, -203.538, 0.0006942 From bbb751cf561dd74d04cd66abddcafec70fd2f3ee Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Sun, 24 Feb 2019 20:17:40 -0500 Subject: [PATCH 035/102] Updated pedestals from BCM calibration run 1280 BCM pedestals are calculated from 5uA - 30 uA current scan; BPM pedestals at forced gain are calculated from 20 uA - 30 uA current scan. --- .../prexCH_beamline_pedestal.1230-.map | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/Parity/prminput/prexCH_beamline_pedestal.1230-.map b/Parity/prminput/prexCH_beamline_pedestal.1230-.map index 1ca0db426..21ce7989a 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.1230-.map +++ b/Parity/prminput/prexCH_beamline_pedestal.1230-.map @@ -6,27 +6,34 @@ UNSER, -174.1, 2.066e-2 ! Rough BCM calibration from 2uA and 5uA during run 1224. - bcm_an_us, -634.1, 0.00306062 - bcm_an_ds, -810.6, 0.00300731 - bcm_an_ds3, -662.6, 0.00088747 - bcm_an_ds10, -255.9, 0.00031405 - - +! bcm_an_us, -634.1, 0.00306062 +! bcm_an_ds, -810.6, 0.00300731 +! bcm_an_ds3, -662.6, 0.00088747 +! bcm_an_ds10, -255.9, 0.00031405 ! Rough Digital BCM Calibration from 2uA to 5uA during run 1230 - bcm_dg_us, -203, 0.0034084 - bcm_dg_ds, -656, 0.0033521 +! bcm_dg_us, -203, 0.0034084 +! bcm_dg_ds, -656, 0.0033521 + + ! BCM Calibration from 5-30 uA runs , 1273, 1266, 1280, HAPLOG 3625 + bcm_an_us, -341.6, 0.002865 + bcm_an_ds, -750.9, 0.002696 + bcm_an_ds3, -671.5, 0.0007971 + bcm_an_ds10, -1811, 0.0002693 + bcm_dg_us, -264.1, 0.002974 + bcm_dg_ds, -720.8, 0.002957 + + ! BPM pedestal from run 1280 current scan with forced gain at ~2300 + bpm4aXM, -650.9, 1 + bpm4aXP, 1000, 1 + bpm4aYM, 772.7, 1 + bpm4aYP, -456.8, 1 + + bpm4eXM, 478.4, 1 + bpm4eXP, 742.2, 1 + bpm4eYM, 672.6, 1 + bpm4eYP, -128.7, 1 ! BPM pedestal from run 1245 - bpm4aXM, 3597, 1 - bpm4aXP, 3316, 1 - bpm4aYM, -537.1, 1 - bpm4aYP, -531.5, 1 - - bpm4eXM, -1584, 1 - bpm4eXP, -1512, 1 - bpm4eYM, -1293, 1 - bpm4eYP, -1168, 1 - bpm10XM, -3190, 1 bpm10XP, -2872, 1 bpm10YM, -2744, 1 From a2ff90a658553b17db144e59617c5326453f8e1d Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 26 Feb 2019 14:18:07 -0500 Subject: [PATCH 036/102] Updated test script to run mock data generator, analyze, and compare output Not foolproof since it doesn't actually check the produced ROOT files, but it's probably better than no test at all. --- Tests/004_qwmockdatagenerator.ref | 43 +++ Tests/004_qwparity.sh | 25 ++ Tests/004_qwparity_simple.ref | 435 ++++++++++++++++++++++++++++++ Tests/004_qwtracking.sh | 21 -- 4 files changed, 503 insertions(+), 21 deletions(-) create mode 100644 Tests/004_qwmockdatagenerator.ref create mode 100755 Tests/004_qwparity.sh create mode 100644 Tests/004_qwparity_simple.ref delete mode 100755 Tests/004_qwtracking.sh diff --git a/Tests/004_qwmockdatagenerator.ref b/Tests/004_qwmockdatagenerator.ref new file mode 100644 index 000000000..7ca7e85e7 --- /dev/null +++ b/Tests/004_qwmockdatagenerator.ref @@ -0,0 +1,43 @@ +/home/wdconinc/qweak/QwScratch/setupfiles is a directory; adding it to the search path +/home/wdconinc/git/japan/Analysis/prminput is a directory; adding it to the search path +/home/wdconinc/git/japan/Parity/prminput is a directory; adding it to the search path +Adding user-defined configuration file qwmockdatagenerator.conf +Warning: Overriding the default configuration files with user-defined configuration file qwparity_simple.conf +Parameter file: /home/wdconinc/git/japan/Parity/prminput/qwparity_simple.conf +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_detectors.map +Loading subsystems from mock_detectors.map. +Creating subsystem of type QwHelicity with name Helicity Info. +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_qweak_helicity.map + **** Input Register Mode **** +Creating subsystem of type QwBeamLine with name Injector BeamLine. +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_qweak_beamline.map +Error: At end of processing the combined device  +Error: At end of processing the combined device  +Error: At end of processing the combined device  +Variables to publish: +q_targ combobcm bcm_target c +x_targ combobpm bpm_target x +y_targ combobpm bpm_target y +xp_targ combobpm bpm_target xp +yp_targ combobpm bpm_target yp +e_targ comboenergy target_energy e +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_qweak_pedestal.map +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_beamline_geometry.map +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_beamline_eventcuts.map +Creating subsystem of type QwDetectorArray with name Main Detector. +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_moller_maindet_adc.map +Variables to publish: +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_moller_maindet_pedestal.map +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_moller_maindet_eventcuts.map +QwHelicity::ProcessOptions + fPatternBits 0x69 +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_data_parameters.map +Opening data file: /home/wdconinc/qweak/QwScratch/data/QwMock_10.log +Generated 0 events. +Generated 10000 events. +Run Number: 10 +Run Type: 0 +End Event Counter: 0 +Run Duration (sec): 3 +Number of Pauses during this run: 0 +Wrote mock data run /home/wdconinc/qweak/QwScratch/data/QwMock_10.log successfully. diff --git a/Tests/004_qwparity.sh b/Tests/004_qwparity.sh new file mode 100755 index 000000000..e36d22a1e --- /dev/null +++ b/Tests/004_qwparity.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Test 004: +# +# Run the mock data generator and the analysis and make sure it succeeds. +# + +setupscript=SetupFiles/SET_ME_UP.bash + +if [ ! -e ${setupscript} ] ; then + echo "Setup script ${setupscript} could not be found." + exit -1 +fi + +source ${setupscript} || exit -1 + +OUT=`mktemp -t qwparity.XXXXXX.out` +build/qwmockdatagenerator -r 10 -e :10000 --config qwparity_simple.conf --detectors mock_detectors.map | grep -i -v time | tee $OUT || exit -1 +diff $OUT Tests/004_qwmockdatagenerator.ref || exit -1 + +OUT=`mktemp -t qwparity.XXXXXX.out` +build/qwparity_simple -r 10 -e :10000 --config qwparity_simple.conf --detectors mock_detectors.map | grep -i -v time | grep -v `hostname` | grep -v "Processing event" | tee $OUT || exit -1 +diff $OUT Tests/004_qwparity_simple.ref || exit -1 + +exit 0 diff --git a/Tests/004_qwparity_simple.ref b/Tests/004_qwparity_simple.ref new file mode 100644 index 000000000..9a1920f07 --- /dev/null +++ b/Tests/004_qwparity_simple.ref @@ -0,0 +1,435 @@ +/home/wdconinc/qweak/QwScratch/setupfiles is a directory; adding it to the search path +/home/wdconinc/git/japan/Parity/prminput is a directory; adding it to the search path +/home/wdconinc/git/japan/Analysis/prminput is a directory; adding it to the search path +Adding user-defined configuration file qwparity_simple.conf +Config files: +qwparity_simple.conf +Warning: Overriding the default configuration files with user-defined configuration file qwparity_simple.conf +Parameter file: /home/wdconinc/git/japan/Parity/prminput/qwparity_simple.conf +tree-trim is disabled +histo-trim is disabled +Parameter file: /home/wdconinc/git/japan/Parity/prminput/parity_hist.in +Opening data file: /home/wdconinc/qweak/QwScratch/data/QwMock_10.log +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_detectors.map +Loading subsystems from mock_detectors.map. +Creating subsystem of type QwHelicity with name Helicity Info. +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_qweak_helicity.map + **** Input Register Mode **** +Creating subsystem of type QwBeamLine with name Injector BeamLine. +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_qweak_beamline.map +Error: At end of processing the combined device +Error: At end of processing the combined device +Error: At end of processing the combined device +Variables to publish: +q_targ combobcm bcm_target c +x_targ combobpm bpm_target x +y_targ combobpm bpm_target y +xp_targ combobpm bpm_target xp +yp_targ combobpm bpm_target yp +e_targ comboenergy target_energy e +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_qweak_pedestal.map +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_beamline_geometry.map +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_beamline_eventcuts.map +Creating subsystem of type QwDetectorArray with name Main Detector. +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_moller_maindet_adc.map +Variables to publish: +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_moller_maindet_pedestal.map +Parameter file: /home/wdconinc/git/japan/Parity/prminput/mock_moller_maindet_eventcuts.map +QwHelicity::ProcessOptions + fPatternBits 0x69 +List of published values: +e_targ: published-value +q_targ: published-value +x_targ: published-value +xp_targ: published-value +y_targ: published-value +yp_targ: published-value +Blinding parameters have been calculated. +QwBlinder::InitTestValues(): A total of 10 test values have been calculated successfully. +Warning: enable-lrbcorrection is set to false. Skipping LoadChannelMap for LRBCorrector +QwHelicity::MaxPatternPhase = 4 +QwBlinder: First set target blindability to NotBlindable +New tree: evt, MPS event data tree +New tree: mul, Helicity event data tree +Collecting information (-) from event #0 to generate helicity seed (need 30 bit, so far got 0 bits ) +Collecting information (-) from event #4 to generate helicity seed (need 30 bit, so far got 1 bits ) +Collecting information (-) from event #8 to generate helicity seed (need 30 bit, so far got 2 bits ) +Collecting information (+) from event #12 to generate helicity seed (need 30 bit, so far got 3 bits ) +Collecting information (+) from event #16 to generate helicity seed (need 30 bit, so far got 4 bits ) +Collecting information (-) from event #20 to generate helicity seed (need 30 bit, so far got 5 bits ) +Collecting information (-) from event #24 to generate helicity seed (need 30 bit, so far got 6 bits ) +Collecting information (+) from event #28 to generate helicity seed (need 30 bit, so far got 7 bits ) +Collecting information (+) from event #32 to generate helicity seed (need 30 bit, so far got 8 bits ) +Collecting information (-) from event #36 to generate helicity seed (need 30 bit, so far got 9 bits ) +Collecting information (-) from event #40 to generate helicity seed (need 30 bit, so far got 10 bits ) +Collecting information (+) from event #44 to generate helicity seed (need 30 bit, so far got 11 bits ) +Collecting information (+) from event #48 to generate helicity seed (need 30 bit, so far got 12 bits ) +Collecting information (+) from event #52 to generate helicity seed (need 30 bit, so far got 13 bits ) +Collecting information (-) from event #56 to generate helicity seed (need 30 bit, so far got 14 bits ) +Collecting information (-) from event #60 to generate helicity seed (need 30 bit, so far got 15 bits ) +Collecting information (+) from event #64 to generate helicity seed (need 30 bit, so far got 16 bits ) +Collecting information (+) from event #68 to generate helicity seed (need 30 bit, so far got 17 bits ) +Collecting information (+) from event #72 to generate helicity seed (need 30 bit, so far got 18 bits ) +Collecting information (+) from event #76 to generate helicity seed (need 30 bit, so far got 19 bits ) +Collecting information (+) from event #80 to generate helicity seed (need 30 bit, so far got 20 bits ) +Collecting information (-) from event #84 to generate helicity seed (need 30 bit, so far got 21 bits ) +Collecting information (-) from event #88 to generate helicity seed (need 30 bit, so far got 22 bits ) +Collecting information (+) from event #92 to generate helicity seed (need 30 bit, so far got 23 bits ) +Collecting information (-) from event #96 to generate helicity seed (need 30 bit, so far got 24 bits ) +Collecting information (-) from event #100 to generate helicity seed (need 30 bit, so far got 25 bits ) +Collecting information (-) from event #104 to generate helicity seed (need 30 bit, so far got 26 bits ) +Collecting information (-) from event #108 to generate helicity seed (need 30 bit, so far got 27 bits ) +Collecting information (+) from event #112 to generate helicity seed (need 30 bit, so far got 28 bits ) +Collecting information (+) from event #116 to generate helicity seed (need 30 bit, so far got 29 bits ) +Number of events processed at end of run: 10001 +Root file is /home/wdconinc/qweak/QwScratch/rootfiles/isu_sample_10.root + ------------ error counters ------------------ + +*********QwHelicity Error Summary**************** +First helicity gate counter: -1; last helicity gate counter: 9999 +First pattern counter: -1; last pattern counter: 2499 +Missed 0 helicity gates in 0 blocks of missed events. +Number of multiplet-sync-bit errors: 0 +Number of helicity prediction errors: 0 +--------------------------------------------------- + +*********QwBeamLine Error Summary**************** +--------------------------------------------------------------------------------------------- + Device name HW Sat Sample SW_HW Sequence SameHW ZeroHW EventCut +--------------------------------------------------------------------------------------------- + + qwk_bcm0l00 0 0 0 0 8 0 0 + qwk_bcm0l01 0 0 0 0 8 0 0 + qwk_bcm0l02 0 0 0 0 8 0 0 + qwk_bcm0l03 0 0 0 0 8 0 0 + qwk_bcm0l04 0 0 0 0 8 0 0 + qwk_bcm0l05 0 0 0 0 8 0 0 + qwk_bcm0l06 0 0 0 0 8 0 0 + qwk_bcm0l07 0 0 0 0 8 0 0 + + + qwk_0r06XP 0 0 0 0 9999 0 0 + qwk_0r06YP 0 0 0 0 9999 0 0 + qwk_0r06RelX 0 0 0 0 9999 0 0 + qwk_0r06X 0 0 0 0 9999 0 0 + qwk_0r06RelY 0 0 0 0 9999 0 0 + qwk_0r06Y 0 0 0 0 9999 0 0 + qwk_0r06WS 0 0 0 0 9999 0 0 + + qwk_0l06XP 0 0 0 0 9999 0 0 + qwk_0l06YM 0 0 0 0 9999 0 0 + qwk_0l06RelX 0 0 0 0 9999 0 0 + qwk_0l06X 0 0 0 0 9999 0 0 + qwk_0l06RelY 0 0 0 0 9999 0 0 + qwk_0l06Y 0 0 0 0 9999 0 0 + qwk_0l06WS 0 0 0 0 9999 0 0 + + qwk_1c12XM 0 0 0 0 9999 0 0 + qwk_1c12YM 0 0 0 0 9999 0 0 + qwk_1c12RelX 0 0 0 0 9999 0 0 + qwk_1c12X 0 0 0 0 9999 0 0 + qwk_1c12RelY 0 0 0 0 9999 0 0 + qwk_1c12Y 0 0 0 0 9999 0 0 + qwk_1c12WS 0 0 0 0 9999 0 0 + + qwk_1h04XP 0 0 0 0 9999 0 0 + qwk_1h04YM 0 0 0 0 9999 0 0 + qwk_1h04RelX 0 0 0 0 9999 0 0 + qwk_1h04X 0 0 0 0 9999 0 0 + qwk_1h04RelY 0 0 0 0 9999 0 0 + qwk_1h04Y 0 0 0 0 9999 0 0 + qwk_1h04WS 0 0 0 0 9999 0 0 + + + + + bcm_target 0 0 0 0 8 0 0 + + bpm_targetX 0 0 0 0 9999 0 0 + bpm_targetXSlope 0 0 0 0 9999 0 0 + bpm_targetXIntercept 0 0 0 0 9999 0 0 + bpm_targetXMinChiSquare 0 0 0 0 9999 0 0 + bpm_targetY 0 0 0 0 9999 0 0 + bpm_targetYSlope 0 0 0 0 9999 0 0 + bpm_targetYIntercept 0 0 0 0 9999 0 0 + bpm_targetYMinChiSquare 0 0 0 0 9999 0 0 + bpm_target_EffectiveCharge 0 0 0 0 9999 0 0 + + target_energy 0 0 0 0 9999 0 0 +--------------------------------------------------------------------------------------------- +*********QwDetectorArray Error Summary**************** +--------------------------------------------------------------------------------------------- + Device name HW Sat Sample SW_HW Sequence SameHW ZeroHW EventCut +--------------------------------------------------------------------------------------------- + s1_r1_tr1 0 0 0 0 13 0 0 + s1_r1_open 0 0 0 0 10 0 0 + s1_r1_tr2 0 0 0 0 16 0 0 + s1_r1_closed 0 0 0 0 14 0 0 + s1_r2_tr1 0 0 0 0 15 0 0 + s1_r2_open 0 0 0 0 21 0 0 + s1_r2_tr2 0 0 0 0 11 0 0 + s1_r2_closed 0 0 0 0 15 0 0 + s1_r3_tr1 0 0 0 0 12 0 0 + s1_r3_open 0 0 0 0 12 0 0 + s1_r3_tr2 0 0 0 0 13 0 0 + s1_r3_closed 0 0 0 0 12 0 0 + s1_r4_tr1 0 0 0 0 13 0 0 + s1_r4_open 0 0 0 0 14 0 0 + s1_r4_tr2 0 0 0 0 12 0 0 + s1_r4_closed 0 0 0 0 13 0 0 + s1_r5a_tr1 0 0 0 0 16 0 0 + s1_r5a_open 0 0 0 0 15 0 0 + s1_r5a_tr2 0 0 0 0 12 0 0 + s1_r5a_closed 0 0 0 0 12 0 0 + s1_r5b_tr1 0 0 0 0 11 0 0 + s1_r5b_open 0 0 0 0 14 0 0 + s1_r5b_tr2 0 0 0 0 13 0 0 + s1_r5b_closed 0 0 0 0 12 0 0 + s1_r5c_tr1 0 0 0 0 17 0 0 + s1_r5c_open 0 0 0 0 15 0 0 + s1_r5c_tr2 0 0 0 0 8 0 0 + s1_r5c_closed 0 0 0 0 9 0 0 + s1_r6_tr1 0 0 0 0 13 0 0 + s1_r6_open 0 0 0 0 13 0 0 + s1_r6_tr2 0 0 0 0 12 0 0 + s1_r6_closed 0 0 0 0 15 0 0 + s2_r1_tr1 0 0 0 0 16 0 0 + s2_r1_open 0 0 0 0 14 0 0 + s2_r1_tr2 0 0 0 0 15 0 0 + s2_r1_closed 0 0 0 0 18 0 0 + s2_r2_tr1 0 0 0 0 14 0 0 + s2_r2_open 0 0 0 0 13 0 0 + s2_r2_tr2 0 0 0 0 16 0 0 + s2_r2_closed 0 0 0 0 14 0 0 + s2_r3_tr1 0 0 0 0 16 0 0 + s2_r3_open 0 0 0 0 14 0 0 + s2_r3_tr2 0 0 0 0 12 0 0 + s2_r3_closed 0 0 0 0 13 0 0 + s2_r4_tr1 0 0 0 0 14 0 0 + s2_r4_open 0 0 0 0 16 0 0 + s2_r4_tr2 0 0 0 0 16 0 0 + s2_r4_closed 0 0 0 0 14 0 0 + s2_r5a_tr1 0 0 0 0 14 0 0 + s2_r5a_open 0 0 0 0 15 0 0 + s2_r5a_tr2 0 0 0 0 16 0 0 + s2_r5a_closed 0 0 0 0 13 0 0 + s2_r5b_tr1 0 0 0 0 11 0 0 + s2_r5b_open 0 0 0 0 17 0 0 + s2_r5b_tr2 0 0 0 0 14 0 0 + s2_r5b_closed 0 0 0 0 14 0 0 + s2_r5c_tr1 0 0 0 0 13 0 0 + s2_r5c_open 0 0 0 0 13 0 0 + s2_r5c_tr2 0 0 0 0 16 0 0 + s2_r5c_closed 0 0 0 0 12 0 0 + s2_r6_tr1 0 0 0 0 15 0 0 + s2_r6_open 0 0 0 0 16 0 0 + s2_r6_tr2 0 0 0 0 17 0 0 + s2_r6_closed 0 0 0 0 17 0 0 + s3_r1_tr1 0 0 0 0 13 0 0 + s3_r1_open 0 0 0 0 14 0 0 + s3_r1_tr2 0 0 0 0 10 0 0 + s3_r1_closed 0 0 0 0 15 0 0 + s3_r2_tr1 0 0 0 0 14 0 0 + s3_r2_open 0 0 0 0 16 0 0 + s3_r2_tr2 0 0 0 0 17 0 0 + s3_r2_closed 0 0 0 0 14 0 0 + s3_r3_tr1 0 0 0 0 14 0 0 + s3_r3_open 0 0 0 0 15 0 0 + s3_r3_tr2 0 0 0 0 16 0 0 + s3_r3_closed 0 0 0 0 15 0 0 + s3_r4_tr1 0 0 0 0 15 0 0 + s3_r4_open 0 0 0 0 14 0 0 + s3_r4_tr2 0 0 0 0 17 0 0 + s3_r4_closed 0 0 0 0 14 0 0 + s3_r5a_tr1 0 0 0 0 15 0 0 + s3_r5a_open 0 0 0 0 11 0 0 + s3_r5a_tr2 0 0 0 0 15 0 0 + s3_r5a_closed 0 0 0 0 19 0 0 + s3_r5b_tr1 0 0 0 0 16 0 0 + s3_r5b_open 0 0 0 0 14 0 0 + s3_r5b_tr2 0 0 0 0 11 0 0 + s3_r5b_closed 0 0 0 0 18 0 0 + s3_r5c_tr1 0 0 0 0 15 0 0 + s3_r5c_open 0 0 0 0 22 0 0 + s3_r5c_tr2 0 0 0 0 18 0 0 + s3_r5c_closed 0 0 0 0 16 0 0 + s3_r6_tr1 0 0 0 0 12 0 0 + s3_r6_open 0 0 0 0 18 0 0 + s3_r6_tr2 0 0 0 0 16 0 0 + s3_r6_closed 0 0 0 0 18 0 0 + s4_r1_tr1 0 0 0 0 12 0 0 + s4_r1_open 0 0 0 0 13 0 0 + s4_r1_tr2 0 0 0 0 9 0 0 + s4_r1_closed 0 0 0 0 10 0 0 + s4_r2_tr1 0 0 0 0 16 0 0 + s4_r2_open 0 0 0 0 15 0 0 + s4_r2_tr2 0 0 0 0 15 0 0 + s4_r2_closed 0 0 0 0 12 0 0 + s4_r3_tr1 0 0 0 0 15 0 0 + s4_r3_open 0 0 0 0 13 0 0 + s4_r3_tr2 0 0 0 0 12 0 0 + s4_r3_closed 0 0 0 0 15 0 0 + s4_r4_tr1 0 0 0 0 10 0 0 + s4_r4_open 0 0 0 0 12 0 0 + s4_r4_tr2 0 0 0 0 15 0 0 + s4_r4_closed 0 0 0 0 16 0 0 + s4_r5a_tr1 0 0 0 0 16 0 0 + s4_r5a_open 0 0 0 0 11 0 0 + s4_r5a_tr2 0 0 0 0 12 0 0 + s4_r5a_closed 0 0 0 0 12 0 0 + s4_r5b_tr1 0 0 0 0 14 0 0 + s4_r5b_open 0 0 0 0 12 0 0 + s4_r5b_tr2 0 0 0 0 12 0 0 + s4_r5b_closed 0 0 0 0 10 0 0 + s4_r5c_tr1 0 0 0 0 15 0 0 + s4_r5c_open 0 0 0 0 15 0 0 + s4_r5c_tr2 0 0 0 0 12 0 0 + s4_r5c_closed 0 0 0 0 12 0 0 + s4_r6_tr1 0 0 0 0 14 0 0 + s4_r6_open 0 0 0 0 13 0 0 + s4_r6_tr2 0 0 0 0 14 0 0 + s4_r6_closed 0 0 0 0 12 0 0 + s5_r1_tr1 0 0 0 0 13 0 0 + s5_r1_open 0 0 0 0 14 0 0 + s5_r1_tr2 0 0 0 0 22 0 0 + s5_r1_closed 0 0 0 0 18 0 0 + s5_r2_tr1 0 0 0 0 14 0 0 + s5_r2_open 0 0 0 0 12 0 0 + s5_r2_tr2 0 0 0 0 17 0 0 + s5_r2_closed 0 0 0 0 16 0 0 + s5_r3_tr1 0 0 0 0 16 0 0 + s5_r3_open 0 0 0 0 14 0 0 + s5_r3_tr2 0 0 0 0 17 0 0 + s5_r3_closed 0 0 0 0 12 0 0 + s5_r4_tr1 0 0 0 0 13 0 0 + s5_r4_open 0 0 0 0 14 0 0 + s5_r4_tr2 0 0 0 0 11 0 0 + s5_r4_closed 0 0 0 0 17 0 0 + s5_r5a_tr1 0 0 0 0 9 0 0 + s5_r5a_open 0 0 0 0 15 0 0 + s5_r5a_tr2 0 0 0 0 18 0 0 + s5_r5a_closed 0 0 0 0 12 0 0 + s5_r5b_tr1 0 0 0 0 11 0 0 + s5_r5b_open 0 0 0 0 16 0 0 + s5_r5b_tr2 0 0 0 0 13 0 0 + s5_r5b_closed 0 0 0 0 16 0 0 + s5_r5c_tr1 0 0 0 0 10 0 0 + s5_r5c_open 0 0 0 0 16 0 0 + s5_r5c_tr2 0 0 0 0 14 0 0 + s5_r5c_closed 0 0 0 0 11 0 0 + s5_r6_tr1 0 0 0 0 11 0 0 + s5_r6_open 0 0 0 0 15 0 0 + s5_r6_tr2 0 0 0 0 17 0 0 + s5_r6_closed 0 0 0 0 15 0 0 + s6_r1_tr1 0 0 0 0 13 0 0 + s6_r1_open 0 0 0 0 12 0 0 + s6_r1_tr2 0 0 0 0 14 0 0 + s6_r1_closed 0 0 0 0 17 0 0 + s6_r2_tr1 0 0 0 0 13 0 0 + s6_r2_open 0 0 0 0 13 0 0 + s6_r2_tr2 0 0 0 0 15 0 0 + s6_r2_closed 0 0 0 0 15 0 0 + s6_r3_tr1 0 0 0 0 13 0 0 + s6_r3_open 0 0 0 0 12 0 0 + s6_r3_tr2 0 0 0 0 13 0 0 + s6_r3_closed 0 0 0 0 14 0 0 + s6_r4_tr1 0 0 0 0 12 0 0 + s6_r4_open 0 0 0 0 13 0 0 + s6_r4_tr2 0 0 0 0 15 0 0 + s6_r4_closed 0 0 0 0 14 0 0 + s6_r5a_tr1 0 0 0 0 14 0 0 + s6_r5a_open 0 0 0 0 10 0 0 + s6_r5a_tr2 0 0 0 0 15 0 0 + s6_r5a_closed 0 0 0 0 22 0 0 + s6_r5b_tr1 0 0 0 0 11 0 0 + s6_r5b_open 0 0 0 0 14 0 0 + s6_r5b_tr2 0 0 0 0 17 0 0 + s6_r5b_closed 0 0 0 0 17 0 0 + s6_r5c_tr1 0 0 0 0 18 0 0 + s6_r5c_open 0 0 0 0 14 0 0 + s6_r5c_tr2 0 0 0 0 14 0 0 + s6_r5c_closed 0 0 0 0 14 0 0 + s6_r6_tr1 0 0 0 0 16 0 0 + s6_r6_open 0 0 0 0 13 0 0 + s6_r6_tr2 0 0 0 0 13 0 0 + s6_r6_closed 0 0 0 0 12 0 0 + s7_r1_tr1 0 0 0 0 14 0 0 + s7_r1_open 0 0 0 0 17 0 0 + s7_r1_tr2 0 0 0 0 15 0 0 + s7_r1_closed 0 0 0 0 14 0 0 + s7_r2_tr1 0 0 0 0 12 0 0 + s7_r2_open 0 0 0 0 14 0 0 + s7_r2_tr2 0 0 0 0 18 0 0 + s7_r2_closed 0 0 0 0 14 0 0 + s7_r3_tr1 0 0 0 0 12 0 0 + s7_r3_open 0 0 0 0 10 0 0 + s7_r3_tr2 0 0 0 0 11 0 0 + s7_r3_closed 0 0 0 0 13 0 0 + s7_r4_tr1 0 0 0 0 14 0 0 + s7_r4_open 0 0 0 0 16 0 0 + s7_r4_tr2 0 0 0 0 16 0 0 + s7_r4_closed 0 0 0 0 11 0 0 + s7_r5a_tr1 0 0 0 0 14 0 0 + s7_r5a_open 0 0 0 0 11 0 0 + s7_r5a_tr2 0 0 0 0 14 0 0 + s7_r5a_closed 0 0 0 0 15 0 0 + s7_r5b_tr1 0 0 0 0 15 0 0 + s7_r5b_open 0 0 0 0 16 0 0 + s7_r5b_tr2 0 0 0 0 13 0 0 + s7_r5b_closed 0 0 0 0 11 0 0 + s7_r5c_tr1 0 0 0 0 21 0 0 + s7_r5c_open 0 0 0 0 16 0 0 + s7_r5c_tr2 0 0 0 0 10 0 0 + s7_r5c_closed 0 0 0 0 17 0 0 + s7_r6_tr1 0 0 0 0 12 0 0 + s7_r6_open 0 0 0 0 16 0 0 + s7_r6_tr2 0 0 0 0 12 0 0 + s7_r6_closed 0 0 0 0 11 0 0 +--------------------------------------------------------------------------------------------- +Warning: Starting CloseStream. +Run Number: 10 +Run Type: 0 +End Event Counter: 0 +Run Duration (sec): n/a +Number of Pauses during this run: 0 + +Analysis of run 10 +10000 physics events were processed + +destructor QwkRegBlueCorrelator=input +destructor QwkRegBlueCorrelator done +QwBlinder::PrintFinalValues(): Begin summary +================================================ +Blinder Passed Patterns + Patterns with blinding disabled: 0 + Patterns on a non-blindable target: 2471 + Patterns with transverse beam: 0 + Patterns on blindable target with beam present: 0 +Blinder Failed Patterns + Patterns with unknown target position: 0 + Patterns with changed target position: 0 + Patterns with an undefined Wien setting: 0 + Patterns with a changed Wien setting: 0 + Patterns with an undefined IHWP setting: 0 + Patterns with a changed IHWP setting: 0 + Patterns on blindable target with no beam: 0 + Patterns with other blinding failure: 0 +================================================ +The blinding parameters checksum for seed ID 0 is: +97b0bed785d0a063d21343abfd3504e0 +================================================ +The test results are: + Index Original value Blinded value Orig.-Unblind value + 0 [CENSORED] 544.773 ppb epsilon + 1 [CENSORED] -433.088 ppb epsilon + 2 [CENSORED] 416.474 ppb epsilon + 3 [CENSORED] -643.277 ppb epsilon + 4 [CENSORED] -386.498 ppb epsilon + 5 [CENSORED] -344.967 ppb epsilon + 6 [CENSORED] -417.540 ppb epsilon + 7 [CENSORED] -511.812 ppb epsilon + 8 [CENSORED] -836.650 ppb epsilon + 9 [CENSORED] 550.060 ppb epsilon +================================================ +QwBlinder::PrintFinalValues(): End of summary +I have done everything I can do... diff --git a/Tests/004_qwtracking.sh b/Tests/004_qwtracking.sh deleted file mode 100755 index a11333df2..000000000 --- a/Tests/004_qwtracking.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# Test 004: -# -# Run the analysis code without arguments and make sure it succeeds. This -# test is meant to catch problems in linked libraries and the environment -# variables. -# - -setupscript=SetupFiles/SET_ME_UP.bash - -if [ ! -e ${setupscript} ] ; then - echo "Setup script ${setupscript} could not be found." - exit -1 -fi - -source ${setupscript} || exit -1 - -bin/qwtracking || exit -1 - -exit 0 From df068409f8fbddf244dab02faf9b00145596b4c1 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 26 Feb 2019 16:03:37 -0500 Subject: [PATCH 037/102] Load both New and Gui ROOT libraries, first and in that order. Added required FindROOT module Gui without which the New library does not work for JLab CE 2.3. Changed the order of linker libraries such that the specified additional ROOT_FIND_COMPONENTS are added at the beginning of the list, not the end, as required for New. Maybe of interest to @hansenjo too, since a modifcation of a cmake module from Podd. --- CMakeLists.txt | 2 +- cmake/modules/FindROOT.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bbfba8de..da155ba97 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ link_directories(${Boost_LIBRARY_DIR}) # ROOT # set(minimum_root_version 6.0) -find_package(ROOT ${minimum_root_version} REQUIRED New) +find_package(ROOT ${minimum_root_version} REQUIRED New Gui) config_add_dependency(ROOT ${minimum_root_version}) diff --git a/cmake/modules/FindROOT.cmake b/cmake/modules/FindROOT.cmake index b5eab412c..1cce17540 100644 --- a/cmake/modules/FindROOT.cmake +++ b/cmake/modules/FindROOT.cmake @@ -121,7 +121,7 @@ string(REPLACE "-l" "" ROOT_LIB_FLAGS "${ROOT_LIB_FLAGS}") set(ROOT_LIBRARIES) set(targetlist) list(REMOVE_DUPLICATES ROOT_FIND_COMPONENTS) -foreach(_lib IN LISTS ROOT_LIB_FLAGS ROOT_FIND_COMPONENTS) +foreach(_lib IN LISTS ROOT_FIND_COMPONENTS ROOT_LIB_FLAGS) if(_lib MATCHES "^[A-Z].+") find_library(ROOT_${_lib}_LIBRARY ${_lib} HINTS ${ROOT_LIBRARY_DIR} NO_CMAKE_ENVIRONMENT_PATH) mark_as_advanced(ROOT_${_lib}_LIBRARY) From 3034a1ba909b85b8a1208ad3f5f57bb53ad6b2e1 Mon Sep 17 00:00:00 2001 From: Paul King Date: Tue, 26 Feb 2019 16:15:13 -0500 Subject: [PATCH 038/102] Added paramter files for 240Hz running period on 25Feb2019. Runs 1324-1327 had some 240Hz integral settings, but were not useful due to other DAQ issues. They were not included in these run ranges. --- Parity/prminput/prexCH_beamline.1336-1348.map | 76 ++++++++ Parity/prminput/prex_maindet.1336-1348.map | 33 ++++ Parity/prminput/prex_sam.1336-1348.map | 15 ++ .../prminput/prexinj_beamline.1336-1348.map | 167 ++++++++++++++++++ Parity/prminput/prexinj_helicity.1347.map | 86 +++++++++ 5 files changed, 377 insertions(+) create mode 100644 Parity/prminput/prexCH_beamline.1336-1348.map create mode 100644 Parity/prminput/prex_maindet.1336-1348.map create mode 100644 Parity/prminput/prex_sam.1336-1348.map create mode 100644 Parity/prminput/prexinj_beamline.1336-1348.map create mode 100644 Parity/prminput/prexinj_helicity.1347.map diff --git a/Parity/prminput/prexCH_beamline.1336-1348.map b/Parity/prminput/prexCH_beamline.1336-1348.map new file mode 100644 index 000000000..63a98c3c0 --- /dev/null +++ b/Parity/prminput/prexCH_beamline.1336-1348.map @@ -0,0 +1,76 @@ + +ROC=23 +Bank=0x05 +vqwk_buffer_offset = 1 +!same sample size for ADCs in a given bank +sample_size=1984 +!Sample size should be unchanged - ask Paul King +! +! module.type, module.num chan.num, det.type, det.name, if unrotated then last column ->UNROTATED + + +!ADC0 + VQWK, 0, 0, bcm, QWK_0_0 + VQWK, 0, 1, bcm, QWK_0_1 + VQWK, 0, 2, bcm, BCM_AN_US + VQWK, 0, 3, bcm, BCM_AN_DS + VQWK, 0, 4, bcm, BCM_AN_DS3 + VQWK, 0, 5, bcm, BCM_AN_DS10 + VQWK, 0, 6, bcm, BCM_DG_US + VQWK, 0, 7, bcm, BCM_DG_DS + +!ADC1 + VQWK, 1, 0, bpmstripline, BPM4Exp + VQWK, 1, 1, bpmstripline, BPM4Exm + VQWK, 1, 2, bpmstripline, BPM4Eyp + VQWK, 1, 3, bpmstripline, BPM4Eym + VQWK, 1, 4, bpmstripline, BPM8xp + VQWK, 1, 5, bpmstripline, BPM8xm + VQWK, 1, 6, bpmstripline, BPM8yp + VQWK, 1, 7, bpmstripline, BPM8ym + +!ADC2 + VQWK, 2, 0, bpmstripline, BPM12xp + VQWK, 2, 1, bpmstripline, BPM12xm + VQWK, 2, 2, bpmstripline, BPM12yp + VQWK, 2, 3, bpmstripline, BPM12ym + VQWK, 2, 4, bpmstripline, BPM4Axp + VQWK, 2, 5, bpmstripline, BPM4Axm + VQWK, 2, 6, bpmstripline, BPM4Ayp + VQWK, 2, 7, bpmstripline, BPM4Aym + +!ADC3 + VQWK, 3, 0, bcm, CAV4BX + VQWK, 3, 1, bcm, CAV4BY + VQWK, 3, 2, bcm, CAV4BQ + VQWK, 3, 3, bcm, CAV4CX + VQWK, 3, 4, bcm, CAV4CY + VQWK, 3, 5, bcm, CAV4CQ + VQWK, 3, 6, bcm, QWK_3_6 + VQWK, 3, 7, bcm, UNSER + +!ADC4 + VQWK, 4, 0, bcm, CAV4DX + VQWK, 4, 1, bcm, CAV4DY + VQWK, 4, 2, bcm, CAV4DQ + VQWK, 4, 3, bcm, QWK_4_3 + VQWK, 4, 4, bpmstripline, BPM10xm + VQWK, 4, 5, bpmstripline, BPM10xp + VQWK, 4, 6, bpmstripline, BPM10yp + VQWK, 4, 7, bpmstripline, BPM10ym + +Bank=0x03 +!Happex ADC channels start with 3 on the bottom and go up to 0 +!VQWK ADC channels start with 0 on the bottom and go up to 7 + ADC18,0, 3, bcm, ADC18_BPMxm + ADC18,0, 2, bcm, ADC18_BPMxp + ADC18,0, 1, bcm, ADC18_BPMym + ADC18,0, 0, bcm, ADC18_BPMyp + ADC18,1, 3, bcm, ADC18_CAV4BQ + ADC18,1, 2, bcm, ADC18_1_2 + ADC18,1, 1, bcm, ADC18_1_1 + ADC18,1, 0, bcm, ADC18_1_0 + +[PUBLISH] +! new.tree.variable.name, analysis.class, old.tree.variable.name, element.to.store + q_targ, bcm, bcm_an_ds3, c diff --git a/Parity/prminput/prex_maindet.1336-1348.map b/Parity/prminput/prex_maindet.1336-1348.map new file mode 100644 index 000000000..c6acc13fd --- /dev/null +++ b/Parity/prminput/prex_maindet.1336-1348.map @@ -0,0 +1,33 @@ +ROC=25 +Bank=0x5 +vqwk_buffer_offset=1 + +sample_size=1984 +! +! Force all channels to be "not_blindable" during testing +! + VQWK, 0, 0, IntegrationPMT, usl not_blindable + VQWK, 0, 1, IntegrationPMT, dsl not_blindable + VQWK, 0, 2, IntegrationPMT, atl1 not_blindable + VQWK, 0, 3, IntegrationPMT, atl2 not_blindable + VQWK, 0, 4, IntegrationPMT, vqwk_25_0ch4 not_blindable + VQWK, 0, 5, IntegrationPMT, vqwk_25_0ch5 not_blindable + VQWK, 0, 6, IntegrationPMT, vqwk_25_0ch6 not_blindable + VQWK, 0, 7, IntegrationPMT, vqwk_25_0ch7 not_blindable + +ROC=26 +Bank=0x5 +vqwk_buffer_offset=1 +sample_size=1984 +! +! Force all channels to be "not_blindable" during testing +! + VQWK, 0, 0, IntegrationPMT, usr not_blindable + VQWK, 0, 1, IntegrationPMT, dsr not_blindable + VQWK, 0, 2, IntegrationPMT, atr1 not_blindable + VQWK, 0, 3, IntegrationPMT, atr2 not_blindable + VQWK, 0, 4, IntegrationPMT, vqwk_26_0ch4 not_blindable + VQWK, 0, 5, IntegrationPMT, vqwk_26_0ch5 not_blindable + VQWK, 0, 6, IntegrationPMT, vqwk_26_0ch6 not_blindable + VQWK, 0, 7, IntegrationPMT, vqwk_26_0ch7 not_blindable + diff --git a/Parity/prminput/prex_sam.1336-1348.map b/Parity/prminput/prex_sam.1336-1348.map new file mode 100644 index 000000000..579a74e9a --- /dev/null +++ b/Parity/prminput/prex_sam.1336-1348.map @@ -0,0 +1,15 @@ +ROC=26 +Bank=0x5 +vqwk_buffer_offset=1 + +sample_size=1984 + + VQWK, 1, 0, IntegrationPMT, sam1 + VQWK, 1, 1, IntegrationPMT, sam2 + VQWK, 1, 2, IntegrationPMT, sam3 + VQWK, 1, 3, IntegrationPMT, sam4 + VQWK, 1, 4, IntegrationPMT, sam5 + VQWK, 1, 5, IntegrationPMT, sam6 + VQWK, 1, 6, IntegrationPMT, sam7 + VQWK, 1, 7, IntegrationPMT, sam8 + diff --git a/Parity/prminput/prexinj_beamline.1336-1348.map b/Parity/prminput/prexinj_beamline.1336-1348.map new file mode 100644 index 000000000..8a7604d3c --- /dev/null +++ b/Parity/prminput/prexinj_beamline.1336-1348.map @@ -0,0 +1,167 @@ + +ROC=24 +Bank=0x02 +vqwk_buffer_offset=1 + +!same sample size for ADCs in a given bank +sample_size=1984 +! +! +! module.type, module.num chan.num, det.type, det.name + + +!ADC0 + VQWK, 0, 0, bpmstripline, bpm0I01Axp + VQWK, 0, 1, bpmstripline, bpm0I01Axm + VQWK, 0, 2, bpmstripline, bpm0I01Ayp + VQWK, 0, 3, bpmstripline, bpm0I01Aym + VQWK, 0, 4, bpmstripline, bpm1I04xp + VQWK, 0, 5, bpmstripline, bpm1I04xm + VQWK, 0, 6, bpmstripline, bpm1I04yp + VQWK, 0, 7, bpmstripline, bpm1I04ym + +!ADC1 + VQWK, 1, 0, bpmstripline, bpm1I02xp + VQWK, 1, 1, bpmstripline, bpm1I02xm + VQWK, 1, 2, bpmstripline, bpm1I02yp + VQWK, 1, 3, bpmstripline, bpm1I02ym + VQWK, 1, 4, bpmstripline, bpm0I01xp + VQWK, 1, 5, bpmstripline, bpm0I01xm + VQWK, 1, 6, bpmstripline, bpm0I01yp + VQWK, 1, 7, bpmstripline, bpm0I01ym + + +!ADC2 + VQWK, 2, 0, bpmstripline, bpm1I06xp + VQWK, 2, 1, bpmstripline, bpm1I06xm + VQWK, 2, 2, bpmstripline, bpm1I06yp + VQWK, 2, 3, bpmstripline, bpm1I06ym + VQWK, 2, 4, bpmstripline, bpm0I02xp + VQWK, 2, 5, bpmstripline, bpm0I02xm + VQWK, 2, 6, bpmstripline, bpm0I02yp + VQWK, 2, 7, bpmstripline, bpm0I02ym + +!ADC3 + VQWK, 3, 0, bpmstripline, bpm0I02Axp + VQWK, 3, 1, bpmstripline, bpm0I02Axm + VQWK, 3, 2, bpmstripline, bpm0I02Ayp + VQWK, 3, 3, bpmstripline, bpm0I02Aym + VQWK, 3, 4, bpmstripline, bpm0I05xp + VQWK, 3, 5, bpmstripline, bpm0I05xm + VQWK, 3, 6, bpmstripline, bpm0I05yp + VQWK, 3, 7, bpmstripline, bpm0I05ym + +!ADC4 + VQWK, 4, 0, bpmstripline, bpm0I07xp + VQWK, 4, 1, bpmstripline, bpm0I07xm + VQWK, 4, 2, bpmstripline, bpm0I07yp + VQWK, 4, 3, bpmstripline, bpm0I07ym + VQWK, 4, 4, bpmstripline, bpm0L01xp + VQWK, 4, 5, bpmstripline, bpm0L01xm + VQWK, 4, 6, bpmstripline, bpm0L01yp + VQWK, 4, 7, bpmstripline, bpm0L01ym + + +!ADC5 + VQWK, 5, 0, bpmstripline, bpm0L02xp + VQWK, 5, 1, bpmstripline, bpm0L02xm + VQWK, 5, 2, bpmstripline, bpm0L02yp + VQWK, 5, 3, bpmstripline, bpm0L02ym + VQWK, 5, 4, bpmstripline, bpm0L03xp + VQWK, 5, 5, bpmstripline, bpm0L03xm + VQWK, 5, 6, bpmstripline, bpm0L03yp + VQWK, 5, 7, bpmstripline, bpm0L03ym + +!ADC6 + VQWK, 6, 0, bpmstripline, bpm0L04xp + VQWK, 6, 1, bpmstripline, bpm0L04xm + VQWK, 6, 2, bpmstripline, bpm0L04yp + VQWK, 6, 3, bpmstripline, bpm0L04ym + VQWK, 6, 4, bpmstripline, bpm0L05xp + VQWK, 6, 5, bpmstripline, bpm0L05xm + VQWK, 6, 6, bpmstripline, bpm0L05yp + VQWK, 6, 7, bpmstripline, bpm0L05ym + +!ADC7 + VQWK, 7, 0, bpmstripline, bpm0L06xp + VQWK, 7, 1, bpmstripline, bpm0L06xm + VQWK, 7, 2, bpmstripline, bpm0L06yp + VQWK, 7, 3, bpmstripline, bpm0L06ym + VQWK, 7, 4, bpmstripline, bpm0L07xp + VQWK, 7, 5, bpmstripline, bpm0L07xm + VQWK, 7, 6, bpmstripline, bpm0L07yp + VQWK, 7, 7, bpmstripline, bpm0L07ym + +!ADC8 + VQWK, 8, 0, bpmstripline, bpm0R02xp + VQWK, 8, 1, bpmstripline, bpm0R02xm + VQWK, 8, 2, bpmstripline, bpm0R02yp + VQWK, 8, 3, bpmstripline, bpm0R02ym + VQWK, 8, 4, bpmstripline, bpm0R05xp + VQWK, 8, 5, bpmstripline, bpm0R05xm + VQWK, 8, 6, bpmstripline, bpm0R05yp + VQWK, 8, 7, bpmstripline, bpm0R05ym + +!ADC9 + VQWK, 9, 0, bpmstripline, bpm0L10xp + VQWK, 9, 1, bpmstripline, bpm0L10xm + VQWK, 9, 2, bpmstripline, bpm0L10yp + VQWK, 9, 3, bpmstripline, bpm0L10ym + VQWK, 9, 4, bpmstripline, bpm2I02xp + VQWK, 9, 5, bpmstripline, bpm2I02xm + VQWK, 9, 6, bpmstripline, bpm2I02yp + VQWK, 9, 7, bpmstripline, bpm2I02ym + +!ADC10 + VQWK, 10, 0, bpmstripline, bpm2I01xp + VQWK, 10, 1, bpmstripline, bpm2I01xm + VQWK, 10, 2, bpmstripline, bpm2I01yp + VQWK, 10, 3, bpmstripline, bpm2I01ym + VQWK, 10, 4, bcm, BCM0L02 + VQWK, 10, 5, bcm, Batery6 + VQWK, 10, 6, bcm, Batery7 + VQWK, 10, 7, bcm, PhaseMonitor + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +Bank=0x01 +scaler_buffer_offset=6 +normclock=clk4MHz_1 + + SCALER, 0, 0, clock, sca0_0 + SCALER, 0, 1, clock, sca0_1 + SCALER, 0, 2, clock, sca0_2 + SCALER, 0, 3, clock, sca0_3 + SCALER, 0, 4, clock, sca0_4 + SCALER, 0, 5, clock, sca0_5 + SCALER, 0, 6, clock, sca0_6 + SCALER, 0, 7, clock, sca0_7 + SCALER, 0, 8, clock, sca0_8 + SCALER, 0, 9, clock, sca0_9 + SCALER, 0, 10, clock, sca0_10 + SCALER, 0, 11, clock, sca0_11 + SCALER, 0, 12, clock, sca0_12 + SCALER, 0, 13, clock, sca0_13 + SCALER, 0, 14, clock, sca0_14 + SCALER, 0, 15, clock, sca0_15 + + SCALER, 0, 16, halomonitor, sca0_16 + SCALER, 0, 17, clock, clk4MHz_1 + SCALER, 0, 18, clock, clk4MHz_2 + SCALER, 0, 19, clock, clk4MHz_3 + SCALER, 0, 20, halomonitor, sca0_20 + SCALER, 0, 21, halomonitor, sca0_21 + SCALER, 0, 22, halomonitor, sca0_22 + SCALER, 0, 23, halomonitor, sca0_23 + SCALER, 0, 24, halomonitor, sca0_24 + SCALER, 0, 25, halomonitor, sca0_25 + SCALER, 0, 26, halomonitor, sca0_26 + SCALER, 0, 27, halomonitor, sca0_27 + SCALER, 0, 28, halomonitor, sca0_28 + SCALER, 0, 29, halomonitor, sca0_29 + SCALER, 0, 30, halomonitor, sca0_30 + SCALER, 0, 31, halomonitor, sca0_31 + + +[PUBLISH] +# # q_targ, bcm, bcm0l02, c +# q_targ, bpmstripline, bpm0i02, ef ### Effective charge of BPM0i02 diff --git a/Parity/prminput/prexinj_helicity.1347.map b/Parity/prminput/prexinj_helicity.1347.map new file mode 100644 index 000000000..19335eb6d --- /dev/null +++ b/Parity/prminput/prexinj_helicity.1347.map @@ -0,0 +1,86 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! input file for decoding the helicity subsystem +!! Of note in this file: +!! HelicityDecodingMode : will tell which mode of decoding is in use +!! : for now it can be InputRegisterMode, UserbitMode +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!Injector data during happex data taking: run 12331, 12354, 12356 +!HelicityDecodingMode=InputRegisterMode +!PatternPhase=4 +!ROC=23 +! +! Header=0xfdacf000 +! HAPPEX BMW words +!SKIP 148 +!WORD, 0, 0, helicitydata, ha_cleandata +!WORD, 0, 0, helicitydata, ha_scandata1 +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!INPUT REGISTER MODE +HelicityDecodingMode=InputRegisterMode + +InputRegMask_FakeMPS=0 !!! Do not use a input register bit to indicate a "fake" set of helicity bits + +! Set the patternPhase (number of windows in a pattern) for each run range. +! If patternPhase!=4, then also set the NumberPatternsDelayed +! so the reported helicity is delayed by 8 windows (default 2). +!NumberPatternsDelayed=4 +PatternPhase=8 + + + +!Need to set PATTERNPHASEOFFSET = 1 (when pattern phase starts with 1) or 0 (when pattern phase starts with 0) +!default value for PATTERNPHASEOFFSET = 1 is set within the code itself which works fine with regular injector/beamline/parity mock data +!uncomment below line only if phase number start from 0 +PATTERNPHASEOFFSET=0 + + +!seed size is either 24 bit or 30 bit. default is 30 bit +!RandSeedBits=24 + +ROC=24 +Bank=0x3 + +! +! module.type, module.num chan.num, det.type, det.name +! +SKIP 1 ! This is the marker word for PAN +WORD, 0, 0, helicitydata, input_register +WORD, 0, 0, helicitydata, output_register +SKIP 1 ! WORD, 0, 0, helicitydata, sca_MPS_num +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_counter +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_phase +SKIP 3 +WORD, 0, 0, helicitydata, cleandata +WORD, 0, 0, helicitydata, scandata1 +WORD, 0, 0, helicitydata, scandata2 +SKIP 1 +!END +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!USER BIT MODE + +!HelicityDecodingMode= UserbitMode +!PatternPhase=4 +!seed size is either 24 bit or 30 bit. default is 24 bit +!RandSeedBits=24 +!RandSeedBits=30 +!ROC=31 +!Bank=0x3101 +! +! module.type, module.num chan.num, det.type, det.name +! +!WORD, 0, 0, helicitydata, cleandata +!WORD, 0, 0, helicitydata, scandata1 +!WORD, 0, 0, helicitydata, scandata2 +!WORD, 0, 0, helicitydata, scalerheader +!WORD, 0, 0, helicitydata, scalercounter +!WORD, 0, 0, helicitydata, userbit +!END From 9464adaf46d0207c4d73f1a6f00a768ab2fc653e Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 27 Feb 2019 18:58:51 -0500 Subject: [PATCH 039/102] Refactor: Moved two method definitions from QwOptions.h into QwOptions.cc. --- Analysis/include/QwOptions.h | 16 +++------------- Analysis/src/QwOptions.cc | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/Analysis/include/QwOptions.h b/Analysis/include/QwOptions.h index 701617a60..3d20d84af 100644 --- a/Analysis/include/QwOptions.h +++ b/Analysis/include/QwOptions.h @@ -189,25 +189,15 @@ class QwOptions { void SetCommandLine(int argc, char* argv[], bool default_config_file = true); /// \brief Set a configuration file - void SetConfigFile(const std::string& configfile) { - fConfigFiles.clear(); - fConfigFiles.push_back(configfile); - fParsed = false; - }; + void SetConfigFile(const std::string& configfile); /// \brief Add a configuration file - void AddConfigFile(const std::string& configfile) { - QwMessage << "Adding user-defined configuration file " - << configfile << QwLog::endl; - fConfigFiles.push_back(configfile); - fParsed = false; - }; + void AddConfigFile(const std::string& configfile); /// \brief Add some configuration files void AddConfigFile(std::vector configfiles) { for (size_t i = 0; i < configfiles.size(); i++) - fConfigFiles.push_back(configfiles.at(i)); - fParsed = false; + AddConfigFile(configfiles.at(i)); }; /// \brief List the configuration files diff --git a/Analysis/src/QwOptions.cc b/Analysis/src/QwOptions.cc index 6729cb6aa..4e079ceef 100644 --- a/Analysis/src/QwOptions.cc +++ b/Analysis/src/QwOptions.cc @@ -143,6 +143,29 @@ void QwOptions::SetCommandLine(int argc, char* argv[], bool default_config_file) } } +/** + * Set the named configuration file as the first (and initially only) + * one in the list. + * @param configfile Name of the config file, without path + */ +void QwOptions::SetConfigFile(const std::string& configfile) +{ + fConfigFiles.clear(); + fConfigFiles.push_back(configfile); + fParsed = false; +}; + +/** + * Add the named configuration file to the list. + * @param configfile Name of the config file, without path + */ +void QwOptions::AddConfigFile(const std::string& configfile) +{ + QwMessage << "Adding user-defined configuration file " + << configfile.c_str() << QwLog::endl; + fConfigFiles.push_back(configfile); + fParsed = false; +}; /** From 5dbaa084347c818dd0971b499ca846d91e21ddab Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 27 Feb 2019 19:20:14 -0500 Subject: [PATCH 040/102] Changes in QwOptions to allow "add-config" to be used on both the command line and in a configuration file. The option "add-config" is now defined with the "composing" flag, meaning that all instances will be used by the options parser. When adding a new config file, test to be sure we haven't added it to the list already. After parsing a config file, check to see if a new config file has been added. NOTE: This will allow configuration files to be added from either within a configuration file, or from the command line, but if the options within those files are in conflict, the earliest one will be taken, and if the commandline options conflict with any of the configuraiton flags, the commandline will be taken. Use the "add-config" only for options that are appearing uniquely in their config files. DO NOT use "set-config" from within a config file. The results would be not what you meant. --- Analysis/src/QwOptions.cc | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/Analysis/src/QwOptions.cc b/Analysis/src/QwOptions.cc index 4e079ceef..8db99e05e 100644 --- a/Analysis/src/QwOptions.cc +++ b/Analysis/src/QwOptions.cc @@ -61,7 +61,7 @@ QwOptions::QwOptions() AddDefaultOptions()("help,h", "print this help message"); AddDefaultOptions()("version,V", "print the version string"); AddDefaultOptions()("config,c", po::value(), "read ONLY this config file\n(will override default config files)"); - AddDefaultOptions()("add-config,a", po::value >(), "read ALSO this config file\n(will keep the default config files)"); + AddDefaultOptions()("add-config,a", po::value >()->composing(), "read ALSO this config file\n(will keep the default config files)"); } /** @@ -150,6 +150,9 @@ void QwOptions::SetCommandLine(int argc, char* argv[], bool default_config_file) */ void QwOptions::SetConfigFile(const std::string& configfile) { + QwWarning << "Overriding the default configuration files with " + << "user-defined configuration file " + << configfile.c_str() << QwLog::endl; fConfigFiles.clear(); fConfigFiles.push_back(configfile); fParsed = false; @@ -161,13 +164,21 @@ void QwOptions::SetConfigFile(const std::string& configfile) */ void QwOptions::AddConfigFile(const std::string& configfile) { - QwMessage << "Adding user-defined configuration file " - << configfile.c_str() << QwLog::endl; - fConfigFiles.push_back(configfile); - fParsed = false; + Bool_t notfound = kTRUE; + for (size_t i = 0; i < fConfigFiles.size(); i++){ + if (fConfigFiles.at(i) == configfile){ + notfound=kFALSE; + break; + } + } + if (notfound){ + QwMessage << "Adding user-defined configuration file " + << configfile.c_str() << QwLog::endl; + fConfigFiles.push_back(configfile); + fParsed = false; + } }; - /** * Combine the options of the various option descriptions in one object for * parsing at once. This avoids having to try/catch every single option @@ -238,14 +249,10 @@ void QwOptions::ParseCommandLine() // If a configuration file is specified, load it. if (fVariablesMap.count("config") > 0) { - QwWarning << "Overriding the default configuration files with " - << "user-defined configuration file " - << fVariablesMap["config"].as() << QwLog::endl; SetConfigFile(fVariablesMap["config"].as()); } // If a configuration file is specified, load it. if (fVariablesMap.count("add-config") > 0) { - QwWarning << "Adding user-defined configuration file " << QwLog::endl; AddConfigFile(fVariablesMap["add-config"].as >()); } } @@ -304,6 +311,11 @@ void QwOptions::ParseConfigFile() } // Notify of new options po::notify(fVariablesMap); + + // If a configuration file is specified, load it. + if (fVariablesMap.count("add-config") > 0) { + AddConfigFile(fVariablesMap["add-config"].as >()); + } } } From bb5cb989014341a811201b44c07f7d47d5af328d Mon Sep 17 00:00:00 2001 From: Paul King Date: Thu, 28 Feb 2019 10:40:21 -0500 Subject: [PATCH 041/102] Added "online run number" to online_apar.conf I have added the "online run number", set at a high value, to the configuration for online anlaysis. In online mode, the analyzer is not guaranteed to be able to determine the run number, and so this gives a mechanism to treat the run number as some defeult value. By setting it to a high value, we ought to always pick up the most recent run-ranged parameter files. --- Parity/prminput/online_apar.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Parity/prminput/online_apar.conf b/Parity/prminput/online_apar.conf index 3b8d9da7c..b468bbc31 100644 --- a/Parity/prminput/online_apar.conf +++ b/Parity/prminput/online_apar.conf @@ -3,6 +3,10 @@ ET.hostname = adaq3.jlab.org ET.session = par2 ET.station = realtime +# Set the interpreted run number to a very high value so we always +# pick up the most recent paramter files. +online.RunNumber = 999999 + ##enable-mapfile = yes ##circular-buffer = 10000 ##enable-tree-trim = no From ec78b55652a1fc4ff05892c1a5b4f0e2114b36a4 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Thu, 28 Feb 2019 15:15:39 -0500 Subject: [PATCH 042/102] update config to create map file --- Parity/prminput/online_apar.conf | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Parity/prminput/online_apar.conf b/Parity/prminput/online_apar.conf index b468bbc31..bb844aec1 100644 --- a/Parity/prminput/online_apar.conf +++ b/Parity/prminput/online_apar.conf @@ -7,6 +7,32 @@ ET.station = realtime # pick up the most recent paramter files. online.RunNumber = 999999 -##enable-mapfile = yes +enable-mapfile = true +mapfile-update-interval = 1000 ##circular-buffer = 10000 + +chainfiles = no +single-output-file = TRUE +disable-slow-tree = yes +disable-burst-tree = yes +enable-burstsum = no +enable-differences = no +enable-alternateasym = no + +ring.size = 1 +ring.stability_cut = 0 + +QwBlindDetectorArray.normalize = no +QwDetectorArray.normalize = yes + +write-promptsummary = no +blinder.force-target-out = true + +[QwLog] +color = no +loglevel-file = 0 +#loglevel-screen = 0 +print-function = no +print-signature = no + ##enable-tree-trim = no From ae332413514c274d30e76e87a670f0a3d214c911 Mon Sep 17 00:00:00 2001 From: Paul King Date: Thu, 28 Feb 2019 18:18:56 -0500 Subject: [PATCH 043/102] Unset the executable bit on one file Ran `git update-index --chmod=-x Parity/prminput/qwparity_mapfile.conf` --- Parity/prminput/qwparity_mapfile.conf | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 Parity/prminput/qwparity_mapfile.conf diff --git a/Parity/prminput/qwparity_mapfile.conf b/Parity/prminput/qwparity_mapfile.conf old mode 100755 new mode 100644 From a9971759c1416282bc2380a484635c2a875f6a27 Mon Sep 17 00:00:00 2001 From: Paul King Date: Thu, 28 Feb 2019 18:20:37 -0500 Subject: [PATCH 044/102] Changed histogram directory names to match the names used for TTrees. Renamed the histogram directories from "mps_histo" to "evt_histo", and from "hel_histo" to "mul_histo". --- Parity/main/QwParity.cc | 4 ++-- Parity/main/QwParity_simple.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Parity/main/QwParity.cc b/Parity/main/QwParity.cc index b2b8db699..2c16a5f1f 100644 --- a/Parity/main/QwParity.cc +++ b/Parity/main/QwParity.cc @@ -181,8 +181,8 @@ Int_t main(Int_t argc, Char_t* argv[]) } #endif // __USE_DATABASE__ // Construct histograms - historootfile->ConstructHistograms("mps_histo", ringoutput); - historootfile->ConstructHistograms("hel_histo", helicitypattern); + historootfile->ConstructHistograms("evt_histo", ringoutput); + historootfile->ConstructHistograms("mul_histo", helicitypattern); detectors.ShareHistograms(ringoutput); // Construct tree branches diff --git a/Parity/main/QwParity_simple.cc b/Parity/main/QwParity_simple.cc index eaa398e0d..c7e372d89 100644 --- a/Parity/main/QwParity_simple.cc +++ b/Parity/main/QwParity_simple.cc @@ -159,8 +159,8 @@ Int_t main(Int_t argc, Char_t* argv[]) } // Construct histograms - historootfile->ConstructHistograms("mps_histo", ringoutput); - historootfile->ConstructHistograms("hel_histo", helicitypattern); + historootfile->ConstructHistograms("evt_histo", ringoutput); + historootfile->ConstructHistograms("mul_histo", helicitypattern); detectors.ShareHistograms(ringoutput); // Construct tree branches From caa145cce5615e00a590e8ec5377b16e1f46fad9 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Fri, 1 Mar 2019 10:20:02 -0500 Subject: [PATCH 045/102] configuration for creation of TMapFile in memory --- Parity/prminput/online_apar.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Parity/prminput/online_apar.conf b/Parity/prminput/online_apar.conf index bb844aec1..2f31cda97 100644 --- a/Parity/prminput/online_apar.conf +++ b/Parity/prminput/online_apar.conf @@ -9,15 +9,17 @@ online.RunNumber = 999999 enable-mapfile = true mapfile-update-interval = 1000 -##circular-buffer = 10000 +circular-buffer = 10000 chainfiles = no single-output-file = TRUE disable-slow-tree = yes +disable-histos = yes disable-burst-tree = yes enable-burstsum = no enable-differences = no enable-alternateasym = no +enable-tree-trim = no ring.size = 1 ring.stability_cut = 0 @@ -35,4 +37,3 @@ loglevel-file = 0 print-function = no print-signature = no -##enable-tree-trim = no From b126b411ec8d6350f6b03fac963a8498150c59dd Mon Sep 17 00:00:00 2001 From: Paul King Date: Fri, 1 Mar 2019 20:03:48 -0500 Subject: [PATCH 046/102] Bugfix: Do not require the ROOT "New" library for compilaiton of panguin. --- panguin/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panguin/CMakeLists.txt b/panguin/CMakeLists.txt index 599fa204b..9e5563394 100644 --- a/panguin/CMakeLists.txt +++ b/panguin/CMakeLists.txt @@ -40,7 +40,7 @@ endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) # Load ROOT and setup include directory -find_package(ROOT 6 REQUIRED New Gui Minuit2) +find_package(ROOT 6 REQUIRED Gui Minuit2) include_directories(${ROOT_INCLUDE_DIR}) add_definitions(-std=c++11) From 5594ae9621f2ea40b44f3239fbf0756d32182a7b Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 12:30:03 -0500 Subject: [PATCH 047/102] remove new library from compile requirements. would be needed for TMapFiles --- panguin/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panguin/CMakeLists.txt b/panguin/CMakeLists.txt index 599fa204b..9e5563394 100644 --- a/panguin/CMakeLists.txt +++ b/panguin/CMakeLists.txt @@ -40,7 +40,7 @@ endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) # Load ROOT and setup include directory -find_package(ROOT 6 REQUIRED New Gui Minuit2) +find_package(ROOT 6 REQUIRED Gui Minuit2) include_directories(${ROOT_INCLUDE_DIR}) add_definitions(-std=c++11) From a6d01683153288585af44cee4f592473f8d44e60 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 12:30:25 -0500 Subject: [PATCH 048/102] env vars don't have a slash at the end now --- panguin/src/panguinOnlineConfig.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panguin/src/panguinOnlineConfig.cc b/panguin/src/panguinOnlineConfig.cc index 827fbe72d..ccf44d7fb 100644 --- a/panguin/src/panguinOnlineConfig.cc +++ b/panguin/src/panguinOnlineConfig.cc @@ -516,7 +516,7 @@ void OnlineConfig::OverrideRootFile(UInt_t runnumber) protorootfile.ReplaceAll("XXXXX",runnostr); rootfilename = protorootfile; } else { - string fnmRoot="/adaq1/work1/apar/japanOutput/"; + string fnmRoot="/adaq1/work1/apar/japanOutput"; if(getenv("QW_ROOTFILES")) fnmRoot = getenv("QW_ROOTFILES"); else @@ -526,7 +526,7 @@ void OnlineConfig::OverrideRootFile(UInt_t runnumber) const string daqConfigs[3] = {"CH","INJ","ALL"}; int found=0; for(int i=0;i<3;i++){ - rootfilename = Form("%sprex%s_%d.root",fnmRoot.c_str(),daqConfigs[i].c_str(),runnumber); + rootfilename = Form("%s/prex%s_%d.root",fnmRoot.c_str(),daqConfigs[i].c_str(),runnumber); if( access( rootfilename.Data(), F_OK ) != -1 ){ found++; break; From f9fc4c348297d16047de2985d51eac4584723e61 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 13:40:41 -0500 Subject: [PATCH 049/102] use one option for saving every N events for disk resident or TMapFiles. --- Analysis/include/QwRootFile.h | 15 ++++++++++++++- Parity/prminput/online_apar.conf | 15 ++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Analysis/include/QwRootFile.h b/Analysis/include/QwRootFile.h index 2d7543c0d..d7d954b62 100644 --- a/Analysis/include/QwRootFile.h +++ b/Analysis/include/QwRootFile.h @@ -132,6 +132,10 @@ class QwRootTree { } } + Long64_t AutoSave(Option_t *option){ + return fTree->AutoSave(option); + } + /// Fill the tree Int_t Fill() { fCurrentEvent++; @@ -416,7 +420,16 @@ class QwRootFile { 4 / sizeof(int32_t) / 1024 / 1024 << " MiB" << QwLog::endl; fMapFile->Update(); - } // not for TFile + }else{ + // this option will allow for reading the tree during write + Long64_t nBytes(0); + for (auto iter = fTreeByName.begin(); iter != fTreeByName.end(); iter++) + nBytes += iter->second.front()->AutoSave("SaveSelf"); + + QwMessage << "TFile saved: " + << nBytes/1000000 << "MB (innacurate number)" //FIXME this calculation is innacurate + << QwLog::endl; + } } void Print() { if (fMapFile) fMapFile->Print(); if (fRootFile) fRootFile->Print(); } void ls() { if (fMapFile) fMapFile->ls(); if (fRootFile) fRootFile->ls(); } diff --git a/Parity/prminput/online_apar.conf b/Parity/prminput/online_apar.conf index 2f31cda97..01b7ae422 100644 --- a/Parity/prminput/online_apar.conf +++ b/Parity/prminput/online_apar.conf @@ -7,9 +7,18 @@ ET.station = realtime # pick up the most recent paramter files. online.RunNumber = 999999 -enable-mapfile = true -mapfile-update-interval = 1000 -circular-buffer = 10000 +## FIXME +#rootfile-stem = aparOnline_ + +## Update every N events (for TMapFiles and TFile) +mapfile-update-interval = 2000 + + +### Options for TMapFile +### For now trying to setup disk resident files +##enable-mapfile = true +##mapfile-update-interval = 1000 +##circular-buffer = 10000 chainfiles = no single-output-file = TRUE From 6e3afee92a3ca605a6a2fb2bd32618225e782138 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 13:56:50 -0500 Subject: [PATCH 050/102] online files should also have a limit of events --- Analysis/include/QwRootFile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Analysis/include/QwRootFile.h b/Analysis/include/QwRootFile.h index d7d954b62..9a048242c 100644 --- a/Analysis/include/QwRootFile.h +++ b/Analysis/include/QwRootFile.h @@ -653,7 +653,7 @@ void QwRootFile::ConstructTreeBranches( tree->SetBasketSize(fBasketSize); tree->SetMaxTreeSize(kMaxTreeSize); - if (fEnableMapFile && fCircularBufferSize > 0) + if (fCircularBufferSize > 0) tree->SetCircular(fCircularBufferSize); } else { From dce580f132c3343d124824b16867ffa4517b4a28 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 13:59:39 -0500 Subject: [PATCH 051/102] online files should also have a limit of events --- Parity/prminput/online_apar.conf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Parity/prminput/online_apar.conf b/Parity/prminput/online_apar.conf index 01b7ae422..3ca688ba6 100644 --- a/Parity/prminput/online_apar.conf +++ b/Parity/prminput/online_apar.conf @@ -11,14 +11,13 @@ online.RunNumber = 999999 #rootfile-stem = aparOnline_ ## Update every N events (for TMapFiles and TFile) -mapfile-update-interval = 2000 +mapfile-update-interval = 1000 +circular-buffer = 108000 ## 864000 = 240 * 60 * 60 | 108000 = 30 *60 *60 ### Options for TMapFile ### For now trying to setup disk resident files ##enable-mapfile = true -##mapfile-update-interval = 1000 -##circular-buffer = 10000 chainfiles = no single-output-file = TRUE From c6c6d245a4b8550913b9eb8c6bb2781e3c891cf7 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 20:09:32 -0500 Subject: [PATCH 052/102] should keep the standard naming conventions. online will be differentiated by run number 999999 --- Parity/prminput/online_apar.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/Parity/prminput/online_apar.conf b/Parity/prminput/online_apar.conf index 3ca688ba6..37831f8c1 100644 --- a/Parity/prminput/online_apar.conf +++ b/Parity/prminput/online_apar.conf @@ -7,9 +7,6 @@ ET.station = realtime # pick up the most recent paramter files. online.RunNumber = 999999 -## FIXME -#rootfile-stem = aparOnline_ - ## Update every N events (for TMapFiles and TFile) mapfile-update-interval = 1000 circular-buffer = 108000 ## 864000 = 240 * 60 * 60 | 108000 = 30 *60 *60 From 0f4d7bd691f2198ec1ab76e90c5138d3ebabf37e Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 20:10:12 -0500 Subject: [PATCH 053/102] update every 30s. On the same timescale as the file udpate --- panguin/include/panguinOnline.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panguin/include/panguinOnline.hh b/panguin/include/panguinOnline.hh index 76d3bf162..e51c49711 100644 --- a/panguin/include/panguinOnline.hh +++ b/panguin/include/panguinOnline.hh @@ -22,7 +22,7 @@ #include "TH3.h" #include "panguinOnlineConfig.hh" -#define UPDATETIME 2000 +#define UPDATETIME 30000 class OnlineGUI { // Class that takes care of the GUI From fc834d7dd990de0bab7e18c7e5ce21df01b5f544 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 20:11:40 -0500 Subject: [PATCH 054/102] update search for files. include pattern for online monitor files --- panguin/src/panguinOnlineConfig.cc | 33 +++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/panguin/src/panguinOnlineConfig.cc b/panguin/src/panguinOnlineConfig.cc index ccf44d7fb..1f4b2d011 100644 --- a/panguin/src/panguinOnlineConfig.cc +++ b/panguin/src/panguinOnlineConfig.cc @@ -5,6 +5,8 @@ #include #include #include +#include + //#define DEBUG //#define DEBUG2 //#define NOISY @@ -523,19 +525,36 @@ void OnlineConfig::OverrideRootFile(UInt_t runnumber) cout<<"QW_ROOTFILES env variable was not found going with default: "<< fnmRoot<d_name; + if(fullname.find(partialname) != std::string::npos){ + rootfilename = fnmRoot + "/" + fullname; + found++; + } + } + if(found) break; } + closedir (dirSearch); } + if(found) cout<<"\t found file "<< rootfilename< Date: Sat, 2 Mar 2019 20:12:10 -0500 Subject: [PATCH 055/102] proof of principle config file --- panguin/macros/defaultOnline.cfg | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 panguin/macros/defaultOnline.cfg diff --git a/panguin/macros/defaultOnline.cfg b/panguin/macros/defaultOnline.cfg new file mode 100644 index 000000000..2537d0343 --- /dev/null +++ b/panguin/macros/defaultOnline.cfg @@ -0,0 +1,21 @@ +# Configuration file for the online GUI +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +# Prototype rootfilename.. overrides GetRootFileName.C +rootfile $QW_ROOTFILES/prexALL_999999.root + +# Defined cuts +definecut evcut (CodaEventNumber>10) + +# Uncomment the below line to monitor the fill of a ROOTfile. +watchfile + +### column row +newpage 1 1 + title BCMs vs Event Number + bcm_us:CodaEventNumber evcut -type scat -title "BCM1 vs Eventnumber" + From 3a14dc4b12c871cfd2a3e597e0e11bf0a6e4510c Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 20:21:58 -0500 Subject: [PATCH 056/102] add instructions for online monitor --- panguin/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/panguin/README.md b/panguin/README.md index 8b195a71c..8e471389b 100644 --- a/panguin/README.md +++ b/panguin/README.md @@ -28,3 +28,21 @@ This will read in the configuration files and execute the commands within. This can(should) be used in conjuction with the previous options. It will use your config file (or the default) to print a file called summaryplots.pdf with plots generated from the rootfile it reads. +## Online monitor +With the **watchfile** option enabled the GUI will reload the file every 30 s and will redraw the current canvas (for default usage please look at defaultOnline.cfg). + +The process to run the online monitor goes as follows: +a) Run the ET connected japan output: +``` +cd mainJapanDir +build/qwparity --config prex.conf --add-config online_apar.conf +``` +This will connect to the ET system and analyze events as they come through the ET system. It will update the output file every ~30s. The output file will be placed in the QW_ROOTFILES directory and will have the following pattern: ''prexALL_999999.adaq*.root''. This file can be accessed from the prompt or through panguin. +b) Run panguin: +``` +cd mainJapanDir/pangin +build/panguin -r 999999 -f macros/defaultOnline.cfg +``` +The configuration can be changed with whatever you need but it must have the ''watchfile'' option set. + + From 8af4a6a060d7d0397fc0d9002d24b70c221669b6 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Sat, 2 Mar 2019 20:25:37 -0500 Subject: [PATCH 057/102] there is no need to specify rootfile. the search will find the file --- panguin/macros/defaultOnline.cfg | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/panguin/macros/defaultOnline.cfg b/panguin/macros/defaultOnline.cfg index 2537d0343..0e67c1636 100644 --- a/panguin/macros/defaultOnline.cfg +++ b/panguin/macros/defaultOnline.cfg @@ -5,15 +5,12 @@ # To switch to log scale, add the option logy after the name of # the histogram -# Prototype rootfilename.. overrides GetRootFileName.C -rootfile $QW_ROOTFILES/prexALL_999999.root +# Uncomment the below line to monitor the fill of a ROOTfile. +watchfile # Defined cuts definecut evcut (CodaEventNumber>10) -# Uncomment the below line to monitor the fill of a ROOTfile. -watchfile - ### column row newpage 1 1 title BCMs vs Event Number From f74cba81fd54412464281634f5bb58eec4ef3570 Mon Sep 17 00:00:00 2001 From: Paul King Date: Sun, 3 Mar 2019 22:36:04 -0500 Subject: [PATCH 058/102] Modified the defeult ROOT file update interval to be able to disable rapid updates in offline mode. The default value of "mapfile-update-interval" is now set to -1, which will disable ROOT file updates. We should only need to set this when we are operating the engine in online mode. The previous default of 400 resulted in a 50% increase in the average processing time per event. --- Analysis/include/QwRootFile.h | 2 +- Analysis/src/QwRootFile.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Analysis/include/QwRootFile.h b/Analysis/include/QwRootFile.h index 9a048242c..41ad14b70 100644 --- a/Analysis/include/QwRootFile.h +++ b/Analysis/include/QwRootFile.h @@ -334,7 +334,7 @@ class QwRootFile { // Update regularly static Int_t update_count = 0; update_count++; - if (update_count % fUpdateInterval == 0) Update(); + if ((fUpdateInterval > 0) && ( update_count % fUpdateInterval == 0)) Update(); if (! HasDirByType(object)) return; // Fill histograms object.FillHistograms(); diff --git a/Analysis/src/QwRootFile.cc b/Analysis/src/QwRootFile.cc index 88a169fcc..055c7b6c7 100644 --- a/Analysis/src/QwRootFile.cc +++ b/Analysis/src/QwRootFile.cc @@ -16,7 +16,7 @@ const Int_t QwRootFile::kMaxMapFileSize = 0x3fffffff; // 1 GiB QwRootFile::QwRootFile(const TString& run_label) : fRootFile(0), fMakePermanent(0), fMapFile(0), fEnableMapFile(kFALSE), - fUpdateInterval(400) + fUpdateInterval(-1) { // Process the configuration options ProcessOptions(gQwOptions); @@ -215,7 +215,7 @@ void QwRootFile::DefineOptions(QwOptions &options) ("num-hel-discarded-events", po::value()->default_value(0), "number of discarded consecutive pattern events"); options.AddOptions("ROOT output options") - ("mapfile-update-interval", po::value()->default_value(400), + ("mapfile-update-interval", po::value()->default_value(-1), "Events between a map file update"); // Define the autoflush and autosave option (default values by ROOT) From 36f5438e8d248ac78f7e629b80533b4fb4c9bfb5 Mon Sep 17 00:00:00 2001 From: Parity Account Date: Mon, 4 Mar 2019 14:39:04 -0500 Subject: [PATCH 059/102] Adding recent beamline configuration .map files to operations repository for future reference --- Parity/prminput/prexCH_beamline.1283-.map | 76 ++++++++ Parity/prminput/prexCH_beamline.1397-1420.map | 76 ++++++++ Parity/prminput/prexCH_beamline.1421-.map | 79 +++++++++ .../prexCH_beamline_pedestal.1329-.map | 64 +++++++ Parity/prminput/prex_maindet.1397-.map | 33 ++++ Parity/prminput/prex_sam.1397-.map | 15 ++ Parity/prminput/prex_testing.conf | 1 + Parity/prminput/prexinj_beamline.1397-.map | 167 ++++++++++++++++++ Parity/prminput/prexinj_helicity.1347.map | 2 +- Parity/prminput/prexinj_helicity.1397-.map | 86 +++++++++ 10 files changed, 598 insertions(+), 1 deletion(-) create mode 100644 Parity/prminput/prexCH_beamline.1283-.map create mode 100644 Parity/prminput/prexCH_beamline.1397-1420.map create mode 100644 Parity/prminput/prexCH_beamline.1421-.map create mode 100644 Parity/prminput/prexCH_beamline_pedestal.1329-.map create mode 100644 Parity/prminput/prex_maindet.1397-.map create mode 100644 Parity/prminput/prex_sam.1397-.map create mode 100644 Parity/prminput/prexinj_beamline.1397-.map create mode 100644 Parity/prminput/prexinj_helicity.1397-.map diff --git a/Parity/prminput/prexCH_beamline.1283-.map b/Parity/prminput/prexCH_beamline.1283-.map new file mode 100644 index 000000000..02a243671 --- /dev/null +++ b/Parity/prminput/prexCH_beamline.1283-.map @@ -0,0 +1,76 @@ + +ROC=23 +Bank=0x05 +vqwk_buffer_offset = 1 +!same sample size for ADCs in a given bank +sample_size=16564 +!Sample size should be unchanged - ask Paul King +! +! module.type, module.num chan.num, det.type, det.name, if unrotated then last column ->UNROTATED + + +!ADC0 + VQWK, 0, 0, bcm, QWK_0_0 + VQWK, 0, 1, bcm, QWK_0_1 + VQWK, 0, 2, bcm, BCM_AN_US + VQWK, 0, 3, bcm, BCM_AN_DS + VQWK, 0, 4, bcm, BCM_AN_DS3 + VQWK, 0, 5, bcm, BCM_AN_DS10 + VQWK, 0, 6, bcm, BCM_DG_US + VQWK, 0, 7, bcm, BCM_DG_DS + +!ADC1 + VQWK, 1, 0, bpmstripline, BPM4Exp + VQWK, 1, 1, bpmstripline, BPM4Exm + VQWK, 1, 2, bpmstripline, BPM4Eyp + VQWK, 1, 3, bpmstripline, BPM4Eym + VQWK, 1, 4, bpmstripline, BPM8xp + VQWK, 1, 5, bpmstripline, BPM8xm + VQWK, 1, 6, bpmstripline, BPM8yp + VQWK, 1, 7, bpmstripline, BPM8ym + +!ADC2 + VQWK, 2, 0, bpmstripline, BPM12xp + VQWK, 2, 1, bpmstripline, BPM12xm + VQWK, 2, 2, bpmstripline, BPM12yp + VQWK, 2, 3, bpmstripline, BPM12ym + VQWK, 2, 4, bpmstripline, BPM4Axp + VQWK, 2, 5, bpmstripline, BPM4Axm + VQWK, 2, 6, bpmstripline, BPM4Ayp + VQWK, 2, 7, bpmstripline, BPM4Aym + +!ADC3 + VQWK, 3, 0, bcm, CAV4BX + VQWK, 3, 1, bcm, CAV4BY + VQWK, 3, 2, bcm, CAV4BQ + VQWK, 3, 3, bcm, CAV4CX + VQWK, 3, 4, bcm, CAV4CY + VQWK, 3, 5, bcm, CAV4CQ + VQWK, 3, 6, bcm, QWK_3_6 + VQWK, 3, 7, bcm, UNSER + +!ADC4 + VQWK, 4, 0, bcm, CAV4DX + VQWK, 4, 1, bcm, CAV4DY + VQWK, 4, 2, bcm, CAV4DQ + VQWK, 4, 3, bcm, QWK_4_3 + VQWK, 4, 4, bpmstripline, BPM10xm + VQWK, 4, 5, bpmstripline, BPM10xp + VQWK, 4, 6, bpmstripline, BPM10yp + VQWK, 4, 7, bpmstripline, BPM10ym + +Bank=0x03 +!Happex ADC channels start with 3 on the bottom and go up to 0 +!VQWK ADC channels start with 0 on the bottom and go up to 7 + ADC18,0, 3, bcm, ADC18_BPMxm + ADC18,0, 2, bcm, ADC18_BPMxp + ADC18,0, 1, bcm, ADC18_BPMym + ADC18,0, 0, bcm, ADC18_BPMyp + ADC18,1, 3, bcm, ADC18_CAV4BQ + ADC18,1, 2, bcm, ADC18_1_2 + ADC18,1, 1, bcm, ADC18_1_1 + ADC18,1, 0, bcm, ADC18_1_0 + +[PUBLISH] +! new.tree.variable.name, analysis.class, old.tree.variable.name, element.to.store + q_targ, bcm, bcm_an_ds3, c diff --git a/Parity/prminput/prexCH_beamline.1397-1420.map b/Parity/prminput/prexCH_beamline.1397-1420.map new file mode 100644 index 000000000..63a98c3c0 --- /dev/null +++ b/Parity/prminput/prexCH_beamline.1397-1420.map @@ -0,0 +1,76 @@ + +ROC=23 +Bank=0x05 +vqwk_buffer_offset = 1 +!same sample size for ADCs in a given bank +sample_size=1984 +!Sample size should be unchanged - ask Paul King +! +! module.type, module.num chan.num, det.type, det.name, if unrotated then last column ->UNROTATED + + +!ADC0 + VQWK, 0, 0, bcm, QWK_0_0 + VQWK, 0, 1, bcm, QWK_0_1 + VQWK, 0, 2, bcm, BCM_AN_US + VQWK, 0, 3, bcm, BCM_AN_DS + VQWK, 0, 4, bcm, BCM_AN_DS3 + VQWK, 0, 5, bcm, BCM_AN_DS10 + VQWK, 0, 6, bcm, BCM_DG_US + VQWK, 0, 7, bcm, BCM_DG_DS + +!ADC1 + VQWK, 1, 0, bpmstripline, BPM4Exp + VQWK, 1, 1, bpmstripline, BPM4Exm + VQWK, 1, 2, bpmstripline, BPM4Eyp + VQWK, 1, 3, bpmstripline, BPM4Eym + VQWK, 1, 4, bpmstripline, BPM8xp + VQWK, 1, 5, bpmstripline, BPM8xm + VQWK, 1, 6, bpmstripline, BPM8yp + VQWK, 1, 7, bpmstripline, BPM8ym + +!ADC2 + VQWK, 2, 0, bpmstripline, BPM12xp + VQWK, 2, 1, bpmstripline, BPM12xm + VQWK, 2, 2, bpmstripline, BPM12yp + VQWK, 2, 3, bpmstripline, BPM12ym + VQWK, 2, 4, bpmstripline, BPM4Axp + VQWK, 2, 5, bpmstripline, BPM4Axm + VQWK, 2, 6, bpmstripline, BPM4Ayp + VQWK, 2, 7, bpmstripline, BPM4Aym + +!ADC3 + VQWK, 3, 0, bcm, CAV4BX + VQWK, 3, 1, bcm, CAV4BY + VQWK, 3, 2, bcm, CAV4BQ + VQWK, 3, 3, bcm, CAV4CX + VQWK, 3, 4, bcm, CAV4CY + VQWK, 3, 5, bcm, CAV4CQ + VQWK, 3, 6, bcm, QWK_3_6 + VQWK, 3, 7, bcm, UNSER + +!ADC4 + VQWK, 4, 0, bcm, CAV4DX + VQWK, 4, 1, bcm, CAV4DY + VQWK, 4, 2, bcm, CAV4DQ + VQWK, 4, 3, bcm, QWK_4_3 + VQWK, 4, 4, bpmstripline, BPM10xm + VQWK, 4, 5, bpmstripline, BPM10xp + VQWK, 4, 6, bpmstripline, BPM10yp + VQWK, 4, 7, bpmstripline, BPM10ym + +Bank=0x03 +!Happex ADC channels start with 3 on the bottom and go up to 0 +!VQWK ADC channels start with 0 on the bottom and go up to 7 + ADC18,0, 3, bcm, ADC18_BPMxm + ADC18,0, 2, bcm, ADC18_BPMxp + ADC18,0, 1, bcm, ADC18_BPMym + ADC18,0, 0, bcm, ADC18_BPMyp + ADC18,1, 3, bcm, ADC18_CAV4BQ + ADC18,1, 2, bcm, ADC18_1_2 + ADC18,1, 1, bcm, ADC18_1_1 + ADC18,1, 0, bcm, ADC18_1_0 + +[PUBLISH] +! new.tree.variable.name, analysis.class, old.tree.variable.name, element.to.store + q_targ, bcm, bcm_an_ds3, c diff --git a/Parity/prminput/prexCH_beamline.1421-.map b/Parity/prminput/prexCH_beamline.1421-.map new file mode 100644 index 000000000..7c5aa9e2d --- /dev/null +++ b/Parity/prminput/prexCH_beamline.1421-.map @@ -0,0 +1,79 @@ + +ROC=23 +Bank=0x05 +vqwk_buffer_offset = 1 +!same sample size for ADCs in a given bank +sample_size=16564 +!Sample size should be unchanged - ask Paul King +! +! module.type, module.num chan.num, det.type, det.name, if unrotated then last column ->UNROTATED + + +!ADC0 + VQWK, 0, 0, bcm, QWK_0_0 + VQWK, 0, 1, bcm, QWK_0_1 + VQWK, 0, 2, bcm, BCM_AN_US + VQWK, 0, 3, bcm, BCM_AN_DS + VQWK, 0, 4, bcm, BCM_AN_DS3 + VQWK, 0, 5, bcm, BCM_AN_DS10 + VQWK, 0, 6, bcm, BCM_DG_US + VQWK, 0, 7, bcm, BCM_DG_DS + +!ADC1 + VQWK, 1, 0, bpmstripline, BPM4Exp + VQWK, 1, 1, bpmstripline, BPM4Exm + VQWK, 1, 2, bpmstripline, BPM4Eyp + VQWK, 1, 3, bpmstripline, BPM4Eym + VQWK, 1, 4, bpmstripline, BPM8xp + VQWK, 1, 5, bpmstripline, BPM8xm + VQWK, 1, 6, bpmstripline, BPM8yp + VQWK, 1, 7, bpmstripline, BPM8ym + +!ADC2 + VQWK, 2, 0, bpmstripline, BPM12xp + VQWK, 2, 1, bpmstripline, BPM12xm + VQWK, 2, 2, bpmstripline, BPM12yp + VQWK, 2, 3, bpmstripline, BPM12ym + VQWK, 2, 4, bpmstripline, BPM4Axp + VQWK, 2, 5, bpmstripline, BPM4Axm + VQWK, 2, 6, bpmstripline, BPM4Ayp + VQWK, 2, 7, bpmstripline, BPM4Aym + +!ADC3 + VQWK, 3, 0, bcm, CAV4BX + VQWK, 3, 1, bcm, CAV4BY + VQWK, 3, 2, bcm, CAV4BQ + VQWK, 3, 3, bcm, CAV4CX + VQWK, 3, 4, bcm, CAV4CY + VQWK, 3, 5, bcm, CAV4CQ + VQWK, 3, 6, bcm, QWK_3_6 + VQWK, 3, 7, bcm, UNSER + +!ADC4 + VQWK, 4, 0, bcm, CAV4DX + VQWK, 4, 1, bcm, CAV4DY + VQWK, 4, 2, bcm, CAV4DQ + VQWK, 4, 3, bcm, QWK_4_3 + VQWK, 4, 4, bpmstripline, BPM10xm + VQWK, 4, 5, bpmstripline, BPM10xp + VQWK, 4, 6, bpmstripline, BPM10yp + VQWK, 4, 7, bpmstripline, BPM10ym + +Bank=0x03 +!Example Happex ADC Channel Mapping - Cameron doesn't know the +! identity of the BPM channel plugged in, so no number given +! and the xypm are almost certainly incorrectly identified. +!Happex ADC channels start with 3 on the bottom and go up to 0 +!VQWK ADC channels start with 0 on the bottom and go up to 7 + ADC18,0, 3, bcm, ADC18_BPMxm + ADC18,0, 2, bcm, ADC18_BPMxp + ADC18,0, 1, bcm, ADC18_BPMym + ADC18,0, 0, bcm, ADC18_BPMyp + ADC18,1, 3, bcm, ADC18_1_3 + ADC18,1, 2, bcm, ADC18_1_2 + ADC18,1, 1, bcm, ADC18_1_1 + ADC18,1, 0, bcm, ADC18_1_0 + +[PUBLISH] +! new.tree.variable.name, analysis.class, old.tree.variable.name, element.to.store + q_targ, bcm, bcm_an_ds3, c diff --git a/Parity/prminput/prexCH_beamline_pedestal.1329-.map b/Parity/prminput/prexCH_beamline_pedestal.1329-.map new file mode 100644 index 000000000..5fb2bc7e0 --- /dev/null +++ b/Parity/prminput/prexCH_beamline_pedestal.1329-.map @@ -0,0 +1,64 @@ +! adc sample size 16564 +!---- +!END + +! Unser calibration based on Run 1214 , HAPLOG 3609 +UNSER, -174.1, 2.066e-2 + +! Rough BCM calibration from 2uA and 5uA during run 1224. +! bcm_an_us, -634.1, 0.00306062 +! bcm_an_ds, -810.6, 0.00300731 +! bcm_an_ds3, -662.6, 0.00088747 +! bcm_an_ds10, -255.9, 0.00031405 +! Rough Digital BCM Calibration from 2uA to 5uA during run 1230 +! bcm_dg_us, -203, 0.0034084 +! bcm_dg_ds, -656, 0.0033521 + + ! BCM Calibration from run 1329~ 35-45 uA + bcm_an_us, -1071.05, 0.002865 + bcm_an_ds, -1200.81, 0.002696 + bcm_an_ds3, -2630.44, 0.0007971 + bcm_an_ds10, -128224, 0.0002693 + bcm_dg_us, -743.49, 0.002974 + bcm_dg_ds, -1128.54, 0.002957 + + ! BPM pedestal from run 1329 current scan with forced gain at ~35,40,45 + bpm4aXM, -324.659, 1 + bpm4aXP, -81.4201, 1 + bpm4aYM, -110.732, 1 + bpm4aYP, -472.448, 1 + + bpm4eXM, -699.327, 1 + bpm4eXP, 274.168, 1 + bpm4eYM, -371.635, 1 + bpm4eYP, -793.804, 1 + + bpm10XM, 5122.51, 1 + bpm10XP, 2397.43, 1 + bpm10YM, -723.721, 1 + bpm10YP, -7360.86, 1 + + bpm12XM, 857.134, 1 + bpm12XP, -2680.33, 1 + bpm12YM, -1467.09, 1 + bpm12YP, -671.621, 1 + + bpm8XM, -334.326, 1 + bpm8XP, 4442.19, 1 + bpm8YM, 4685.64, 1 + bpm8YP, -652.199, 1 + + +! cavity BPMs pedestal calibration from zero gain run 1219 + cav4bq, -167.527, 0.00529310 + cav4bx, -379.812, 0.00089542 + cav4by, -550.257, 0.00060837 + + cav4cq, -403.997, 0.0071337 + cav4cx, -634.063, 0.0007546 + cav4cy, -357.001, 0.0008082 + + cav4dq, -216.942, 0.0078974 + cav4dx, -242.757, 0.0007698 + cav4dy, -203.538, 0.0006942 + diff --git a/Parity/prminput/prex_maindet.1397-.map b/Parity/prminput/prex_maindet.1397-.map new file mode 100644 index 000000000..c6acc13fd --- /dev/null +++ b/Parity/prminput/prex_maindet.1397-.map @@ -0,0 +1,33 @@ +ROC=25 +Bank=0x5 +vqwk_buffer_offset=1 + +sample_size=1984 +! +! Force all channels to be "not_blindable" during testing +! + VQWK, 0, 0, IntegrationPMT, usl not_blindable + VQWK, 0, 1, IntegrationPMT, dsl not_blindable + VQWK, 0, 2, IntegrationPMT, atl1 not_blindable + VQWK, 0, 3, IntegrationPMT, atl2 not_blindable + VQWK, 0, 4, IntegrationPMT, vqwk_25_0ch4 not_blindable + VQWK, 0, 5, IntegrationPMT, vqwk_25_0ch5 not_blindable + VQWK, 0, 6, IntegrationPMT, vqwk_25_0ch6 not_blindable + VQWK, 0, 7, IntegrationPMT, vqwk_25_0ch7 not_blindable + +ROC=26 +Bank=0x5 +vqwk_buffer_offset=1 +sample_size=1984 +! +! Force all channels to be "not_blindable" during testing +! + VQWK, 0, 0, IntegrationPMT, usr not_blindable + VQWK, 0, 1, IntegrationPMT, dsr not_blindable + VQWK, 0, 2, IntegrationPMT, atr1 not_blindable + VQWK, 0, 3, IntegrationPMT, atr2 not_blindable + VQWK, 0, 4, IntegrationPMT, vqwk_26_0ch4 not_blindable + VQWK, 0, 5, IntegrationPMT, vqwk_26_0ch5 not_blindable + VQWK, 0, 6, IntegrationPMT, vqwk_26_0ch6 not_blindable + VQWK, 0, 7, IntegrationPMT, vqwk_26_0ch7 not_blindable + diff --git a/Parity/prminput/prex_sam.1397-.map b/Parity/prminput/prex_sam.1397-.map new file mode 100644 index 000000000..579a74e9a --- /dev/null +++ b/Parity/prminput/prex_sam.1397-.map @@ -0,0 +1,15 @@ +ROC=26 +Bank=0x5 +vqwk_buffer_offset=1 + +sample_size=1984 + + VQWK, 1, 0, IntegrationPMT, sam1 + VQWK, 1, 1, IntegrationPMT, sam2 + VQWK, 1, 2, IntegrationPMT, sam3 + VQWK, 1, 3, IntegrationPMT, sam4 + VQWK, 1, 4, IntegrationPMT, sam5 + VQWK, 1, 5, IntegrationPMT, sam6 + VQWK, 1, 6, IntegrationPMT, sam7 + VQWK, 1, 7, IntegrationPMT, sam8 + diff --git a/Parity/prminput/prex_testing.conf b/Parity/prminput/prex_testing.conf index 2b062aebf..232813a30 100644 --- a/Parity/prminput/prex_testing.conf +++ b/Parity/prminput/prex_testing.conf @@ -19,6 +19,7 @@ codafile-stem = parity_ALL_ codafile-ext = dat QwDetectorArray.normalize = 0 QwBlindDetectorArray.normalize = 0 +enable-differences = 1 ring.size = 200 ring.stability_cut = -1 diff --git a/Parity/prminput/prexinj_beamline.1397-.map b/Parity/prminput/prexinj_beamline.1397-.map new file mode 100644 index 000000000..8a7604d3c --- /dev/null +++ b/Parity/prminput/prexinj_beamline.1397-.map @@ -0,0 +1,167 @@ + +ROC=24 +Bank=0x02 +vqwk_buffer_offset=1 + +!same sample size for ADCs in a given bank +sample_size=1984 +! +! +! module.type, module.num chan.num, det.type, det.name + + +!ADC0 + VQWK, 0, 0, bpmstripline, bpm0I01Axp + VQWK, 0, 1, bpmstripline, bpm0I01Axm + VQWK, 0, 2, bpmstripline, bpm0I01Ayp + VQWK, 0, 3, bpmstripline, bpm0I01Aym + VQWK, 0, 4, bpmstripline, bpm1I04xp + VQWK, 0, 5, bpmstripline, bpm1I04xm + VQWK, 0, 6, bpmstripline, bpm1I04yp + VQWK, 0, 7, bpmstripline, bpm1I04ym + +!ADC1 + VQWK, 1, 0, bpmstripline, bpm1I02xp + VQWK, 1, 1, bpmstripline, bpm1I02xm + VQWK, 1, 2, bpmstripline, bpm1I02yp + VQWK, 1, 3, bpmstripline, bpm1I02ym + VQWK, 1, 4, bpmstripline, bpm0I01xp + VQWK, 1, 5, bpmstripline, bpm0I01xm + VQWK, 1, 6, bpmstripline, bpm0I01yp + VQWK, 1, 7, bpmstripline, bpm0I01ym + + +!ADC2 + VQWK, 2, 0, bpmstripline, bpm1I06xp + VQWK, 2, 1, bpmstripline, bpm1I06xm + VQWK, 2, 2, bpmstripline, bpm1I06yp + VQWK, 2, 3, bpmstripline, bpm1I06ym + VQWK, 2, 4, bpmstripline, bpm0I02xp + VQWK, 2, 5, bpmstripline, bpm0I02xm + VQWK, 2, 6, bpmstripline, bpm0I02yp + VQWK, 2, 7, bpmstripline, bpm0I02ym + +!ADC3 + VQWK, 3, 0, bpmstripline, bpm0I02Axp + VQWK, 3, 1, bpmstripline, bpm0I02Axm + VQWK, 3, 2, bpmstripline, bpm0I02Ayp + VQWK, 3, 3, bpmstripline, bpm0I02Aym + VQWK, 3, 4, bpmstripline, bpm0I05xp + VQWK, 3, 5, bpmstripline, bpm0I05xm + VQWK, 3, 6, bpmstripline, bpm0I05yp + VQWK, 3, 7, bpmstripline, bpm0I05ym + +!ADC4 + VQWK, 4, 0, bpmstripline, bpm0I07xp + VQWK, 4, 1, bpmstripline, bpm0I07xm + VQWK, 4, 2, bpmstripline, bpm0I07yp + VQWK, 4, 3, bpmstripline, bpm0I07ym + VQWK, 4, 4, bpmstripline, bpm0L01xp + VQWK, 4, 5, bpmstripline, bpm0L01xm + VQWK, 4, 6, bpmstripline, bpm0L01yp + VQWK, 4, 7, bpmstripline, bpm0L01ym + + +!ADC5 + VQWK, 5, 0, bpmstripline, bpm0L02xp + VQWK, 5, 1, bpmstripline, bpm0L02xm + VQWK, 5, 2, bpmstripline, bpm0L02yp + VQWK, 5, 3, bpmstripline, bpm0L02ym + VQWK, 5, 4, bpmstripline, bpm0L03xp + VQWK, 5, 5, bpmstripline, bpm0L03xm + VQWK, 5, 6, bpmstripline, bpm0L03yp + VQWK, 5, 7, bpmstripline, bpm0L03ym + +!ADC6 + VQWK, 6, 0, bpmstripline, bpm0L04xp + VQWK, 6, 1, bpmstripline, bpm0L04xm + VQWK, 6, 2, bpmstripline, bpm0L04yp + VQWK, 6, 3, bpmstripline, bpm0L04ym + VQWK, 6, 4, bpmstripline, bpm0L05xp + VQWK, 6, 5, bpmstripline, bpm0L05xm + VQWK, 6, 6, bpmstripline, bpm0L05yp + VQWK, 6, 7, bpmstripline, bpm0L05ym + +!ADC7 + VQWK, 7, 0, bpmstripline, bpm0L06xp + VQWK, 7, 1, bpmstripline, bpm0L06xm + VQWK, 7, 2, bpmstripline, bpm0L06yp + VQWK, 7, 3, bpmstripline, bpm0L06ym + VQWK, 7, 4, bpmstripline, bpm0L07xp + VQWK, 7, 5, bpmstripline, bpm0L07xm + VQWK, 7, 6, bpmstripline, bpm0L07yp + VQWK, 7, 7, bpmstripline, bpm0L07ym + +!ADC8 + VQWK, 8, 0, bpmstripline, bpm0R02xp + VQWK, 8, 1, bpmstripline, bpm0R02xm + VQWK, 8, 2, bpmstripline, bpm0R02yp + VQWK, 8, 3, bpmstripline, bpm0R02ym + VQWK, 8, 4, bpmstripline, bpm0R05xp + VQWK, 8, 5, bpmstripline, bpm0R05xm + VQWK, 8, 6, bpmstripline, bpm0R05yp + VQWK, 8, 7, bpmstripline, bpm0R05ym + +!ADC9 + VQWK, 9, 0, bpmstripline, bpm0L10xp + VQWK, 9, 1, bpmstripline, bpm0L10xm + VQWK, 9, 2, bpmstripline, bpm0L10yp + VQWK, 9, 3, bpmstripline, bpm0L10ym + VQWK, 9, 4, bpmstripline, bpm2I02xp + VQWK, 9, 5, bpmstripline, bpm2I02xm + VQWK, 9, 6, bpmstripline, bpm2I02yp + VQWK, 9, 7, bpmstripline, bpm2I02ym + +!ADC10 + VQWK, 10, 0, bpmstripline, bpm2I01xp + VQWK, 10, 1, bpmstripline, bpm2I01xm + VQWK, 10, 2, bpmstripline, bpm2I01yp + VQWK, 10, 3, bpmstripline, bpm2I01ym + VQWK, 10, 4, bcm, BCM0L02 + VQWK, 10, 5, bcm, Batery6 + VQWK, 10, 6, bcm, Batery7 + VQWK, 10, 7, bcm, PhaseMonitor + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +Bank=0x01 +scaler_buffer_offset=6 +normclock=clk4MHz_1 + + SCALER, 0, 0, clock, sca0_0 + SCALER, 0, 1, clock, sca0_1 + SCALER, 0, 2, clock, sca0_2 + SCALER, 0, 3, clock, sca0_3 + SCALER, 0, 4, clock, sca0_4 + SCALER, 0, 5, clock, sca0_5 + SCALER, 0, 6, clock, sca0_6 + SCALER, 0, 7, clock, sca0_7 + SCALER, 0, 8, clock, sca0_8 + SCALER, 0, 9, clock, sca0_9 + SCALER, 0, 10, clock, sca0_10 + SCALER, 0, 11, clock, sca0_11 + SCALER, 0, 12, clock, sca0_12 + SCALER, 0, 13, clock, sca0_13 + SCALER, 0, 14, clock, sca0_14 + SCALER, 0, 15, clock, sca0_15 + + SCALER, 0, 16, halomonitor, sca0_16 + SCALER, 0, 17, clock, clk4MHz_1 + SCALER, 0, 18, clock, clk4MHz_2 + SCALER, 0, 19, clock, clk4MHz_3 + SCALER, 0, 20, halomonitor, sca0_20 + SCALER, 0, 21, halomonitor, sca0_21 + SCALER, 0, 22, halomonitor, sca0_22 + SCALER, 0, 23, halomonitor, sca0_23 + SCALER, 0, 24, halomonitor, sca0_24 + SCALER, 0, 25, halomonitor, sca0_25 + SCALER, 0, 26, halomonitor, sca0_26 + SCALER, 0, 27, halomonitor, sca0_27 + SCALER, 0, 28, halomonitor, sca0_28 + SCALER, 0, 29, halomonitor, sca0_29 + SCALER, 0, 30, halomonitor, sca0_30 + SCALER, 0, 31, halomonitor, sca0_31 + + +[PUBLISH] +# # q_targ, bcm, bcm0l02, c +# q_targ, bpmstripline, bpm0i02, ef ### Effective charge of BPM0i02 diff --git a/Parity/prminput/prexinj_helicity.1347.map b/Parity/prminput/prexinj_helicity.1347.map index 19335eb6d..43e1d0cfd 100644 --- a/Parity/prminput/prexinj_helicity.1347.map +++ b/Parity/prminput/prexinj_helicity.1347.map @@ -28,7 +28,7 @@ InputRegMask_FakeMPS=0 !!! Do not use a input register bit to indicate a "fak ! Set the patternPhase (number of windows in a pattern) for each run range. ! If patternPhase!=4, then also set the NumberPatternsDelayed ! so the reported helicity is delayed by 8 windows (default 2). -!NumberPatternsDelayed=4 +NumberPatternsDelayed=1 PatternPhase=8 diff --git a/Parity/prminput/prexinj_helicity.1397-.map b/Parity/prminput/prexinj_helicity.1397-.map new file mode 100644 index 000000000..43e1d0cfd --- /dev/null +++ b/Parity/prminput/prexinj_helicity.1397-.map @@ -0,0 +1,86 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! input file for decoding the helicity subsystem +!! Of note in this file: +!! HelicityDecodingMode : will tell which mode of decoding is in use +!! : for now it can be InputRegisterMode, UserbitMode +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!Injector data during happex data taking: run 12331, 12354, 12356 +!HelicityDecodingMode=InputRegisterMode +!PatternPhase=4 +!ROC=23 +! +! Header=0xfdacf000 +! HAPPEX BMW words +!SKIP 148 +!WORD, 0, 0, helicitydata, ha_cleandata +!WORD, 0, 0, helicitydata, ha_scandata1 +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!INPUT REGISTER MODE +HelicityDecodingMode=InputRegisterMode + +InputRegMask_FakeMPS=0 !!! Do not use a input register bit to indicate a "fake" set of helicity bits + +! Set the patternPhase (number of windows in a pattern) for each run range. +! If patternPhase!=4, then also set the NumberPatternsDelayed +! so the reported helicity is delayed by 8 windows (default 2). +NumberPatternsDelayed=1 +PatternPhase=8 + + + +!Need to set PATTERNPHASEOFFSET = 1 (when pattern phase starts with 1) or 0 (when pattern phase starts with 0) +!default value for PATTERNPHASEOFFSET = 1 is set within the code itself which works fine with regular injector/beamline/parity mock data +!uncomment below line only if phase number start from 0 +PATTERNPHASEOFFSET=0 + + +!seed size is either 24 bit or 30 bit. default is 30 bit +!RandSeedBits=24 + +ROC=24 +Bank=0x3 + +! +! module.type, module.num chan.num, det.type, det.name +! +SKIP 1 ! This is the marker word for PAN +WORD, 0, 0, helicitydata, input_register +WORD, 0, 0, helicitydata, output_register +SKIP 1 ! WORD, 0, 0, helicitydata, sca_MPS_num +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_counter +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_phase +SKIP 3 +WORD, 0, 0, helicitydata, cleandata +WORD, 0, 0, helicitydata, scandata1 +WORD, 0, 0, helicitydata, scandata2 +SKIP 1 +!END +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!USER BIT MODE + +!HelicityDecodingMode= UserbitMode +!PatternPhase=4 +!seed size is either 24 bit or 30 bit. default is 24 bit +!RandSeedBits=24 +!RandSeedBits=30 +!ROC=31 +!Bank=0x3101 +! +! module.type, module.num chan.num, det.type, det.name +! +!WORD, 0, 0, helicitydata, cleandata +!WORD, 0, 0, helicitydata, scandata1 +!WORD, 0, 0, helicitydata, scandata2 +!WORD, 0, 0, helicitydata, scalerheader +!WORD, 0, 0, helicitydata, scalercounter +!WORD, 0, 0, helicitydata, userbit +!END From fef0dcf9b0dd4d84335e5a55103472d03c370713 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Mon, 4 Mar 2019 15:51:17 -0500 Subject: [PATCH 060/102] Updated counting house BCMs and BPMs pedestal Calibration run 1329 (35-45 uA) is used. Replaced bcm_an_ds10 pedestal with 20-30 uA current scan Recalculated pedestals using scandata1. (Differences from unser's is 0.4%) --- .../prexCH_beamline_pedestal.1329-.map | 79 +++++++++---------- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/Parity/prminput/prexCH_beamline_pedestal.1329-.map b/Parity/prminput/prexCH_beamline_pedestal.1329-.map index 5fb2bc7e0..a27f88039 100644 --- a/Parity/prminput/prexCH_beamline_pedestal.1329-.map +++ b/Parity/prminput/prexCH_beamline_pedestal.1329-.map @@ -5,48 +5,43 @@ ! Unser calibration based on Run 1214 , HAPLOG 3609 UNSER, -174.1, 2.066e-2 -! Rough BCM calibration from 2uA and 5uA during run 1224. -! bcm_an_us, -634.1, 0.00306062 -! bcm_an_ds, -810.6, 0.00300731 -! bcm_an_ds3, -662.6, 0.00088747 -! bcm_an_ds10, -255.9, 0.00031405 -! Rough Digital BCM Calibration from 2uA to 5uA during run 1230 -! bcm_dg_us, -203, 0.0034084 -! bcm_dg_ds, -656, 0.0033521 - - ! BCM Calibration from run 1329~ 35-45 uA - bcm_an_us, -1071.05, 0.002865 - bcm_an_ds, -1200.81, 0.002696 - bcm_an_ds3, -2630.44, 0.0007971 - bcm_an_ds10, -128224, 0.0002693 - bcm_dg_us, -743.49, 0.002974 - bcm_dg_ds, -1128.54, 0.002957 - - ! BPM pedestal from run 1329 current scan with forced gain at ~35,40,45 - bpm4aXM, -324.659, 1 - bpm4aXP, -81.4201, 1 - bpm4aYM, -110.732, 1 - bpm4aYP, -472.448, 1 - - bpm4eXM, -699.327, 1 - bpm4eXP, 274.168, 1 - bpm4eYM, -371.635, 1 - bpm4eYP, -793.804, 1 - - bpm10XM, 5122.51, 1 - bpm10XP, 2397.43, 1 - bpm10YM, -723.721, 1 - bpm10YP, -7360.86, 1 - - bpm12XM, 857.134, 1 - bpm12XP, -2680.33, 1 - bpm12YM, -1467.09, 1 - bpm12YP, -671.621, 1 - - bpm8XM, -334.326, 1 - bpm8XP, 4442.19, 1 - bpm8YM, 4685.64, 1 - bpm8YP, -652.199, 1 + ! BCM Calibration from run 1329~ 35-45 uA (based on scandata1) +bcm_an_us, -1208.87, 0.002596 +bcm_an_ds, -1337.72, 0.002618 +bcm_an_ds3, -3099.53, 0.000765 + +bcm_dg_us, -868.69, 0.002877 +bcm_dg_ds, -1253.71, 0.002875 + + ! ds10x is saturated at this current range, pedestal is copied from 20-30 uA current scan + bcm_an_ds10, -1811, 0.0002693 + + + ! BPM pedestal from run 1329 current scan with forced gain at ~35,40,45 (based on scandata1) + bpm4aXP, -419.02, 1.0 + bpm4aXM, -576.81, 1.0 + bpm4aYP, -815.71, 1.0 + bpm4aYM, -425.93, 1.0 + + bpm4eXP, -63.29, 1.0 + bpm4eXM, -954.70, 1.0 + bpm4eYP, -1132.21, 1.0 + bpm4eYM, -683.48, 1.0 + + bpm8XP, 4166.56, 1.0 + bpm8XM, -334.28, 1.0 + bpm8YP, -992.76, 1.0 + bpm8YM, 4406.21, 1.0 + + bpm10XP, 2033.10, 1.0 + bpm10XM, 4889.11, 1.0 + bpm10YP, 7129.37, 1.0 + bpm10YM, -1030.66, 1.0 + + bpm12XP, -3053.99, 1.0 + bpm12XM, 544.68, 1.0 + bpm12YP, 357.89, 1.0 + bpm12YM, -1840.35, 1.0 ! cavity BPMs pedestal calibration from zero gain run 1219 From 0ad957f5176bcc1cd2c7f0d6b6fde962958828f2 Mon Sep 17 00:00:00 2001 From: Paul King Date: Tue, 5 Mar 2019 09:17:15 -0500 Subject: [PATCH 061/102] Closing the map file ranges from the 240 Hz running on March 4. --- .../{prex_maindet.1397-.map => prex_maindet.1397-1420.map} | 0 Parity/prminput/{prex_sam.1397-.map => prex_sam.1397-1420.map} | 0 ...{prexinj_beamline.1397-.map => prexinj_beamline.1397-1420.map} | 0 ...{prexinj_helicity.1397-.map => prexinj_helicity.1397-1420.map} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename Parity/prminput/{prex_maindet.1397-.map => prex_maindet.1397-1420.map} (100%) rename Parity/prminput/{prex_sam.1397-.map => prex_sam.1397-1420.map} (100%) rename Parity/prminput/{prexinj_beamline.1397-.map => prexinj_beamline.1397-1420.map} (100%) rename Parity/prminput/{prexinj_helicity.1397-.map => prexinj_helicity.1397-1420.map} (100%) diff --git a/Parity/prminput/prex_maindet.1397-.map b/Parity/prminput/prex_maindet.1397-1420.map similarity index 100% rename from Parity/prminput/prex_maindet.1397-.map rename to Parity/prminput/prex_maindet.1397-1420.map diff --git a/Parity/prminput/prex_sam.1397-.map b/Parity/prminput/prex_sam.1397-1420.map similarity index 100% rename from Parity/prminput/prex_sam.1397-.map rename to Parity/prminput/prex_sam.1397-1420.map diff --git a/Parity/prminput/prexinj_beamline.1397-.map b/Parity/prminput/prexinj_beamline.1397-1420.map similarity index 100% rename from Parity/prminput/prexinj_beamline.1397-.map rename to Parity/prminput/prexinj_beamline.1397-1420.map diff --git a/Parity/prminput/prexinj_helicity.1397-.map b/Parity/prminput/prexinj_helicity.1397-1420.map similarity index 100% rename from Parity/prminput/prexinj_helicity.1397-.map rename to Parity/prminput/prexinj_helicity.1397-1420.map From 24d066cbd594cd800cf3b9832ce105a434d23517 Mon Sep 17 00:00:00 2001 From: Paul King Date: Tue, 5 Mar 2019 13:05:09 -0500 Subject: [PATCH 062/102] Parameter file changes for scalers in the counting house. The CHA 4MHz reference clock was shifted to channel #23 before run 1428. A temporary set of scaler decoding is used to look at the BMOD signals; these should shift to the BMOD decoder class in the near future. --- Parity/prminput/prex_scaler.1428-.map | 21 +++++++++++++++ Parity/prminput/prex_scaler.1428-1430.map | 32 +++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 Parity/prminput/prex_scaler.1428-.map create mode 100644 Parity/prminput/prex_scaler.1428-1430.map diff --git a/Parity/prminput/prex_scaler.1428-.map b/Parity/prminput/prex_scaler.1428-.map new file mode 100644 index 000000000..00cc3482d --- /dev/null +++ b/Parity/prminput/prex_scaler.1428-.map @@ -0,0 +1,21 @@ +ROC=23 +bank=0x2 +! module.type module.num chan.num, det.type, det.name + SIS3801D32, 0, 16, syncscal, chouse_fr + SIS3801D32, 0, 17, syncscal, chouse_f1 + SIS3801D32, 0, 18, syncscal, chouse_f2 + SIS3801D32, 0, 23, syncscal, clock_4mhz + +ROC=25 +bank=0x2 +! module.type module.num chan.num, det.type, det.name + SIS3801D32, 0, 30, syncscal, lhrs_f1 + SIS3801D32, 0, 31, syncscal, lhrs_f2 + +ROC=26 +bank=0x2 +! module.type module.num chan.num, det.type, det.name + SIS3801D32, 0, 30, syncscal, rhrs_f1 + SIS3801D32, 0, 31, syncscal, rhrs_f2 + +!!! Also should be scalers in the injector... diff --git a/Parity/prminput/prex_scaler.1428-1430.map b/Parity/prminput/prex_scaler.1428-1430.map new file mode 100644 index 000000000..7f266d5a2 --- /dev/null +++ b/Parity/prminput/prex_scaler.1428-1430.map @@ -0,0 +1,32 @@ +ROC=23 +bank=0x2 +! module.type module.num chan.num, det.type, det.name + SIS3801D32, 0, 16, syncscal, chouse_fr + SIS3801D32, 0, 17, syncscal, chouse_f1 + SIS3801D32, 0, 18, syncscal, chouse_f2 + SIS3801D32, 0, 23, syncscal, clock_4mhz + +! The following bmod scalers should be removed frmo here and decoded in their own class. + SIS3801D32, 0, 19, syncscal, bmod_trig + SIS3801D32, 0, 24, syncscal, bmod_trim1 + SIS3801D32, 0, 25, syncscal, bmod_trim2 + SIS3801D32, 0, 26, syncscal, bmod_trim3 + SIS3801D32, 0, 27, syncscal, bmod_trim4 + SIS3801D32, 0, 28, syncscal, bmod_trim5 + SIS3801D32, 0, 29, syncscal, bmod_trim6 + SIS3801D32, 0, 30, syncscal, bmod_trim7 + SIS3801D32, 0, 31, syncscal, bmod_trim8 + +ROC=25 +bank=0x2 +! module.type module.num chan.num, det.type, det.name + SIS3801D32, 0, 30, syncscal, lhrs_f1 + SIS3801D32, 0, 31, syncscal, lhrs_f2 + +ROC=26 +bank=0x2 +! module.type module.num chan.num, det.type, det.name + SIS3801D32, 0, 30, syncscal, rhrs_f1 + SIS3801D32, 0, 31, syncscal, rhrs_f2 + +!!! Also should be scalers in the injector... From 0bb00228d52602a19a1440fe59aad987fc6276ca Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 6 Mar 2019 11:34:15 -0500 Subject: [PATCH 063/102] Modified the tree-trim definition for "online" ROOT file production. In the "online" mode root file production, the data processing performance degrades as the root file increases in size. By reducing the number of data words stored in the trees, we can maintain functional performance levels for a larger number of events. The tree-trim file here will allow the "hw_sum" and "Device_Error_Code" leaves from all of the standard beamline devices, and the SAMs to be put into the evt and mul trees. The event processing rate seems to be sufficient to take 30 Hz data, but further trimming would be needed for 240 Hz running. --- Parity/prminput/tree_trim.in | 60 +++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/Parity/prminput/tree_trim.in b/Parity/prminput/tree_trim.in index 6b234efa7..0c9096d2c 100644 --- a/Parity/prminput/tree_trim.in +++ b/Parity/prminput/tree_trim.in @@ -1,24 +1,43 @@ -[HallCBeamLine] +# Wildcard the susbsystem name, but the channel designators +# below are specific to QwBeamLine subsystems. They will +# be used by all QwBeamLine subsystems, irrespective of the name +# If you wanted different behavior for the hall and injector, you'd +# need a block for each of them. +[.*] hw_sum + Device_Error_Code -# -# hw_sum + + hw_sum + Device_Error_Code -# -# hw_sum + + hw_sum + Device_Error_Code + + hw_sum + Device_Error_Code -# -# hw_sum + + hw_sum + Device_Error_Code + + hw_sum + Device_Error_Code -# -# hw_sum +# Wildcard for any subsystems with QwIntegratingPMTs, such +# as the main detectors and SAMs. +[.*] + + hw_sum + Device_Error_Code - -# -# hw_sum + + hw_sum + Device_Error_Code [DEVICELIST] @@ -32,8 +51,19 @@ output_register ps_counter pat_counter pat_phase -cleandata -scandata1 -scandata2 +.*data.* CodaEventNumber CodaEventType + +# Wildcarded patterns to match the beamline element +# branch names in both the evt and mul tree +.*bpm.*X +.*bpm.*Y +.*bpm.*WS +.*bcm_.* +.*cav.*x +.*cav.*y +.*cav.*q + +# Wildcarded pattern for the SAM element branch names +.*sam.* From d5cba97c38aff12c6b0f9fe4d457472a9da4e579 Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 6 Mar 2019 12:56:43 -0500 Subject: [PATCH 064/102] Enabled tree trimming in online_apar.conf --- Parity/prminput/online_apar.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parity/prminput/online_apar.conf b/Parity/prminput/online_apar.conf index 37831f8c1..ca56791e5 100644 --- a/Parity/prminput/online_apar.conf +++ b/Parity/prminput/online_apar.conf @@ -24,7 +24,7 @@ disable-burst-tree = yes enable-burstsum = no enable-differences = no enable-alternateasym = no -enable-tree-trim = no +enable-tree-trim = yes ring.size = 1 ring.stability_cut = 0 From bb1294a28ddc83ef7e788b06005988621e1a7908 Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Wed, 6 Mar 2019 19:07:37 -0500 Subject: [PATCH 065/102] Deleting unneccessary macros that were just a stab at doing too much in a too complicated way. Cameron has copied them to his own work-space and will pursue the macro-as-generic plotter technique developed in exampleMacro2.C instead. APEX has some nice macros that show how to grab a run-number from environment variables in case the macro is being run from within panguin and the run-number integer needs to be obtained for log file printing or for more convenient legend production. This feature can be added at a later time, and requires using shell wrapper scripts that take the -r parameter and set an environment variable with it. --- panguin/macros/Makefile | 5 - panguin/macros/asymmetryPlot_compile.C | 120 ---------------------- panguin/macros/asymmetryPlot_diffs.C | 46 --------- panguin/macros/asymmetryPlot_example.C | 87 ---------------- panguin/macros/asymmetryPlot_vector.C | 35 ------- panguin/macros/asymmetryPlot_wrapper.C | 98 ------------------ panguin/macros/japan_compiled_example.cfg | 62 ----------- 7 files changed, 453 deletions(-) delete mode 100644 panguin/macros/Makefile delete mode 100644 panguin/macros/asymmetryPlot_compile.C delete mode 100644 panguin/macros/asymmetryPlot_diffs.C delete mode 100644 panguin/macros/asymmetryPlot_example.C delete mode 100644 panguin/macros/asymmetryPlot_vector.C delete mode 100644 panguin/macros/asymmetryPlot_wrapper.C delete mode 100644 panguin/macros/japan_compiled_example.cfg diff --git a/panguin/macros/Makefile b/panguin/macros/Makefile deleted file mode 100644 index b00b48672..000000000 --- a/panguin/macros/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -make testComp: - g++ -g -c asymmetryPlot_compile.C -o comp.o `root-config --cflags --glibs` - g++ comp.o -o compTest `root-config --cflags --glibs` - rm comp.o - diff --git a/panguin/macros/asymmetryPlot_compile.C b/panguin/macros/asymmetryPlot_compile.C deleted file mode 100644 index 4eb70adc2..000000000 --- a/panguin/macros/asymmetryPlot_compile.C +++ /dev/null @@ -1,120 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_example(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -#include "TFile.h" -#include "TCanvas.h" -#include -#include -#include -//#include "japantypes.hh" - -int main(int argc, char **argv) -{ - std::string rootfile = "run_1033.root"; - std::string channel = "usr"; - //std::string number = "1111"; - if (argc <= 1 || argc > 3) - { - std::cerr << "Usage: ./compTest char*:rootfileName char*:variable" << std::endl; - exit(0); - } - if (argc >= 2) - { - std::string fileName(argv[1]); - rootfile = fileName; - } - if (argc >= 3) - { - std::string channelName(argv[2]); - channel = channelName; - } - // number = parsed filename, so just the number part. - //int first = 0; - //int last = 99; - //first = rootfile.find("_"); - //last = rootfile.find("."); - //number = rootfile.substr(first+1,last-4).c_str(); - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TFile *oldFile = new TFile(rootfile.c_str(),"READ"); - TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); - TTree *oldEventTree = (TTree*)oldFile->Get("Mps_Tree"); - std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree; - TFile *resultsFile; - //std::string outputFile = Form("second_pass_%s_%s.root",number.c_str(),channel.c_str()); - std::string outputFile = Form("second_pass_%s.root",channel.c_str()); - // Check to see if analysis has been run before - std::ifstream file(outputFile.c_str()); - if(!file){ - // Write a new root file for output - resultsFile = new TFile(outputFile.c_str(),"RECREATE"); - // Create a new tree to store results in - newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - // Make an instance of the struct we need to read the old Tree's data - typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; - } PATTERNASYMS; - PATTERNASYMS patternAsyms; - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - // Save your root tree for later use - resultsFile->Write(); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - // Draw your results - else{ - resultsFile = new TFile(outputFile.c_str(),"READ"); - newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - - delete newPatternTree; - resultsFile->Close(); - delete resultsFile; - delete oldFile; - return 0; -} diff --git a/panguin/macros/asymmetryPlot_diffs.C b/panguin/macros/asymmetryPlot_diffs.C deleted file mode 100644 index a268ed7b7..000000000 --- a/panguin/macros/asymmetryPlot_diffs.C +++ /dev/null @@ -1,46 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Purpose: A script that loops through events in the * - * event-based tree and generates auto-correlations * - * and also estimates the helicity pattern-tree and * - * the alternating-pair-wise ppm asymmetry noise * - * floor for a ~7 volt signal or a mid-range scaler * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" - -void asymmetryPlot(std::string channel) { - - gStyle->SetOptStat(0); - - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); - Int_t numEntries = oldPatternTree->GetEntries(); - std::cout<<"N entries = "<SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - Double_t patternNoises; - TBranch *patternNoisesBranch; - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries-1; j++) { - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - oldPatternTree->GetEntry(j+1); - patternNoises-=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - oldPatternTree->Draw(Form("asym_%s",channel.c_str())); - newPatternTree->SetLineColor(2); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str()),"","same"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); -} diff --git a/panguin/macros/asymmetryPlot_example.C b/panguin/macros/asymmetryPlot_example.C deleted file mode 100644 index bcd99f6c8..000000000 --- a/panguin/macros/asymmetryPlot_example.C +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_example(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -//#include "japantypes.hh" - -void asymmetryPlot_example(std::string channel) { - - gStyle->SetOptStat(0); - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TFile *oldFile = gFile; - TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); - std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree; - TFile *resultsFile; - std::string outputFile = Form("second_pass_%s.root",channel.c_str()); - // Check to see if analysis has been run before - if(gSystem->AccessPathName(outputFile.c_str())){ - // Write a new root file for output - resultsFile = new TFile(outputFile.c_str(),"RECREATE"); - // Create a new tree to store results in - newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - // Make an instance of the struct we need to read the old Tree's data - typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; - } PATTERNASYMS; - PATTERNASYMS patternAsyms; - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - // Save your root tree for later use - resultsFile->Write(); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - // Draw your results - else{ - resultsFile = new TFile(outputFile.c_str(),"READ"); - newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - - delete newPatternTree; - resultsFile->Close(); - delete resultsFile; - gFile=oldFile; -} diff --git a/panguin/macros/asymmetryPlot_vector.C b/panguin/macros/asymmetryPlot_vector.C deleted file mode 100644 index e2fb01633..000000000 --- a/panguin/macros/asymmetryPlot_vector.C +++ /dev/null @@ -1,35 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Purpose: A script that loops through events in the * - * event-based tree and generates auto-correlations * - * and also estimates the helicity pattern-tree and * - * the alternating-pair-wise ppm asymmetry noise * - * floor for a ~7 volt signal or a mid-range scaler * - * * - **************************************************************/ - -#include -#include -#include "TTree.h" - -void asymmetryPlot(std::string channel) { - - gStyle->SetOptStat(0); - - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); - TTree *newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - std::vector < Double_t > *patternAsyms = 0; - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()) , &patternAsyms ); - - // Calculate noise floor from pattern tree directly, no steps for this - std::vector < Double_t > *patternNoises; - newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (size_t i = 0; i < oldPatternTree->GetEntries(); i++) { - oldPatternTree->GetEntry(i); - patternNoises->push_back(patternAsyms->at(patternAsyms->size()-1)); - } - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); -} diff --git a/panguin/macros/asymmetryPlot_wrapper.C b/panguin/macros/asymmetryPlot_wrapper.C deleted file mode 100644 index 86f85cdf0..000000000 --- a/panguin/macros/asymmetryPlot_wrapper.C +++ /dev/null @@ -1,98 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_example(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -//#include "japantypes.hh" - -void asymmetryPlot_wrapper(std::string channel) { - - gStyle->SetOptStat(0); - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TFile *oldFile = gFile; - TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); - //std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree; - TFile *resultsFile; - - //std::string number = "1111"; - - //number = dir.substr(dir.find("_")+1,4).c_str(); - //std::string outputFile = Form("second_pass_%s_%s.root",number.c_str(),channel.c_str()); - std::string outputFile = Form("second_pass_%s.root",channel.c_str()); - //gSystem->Exec(Form("CURRENT_RUN=%s"),dir.substr(dir.find("_")+1,4).c_str()); - - // Check to see if analysis has been run before - //gSystem->Exec(Form("ln -sf ${QW_ROOTFILES}/prex*%s.root run_%s.root",number.c_str(),number.c_str())); - //gSystem->Exec(Form("./compTest run_%s.root %s",number.c_str(),channel.c_str())); - gSystem->Exec(Form("./compTest run.root %s",channel.c_str())); - if(gSystem->AccessPathName(outputFile.c_str())){ - // Write a new root file for output - resultsFile = new TFile(outputFile.c_str(),"RECREATE"); - // Create a new tree to store results in - newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - // Make an instance of the struct we need to read the old Tree's data - typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; - } PATTERNASYMS; - PATTERNASYMS patternAsyms; - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - // Save your root tree for later use - resultsFile->Write(); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - // Draw your results - else{ - resultsFile = new TFile(outputFile.c_str(),"READ"); - newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - - delete newPatternTree; - resultsFile->Close(); - delete resultsFile; - //delete dir; - gFile=oldFile; -} diff --git a/panguin/macros/japan_compiled_example.cfg b/panguin/macros/japan_compiled_example.cfg deleted file mode 100644 index cfca5b5fc..000000000 --- a/panguin/macros/japan_compiled_example.cfg +++ /dev/null @@ -1,62 +0,0 @@ -# Configuration file for the online GUI -# This file is for ADCs -# All lines containing "#" are treated as comments (ignored) -# Last line MUST be blank. -# Multiple spaces are treated as one space. -# To switch to log scale, add the option logy after the name of -# the histogram - -# Valid entries include: -# To create a new TCanvas with a set number of plots in it -# Specify with: newpage [x] [y] [TCanvas options] -# Tree drawing -# Specify with: -# Variable drawing -# Specify with: [variables] [cuts] -type [type] -title [title] -tree [tree name] -# Page title setting: -# Specify with: title Your Title Here -# Macro execution -# Specify with: macro path/to/macro.C(options) -# Additional options: -# -noshow golden - -# Default root file to look at -#rootfile pan.root -#goldenrootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -##rootfile /dev/shm/QwMemMapFile.map - -# Prototype rootfilename.. overrides GetRootFileName.C - ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root -#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root - -# Defined cuts -definecut evcut (event_number>1) -definecut bcmds_cut (-1*bcm_ds>1) - -# Uncomment the below line to monitor the fill of a ROOTfile. -#watchfile - -newpage 1 2 - title Color Test - yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type * - macro ./macros/setPlotStyle.C() - yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type COLZ - -newpage 2 2 - title Noise Floor Test - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch7") - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch6") - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch5") - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch4") - -newpage 2 4 - title Noise Floor Test - macro ./macros/asymmetryPlot_wrapper.C("sam1") - macro ./macros/asymmetryPlot_wrapper.C("sam2") - macro ./macros/asymmetryPlot_wrapper.C("sam3") - macro ./macros/asymmetryPlot_wrapper.C("sam4") - macro ./macros/asymmetryPlot_wrapper.C("sam5") - macro ./macros/asymmetryPlot_wrapper.C("sam6") - macro ./macros/asymmetryPlot_wrapper.C("sam7") - macro ./macros/asymmetryPlot_wrapper.C("sam8") From 5d68a227a0f51e6521df39c39487d0c2113c54af Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Wed, 6 Mar 2019 19:09:12 -0500 Subject: [PATCH 066/102] Some config and macro updates from Cameron --- panguin/macros/asymmetryPlot_modular.C | 4 +-- panguin/macros/exampleMacro2.C | 1 - panguin/macros/sams.cfg | 49 +++++++++++++++----------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/panguin/macros/asymmetryPlot_modular.C b/panguin/macros/asymmetryPlot_modular.C index 197c29e3b..9e4617734 100644 --- a/panguin/macros/asymmetryPlot_modular.C +++ b/panguin/macros/asymmetryPlot_modular.C @@ -29,12 +29,12 @@ void asymmetryPlot_modular(std::string channel) { // Make an instance of the relevant data type's struct PATTERNASYMS patternAsyms; - std::string tree = "Hel_Tree"; + std::string tree = "mul"; std::string modifier = "noise"; std::string description = "Tree of Pattern based noise"; // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); + TTree *oldPatternTree = (TTree*)gDirectory->Get("mul"); // Assign that instance to the new ROOT tree's branch location of interest oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); // Make a new ROOT tree to store the new data in (this is just an academic example) diff --git a/panguin/macros/exampleMacro2.C b/panguin/macros/exampleMacro2.C index 6be1bbea2..de99eb2e7 100644 --- a/panguin/macros/exampleMacro2.C +++ b/panguin/macros/exampleMacro2.C @@ -2,7 +2,6 @@ #include #include #include "TTree.h" -#include "japantypes.hh" void exampleMacro2(std::string title, std::string draws, std::string cuts,int binsx, double binlowx, double binhighx, int binsy, double binlowy, double binhighy){ gStyle->SetOptStat(0); diff --git a/panguin/macros/sams.cfg b/panguin/macros/sams.cfg index 32b3271a2..55723de72 100644 --- a/panguin/macros/sams.cfg +++ b/panguin/macros/sams.cfg @@ -26,27 +26,34 @@ definecut bcmds_cut (-1*bcm_ds>1) newpage 2 4 title SAMs test - sam1.hw_sum:CodaEventNumber>>g1 cuts -tree evt -type . -title Volts vs Event - sam2.hw_sum:CodaEventNumber>>g2 cuts -tree evt -type . -title Volts vs Event - sam3.hw_sum:CodaEventNumber>>g3 cuts -tree evt -type . -title Volts vs Event - sam4.hw_sum:CodaEventNumber>>g4 cuts -tree evt -type . -title Volts vs Event - sam5.hw_sum:CodaEventNumber>>g5 cuts -tree evt -type . -title Volts vs Event - sam6.hw_sum:CodaEventNumber>>g6 cuts -tree evt -type . -title Volts vs Event - sam7.hw_sum:CodaEventNumber>>g7 cuts -tree evt -type . -title Volts vs Event - sam8.hw_sum:CodaEventNumber>>g8 cuts -tree evt -type . -title Volts vs Event + sam1.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam2.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam3.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam4.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam5.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam6.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam7.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam8.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event newpage 2 4 title SAMs PPM noise floor signal - yield_sam1>>h1 evcut -tree mul -title yield_sam1 - yield_sam2>>h2 evcut -tree mul -title yield_sam2 - yield_sam3>>h3 evcut -tree mul -title yield_sam3 - yield_sam4>>h4 evcut -tree mul -title yield_sam4 - yield_sam5>>h5 evcut -tree mul -title yield_sam5 - yield_sam6>>h6 evcut -tree mul -title yield_sam6 - yield_sam7>>h7 evcut -tree mul -title yield_sam7 - yield_sam8>>h8 evcut -tree mul -title yield_sam8 - -newpage 1 2 - title BPM BCM - yield_bcm_an_ds10:pattern_number>>b1(100,0,nentries,100,0,6) evcut -tree mul -type . -title yield_bcm_an_ds10 vs pattern_number - yield_bpm4eY:yield_bpm4eX>>b2(100,-2.5,1,100,-2,4) evcut -tree mul -type . -title yield_bpm4eY vs yield_bpm4eX + yield_sam1 evcut -tree mul -title "yield_sam1" + yield_sam2 evcut -tree mul -title "yield_sam2" + yield_sam3 evcut -tree mul -title "yield_sam3" + yield_sam4 evcut -tree mul -title "yield_sam4" + yield_sam5 evcut -tree mul -title "yield_sam5" + yield_sam6 evcut -tree mul -title "yield_sam6" + yield_sam7 evcut -tree mul -title "yield_sam7" + yield_sam8 evcut -tree mul -title "yield_sam8 test" + +newpage 2 4 + title SAMs raw-adc_channels + sam1.hw_sum_raw/sam1.num_samples:CodaEventNumber cuts -tree evt -type l + sam2.hw_sum_raw/sam2.num_samples:CodaEventNumber cuts -tree evt -type l + sam3.hw_sum_raw/sam3.num_samples:CodaEventNumber cuts -tree evt -type l + sam4.hw_sum_raw/sam4.num_samples:CodaEventNumber cuts -tree evt -type l + sam5.hw_sum_raw/sam5.num_samples:CodaEventNumber cuts -tree evt -type l + sam6.hw_sum_raw/sam5.num_samples:CodaEventNumber cuts -tree evt -type l + sam7.hw_sum_raw/sam6.num_samples:CodaEventNumber cuts -tree evt -type l + sam8.hw_sum_raw/sam7.num_samples:CodaEventNumber cuts -tree evt -type l + From 9d99837a136d9345464495bacc8307b18a1e4e9d Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Wed, 6 Mar 2019 19:10:53 -0500 Subject: [PATCH 067/102] I'm committing the config files that other people have produced in the last few days. This commit is not verified that all constituents are necessarily useful, but they have been used by at least Robert and Sakib --- panguin/macros/bcm_calibrated.cfg | 47 ++++++++++++ panguin/macros/bcm_raw.cfg | 46 ++++++++++++ panguin/macros/bpm4_e_a_calibrated.cfg | 54 ++++++++++++++ panguin/macros/bpm4_e_a_raw.cfg | 48 ++++++++++++ .../macros/bpm8_bpm10_bpm12_calibrated.cfg | 73 +++++++++++++++++++ panguin/macros/bpm8_bpm10_bpm12_raw.cfg | 73 +++++++++++++++++++ panguin/macros/cavities_calibrated.cfg | 48 ++++++++++++ panguin/macros/noStatBox.C | 6 ++ 8 files changed, 395 insertions(+) create mode 100644 panguin/macros/bcm_calibrated.cfg create mode 100644 panguin/macros/bcm_raw.cfg create mode 100644 panguin/macros/bpm4_e_a_calibrated.cfg create mode 100644 panguin/macros/bpm4_e_a_raw.cfg create mode 100644 panguin/macros/bpm8_bpm10_bpm12_calibrated.cfg create mode 100644 panguin/macros/bpm8_bpm10_bpm12_raw.cfg create mode 100644 panguin/macros/cavities_calibrated.cfg create mode 100644 panguin/macros/noStatBox.C diff --git a/panguin/macros/bcm_calibrated.cfg b/panguin/macros/bcm_calibrated.cfg new file mode 100644 index 000000000..030a81050 --- /dev/null +++ b/panguin/macros/bcm_calibrated.cfg @@ -0,0 +1,47 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BCM vs event number and some correlations from the mul tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title BCMs + macro ./macros/noStatBox.C() + yield_bcm0l02 ErrorFlag==0 -tree mul -title "BCM 0l02" + yield_bcm_an_us ErrorFlag==0 -tree mul -title "BCM AN Upstream" + yield_bcm_dg_us ErrorFlag==0 -tree mul -title "BCM DG Upstream" + yield_bcm_an_ds ErrorFlag==0 -tree mul -title "BCM AN Downstream" + yield_bcm_dg_ds ErrorFlag==0 -tree mul -title "BCM DG Downstream" + yield_bcm_an_ds3 ErrorFlag==0 -tree mul -title "BCM3 Downstream" + yield_bcm_an_ds10 ErrorFlag==0 -tree mul -title "BCM10 Downstream" + +newpage 1 3 + title BCM vs Time Upstream + yield_bcm0l02:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM 0l02 vs Entry Number" + yield_bcm_an_us:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM AN Upstream vs Entry Number" + yield_bcm_dg_us:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM DG Upstream vs Entry Number" + +newpage 1 4 + title BCM vs Time Downstream + yield_bcm_an_ds:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM AN Downstream vs Entry Number" + yield_bcm_dg_ds:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM DG Downstream vs Entry Number" + yield_bcm_an_ds3:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM3 Downstream vs Entry Number" + yield_bcm_an_ds10:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM10 Downstream vs Entry Number" + +newpage 1 2 + title BCM Upstream:Downstream Correlations + #yield_bcm_an_us:yield_bcm_an_ds ErrorFlag==0 -type . -tree mul -title BCM AN: "Upstream vs Downstream" + macro ../../../rradloff/FindCorrelation.C(\"mul\",\"yield_bcm_an_us\",\"yield_bcm_an_ds\",\"ErrorFlag == 0\",true,true) + yield_bcm_dg_us:yield_bcm_dg_ds ErrorFlag==0 -type . -tree mul -title BCM DG: "Upstream vs Downstream" diff --git a/panguin/macros/bcm_raw.cfg b/panguin/macros/bcm_raw.cfg new file mode 100644 index 000000000..1bcafd032 --- /dev/null +++ b/panguin/macros/bcm_raw.cfg @@ -0,0 +1,46 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BCM vs event number and some correlations from the evt tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title BCMs + macro ./macros/noStatBox.C() + bcm0l02 ErrorFlag==0 -tree evt -title "BCM 0l02" + bcm_an_us ErrorFlag==0 -tree evt -title "BCM AN Upstream" + bcm_dg_us ErrorFlag==0 -tree evt -title "BCM DG Upstream" + bcm_an_ds ErrorFlag==0 -tree evt -title "BCM AN Downstream" + bcm_dg_ds ErrorFlag==0 -tree evt -title "BCM DG Downstream" + bcm_an_ds3 ErrorFlag==0 -tree evt -title "BCM3 Downstream" + bcm_an_ds10 ErrorFlag==0 -tree evt -title "BCM10 Downstream" + +newpage 1 3 + title BCM vs Time Upstream + bcm0l02:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM 0l02 vs Entry Number" + bcm_an_us:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM AN Upstream vs Entry Number" + bcm_dg_us:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM DG Upstream vs Entry Number" + +newpage 1 4 + title BCM vs Time Downstream + bcm_an_ds:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM AN Downstream vs Entry Number" + bcm_dg_ds:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM DG Downstream vs Entry Number" + bcm_an_ds3:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM3 Downstream vs Entry Number" + bcm_an_ds10:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM10 Downstream vs Entry Number" + +newpage 1 2 + title BCM Upstream:Downstream Correlations + bcm_an_us:bcm_an_ds ErrorFlag==0 -type . -tree evt -title BCM AN: "Upstream vs Downstream" + bcm_dg_us:bcm_dg_ds ErrorFlag==0 -type . -tree evt -title BCM DG: "Upstream vs Downstream" diff --git a/panguin/macros/bpm4_e_a_calibrated.cfg b/panguin/macros/bpm4_e_a_calibrated.cfg new file mode 100644 index 000000000..556968893 --- /dev/null +++ b/panguin/macros/bpm4_e_a_calibrated.cfg @@ -0,0 +1,54 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BPM4 vs event number and some correlations from the mul tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 2 + title BPMs: x, y, and WS + macro ./macros/noStatBox.C() + yield_bpm4eX ErrorFlag==0 -tree mul -title "BPM4e X" + yield_bpm4eY ErrorFlag==0 -tree mul -title "BPM4e Y" + yield_bpm4eWS ErrorFlag==0 -tree mul -title "BPM4e WS" + yield_bpm4aX ErrorFlag==0 -tree mul -title "BPM4s X" + yield_bpm4aY ErrorFlag==0 -tree mul -title "BPM4a Y" + yield_bpm4aWS ErrorFlag==0 -tree mul -title "BPM4a WS" + +newpage 1 3 + title BPM4e vs Time + yield_bpm4eX:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4e X vs Entry Number" + yield_bpm4eY:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4e Y vs Entry Number" + yield_bpm4eWS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4e WS vs Entry Number" + +newpage 1 3 + title BPM4a vs Time + yield_bpm4aX:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4a X vs Entry Number" + yield_bpm4aY:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4a Y vs Entry Number" + yield_bpm4aWS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4a WS vs Entry Number" + +newpage 1 3 + title BPM4 a:e Correlations + yield_bpm4aX:yield_bpm4eX ErrorFlag==0 -type . -tree mul -title "BPM4a X vs BPM4e X" + yield_bpm4aY:yield_bpm4eY ErrorFlag==0 -type . -tree mul -title "BPM4a Y vs BPM4e Y" + yield_bpm4aWS:yield_bpm4eWS ErrorFlag==0 -type . -tree mul -title "BPM4a WS vs BPM4e WS" + +newpage 3 2 + title BPM4 X:Y, Y:WS, and WS:X Correlations + yield_bpm4aX:yield_bpm4aY ErrorFlag==0 -type . -tree mul -title "BPM4a X vs Y" + yield_bpm4aY:yield_bpm4aWS ErrorFlag==0 -type . -tree mul -title "BPM4a Y vs WS" + yield_bpm4aWS:yield_bpm4aX ErrorFlag==0 -type . -tree mul -title "BPM4a WS vs X" + yield_bpm4eX:yield_bpm4eY ErrorFlag==0 -type . -tree mul -title "BPM4e X vs Y" + yield_bpm4eY:yield_bpm4eWS ErrorFlag==0 -type . -tree mul -title "BPM4e Y vs WS" + yield_bpm4eWS:yield_bpm4eX ErrorFlag==0 -type . -tree mul -title "BPM4e WS vs X" diff --git a/panguin/macros/bpm4_e_a_raw.cfg b/panguin/macros/bpm4_e_a_raw.cfg new file mode 100644 index 000000000..20f56829b --- /dev/null +++ b/panguin/macros/bpm4_e_a_raw.cfg @@ -0,0 +1,48 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BPM4 vs event number and some correlations from the evt tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 2 + title BPMs: x, y, and WS + macro ./macros/noStatBox.C() + bpm4eX ErrorFlag==0 -tree evt -title "BPM4e X" + bpm4eY ErrorFlag==0 -tree evt -title "BPM4e Y" + bpm4eWS ErrorFlag==0 -tree evt -title "BPM4e WS" + bpm4aX ErrorFlag==0 -tree evt -title "BPM4s X" + bpm4aY ErrorFlag==0 -tree evt -title "BPM4a Y" + bpm4aWS ErrorFlag==0 -tree evt -title "BPM4a WS" + +newpage 1 3 + title BPM4a vs Time + bpm4aX:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM4a X vs Entry Number" + bpm4aY:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM4a Y vs Entry Number" + bpm4aWS:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM4a WS vs Entry Number" + +newpage 1 3 + title BPM4 a:e Correlations + bpm4aX:bpm4eX ErrorFlag==0 -type . -tree evt -title "BPM4a X vs BPM4e X" + bpm4aY:bpm4eY ErrorFlag==0 -type . -tree evt -title "BPM4a Y vs BPM4e Y" + bpm4aWS:bpm4eWS ErrorFlag==0 -type . -tree evt -title "BPM4a WS vs BPM4e WS" + +newpage 3 2 + title BPM4 X:Y, Y:WS, and WS:X Correlations + bpm4aX:bpm4aY ErrorFlag==0 -type . -tree evt -title "BPM4a X vs Y" + bpm4aY:bpm4aWS ErrorFlag==0 -type . -tree evt -title "BPM4a Y vs WS" + bpm4aWS:bpm4aX ErrorFlag==0 -type . -tree evt -title "BPM4a WS vs X" + bpm4eX:bpm4eY ErrorFlag==0 -type . -tree evt -title "BPM4e X vs Y" + bpm4eY:bpm4eWS ErrorFlag==0 -type . -tree evt -title "BPM4e Y vs WS" + bpm4eWS:bpm4eX ErrorFlag==0 -type . -tree evt -title "BPM4e WS vs X" diff --git a/panguin/macros/bpm8_bpm10_bpm12_calibrated.cfg b/panguin/macros/bpm8_bpm10_bpm12_calibrated.cfg new file mode 100644 index 000000000..98ac628b5 --- /dev/null +++ b/panguin/macros/bpm8_bpm10_bpm12_calibrated.cfg @@ -0,0 +1,73 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BPM8, BPM10, and BPM12 vs event number and some correlations // +#// from the mul tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title BPMs 8, 10, and 12: x, y, and WS + macro ./macros/noStatBox.C() + yield_bpm8X ErrorFlag==0 -tree mul -title "BPM8 X" + yield_bpm8Y ErrorFlag==0 -tree mul -title "BPM8 Y" + yield_bpm8WS ErrorFlag==0 -tree mul -title "BPM8 WS" + yield_bpm10X ErrorFlag==0 -tree mul -title "BPM10 X" + yield_bpm10Y ErrorFlag==0 -tree mul -title "BPM10 Y" + yield_bpm10WS ErrorFlag==0 -tree mul -title "BPM10 WS" + yield_bpm12X ErrorFlag==0 -tree mul -title "BPM12 X" + yield_bpm12Y ErrorFlag==0 -tree mul -title "BPM12 Y" + yield_bpm12WS ErrorFlag==0 -tree mul -title "BPM12 WS" + +newpage 1 3 + title BPM8 vs Time + yield_bpm8X:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM8 X vs Entry Number" + yield_bpm8Y:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM8 Y vs Entry Number" + yield_bpm8WS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM8 WS vs Entry Number" + +newpage 1 3 + title BPM10 vs Time + yield_bpm10X:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM10 X vs Entry Number" + yield_bpm10Y:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM10 Y vs Entry Number" + yield_bpm10WS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM10 WS vs Entry Number" + +newpage 1 3 + title BPM12 vs Time + yield_bpm12X:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM12 X vs Entry Number" + yield_bpm12Y:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM12 Y vs Entry Number" + yield_bpm12WS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM12 WS vs Entry Number" + +newpage 3 3 + title BPM 8:10, 10:12, and 12:8 Correlations + yield_bpm8X:yield_bpm10X ErrorFlag==0 -type . -tree mul -title "BPM8 X vs BPM10 X" + yield_bpm10X:yield_bpm12X ErrorFlag==0 -type . -tree mul -title "BPM10 X vs BPM12 X" + yield_bpm12X:yield_bpm8X ErrorFlag==0 -type . -tree mul -title "BPM12 X vs BPM8 X" + yield_bpm8Y:yield_bpm10Y ErrorFlag==0 -type . -tree mul -title "BPM8 Y vs BPM10 Y" + yield_bpm10Y:yield_bpm12Y ErrorFlag==0 -type . -tree mul -title "BPM10 Y vs BPM12 Y" + yield_bpm12Y:yield_bpm8Y ErrorFlag==0 -type . -tree mul -title "BPM12 Y vs BPM8 Y" + yield_bpm8WS:yield_bpm10WS ErrorFlag==0 -type . -tree mul -title "BPM8 WS vs BPM10 WS" + yield_bpm10WS:yield_bpm12WS ErrorFlag==0 -type . -tree mul -title "BPM10 WS vs BPM12 WS" + yield_bpm12WS:yield_bpm8WS ErrorFlag==0 -type . -tree mul -title "BPM12 WS vs BPM8 WS" + +newpage 3 3 + title BPM X:Y, Y:WS, and WS:X Correlations + yield_bpm8X:yield_bpm8Y ErrorFlag==0 -type . -tree mul -title "BPM8 X vs BPM8 Y" + yield_bpm8Y:yield_bpm8WS ErrorFlag==0 -type . -tree mul -title "BPM8 Y vs BPM8 WS" + yield_bpm8WS:yield_bpm8X ErrorFlag==0 -type . -tree mul -title "BPM8 WS vs BPM8 X" + yield_bpm10X:yield_bpm10Y ErrorFlag==0 -type . -tree mul -title "BPM10 X vs BPM10 Y" + yield_bpm10Y:yield_bpm10WS ErrorFlag==0 -type . -tree mul -title "BPM10 Y vs BPM10 WS" + yield_bpm10WS:yield_bpm10X ErrorFlag==0 -type . -tree mul -title "BPM10 WS vs BPM10 X" + yield_bpm12X:yield_bpm12Y ErrorFlag==0 -type . -tree mul -title "BPM12 X vs BPM12 Y" + yield_bpm12Y:yield_bpm12WS ErrorFlag==0 -type . -tree mul -title "BPM12 Y vs BPM12 WS" + yield_bpm12WS:yield_bpm12X ErrorFlag==0 -type . -tree mul -title "BPM12 WS vs BPM12 X" diff --git a/panguin/macros/bpm8_bpm10_bpm12_raw.cfg b/panguin/macros/bpm8_bpm10_bpm12_raw.cfg new file mode 100644 index 000000000..ae8b69bd3 --- /dev/null +++ b/panguin/macros/bpm8_bpm10_bpm12_raw.cfg @@ -0,0 +1,73 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BPM8, BPM10, and BPM12 vs event number and some correlations // +#// from the evt tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title BPMs 8, 10, and 12: x, y, and WS + macro ./macros/noStatBox.C() + bpm8X ErrorFlag==0 -tree evt -title "BPM8 X" + bpm8Y ErrorFlag==0 -tree evt -title "BPM8 Y" + bpm8WS ErrorFlag==0 -tree evt -title "BPM8 WS" + bpm10X ErrorFlag==0 -tree evt -title "BPM10 X" + bpm10Y ErrorFlag==0 -tree evt -title "BPM10 Y" + bpm10WS ErrorFlag==0 -tree evt -title "BPM10 WS" + bpm12X ErrorFlag==0 -tree evt -title "BPM12 X" + bpm12Y ErrorFlag==0 -tree evt -title "BPM12 Y" + bpm12WS ErrorFlag==0 -tree evt -title "BPM12 WS" + +newpage 1 3 + title BPM8 vs Time + bpm8X:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM8 X vs Entry Number" + bpm8Y:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM8 Y vs Entry Number" + bpm8WS:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM8 WS vs Entry Number" + +newpage 1 3 + title BPM10 vs Time + bpm10X:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM10 X vs Entry Number" + bpm10Y:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM10 Y vs Entry Number" + bpm10WS:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM10 WS vs Entry Number" + +newpage 1 3 + title BPM12 vs Time + bpm12X:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM12 X vs Entry Number" + bpm12Y:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM12 Y vs Entry Number" + bpm12WS:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM12 WS vs Entry Number" + +newpage 3 3 + title BPM 8:10, 10:12, and 12:8 Correlations + bpm8X:bpm10X ErrorFlag==0 -type . -tree evt -title "BPM8 X vs BPM10 X" + bpm10X:bpm12X ErrorFlag==0 -type . -tree evt -title "BPM10 X vs BPM12 X" + bpm12X:bpm8X ErrorFlag==0 -type . -tree evt -title "BPM12 X vs BPM8 X" + bpm8Y:bpm10Y ErrorFlag==0 -type . -tree evt -title "BPM8 Y vs BPM10 Y" + bpm10Y:bpm12Y ErrorFlag==0 -type . -tree evt -title "BPM10 Y vs BPM12 Y" + bpm12Y:bpm8Y ErrorFlag==0 -type . -tree evt -title "BPM12 Y vs BPM8 Y" + bpm8WS:bpm10WS ErrorFlag==0 -type . -tree evt -title "BPM8 WS vs BPM10 WS" + bpm10WS:bpm12WS ErrorFlag==0 -type . -tree evt -title "BPM10 WS vs BPM12 WS" + bpm12WS:bpm8WS ErrorFlag==0 -type . -tree evt -title "BPM12 WS vs BPM8 WS" + +newpage 3 3 + title BPM X:Y, Y:WS, and WS:X Correlations + bpm8X:bpm8Y ErrorFlag==0 -type . -tree evt -title "BPM8 X vs BPM8 Y" + bpm8Y:bpm8WS ErrorFlag==0 -type . -tree evt -title "BPM8 Y vs BPM8 WS" + bpm8WS:bpm8X ErrorFlag==0 -type . -tree evt -title "BPM8 WS vs BPM8 X" + bpm10X:bpm10Y ErrorFlag==0 -type . -tree evt -title "BPM10 X vs BPM10 Y" + bpm10Y:bpm10WS ErrorFlag==0 -type . -tree evt -title "BPM10 Y vs BPM10 WS" + bpm10WS:bpm10X ErrorFlag==0 -type . -tree evt -title "BPM10 WS vs BPM10 X" + bpm12X:bpm12Y ErrorFlag==0 -type . -tree evt -title "BPM12 X vs BPM12 Y" + bpm12Y:bpm12WS ErrorFlag==0 -type . -tree evt -title "BPM12 Y vs BPM12 WS" + bpm12WS:bpm12X ErrorFlag==0 -type . -tree evt -title "BPM12 WS vs BPM12 X" diff --git a/panguin/macros/cavities_calibrated.cfg b/panguin/macros/cavities_calibrated.cfg new file mode 100644 index 000000000..c8192b6fc --- /dev/null +++ b/panguin/macros/cavities_calibrated.cfg @@ -0,0 +1,48 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting Cavity Yields vs event number and some correlations from the mul tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title Cav4 B, C, and D: x, y, and q + macro ./macros/noStatBox.C() + yield_cav4bx ErrorFlag==0 -tree mul -title "Cavity Bx" + yield_cav4by ErrorFlag==0 -tree mul -title "Cavity By" + yield_cav4bq ErrorFlag==0 -tree mul -title "Cavity Bq" + yield_cav4cx ErrorFlag==0 -tree mul -title "Cavity Cx" + yield_cav4cy ErrorFlag==0 -tree mul -title "Cavity Cy" + yield_cav4cq ErrorFlag==0 -tree mul -title "Cavity Cq" + yield_cav4dx ErrorFlag==0 -tree mul -title "Cavity Dx" + yield_cav4dy ErrorFlag==0 -tree mul -title "Cavity Dy" + yield_cav4dq ErrorFlag==0 -tree mul -title "Cavity Dq" + +newpage 1 3 + title Cav4B vs Time + yield_cav4bx:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Bx vs Entry Number" + yield_cav4by:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity By vs Entry Number" + yield_cav4bq:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Bq vs Entry Number" + +newpage 1 3 + title Cav4C vs Time + yield_cav4cx:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Cx vs Entry Number" + yield_cav4cy:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Cy vs Entry Number" + yield_cav4cq:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Cq vs Entry Number" + +newpage 1 3 + title Cav4D vs Time + yield_cav4dx:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Dx vs Entry Number" + yield_cav4dy:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Dy vs Entry Number" + yield_cav4dq:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Dq vs Entry Number" diff --git a/panguin/macros/noStatBox.C b/panguin/macros/noStatBox.C new file mode 100644 index 000000000..f5ce8110f --- /dev/null +++ b/panguin/macros/noStatBox.C @@ -0,0 +1,6 @@ +void noStatBox() +{ + gStyle->SetOptStat(0); + gROOT->ForceStyle(); + gPad->Close(); +} From 3a114d0a019ad6567edc622dfe2776cee3d009fd Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Wed, 6 Mar 2019 19:15:41 -0500 Subject: [PATCH 068/102] Cameron's updates to try to achieve user-title setting in individual plots. Doesn't work and so is commented out. --- panguin/src/panguinOnline.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index e5ab33476..5bd099519 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -304,7 +304,9 @@ void OnlineGUI::DoDraw() // Draw the histograms. for(UInt_t i=0; iGetDrawCommand(current_page,i); - fCanvas->cd(i+1); + // Create a TVirtualPad to allow for later updating after applying user-set + // title - doesn't work for all sub-pads - Cameron 3/6/2019 + //TVirtualPad *pd = fCanvas->cd(i+1); if (drawcommand[0] == "macro") { MacroDraw(drawcommand); } else if (IsHistogram(drawcommand[0])) { @@ -312,6 +314,8 @@ void OnlineGUI::DoDraw() } else { TreeDraw(drawcommand); } + // Pad update only works on first pad in panguin page - Cameron 3/6/2019 + //pd->Update(); } fCanvas->cd(); @@ -881,6 +885,9 @@ void OnlineGUI::TreeDraw(vector command) { if(!command[3].IsNull()) { TH1* thathist = (TH1*)hobj; thathist->SetTitle(command[3]); +// Update the canvas to print the user-set title - doesn't work this way - Cameron 3/6/2019 +// thathist->Update(); +// fCanvas->Update(); } } else { BadDraw("Empty Histogram"); From f919009e3c2304a30946275e03627ccbf0af2815 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Wed, 6 Mar 2019 21:11:59 -0500 Subject: [PATCH 069/102] Updated CH BCMs and BPMs pedestals based on calibration run 1404 ( 25-35 uA) --- .../prexCH_beamline_pedestal.1378-.map | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Parity/prminput/prexCH_beamline_pedestal.1378-.map diff --git a/Parity/prminput/prexCH_beamline_pedestal.1378-.map b/Parity/prminput/prexCH_beamline_pedestal.1378-.map new file mode 100644 index 000000000..d51a46c4c --- /dev/null +++ b/Parity/prminput/prexCH_beamline_pedestal.1378-.map @@ -0,0 +1,58 @@ +! adc sample size 16564 +!---- +!END + +! Unser calibration based on Run 1214 , HAPLOG 3609 +UNSER, -174.1, 2.066e-2 + + ! BCM Calibration from run 1404 ~25-35 uA (based on scandata1) + bcm_an_us, -947.98, 0.002659 + bcm_an_ds, -1089.09, 0.002672 + bcm_an_ds3, -2241.89, 0.000781 + bcm_dg_us, -696.86, 0.002906 + bcm_dg_ds, -1126.92, 0.002889 + + ! ds10x is saturated at this current range, pedestal is copied from 20-30 uA current scan + bcm_an_ds10, -1811, 0.0002693 + + + ! BPM pedestal from run 1404 current scan with forced gain at ~25,30,35 (based on scandata1) + + bpm4aXP, -56.07, 1.0 + bpm4aXM, -225.61, 1.0 + bpm4aYP, 16.17, 1.0 + bpm4aYM, -449.68, 1.0 + + bpm4eXP, 366.29, 1.0 + bpm4eXM, -402.58, 1.0 + bpm4eYP, -132.63, 1.0 + bpm4eYM, -548.23, 1.0 + + bpm8XP, 2772.13, 1.0 + bpm8XM, -338.26, 1.0 + bpm8YP, 2768.41, 1.0 + bpm8YM, 2375.63, 1.0 + + bpm10XP, 4134.23, 1.0 + bpm10XM, -16.92, 1.0 + bpm10YP, 1902.80, 1.0 + bpm10YM, 1140.99, 1.0 + + bpm12XP, -1140.14, 1.0 + bpm12XM, -517.90, 1.0 + bpm12YP, 217.82, 1.0 + bpm12YM, -552.81, 1.0 + +! cavity BPMs pedestal calibration from zero gain run 1219 + cav4bq, -167.527, 0.00529310 + cav4bx, -379.812, 0.00089542 + cav4by, -550.257, 0.00060837 + + cav4cq, -403.997, 0.0071337 + cav4cx, -634.063, 0.0007546 + cav4cy, -357.001, 0.0008082 + + cav4dq, -216.942, 0.0078974 + cav4dx, -242.757, 0.0007698 + cav4dy, -203.538, 0.0006942 + From 8f5f867dacb3b752c9398841c11c77c7b94843c9 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Wed, 6 Mar 2019 21:26:35 -0500 Subject: [PATCH 070/102] Clean up --- panguin/macros/Makefile | 5 - panguin/macros/asymmetryPlot_compile.C | 120 ---------------------- panguin/macros/asymmetryPlot_diffs.C | 46 --------- panguin/macros/asymmetryPlot_example.C | 87 ---------------- panguin/macros/asymmetryPlot_modular.C | 66 ------------ panguin/macros/asymmetryPlot_vector.C | 35 ------- panguin/macros/asymmetryPlot_wrapper.C | 98 ------------------ panguin/macros/autoCorrelation.C | 90 ---------------- panguin/macros/autoCorrelation_panguin.C | 73 ------------- panguin/macros/defaultOnline.cfg | 18 ---- panguin/macros/exampleCFG2.cfg | 32 ------ panguin/macros/japan_compiled_example.cfg | 62 ----------- panguin/macros/japan_example.cfg | 80 --------------- panguin/macros/japan_macro_example.cfg | 53 ---------- panguin/macros/japan_modular_example.cfg | 70 ------------- panguin/macros/japantypes.hh | 19 ---- panguin/macros/setPlotStyle.C | 20 ---- 17 files changed, 974 deletions(-) delete mode 100644 panguin/macros/Makefile delete mode 100644 panguin/macros/asymmetryPlot_compile.C delete mode 100644 panguin/macros/asymmetryPlot_diffs.C delete mode 100644 panguin/macros/asymmetryPlot_example.C delete mode 100644 panguin/macros/asymmetryPlot_modular.C delete mode 100644 panguin/macros/asymmetryPlot_vector.C delete mode 100644 panguin/macros/asymmetryPlot_wrapper.C delete mode 100644 panguin/macros/autoCorrelation.C delete mode 100644 panguin/macros/autoCorrelation_panguin.C delete mode 100644 panguin/macros/defaultOnline.cfg delete mode 100644 panguin/macros/exampleCFG2.cfg delete mode 100644 panguin/macros/japan_compiled_example.cfg delete mode 100644 panguin/macros/japan_example.cfg delete mode 100644 panguin/macros/japan_macro_example.cfg delete mode 100644 panguin/macros/japan_modular_example.cfg delete mode 100644 panguin/macros/japantypes.hh delete mode 100644 panguin/macros/setPlotStyle.C diff --git a/panguin/macros/Makefile b/panguin/macros/Makefile deleted file mode 100644 index b00b48672..000000000 --- a/panguin/macros/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -make testComp: - g++ -g -c asymmetryPlot_compile.C -o comp.o `root-config --cflags --glibs` - g++ comp.o -o compTest `root-config --cflags --glibs` - rm comp.o - diff --git a/panguin/macros/asymmetryPlot_compile.C b/panguin/macros/asymmetryPlot_compile.C deleted file mode 100644 index 4eb70adc2..000000000 --- a/panguin/macros/asymmetryPlot_compile.C +++ /dev/null @@ -1,120 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_example(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -#include "TFile.h" -#include "TCanvas.h" -#include -#include -#include -//#include "japantypes.hh" - -int main(int argc, char **argv) -{ - std::string rootfile = "run_1033.root"; - std::string channel = "usr"; - //std::string number = "1111"; - if (argc <= 1 || argc > 3) - { - std::cerr << "Usage: ./compTest char*:rootfileName char*:variable" << std::endl; - exit(0); - } - if (argc >= 2) - { - std::string fileName(argv[1]); - rootfile = fileName; - } - if (argc >= 3) - { - std::string channelName(argv[2]); - channel = channelName; - } - // number = parsed filename, so just the number part. - //int first = 0; - //int last = 99; - //first = rootfile.find("_"); - //last = rootfile.find("."); - //number = rootfile.substr(first+1,last-4).c_str(); - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TFile *oldFile = new TFile(rootfile.c_str(),"READ"); - TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); - TTree *oldEventTree = (TTree*)oldFile->Get("Mps_Tree"); - std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree; - TFile *resultsFile; - //std::string outputFile = Form("second_pass_%s_%s.root",number.c_str(),channel.c_str()); - std::string outputFile = Form("second_pass_%s.root",channel.c_str()); - // Check to see if analysis has been run before - std::ifstream file(outputFile.c_str()); - if(!file){ - // Write a new root file for output - resultsFile = new TFile(outputFile.c_str(),"RECREATE"); - // Create a new tree to store results in - newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - // Make an instance of the struct we need to read the old Tree's data - typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; - } PATTERNASYMS; - PATTERNASYMS patternAsyms; - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - // Save your root tree for later use - resultsFile->Write(); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - // Draw your results - else{ - resultsFile = new TFile(outputFile.c_str(),"READ"); - newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - - delete newPatternTree; - resultsFile->Close(); - delete resultsFile; - delete oldFile; - return 0; -} diff --git a/panguin/macros/asymmetryPlot_diffs.C b/panguin/macros/asymmetryPlot_diffs.C deleted file mode 100644 index a268ed7b7..000000000 --- a/panguin/macros/asymmetryPlot_diffs.C +++ /dev/null @@ -1,46 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Purpose: A script that loops through events in the * - * event-based tree and generates auto-correlations * - * and also estimates the helicity pattern-tree and * - * the alternating-pair-wise ppm asymmetry noise * - * floor for a ~7 volt signal or a mid-range scaler * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" - -void asymmetryPlot(std::string channel) { - - gStyle->SetOptStat(0); - - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); - Int_t numEntries = oldPatternTree->GetEntries(); - std::cout<<"N entries = "<SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - Double_t patternNoises; - TBranch *patternNoisesBranch; - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries-1; j++) { - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - oldPatternTree->GetEntry(j+1); - patternNoises-=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - oldPatternTree->Draw(Form("asym_%s",channel.c_str())); - newPatternTree->SetLineColor(2); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str()),"","same"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); -} diff --git a/panguin/macros/asymmetryPlot_example.C b/panguin/macros/asymmetryPlot_example.C deleted file mode 100644 index bcd99f6c8..000000000 --- a/panguin/macros/asymmetryPlot_example.C +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_example(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -//#include "japantypes.hh" - -void asymmetryPlot_example(std::string channel) { - - gStyle->SetOptStat(0); - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TFile *oldFile = gFile; - TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); - std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree; - TFile *resultsFile; - std::string outputFile = Form("second_pass_%s.root",channel.c_str()); - // Check to see if analysis has been run before - if(gSystem->AccessPathName(outputFile.c_str())){ - // Write a new root file for output - resultsFile = new TFile(outputFile.c_str(),"RECREATE"); - // Create a new tree to store results in - newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - // Make an instance of the struct we need to read the old Tree's data - typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; - } PATTERNASYMS; - PATTERNASYMS patternAsyms; - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - // Save your root tree for later use - resultsFile->Write(); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - // Draw your results - else{ - resultsFile = new TFile(outputFile.c_str(),"READ"); - newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - - delete newPatternTree; - resultsFile->Close(); - delete resultsFile; - gFile=oldFile; -} diff --git a/panguin/macros/asymmetryPlot_modular.C b/panguin/macros/asymmetryPlot_modular.C deleted file mode 100644 index 197c29e3b..000000000 --- a/panguin/macros/asymmetryPlot_modular.C +++ /dev/null @@ -1,66 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_modular(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -#include "japantypes.hh" - -void asymmetryPlot_modular(std::string channel) { - - gStyle->SetOptStat(0); - - // Make an instance of the relevant data type's struct - PATTERNASYMS patternAsyms; - - std::string tree = "Hel_Tree"; - std::string modifier = "noise"; - std::string description = "Tree of Pattern based noise"; - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree = new TTree(Form("%s_%s",modifier.c_str(),tree.c_str()),Form("%s",description.c_str())); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - //PATTERNASYMS patternBranches; - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - //TBranch *patternBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - //patternBranch = newPatternTree->Branch(Form("pattern_%s",channel.c_str()), &patternBranches); - - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises = patternAsyms.hw_sum; - //patternBranches = fillPATTERNASYMS(patternAsyms); - newPatternTree->Fill(); - } - // Draw your results - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - //newPatternTree->Draw(Form("pattern_%s",channel.c_str())); -} diff --git a/panguin/macros/asymmetryPlot_vector.C b/panguin/macros/asymmetryPlot_vector.C deleted file mode 100644 index e2fb01633..000000000 --- a/panguin/macros/asymmetryPlot_vector.C +++ /dev/null @@ -1,35 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Purpose: A script that loops through events in the * - * event-based tree and generates auto-correlations * - * and also estimates the helicity pattern-tree and * - * the alternating-pair-wise ppm asymmetry noise * - * floor for a ~7 volt signal or a mid-range scaler * - * * - **************************************************************/ - -#include -#include -#include "TTree.h" - -void asymmetryPlot(std::string channel) { - - gStyle->SetOptStat(0); - - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); - TTree *newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - std::vector < Double_t > *patternAsyms = 0; - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()) , &patternAsyms ); - - // Calculate noise floor from pattern tree directly, no steps for this - std::vector < Double_t > *patternNoises; - newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (size_t i = 0; i < oldPatternTree->GetEntries(); i++) { - oldPatternTree->GetEntry(i); - patternNoises->push_back(patternAsyms->at(patternAsyms->size()-1)); - } - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); -} diff --git a/panguin/macros/asymmetryPlot_wrapper.C b/panguin/macros/asymmetryPlot_wrapper.C deleted file mode 100644 index 86f85cdf0..000000000 --- a/panguin/macros/asymmetryPlot_wrapper.C +++ /dev/null @@ -1,98 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_example(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -//#include "japantypes.hh" - -void asymmetryPlot_wrapper(std::string channel) { - - gStyle->SetOptStat(0); - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TFile *oldFile = gFile; - TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); - //std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree; - TFile *resultsFile; - - //std::string number = "1111"; - - //number = dir.substr(dir.find("_")+1,4).c_str(); - //std::string outputFile = Form("second_pass_%s_%s.root",number.c_str(),channel.c_str()); - std::string outputFile = Form("second_pass_%s.root",channel.c_str()); - //gSystem->Exec(Form("CURRENT_RUN=%s"),dir.substr(dir.find("_")+1,4).c_str()); - - // Check to see if analysis has been run before - //gSystem->Exec(Form("ln -sf ${QW_ROOTFILES}/prex*%s.root run_%s.root",number.c_str(),number.c_str())); - //gSystem->Exec(Form("./compTest run_%s.root %s",number.c_str(),channel.c_str())); - gSystem->Exec(Form("./compTest run.root %s",channel.c_str())); - if(gSystem->AccessPathName(outputFile.c_str())){ - // Write a new root file for output - resultsFile = new TFile(outputFile.c_str(),"RECREATE"); - // Create a new tree to store results in - newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - // Make an instance of the struct we need to read the old Tree's data - typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; - } PATTERNASYMS; - PATTERNASYMS patternAsyms; - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - // Save your root tree for later use - resultsFile->Write(); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - // Draw your results - else{ - resultsFile = new TFile(outputFile.c_str(),"READ"); - newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - - delete newPatternTree; - resultsFile->Close(); - delete resultsFile; - //delete dir; - gFile=oldFile; -} diff --git a/panguin/macros/autoCorrelation.C b/panguin/macros/autoCorrelation.C deleted file mode 100644 index 7b4078e25..000000000 --- a/panguin/macros/autoCorrelation.C +++ /dev/null @@ -1,90 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Purpose: A script that loops through events in the * - * event-based tree and generates auto-correlations * - * and also estimates the helicity pattern-tree and * - * the alternating-pair-wise ppm asymmetry noise * - * floor for a ~7 volt signal or a mid-range scaler * - * * - **************************************************************/ - -void autoCorrelation(TString channel, TString drawoption, Int_t n_steps = 1, Bool_t just_noise_floor=false, Bool_t just_auto_correlation=false, Bool_t ignore_helicity_pattern) { - - gStyle->SetOptStat(0); - - TTree *oldEventTree = (TTree*)gDirectory->Get("Mps_Tree"); - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); - TTree *newEventTree = new TTree("noise_Mps_Tree","Tree of Event based noise"); - TTree *newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - std::vector < Double_t > *dataValues = 0; - std::vector < Int_t > *evNums = 0; - std::vector < Double_t > *patternAsyms = 0; - - oldEventTree->SetBranchAddress( Form("%s",channel) , &dataValues ); - oldEventTree->SetBranchAddress( Form("event_number") , &evNums ); - oldPatternTree->SetBranchAddress( Form("asym_%s",channel) , &patternAsyms ); - - const int nStepsToCheck = 10; - // Calculate nStepsToCheck number of event separated (event based) differences of yields and asymmetry - std::vector < Double_t > newEvNums[nStepsToCheck]; - Double_t stepValues[nStepsToCheck] = {0.0}; // Array of steps, where the index refers to how many events ago the data refers to - std::vector < Double_t > stepNoises[nStepsToCheck]; - std::vector < Double_t > relNoises[nStepsToCheck]; - // Calculate noise floor from pattern tree directly, no steps for this - std::vector < Double_t > *patternNoises; - for (int steps = 0; steps < nStepsToCheck; steps++) { - newEventTree->Branch(Form("event_number") , newEvNums[steps] ); - newEventTree->Branch(Form("values_%dstep_%s",steps+1,channel) , stepValues[steps] ); - newEventTree->Branch(Form("step_%dstep_%s",steps+1,channel) , stepNoises[steps] ); - newEventTree->Branch(Form("rel_%dstep_%s",steps+1,channel) , relNoises[steps] ); - } - newPatternTree->Branch(Form("pattern_noise_%s",channel) , &patternNoises ); - // Assume we start at event 0, and use this variable to check for skipped events (due to decoding errors or DAQ deadtime problems) - Int_t prior_event_number = 0; - Int_t current_event_number = 1; - Double_t noise_step = 0.0; - Double_t noise_rel = 0.0; - - for (size_t i = 0; i < eventTree->GetEntries(); i++) { - eventTree->GetEntry(i); - // There should only ever be one value in each branch per entry, so checking for the length is overkill - just use the last value for safety - //// for (size_t j = 0; j < evnum->size(); j++) - current_event_number = evNums->at(evnum->size()-1); - if (current_event_number != (1 + prior_event_number)) { - // If an event is skipped then update the current run number and loop back through, skipping calculations - prior_event_number = current_event_number; - } - else { - for (int steps1 = nStepsToCheck-1; steps1 > 0; steps1--) { // Shift all data by 1 upwards in the array - stepValues[steps1] = stepValues[steps-1]; - } - stepValues[0] = dataValues->at(dataValues->size()-1); // Grab the new data value - Get the last value in the branch for this event, because I am paranoid - if ((current_event_number-prior_event_number)>nStepsToCheck){ - for (int steps2 = 0; steps2 < nStepsToCheck; steps2++) { - noise_step = stepValues[steps2] - stepValues[0]; // Take the difference w.r.t. the step2-th previous value - noise_rel = (stepValues[steps2] - stepValues[0])/(stepValues[step2] + stepValues[0]); - // Take the relative difference (pair asymmetry) w.r.t. the step2-th previous value - stepNoises[steps2].push_back(noise_step); - relNoises[steps2].push_back(noise_rel); - } - } - } - prior_event_number = current_event_number; - } - - for (int steps3 = 0; steps3 < nStepsToCheck; steps3++) { - c1->cd(steps3); - newEventTree->Draw(Form("rel_%dstep_%s",step3+1,channel)); - } - - if (!ignore_helicity_pattern){ - for (size_t i = 0; i < patternTree->GetEntries(); i++) { - patternTree->GetEntry(i); - patternNoises.push_back(patternAsyms->at(patternAsyms->size()-1)); - } - newPatternTree->Draw(); - } -} diff --git a/panguin/macros/autoCorrelation_panguin.C b/panguin/macros/autoCorrelation_panguin.C deleted file mode 100644 index 77d0e8770..000000000 --- a/panguin/macros/autoCorrelation_panguin.C +++ /dev/null @@ -1,73 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Purpose: A script that loops through events in the * - * event-based tree and generates auto-correlations * - * and the alternating-pair-wise ppm asymmetry noise * - * floor for a ~7 volt signal or a mid-range scaler * - * * - **************************************************************/ - -void autoCorrelation(TString channel, TString drawoption, Int_t n_steps = 1, Bool_t just_noise_floor=false, Bool_t just_auto_correlation=false) { - - gStyle->SetOptStat(0); - - TTree *oldEventTree = (TTree*)gDirectory->Get("Mps_Tree"); - TTree *newEventTree = new TTree("noise_Mps_Tree","Tree of Event based noise"); - - std::vector < Double_t > *dataValues = 0; - std::vector < Int_t > *evNums = 0; - - oldEventTree->SetBranchAddress( Form("%s",channel) , &dataValues ); - oldEventTree->SetBranchAddress( Form("event_number") , &evNums ); - - const int nStepsToCheck = 10; - // Calculate nStepsToCheck number of event separated (event based) differences of yields and asymmetry - std::vector < Double_t > newEvNums[nStepsToCheck]; - Double_t stepValues[nStepsToCheck] = {0.0}; // Array of steps, where the index refers to how many events ago the data refers to - std::vector < Double_t > stepNoises[nStepsToCheck]; - std::vector < Double_t > relNoises[nStepsToCheck]; - for (int steps = 0; steps < nStepsToCheck; steps++) { - newEventTree->Branch(Form("event_number") , newEvNums[steps] ); - newEventTree->Branch(Form("values_%dstep_%s",steps+1,channel) , stepValues[steps] ); - newEventTree->Branch(Form("step_%dstep_%s",steps+1,channel) , stepNoises[steps] ); - newEventTree->Branch(Form("rel_%dstep_%s",steps+1,channel) , relNoises[steps] ); - } - // Assume we start at event 0, and use this variable to check for skipped events (due to decoding errors or DAQ deadtime problems) - Int_t prior_event_number = 0; - Int_t current_event_number = 1; - Double_t noise_step = 0.0; - Double_t noise_rel = 0.0; - - for (size_t i = 0; i < eventTree->GetEntries(); i++) { - eventTree->GetEntry(i); - // There should only ever be one value in each branch per entry, so checking for the length is overkill - just use the last value for safety - //// for (size_t j = 0; j < evnum->size(); j++) - current_event_number = evNums->at(evnum->size()-1); - if (current_event_number != (1 + prior_event_number)) { - // If an event is skipped then update the current run number and loop back through, skipping calculations - prior_event_number = current_event_number; - } - else { - for (int steps1 = nStepsToCheck-1; steps1 > 0; steps1--) { // Shift all data by 1 upwards in the array - stepValues[steps1] = stepValues[steps-1]; - } - stepValues[0] = dataValues->at(dataValues->size()-1); // Grab the new data value - Get the last value in the branch for this event, because I am paranoid - if ((current_event_number-prior_event_number)>nStepsToCheck){ - for (int steps2 = 0; steps2 < nStepsToCheck; steps2++) { - if (steps2 == n_steps){ - noise_step = stepValues[steps2] - stepValues[0]; // Take the difference w.r.t. the step2-th previous value - noise_rel = (stepValues[steps2] - stepValues[0])/(stepValues[step2] + stepValues[0]); - // Take the relative difference (pair asymmetry) w.r.t. the step2-th previous value - stepNoises[steps2].push_back(noise_step); - relNoises[steps2].push_back(noise_rel); - } - } - } - } - prior_event_number = current_event_number; - } - - newEventTree->Draw(Form("rel_%dstep_%s",step3+1,channel)); -} diff --git a/panguin/macros/defaultOnline.cfg b/panguin/macros/defaultOnline.cfg deleted file mode 100644 index 0e67c1636..000000000 --- a/panguin/macros/defaultOnline.cfg +++ /dev/null @@ -1,18 +0,0 @@ -# Configuration file for the online GUI -# All lines containing "#" are treated as comments (ignored) -# Last line MUST be blank. -# Multiple spaces are treated as one space. -# To switch to log scale, add the option logy after the name of -# the histogram - -# Uncomment the below line to monitor the fill of a ROOTfile. -watchfile - -# Defined cuts -definecut evcut (CodaEventNumber>10) - -### column row -newpage 1 1 - title BCMs vs Event Number - bcm_us:CodaEventNumber evcut -type scat -title "BCM1 vs Eventnumber" - diff --git a/panguin/macros/exampleCFG2.cfg b/panguin/macros/exampleCFG2.cfg deleted file mode 100644 index fb44286ef..000000000 --- a/panguin/macros/exampleCFG2.cfg +++ /dev/null @@ -1,32 +0,0 @@ -# Configuration file for the online GUI -# This file is for ADCs -# All lines containing "#" are treated as comments (ignored) -# Last line MUST be blank. -# Multiple spaces are treated as one space. -# To switch to log scale, add the option logy after the name of -# the histogram - -# Usage: exampleMacro2(std::string title, std::string draws, std:;string cuts,int binsx, double binlowx, double binhighx, int binsy, double binlowy, double binhighy) - -# Default root file to look at -#rootfile pan.root -rootfile /adaq1/work1/apar/japanOutput/prexALL_1098.root -##rootfile /adaq1/work1/apar/ciprian/parity18_4416_standard.root -##rootfile /dev/shm//QwMemMapFile.map - -# Prototype rootfilename.. overrides GetRootFileName.C -##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root -#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root - -# Defined cuts -definecut evcut (pattern_number>1) -definecut cuts (CodaEventNumber>10) -definecut bcmds_cut (-1*bcm_ds>1) - -# Uncomment the below line to monitor the fill of a ROOTfile. -#watchfile - -newpage 1 2 - title SAMs test - macro ./macros/exampleMacro2.C("BPM4A-x-vs-y","bpm4aX:bpm4aY","bcm_an_ds10>10",100,2.4,2.55,100,1.9,2.1) - macro ./macros/exampleMacro2.C("BPM4E-x-vs-y","bpm4eX:bpm4eY","bcm_an_ds10>10",100,2.1,2.4,100,0.90,1.30) diff --git a/panguin/macros/japan_compiled_example.cfg b/panguin/macros/japan_compiled_example.cfg deleted file mode 100644 index cfca5b5fc..000000000 --- a/panguin/macros/japan_compiled_example.cfg +++ /dev/null @@ -1,62 +0,0 @@ -# Configuration file for the online GUI -# This file is for ADCs -# All lines containing "#" are treated as comments (ignored) -# Last line MUST be blank. -# Multiple spaces are treated as one space. -# To switch to log scale, add the option logy after the name of -# the histogram - -# Valid entries include: -# To create a new TCanvas with a set number of plots in it -# Specify with: newpage [x] [y] [TCanvas options] -# Tree drawing -# Specify with: -# Variable drawing -# Specify with: [variables] [cuts] -type [type] -title [title] -tree [tree name] -# Page title setting: -# Specify with: title Your Title Here -# Macro execution -# Specify with: macro path/to/macro.C(options) -# Additional options: -# -noshow golden - -# Default root file to look at -#rootfile pan.root -#goldenrootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -##rootfile /dev/shm/QwMemMapFile.map - -# Prototype rootfilename.. overrides GetRootFileName.C - ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root -#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root - -# Defined cuts -definecut evcut (event_number>1) -definecut bcmds_cut (-1*bcm_ds>1) - -# Uncomment the below line to monitor the fill of a ROOTfile. -#watchfile - -newpage 1 2 - title Color Test - yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type * - macro ./macros/setPlotStyle.C() - yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type COLZ - -newpage 2 2 - title Noise Floor Test - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch7") - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch6") - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch5") - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch4") - -newpage 2 4 - title Noise Floor Test - macro ./macros/asymmetryPlot_wrapper.C("sam1") - macro ./macros/asymmetryPlot_wrapper.C("sam2") - macro ./macros/asymmetryPlot_wrapper.C("sam3") - macro ./macros/asymmetryPlot_wrapper.C("sam4") - macro ./macros/asymmetryPlot_wrapper.C("sam5") - macro ./macros/asymmetryPlot_wrapper.C("sam6") - macro ./macros/asymmetryPlot_wrapper.C("sam7") - macro ./macros/asymmetryPlot_wrapper.C("sam8") diff --git a/panguin/macros/japan_example.cfg b/panguin/macros/japan_example.cfg deleted file mode 100644 index 428ac6cf3..000000000 --- a/panguin/macros/japan_example.cfg +++ /dev/null @@ -1,80 +0,0 @@ -# Configuration file for the online GUI -# This file is for ADCs -# All lines containing "#" are treated as comments (ignored) -# Last line MUST be blank. -# Multiple spaces are treated as one space. -# To switch to log scale, add the option logy after the name of -# the histogram - -# Default root file to look at -#rootfile pan.root -rootfile /adaq1/work1/apar/japanOutput/prexALL_1098.root -##rootfile /adaq1/work1/apar/ciprian/parity18_4416_standard.root -##rootfile /dev/shm//QwMemMapFile.map - -# Prototype rootfilename.. overrides GetRootFileName.C - ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root -#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root - -# Defined cuts -definecut evcut (event_number>1) -definecut bcmds_cut (-1*bcm_ds>1) - -# Uncomment the below line to monitor the fill of a ROOTfile. -#watchfile - -newpage 1 4 - title BCMs vs Event Number - bcm0l02:event_number evcut -type scat -title "BCM0L02 vs Eventnumber" - bcm_us:event_number -title "BCM upstream vs Event Number" -type box - (-1*bcm_ds):event_number evcut -type prof -title "BCM downstream Profile example" -tree Mps_Tree - (1-bcm_us/bcm_ds):(event_number*3600) bcmds_cut -title "What is this?" -tree Mps_Tree - -newpage 1 2 - title BCM asymmetries - asym_bcm_us ErrorFlag==0 - asym_bcm_ds ErrorFlag==0 - -newpage 2 4 - title LHRS channel yields - yield_usl ErrorFlag==0&&yield_usl.Device_Error_Code==0 - yield_dsl ErrorFlag==0&&yield_dsl.Device_Error_Code==0 - yield_atl1 ErrorFlag==0&&yield_atl1.Device_Error_Code==0 - yield_atl2 ErrorFlag==0&&yield_atl2.Device_Error_Code==0 - yield_vqwk_25_0ch4 ErrorFlag==0&&yield_vqwk_25_0ch4.Device_Error_Code==0 - yield_vqwk_25_0ch5 ErrorFlag==0&&yield_vqwk_25_0ch5.Device_Error_Code==0 - yield_vqwk_25_0ch6 ErrorFlag==0&&yield_vqwk_25_0ch6.Device_Error_Code==0 - yield_vqwk_25_0ch7 ErrorFlag==0&&yield_vqwk_25_0ch7.Device_Error_Code==0 - -newpage 2 4 - title LHRS channel asymmetries - asym_usl ErrorFlag==0&&asym_usl.Device_Error_Code==0 - asym_dsl ErrorFlag==0&&asym_dsl.Device_Error_Code==0 - asym_atl1 ErrorFlag==0&&asym_atl1.Device_Error_Code==0 - asym_atl2 ErrorFlag==0&&asym_atl2.Device_Error_Code==0 - asym_vqwk_25_0ch4 ErrorFlag==0&&asym_vqwk_25_0ch4.Device_Error_Code==0 - asym_vqwk_25_0ch5 ErrorFlag==0&&asym_vqwk_25_0ch5.Device_Error_Code==0 - asym_vqwk_25_0ch6 ErrorFlag==0&&asym_vqwk_25_0ch6.Device_Error_Code==0 - asym_vqwk_25_0ch7 ErrorFlag==0&&asym_vqwk_25_0ch7.Device_Error_Code==0 - -newpage 2 4 - title LHRS channel double differences to asym_dsl - asym_usl-asym_dsl ErrorFlag==0&&asym_usl.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 - asym_dsl ErrorFlag==0&&asym_dsl.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 - asym_atl1-asym_dsl ErrorFlag==0&&asym_atl1.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 - asym_atl2-asym_dsl ErrorFlag==0&&asym_atl2.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 - asym_vqwk_25_0ch4-asym_dsl ErrorFlag==0&&asym_vqwk_25_0ch4.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 - asym_vqwk_25_0ch5-asym_dsl ErrorFlag==0&&asym_vqwk_25_0ch5.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 - asym_vqwk_25_0ch6-asym_dsl ErrorFlag==0&&asym_vqwk_25_0ch6.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 - asym_vqwk_25_0ch7-asym_dsl ErrorFlag==0&&asym_vqwk_25_0ch7.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 - -newpage 2 4 - title SAMs - asym_sam1 - asym_sam2 - asym_sam3 - asym_sam4 - asym_sam5 - asym_sam6 - asym_sam7 - asym_sam8 diff --git a/panguin/macros/japan_macro_example.cfg b/panguin/macros/japan_macro_example.cfg deleted file mode 100644 index 15ecb011c..000000000 --- a/panguin/macros/japan_macro_example.cfg +++ /dev/null @@ -1,53 +0,0 @@ -# Configuration file for the online GUI -# This file is for ADCs -# All lines containing "#" are treated as comments (ignored) -# Last line MUST be blank. -# Multiple spaces are treated as one space. -# To switch to log scale, add the option logy after the name of -# the histogram - -# Valid entries include: -# To create a new TCanvas with a set number of plots in it -# Specify with: newpage [x] [y] [TCanvas options] -# Tree drawing -# Specify with: -# Variable drawing -# Specify with: variables cuts -type [type] -title [title] -tree [tree name] -# Page title setting: -# Specify with: title Your Title Here -# Macro execution -# Specify with: macro path/to/macro.C(options) -# Additional options: -# -noshow golden - -# Default root file to look at -#rootfile pan.root -#goldenrootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -##rootfile /dev/shm/QwMemMapFile.map - -# Prototype rootfilename.. overrides GetRootFileName.C - ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root -#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root - -# Defined cuts -definecut evcut (event_number>1) -definecut bcmds_cut (-1*bcm_ds>1) - -# Uncomment the below line to monitor the fill of a ROOTfile. -#watchfile - -newpage 1 2 - title Color Test - yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type * - macro ./macros/setPlotStyle.C() - yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type COLZ - -newpage 1 5 - title Noise Floor Test - asym_vqwk_26_0ch7 - macro ./macros/asymmetryPlot_example.C("vqwk_26_0ch7") - asym_vqwk_26_0ch6 pattern_number>10 - macro ./macros/asymmetryPlot_example.C("vqwk_26_0ch6") - macro ./macros/asymmetryPlot_example.C("vqwk_26_0ch5") - macro ./macros/asymmetryPlot_example.C("vqwk_26_0ch4") diff --git a/panguin/macros/japan_modular_example.cfg b/panguin/macros/japan_modular_example.cfg deleted file mode 100644 index 7ca5045a2..000000000 --- a/panguin/macros/japan_modular_example.cfg +++ /dev/null @@ -1,70 +0,0 @@ -# Configuration file for the online GUI -# This file is for ADCs -# All lines containing "#" are treated as comments (ignored) -# Last line MUST be blank. -# Multiple spaces are treated as one space. -# To switch to log scale, add the option logy after the name of -# the histogram - -# Valid entries include: -# To create a new TCanvas with a set number of plots in it -# Specify with: newpage [x] [y] [TCanvas options] -# Tree drawing -# Specify with: -# Variable drawing -# Specify with: variables cuts -type [type] -title [title] -tree [tree name] -# Page title setting: -# Specify with: title Your Title Here -# Macro execution -# Specify with: macro path/to/macro.C(options) -# Additional options: -# -noshow golden - -# Default root file to look at -#rootfile pan.root -#goldenrootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -##rootfile /dev/shm/QwMemMapFile.map - -# Prototype rootfilename.. overrides GetRootFileName.C - ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root -#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root - -# Defined cuts -definecut evcut (event_number>1) -definecut bcmds_cut (-1*bcm_ds>1) - -# Uncomment the below line to monitor the fill of a ROOTfile. -#watchfile - -newpage 1 1 - title Noise Floor Test - macro ./macros/asymmetryPlot_modular.C("sam1") - -newpage 1 1 - title Noise Floor Test - macro ./macros/asymmetryPlot_modular.C("sam2") - -newpage 1 1 - title Noise Floor Test - macro ./macros/asymmetryPlot_modular.C("sam3") - -newpage 1 1 - title Noise Floor Test - macro ./macros/asymmetryPlot_modular.C("sam4") - -newpage 1 1 - title Noise Floor Test - macro ./macros/asymmetryPlot_modular.C("sam5") - -newpage 1 1 - title Noise Floor Test - macro ./macros/asymmetryPlot_modular.C("sam6") - -newpage 1 1 - title Noise Floor Test - macro ./macros/asymmetryPlot_modular.C("sam7") - -newpage 1 1 - title Noise Floor Test - macro ./macros/asymmetryPlot_modular.C("sam8") diff --git a/panguin/macros/japantypes.hh b/panguin/macros/japantypes.hh deleted file mode 100644 index 5f5f0dd77..000000000 --- a/panguin/macros/japantypes.hh +++ /dev/null @@ -1,19 +0,0 @@ -// Define a new struct that will hold the individual leaves from the branch of interest -typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; -} PATTERNASYMS; -typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; -} EVTTREE; diff --git a/panguin/macros/setPlotStyle.C b/panguin/macros/setPlotStyle.C deleted file mode 100644 index 904c99592..000000000 --- a/panguin/macros/setPlotStyle.C +++ /dev/null @@ -1,20 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Purpose: A script for setting a 255-level color axis * - * * - **************************************************************/ - -void setPlotStyle() -{ - const Int_t NRGBs = 5; - const Int_t NCont = 255; - // See class TColor documentation and SetPalette() command - Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; - Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; - Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; - Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; - TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); - gStyle->SetNumberContours(NCont); -} From b3d26884ec991151ba69a9081028a7e644c381f9 Mon Sep 17 00:00:00 2001 From: Tao Ye Date: Wed, 6 Mar 2019 22:23:20 -0500 Subject: [PATCH 071/102] Fixed title problem with two lines modification The problem is Tree Draw assigns histograms with the same name "htemp" by default. FindObject("htemp") is not able to find the right histogram so that fail to set the title. Added lines will fix this problem : If a histogram title is specified by user, a unique MD5 text string will be generated based on the given title and replace default name "htemp" with this MD5 string. Co-existing histograms will not share the same name anymore. --- panguin/src/panguinOnline.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index e5ab33476..08f1c00c1 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -880,7 +880,8 @@ void OnlineGUI::TreeDraw(vector command) { } else if (errcode!=0) { if(!command[3].IsNull()) { TH1* thathist = (TH1*)hobj; - thathist->SetTitle(command[3]); + TString myMD5 = command[3].MD5(); + thathist->SetNameTitle(myMD5,command[3]); } } else { BadDraw("Empty Histogram"); From caec92651bae21dc5a6e3a2006934e978a05b024 Mon Sep 17 00:00:00 2001 From: Paul King Date: Fri, 8 Mar 2019 23:30:55 -0500 Subject: [PATCH 072/102] Additional fixes for panguin histogram title problem. If the histogram title is not enclosed in quotation marks, alternate parsing of the line is needed to recogize the title. If the drawn variables are projected into a named histogram, we need to extract that name before we can modify the title. --- panguin/src/panguinOnline.cc | 16 ++++++++++++++-- panguin/src/panguinOnlineConfig.cc | 9 +++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index 08f1c00c1..9636f04dc 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -21,6 +21,7 @@ #include #include "TPaveText.h" #include +#include "TRegexp.h" //#define DEBUG //#define DEBUG2 //#define NOISY @@ -845,6 +846,17 @@ void OnlineGUI::TreeDraw(vector command) { TString var = command[0]; + // Check to see if we're projecting to a specific histogram + TString histoname = command[0](TRegexp(">>.+(?")); + if (histoname.Length()>0){ + histoname.Remove(0,2); + Int_t bracketindex = histoname.First("("); + if (bracketindex>0) histoname.Remove(bracketindex); + // std::cout << histoname << " "<< command[0](TRegexp(">>.+(?")) < command) { if (iTree <= fRootTree.size() ) { errcode = fRootTree[iTree]->Draw(var,cut,drawopt, 1000000000,fTreeEntries[iTree]); - TObject *hobj = (TObject*)gROOT->FindObject("htemp"); + TObject *hobj = (TObject*)gROOT->FindObject(histoname); if(errcode==-1) { BadDraw(var+" not found"); } else if (errcode!=0) { - if(!command[3].IsNull()) { + if(!command[3].IsNull() && hobj != NULL) { TH1* thathist = (TH1*)hobj; TString myMD5 = command[3].MD5(); thathist->SetNameTitle(myMD5,command[3]); diff --git a/panguin/src/panguinOnlineConfig.cc b/panguin/src/panguinOnlineConfig.cc index 1f4b2d011..6d7242636 100644 --- a/panguin/src/panguinOnlineConfig.cc +++ b/panguin/src/panguinOnlineConfig.cc @@ -439,20 +439,25 @@ vector OnlineConfig::GetDrawCommand(UInt_t page, UInt_t nCommand) TString word = sConfFile[index][j]; if( (word.BeginsWith("\"")) && (word.EndsWith("\"")) ) { title = word.ReplaceAll("\"",""); - out_command[3] = title; i = j; break; } else if(word.BeginsWith("\"")) { title = word.ReplaceAll("\"",""); } else if(word.EndsWith("\"")) { title += " " + word.ReplaceAll("\"",""); - out_command[3] = title; i = j; break; + } else if (title.Length()==0){ + title = word; } else { + // This case uses neither "i = j;" or "break;", because + // we want to be able to include all the words in the title. + // The title will end before the end of the line only if + // it is delimited by quotes. title += " " + word; } } + out_command[3] = title; } else if(sConfFile[index][i]=="-tree") { out_command[4] = sConfFile[index][i+1]; i = i+1; From 2623942f3794d65238e2443708d77ee1b5af0442 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Mon, 11 Mar 2019 10:23:20 -0400 Subject: [PATCH 073/102] add timer to different parts of panguin --- panguin/panguin.cc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/panguin/panguin.cc b/panguin/panguin.cc index d05e39730..b3ed9e7cc 100644 --- a/panguin/panguin.cc +++ b/panguin/panguin.cc @@ -3,13 +3,17 @@ #include #include #include +#include using namespace std; +clock_t tStart; void Usage(); void online(TString type="standard",UInt_t run=0,Bool_t printonly=kFALSE); int main(int argc, char **argv){ + tStart = clock(); + TString type="default"; UInt_t run=0; Bool_t printonly=kFALSE; @@ -17,6 +21,9 @@ int main(int argc, char **argv){ TApplication theApp("App",&argc,argv,NULL,-1); + cout<<"Starting processing arg. Time passed: " + <<(double) ((clock() - tStart)/CLOCKS_PER_SEC)<<" s!"<ParseConfig()) { @@ -64,7 +80,14 @@ void online(TString type,UInt_t run,Bool_t printonly){ if(run!=0) fconfig->OverrideRootFile(run); + cout<<"Finished processing cfg. Init OnlineGUI. Time passed: " + <<(double) ((clock() - tStart)/CLOCKS_PER_SEC)<<" s!"< Date: Mon, 11 Mar 2019 11:42:13 -0400 Subject: [PATCH 074/102] fix histogram titles (histogram was referenced to old htemp). add verbosity option --- panguin/include/panguinOnline.hh | 5 +- panguin/include/panguinOnlineConfig.hh | 4 +- panguin/panguin.cc | 17 +++-- panguin/src/panguinOnline.cc | 84 ++++++++++++----------- panguin/src/panguinOnlineConfig.cc | 94 ++++++++++++-------------- 5 files changed, 105 insertions(+), 99 deletions(-) diff --git a/panguin/include/panguinOnline.hh b/panguin/include/panguinOnline.hh index e51c49711..dd4130508 100644 --- a/panguin/include/panguinOnline.hh +++ b/panguin/include/panguinOnline.hh @@ -63,8 +63,10 @@ private: TH2D *mytemp2d_golden; TH3D *mytemp3d_golden; + int fVerbosity; + public: - OnlineGUI(OnlineConfig&,Bool_t); + OnlineGUI(OnlineConfig&, Bool_t,int); void CreateGUI(const TGWindow *p, UInt_t w, UInt_t h); virtual ~OnlineGUI(); void DoDraw(); @@ -91,6 +93,7 @@ public: void PrintPages(); void MyCloseWindow(); void CloseGUI(); + void SetVerbosity(int ver){fVerbosity=ver;} ClassDef(OnlineGUI,0); }; #endif //panguinOnline_h diff --git a/panguin/include/panguinOnlineConfig.hh b/panguin/include/panguinOnlineConfig.hh index 13532a834..74977def9 100644 --- a/panguin/include/panguinOnlineConfig.hh +++ b/panguin/include/panguinOnlineConfig.hh @@ -28,10 +28,12 @@ private: std::vector GetDrawIndex(UInt_t); Bool_t fFoundCfg; Bool_t fMonitor; - + int fVerbosity; + public: OnlineConfig(); OnlineConfig(TString); + void SetVerbosity(int ver){fVerbosity=ver;} Bool_t ParseConfig(); TString GetRootFile() { return rootfilename; }; TString GetGoldenFile() { return goldenrootfilename; }; diff --git a/panguin/panguin.cc b/panguin/panguin.cc index b3ed9e7cc..e820a7927 100644 --- a/panguin/panguin.cc +++ b/panguin/panguin.cc @@ -9,7 +9,7 @@ using namespace std; clock_t tStart; void Usage(); -void online(TString type="standard",UInt_t run=0,Bool_t printonly=kFALSE); +void online(TString type="standard",UInt_t run=0,Bool_t printonly=kFALSE, int verbosity=0); int main(int argc, char **argv){ tStart = clock(); @@ -18,6 +18,7 @@ int main(int argc, char **argv){ UInt_t run=0; Bool_t printonly=kFALSE; Bool_t showedUsage=kFALSE; + int verbosity(0); TApplication theApp("App",&argc,argv,NULL,-1); @@ -34,6 +35,8 @@ int main(int argc, char **argv){ run = atoi(theApp.Argv(++i)); cout << " Runnumber: " << run << endl; + } else if (sArg=="-v") { + verbosity = atoi(theApp.Argv(++i)); } else if (sArg=="-P") { printonly = kTRUE; cout << " PrintOnly" << endl; @@ -47,11 +50,12 @@ int main(int argc, char **argv){ showedUsage=kTRUE; } } + cout << "Verbosity level set to "<IsBatch()) { @@ -73,7 +77,7 @@ void online(TString type,UInt_t run,Bool_t printonly){ <<(double) ((clock() - tStart)/CLOCKS_PER_SEC)<<" s!"<SetVerbosity(ver); if(!fconfig->ParseConfig()) { gApplication->Terminate(); } @@ -83,7 +87,7 @@ void online(TString type,UInt_t run,Bool_t printonly){ cout<<"Finished processing cfg. Init OnlineGUI. Time passed: " <<(double) ((clock() - tStart)/CLOCKS_PER_SEC)<<" s!"<0)" << endl; cerr << " -P : Only Print Summary Plots" << endl; cerr << endl; } diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index e5ab33476..e6854290c 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -21,9 +21,6 @@ #include #include "TPaveText.h" #include -//#define DEBUG -//#define DEBUG2 -//#define NOISY //#define OLDTIMERUPDATE using namespace std; @@ -35,10 +32,11 @@ using namespace std; // // -OnlineGUI::OnlineGUI(OnlineConfig& config, Bool_t printonly): +OnlineGUI::OnlineGUI(OnlineConfig& config, Bool_t printonly=0, int ver=0): runNumber(0), timer(0), - fFileAlive(kFALSE) + fFileAlive(kFALSE), + fVerbosity(ver) { // Constructor. Get the config pointer, and make the GUI. @@ -238,9 +236,8 @@ void OnlineGUI::CreateGUI(const TGWindow *p, UInt_t w, UInt_t h) // Map main frame fMain->MapWindow(); -#ifdef DEBUG - fMain->Print(); -#endif + if(fVerbosity>=1) + fMain->Print(); if(fFileAlive) DoDraw(); @@ -291,10 +288,9 @@ void OnlineGUI::DoDraw() // Int_t dim = Int_t(round(sqrt(double(draw_count)))); pair dim = fConfig->GetPageDim(current_page); -#ifdef DEBUG - cout << "Dimensions: " << dim.first << "X" - << dim.second << endl; -#endif + if(fVerbosity>=1) + cout << "Dimensions: " << dim.first << "X" + << dim.second << endl; // Create a nice clean canvas. fCanvas->Clear(); @@ -391,10 +387,10 @@ Bool_t OnlineGUI::IsHistogram(TString objectname) for(UInt_t i=0; i=2) + cout << fileObjects[i].first << " " + << fileObjects[i].second << endl; + if(fileObjects[i].second.Contains("TH")) return kTRUE; } @@ -409,9 +405,9 @@ void OnlineGUI::GetFileObjects() // Utility to find all of the objects within a File (TTree, TH1F, etc). // The pair stored in the vector is // If there's no good keys.. do nothing. -#ifdef DEBUG - cout << "Keys = " << fRootFile->ReadKeys() << endl; -#endif + if(fVerbosity>=1) + cout << "Keys = " << fRootFile->ReadKeys() << endl; + if(fRootFile->ReadKeys()==0) { fUpdate = kFALSE; // delete fRootFile; @@ -425,14 +421,15 @@ void OnlineGUI::GetFileObjects() // Do the search while((key=(TKey*)next())!=0) { -#ifdef DEBUG - cout << "Key = " << key << endl; -#endif + if(fVerbosity>=1) + cout << "Key = " << key << endl; + TString objname = key->GetName(); TString objtype = key->GetClassName(); -#ifdef DEBUG - cout << objname << " " << objtype << endl; -#endif + + if(fVerbosity>=1) + cout << objname << " " << objtype << endl; + fileObjects.push_back(make_pair(objname,objtype)); } fUpdate = kTRUE; @@ -460,14 +457,15 @@ void OnlineGUI::GetTreeVars() } treeVars.push_back(currentTree); } -#ifdef DEBUG2 - for(UInt_t iTree=0; iTree=2){ + for(UInt_t iTree=0; iTree found; for(UInt_t i=0; i=1) + cout << "Update Now" << endl; #ifdef OLDTIMERUPDATE fRootFile = new TFile(fConfig->GetRootFile(),"READ"); @@ -875,12 +873,20 @@ void OnlineGUI::TreeDraw(vector command) { errcode = fRootTree[iTree]->Draw(var,cut,drawopt, 1000000000,fTreeEntries[iTree]); TObject *hobj = (TObject*)gROOT->FindObject("htemp"); + + if(fVerbosity>1){ + cout<<__PRETTY_FUNCTION__<<"\t"<<__LINE__<Clone(command[3].MD5()); thathist->SetTitle(command[3]); + thathist->DrawCopy(); + delete thathist; } } else { BadDraw("Empty Histogram"); diff --git a/panguin/src/panguinOnlineConfig.cc b/panguin/src/panguinOnlineConfig.cc index 1f4b2d011..781f983d3 100644 --- a/panguin/src/panguinOnlineConfig.cc +++ b/panguin/src/panguinOnlineConfig.cc @@ -7,33 +7,22 @@ #include #include -//#define DEBUG -//#define DEBUG2 -//#define NOISY -//#define OLDTIMERUPDATE - using namespace std; -/////////////////////////////////////////////////////////////////// -// Class: OnlineConfig -// -// Utility class that reads in a text file (.cfg) and -// stores it's contents. -// - OnlineConfig::OnlineConfig() { // Constructor. Without an argument, will use default "standard" config fMonitor = kFALSE; + fVerbosity = 0; OnlineConfig("standard"); } -OnlineConfig::OnlineConfig(TString anatype) +OnlineConfig::OnlineConfig(TString anatype): + confFileName(anatype),fVerbosity(0) { // Constructor. Takes the config anatype as the only argument. // Loads up the configuration file, and stores it's contents for access. - confFileName = anatype; //confFileName += ".cfg";//Not sure what this would be needed DELETEME cg fMonitor = kFALSE; fFoundCfg = kFALSE; @@ -96,15 +85,15 @@ void OnlineConfig::ParseFile() sConfFile.push_back(strvect); } -#ifdef DEBUG - cout << "OnlineConfig::ParseFile()\n"; - for(UInt_t ii=0; ii=1){ + cout << "OnlineConfig::ParseFile()\n"; + for(UInt_t ii=0; ii=3){ + cout << "OnlineConfig::ParseConfig()\n"; + for(UInt_t i=0; i=1){ + cout << "OnlineConfig::IsLogy() " << option << " " << page_index << " " << word_index + << " " << sConfFile[page_index].size() << endl; + for (Int_t i= 0; i < sConfFile[page_index].size(); i++) { + cout << sConfFile[page_index][i] << " "; + } } -#endif + return kFALSE; } @@ -406,19 +396,21 @@ vector OnlineConfig::GetDrawCommand(UInt_t page, UInt_t nCommand) vector command_vector = GetDrawIndex(page); UInt_t index = command_vector[nCommand]; -#ifdef DEBUG - cout << "OnlineConfig::GetDrawCommand(" << page << "," - << nCommand << ")" << endl; -#endif + if(fVerbosity > 1){ + cout<<__PRETTY_FUNCTION__<<"\t"<<__LINE__<=1) { out_command[0] = sConfFile[index][0]; } + if(sConfFile[index].size()>=2) { if((sConfFile[index][1] != "-type") && (sConfFile[index][1] != "-title") && @@ -457,21 +449,19 @@ vector OnlineConfig::GetDrawCommand(UInt_t page, UInt_t nCommand) out_command[4] = sConfFile[index][i+1]; i = i+1; } + } -#ifdef DEBUG + if(fVerbosity>=1){ + cout << sConfFile[index].size() << ": "; + for(UInt_t i=0; i Date: Mon, 11 Mar 2019 11:43:46 -0400 Subject: [PATCH 075/102] instructions for verbosity --- panguin/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panguin/README.md b/panguin/README.md index 8e471389b..b1ebf8b82 100644 --- a/panguin/README.md +++ b/panguin/README.md @@ -27,6 +27,12 @@ This will read in the configuration files and execute the commands within. ``` This can(should) be used in conjuction with the previous options. It will use your config file (or the default) to print a file called summaryplots.pdf with plots generated from the rootfile it reads. +### V option +``` +./build/panguin -v N +``` + This will run with a verbosity level of N (higher is more noisy). + ## Online monitor With the **watchfile** option enabled the GUI will reload the file every 30 s and will redraw the current canvas (for default usage please look at defaultOnline.cfg). From 1e1ad3c79f642655f2d682f7ba1cf4eef5166516 Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Tue, 12 Mar 2019 16:14:19 -0400 Subject: [PATCH 076/102] Undoing the cleanup commit to allow for merging with operations later --- panguin/macros/Makefile | 5 + panguin/macros/asymmetryPlot_compile.C | 120 ++++++++++++++++++++++ panguin/macros/asymmetryPlot_diffs.C | 46 +++++++++ panguin/macros/asymmetryPlot_example.C | 87 ++++++++++++++++ panguin/macros/asymmetryPlot_modular.C | 66 ++++++++++++ panguin/macros/asymmetryPlot_vector.C | 35 +++++++ panguin/macros/asymmetryPlot_wrapper.C | 98 ++++++++++++++++++ panguin/macros/autoCorrelation.C | 90 ++++++++++++++++ panguin/macros/autoCorrelation_panguin.C | 73 +++++++++++++ panguin/macros/defaultOnline.cfg | 18 ++++ panguin/macros/exampleCFG2.cfg | 32 ++++++ panguin/macros/japan_compiled_example.cfg | 62 +++++++++++ panguin/macros/japan_example.cfg | 80 +++++++++++++++ panguin/macros/japan_macro_example.cfg | 53 ++++++++++ panguin/macros/japan_modular_example.cfg | 70 +++++++++++++ panguin/macros/japantypes.hh | 19 ++++ panguin/macros/setPlotStyle.C | 20 ++++ 17 files changed, 974 insertions(+) create mode 100644 panguin/macros/Makefile create mode 100644 panguin/macros/asymmetryPlot_compile.C create mode 100644 panguin/macros/asymmetryPlot_diffs.C create mode 100644 panguin/macros/asymmetryPlot_example.C create mode 100644 panguin/macros/asymmetryPlot_modular.C create mode 100644 panguin/macros/asymmetryPlot_vector.C create mode 100644 panguin/macros/asymmetryPlot_wrapper.C create mode 100644 panguin/macros/autoCorrelation.C create mode 100644 panguin/macros/autoCorrelation_panguin.C create mode 100644 panguin/macros/defaultOnline.cfg create mode 100644 panguin/macros/exampleCFG2.cfg create mode 100644 panguin/macros/japan_compiled_example.cfg create mode 100644 panguin/macros/japan_example.cfg create mode 100644 panguin/macros/japan_macro_example.cfg create mode 100644 panguin/macros/japan_modular_example.cfg create mode 100644 panguin/macros/japantypes.hh create mode 100644 panguin/macros/setPlotStyle.C diff --git a/panguin/macros/Makefile b/panguin/macros/Makefile new file mode 100644 index 000000000..b00b48672 --- /dev/null +++ b/panguin/macros/Makefile @@ -0,0 +1,5 @@ +make testComp: + g++ -g -c asymmetryPlot_compile.C -o comp.o `root-config --cflags --glibs` + g++ comp.o -o compTest `root-config --cflags --glibs` + rm comp.o + diff --git a/panguin/macros/asymmetryPlot_compile.C b/panguin/macros/asymmetryPlot_compile.C new file mode 100644 index 000000000..4eb70adc2 --- /dev/null +++ b/panguin/macros/asymmetryPlot_compile.C @@ -0,0 +1,120 @@ +/************************************************************** + * * + * Author: Cameron Clarke * + * Date: 1-31-2019 * + * Title: asymmetryPlot_example(string channel) * + * Purpose: A script that loops through patterns and generates* + * a new branch with the asymmetries in it. This is * + * intended simply to serve as an example of how to * + * properly access a JAPAN output tree, define a * + * struct to store the data itself, and then make a * + * new tree (or any other manipulation) to look at * + * your results. This is a fully functioning macro * + * in PANGUIN and in ROOT in general as well, and it * + * only represents one possible way of accessing and * + * manipulating JAPAN ROOT output. * + * * + **************************************************************/ + +#include +#include +#include +#include "TTree.h" +#include "TFile.h" +#include "TCanvas.h" +#include +#include +#include +//#include "japantypes.hh" + +int main(int argc, char **argv) +{ + std::string rootfile = "run_1033.root"; + std::string channel = "usr"; + //std::string number = "1111"; + if (argc <= 1 || argc > 3) + { + std::cerr << "Usage: ./compTest char*:rootfileName char*:variable" << std::endl; + exit(0); + } + if (argc >= 2) + { + std::string fileName(argv[1]); + rootfile = fileName; + } + if (argc >= 3) + { + std::string channelName(argv[2]); + channel = channelName; + } + // number = parsed filename, so just the number part. + //int first = 0; + //int last = 99; + //first = rootfile.find("_"); + //last = rootfile.find("."); + //number = rootfile.substr(first+1,last-4).c_str(); + + // To grab the root tree output we can assume that PANGUIN has successfully opened a root file + TFile *oldFile = new TFile(rootfile.c_str(),"READ"); + TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); + TTree *oldEventTree = (TTree*)oldFile->Get("Mps_Tree"); + std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); + // Find out how many entries are in the tree so we can loop over the pattern tree later + Int_t numEntries = oldPatternTree->GetEntries(); + // Make a new ROOT tree to store the new data in (this is just an academic example) + TTree *newPatternTree; + TFile *resultsFile; + //std::string outputFile = Form("second_pass_%s_%s.root",number.c_str(),channel.c_str()); + std::string outputFile = Form("second_pass_%s.root",channel.c_str()); + // Check to see if analysis has been run before + std::ifstream file(outputFile.c_str()); + if(!file){ + // Write a new root file for output + resultsFile = new TFile(outputFile.c_str(),"RECREATE"); + // Create a new tree to store results in + newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); + + // Make an instance of the struct we need to read the old Tree's data + typedef struct { + Double_t hw_sum; + Double_t block0; + Double_t block1; + Double_t block2; + Double_t block3; + Double_t numsamp; + Double_t errorcode; + } PATTERNASYMS; + PATTERNASYMS patternAsyms; + // Assign that instance to the new ROOT tree's branch location of interest + oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); + oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); + + // Make a double to hold the data that is the result of our manipulation + Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor + // Make a new branch to hold the data, but this object is ideally not manipulated much + TBranch *patternNoisesBranch; + // Assign that branch to hold the double we made earlier as the contents of each entry + patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); + for (int j = 0; j < numEntries; j++) { + // Loop over the input file's entries and fill the new tree with the results of one of the leaves + oldPatternTree->GetEntry(j); + patternNoises=patternAsyms.hw_sum; + newPatternTree->Fill(); + } + // Save your root tree for later use + resultsFile->Write(); + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); + } + // Draw your results + else{ + resultsFile = new TFile(outputFile.c_str(),"READ"); + newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); + } + + delete newPatternTree; + resultsFile->Close(); + delete resultsFile; + delete oldFile; + return 0; +} diff --git a/panguin/macros/asymmetryPlot_diffs.C b/panguin/macros/asymmetryPlot_diffs.C new file mode 100644 index 000000000..a268ed7b7 --- /dev/null +++ b/panguin/macros/asymmetryPlot_diffs.C @@ -0,0 +1,46 @@ +/************************************************************** + * * + * Author: Cameron Clarke * + * Date: 1-31-2019 * + * Purpose: A script that loops through events in the * + * event-based tree and generates auto-correlations * + * and also estimates the helicity pattern-tree and * + * the alternating-pair-wise ppm asymmetry noise * + * floor for a ~7 volt signal or a mid-range scaler * + * * + **************************************************************/ + +#include +#include +#include +#include "TTree.h" + +void asymmetryPlot(std::string channel) { + + gStyle->SetOptStat(0); + + TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); + Int_t numEntries = oldPatternTree->GetEntries(); + std::cout<<"N entries = "<SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); + + Double_t patternNoises; + TBranch *patternNoisesBranch; + patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); + for (int j = 0; j < numEntries-1; j++) { + oldPatternTree->GetEntry(j); + patternNoises=patternAsyms.hw_sum; + oldPatternTree->GetEntry(j+1); + patternNoises-=patternAsyms.hw_sum; + newPatternTree->Fill(); + } + oldPatternTree->Draw(Form("asym_%s",channel.c_str())); + newPatternTree->SetLineColor(2); + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str()),"","same"); + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); +} diff --git a/panguin/macros/asymmetryPlot_example.C b/panguin/macros/asymmetryPlot_example.C new file mode 100644 index 000000000..bcd99f6c8 --- /dev/null +++ b/panguin/macros/asymmetryPlot_example.C @@ -0,0 +1,87 @@ +/************************************************************** + * * + * Author: Cameron Clarke * + * Date: 1-31-2019 * + * Title: asymmetryPlot_example(string channel) * + * Purpose: A script that loops through patterns and generates* + * a new branch with the asymmetries in it. This is * + * intended simply to serve as an example of how to * + * properly access a JAPAN output tree, define a * + * struct to store the data itself, and then make a * + * new tree (or any other manipulation) to look at * + * your results. This is a fully functioning macro * + * in PANGUIN and in ROOT in general as well, and it * + * only represents one possible way of accessing and * + * manipulating JAPAN ROOT output. * + * * + **************************************************************/ + +#include +#include +#include +#include "TTree.h" +//#include "japantypes.hh" + +void asymmetryPlot_example(std::string channel) { + + gStyle->SetOptStat(0); + + // To grab the root tree output we can assume that PANGUIN has successfully opened a root file + TFile *oldFile = gFile; + TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); + std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); + // Find out how many entries are in the tree so we can loop over the pattern tree later + Int_t numEntries = oldPatternTree->GetEntries(); + // Make a new ROOT tree to store the new data in (this is just an academic example) + TTree *newPatternTree; + TFile *resultsFile; + std::string outputFile = Form("second_pass_%s.root",channel.c_str()); + // Check to see if analysis has been run before + if(gSystem->AccessPathName(outputFile.c_str())){ + // Write a new root file for output + resultsFile = new TFile(outputFile.c_str(),"RECREATE"); + // Create a new tree to store results in + newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); + + // Make an instance of the struct we need to read the old Tree's data + typedef struct { + Double_t hw_sum; + Double_t block0; + Double_t block1; + Double_t block2; + Double_t block3; + Double_t numsamp; + Double_t errorcode; + } PATTERNASYMS; + PATTERNASYMS patternAsyms; + // Assign that instance to the new ROOT tree's branch location of interest + oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); + + // Make a double to hold the data that is the result of our manipulation + Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor + // Make a new branch to hold the data, but this object is ideally not manipulated much + TBranch *patternNoisesBranch; + // Assign that branch to hold the double we made earlier as the contents of each entry + patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); + for (int j = 0; j < numEntries; j++) { + // Loop over the input file's entries and fill the new tree with the results of one of the leaves + oldPatternTree->GetEntry(j); + patternNoises=patternAsyms.hw_sum; + newPatternTree->Fill(); + } + // Save your root tree for later use + resultsFile->Write(); + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); + } + // Draw your results + else{ + resultsFile = new TFile(outputFile.c_str(),"READ"); + newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); + } + + delete newPatternTree; + resultsFile->Close(); + delete resultsFile; + gFile=oldFile; +} diff --git a/panguin/macros/asymmetryPlot_modular.C b/panguin/macros/asymmetryPlot_modular.C new file mode 100644 index 000000000..197c29e3b --- /dev/null +++ b/panguin/macros/asymmetryPlot_modular.C @@ -0,0 +1,66 @@ +/************************************************************** + * * + * Author: Cameron Clarke * + * Date: 1-31-2019 * + * Title: asymmetryPlot_modular(string channel) * + * Purpose: A script that loops through patterns and generates* + * a new branch with the asymmetries in it. This is * + * intended simply to serve as an example of how to * + * properly access a JAPAN output tree, define a * + * struct to store the data itself, and then make a * + * new tree (or any other manipulation) to look at * + * your results. This is a fully functioning macro * + * in PANGUIN and in ROOT in general as well, and it * + * only represents one possible way of accessing and * + * manipulating JAPAN ROOT output. * + * * + **************************************************************/ + +#include +#include +#include +#include "TTree.h" +#include "japantypes.hh" + +void asymmetryPlot_modular(std::string channel) { + + gStyle->SetOptStat(0); + + // Make an instance of the relevant data type's struct + PATTERNASYMS patternAsyms; + + std::string tree = "Hel_Tree"; + std::string modifier = "noise"; + std::string description = "Tree of Pattern based noise"; + + // To grab the root tree output we can assume that PANGUIN has successfully opened a root file + TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); + // Assign that instance to the new ROOT tree's branch location of interest + oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); + // Make a new ROOT tree to store the new data in (this is just an academic example) + TTree *newPatternTree = new TTree(Form("%s_%s",modifier.c_str(),tree.c_str()),Form("%s",description.c_str())); + + // Make a double to hold the data that is the result of our manipulation + Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor + //PATTERNASYMS patternBranches; + // Make a new branch to hold the data, but this object is ideally not manipulated much + TBranch *patternNoisesBranch; + //TBranch *patternBranch; + // Assign that branch to hold the double we made earlier as the contents of each entry + patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); + //patternBranch = newPatternTree->Branch(Form("pattern_%s",channel.c_str()), &patternBranches); + + // Find out how many entries are in the tree so we can loop over the pattern tree later + Int_t numEntries = oldPatternTree->GetEntries(); + + for (int j = 0; j < numEntries; j++) { + // Loop over the input file's entries and fill the new tree with the results of one of the leaves + oldPatternTree->GetEntry(j); + patternNoises = patternAsyms.hw_sum; + //patternBranches = fillPATTERNASYMS(patternAsyms); + newPatternTree->Fill(); + } + // Draw your results + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); + //newPatternTree->Draw(Form("pattern_%s",channel.c_str())); +} diff --git a/panguin/macros/asymmetryPlot_vector.C b/panguin/macros/asymmetryPlot_vector.C new file mode 100644 index 000000000..e2fb01633 --- /dev/null +++ b/panguin/macros/asymmetryPlot_vector.C @@ -0,0 +1,35 @@ +/************************************************************** + * * + * Author: Cameron Clarke * + * Date: 1-31-2019 * + * Purpose: A script that loops through events in the * + * event-based tree and generates auto-correlations * + * and also estimates the helicity pattern-tree and * + * the alternating-pair-wise ppm asymmetry noise * + * floor for a ~7 volt signal or a mid-range scaler * + * * + **************************************************************/ + +#include +#include +#include "TTree.h" + +void asymmetryPlot(std::string channel) { + + gStyle->SetOptStat(0); + + TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); + TTree *newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); + + std::vector < Double_t > *patternAsyms = 0; + oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()) , &patternAsyms ); + + // Calculate noise floor from pattern tree directly, no steps for this + std::vector < Double_t > *patternNoises; + newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); + for (size_t i = 0; i < oldPatternTree->GetEntries(); i++) { + oldPatternTree->GetEntry(i); + patternNoises->push_back(patternAsyms->at(patternAsyms->size()-1)); + } + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); +} diff --git a/panguin/macros/asymmetryPlot_wrapper.C b/panguin/macros/asymmetryPlot_wrapper.C new file mode 100644 index 000000000..86f85cdf0 --- /dev/null +++ b/panguin/macros/asymmetryPlot_wrapper.C @@ -0,0 +1,98 @@ +/************************************************************** + * * + * Author: Cameron Clarke * + * Date: 1-31-2019 * + * Title: asymmetryPlot_example(string channel) * + * Purpose: A script that loops through patterns and generates* + * a new branch with the asymmetries in it. This is * + * intended simply to serve as an example of how to * + * properly access a JAPAN output tree, define a * + * struct to store the data itself, and then make a * + * new tree (or any other manipulation) to look at * + * your results. This is a fully functioning macro * + * in PANGUIN and in ROOT in general as well, and it * + * only represents one possible way of accessing and * + * manipulating JAPAN ROOT output. * + * * + **************************************************************/ + +#include +#include +#include +#include "TTree.h" +//#include "japantypes.hh" + +void asymmetryPlot_wrapper(std::string channel) { + + gStyle->SetOptStat(0); + + // To grab the root tree output we can assume that PANGUIN has successfully opened a root file + TFile *oldFile = gFile; + TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); + //std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); + // Find out how many entries are in the tree so we can loop over the pattern tree later + Int_t numEntries = oldPatternTree->GetEntries(); + // Make a new ROOT tree to store the new data in (this is just an academic example) + TTree *newPatternTree; + TFile *resultsFile; + + //std::string number = "1111"; + + //number = dir.substr(dir.find("_")+1,4).c_str(); + //std::string outputFile = Form("second_pass_%s_%s.root",number.c_str(),channel.c_str()); + std::string outputFile = Form("second_pass_%s.root",channel.c_str()); + //gSystem->Exec(Form("CURRENT_RUN=%s"),dir.substr(dir.find("_")+1,4).c_str()); + + // Check to see if analysis has been run before + //gSystem->Exec(Form("ln -sf ${QW_ROOTFILES}/prex*%s.root run_%s.root",number.c_str(),number.c_str())); + //gSystem->Exec(Form("./compTest run_%s.root %s",number.c_str(),channel.c_str())); + gSystem->Exec(Form("./compTest run.root %s",channel.c_str())); + if(gSystem->AccessPathName(outputFile.c_str())){ + // Write a new root file for output + resultsFile = new TFile(outputFile.c_str(),"RECREATE"); + // Create a new tree to store results in + newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); + + // Make an instance of the struct we need to read the old Tree's data + typedef struct { + Double_t hw_sum; + Double_t block0; + Double_t block1; + Double_t block2; + Double_t block3; + Double_t numsamp; + Double_t errorcode; + } PATTERNASYMS; + PATTERNASYMS patternAsyms; + // Assign that instance to the new ROOT tree's branch location of interest + oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); + + // Make a double to hold the data that is the result of our manipulation + Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor + // Make a new branch to hold the data, but this object is ideally not manipulated much + TBranch *patternNoisesBranch; + // Assign that branch to hold the double we made earlier as the contents of each entry + patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); + for (int j = 0; j < numEntries; j++) { + // Loop over the input file's entries and fill the new tree with the results of one of the leaves + oldPatternTree->GetEntry(j); + patternNoises=patternAsyms.hw_sum; + newPatternTree->Fill(); + } + // Save your root tree for later use + resultsFile->Write(); + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); + } + // Draw your results + else{ + resultsFile = new TFile(outputFile.c_str(),"READ"); + newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); + newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); + } + + delete newPatternTree; + resultsFile->Close(); + delete resultsFile; + //delete dir; + gFile=oldFile; +} diff --git a/panguin/macros/autoCorrelation.C b/panguin/macros/autoCorrelation.C new file mode 100644 index 000000000..7b4078e25 --- /dev/null +++ b/panguin/macros/autoCorrelation.C @@ -0,0 +1,90 @@ +/************************************************************** + * * + * Author: Cameron Clarke * + * Date: 1-31-2019 * + * Purpose: A script that loops through events in the * + * event-based tree and generates auto-correlations * + * and also estimates the helicity pattern-tree and * + * the alternating-pair-wise ppm asymmetry noise * + * floor for a ~7 volt signal or a mid-range scaler * + * * + **************************************************************/ + +void autoCorrelation(TString channel, TString drawoption, Int_t n_steps = 1, Bool_t just_noise_floor=false, Bool_t just_auto_correlation=false, Bool_t ignore_helicity_pattern) { + + gStyle->SetOptStat(0); + + TTree *oldEventTree = (TTree*)gDirectory->Get("Mps_Tree"); + TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); + TTree *newEventTree = new TTree("noise_Mps_Tree","Tree of Event based noise"); + TTree *newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); + + std::vector < Double_t > *dataValues = 0; + std::vector < Int_t > *evNums = 0; + std::vector < Double_t > *patternAsyms = 0; + + oldEventTree->SetBranchAddress( Form("%s",channel) , &dataValues ); + oldEventTree->SetBranchAddress( Form("event_number") , &evNums ); + oldPatternTree->SetBranchAddress( Form("asym_%s",channel) , &patternAsyms ); + + const int nStepsToCheck = 10; + // Calculate nStepsToCheck number of event separated (event based) differences of yields and asymmetry + std::vector < Double_t > newEvNums[nStepsToCheck]; + Double_t stepValues[nStepsToCheck] = {0.0}; // Array of steps, where the index refers to how many events ago the data refers to + std::vector < Double_t > stepNoises[nStepsToCheck]; + std::vector < Double_t > relNoises[nStepsToCheck]; + // Calculate noise floor from pattern tree directly, no steps for this + std::vector < Double_t > *patternNoises; + for (int steps = 0; steps < nStepsToCheck; steps++) { + newEventTree->Branch(Form("event_number") , newEvNums[steps] ); + newEventTree->Branch(Form("values_%dstep_%s",steps+1,channel) , stepValues[steps] ); + newEventTree->Branch(Form("step_%dstep_%s",steps+1,channel) , stepNoises[steps] ); + newEventTree->Branch(Form("rel_%dstep_%s",steps+1,channel) , relNoises[steps] ); + } + newPatternTree->Branch(Form("pattern_noise_%s",channel) , &patternNoises ); + // Assume we start at event 0, and use this variable to check for skipped events (due to decoding errors or DAQ deadtime problems) + Int_t prior_event_number = 0; + Int_t current_event_number = 1; + Double_t noise_step = 0.0; + Double_t noise_rel = 0.0; + + for (size_t i = 0; i < eventTree->GetEntries(); i++) { + eventTree->GetEntry(i); + // There should only ever be one value in each branch per entry, so checking for the length is overkill - just use the last value for safety + //// for (size_t j = 0; j < evnum->size(); j++) + current_event_number = evNums->at(evnum->size()-1); + if (current_event_number != (1 + prior_event_number)) { + // If an event is skipped then update the current run number and loop back through, skipping calculations + prior_event_number = current_event_number; + } + else { + for (int steps1 = nStepsToCheck-1; steps1 > 0; steps1--) { // Shift all data by 1 upwards in the array + stepValues[steps1] = stepValues[steps-1]; + } + stepValues[0] = dataValues->at(dataValues->size()-1); // Grab the new data value - Get the last value in the branch for this event, because I am paranoid + if ((current_event_number-prior_event_number)>nStepsToCheck){ + for (int steps2 = 0; steps2 < nStepsToCheck; steps2++) { + noise_step = stepValues[steps2] - stepValues[0]; // Take the difference w.r.t. the step2-th previous value + noise_rel = (stepValues[steps2] - stepValues[0])/(stepValues[step2] + stepValues[0]); + // Take the relative difference (pair asymmetry) w.r.t. the step2-th previous value + stepNoises[steps2].push_back(noise_step); + relNoises[steps2].push_back(noise_rel); + } + } + } + prior_event_number = current_event_number; + } + + for (int steps3 = 0; steps3 < nStepsToCheck; steps3++) { + c1->cd(steps3); + newEventTree->Draw(Form("rel_%dstep_%s",step3+1,channel)); + } + + if (!ignore_helicity_pattern){ + for (size_t i = 0; i < patternTree->GetEntries(); i++) { + patternTree->GetEntry(i); + patternNoises.push_back(patternAsyms->at(patternAsyms->size()-1)); + } + newPatternTree->Draw(); + } +} diff --git a/panguin/macros/autoCorrelation_panguin.C b/panguin/macros/autoCorrelation_panguin.C new file mode 100644 index 000000000..77d0e8770 --- /dev/null +++ b/panguin/macros/autoCorrelation_panguin.C @@ -0,0 +1,73 @@ +/************************************************************** + * * + * Author: Cameron Clarke * + * Date: 1-31-2019 * + * Purpose: A script that loops through events in the * + * event-based tree and generates auto-correlations * + * and the alternating-pair-wise ppm asymmetry noise * + * floor for a ~7 volt signal or a mid-range scaler * + * * + **************************************************************/ + +void autoCorrelation(TString channel, TString drawoption, Int_t n_steps = 1, Bool_t just_noise_floor=false, Bool_t just_auto_correlation=false) { + + gStyle->SetOptStat(0); + + TTree *oldEventTree = (TTree*)gDirectory->Get("Mps_Tree"); + TTree *newEventTree = new TTree("noise_Mps_Tree","Tree of Event based noise"); + + std::vector < Double_t > *dataValues = 0; + std::vector < Int_t > *evNums = 0; + + oldEventTree->SetBranchAddress( Form("%s",channel) , &dataValues ); + oldEventTree->SetBranchAddress( Form("event_number") , &evNums ); + + const int nStepsToCheck = 10; + // Calculate nStepsToCheck number of event separated (event based) differences of yields and asymmetry + std::vector < Double_t > newEvNums[nStepsToCheck]; + Double_t stepValues[nStepsToCheck] = {0.0}; // Array of steps, where the index refers to how many events ago the data refers to + std::vector < Double_t > stepNoises[nStepsToCheck]; + std::vector < Double_t > relNoises[nStepsToCheck]; + for (int steps = 0; steps < nStepsToCheck; steps++) { + newEventTree->Branch(Form("event_number") , newEvNums[steps] ); + newEventTree->Branch(Form("values_%dstep_%s",steps+1,channel) , stepValues[steps] ); + newEventTree->Branch(Form("step_%dstep_%s",steps+1,channel) , stepNoises[steps] ); + newEventTree->Branch(Form("rel_%dstep_%s",steps+1,channel) , relNoises[steps] ); + } + // Assume we start at event 0, and use this variable to check for skipped events (due to decoding errors or DAQ deadtime problems) + Int_t prior_event_number = 0; + Int_t current_event_number = 1; + Double_t noise_step = 0.0; + Double_t noise_rel = 0.0; + + for (size_t i = 0; i < eventTree->GetEntries(); i++) { + eventTree->GetEntry(i); + // There should only ever be one value in each branch per entry, so checking for the length is overkill - just use the last value for safety + //// for (size_t j = 0; j < evnum->size(); j++) + current_event_number = evNums->at(evnum->size()-1); + if (current_event_number != (1 + prior_event_number)) { + // If an event is skipped then update the current run number and loop back through, skipping calculations + prior_event_number = current_event_number; + } + else { + for (int steps1 = nStepsToCheck-1; steps1 > 0; steps1--) { // Shift all data by 1 upwards in the array + stepValues[steps1] = stepValues[steps-1]; + } + stepValues[0] = dataValues->at(dataValues->size()-1); // Grab the new data value - Get the last value in the branch for this event, because I am paranoid + if ((current_event_number-prior_event_number)>nStepsToCheck){ + for (int steps2 = 0; steps2 < nStepsToCheck; steps2++) { + if (steps2 == n_steps){ + noise_step = stepValues[steps2] - stepValues[0]; // Take the difference w.r.t. the step2-th previous value + noise_rel = (stepValues[steps2] - stepValues[0])/(stepValues[step2] + stepValues[0]); + // Take the relative difference (pair asymmetry) w.r.t. the step2-th previous value + stepNoises[steps2].push_back(noise_step); + relNoises[steps2].push_back(noise_rel); + } + } + } + } + prior_event_number = current_event_number; + } + + newEventTree->Draw(Form("rel_%dstep_%s",step3+1,channel)); +} diff --git a/panguin/macros/defaultOnline.cfg b/panguin/macros/defaultOnline.cfg new file mode 100644 index 000000000..0e67c1636 --- /dev/null +++ b/panguin/macros/defaultOnline.cfg @@ -0,0 +1,18 @@ +# Configuration file for the online GUI +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +# Uncomment the below line to monitor the fill of a ROOTfile. +watchfile + +# Defined cuts +definecut evcut (CodaEventNumber>10) + +### column row +newpage 1 1 + title BCMs vs Event Number + bcm_us:CodaEventNumber evcut -type scat -title "BCM1 vs Eventnumber" + diff --git a/panguin/macros/exampleCFG2.cfg b/panguin/macros/exampleCFG2.cfg new file mode 100644 index 000000000..fb44286ef --- /dev/null +++ b/panguin/macros/exampleCFG2.cfg @@ -0,0 +1,32 @@ +# Configuration file for the online GUI +# This file is for ADCs +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +# Usage: exampleMacro2(std::string title, std::string draws, std:;string cuts,int binsx, double binlowx, double binhighx, int binsy, double binlowy, double binhighy) + +# Default root file to look at +#rootfile pan.root +rootfile /adaq1/work1/apar/japanOutput/prexALL_1098.root +##rootfile /adaq1/work1/apar/ciprian/parity18_4416_standard.root +##rootfile /dev/shm//QwMemMapFile.map + +# Prototype rootfilename.. overrides GetRootFileName.C +##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root +#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root + +# Defined cuts +definecut evcut (pattern_number>1) +definecut cuts (CodaEventNumber>10) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 1 2 + title SAMs test + macro ./macros/exampleMacro2.C("BPM4A-x-vs-y","bpm4aX:bpm4aY","bcm_an_ds10>10",100,2.4,2.55,100,1.9,2.1) + macro ./macros/exampleMacro2.C("BPM4E-x-vs-y","bpm4eX:bpm4eY","bcm_an_ds10>10",100,2.1,2.4,100,0.90,1.30) diff --git a/panguin/macros/japan_compiled_example.cfg b/panguin/macros/japan_compiled_example.cfg new file mode 100644 index 000000000..cfca5b5fc --- /dev/null +++ b/panguin/macros/japan_compiled_example.cfg @@ -0,0 +1,62 @@ +# Configuration file for the online GUI +# This file is for ADCs +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +# Valid entries include: +# To create a new TCanvas with a set number of plots in it +# Specify with: newpage [x] [y] [TCanvas options] +# Tree drawing +# Specify with: +# Variable drawing +# Specify with: [variables] [cuts] -type [type] -title [title] -tree [tree name] +# Page title setting: +# Specify with: title Your Title Here +# Macro execution +# Specify with: macro path/to/macro.C(options) +# Additional options: +# -noshow golden + +# Default root file to look at +#rootfile pan.root +#goldenrootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root +##rootfile /dev/shm/QwMemMapFile.map + +# Prototype rootfilename.. overrides GetRootFileName.C + ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root +#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 1 2 + title Color Test + yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type * + macro ./macros/setPlotStyle.C() + yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type COLZ + +newpage 2 2 + title Noise Floor Test + macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch7") + macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch6") + macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch5") + macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch4") + +newpage 2 4 + title Noise Floor Test + macro ./macros/asymmetryPlot_wrapper.C("sam1") + macro ./macros/asymmetryPlot_wrapper.C("sam2") + macro ./macros/asymmetryPlot_wrapper.C("sam3") + macro ./macros/asymmetryPlot_wrapper.C("sam4") + macro ./macros/asymmetryPlot_wrapper.C("sam5") + macro ./macros/asymmetryPlot_wrapper.C("sam6") + macro ./macros/asymmetryPlot_wrapper.C("sam7") + macro ./macros/asymmetryPlot_wrapper.C("sam8") diff --git a/panguin/macros/japan_example.cfg b/panguin/macros/japan_example.cfg new file mode 100644 index 000000000..428ac6cf3 --- /dev/null +++ b/panguin/macros/japan_example.cfg @@ -0,0 +1,80 @@ +# Configuration file for the online GUI +# This file is for ADCs +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +# Default root file to look at +#rootfile pan.root +rootfile /adaq1/work1/apar/japanOutput/prexALL_1098.root +##rootfile /adaq1/work1/apar/ciprian/parity18_4416_standard.root +##rootfile /dev/shm//QwMemMapFile.map + +# Prototype rootfilename.. overrides GetRootFileName.C + ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root +#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 1 4 + title BCMs vs Event Number + bcm0l02:event_number evcut -type scat -title "BCM0L02 vs Eventnumber" + bcm_us:event_number -title "BCM upstream vs Event Number" -type box + (-1*bcm_ds):event_number evcut -type prof -title "BCM downstream Profile example" -tree Mps_Tree + (1-bcm_us/bcm_ds):(event_number*3600) bcmds_cut -title "What is this?" -tree Mps_Tree + +newpage 1 2 + title BCM asymmetries + asym_bcm_us ErrorFlag==0 + asym_bcm_ds ErrorFlag==0 + +newpage 2 4 + title LHRS channel yields + yield_usl ErrorFlag==0&&yield_usl.Device_Error_Code==0 + yield_dsl ErrorFlag==0&&yield_dsl.Device_Error_Code==0 + yield_atl1 ErrorFlag==0&&yield_atl1.Device_Error_Code==0 + yield_atl2 ErrorFlag==0&&yield_atl2.Device_Error_Code==0 + yield_vqwk_25_0ch4 ErrorFlag==0&&yield_vqwk_25_0ch4.Device_Error_Code==0 + yield_vqwk_25_0ch5 ErrorFlag==0&&yield_vqwk_25_0ch5.Device_Error_Code==0 + yield_vqwk_25_0ch6 ErrorFlag==0&&yield_vqwk_25_0ch6.Device_Error_Code==0 + yield_vqwk_25_0ch7 ErrorFlag==0&&yield_vqwk_25_0ch7.Device_Error_Code==0 + +newpage 2 4 + title LHRS channel asymmetries + asym_usl ErrorFlag==0&&asym_usl.Device_Error_Code==0 + asym_dsl ErrorFlag==0&&asym_dsl.Device_Error_Code==0 + asym_atl1 ErrorFlag==0&&asym_atl1.Device_Error_Code==0 + asym_atl2 ErrorFlag==0&&asym_atl2.Device_Error_Code==0 + asym_vqwk_25_0ch4 ErrorFlag==0&&asym_vqwk_25_0ch4.Device_Error_Code==0 + asym_vqwk_25_0ch5 ErrorFlag==0&&asym_vqwk_25_0ch5.Device_Error_Code==0 + asym_vqwk_25_0ch6 ErrorFlag==0&&asym_vqwk_25_0ch6.Device_Error_Code==0 + asym_vqwk_25_0ch7 ErrorFlag==0&&asym_vqwk_25_0ch7.Device_Error_Code==0 + +newpage 2 4 + title LHRS channel double differences to asym_dsl + asym_usl-asym_dsl ErrorFlag==0&&asym_usl.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 + asym_dsl ErrorFlag==0&&asym_dsl.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 + asym_atl1-asym_dsl ErrorFlag==0&&asym_atl1.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 + asym_atl2-asym_dsl ErrorFlag==0&&asym_atl2.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 + asym_vqwk_25_0ch4-asym_dsl ErrorFlag==0&&asym_vqwk_25_0ch4.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 + asym_vqwk_25_0ch5-asym_dsl ErrorFlag==0&&asym_vqwk_25_0ch5.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 + asym_vqwk_25_0ch6-asym_dsl ErrorFlag==0&&asym_vqwk_25_0ch6.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 + asym_vqwk_25_0ch7-asym_dsl ErrorFlag==0&&asym_vqwk_25_0ch7.Device_Error_Code==0&&abs(asym_dsl)>1.0e-4 + +newpage 2 4 + title SAMs + asym_sam1 + asym_sam2 + asym_sam3 + asym_sam4 + asym_sam5 + asym_sam6 + asym_sam7 + asym_sam8 diff --git a/panguin/macros/japan_macro_example.cfg b/panguin/macros/japan_macro_example.cfg new file mode 100644 index 000000000..15ecb011c --- /dev/null +++ b/panguin/macros/japan_macro_example.cfg @@ -0,0 +1,53 @@ +# Configuration file for the online GUI +# This file is for ADCs +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +# Valid entries include: +# To create a new TCanvas with a set number of plots in it +# Specify with: newpage [x] [y] [TCanvas options] +# Tree drawing +# Specify with: +# Variable drawing +# Specify with: variables cuts -type [type] -title [title] -tree [tree name] +# Page title setting: +# Specify with: title Your Title Here +# Macro execution +# Specify with: macro path/to/macro.C(options) +# Additional options: +# -noshow golden + +# Default root file to look at +#rootfile pan.root +#goldenrootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root +##rootfile /dev/shm/QwMemMapFile.map + +# Prototype rootfilename.. overrides GetRootFileName.C + ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root +#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 1 2 + title Color Test + yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type * + macro ./macros/setPlotStyle.C() + yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type COLZ + +newpage 1 5 + title Noise Floor Test + asym_vqwk_26_0ch7 + macro ./macros/asymmetryPlot_example.C("vqwk_26_0ch7") + asym_vqwk_26_0ch6 pattern_number>10 + macro ./macros/asymmetryPlot_example.C("vqwk_26_0ch6") + macro ./macros/asymmetryPlot_example.C("vqwk_26_0ch5") + macro ./macros/asymmetryPlot_example.C("vqwk_26_0ch4") diff --git a/panguin/macros/japan_modular_example.cfg b/panguin/macros/japan_modular_example.cfg new file mode 100644 index 000000000..7ca5045a2 --- /dev/null +++ b/panguin/macros/japan_modular_example.cfg @@ -0,0 +1,70 @@ +# Configuration file for the online GUI +# This file is for ADCs +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +# Valid entries include: +# To create a new TCanvas with a set number of plots in it +# Specify with: newpage [x] [y] [TCanvas options] +# Tree drawing +# Specify with: +# Variable drawing +# Specify with: variables cuts -type [type] -title [title] -tree [tree name] +# Page title setting: +# Specify with: title Your Title Here +# Macro execution +# Specify with: macro path/to/macro.C(options) +# Additional options: +# -noshow golden + +# Default root file to look at +#rootfile pan.root +#goldenrootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root +##rootfile /dev/shm/QwMemMapFile.map + +# Prototype rootfilename.. overrides GetRootFileName.C + ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root +#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 1 1 + title Noise Floor Test + macro ./macros/asymmetryPlot_modular.C("sam1") + +newpage 1 1 + title Noise Floor Test + macro ./macros/asymmetryPlot_modular.C("sam2") + +newpage 1 1 + title Noise Floor Test + macro ./macros/asymmetryPlot_modular.C("sam3") + +newpage 1 1 + title Noise Floor Test + macro ./macros/asymmetryPlot_modular.C("sam4") + +newpage 1 1 + title Noise Floor Test + macro ./macros/asymmetryPlot_modular.C("sam5") + +newpage 1 1 + title Noise Floor Test + macro ./macros/asymmetryPlot_modular.C("sam6") + +newpage 1 1 + title Noise Floor Test + macro ./macros/asymmetryPlot_modular.C("sam7") + +newpage 1 1 + title Noise Floor Test + macro ./macros/asymmetryPlot_modular.C("sam8") diff --git a/panguin/macros/japantypes.hh b/panguin/macros/japantypes.hh new file mode 100644 index 000000000..5f5f0dd77 --- /dev/null +++ b/panguin/macros/japantypes.hh @@ -0,0 +1,19 @@ +// Define a new struct that will hold the individual leaves from the branch of interest +typedef struct { + Double_t hw_sum; + Double_t block0; + Double_t block1; + Double_t block2; + Double_t block3; + Double_t numsamp; + Double_t errorcode; +} PATTERNASYMS; +typedef struct { + Double_t hw_sum; + Double_t block0; + Double_t block1; + Double_t block2; + Double_t block3; + Double_t numsamp; + Double_t errorcode; +} EVTTREE; diff --git a/panguin/macros/setPlotStyle.C b/panguin/macros/setPlotStyle.C new file mode 100644 index 000000000..904c99592 --- /dev/null +++ b/panguin/macros/setPlotStyle.C @@ -0,0 +1,20 @@ +/************************************************************** + * * + * Author: Cameron Clarke * + * Date: 1-31-2019 * + * Purpose: A script for setting a 255-level color axis * + * * + **************************************************************/ + +void setPlotStyle() +{ + const Int_t NRGBs = 5; + const Int_t NCont = 255; + // See class TColor documentation and SetPalette() command + Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 }; + Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 }; + Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 }; + Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 }; + TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont); + gStyle->SetNumberContours(NCont); +} From 3918f8ab8740340fcf68e96406e1274037562454 Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Wed, 6 Mar 2019 19:07:37 -0500 Subject: [PATCH 077/102] Deleting unneccessary macros that were just a stab at doing too much in a too complicated way. Cameron has copied them to his own work-space and will pursue the macro-as-generic plotter technique developed in exampleMacro2.C instead. APEX has some nice macros that show how to grab a run-number from environment variables in case the macro is being run from within panguin and the run-number integer needs to be obtained for log file printing or for more convenient legend production. This feature can be added at a later time, and requires using shell wrapper scripts that take the -r parameter and set an environment variable with it. --- panguin/macros/Makefile | 5 - panguin/macros/asymmetryPlot_compile.C | 120 ---------------------- panguin/macros/asymmetryPlot_diffs.C | 46 --------- panguin/macros/asymmetryPlot_example.C | 87 ---------------- panguin/macros/asymmetryPlot_vector.C | 35 ------- panguin/macros/asymmetryPlot_wrapper.C | 98 ------------------ panguin/macros/japan_compiled_example.cfg | 62 ----------- 7 files changed, 453 deletions(-) delete mode 100644 panguin/macros/Makefile delete mode 100644 panguin/macros/asymmetryPlot_compile.C delete mode 100644 panguin/macros/asymmetryPlot_diffs.C delete mode 100644 panguin/macros/asymmetryPlot_example.C delete mode 100644 panguin/macros/asymmetryPlot_vector.C delete mode 100644 panguin/macros/asymmetryPlot_wrapper.C delete mode 100644 panguin/macros/japan_compiled_example.cfg diff --git a/panguin/macros/Makefile b/panguin/macros/Makefile deleted file mode 100644 index b00b48672..000000000 --- a/panguin/macros/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -make testComp: - g++ -g -c asymmetryPlot_compile.C -o comp.o `root-config --cflags --glibs` - g++ comp.o -o compTest `root-config --cflags --glibs` - rm comp.o - diff --git a/panguin/macros/asymmetryPlot_compile.C b/panguin/macros/asymmetryPlot_compile.C deleted file mode 100644 index 4eb70adc2..000000000 --- a/panguin/macros/asymmetryPlot_compile.C +++ /dev/null @@ -1,120 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_example(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -#include "TFile.h" -#include "TCanvas.h" -#include -#include -#include -//#include "japantypes.hh" - -int main(int argc, char **argv) -{ - std::string rootfile = "run_1033.root"; - std::string channel = "usr"; - //std::string number = "1111"; - if (argc <= 1 || argc > 3) - { - std::cerr << "Usage: ./compTest char*:rootfileName char*:variable" << std::endl; - exit(0); - } - if (argc >= 2) - { - std::string fileName(argv[1]); - rootfile = fileName; - } - if (argc >= 3) - { - std::string channelName(argv[2]); - channel = channelName; - } - // number = parsed filename, so just the number part. - //int first = 0; - //int last = 99; - //first = rootfile.find("_"); - //last = rootfile.find("."); - //number = rootfile.substr(first+1,last-4).c_str(); - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TFile *oldFile = new TFile(rootfile.c_str(),"READ"); - TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); - TTree *oldEventTree = (TTree*)oldFile->Get("Mps_Tree"); - std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree; - TFile *resultsFile; - //std::string outputFile = Form("second_pass_%s_%s.root",number.c_str(),channel.c_str()); - std::string outputFile = Form("second_pass_%s.root",channel.c_str()); - // Check to see if analysis has been run before - std::ifstream file(outputFile.c_str()); - if(!file){ - // Write a new root file for output - resultsFile = new TFile(outputFile.c_str(),"RECREATE"); - // Create a new tree to store results in - newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - // Make an instance of the struct we need to read the old Tree's data - typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; - } PATTERNASYMS; - PATTERNASYMS patternAsyms; - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - // Save your root tree for later use - resultsFile->Write(); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - // Draw your results - else{ - resultsFile = new TFile(outputFile.c_str(),"READ"); - newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - - delete newPatternTree; - resultsFile->Close(); - delete resultsFile; - delete oldFile; - return 0; -} diff --git a/panguin/macros/asymmetryPlot_diffs.C b/panguin/macros/asymmetryPlot_diffs.C deleted file mode 100644 index a268ed7b7..000000000 --- a/panguin/macros/asymmetryPlot_diffs.C +++ /dev/null @@ -1,46 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Purpose: A script that loops through events in the * - * event-based tree and generates auto-correlations * - * and also estimates the helicity pattern-tree and * - * the alternating-pair-wise ppm asymmetry noise * - * floor for a ~7 volt signal or a mid-range scaler * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" - -void asymmetryPlot(std::string channel) { - - gStyle->SetOptStat(0); - - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); - Int_t numEntries = oldPatternTree->GetEntries(); - std::cout<<"N entries = "<SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - Double_t patternNoises; - TBranch *patternNoisesBranch; - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries-1; j++) { - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - oldPatternTree->GetEntry(j+1); - patternNoises-=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - oldPatternTree->Draw(Form("asym_%s",channel.c_str())); - newPatternTree->SetLineColor(2); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str()),"","same"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); -} diff --git a/panguin/macros/asymmetryPlot_example.C b/panguin/macros/asymmetryPlot_example.C deleted file mode 100644 index bcd99f6c8..000000000 --- a/panguin/macros/asymmetryPlot_example.C +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_example(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -//#include "japantypes.hh" - -void asymmetryPlot_example(std::string channel) { - - gStyle->SetOptStat(0); - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TFile *oldFile = gFile; - TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); - std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree; - TFile *resultsFile; - std::string outputFile = Form("second_pass_%s.root",channel.c_str()); - // Check to see if analysis has been run before - if(gSystem->AccessPathName(outputFile.c_str())){ - // Write a new root file for output - resultsFile = new TFile(outputFile.c_str(),"RECREATE"); - // Create a new tree to store results in - newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - // Make an instance of the struct we need to read the old Tree's data - typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; - } PATTERNASYMS; - PATTERNASYMS patternAsyms; - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - // Save your root tree for later use - resultsFile->Write(); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - // Draw your results - else{ - resultsFile = new TFile(outputFile.c_str(),"READ"); - newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - - delete newPatternTree; - resultsFile->Close(); - delete resultsFile; - gFile=oldFile; -} diff --git a/panguin/macros/asymmetryPlot_vector.C b/panguin/macros/asymmetryPlot_vector.C deleted file mode 100644 index e2fb01633..000000000 --- a/panguin/macros/asymmetryPlot_vector.C +++ /dev/null @@ -1,35 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Purpose: A script that loops through events in the * - * event-based tree and generates auto-correlations * - * and also estimates the helicity pattern-tree and * - * the alternating-pair-wise ppm asymmetry noise * - * floor for a ~7 volt signal or a mid-range scaler * - * * - **************************************************************/ - -#include -#include -#include "TTree.h" - -void asymmetryPlot(std::string channel) { - - gStyle->SetOptStat(0); - - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); - TTree *newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - std::vector < Double_t > *patternAsyms = 0; - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()) , &patternAsyms ); - - // Calculate noise floor from pattern tree directly, no steps for this - std::vector < Double_t > *patternNoises; - newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (size_t i = 0; i < oldPatternTree->GetEntries(); i++) { - oldPatternTree->GetEntry(i); - patternNoises->push_back(patternAsyms->at(patternAsyms->size()-1)); - } - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); -} diff --git a/panguin/macros/asymmetryPlot_wrapper.C b/panguin/macros/asymmetryPlot_wrapper.C deleted file mode 100644 index 86f85cdf0..000000000 --- a/panguin/macros/asymmetryPlot_wrapper.C +++ /dev/null @@ -1,98 +0,0 @@ -/************************************************************** - * * - * Author: Cameron Clarke * - * Date: 1-31-2019 * - * Title: asymmetryPlot_example(string channel) * - * Purpose: A script that loops through patterns and generates* - * a new branch with the asymmetries in it. This is * - * intended simply to serve as an example of how to * - * properly access a JAPAN output tree, define a * - * struct to store the data itself, and then make a * - * new tree (or any other manipulation) to look at * - * your results. This is a fully functioning macro * - * in PANGUIN and in ROOT in general as well, and it * - * only represents one possible way of accessing and * - * manipulating JAPAN ROOT output. * - * * - **************************************************************/ - -#include -#include -#include -#include "TTree.h" -//#include "japantypes.hh" - -void asymmetryPlot_wrapper(std::string channel) { - - gStyle->SetOptStat(0); - - // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TFile *oldFile = gFile; - TTree *oldPatternTree = (TTree*)oldFile->Get("Hel_Tree"); - //std::string dir = (std::string)gDirectory->CurrentDirectory()->GetPath(); - // Find out how many entries are in the tree so we can loop over the pattern tree later - Int_t numEntries = oldPatternTree->GetEntries(); - // Make a new ROOT tree to store the new data in (this is just an academic example) - TTree *newPatternTree; - TFile *resultsFile; - - //std::string number = "1111"; - - //number = dir.substr(dir.find("_")+1,4).c_str(); - //std::string outputFile = Form("second_pass_%s_%s.root",number.c_str(),channel.c_str()); - std::string outputFile = Form("second_pass_%s.root",channel.c_str()); - //gSystem->Exec(Form("CURRENT_RUN=%s"),dir.substr(dir.find("_")+1,4).c_str()); - - // Check to see if analysis has been run before - //gSystem->Exec(Form("ln -sf ${QW_ROOTFILES}/prex*%s.root run_%s.root",number.c_str(),number.c_str())); - //gSystem->Exec(Form("./compTest run_%s.root %s",number.c_str(),channel.c_str())); - gSystem->Exec(Form("./compTest run.root %s",channel.c_str())); - if(gSystem->AccessPathName(outputFile.c_str())){ - // Write a new root file for output - resultsFile = new TFile(outputFile.c_str(),"RECREATE"); - // Create a new tree to store results in - newPatternTree = new TTree("noise_Hel_Tree","Tree of Pattern based noise"); - - // Make an instance of the struct we need to read the old Tree's data - typedef struct { - Double_t hw_sum; - Double_t block0; - Double_t block1; - Double_t block2; - Double_t block3; - Double_t numsamp; - Double_t errorcode; - } PATTERNASYMS; - PATTERNASYMS patternAsyms; - // Assign that instance to the new ROOT tree's branch location of interest - oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); - - // Make a double to hold the data that is the result of our manipulation - Double_t patternNoises; // call the asymmetry "noise", as an unblinded asym is also the noise floor - // Make a new branch to hold the data, but this object is ideally not manipulated much - TBranch *patternNoisesBranch; - // Assign that branch to hold the double we made earlier as the contents of each entry - patternNoisesBranch = newPatternTree->Branch(Form("pattern_noise_%s",channel.c_str()), &patternNoises); - for (int j = 0; j < numEntries; j++) { - // Loop over the input file's entries and fill the new tree with the results of one of the leaves - oldPatternTree->GetEntry(j); - patternNoises=patternAsyms.hw_sum; - newPatternTree->Fill(); - } - // Save your root tree for later use - resultsFile->Write(); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - // Draw your results - else{ - resultsFile = new TFile(outputFile.c_str(),"READ"); - newPatternTree = (TTree*)resultsFile->Get("noise_Hel_Tree"); - newPatternTree->Draw(Form("pattern_noise_%s",channel.c_str())); - } - - delete newPatternTree; - resultsFile->Close(); - delete resultsFile; - //delete dir; - gFile=oldFile; -} diff --git a/panguin/macros/japan_compiled_example.cfg b/panguin/macros/japan_compiled_example.cfg deleted file mode 100644 index cfca5b5fc..000000000 --- a/panguin/macros/japan_compiled_example.cfg +++ /dev/null @@ -1,62 +0,0 @@ -# Configuration file for the online GUI -# This file is for ADCs -# All lines containing "#" are treated as comments (ignored) -# Last line MUST be blank. -# Multiple spaces are treated as one space. -# To switch to log scale, add the option logy after the name of -# the histogram - -# Valid entries include: -# To create a new TCanvas with a set number of plots in it -# Specify with: newpage [x] [y] [TCanvas options] -# Tree drawing -# Specify with: -# Variable drawing -# Specify with: [variables] [cuts] -type [type] -title [title] -tree [tree name] -# Page title setting: -# Specify with: title Your Title Here -# Macro execution -# Specify with: macro path/to/macro.C(options) -# Additional options: -# -noshow golden - -# Default root file to look at -#rootfile pan.root -#goldenrootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root -##rootfile /dev/shm/QwMemMapFile.map - -# Prototype rootfilename.. overrides GetRootFileName.C - ##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root -#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root - -# Defined cuts -definecut evcut (event_number>1) -definecut bcmds_cut (-1*bcm_ds>1) - -# Uncomment the below line to monitor the fill of a ROOTfile. -#watchfile - -newpage 1 2 - title Color Test - yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type * - macro ./macros/setPlotStyle.C() - yield_bcm_us:yield_bcm_ds:(yield_bcm_us-yield_bcm_ds) ErrorFlag==0 -type COLZ - -newpage 2 2 - title Noise Floor Test - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch7") - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch6") - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch5") - macro ./macros/asymmetryPlot_wrapper.C("vqwk_26_0ch4") - -newpage 2 4 - title Noise Floor Test - macro ./macros/asymmetryPlot_wrapper.C("sam1") - macro ./macros/asymmetryPlot_wrapper.C("sam2") - macro ./macros/asymmetryPlot_wrapper.C("sam3") - macro ./macros/asymmetryPlot_wrapper.C("sam4") - macro ./macros/asymmetryPlot_wrapper.C("sam5") - macro ./macros/asymmetryPlot_wrapper.C("sam6") - macro ./macros/asymmetryPlot_wrapper.C("sam7") - macro ./macros/asymmetryPlot_wrapper.C("sam8") From ff0e7e4e19e3bacaaab0546e02e2b10cb8e289cc Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Wed, 6 Mar 2019 19:09:12 -0500 Subject: [PATCH 078/102] Some config and macro updates from Cameron --- panguin/macros/asymmetryPlot_modular.C | 4 +-- panguin/macros/exampleMacro2.C | 1 - panguin/macros/sams.cfg | 49 +++++++++++++++----------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/panguin/macros/asymmetryPlot_modular.C b/panguin/macros/asymmetryPlot_modular.C index 197c29e3b..9e4617734 100644 --- a/panguin/macros/asymmetryPlot_modular.C +++ b/panguin/macros/asymmetryPlot_modular.C @@ -29,12 +29,12 @@ void asymmetryPlot_modular(std::string channel) { // Make an instance of the relevant data type's struct PATTERNASYMS patternAsyms; - std::string tree = "Hel_Tree"; + std::string tree = "mul"; std::string modifier = "noise"; std::string description = "Tree of Pattern based noise"; // To grab the root tree output we can assume that PANGUIN has successfully opened a root file - TTree *oldPatternTree = (TTree*)gDirectory->Get("Hel_Tree"); + TTree *oldPatternTree = (TTree*)gDirectory->Get("mul"); // Assign that instance to the new ROOT tree's branch location of interest oldPatternTree->SetBranchAddress( Form("asym_%s",channel.c_str()), &patternAsyms ); // Make a new ROOT tree to store the new data in (this is just an academic example) diff --git a/panguin/macros/exampleMacro2.C b/panguin/macros/exampleMacro2.C index 6be1bbea2..de99eb2e7 100644 --- a/panguin/macros/exampleMacro2.C +++ b/panguin/macros/exampleMacro2.C @@ -2,7 +2,6 @@ #include #include #include "TTree.h" -#include "japantypes.hh" void exampleMacro2(std::string title, std::string draws, std::string cuts,int binsx, double binlowx, double binhighx, int binsy, double binlowy, double binhighy){ gStyle->SetOptStat(0); diff --git a/panguin/macros/sams.cfg b/panguin/macros/sams.cfg index 32b3271a2..55723de72 100644 --- a/panguin/macros/sams.cfg +++ b/panguin/macros/sams.cfg @@ -26,27 +26,34 @@ definecut bcmds_cut (-1*bcm_ds>1) newpage 2 4 title SAMs test - sam1.hw_sum:CodaEventNumber>>g1 cuts -tree evt -type . -title Volts vs Event - sam2.hw_sum:CodaEventNumber>>g2 cuts -tree evt -type . -title Volts vs Event - sam3.hw_sum:CodaEventNumber>>g3 cuts -tree evt -type . -title Volts vs Event - sam4.hw_sum:CodaEventNumber>>g4 cuts -tree evt -type . -title Volts vs Event - sam5.hw_sum:CodaEventNumber>>g5 cuts -tree evt -type . -title Volts vs Event - sam6.hw_sum:CodaEventNumber>>g6 cuts -tree evt -type . -title Volts vs Event - sam7.hw_sum:CodaEventNumber>>g7 cuts -tree evt -type . -title Volts vs Event - sam8.hw_sum:CodaEventNumber>>g8 cuts -tree evt -type . -title Volts vs Event + sam1.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam2.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam3.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam4.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam5.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam6.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam7.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam8.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event newpage 2 4 title SAMs PPM noise floor signal - yield_sam1>>h1 evcut -tree mul -title yield_sam1 - yield_sam2>>h2 evcut -tree mul -title yield_sam2 - yield_sam3>>h3 evcut -tree mul -title yield_sam3 - yield_sam4>>h4 evcut -tree mul -title yield_sam4 - yield_sam5>>h5 evcut -tree mul -title yield_sam5 - yield_sam6>>h6 evcut -tree mul -title yield_sam6 - yield_sam7>>h7 evcut -tree mul -title yield_sam7 - yield_sam8>>h8 evcut -tree mul -title yield_sam8 - -newpage 1 2 - title BPM BCM - yield_bcm_an_ds10:pattern_number>>b1(100,0,nentries,100,0,6) evcut -tree mul -type . -title yield_bcm_an_ds10 vs pattern_number - yield_bpm4eY:yield_bpm4eX>>b2(100,-2.5,1,100,-2,4) evcut -tree mul -type . -title yield_bpm4eY vs yield_bpm4eX + yield_sam1 evcut -tree mul -title "yield_sam1" + yield_sam2 evcut -tree mul -title "yield_sam2" + yield_sam3 evcut -tree mul -title "yield_sam3" + yield_sam4 evcut -tree mul -title "yield_sam4" + yield_sam5 evcut -tree mul -title "yield_sam5" + yield_sam6 evcut -tree mul -title "yield_sam6" + yield_sam7 evcut -tree mul -title "yield_sam7" + yield_sam8 evcut -tree mul -title "yield_sam8 test" + +newpage 2 4 + title SAMs raw-adc_channels + sam1.hw_sum_raw/sam1.num_samples:CodaEventNumber cuts -tree evt -type l + sam2.hw_sum_raw/sam2.num_samples:CodaEventNumber cuts -tree evt -type l + sam3.hw_sum_raw/sam3.num_samples:CodaEventNumber cuts -tree evt -type l + sam4.hw_sum_raw/sam4.num_samples:CodaEventNumber cuts -tree evt -type l + sam5.hw_sum_raw/sam5.num_samples:CodaEventNumber cuts -tree evt -type l + sam6.hw_sum_raw/sam5.num_samples:CodaEventNumber cuts -tree evt -type l + sam7.hw_sum_raw/sam6.num_samples:CodaEventNumber cuts -tree evt -type l + sam8.hw_sum_raw/sam7.num_samples:CodaEventNumber cuts -tree evt -type l + From 11d3fb2d85cb81729d82cdb59c77b40ef3a3fc53 Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Wed, 6 Mar 2019 19:10:53 -0500 Subject: [PATCH 079/102] I'm committing the config files that other people have produced in the last few days. This commit is not verified that all constituents are necessarily useful, but they have been used by at least Robert and Sakib --- panguin/macros/bcm_calibrated.cfg | 47 ++++++++++++ panguin/macros/bcm_raw.cfg | 46 ++++++++++++ panguin/macros/bpm4_e_a_calibrated.cfg | 54 ++++++++++++++ panguin/macros/bpm4_e_a_raw.cfg | 48 ++++++++++++ .../macros/bpm8_bpm10_bpm12_calibrated.cfg | 73 +++++++++++++++++++ panguin/macros/bpm8_bpm10_bpm12_raw.cfg | 73 +++++++++++++++++++ panguin/macros/cavities_calibrated.cfg | 48 ++++++++++++ panguin/macros/noStatBox.C | 6 ++ 8 files changed, 395 insertions(+) create mode 100644 panguin/macros/bcm_calibrated.cfg create mode 100644 panguin/macros/bcm_raw.cfg create mode 100644 panguin/macros/bpm4_e_a_calibrated.cfg create mode 100644 panguin/macros/bpm4_e_a_raw.cfg create mode 100644 panguin/macros/bpm8_bpm10_bpm12_calibrated.cfg create mode 100644 panguin/macros/bpm8_bpm10_bpm12_raw.cfg create mode 100644 panguin/macros/cavities_calibrated.cfg create mode 100644 panguin/macros/noStatBox.C diff --git a/panguin/macros/bcm_calibrated.cfg b/panguin/macros/bcm_calibrated.cfg new file mode 100644 index 000000000..030a81050 --- /dev/null +++ b/panguin/macros/bcm_calibrated.cfg @@ -0,0 +1,47 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BCM vs event number and some correlations from the mul tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title BCMs + macro ./macros/noStatBox.C() + yield_bcm0l02 ErrorFlag==0 -tree mul -title "BCM 0l02" + yield_bcm_an_us ErrorFlag==0 -tree mul -title "BCM AN Upstream" + yield_bcm_dg_us ErrorFlag==0 -tree mul -title "BCM DG Upstream" + yield_bcm_an_ds ErrorFlag==0 -tree mul -title "BCM AN Downstream" + yield_bcm_dg_ds ErrorFlag==0 -tree mul -title "BCM DG Downstream" + yield_bcm_an_ds3 ErrorFlag==0 -tree mul -title "BCM3 Downstream" + yield_bcm_an_ds10 ErrorFlag==0 -tree mul -title "BCM10 Downstream" + +newpage 1 3 + title BCM vs Time Upstream + yield_bcm0l02:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM 0l02 vs Entry Number" + yield_bcm_an_us:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM AN Upstream vs Entry Number" + yield_bcm_dg_us:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM DG Upstream vs Entry Number" + +newpage 1 4 + title BCM vs Time Downstream + yield_bcm_an_ds:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM AN Downstream vs Entry Number" + yield_bcm_dg_ds:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM DG Downstream vs Entry Number" + yield_bcm_an_ds3:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM3 Downstream vs Entry Number" + yield_bcm_an_ds10:Entry$ ErrorFlag==0 -type . -tree mul -title "BCM10 Downstream vs Entry Number" + +newpage 1 2 + title BCM Upstream:Downstream Correlations + #yield_bcm_an_us:yield_bcm_an_ds ErrorFlag==0 -type . -tree mul -title BCM AN: "Upstream vs Downstream" + macro ../../../rradloff/FindCorrelation.C(\"mul\",\"yield_bcm_an_us\",\"yield_bcm_an_ds\",\"ErrorFlag == 0\",true,true) + yield_bcm_dg_us:yield_bcm_dg_ds ErrorFlag==0 -type . -tree mul -title BCM DG: "Upstream vs Downstream" diff --git a/panguin/macros/bcm_raw.cfg b/panguin/macros/bcm_raw.cfg new file mode 100644 index 000000000..1bcafd032 --- /dev/null +++ b/panguin/macros/bcm_raw.cfg @@ -0,0 +1,46 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BCM vs event number and some correlations from the evt tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title BCMs + macro ./macros/noStatBox.C() + bcm0l02 ErrorFlag==0 -tree evt -title "BCM 0l02" + bcm_an_us ErrorFlag==0 -tree evt -title "BCM AN Upstream" + bcm_dg_us ErrorFlag==0 -tree evt -title "BCM DG Upstream" + bcm_an_ds ErrorFlag==0 -tree evt -title "BCM AN Downstream" + bcm_dg_ds ErrorFlag==0 -tree evt -title "BCM DG Downstream" + bcm_an_ds3 ErrorFlag==0 -tree evt -title "BCM3 Downstream" + bcm_an_ds10 ErrorFlag==0 -tree evt -title "BCM10 Downstream" + +newpage 1 3 + title BCM vs Time Upstream + bcm0l02:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM 0l02 vs Entry Number" + bcm_an_us:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM AN Upstream vs Entry Number" + bcm_dg_us:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM DG Upstream vs Entry Number" + +newpage 1 4 + title BCM vs Time Downstream + bcm_an_ds:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM AN Downstream vs Entry Number" + bcm_dg_ds:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM DG Downstream vs Entry Number" + bcm_an_ds3:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM3 Downstream vs Entry Number" + bcm_an_ds10:Entry$ ErrorFlag==0 -type . -tree evt -title "BCM10 Downstream vs Entry Number" + +newpage 1 2 + title BCM Upstream:Downstream Correlations + bcm_an_us:bcm_an_ds ErrorFlag==0 -type . -tree evt -title BCM AN: "Upstream vs Downstream" + bcm_dg_us:bcm_dg_ds ErrorFlag==0 -type . -tree evt -title BCM DG: "Upstream vs Downstream" diff --git a/panguin/macros/bpm4_e_a_calibrated.cfg b/panguin/macros/bpm4_e_a_calibrated.cfg new file mode 100644 index 000000000..556968893 --- /dev/null +++ b/panguin/macros/bpm4_e_a_calibrated.cfg @@ -0,0 +1,54 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BPM4 vs event number and some correlations from the mul tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 2 + title BPMs: x, y, and WS + macro ./macros/noStatBox.C() + yield_bpm4eX ErrorFlag==0 -tree mul -title "BPM4e X" + yield_bpm4eY ErrorFlag==0 -tree mul -title "BPM4e Y" + yield_bpm4eWS ErrorFlag==0 -tree mul -title "BPM4e WS" + yield_bpm4aX ErrorFlag==0 -tree mul -title "BPM4s X" + yield_bpm4aY ErrorFlag==0 -tree mul -title "BPM4a Y" + yield_bpm4aWS ErrorFlag==0 -tree mul -title "BPM4a WS" + +newpage 1 3 + title BPM4e vs Time + yield_bpm4eX:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4e X vs Entry Number" + yield_bpm4eY:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4e Y vs Entry Number" + yield_bpm4eWS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4e WS vs Entry Number" + +newpage 1 3 + title BPM4a vs Time + yield_bpm4aX:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4a X vs Entry Number" + yield_bpm4aY:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4a Y vs Entry Number" + yield_bpm4aWS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM4a WS vs Entry Number" + +newpage 1 3 + title BPM4 a:e Correlations + yield_bpm4aX:yield_bpm4eX ErrorFlag==0 -type . -tree mul -title "BPM4a X vs BPM4e X" + yield_bpm4aY:yield_bpm4eY ErrorFlag==0 -type . -tree mul -title "BPM4a Y vs BPM4e Y" + yield_bpm4aWS:yield_bpm4eWS ErrorFlag==0 -type . -tree mul -title "BPM4a WS vs BPM4e WS" + +newpage 3 2 + title BPM4 X:Y, Y:WS, and WS:X Correlations + yield_bpm4aX:yield_bpm4aY ErrorFlag==0 -type . -tree mul -title "BPM4a X vs Y" + yield_bpm4aY:yield_bpm4aWS ErrorFlag==0 -type . -tree mul -title "BPM4a Y vs WS" + yield_bpm4aWS:yield_bpm4aX ErrorFlag==0 -type . -tree mul -title "BPM4a WS vs X" + yield_bpm4eX:yield_bpm4eY ErrorFlag==0 -type . -tree mul -title "BPM4e X vs Y" + yield_bpm4eY:yield_bpm4eWS ErrorFlag==0 -type . -tree mul -title "BPM4e Y vs WS" + yield_bpm4eWS:yield_bpm4eX ErrorFlag==0 -type . -tree mul -title "BPM4e WS vs X" diff --git a/panguin/macros/bpm4_e_a_raw.cfg b/panguin/macros/bpm4_e_a_raw.cfg new file mode 100644 index 000000000..20f56829b --- /dev/null +++ b/panguin/macros/bpm4_e_a_raw.cfg @@ -0,0 +1,48 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BPM4 vs event number and some correlations from the evt tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 2 + title BPMs: x, y, and WS + macro ./macros/noStatBox.C() + bpm4eX ErrorFlag==0 -tree evt -title "BPM4e X" + bpm4eY ErrorFlag==0 -tree evt -title "BPM4e Y" + bpm4eWS ErrorFlag==0 -tree evt -title "BPM4e WS" + bpm4aX ErrorFlag==0 -tree evt -title "BPM4s X" + bpm4aY ErrorFlag==0 -tree evt -title "BPM4a Y" + bpm4aWS ErrorFlag==0 -tree evt -title "BPM4a WS" + +newpage 1 3 + title BPM4a vs Time + bpm4aX:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM4a X vs Entry Number" + bpm4aY:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM4a Y vs Entry Number" + bpm4aWS:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM4a WS vs Entry Number" + +newpage 1 3 + title BPM4 a:e Correlations + bpm4aX:bpm4eX ErrorFlag==0 -type . -tree evt -title "BPM4a X vs BPM4e X" + bpm4aY:bpm4eY ErrorFlag==0 -type . -tree evt -title "BPM4a Y vs BPM4e Y" + bpm4aWS:bpm4eWS ErrorFlag==0 -type . -tree evt -title "BPM4a WS vs BPM4e WS" + +newpage 3 2 + title BPM4 X:Y, Y:WS, and WS:X Correlations + bpm4aX:bpm4aY ErrorFlag==0 -type . -tree evt -title "BPM4a X vs Y" + bpm4aY:bpm4aWS ErrorFlag==0 -type . -tree evt -title "BPM4a Y vs WS" + bpm4aWS:bpm4aX ErrorFlag==0 -type . -tree evt -title "BPM4a WS vs X" + bpm4eX:bpm4eY ErrorFlag==0 -type . -tree evt -title "BPM4e X vs Y" + bpm4eY:bpm4eWS ErrorFlag==0 -type . -tree evt -title "BPM4e Y vs WS" + bpm4eWS:bpm4eX ErrorFlag==0 -type . -tree evt -title "BPM4e WS vs X" diff --git a/panguin/macros/bpm8_bpm10_bpm12_calibrated.cfg b/panguin/macros/bpm8_bpm10_bpm12_calibrated.cfg new file mode 100644 index 000000000..98ac628b5 --- /dev/null +++ b/panguin/macros/bpm8_bpm10_bpm12_calibrated.cfg @@ -0,0 +1,73 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BPM8, BPM10, and BPM12 vs event number and some correlations // +#// from the mul tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title BPMs 8, 10, and 12: x, y, and WS + macro ./macros/noStatBox.C() + yield_bpm8X ErrorFlag==0 -tree mul -title "BPM8 X" + yield_bpm8Y ErrorFlag==0 -tree mul -title "BPM8 Y" + yield_bpm8WS ErrorFlag==0 -tree mul -title "BPM8 WS" + yield_bpm10X ErrorFlag==0 -tree mul -title "BPM10 X" + yield_bpm10Y ErrorFlag==0 -tree mul -title "BPM10 Y" + yield_bpm10WS ErrorFlag==0 -tree mul -title "BPM10 WS" + yield_bpm12X ErrorFlag==0 -tree mul -title "BPM12 X" + yield_bpm12Y ErrorFlag==0 -tree mul -title "BPM12 Y" + yield_bpm12WS ErrorFlag==0 -tree mul -title "BPM12 WS" + +newpage 1 3 + title BPM8 vs Time + yield_bpm8X:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM8 X vs Entry Number" + yield_bpm8Y:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM8 Y vs Entry Number" + yield_bpm8WS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM8 WS vs Entry Number" + +newpage 1 3 + title BPM10 vs Time + yield_bpm10X:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM10 X vs Entry Number" + yield_bpm10Y:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM10 Y vs Entry Number" + yield_bpm10WS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM10 WS vs Entry Number" + +newpage 1 3 + title BPM12 vs Time + yield_bpm12X:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM12 X vs Entry Number" + yield_bpm12Y:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM12 Y vs Entry Number" + yield_bpm12WS:Entry$ ErrorFlag==0 -type . -tree mul -title "BPM12 WS vs Entry Number" + +newpage 3 3 + title BPM 8:10, 10:12, and 12:8 Correlations + yield_bpm8X:yield_bpm10X ErrorFlag==0 -type . -tree mul -title "BPM8 X vs BPM10 X" + yield_bpm10X:yield_bpm12X ErrorFlag==0 -type . -tree mul -title "BPM10 X vs BPM12 X" + yield_bpm12X:yield_bpm8X ErrorFlag==0 -type . -tree mul -title "BPM12 X vs BPM8 X" + yield_bpm8Y:yield_bpm10Y ErrorFlag==0 -type . -tree mul -title "BPM8 Y vs BPM10 Y" + yield_bpm10Y:yield_bpm12Y ErrorFlag==0 -type . -tree mul -title "BPM10 Y vs BPM12 Y" + yield_bpm12Y:yield_bpm8Y ErrorFlag==0 -type . -tree mul -title "BPM12 Y vs BPM8 Y" + yield_bpm8WS:yield_bpm10WS ErrorFlag==0 -type . -tree mul -title "BPM8 WS vs BPM10 WS" + yield_bpm10WS:yield_bpm12WS ErrorFlag==0 -type . -tree mul -title "BPM10 WS vs BPM12 WS" + yield_bpm12WS:yield_bpm8WS ErrorFlag==0 -type . -tree mul -title "BPM12 WS vs BPM8 WS" + +newpage 3 3 + title BPM X:Y, Y:WS, and WS:X Correlations + yield_bpm8X:yield_bpm8Y ErrorFlag==0 -type . -tree mul -title "BPM8 X vs BPM8 Y" + yield_bpm8Y:yield_bpm8WS ErrorFlag==0 -type . -tree mul -title "BPM8 Y vs BPM8 WS" + yield_bpm8WS:yield_bpm8X ErrorFlag==0 -type . -tree mul -title "BPM8 WS vs BPM8 X" + yield_bpm10X:yield_bpm10Y ErrorFlag==0 -type . -tree mul -title "BPM10 X vs BPM10 Y" + yield_bpm10Y:yield_bpm10WS ErrorFlag==0 -type . -tree mul -title "BPM10 Y vs BPM10 WS" + yield_bpm10WS:yield_bpm10X ErrorFlag==0 -type . -tree mul -title "BPM10 WS vs BPM10 X" + yield_bpm12X:yield_bpm12Y ErrorFlag==0 -type . -tree mul -title "BPM12 X vs BPM12 Y" + yield_bpm12Y:yield_bpm12WS ErrorFlag==0 -type . -tree mul -title "BPM12 Y vs BPM12 WS" + yield_bpm12WS:yield_bpm12X ErrorFlag==0 -type . -tree mul -title "BPM12 WS vs BPM12 X" diff --git a/panguin/macros/bpm8_bpm10_bpm12_raw.cfg b/panguin/macros/bpm8_bpm10_bpm12_raw.cfg new file mode 100644 index 000000000..ae8b69bd3 --- /dev/null +++ b/panguin/macros/bpm8_bpm10_bpm12_raw.cfg @@ -0,0 +1,73 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting BPM8, BPM10, and BPM12 vs event number and some correlations // +#// from the evt tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title BPMs 8, 10, and 12: x, y, and WS + macro ./macros/noStatBox.C() + bpm8X ErrorFlag==0 -tree evt -title "BPM8 X" + bpm8Y ErrorFlag==0 -tree evt -title "BPM8 Y" + bpm8WS ErrorFlag==0 -tree evt -title "BPM8 WS" + bpm10X ErrorFlag==0 -tree evt -title "BPM10 X" + bpm10Y ErrorFlag==0 -tree evt -title "BPM10 Y" + bpm10WS ErrorFlag==0 -tree evt -title "BPM10 WS" + bpm12X ErrorFlag==0 -tree evt -title "BPM12 X" + bpm12Y ErrorFlag==0 -tree evt -title "BPM12 Y" + bpm12WS ErrorFlag==0 -tree evt -title "BPM12 WS" + +newpage 1 3 + title BPM8 vs Time + bpm8X:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM8 X vs Entry Number" + bpm8Y:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM8 Y vs Entry Number" + bpm8WS:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM8 WS vs Entry Number" + +newpage 1 3 + title BPM10 vs Time + bpm10X:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM10 X vs Entry Number" + bpm10Y:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM10 Y vs Entry Number" + bpm10WS:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM10 WS vs Entry Number" + +newpage 1 3 + title BPM12 vs Time + bpm12X:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM12 X vs Entry Number" + bpm12Y:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM12 Y vs Entry Number" + bpm12WS:Entry$ ErrorFlag==0 -type . -tree evt -title "BPM12 WS vs Entry Number" + +newpage 3 3 + title BPM 8:10, 10:12, and 12:8 Correlations + bpm8X:bpm10X ErrorFlag==0 -type . -tree evt -title "BPM8 X vs BPM10 X" + bpm10X:bpm12X ErrorFlag==0 -type . -tree evt -title "BPM10 X vs BPM12 X" + bpm12X:bpm8X ErrorFlag==0 -type . -tree evt -title "BPM12 X vs BPM8 X" + bpm8Y:bpm10Y ErrorFlag==0 -type . -tree evt -title "BPM8 Y vs BPM10 Y" + bpm10Y:bpm12Y ErrorFlag==0 -type . -tree evt -title "BPM10 Y vs BPM12 Y" + bpm12Y:bpm8Y ErrorFlag==0 -type . -tree evt -title "BPM12 Y vs BPM8 Y" + bpm8WS:bpm10WS ErrorFlag==0 -type . -tree evt -title "BPM8 WS vs BPM10 WS" + bpm10WS:bpm12WS ErrorFlag==0 -type . -tree evt -title "BPM10 WS vs BPM12 WS" + bpm12WS:bpm8WS ErrorFlag==0 -type . -tree evt -title "BPM12 WS vs BPM8 WS" + +newpage 3 3 + title BPM X:Y, Y:WS, and WS:X Correlations + bpm8X:bpm8Y ErrorFlag==0 -type . -tree evt -title "BPM8 X vs BPM8 Y" + bpm8Y:bpm8WS ErrorFlag==0 -type . -tree evt -title "BPM8 Y vs BPM8 WS" + bpm8WS:bpm8X ErrorFlag==0 -type . -tree evt -title "BPM8 WS vs BPM8 X" + bpm10X:bpm10Y ErrorFlag==0 -type . -tree evt -title "BPM10 X vs BPM10 Y" + bpm10Y:bpm10WS ErrorFlag==0 -type . -tree evt -title "BPM10 Y vs BPM10 WS" + bpm10WS:bpm10X ErrorFlag==0 -type . -tree evt -title "BPM10 WS vs BPM10 X" + bpm12X:bpm12Y ErrorFlag==0 -type . -tree evt -title "BPM12 X vs BPM12 Y" + bpm12Y:bpm12WS ErrorFlag==0 -type . -tree evt -title "BPM12 Y vs BPM12 WS" + bpm12WS:bpm12X ErrorFlag==0 -type . -tree evt -title "BPM12 WS vs BPM12 X" diff --git a/panguin/macros/cavities_calibrated.cfg b/panguin/macros/cavities_calibrated.cfg new file mode 100644 index 000000000..c8192b6fc --- /dev/null +++ b/panguin/macros/cavities_calibrated.cfg @@ -0,0 +1,48 @@ +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// +#// // +#// Config for plotting Cavity Yields vs event number and some correlations from the mul tree. // +#// // +#// Robert Radloff, Ohio University, 2019 // +#// // +#//////////////////////////////////////////////////////////////////////////////////////////////////////////// + +# Default root file to look at +rootfile /adaq1/work1/apar/japanOutput/prexALL_1033.root + +# Defined cuts +definecut evcut (event_number>1) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 3 3 + title Cav4 B, C, and D: x, y, and q + macro ./macros/noStatBox.C() + yield_cav4bx ErrorFlag==0 -tree mul -title "Cavity Bx" + yield_cav4by ErrorFlag==0 -tree mul -title "Cavity By" + yield_cav4bq ErrorFlag==0 -tree mul -title "Cavity Bq" + yield_cav4cx ErrorFlag==0 -tree mul -title "Cavity Cx" + yield_cav4cy ErrorFlag==0 -tree mul -title "Cavity Cy" + yield_cav4cq ErrorFlag==0 -tree mul -title "Cavity Cq" + yield_cav4dx ErrorFlag==0 -tree mul -title "Cavity Dx" + yield_cav4dy ErrorFlag==0 -tree mul -title "Cavity Dy" + yield_cav4dq ErrorFlag==0 -tree mul -title "Cavity Dq" + +newpage 1 3 + title Cav4B vs Time + yield_cav4bx:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Bx vs Entry Number" + yield_cav4by:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity By vs Entry Number" + yield_cav4bq:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Bq vs Entry Number" + +newpage 1 3 + title Cav4C vs Time + yield_cav4cx:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Cx vs Entry Number" + yield_cav4cy:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Cy vs Entry Number" + yield_cav4cq:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Cq vs Entry Number" + +newpage 1 3 + title Cav4D vs Time + yield_cav4dx:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Dx vs Entry Number" + yield_cav4dy:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Dy vs Entry Number" + yield_cav4dq:Entry$ ErrorFlag==0 -type . -tree mul -title "Cavity Dq vs Entry Number" diff --git a/panguin/macros/noStatBox.C b/panguin/macros/noStatBox.C new file mode 100644 index 000000000..f5ce8110f --- /dev/null +++ b/panguin/macros/noStatBox.C @@ -0,0 +1,6 @@ +void noStatBox() +{ + gStyle->SetOptStat(0); + gROOT->ForceStyle(); + gPad->Close(); +} From dc413231ca3467c27fdbd86df256d070178d4934 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Tue, 12 Mar 2019 16:49:33 -0400 Subject: [PATCH 080/102] add option to set the default number of bins for 2D histograms. --- panguin/include/panguinOnlineConfig.hh | 2 ++ panguin/macros/default.cfg | 13 +++++++++---- panguin/src/panguinOnline.cc | 10 +++++++++- panguin/src/panguinOnlineConfig.cc | 7 ++++++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/panguin/include/panguinOnlineConfig.hh b/panguin/include/panguinOnlineConfig.hh index 74977def9..d6d53e867 100644 --- a/panguin/include/panguinOnlineConfig.hh +++ b/panguin/include/panguinOnlineConfig.hh @@ -29,10 +29,12 @@ private: Bool_t fFoundCfg; Bool_t fMonitor; int fVerbosity; + int hist2D_nBinsX,hist2D_nBinsY; public: OnlineConfig(); OnlineConfig(TString); + void Get2DnumberBins(int &nX, int &nY){nX = hist2D_nBinsX; nY = hist2D_nBinsY;} void SetVerbosity(int ver){fVerbosity=ver;} Bool_t ParseConfig(); TString GetRootFile() { return rootfilename; }; diff --git a/panguin/macros/default.cfg b/panguin/macros/default.cfg index 5ceece909..0b78d41e0 100644 --- a/panguin/macros/default.cfg +++ b/panguin/macros/default.cfg @@ -13,7 +13,12 @@ protorootfile $QW_ROOTFILES/prexALL_XXXXX.root # Defined cuts -definecut evcut (CodaEventNumber>1000) +#definecut evcut CodaEventNumber>1000&&CodaEventNumber<10000 +definecut evcut CodaEventNumber>1000 + +# Set default 2D number of bins +2DbinsX 500 +2DbinsY 200 # Uncomment the below line to monitor the fill of a ROOTfile. #watchfile @@ -21,14 +26,14 @@ definecut evcut (CodaEventNumber>1000) ### column row newpage 1 4 title BCMs vs Event Number - bcm_an_us:CodaEventNumber evcut -type scat -title "BCM1 vs Eventnumber" + bcm_an_us:CodaEventNumber -type scat -title "BCM1 vs Eventnumber" bcm_an_ds:CodaEventNumber -title "BCM2 vs Event Number" -type box bcm_an_ds10:CodaEventNumber evcut -type prof -title "Prof example" - (1-bcm_an_us/bcm_an_ds):(CodaEventNumber/30) ErrorFlag==0 -title "What is this?" -tree evt + (1-bcm_an_us/bcm_an_ds):(CodaEventNumber) ErrorFlag==0 -title "What is this?" -tree evt newpage 1 2 title BCM asymmetries - asym_bcm_an_us ErrorFlag==0 + asym_bcm_an_us asym_bcm_an_ds ErrorFlag==0 newpage 1 3 diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index e6854290c..91f25fbf9 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -21,6 +21,7 @@ #include #include "TPaveText.h" #include +#include "TEnv.h" //#define OLDTIMERUPDATE using namespace std; @@ -41,6 +42,13 @@ OnlineGUI::OnlineGUI(OnlineConfig& config, Bool_t printonly=0, int ver=0): // Constructor. Get the config pointer, and make the GUI. fConfig = &config; + int bin2Dx(50), bin2Dy(50); + fConfig->Get2DnumberBins(bin2Dx,bin2Dy); + gEnv->SetValue("Hist.Binning.2D.x",bin2Dx); + gEnv->SetValue("Hist.Binning.2D.y",bin2Dy); + if(fVerbosity>1){ + cout<<"Set 2D default bins to x, y: "< command) { if(drawopt=="scat") drawopt = ""; if (iTree <= fRootTree.size() ) { errcode = fRootTree[iTree]->Draw(var,cut,drawopt, - 1000000000,fTreeEntries[iTree]); + 1000000000,fTreeEntries[iTree]); TObject *hobj = (TObject*)gROOT->FindObject("htemp"); if(fVerbosity>1){ diff --git a/panguin/src/panguinOnlineConfig.cc b/panguin/src/panguinOnlineConfig.cc index 781f983d3..8dc88f126 100644 --- a/panguin/src/panguinOnlineConfig.cc +++ b/panguin/src/panguinOnlineConfig.cc @@ -129,13 +129,18 @@ Bool_t OnlineConfig::ParseConfig() if(sConfFile[i][0] == "watchfile") { fMonitor = kTRUE; } + if(sConfFile[i][0] == "2DbinsX") { + hist2D_nBinsX = atoi(sConfFile[i][1]); + } + if(sConfFile[i][0] == "2DbinsY") { + hist2D_nBinsY = atoi(sConfFile[i][1]); + } if(sConfFile[i][0] == "definecut") { if(sConfFile[i].size()>3) { cerr << "cut command has too many arguments" << endl; continue; } TCut tempCut(sConfFile[i][1],sConfFile[i][2]); - // cutList.push_back(make_pair(sConfFile[i][1],sConfFile[i][2])); cutList.push_back(tempCut); } if(sConfFile[i][0] == "rootfile") { From 72f4a0b71d3b2a7cdf9cfedc7f6a599d90abf6b0 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Tue, 12 Mar 2019 17:40:07 -0400 Subject: [PATCH 081/102] Add more debug info --- panguin/src/panguinOnline.cc | 55 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index 91f25fbf9..d76d04464 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -42,12 +42,14 @@ OnlineGUI::OnlineGUI(OnlineConfig& config, Bool_t printonly=0, int ver=0): // Constructor. Get the config pointer, and make the GUI. fConfig = &config; - int bin2Dx(50), bin2Dy(50); + int bin2Dx(0), bin2Dy(0); fConfig->Get2DnumberBins(bin2Dx,bin2Dy); - gEnv->SetValue("Hist.Binning.2D.x",bin2Dx); - gEnv->SetValue("Hist.Binning.2D.y",bin2Dy); - if(fVerbosity>1){ - cout<<"Set 2D default bins to x, y: "<0 && bin2Dy>0){ + gEnv->SetValue("Hist.Binning.2D.x",bin2Dx); + gEnv->SetValue("Hist.Binning.2D.y",bin2Dy); + if(fVerbosity>1){ + cout<<"Set 2D default bins to x, y: "<GetListOfBranches(); - TIter next(branchList); - TBranch *brc; - - while((brc=(TBranch*)next())!=0) { - TString found = brc->GetName(); - if (found == var) { - return i; - } - } - } -#else + if(fVerbosity>=3) + cout<<__PRETTY_FUNCTION__<<"\t"<<__LINE__<=3) + cout<<"Checking tree "<GetName() + <<" \t var "<> "< command) { UInt_t iTree; if(command[4].IsNull()) { iTree = GetTreeIndex(var); + if(fVerbosity>=2) + cout<<"got index from variable "<=2) + cout<<"got index from command "<Draw(var,cut,drawopt, - 1000000000,fTreeEntries[iTree]); - TObject *hobj = (TObject*)gROOT->FindObject("htemp"); - - if(fVerbosity>1){ + if(fVerbosity>=1){ cout<<__PRETTY_FUNCTION__<<"\t"<<__LINE__<=2) + cout<<"\tProcessing from tree: "<GetTitle()<<"\t" + <GetName()<Draw(var,cut,drawopt); + //1000000000,fTreeEntries[iTree]); + if(fVerbosity>=3) + cout<<"Finished drawing with error code "<FindObject("htemp"); + if(errcode==-1) { BadDraw(var+" not found"); } else if (errcode!=0) { From 929bba5362cdf9834132725026fe647fe8c5cade Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Tue, 12 Mar 2019 17:40:30 -0400 Subject: [PATCH 082/102] initialize 2D bins --- panguin/src/panguinOnlineConfig.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/panguin/src/panguinOnlineConfig.cc b/panguin/src/panguinOnlineConfig.cc index 8dc88f126..191ddfd1d 100644 --- a/panguin/src/panguinOnlineConfig.cc +++ b/panguin/src/panguinOnlineConfig.cc @@ -10,6 +10,7 @@ using namespace std; OnlineConfig::OnlineConfig() + :hist2D_nBinsX(0),hist2D_nBinsY(0) { // Constructor. Without an argument, will use default "standard" config fMonitor = kFALSE; @@ -18,7 +19,8 @@ OnlineConfig::OnlineConfig() } OnlineConfig::OnlineConfig(TString anatype): - confFileName(anatype),fVerbosity(0) + confFileName(anatype),fVerbosity(0), + hist2D_nBinsX(0),hist2D_nBinsY(0) { // Constructor. Takes the config anatype as the only argument. // Loads up the configuration file, and stores it's contents for access. From 6193cead70f1ade445b18d321c26cda1b00c3713 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Tue, 12 Mar 2019 17:41:50 -0400 Subject: [PATCH 083/102] update default with more options --- panguin/macros/default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panguin/macros/default.cfg b/panguin/macros/default.cfg index 0b78d41e0..b2e91dea5 100644 --- a/panguin/macros/default.cfg +++ b/panguin/macros/default.cfg @@ -13,8 +13,8 @@ protorootfile $QW_ROOTFILES/prexALL_XXXXX.root # Defined cuts -#definecut evcut CodaEventNumber>1000&&CodaEventNumber<10000 definecut evcut CodaEventNumber>1000 +definecut myok_cut (ErrorFlag==0&&yield_bcm_an_us>32.5&&abs(1e6*asym_bcm_an_us)<2e3&&abs(diff_bpm12Y*1e3)<25) # Set default 2D number of bins 2DbinsX 500 @@ -27,7 +27,7 @@ definecut evcut CodaEventNumber>1000 newpage 1 4 title BCMs vs Event Number bcm_an_us:CodaEventNumber -type scat -title "BCM1 vs Eventnumber" - bcm_an_ds:CodaEventNumber -title "BCM2 vs Event Number" -type box + yield_bcm_an_us:pattern_number myok_cut -type box bcm_an_ds10:CodaEventNumber evcut -type prof -title "Prof example" (1-bcm_an_us/bcm_an_ds):(CodaEventNumber) ErrorFlag==0 -title "What is this?" -tree evt From 74deffea5ea28c335d9eda65acbffe35145c4e5f Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Tue, 12 Mar 2019 17:48:02 -0400 Subject: [PATCH 084/102] update default with proper drawing options --- panguin/macros/default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panguin/macros/default.cfg b/panguin/macros/default.cfg index b2e91dea5..94ab01177 100644 --- a/panguin/macros/default.cfg +++ b/panguin/macros/default.cfg @@ -26,8 +26,8 @@ definecut myok_cut (ErrorFlag==0&&yield_bcm_an_us>32.5&&abs(1e6*asym_bcm_an_us)< ### column row newpage 1 4 title BCMs vs Event Number - bcm_an_us:CodaEventNumber -type scat -title "BCM1 vs Eventnumber" - yield_bcm_an_us:pattern_number myok_cut -type box + bcm_an_us:CodaEventNumber -type SCAT -title "BCM1 vs Eventnumber" + yield_bcm_an_us:pattern_number myok_cut -type box -title "US Analog BCM" bcm_an_ds10:CodaEventNumber evcut -type prof -title "Prof example" (1-bcm_an_us/bcm_an_ds):(CodaEventNumber) ErrorFlag==0 -title "What is this?" -tree evt From d57bdf526291b9a13d4efe34cc29c333ae0a70dc Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Wed, 13 Mar 2019 08:49:31 -0400 Subject: [PATCH 085/102] reindent --- panguin/src/panguinOnline.cc | 58 +++++++++++++++--------------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index d76d04464..c9bd31e1e 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -141,7 +141,7 @@ void OnlineGUI::CreateGUI(const TGWindow *p, UInt_t w, UInt_t h) fTopframe = new TGHorizontalFrame(fMain,200,200); fTopframe->SetBackgroundColor(mainguicolor); fMain->AddFrame(fTopframe, new TGLayoutHints(kLHintsExpandX - | kLHintsExpandY,10,10,10,1)); + | kLHintsExpandY,10,10,10,1)); // Create a verticle frame widget with radio buttons // This will hold the page buttons @@ -159,7 +159,7 @@ void OnlineGUI::CreateGUI(const TGWindow *p, UInt_t w, UInt_t h) for (UInt_t i=0; iGetPageCount(); i++) { vframe->AddFrame(fRadioPage[i], new TGLayoutHints(kLHintsLeft | - kLHintsCenterY,5,5,3,4)); + kLHintsCenterY,5,5,3,4)); fRadioPage[i]->Connect("Pressed()", "OnlineGUI", this, "DoRadio()"); } if(!fConfig->IsMonitor()) { @@ -274,14 +274,14 @@ void OnlineGUI::DoDraw() } else { gStyle->SetOptLogy(0); } -// gStyle->SetTitleH(0.10); -// gStyle->SetTitleW(0.40); + // gStyle->SetTitleH(0.10); + // gStyle->SetTitleW(0.40); gStyle->SetTitleH(0.10); gStyle->SetTitleW(0.60); gStyle->SetStatH(0.70); gStyle->SetStatW(0.35); -// gStyle->SetLabelSize(0.10,"X"); -// gStyle->SetLabelSize(0.10,"Y"); + // gStyle->SetLabelSize(0.10,"X"); + // gStyle->SetLabelSize(0.10,"Y"); gStyle->SetLabelSize(0.05,"X"); gStyle->SetLabelSize(0.05,"Y"); gStyle->SetPadLeftMargin(0.14); @@ -295,7 +295,7 @@ void OnlineGUI::DoDraw() gStyle->SetLabelSize(0.08,"X"); gStyle->SetLabelSize(0.08,"Y"); } -// Int_t dim = Int_t(round(sqrt(double(draw_count)))); + // Int_t dim = Int_t(round(sqrt(double(draw_count)))); pair dim = fConfig->GetPageDim(current_page); if(fVerbosity>=1) @@ -420,9 +420,9 @@ void OnlineGUI::GetFileObjects() if(fRootFile->ReadKeys()==0) { fUpdate = kFALSE; -// delete fRootFile; -// fRootFile = 0; -// CheckRootFile(); + // delete fRootFile; + // fRootFile = 0; + // CheckRootFile(); return; } fileObjects.clear(); @@ -492,7 +492,7 @@ void OnlineGUI::GetRootTree() { " Name = " << fileObjects[i].first << endl; if(fileObjects[i].second.Contains("TTree")) - found.push_back(fileObjects[i].first); + found.push_back(fileObjects[i].first); } // Remove duplicates, then insert into fRootTree @@ -683,7 +683,7 @@ void OnlineGUI::BadDraw(TString errMessage) { pt->SetTextColor(2); pt->AddText(errMessage.Data()); pt->Draw(); -// cout << errMessage << endl; + // cout << errMessage << endl; } @@ -800,16 +800,16 @@ void OnlineGUI::HistDraw(vector command) { if(mytemp2d->GetEntries()==0) { BadDraw("Empty Histogram"); } else { -// These are commented out for some reason (specific to DVCS?) -// if(showGolden) { -// fGoldenFile->cd(); -// mytemp2d_golden = (TH2D*)gDirectory->Get(command[0]); -// mytemp2d_golden->SetMarkerColor(2); -// mytemp2d_golden->Draw(); - //mytemp2d->Draw("sames"); -// } else { + // These are commented out for some reason (specific to DVCS?) + // if(showGolden) { + // fGoldenFile->cd(); + // mytemp2d_golden = (TH2D*)gDirectory->Get(command[0]); + // mytemp2d_golden->SetMarkerColor(2); + // mytemp2d_golden->Draw(); + //mytemp2d->Draw("sames"); + // } else { mytemp2d->Draw(); -// } + // } } break; } @@ -883,7 +883,7 @@ void OnlineGUI::TreeDraw(vector command) { } errcode = fRootTree[iTree]->Draw(var,cut,drawopt); - //1000000000,fTreeEntries[iTree]); + //1000000000,fTreeEntries[iTree]); if(fVerbosity>=3) cout<<"Finished drawing with error code "<FindObject("htemp"); @@ -940,7 +940,7 @@ void OnlineGUI::PrintPages() { // a postscript file. (good for making sample histograms). // Open the RootFile - // unless we're watching a file. + // unless we're watching a file. fRootFile = new TFile(fConfig->GetRootFile(),"READ"); if(!fRootFile->IsOpen()) { cout << "ERROR: rootfile: " << fConfig->GetRootFile() @@ -949,8 +949,6 @@ void OnlineGUI::PrintPages() { gApplication->Terminate(); } else { fFileAlive = kTRUE; - //ObtainRunNumber();//FIXME cg - // Open the Root Trees. Give a warning if it's not there.. GetFileObjects(); GetRootTree(); GetTreeVars(); @@ -978,15 +976,7 @@ void OnlineGUI::PrintPages() { fGoldenFile=NULL; } - // Added this decision to make reasonable aspect ration for web content - // if (confFileName) { - fCanvas = new TCanvas("fCanvas","trythis",1000,800); - // } else { - // I'm not sure exactly how this works. But it does. - // fCanvas = new TCanvas("fCanvas","trythis",850,1100); - // } -// TCanvas *maincanvas = new TCanvas("maincanvas","whatever",850,1100); -// maincanvas->SetCanvas(fCanvas); + fCanvas = new TCanvas("fCanvas","trythis",1000,800); TLatex *lt = new TLatex(); TString plotsdir = fConfig->GetPlotsDir(); From 20ccbb175bdd6633616e0bfcf000571164a3b826 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Wed, 13 Mar 2019 09:56:57 -0400 Subject: [PATCH 086/102] revert macro2 to original simple draw. update it for japan output. move CCs drawing evt macro to drawEVT --- panguin/macros/drawEVT.C | 27 +++++++++++++++++++++++++++ panguin/macros/exampleCFG2.cfg | 4 ++-- panguin/macros/exampleMacro2.C | 28 ++-------------------------- 3 files changed, 31 insertions(+), 28 deletions(-) create mode 100644 panguin/macros/drawEVT.C diff --git a/panguin/macros/drawEVT.C b/panguin/macros/drawEVT.C new file mode 100644 index 000000000..7e1282fd6 --- /dev/null +++ b/panguin/macros/drawEVT.C @@ -0,0 +1,27 @@ +#include +#include +#include +#include "TTree.h" +#include "japantypes.hh" + +void drawEVT(std::string title, std::string draws, std::string cuts,int binsx, double binlowx, double binhighx, int binsy, double binlowy, double binhighy){ + gStyle->SetOptStat(0); + TTree *evtTree = (TTree*)gDirectory->Get("evt"); + // Make an instance of the relevant data type's struct +// EVTTREE evtTreeVal; +// evtTree->SetBranchAddress( Form("%s",draws.c_str()), &evtTreeVal ); + TH2F *h1=new TH2F("h1",title.c_str(),binsx,binlowx,binhighx,binsy,binlowy,binhighy); + +// Int_t numEntries = evtTree->GetEntries(); +// +// for (int j = 0; j < numEntries; j++) { +// // Loop over the input file's entries and fill the new stuff with the results of one of the leaves +// evtTree->GetEntry(j); +// variable = evtTreeVal.hw_sum; +// } + // Draw your results + h1->SetMarkerStyle(20); + h1->SetMarkerSize(0.4); + evtTree->Draw(Form("%s>>h1",draws.c_str()),Form("%s",cuts.c_str())); + h1->Draw(); +} diff --git a/panguin/macros/exampleCFG2.cfg b/panguin/macros/exampleCFG2.cfg index fb44286ef..a28f18635 100644 --- a/panguin/macros/exampleCFG2.cfg +++ b/panguin/macros/exampleCFG2.cfg @@ -28,5 +28,5 @@ definecut bcmds_cut (-1*bcm_ds>1) newpage 1 2 title SAMs test - macro ./macros/exampleMacro2.C("BPM4A-x-vs-y","bpm4aX:bpm4aY","bcm_an_ds10>10",100,2.4,2.55,100,1.9,2.1) - macro ./macros/exampleMacro2.C("BPM4E-x-vs-y","bpm4eX:bpm4eY","bcm_an_ds10>10",100,2.1,2.4,100,0.90,1.30) + macro ./macros/drawEVT.C("BPM4A-x-vs-y","bpm4aX:bpm4aY","bcm_an_ds10>10",100,2.4,2.55,100,1.9,2.1) + macro ./macros/drawEVT.C("BPM4E-x-vs-y","bpm4eX:bpm4eY","bcm_an_ds10>10",100,2.1,2.4,100,0.90,1.30) diff --git a/panguin/macros/exampleMacro2.C b/panguin/macros/exampleMacro2.C index 6be1bbea2..9f47d59f3 100644 --- a/panguin/macros/exampleMacro2.C +++ b/panguin/macros/exampleMacro2.C @@ -1,27 +1,3 @@ -#include -#include -#include -#include "TTree.h" -#include "japantypes.hh" - -void exampleMacro2(std::string title, std::string draws, std::string cuts,int binsx, double binlowx, double binhighx, int binsy, double binlowy, double binhighy){ - gStyle->SetOptStat(0); - TTree *evtTree = (TTree*)gDirectory->Get("evt"); - // Make an instance of the relevant data type's struct -// EVTTREE evtTreeVal; -// evtTree->SetBranchAddress( Form("%s",draws.c_str()), &evtTreeVal ); - TH2F *h1=new TH2F("h1",title.c_str(),binsx,binlowx,binhighx,binsy,binlowy,binhighy); - -// Int_t numEntries = evtTree->GetEntries(); -// -// for (int j = 0; j < numEntries; j++) { -// // Loop over the input file's entries and fill the new stuff with the results of one of the leaves -// evtTree->GetEntry(j); -// variable = evtTreeVal.hw_sum; -// } - // Draw your results - h1->SetMarkerStyle(20); - h1->SetMarkerSize(0.4); - evtTree->Draw(Form("%s>>h1",draws.c_str()),Form("%s",cuts.c_str())); - h1->Draw(); +void exampleMacro2(){ + evt->Draw("unser:Entry$","CodaEventNumber>1000"); } From 66465234ba4d4a30e637b62160f6b2cc620a7580 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Wed, 13 Mar 2019 10:32:18 -0400 Subject: [PATCH 087/102] update summary plot printing --- panguin/include/panguinOnlineConfig.hh | 5 ++++ panguin/macros/default.cfg | 11 +++++++- panguin/src/panguinOnline.cc | 35 +++++++++++++++----------- panguin/src/panguinOnlineConfig.cc | 24 +++++++++++++++--- 4 files changed, 56 insertions(+), 19 deletions(-) diff --git a/panguin/include/panguinOnlineConfig.hh b/panguin/include/panguinOnlineConfig.hh index d6d53e867..88d1b6c0b 100644 --- a/panguin/include/panguinOnlineConfig.hh +++ b/panguin/include/panguinOnlineConfig.hh @@ -30,12 +30,17 @@ private: Bool_t fMonitor; int fVerbosity; int hist2D_nBinsX,hist2D_nBinsY; + TString fPlotFormat; + int fRunNumber; public: OnlineConfig(); OnlineConfig(TString); + int GetRunNumber(){return fRunNumber;} + TString GetConfFileName(){return confFileName;} void Get2DnumberBins(int &nX, int &nY){nX = hist2D_nBinsX; nY = hist2D_nBinsY;} void SetVerbosity(int ver){fVerbosity=ver;} + TString GetPlotFormat(){return fPlotFormat;} Bool_t ParseConfig(); TString GetRootFile() { return rootfilename; }; TString GetGoldenFile() { return goldenrootfilename; }; diff --git a/panguin/macros/default.cfg b/panguin/macros/default.cfg index 94ab01177..325b17503 100644 --- a/panguin/macros/default.cfg +++ b/panguin/macros/default.cfg @@ -6,9 +6,18 @@ # To switch to log scale, add the option logy after the name of # the histogram -# Default root file to look at +# fixed root file to look at +## can be overwritten by -r XXX option #rootfile $QW_ROOTFILES/prexALL_1227.root +## plot directory where print output is placed (directory has to already exist) +plotsdir ./output +## output format (pdf, gif, png). without this option we'll do pdf +plotFormat pdf + +## set the color for the gui by name (like red, blue, white) +#guicolor white + # Prototype rootfilename.. overrides GetRootFileName.C protorootfile $QW_ROOTFILES/prexALL_XXXXX.root diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index c9bd31e1e..56eb88e15 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -78,7 +78,7 @@ void OnlineGUI::CreateGUI(const TGWindow *p, UInt_t w, UInt_t h) } } else { fFileAlive = kTRUE; - //ObtainRunNumber();//FIXME CG + runNumber = fConfig->GetRunNumber(); // Open the Root Trees. Give a warning if it's not there.. GetFileObjects(); GetRootTree(); @@ -625,7 +625,7 @@ void OnlineGUI::TimerUpdate() { } // Update the runnumber - //ObtainRunNumber();//FIXME CG + runNumber = fConfig -> GetRunNumber(); if(runNumber != 0) { TString rnBuff = "Run #"; rnBuff += runNumber; @@ -730,7 +730,7 @@ Int_t OnlineGUI::OpenRootFile() { } // Update the runnumber - //ObtainRunNumber();//FIXME cg + runNumber = fConfig->GetRunNumber(); if(runNumber != 0) { TString rnBuff = "Run #"; rnBuff += runNumber; @@ -980,10 +980,15 @@ void OnlineGUI::PrintPages() { TLatex *lt = new TLatex(); TString plotsdir = fConfig->GetPlotsDir(); - Bool_t useGIF = kFALSE; - if(!plotsdir.IsNull()) useGIF = kTRUE; + if(plotsdir.IsNull()) plotsdir="."; - TString filename = "summaryplots"; + Bool_t pagePrint = kFALSE; + TString printFormat = fConfig->GetPlotFormat(); + if(printFormat.IsNull()) printFormat="pdf"; + if(printFormat!="pdf") pagePrint = kTRUE; + + TString filename = "summaryPlots"; + runNumber = fConfig->GetRunNumber(); if(runNumber!=0) { filename += "_"; filename += runNumber; @@ -991,11 +996,13 @@ void OnlineGUI::PrintPages() { printf(" Warning for pretty plots: runNumber = %i\n",runNumber); } - if(useGIF) { - filename.Prepend(plotsdir+"/"); - filename += "_pageXXXX.gif"; - } - else filename += ".pdf"; + filename.Prepend(plotsdir+"/"); + if(pagePrint) + filename += "_pageXXXX"; + TString fConfName = fConfig->GetConfFileName(); + TString fCfgNm = fConfName(fConfName.Last('/')+1,fConfName.Length()); + filename += "_" + fCfgNm(0,fCfgNm.Last('.')); + filename += "."+printFormat; TString pagehead = "Summary Plots"; if(runNumber!=0) { @@ -1011,7 +1018,7 @@ void OnlineGUI::PrintPages() { gStyle->SetPadBorderMode(0); gStyle->SetHistLineColor(1); gStyle->SetHistFillColor(1); - if(!useGIF) fCanvas->Print(filename+"["); + if(!pagePrint) fCanvas->Print(filename+"["); TString origFilename = filename; for(UInt_t i=0; iGetPageCount(); i++) { current_page=i; @@ -1023,7 +1030,7 @@ void OnlineGUI::PrintPages() { pagename += fConfig->GetPageTitle(current_page); lt->SetTextSize(0.025); lt->DrawLatex(0.05,0.98,pagename); - if(useGIF) { + if(pagePrint) { filename = origFilename; filename.ReplaceAll("XXXX",Form("%02d",current_page)); cout << "Printing page " << current_page @@ -1031,7 +1038,7 @@ void OnlineGUI::PrintPages() { } fCanvas->Print(filename); } - if(!useGIF) fCanvas->Print(filename+"]"); + if(!pagePrint) fCanvas->Print(filename+"]"); gApplication->Terminate(); } diff --git a/panguin/src/panguinOnlineConfig.cc b/panguin/src/panguinOnlineConfig.cc index 191ddfd1d..7d2c7a6c6 100644 --- a/panguin/src/panguinOnlineConfig.cc +++ b/panguin/src/panguinOnlineConfig.cc @@ -10,7 +10,8 @@ using namespace std; OnlineConfig::OnlineConfig() - :hist2D_nBinsX(0),hist2D_nBinsY(0) + :hist2D_nBinsX(0),hist2D_nBinsY(0), + fPlotFormat(""),fRunNumber(0) { // Constructor. Without an argument, will use default "standard" config fMonitor = kFALSE; @@ -20,7 +21,8 @@ OnlineConfig::OnlineConfig() OnlineConfig::OnlineConfig(TString anatype): confFileName(anatype),fVerbosity(0), - hist2D_nBinsX(0),hist2D_nBinsY(0) + hist2D_nBinsX(0),hist2D_nBinsY(0), + fPlotFormat(""),fRunNumber(0) { // Constructor. Takes the config anatype as the only argument. // Loads up the configuration file, and stores it's contents for access. @@ -159,6 +161,8 @@ Bool_t OnlineConfig::ParseConfig() continue; } rootfilename = sConfFile[i][1]; + TString temp = sConfFile[i][1](sConfFile[i][1].Last('_')+1,sConfFile[i][1].Length()); + fRunNumber = atoi(temp(0,temp.Last('.')).Data()); } if(sConfFile[i][0] == "goldenrootfile") { if(sConfFile[i].size() != 2) { @@ -220,6 +224,15 @@ Bool_t OnlineConfig::ParseConfig() } plotsdir = sConfFile[i][1]; } + if(sConfFile[i][0] == "plotFormat") { + if(sConfFile[i].size() != 2) { + cerr << "WARNING: plotsdir command does not have the " + << "correct number of arguments (needs 1)" + << endl; + continue; + } + fPlotFormat = sConfFile[i][1]; + } } @@ -514,6 +527,8 @@ void OnlineConfig::OverrideRootFile(UInt_t runnumber) sprintf(runnostr,"%04i",runnumber); protorootfile.ReplaceAll("XXXXX",runnostr); rootfilename = protorootfile; + TString temp = rootfilename(rootfilename.Last('_')+1,rootfilename.Length()); + fRunNumber = atoi(temp(0,temp.Last('.')).Data()); } else { string fnmRoot="/adaq1/work1/apar/japanOutput"; if(getenv("QW_ROOTFILES")) @@ -546,9 +561,10 @@ void OnlineConfig::OverrideRootFile(UInt_t runnumber) closedir (dirSearch); } - if(found) + if(found){ cout<<"\t found file "<< rootfilename< Date: Wed, 13 Mar 2019 16:34:11 -0400 Subject: [PATCH 088/102] Updated lower limit cut on beam current. for >30 uA runs, beam-off readout from BCM is ~1.6 uA. A new lower limit 2 uA is used for runs starting from 1329 to cut out beam trips. --- .../prexCH_beamline_eventcuts.1329-.map | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Parity/prminput/prexCH_beamline_eventcuts.1329-.map diff --git a/Parity/prminput/prexCH_beamline_eventcuts.1329-.map b/Parity/prminput/prexCH_beamline_eventcuts.1329-.map new file mode 100644 index 000000000..104318322 --- /dev/null +++ b/Parity/prminput/prexCH_beamline_eventcuts.1329-.map @@ -0,0 +1,66 @@ + +!This file contains beamline event cut properties +!********************************************************************************************* +!Global switch to turn ON and OFF eventcut check +!Available settings +!*************************************************** +!To turn OFF all checks +!EVENTCUTS = 0 + +!*************************************************** +!To turn OFF event cuts and perform only HW checks +!EVENTCUTS = 1 + +!*************************************************** +!To turn ON both event cuts and HW checks +! EVENTCUTS = 2 + +!*************************************************** +!To turn do both event cuts and HW checks and only flag event cut failed events +EVENTCUTS = 3 + +!IMPORTANT +!--------- +!Make sure when puting tabs in the map file entries, always put ", " before inserting a tab. +!Otherwise the routine QwParameterFile::GetNextToken(", ") will get confuse. + +!*************************************************** +!for bcm devices +!device_type, device_name, lower limit, upper limit, local(l)/global(g), stability percentage + bcm, bcm_an_ds3, 2.0, 1e6, g, 0.2 + +!for parity mock data run 1000 9.98608e+06 +!bcm, qwk_bcm0l03, 8.00e+06, 1.20e+07, 1, 0 + + +!bcm, qwk_batery6, 0, 0, 1, 0 +!bcm, qwk_batery7, 95.57778e+9, 95.5788e+9, 1, 0 +!bcm, phasemonitor, 0, 0, 1, 0 + +!**************************************************** +!for bpmstrpline devices +!device_type, device_name, channel_name, lower limit, upper limit +!channel_name can be relx, rely, absx, absy, wsum, xp, xm, yp, ym +!Cuts are applied after the VQwSubsystem::ProcessEvent() routine. +!So pedestals are applied before appyling the cuts. + +!device_type, device_name, channel_name, lower limit, upper limit, local(l)/global(g), stability percentage +! the following line is an example +!bpmstripline, qwk_qpd, relx, 2.67319, 4.45531 + + + +!This file contains beamline event cut properties + +!IMPORTANT +!--------- +!Make sure when puting tabs in the map file entries, always put ", " before inserting a tab. +!Otherwise the routine QwParameterFile::GetNextToken(", ") will extract the entry with the tab character. + +!Comments +!-------- +!Devices that are not in the list are not subjected event cut checks +!All devices will be tested for HW checks. +! +!For device_type =bcm only upper and lower limit of the calibrated charge on the ADC HW sum. (QwVQWK_Channel::fHardwareBlockSum) + From 1a4bf0099949f63eb83480771ce3d0c8c3385137 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Thu, 14 Mar 2019 09:20:14 -0400 Subject: [PATCH 089/102] not clear why this works but will leave like this until we see a problem related to this --- panguin/src/panguinOnline.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index 0f873bebd..5de05e2f7 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -23,6 +23,7 @@ #include #include "TEnv.h" #include "TRegexp.h" +#include "TGraph.h" //#define OLDTIMERUPDATE using namespace std; @@ -556,7 +557,7 @@ UInt_t OnlineGUI::GetTreeIndex(TString var) { <<"\t looking for variable: "<=3) + if(fVerbosity>=4) cout<<"Checking tree "<GetName() <<" \t var "<> "< command) { cout<<"got index from command "<=3) + cout<<"\tDraw option:"<=1){ @@ -892,20 +896,18 @@ void OnlineGUI::TreeDraw(vector command) { cout<<"\tProcessing from tree: "<GetTitle()<<"\t" <GetName()<Draw(var,cut,drawopt, - 1000000000,fTreeEntries[iTree]); + errcode = fRootTree[iTree]->Draw(var,cut,drawopt); + + TObject *hobj = (TObject*)gROOT->FindObject(histoname); if(fVerbosity>=3) cout<<"Finished drawing with error code "<FindObject(histoname); if(errcode==-1) { BadDraw(var+" not found"); } else if (errcode!=0) { if(!command[3].IsNull()) { - TH1* thathist = (TH1*)hobj->Clone(command[3].MD5()); - thathist->SetTitle(command[3]); - thathist->DrawCopy(); - delete thathist; + TH1* thathist = (TH1*)hobj; + thathist->SetNameTitle(command[3].MD5(),command[3]); } } else { BadDraw("Empty Histogram"); From aeb8970c55c7226bed8e5b3e15a360b9fdbe68ee Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Thu, 14 Mar 2019 09:21:55 -0400 Subject: [PATCH 090/102] update example config. turns out that scat or SCAT is not a problem --- panguin/macros/default.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/panguin/macros/default.cfg b/panguin/macros/default.cfg index 325b17503..4676ae800 100644 --- a/panguin/macros/default.cfg +++ b/panguin/macros/default.cfg @@ -23,11 +23,11 @@ protorootfile $QW_ROOTFILES/prexALL_XXXXX.root # Defined cuts definecut evcut CodaEventNumber>1000 -definecut myok_cut (ErrorFlag==0&&yield_bcm_an_us>32.5&&abs(1e6*asym_bcm_an_us)<2e3&&abs(diff_bpm12Y*1e3)<25) +definecut myok_cut (pattern_number>10&&ErrorFlag==0&&yield_bcm_an_us>32.5&&abs(1e6*asym_bcm_an_us)<2e3&&abs(diff_bpm12Y*1e3)<25) -# Set default 2D number of bins -2DbinsX 500 -2DbinsY 200 +## Set default 2D number of bins +#2DbinsX 2000 +#2DbinsY 2000 # Uncomment the below line to monitor the fill of a ROOTfile. #watchfile @@ -35,7 +35,7 @@ definecut myok_cut (ErrorFlag==0&&yield_bcm_an_us>32.5&&abs(1e6*asym_bcm_an_us)< ### column row newpage 1 4 title BCMs vs Event Number - bcm_an_us:CodaEventNumber -type SCAT -title "BCM1 vs Eventnumber" + bcm_an_us:CodaEventNumber -type scat evcut -title "BCM1 vs Eventnumber" yield_bcm_an_us:pattern_number myok_cut -type box -title "US Analog BCM" bcm_an_ds10:CodaEventNumber evcut -type prof -title "Prof example" (1-bcm_an_us/bcm_an_ds):(CodaEventNumber) ErrorFlag==0 -title "What is this?" -tree evt From e9d8b2ec8129d8c2100dfcf4bdd60c421ca1fc74 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Fri, 15 Mar 2019 14:44:10 -0400 Subject: [PATCH 091/102] update with another plot for easy look at statistics --- panguin/macros/defaultOnline.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/panguin/macros/defaultOnline.cfg b/panguin/macros/defaultOnline.cfg index 0e67c1636..d6c354522 100644 --- a/panguin/macros/defaultOnline.cfg +++ b/panguin/macros/defaultOnline.cfg @@ -12,7 +12,8 @@ watchfile definecut evcut (CodaEventNumber>10) ### column row -newpage 1 1 +newpage 1 2 title BCMs vs Event Number - bcm_us:CodaEventNumber evcut -type scat -title "BCM1 vs Eventnumber" + bcm_an_us:CodaEventNumber evcut -title "BCM1 vs Eventnumber" + bcm_an_us evcut -title "BCM1 vs Eventnumber" From 17fe99e29a460bd32c9317692c196b14a3043c5a Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Fri, 15 Mar 2019 14:45:54 -0400 Subject: [PATCH 092/102] use the old timer update (ie close and reopen file) since it seems t->Refresh() screws up the plots somehow. add a couple of debug statements --- panguin/src/panguinOnline.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index 5de05e2f7..ac3d7620d 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -24,7 +24,8 @@ #include "TEnv.h" #include "TRegexp.h" #include "TGraph.h" -//#define OLDTIMERUPDATE + +#define OLDTIMERUPDATE using namespace std; @@ -611,9 +612,11 @@ void OnlineGUI::TimerUpdate() { // Called periodically by the timer, if "watchfile" is indicated // in the config. Reloads the ROOT file, and updates the current page. if(fVerbosity>=1) - cout << "Update Now" << endl; + cout<<__PRETTY_FUNCTION__<<"\t"<<__LINE__<=2) + cout<<"\t rtFile: "<GetRootFile()<GetRootFile(),"READ"); if(fRootFile->IsZombie()) { cout << "New run not yet available. Waiting..." << endl; From 7e04ff37818e5edda6025ee3961447cd5dce417d Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 20 Mar 2019 11:16:07 -0400 Subject: [PATCH 093/102] Changed the definition of q_targ to be bcm_an_us for runs 1397-1420. --- Parity/prminput/prexCH_beamline.1397-1420.map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parity/prminput/prexCH_beamline.1397-1420.map b/Parity/prminput/prexCH_beamline.1397-1420.map index 63a98c3c0..778043069 100644 --- a/Parity/prminput/prexCH_beamline.1397-1420.map +++ b/Parity/prminput/prexCH_beamline.1397-1420.map @@ -73,4 +73,4 @@ Bank=0x03 [PUBLISH] ! new.tree.variable.name, analysis.class, old.tree.variable.name, element.to.store - q_targ, bcm, bcm_an_ds3, c + q_targ, bcm, bcm_an_us, c From 5910bc3d15d5ae324d3a925d69715e065c296d1b Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 20 Mar 2019 11:20:05 -0400 Subject: [PATCH 094/102] Changed the VQWK number of samples to 8064 for runs 1449-1450. --- Parity/prminput/prexCH_beamline.1449-1450.map | 79 +++++++++ Parity/prminput/prex_maindet.1449-1450.map | 33 ++++ Parity/prminput/prex_sam.1449-1450.map | 15 ++ .../prminput/prexinj_beamline.1449-1450.map | 167 ++++++++++++++++++ 4 files changed, 294 insertions(+) create mode 100644 Parity/prminput/prexCH_beamline.1449-1450.map create mode 100644 Parity/prminput/prex_maindet.1449-1450.map create mode 100644 Parity/prminput/prex_sam.1449-1450.map create mode 100644 Parity/prminput/prexinj_beamline.1449-1450.map diff --git a/Parity/prminput/prexCH_beamline.1449-1450.map b/Parity/prminput/prexCH_beamline.1449-1450.map new file mode 100644 index 000000000..b9cafb08c --- /dev/null +++ b/Parity/prminput/prexCH_beamline.1449-1450.map @@ -0,0 +1,79 @@ + +ROC=23 +Bank=0x05 +vqwk_buffer_offset = 1 +!same sample size for ADCs in a given bank +sample_size=8064 +!Sample size should be unchanged - ask Paul King +! +! module.type, module.num chan.num, det.type, det.name, if unrotated then last column ->UNROTATED + + +!ADC0 + VQWK, 0, 0, bcm, QWK_0_0 + VQWK, 0, 1, bcm, QWK_0_1 + VQWK, 0, 2, bcm, BCM_AN_US + VQWK, 0, 3, bcm, BCM_AN_DS + VQWK, 0, 4, bcm, BCM_AN_DS3 + VQWK, 0, 5, bcm, BCM_AN_DS10 + VQWK, 0, 6, bcm, BCM_DG_US + VQWK, 0, 7, bcm, BCM_DG_DS + +!ADC1 + VQWK, 1, 0, bpmstripline, BPM4Exp + VQWK, 1, 1, bpmstripline, BPM4Exm + VQWK, 1, 2, bpmstripline, BPM4Eyp + VQWK, 1, 3, bpmstripline, BPM4Eym + VQWK, 1, 4, bpmstripline, BPM8xp + VQWK, 1, 5, bpmstripline, BPM8xm + VQWK, 1, 6, bpmstripline, BPM8yp + VQWK, 1, 7, bpmstripline, BPM8ym + +!ADC2 + VQWK, 2, 0, bpmstripline, BPM12xp + VQWK, 2, 1, bpmstripline, BPM12xm + VQWK, 2, 2, bpmstripline, BPM12yp + VQWK, 2, 3, bpmstripline, BPM12ym + VQWK, 2, 4, bpmstripline, BPM4Axp + VQWK, 2, 5, bpmstripline, BPM4Axm + VQWK, 2, 6, bpmstripline, BPM4Ayp + VQWK, 2, 7, bpmstripline, BPM4Aym + +!ADC3 + VQWK, 3, 0, bcm, CAV4BX + VQWK, 3, 1, bcm, CAV4BY + VQWK, 3, 2, bcm, CAV4BQ + VQWK, 3, 3, bcm, CAV4CX + VQWK, 3, 4, bcm, CAV4CY + VQWK, 3, 5, bcm, CAV4CQ + VQWK, 3, 6, bcm, QWK_3_6 + VQWK, 3, 7, bcm, UNSER + +!ADC4 + VQWK, 4, 0, bcm, CAV4DX + VQWK, 4, 1, bcm, CAV4DY + VQWK, 4, 2, bcm, CAV4DQ + VQWK, 4, 3, bcm, QWK_4_3 + VQWK, 4, 4, bpmstripline, BPM10xm + VQWK, 4, 5, bpmstripline, BPM10xp + VQWK, 4, 6, bpmstripline, BPM10yp + VQWK, 4, 7, bpmstripline, BPM10ym + +Bank=0x03 +!Example Happex ADC Channel Mapping - Cameron doesn't know the +! identity of the BPM channel plugged in, so no number given +! and the xypm are almost certainly incorrectly identified. +!Happex ADC channels start with 3 on the bottom and go up to 0 +!VQWK ADC channels start with 0 on the bottom and go up to 7 + ADC18,0, 3, bcm, ADC18_BPMxm + ADC18,0, 2, bcm, ADC18_BPMxp + ADC18,0, 1, bcm, ADC18_BPMym + ADC18,0, 0, bcm, ADC18_BPMyp + ADC18,1, 3, bcm, ADC18_1_3 + ADC18,1, 2, bcm, ADC18_1_2 + ADC18,1, 1, bcm, ADC18_1_1 + ADC18,1, 0, bcm, ADC18_1_0 + +[PUBLISH] +! new.tree.variable.name, analysis.class, old.tree.variable.name, element.to.store + q_targ, bcm, bcm_an_ds3, c diff --git a/Parity/prminput/prex_maindet.1449-1450.map b/Parity/prminput/prex_maindet.1449-1450.map new file mode 100644 index 000000000..7082aba12 --- /dev/null +++ b/Parity/prminput/prex_maindet.1449-1450.map @@ -0,0 +1,33 @@ +ROC=25 +Bank=0x5 +vqwk_buffer_offset=1 + +sample_size=8064 +! +! Force all channels to be "not_blindable" during testing +! + VQWK, 0, 0, IntegrationPMT, usl not_blindable + VQWK, 0, 1, IntegrationPMT, dsl not_blindable + VQWK, 0, 2, IntegrationPMT, atl1 not_blindable + VQWK, 0, 3, IntegrationPMT, atl2 not_blindable + VQWK, 0, 4, IntegrationPMT, vqwk_25_0ch4 not_blindable + VQWK, 0, 5, IntegrationPMT, vqwk_25_0ch5 not_blindable + VQWK, 0, 6, IntegrationPMT, vqwk_25_0ch6 not_blindable + VQWK, 0, 7, IntegrationPMT, vqwk_25_0ch7 not_blindable + +ROC=26 +Bank=0x5 +vqwk_buffer_offset=1 +sample_size=8064 +! +! Force all channels to be "not_blindable" during testing +! + VQWK, 0, 0, IntegrationPMT, usr not_blindable + VQWK, 0, 1, IntegrationPMT, dsr not_blindable + VQWK, 0, 2, IntegrationPMT, atr1 not_blindable + VQWK, 0, 3, IntegrationPMT, atr2 not_blindable + VQWK, 0, 4, IntegrationPMT, vqwk_26_0ch4 not_blindable + VQWK, 0, 5, IntegrationPMT, vqwk_26_0ch5 not_blindable + VQWK, 0, 6, IntegrationPMT, vqwk_26_0ch6 not_blindable + VQWK, 0, 7, IntegrationPMT, vqwk_26_0ch7 not_blindable + diff --git a/Parity/prminput/prex_sam.1449-1450.map b/Parity/prminput/prex_sam.1449-1450.map new file mode 100644 index 000000000..da72fc47a --- /dev/null +++ b/Parity/prminput/prex_sam.1449-1450.map @@ -0,0 +1,15 @@ +ROC=26 +Bank=0x5 +vqwk_buffer_offset=1 + +sample_size=8064 + + VQWK, 1, 0, IntegrationPMT, sam1 + VQWK, 1, 1, IntegrationPMT, sam2 + VQWK, 1, 2, IntegrationPMT, sam3 + VQWK, 1, 3, IntegrationPMT, sam4 + VQWK, 1, 4, IntegrationPMT, sam5 + VQWK, 1, 5, IntegrationPMT, sam6 + VQWK, 1, 6, IntegrationPMT, sam7 + VQWK, 1, 7, IntegrationPMT, sam8 + diff --git a/Parity/prminput/prexinj_beamline.1449-1450.map b/Parity/prminput/prexinj_beamline.1449-1450.map new file mode 100644 index 000000000..3a48c9008 --- /dev/null +++ b/Parity/prminput/prexinj_beamline.1449-1450.map @@ -0,0 +1,167 @@ + +ROC=24 +Bank=0x02 +vqwk_buffer_offset=1 + +!same sample size for ADCs in a given bank +sample_size=8064 +! +! +! module.type, module.num chan.num, det.type, det.name + + +!ADC0 + VQWK, 0, 0, bpmstripline, bpm0I01Axp + VQWK, 0, 1, bpmstripline, bpm0I01Axm + VQWK, 0, 2, bpmstripline, bpm0I01Ayp + VQWK, 0, 3, bpmstripline, bpm0I01Aym + VQWK, 0, 4, bpmstripline, bpm1I04xp + VQWK, 0, 5, bpmstripline, bpm1I04xm + VQWK, 0, 6, bpmstripline, bpm1I04yp + VQWK, 0, 7, bpmstripline, bpm1I04ym + +!ADC1 + VQWK, 1, 0, bpmstripline, bpm1I02xp + VQWK, 1, 1, bpmstripline, bpm1I02xm + VQWK, 1, 2, bpmstripline, bpm1I02yp + VQWK, 1, 3, bpmstripline, bpm1I02ym + VQWK, 1, 4, bpmstripline, bpm0I01xp + VQWK, 1, 5, bpmstripline, bpm0I01xm + VQWK, 1, 6, bpmstripline, bpm0I01yp + VQWK, 1, 7, bpmstripline, bpm0I01ym + + +!ADC2 + VQWK, 2, 0, bpmstripline, bpm1I06xp + VQWK, 2, 1, bpmstripline, bpm1I06xm + VQWK, 2, 2, bpmstripline, bpm1I06yp + VQWK, 2, 3, bpmstripline, bpm1I06ym + VQWK, 2, 4, bpmstripline, bpm0I02xp + VQWK, 2, 5, bpmstripline, bpm0I02xm + VQWK, 2, 6, bpmstripline, bpm0I02yp + VQWK, 2, 7, bpmstripline, bpm0I02ym + +!ADC3 + VQWK, 3, 0, bpmstripline, bpm0I02Axp + VQWK, 3, 1, bpmstripline, bpm0I02Axm + VQWK, 3, 2, bpmstripline, bpm0I02Ayp + VQWK, 3, 3, bpmstripline, bpm0I02Aym + VQWK, 3, 4, bpmstripline, bpm0I05xp + VQWK, 3, 5, bpmstripline, bpm0I05xm + VQWK, 3, 6, bpmstripline, bpm0I05yp + VQWK, 3, 7, bpmstripline, bpm0I05ym + +!ADC4 + VQWK, 4, 0, bpmstripline, bpm0I07xp + VQWK, 4, 1, bpmstripline, bpm0I07xm + VQWK, 4, 2, bpmstripline, bpm0I07yp + VQWK, 4, 3, bpmstripline, bpm0I07ym + VQWK, 4, 4, bpmstripline, bpm0L01xp + VQWK, 4, 5, bpmstripline, bpm0L01xm + VQWK, 4, 6, bpmstripline, bpm0L01yp + VQWK, 4, 7, bpmstripline, bpm0L01ym + + +!ADC5 + VQWK, 5, 0, bpmstripline, bpm0L02xp + VQWK, 5, 1, bpmstripline, bpm0L02xm + VQWK, 5, 2, bpmstripline, bpm0L02yp + VQWK, 5, 3, bpmstripline, bpm0L02ym + VQWK, 5, 4, bpmstripline, bpm0L03xp + VQWK, 5, 5, bpmstripline, bpm0L03xm + VQWK, 5, 6, bpmstripline, bpm0L03yp + VQWK, 5, 7, bpmstripline, bpm0L03ym + +!ADC6 + VQWK, 6, 0, bpmstripline, bpm0L04xp + VQWK, 6, 1, bpmstripline, bpm0L04xm + VQWK, 6, 2, bpmstripline, bpm0L04yp + VQWK, 6, 3, bpmstripline, bpm0L04ym + VQWK, 6, 4, bpmstripline, bpm0L05xp + VQWK, 6, 5, bpmstripline, bpm0L05xm + VQWK, 6, 6, bpmstripline, bpm0L05yp + VQWK, 6, 7, bpmstripline, bpm0L05ym + +!ADC7 + VQWK, 7, 0, bpmstripline, bpm0L06xp + VQWK, 7, 1, bpmstripline, bpm0L06xm + VQWK, 7, 2, bpmstripline, bpm0L06yp + VQWK, 7, 3, bpmstripline, bpm0L06ym + VQWK, 7, 4, bpmstripline, bpm0L07xp + VQWK, 7, 5, bpmstripline, bpm0L07xm + VQWK, 7, 6, bpmstripline, bpm0L07yp + VQWK, 7, 7, bpmstripline, bpm0L07ym + +!ADC8 + VQWK, 8, 0, bpmstripline, bpm0R02xp + VQWK, 8, 1, bpmstripline, bpm0R02xm + VQWK, 8, 2, bpmstripline, bpm0R02yp + VQWK, 8, 3, bpmstripline, bpm0R02ym + VQWK, 8, 4, bpmstripline, bpm0R05xp + VQWK, 8, 5, bpmstripline, bpm0R05xm + VQWK, 8, 6, bpmstripline, bpm0R05yp + VQWK, 8, 7, bpmstripline, bpm0R05ym + +!ADC9 + VQWK, 9, 0, bpmstripline, bpm0L10xp + VQWK, 9, 1, bpmstripline, bpm0L10xm + VQWK, 9, 2, bpmstripline, bpm0L10yp + VQWK, 9, 3, bpmstripline, bpm0L10ym + VQWK, 9, 4, bpmstripline, bpm2I02xp + VQWK, 9, 5, bpmstripline, bpm2I02xm + VQWK, 9, 6, bpmstripline, bpm2I02yp + VQWK, 9, 7, bpmstripline, bpm2I02ym + +!ADC10 + VQWK, 10, 0, bpmstripline, bpm2I01xp + VQWK, 10, 1, bpmstripline, bpm2I01xm + VQWK, 10, 2, bpmstripline, bpm2I01yp + VQWK, 10, 3, bpmstripline, bpm2I01ym + VQWK, 10, 4, bcm, BCM0L02 + VQWK, 10, 5, bcm, Batery6 + VQWK, 10, 6, bcm, Batery7 + VQWK, 10, 7, bcm, PhaseMonitor + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +Bank=0x01 +scaler_buffer_offset=6 +normclock=clk4MHz_1 + + SCALER, 0, 0, clock, sca0_0 + SCALER, 0, 1, clock, sca0_1 + SCALER, 0, 2, clock, sca0_2 + SCALER, 0, 3, clock, sca0_3 + SCALER, 0, 4, clock, sca0_4 + SCALER, 0, 5, clock, sca0_5 + SCALER, 0, 6, clock, sca0_6 + SCALER, 0, 7, clock, sca0_7 + SCALER, 0, 8, clock, sca0_8 + SCALER, 0, 9, clock, sca0_9 + SCALER, 0, 10, clock, sca0_10 + SCALER, 0, 11, clock, sca0_11 + SCALER, 0, 12, clock, sca0_12 + SCALER, 0, 13, clock, sca0_13 + SCALER, 0, 14, clock, sca0_14 + SCALER, 0, 15, clock, sca0_15 + + SCALER, 0, 16, halomonitor, sca0_16 + SCALER, 0, 17, clock, clk4MHz_1 + SCALER, 0, 18, clock, clk4MHz_2 + SCALER, 0, 19, clock, clk4MHz_3 + SCALER, 0, 20, halomonitor, sca0_20 + SCALER, 0, 21, halomonitor, sca0_21 + SCALER, 0, 22, halomonitor, sca0_22 + SCALER, 0, 23, halomonitor, sca0_23 + SCALER, 0, 24, halomonitor, sca0_24 + SCALER, 0, 25, halomonitor, sca0_25 + SCALER, 0, 26, halomonitor, sca0_26 + SCALER, 0, 27, halomonitor, sca0_27 + SCALER, 0, 28, halomonitor, sca0_28 + SCALER, 0, 29, halomonitor, sca0_29 + SCALER, 0, 30, halomonitor, sca0_30 + SCALER, 0, 31, halomonitor, sca0_31 + + +[PUBLISH] +# # q_targ, bcm, bcm0l02, c +# q_targ, bpmstripline, bpm0i02, ef ### Effective charge of BPM0i02 From ce353b107e25cb7bddda7d49b4696834f37287b1 Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 20 Mar 2019 11:22:42 -0400 Subject: [PATCH 095/102] Added a new SAM pedestal file. --- Parity/prminput/prex_sam_pedestal.1439-.map | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Parity/prminput/prex_sam_pedestal.1439-.map diff --git a/Parity/prminput/prex_sam_pedestal.1439-.map b/Parity/prminput/prex_sam_pedestal.1439-.map new file mode 100644 index 000000000..4f47d77f1 --- /dev/null +++ b/Parity/prminput/prex_sam_pedestal.1439-.map @@ -0,0 +1,9 @@ +!! SAM Pedestal based on run 1221, ELOG 3608 +sam1 , -964.528 , 76.293e-6 +sam2 , 13188.8 , 76.293e-6 +sam3 , 12712.5 , 76.293e-6 +sam4 , 13018.1 , 76.293e-6 +sam5 , 12505.0 , 76.293e-6 +sam6 , 13108.8 , 76.293e-6 +sam7 , 12353.5 , 76.293e-6 +sam8 , 12318.7 , 76.293e-6 From ff4b38df5ae34b7554c76bc4e1663f7274b0d365 Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 20 Mar 2019 11:25:43 -0400 Subject: [PATCH 096/102] Hack scaler and injector helicity channel maps to decode the BMOD marker words and trim cards during March 18-19 test beam. --- Parity/prminput/prex_scaler.1464-1478.map | 32 ++++++ .../prminput/prexinj_helicity.1464-1478.map | 107 ++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 Parity/prminput/prex_scaler.1464-1478.map create mode 100644 Parity/prminput/prexinj_helicity.1464-1478.map diff --git a/Parity/prminput/prex_scaler.1464-1478.map b/Parity/prminput/prex_scaler.1464-1478.map new file mode 100644 index 000000000..7f266d5a2 --- /dev/null +++ b/Parity/prminput/prex_scaler.1464-1478.map @@ -0,0 +1,32 @@ +ROC=23 +bank=0x2 +! module.type module.num chan.num, det.type, det.name + SIS3801D32, 0, 16, syncscal, chouse_fr + SIS3801D32, 0, 17, syncscal, chouse_f1 + SIS3801D32, 0, 18, syncscal, chouse_f2 + SIS3801D32, 0, 23, syncscal, clock_4mhz + +! The following bmod scalers should be removed frmo here and decoded in their own class. + SIS3801D32, 0, 19, syncscal, bmod_trig + SIS3801D32, 0, 24, syncscal, bmod_trim1 + SIS3801D32, 0, 25, syncscal, bmod_trim2 + SIS3801D32, 0, 26, syncscal, bmod_trim3 + SIS3801D32, 0, 27, syncscal, bmod_trim4 + SIS3801D32, 0, 28, syncscal, bmod_trim5 + SIS3801D32, 0, 29, syncscal, bmod_trim6 + SIS3801D32, 0, 30, syncscal, bmod_trim7 + SIS3801D32, 0, 31, syncscal, bmod_trim8 + +ROC=25 +bank=0x2 +! module.type module.num chan.num, det.type, det.name + SIS3801D32, 0, 30, syncscal, lhrs_f1 + SIS3801D32, 0, 31, syncscal, lhrs_f2 + +ROC=26 +bank=0x2 +! module.type module.num chan.num, det.type, det.name + SIS3801D32, 0, 30, syncscal, rhrs_f1 + SIS3801D32, 0, 31, syncscal, rhrs_f2 + +!!! Also should be scalers in the injector... diff --git a/Parity/prminput/prexinj_helicity.1464-1478.map b/Parity/prminput/prexinj_helicity.1464-1478.map new file mode 100644 index 000000000..c04e13fbb --- /dev/null +++ b/Parity/prminput/prexinj_helicity.1464-1478.map @@ -0,0 +1,107 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! input file for decoding the helicity subsystem +!! Of note in this file: +!! HelicityDecodingMode : will tell which mode of decoding is in use +!! : for now it can be InputRegisterMode, UserbitMode +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!Injector data during happex data taking: run 12331, 12354, 12356 +!HelicityDecodingMode=InputRegisterMode +!PatternPhase=4 +!ROC=23 +! +! Header=0xfdacf000 +! HAPPEX BMW words +!SKIP 148 +!WORD, 0, 0, helicitydata, ha_cleandata +!WORD, 0, 0, helicitydata, ha_scandata1 +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!INPUT REGISTER MODE +HelicityDecodingMode=InputRegisterMode + +InputRegMask_FakeMPS=0 !!! Do not use a input register bit to indicate a "fake" set of helicity bits + +! Set the patternPhase (number of windows in a pattern) for each run range. +! If patternPhase!=4, then also set the NumberPatternsDelayed +! so the reported helicity is delayed by 8 windows (default 2). +!NumberPatternsDelayed=4 +PatternPhase=4 + + + +!Need to set PATTERNPHASEOFFSET = 1 (when pattern phase starts with 1) or 0 (when pattern phase starts with 0) +!default value for PATTERNPHASEOFFSET = 1 is set within the code itself which works fine with regular injector/beamline/parity mock data +!uncomment below line only if phase number start from 0 +PATTERNPHASEOFFSET=0 + + +!seed size is either 24 bit or 30 bit. default is 30 bit +!RandSeedBits=24 + +ROC=24 +Bank=0x3 + +! +! module.type, module.num chan.num, det.type, det.name +! +SKIP 1 ! This is the marker word for PAN +WORD, 0, 0, helicitydata, input_register +WORD, 0, 0, helicitydata, output_register +SKIP 1 ! WORD, 0, 0, helicitydata, sca_MPS_num +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_counter +SKIP 1 ! WORD, 0, 0, helicitydata, sca_PAT_phase +SKIP 3 +WORD, 0, 0, helicitydata, cleandata +WORD, 0, 0, helicitydata, scandata1 +WORD, 0, 0, helicitydata, scandata2 +SKIP 1 +!END + + +!!!! HACK to decode BMW words +ROC=23 +Bank=0x4 + +SKIP 8 +WORD, 0, 0, helicitydata, bmwphase +WORD, 0, 0, helicitydata, bmwperiod +WORD, 0, 0, helicitydata, bmwobj +WORD, 0, 0, helicitydata, bmwfreq +WORD, 0, 0, helicitydata, bmwcycnum +!! +WORD, 0, 0, helicitydata, roc23_cleandata +WORD, 0, 0, helicitydata, roc23_scandata1 +WORD, 0, 0, helicitydata, roc23_scandata2 +!! +WORD, 0, 0, helicitydata, roc23_ioctime +WORD, 0, 0, helicitydata, roc23_ncnt + + +! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +!USER BIT MODE + +!HelicityDecodingMode= UserbitMode +!PatternPhase=4 +!seed size is either 24 bit or 30 bit. default is 24 bit +!RandSeedBits=24 +!RandSeedBits=30 +!ROC=31 +!Bank=0x3101 +! +! module.type, module.num chan.num, det.type, det.name +! +!WORD, 0, 0, helicitydata, cleandata +!WORD, 0, 0, helicitydata, scandata1 +!WORD, 0, 0, helicitydata, scandata2 +!WORD, 0, 0, helicitydata, scalerheader +!WORD, 0, 0, helicitydata, scalercounter +!WORD, 0, 0, helicitydata, userbit +!END From 22406c3539c10437bd9d2d49a8e1979d71164fa6 Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Wed, 20 Mar 2019 14:29:17 -0400 Subject: [PATCH 097/102] Committing some code edits and new macro/panguin configs --- panguin/CMakeLists.txt | 2 +- panguin/macros/cwac_checkrun.cfg | 663 +++++++++++++++++++++++++++++ panguin/macros/sams-bcm.cfg | 59 +++ panguin/macros/showIntegrated.C | 20 + panguin/src/panguinOnlineConfig.cc | 4 +- 5 files changed, 745 insertions(+), 3 deletions(-) create mode 100644 panguin/macros/cwac_checkrun.cfg create mode 100644 panguin/macros/sams-bcm.cfg create mode 100644 panguin/macros/showIntegrated.C diff --git a/panguin/CMakeLists.txt b/panguin/CMakeLists.txt index 599fa204b..9e5563394 100644 --- a/panguin/CMakeLists.txt +++ b/panguin/CMakeLists.txt @@ -40,7 +40,7 @@ endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) # Load ROOT and setup include directory -find_package(ROOT 6 REQUIRED New Gui Minuit2) +find_package(ROOT 6 REQUIRED Gui Minuit2) include_directories(${ROOT_INCLUDE_DIR}) add_definitions(-std=c++11) diff --git a/panguin/macros/cwac_checkrun.cfg b/panguin/macros/cwac_checkrun.cfg new file mode 100644 index 000000000..faa48dbf1 --- /dev/null +++ b/panguin/macros/cwac_checkrun.cfg @@ -0,0 +1,663 @@ +# Configuration file for the online GUI +# This file is for ADCs +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +#guicolor white +# Default root file to look at +#rootfile /adaq1/work1/apar/japanOutput/prexALL_1388.root +#something is wrong with bpm 4a and 4e in 1391 tails +protorootfile $QW_ROOTFILES/prexALL_XXXXX.root + +# Prototype rootfilename.. overrides GetRootFileName.C +#protorootfile ROOTfiles/parity05_XXXXX_standard.root +##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root + +# +#macros +#macro ./macros/noStatBox.C() +# macro ../../../rradloff/FindCorrelation.C(\"mul\",\"yield_bcm_an_us\",\"yield_bcm_an_ds\",\"ErrorFlag == 0\",true,true) +#macro ./showIntegrated.C() + + +# Defined cuts +# View last 1 minute of helicity windows (assumes no oversampling, 120Hz) +definecut raw_evcut ((Entries$-Entry$)<7200) +#view last 1 minute of helicity multiplets (assumes no oversampling, quartet pattern, 120Hz) +definecut pair_evcut ((Entries$-Entry$)<1800) +#view last 1 minute of helicity multiplets (assumes no oversampling, octet pattern, 120Hz) +definecut pair_evcut ((Entries$-Entry$)<900) +#startup events +definecut evcut (pattern_number>1) +definecut cuts (CodaEventNumber>10) +#beam off events +definecut bcmds_cut (-1*bcm_ds>1) +#japan hasn't got ok_cut so define myok_cut +definecut myok_cut (ErrorFlag==0&&yield_bcm_an_us>32.5&&abs(1e6*asym_bcm_an_us)<2e3&&abs(diff_bpm12Y*1e3)<25) +#define a cut for hallC BCM that doesn't exist yets +definecut injcut (ErrorFlag==0&&yield_bcm0l02>61&&abs(1e6*asym_bcm0l02)<2e3) +#define a cut for last 100 events +definecut events100 (Entries$-Entry$)<100 +#cavity cut +#definecut + + +#cannot do two cuts at once +#cannot have more than first plot label work +#cannout use showIntegrated.C +#Error in : macro panguin/showIntegrated.C not found in path .:./macro:./macros:/adaqfs/apps/ROOT/6.14-04/macros + +newpage 2 4 + title Raw BCMs + yield_bcm_an_us:pattern_number myok_cut -type scat -title "Upstream BCMx1" + yield_bcm_an_ds:pattern_number myok_cut -type scat -title "Downstream BCMx1" + yield_bcm_an_ds3:pattern_number myok_cut -type scat -title "Downstream BCMx3" + yield_bcm_dg_us:pattern_number myok_cut -type scat -title "Upstream BCM DG" + yield_bcm_dg_ds:pattern_number myok_cut -type scat -title "Downstream BCM DG" + yield_unser:pattern_number myok_cut -type scat -title "UNSER" + yield_bcm_an_ds10*0:pattern_number myok_cut injcut -type scat -title "Hall-C BCM" + yield_bcm0l02:pattern_number injcut -type scat -title "0L02 Inj BCM" + + +newpage 2 3 + title Raw Dithering BPMs + yield_bpm4eX:pattern_number myok_cut -type scat -title "BPM4ex" + yield_bpm4eY:pattern_number myok_cut -type scat -title "BPM4ey" + yield_bpm4aX:pattern_number myok_cut -type scat -title "BPM4ax" + yield_bpm4aY:pattern_number myok_cut -type scat -title "BPM4ay" + yield_bpm12X:pattern_number myok_cut -type scat -title "BPM12x" + yield_bpm12Y:pattern_number myok_cut -type scat -title "BPM12y" + + +newpage 3 3 + title Cavity BPMs + yield_cav4bq:pattern_number myok_cut myok_cut&&injcut -type scat -title "BPMCAV4bq" + yield_cav4bx:pattern_number myok_cut myok_cut&&injcut -type scat -title "BPMCAV4bx" + yield_cav4by:pattern_number myok_cut myok_cut&&injcut -type scat -title "BPMCAV4by" + yield_cav4cq:pattern_number myok_cut myok_cut&&injcut -type scat -title "BPMCAV4cq" + yield_cav4cx:pattern_number myok_cut myok_cut&&injcut -type scat -title "BPMCAV4cx" + yield_cav4cy:pattern_number myok_cut myok_cut&&injcut -type scat -title "BPMCAV4cy" + yield_cav4dq:pattern_number myok_cut myok_cut&&injcut -type scat -title "BPMCAV4dq" + yield_cav4dx:pattern_number myok_cut myok_cut&&injcut -type scat -title "BPMCAV4dx" + yield_cav4dy:pattern_number myok_cut myok_cut&&injcut -type scat -title "BPMCAV4dy" + +newpage 3 2 + title Normalized Cavity BPMs + yield_cav4bx/yield_cav4bq:pattern_number myok_cut&&injcut -type scat -title "BPMCAV4bx/4bq" + yield_cav4by/yield_cav4bq:pattern_number myok_cut&&injcut -type scat -title "BPMCAV4by/4bq" + yield_cav4cx/yield_cav4cq:pattern_number myok_cut&&injcut -type scat -title "BPMCAV4cx/4cq" + yield_cav4cy/yield_cav4cq:pattern_number myok_cut&&injcut -type scat -title "BPMCAV4cy/4cq" + yield_cav4dx/yield_cav4dq:pattern_number myok_cut&&injcut -type scat -title "BPMCAV4dx/4dq" + yield_cav4dy/yield_cav4dq:pattern_number myok_cut&&injcut -type scat -title "BPMCAV4dy/4dq" + +newpage 2 4 + title Raw SAM + yield_sam1:pattern_number myok_cut -type scat -title "SAM1" + yield_sam5:pattern_number myok_cut -type scat -title "SAM5" + yield_sam2:pattern_number myok_cut -type scat -title "SAM2" + yield_sam6:pattern_number myok_cut -type scat -title "SAM6" + yield_sam3:pattern_number myok_cut -type scat -title "SAM3" + yield_sam7:pattern_number myok_cut -type scat -title "SAM7" + yield_sam4:pattern_number myok_cut -type scat -title "SAM4" + yield_sam8:pattern_number myok_cut -type scat -title "SAM8" + + +newpage 2 4 + title Raw Normalized SAM: SAM/current + yield_sam1/yield_bcm_an_ds:pattern_number myok_cut -type scat -title "SAM1/BCM" + yield_sam5/yield_bcm_an_ds:pattern_number myok_cut -type scat -title "SAM5/BCM" + yield_sam2/yield_bcm_an_ds:pattern_number myok_cut -type scat -title "SAM2/BCM" + yield_sam6/yield_bcm_an_ds:pattern_number myok_cut -type scat -title "SAM6/BCM" + yield_sam3/yield_bcm_an_ds:pattern_number myok_cut -type scat -title "SAM3/BCM" + yield_sam7/yield_bcm_an_ds:pattern_number myok_cut -type scat -title "SAM7/BCM" + yield_sam4/yield_bcm_an_ds:pattern_number myok_cut -type scat -title "SAM4/BCM" + yield_sam8/yield_bcm_an_ds:pattern_number myok_cut -type scat -title "SAM8/BCM" + +#newpage 1 2 +# title Raw Normalized FLumi +# yield_n_flumi1:pattern_number myok_cut -type scat -title "FLumi1" + # yield_n_flumi2:pattern_number myok_cut -type scat -title "FLumi2" + +#newpage 1 2 + # title Raw Normalized Detectors + # yield_n_det1:pattern_number myok_cut -type scat -title "Left Arm - Detector 1" +# yield_n_det2:pattern_number myok_cut -type scat -title "Left Arm - Detector 2" + # yield_n_det3:pattern_number myok_cut -type scat -title "Right Arm - Detector 3" +# yield_n_det4:pattern_number myok_cut -type scat -title "Right Arm - Detector 4" + +newpage 6 3 + title Charge Asymmetry + asym_bcm_an_us*1e6 myok_cut -title "Upstream BCM analog" + asym_bcm_an_ds*1e6 myok_cut -title "Downstream BCM analog" + asym_bcm_an_ds3*1e6 myok_cut -title "Downstream BCM 3x" + asym_bcm_dg_us*1e6 myok_cut -title "Upstream BCM digital" + asym_bcm_dg_ds*1e6 myok_cut -title "Downstream BCM analog" + asym_bcm0l02*1e6 injcut myok_cut -title "Inj BCM" + + asym_bcm_an_us*1e6:pattern_number myok_cut -type scat -title "Upstream BCM analog" + asym_bcm_an_ds*1e6:pattern_number myok_cut -type scat -title "Downstream BCM analog" + asym_bcm_an_ds3*1e6:pattern_number myok_cut -type scat -title "Downstream BCM 3x" + asym_bcm_dg_us*1e6:pattern_number myok_cut -type scat -title "Upstream BCM digital" + asym_bcm_dg_ds*1e6:pattern_number myok_cut -type scat -title "Downstream BCM digital" + asym_bcm0l02*1e6:pattern_number injcut myok_cut -type scat -title "Inj BCM vs event" +# macro ./showIntegrated.C(\"mul\",\"asym_bcm_an_ds3*1e6\",\"myok_cut\") +# asym_bcm_an_ds*1e6 myok_cut -title "Downstream BCM 1x" + asym_bcm_an_us*1e6:pattern_number events100 myok_cut -type line -title "Upstream BCM analog" + asym_bcm_an_ds*1e6:pattern_number events100 myok_cut -type line -title "Downstream BCM analog" + asym_bcm_dg_us*1e6:pattern_number events100 myok_cut -type line -title "Upstream BCM digital" + asym_bcm_dg_ds*1e6:pattern_number events100 myok_cut -type line -title "Downstream BCM digital" + asym_bcm_an_ds3*1e6:pattern_number events100 myok_cut -type line -title "Downstream BCM 3x" + asym_bcm0l02*1e6:pattern_number events100 injcut -type line -title "Inj BCM " + + +#newpage 1 3 + # title Hall-C Charge Asymmetry (right now it is inj 0L02) +# asym_bcm0l02*1e6 injcut myok_cut -title "Inj BCM" + # asym_bcm0l02*1e6:pattern_number injcut myok_cut -type scat -title "Inj BCM vs event" + # macro .//showIntegrated.C("mul","asym_bcm0l02","injcut") + # asym_bcm0l02*1e6:pattern_number events100 myok_cut -type line -title "Injector BCM vs event" + +newpage 4 3 + title BCM correlations + asym_bcm_an_us*1e6:asym_bcm_an_ds*1e6 myok_cut -type scat -title "Aq analog us:Aq analog ds" + asym_bcm_dg_us*1e6:asym_bcm_dg_ds*1e6 myok_cut -type scat -title "Aq digital us:Aq digital ds" + asym_bcm_an_us*1e6:asym_bcm_dg_us*1e6 myok_cut -type scat -title "Aq analog us:Aq digital us" + asym_bcm_an_ds*1e6:asym_bcm_dg_ds*1e6 myok_cut -type scat -title "Aq analog ds:Aq digital ds" + asym_bcm_an_us*1e6/sqrt(2)-asym_bcm_an_ds*1e6/sqrt(2) myok_cut -type scat -title "(Aq analog us- Aq analog ds)/sqrt(2)" + asym_bcm_dg_us*1e6/sqrt(2)-asym_bcm_dg_ds*1e6/sqrt(2) myok_cut -type scat -title "(Aq digital us- Aq digital ds)/sqrt(2)" + asym_bcm_an_us*1e6/sqrt(2)-asym_bcm_dg_us*1e6/sqrt(2) myok_cut -type scat -title "(Aq analog us- Aq digital us)/sqrt(2)" + asym_bcm_an_ds*1e6/sqrt(2)-asym_bcm_dg_ds*1e6/sqrt(2) myok_cut -type scat -title "(Aq analog ds- Aq digital ds)/sqrt(2)" + asym_bcm_an_us*1e6:asym_bcm_an_ds*1e6 myok_cut -type prof -title "Aq analog us:Aq analog ds" + asym_bcm_dg_us*1e6:asym_bcm_dg_ds*1e6 myok_cut -type prof -title "Aq digital us:Aq digital ds" + asym_bcm_an_us*1e6:asym_bcm_dg_us*1e6 myok_cut -type prof -title "Aq analog us:Aq digital us" + asym_bcm_an_ds*1e6:asym_bcm_dg_ds*1e6 myok_cut -type prof -title "Aq analog ds:Aq digital ds" + + + +newpage 2 5 + title BPM Diffs Stripcharts + diff_bpm4eX*1000:pattern_number myok_cut -type scat -title "BPM1H04ex" + diff_bpm4eY*1000:pattern_number myok_cut -type scat -title "BPM1H04ey" + diff_bpm4aX*1000:pattern_number myok_cut -type scat -title "BPM1H04ax" + diff_bpm4aY*1000:pattern_number myok_cut -type scat -title "BPM1H04ay" + diff_bpm12X*1000:pattern_number myok_cut -type scat -title "BPM1C12x" + diff_bpm12Y*1000:pattern_number myok_cut -type scat -title "BPM1C12y" + diff_bpm10X*1000:pattern_number myok_cut -type scat -title "BPM1C10x" + diff_bpm10Y*1000:pattern_number myok_cut -type scat -title "BPM1C10y" + diff_bpm8X*1000:pattern_number myok_cut -type scat -title "BPM1C08x" + diff_bpm8Y*1000:pattern_number myok_cut -type scat -title "BPM1C08y" + + +newpage 2 5 + title Average BPM Diffs + diff_bpm4eX*1000 myok_cut -title "BPM1H04ex" + diff_bpm4eY*1000 myok_cut -title "BPM1H04ey" + diff_bpm4aX*1000 myok_cut -title "BPM1H04ax" + diff_bpm4aY*1000 myok_cut -title "BPM1H04ay" + diff_bpm12X*1000 myok_cut -title "BPM1C12x" + diff_bpm12Y*1000 myok_cut -title "BPM1C12y" + diff_bpm10X*1000 myok_cut -title "BPM1C10x" + diff_bpm10Y*1000 myok_cut -title "BPM1C10y" + diff_bpm8X*1000 myok_cut -title "BPM1C08x" + diff_bpm8Y*1000 myok_cut -title "BPM1C08y" + +newpage 5 5 + title BPM X Correlations + diff_bpm4aX*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D4aX:D4aX" + diff_bpm4eX*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D4eX:D4aX" + diff_bpm12X*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D12X:D4aX" + diff_bpm10X*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D10X:D4aX" + diff_bpm8X*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D8X:D4aX" + + diff_bpm4aX*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D4aX:D4eX" + diff_bpm4eX*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D4eX:D4eX" + diff_bpm12X*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D12X:D4eX" + diff_bpm10X*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D10X:D4eX" + diff_bpm8X*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D8X:D4eX" + + diff_bpm4aX*1000:diff_bpm12X*1000 myok_cut -type prof -title "D4aX:D12X" + diff_bpm4eX*1000:diff_bpm12X*1000 myok_cut -type prof -title "D4eX:D12X" + diff_bpm12X*1000:diff_bpm12X*1000 myok_cut -type prof -title "D12X:D12X" + diff_bpm10X*1000:diff_bpm12X*1000 myok_cut -type prof -title "D10X:D12X" + diff_bpm8X*1000:diff_bpm12X*1000 myok_cut -type prof -title "D8X:D12X" + + diff_bpm4aX*1000:diff_bpm10X*1000 myok_cut -type prof -title "D4aX:D10X" + diff_bpm4eX*1000:diff_bpm10X*1000 myok_cut -type prof -title "D4eX:D10X" + diff_bpm12X*1000:diff_bpm10X*1000 myok_cut -type prof -title "D12X:D10X" + diff_bpm10X*1000:diff_bpm10X*1000 myok_cut -type prof -title "D10X:D10X" + diff_bpm8X*1000:diff_bpm10X*1000 myok_cut -type prof -title "D8X:D10X" + + diff_bpm4aX*1000:diff_bpm8X*1000 myok_cut -type prof -title "D4aX:D8X" + diff_bpm4eX*1000:diff_bpm8X*1000 myok_cut -type prof -title "D4eX:D8X" + diff_bpm12X*1000:diff_bpm8X*1000 myok_cut -type prof -title "D12X:D8X" + diff_bpm10X*1000:diff_bpm8X*1000 myok_cut -type prof -title "D10X:D8X" + diff_bpm8X*1000:diff_bpm8X*1000 myok_cut -type prof -title "D8X:D8X" + +newpage 5 5 + title BPM Y Correlations + diff_bpm4aY*1000:diff_bpm4aY*1000 myok_cut -type prof -title "D4aY:D4aY" + diff_bpm4eY*1000:diff_bpm4aY*1000 myok_cut -type prof -title "D4eY:D4aY" + diff_bpm12Y*1000:diff_bpm4aY*1000 myok_cut -type prof -title "D12Y:D4aY" + diff_bpm10Y*1000:diff_bpm4aY*1000 myok_cut -type prof -title "D10Y:D4aY" + diff_bpm8Y*1000:diff_bpm4aY*1000 myok_cut -type prof -title "D8Y:D4aY" + + diff_bpm4aY*1000:diff_bpm4eY*1000 myok_cut -type prof -title "D4aY:D4eY" + diff_bpm4eY*1000:diff_bpm4eY*1000 myok_cut -type prof -title "D4eY:D4eY" + diff_bpm12Y*1000:diff_bpm4eY*1000 myok_cut -type prof -title "D12Y:D4eY" + diff_bpm10Y*1000:diff_bpm4eY*1000 myok_cut -type prof -title "D10Y:D4eY" + diff_bpm8Y*1000:diff_bpm4eY*1000 myok_cut -type prof -title "D8Y:D4eY" + + diff_bpm4aY*1000:diff_bpm12Y*1000 myok_cut -type prof -title "D4aY:D12Y" + diff_bpm4eY*1000:diff_bpm12Y*1000 myok_cut -type prof -title "D4eY:D12Y" + diff_bpm12Y*1000:diff_bpm12Y*1000 myok_cut -type prof -title "D12Y:D12Y" + diff_bpm10Y*1000:diff_bpm12Y*1000 myok_cut -type prof -title "D10Y:D12Y" + diff_bpm8Y*1000:diff_bpm12Y*1000 myok_cut -type prof -title "D8Y:D12Y" + + diff_bpm4aY*1000:diff_bpm10Y*1000 myok_cut -type prof -title "D4aY:D10Y" + diff_bpm4eY*1000:diff_bpm10Y*1000 myok_cut -type prof -title "D4eY:D10Y" + diff_bpm12Y*1000:diff_bpm10Y*1000 myok_cut -type prof -title "D12Y:D10Y" + diff_bpm10Y*1000:diff_bpm10Y*1000 myok_cut -type prof -title "D10Y:D10Y" + diff_bpm8Y*1000:diff_bpm10Y*1000 myok_cut -type prof -title "D8Y:D10Y" + + diff_bpm4aY*1000:diff_bpm8Y*1000 myok_cut -type prof -title "D4aY:D8Y" + diff_bpm4eY*1000:diff_bpm8Y*1000 myok_cut -type prof -title "D4eY:D8Y" + diff_bpm12Y*1000:diff_bpm8Y*1000 myok_cut -type prof -title "D12Y:D8Y" + diff_bpm10Y*1000:diff_bpm8Y*1000 myok_cut -type prof -title "D10Y:D8Y" + diff_bpm8Y*1000:diff_bpm8Y*1000 myok_cut -type prof -title "D8Y:D8Y" + + + +newpage 5 5 + title BPM XY Correlations + diff_bpm4aY*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D4aY:D4aX" + diff_bpm4eY*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D4eY:D4aX" + diff_bpm12Y*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D12Y:D4aX" + diff_bpm10Y*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D10Y:D4aX" + diff_bpm8Y*1000:diff_bpm4aX*1000 myok_cut -type prof -title "D8Y:D4aX" + + diff_bpm4aY*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D4aY:D4eX" + diff_bpm4eY*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D4eY:D4eX" + diff_bpm12Y*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D12Y:D4eX" + diff_bpm10Y*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D10Y:D4eX" + diff_bpm8Y*1000:diff_bpm4eX*1000 myok_cut -type prof -title "D8Y:D4eX" + + diff_bpm4aY*1000:diff_bpm12X*1000 myok_cut -type prof -title "D4aY:D12X" + diff_bpm4eY*1000:diff_bpm12X*1000 myok_cut -type prof -title "D4eY:D12X" + diff_bpm12Y*1000:diff_bpm12X*1000 myok_cut -type prof -title "D12Y:D12X" + diff_bpm10Y*1000:diff_bpm12X*1000 myok_cut -type prof -title "D10Y:D12X" + diff_bpm8Y*1000:diff_bpm12X*1000 myok_cut -type prof -title "D8Y:D12X" + + diff_bpm4aY*1000:diff_bpm10X*1000 myok_cut -type prof -title "D4aY:D10X" + diff_bpm4eY*1000:diff_bpm10X*1000 myok_cut -type prof -title "D4eY:D10X" + diff_bpm12Y*1000:diff_bpm10X*1000 myok_cut -type prof -title "D12Y:D10X" + diff_bpm10Y*1000:diff_bpm10X*1000 myok_cut -type prof -title "D10Y:D10X" + diff_bpm8Y*1000:diff_bpm10X*1000 myok_cut -type prof -title "D8Y:D10X" + + diff_bpm4aY*1000:diff_bpm8X*1000 myok_cut -type prof -title "D4aY:D8X" + diff_bpm4eY*1000:diff_bpm8X*1000 myok_cut -type prof -title "D4eY:D8X" + diff_bpm12Y*1000:diff_bpm8X*1000 myok_cut -type prof -title "D12Y:D8X" + diff_bpm10Y*1000:diff_bpm8X*1000 myok_cut -type prof -title "D10Y:D8X" + diff_bpm8Y*1000:diff_bpm8X*1000 myok_cut -type prof -title "D8Y:D8X" + + +newpage 10 10 + title BPM Scatter + diff_bpm4aX*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D4aX:D4aX" + diff_bpm4eX*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D4eX:D4aX" + diff_bpm12X*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D12X:D4aX" + diff_bpm10X*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D10X:D4aX" + diff_bpm8X*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D8X:D4aX" + diff_bpm4aY*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D4aY:D4aX" + diff_bpm4eY*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D4eY:D4aX" + diff_bpm12Y*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D12Y:D4aX" + diff_bpm10Y*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D10Y:D4aX" + diff_bpm8Y*1000:diff_bpm4aX*1000 myok_cut -type scat -title "D8Y:D4aX" + + diff_bpm4aX*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D4aX:D4eX" + diff_bpm4eX*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D4eX:D4eX" + diff_bpm12X*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D12X:D4eX" + diff_bpm10X*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D10X:D4eX" + diff_bpm8X*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D8X:D4eX" + diff_bpm4aY*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D4aY:D4eX" + diff_bpm4eY*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D4eY:D4eX" + diff_bpm12Y*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D12Y:D4eX" + diff_bpm10Y*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D10Y:D4eX" + diff_bpm8Y*1000:diff_bpm4eX*1000 myok_cut -type scat -title "D8Y:D4eX" + + diff_bpm4aX*1000:diff_bpm12X*1000 myok_cut -type scat -title "D4aX:D12X" + diff_bpm4eX*1000:diff_bpm12X*1000 myok_cut -type scat -title "D4eX:D12X" + diff_bpm12X*1000:diff_bpm12X*1000 myok_cut -type scat -title "D12X:D12X" + diff_bpm10X*1000:diff_bpm12X*1000 myok_cut -type scat -title "D10X:D12X" + diff_bpm8X*1000:diff_bpm12X*1000 myok_cut -type scat -title "D8X:D12X" + diff_bpm4aY*1000:diff_bpm12X*1000 myok_cut -type scat -title "D4aY:D12X" + diff_bpm4eY*1000:diff_bpm12X*1000 myok_cut -type scat -title "D4eY:D12X" + diff_bpm12Y*1000:diff_bpm12X*1000 myok_cut -type scat -title "D12Y:D12X" + diff_bpm10Y*1000:diff_bpm12X*1000 myok_cut -type scat -title "D10Y:D12X" + diff_bpm8Y*1000:diff_bpm12X*1000 myok_cut -type scat -title "D8Y:D12X" + + diff_bpm4aX*1000:diff_bpm10X*1000 myok_cut -type scat -title "D4aX:D10X" + diff_bpm4eX*1000:diff_bpm10X*1000 myok_cut -type scat -title "D4eX:D10X" + diff_bpm12X*1000:diff_bpm10X*1000 myok_cut -type scat -title "D12X:D10X" + diff_bpm10X*1000:diff_bpm10X*1000 myok_cut -type scat -title "D10X:D10X" + diff_bpm8X*1000:diff_bpm10X*1000 myok_cut -type scat -title "D8X:D10X" + diff_bpm4aY*1000:diff_bpm10X*1000 myok_cut -type scat -title "D4aY:D10X" + diff_bpm4eY*1000:diff_bpm10X*1000 myok_cut -type scat -title "D4eY:D10X" + diff_bpm12Y*1000:diff_bpm10X*1000 myok_cut -type scat -title "D12Y:D10X" + diff_bpm10Y*1000:diff_bpm10X*1000 myok_cut -type scat -title "D10Y:D10X" + diff_bpm8Y*1000:diff_bpm10X*1000 myok_cut -type scat -title "D8Y:D10X" + + diff_bpm4aX*1000:diff_bpm8X*1000 myok_cut -type scat -title "D4aX:D8X" + diff_bpm4eX*1000:diff_bpm8X*1000 myok_cut -type scat -title "D4eX:D8X" + diff_bpm12X*1000:diff_bpm8X*1000 myok_cut -type scat -title "D12X:D8X" + diff_bpm10X*1000:diff_bpm8X*1000 myok_cut -type scat -title "D10X:D8X" + diff_bpm8X*1000:diff_bpm8X*1000 myok_cut -type scat -title "D8X:D8X" + diff_bpm4aY*1000:diff_bpm8X*1000 myok_cut -type scat -title "D4aY:D8X" + diff_bpm4eY*1000:diff_bpm8X*1000 myok_cut -type scat -title "D4eY:D8X" + diff_bpm12Y*1000:diff_bpm8X*1000 myok_cut -type scat -title "D12Y:D8X" + diff_bpm10Y*1000:diff_bpm8X*1000 myok_cut -type scat -title "D10Y:D8X" + diff_bpm8Y*1000:diff_bpm8X*1000 myok_cut -type scat -title "D8Y:D8X" + + + diff_bpm4aX*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D4aX:D4aY" + diff_bpm4eX*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D4eX:D4aY" + diff_bpm12X*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D12X:D4aY" + diff_bpm10X*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D10X:D4aY" + diff_bpm8X*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D8X:D4aY" + diff_bpm4aY*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D4aY:D4aY" + diff_bpm4eY*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D4eY:D4aY" + diff_bpm12Y*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D12Y:D4aY" + diff_bpm10Y*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D10Y:D4aY" + diff_bpm8Y*1000:diff_bpm4aY*1000 myok_cut -type scat -title "D8Y:D4aY" + + diff_bpm4aX*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D4aX:D4eY" + diff_bpm4eX*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D4eX:D4eY" + diff_bpm12X*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D12X:D4eY" + diff_bpm10X*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D10X:D4eY" + diff_bpm8X*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D8X:D4eY" + diff_bpm4aY*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D4aY:D4eY" + diff_bpm4eY*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D4eY:D4eY" + diff_bpm12Y*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D12Y:D4eY" + diff_bpm10Y*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D10Y:D4eY" + diff_bpm8Y*1000:diff_bpm4eY*1000 myok_cut -type scat -title "D8Y:D4eY" + + diff_bpm4aX*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D4aX:D12Y" + diff_bpm4eX*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D4eX:D12Y" + diff_bpm12X*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D12X:D12Y" + diff_bpm10X*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D10X:D12Y" + diff_bpm8X*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D8X:D12Y" + diff_bpm4aY*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D4aY:D12Y" + diff_bpm4eY*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D4eY:D12Y" + diff_bpm12Y*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D12Y:D12Y" + diff_bpm10Y*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D10Y:D12Y" + diff_bpm8Y*1000:diff_bpm12Y*1000 myok_cut -type scat -title "D8Y:D12Y" + + diff_bpm4aX*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D4aX:D10Y" + diff_bpm4eX*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D4eX:D10Y" + diff_bpm12X*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D12X:D10Y" + diff_bpm10X*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D10X:D10Y" + diff_bpm8X*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D8X:D10Y" + diff_bpm4aY*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D4aY:D10Y" + diff_bpm4eY*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D4eY:D10Y" + diff_bpm12Y*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D12Y:D10Y" + diff_bpm10Y*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D10Y:D10Y" + diff_bpm8Y*1000:diff_bpm10Y*1000 myok_cut -type scat -title "D8Y:D10Y" + + diff_bpm4aX*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D4aX:D8Y" + diff_bpm4eX*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D4eX:D8Y" + diff_bpm12X*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D12X:D8Y" + diff_bpm10X*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D10X:D8Y" + diff_bpm8X*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D8X:D8Y" + diff_bpm4aY*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D4aY:D8Y" + diff_bpm4eY*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D4eY:D8Y" + diff_bpm12Y*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D12Y:D8Y" + diff_bpm10Y*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D10Y:D8Y" + diff_bpm8Y*1000:diff_bpm8Y*1000 myok_cut -type scat -title "D8Y:D8Y" + + + +#newpage 2 3 + # title Integrated BPM Diffs x2x1000 + # macro ./showIntegrated.C("mul","diff_bpm4eX","myok_cut") + # macro ./showIntegrated.C("mul","diff_bpm4eY","myok_cut") + # macro ./showIntegrated.C("mul","diff_bpm4aX","myok_cut") + # macro ./showIntegrated.C("mul","diff_bpm4aY","myok_cut") + # macro ./showIntegrated.C("mul","diff_bpm12X","myok_cut") + +#newpage 1 3 + # title Normalized Left Detector Asymmetry +# asym_n_det1:pattern_number myok_cut -type prof -title "Left Arm Detector 1" + # asym_n_det1 myok_cut -title "Left Arm Detector 1" + # macro ./showIntegrated.C("P","asym_n_det1","myok_cut") + +#newpage 1 3 + # title Normalized Right Detector Asymmetry + # asym_n_det3:pattern_number myok_cut -type prof -title "Left Arm Detector 3" + # asym_n_det3 myok_cut -title "Left Arm Detector 3" + # macro ./showIntegrated.C("P","asym_n_det3","myok_cut") + +#newpage 1 2 + # title Normalized Detector Double-Difference + # asym_n_det1-asym_n_det3:pattern_number myok_cut -tree P -type prof -title "Detector 1 - Detector 3" + # asym_n_det1-asym_n_det3 myok_cut -tree P -title "Detector 1 - Detector 3" + +newpage 2 4 + title SAM Asymmetries + asym_sam1*1e6 myok_cut -title "ASAM1" + asym_sam5*1e6 myok_cut -title "ASAM5" + asym_sam2*1e6 myok_cut -title "ASAM2" + asym_sam6*1e6 myok_cut -title "ASAM6" + asym_sam3*1e6 myok_cut -title "ASAM3" + asym_sam7*1e6 myok_cut -title "ASAM7" + asym_sam4*1e6 myok_cut -title "ASAM4" + asym_sam8*1e6 myok_cut -title "ASAM8" + +newpage 2 4 + title Normalized SAM Asymmetries + asym_sam1*1e6-asym_bcm_an_ds*1e6 myok_cut -title "ASAM1-Aqds" + asym_sam5*1e6-asym_bcm_an_ds*1e6 myok_cut -title "ASAM5-Aqds" + asym_sam2*1e6-asym_bcm_an_ds*1e6 myok_cut -title "ASAM2-Aqds" + asym_sam6*1e6-asym_bcm_an_ds*1e6 myok_cut -title "ASAM6-Aqds" + asym_sam3*1e6-asym_bcm_an_ds*1e6 myok_cut -title "ASAM3-Aqds" + asym_sam7*1e6-asym_bcm_an_ds*1e6 myok_cut -title "ASAM7-Aqds" + asym_sam4*1e6-asym_bcm_an_ds*1e6 myok_cut -title "ASAM4-Aqds" + asym_sam8*1e6-asym_bcm_an_ds*1e6 myok_cut -title "ASAM8-Aqds" + +newpage 5 4 + title Normalized SAM common mode correlations + asym_sam1*1e6/2+asym_sam5*1e6/2-asym_bcm_an_ds*1e6 myok_cut -title "(ASAM1+ASAM5)/2-Aq" + asym_sam2*1e6/2+asym_sam6*1e6/2-asym_bcm_an_ds*1e6 myok_cut -title "(ASAM2+ASAM6)/2-Aq" + asym_sam3*1e6/2+asym_sam7*1e6/2-asym_bcm_an_ds*1e6 myok_cut -title "(ASAM3+ASAM7)/2-Aq" + asym_sam4*1e6/2+asym_sam8*1e6/2-asym_bcm_an_ds*1e6 myok_cut -title "(ASAM4+ASAM8)/2-Aq" + + asym_sam1*1e6/2+asym_sam5*1e6/2-asym_bcm_an_ds*1e6:asym_sam2*1e6/2+asym_sam6*1e6/2-asym_bcm_an_ds*1e6 myok_cut -type scat -title "(ASAM1+ASAM5)/2-Aq:(ASAM2+ASAM6)/2-Aq" + asym_sam2*1e6/2+asym_sam6*1e6/2-asym_bcm_an_ds*1e6:asym_sam2*1e6/2+asym_sam6*1e6/2-asym_bcm_an_ds*1e6 myok_cut -type scat -title "(ASAM2+ASAM6)/2-Aq:(ASAM2+ASAM6)/2-Aq" + asym_sam4*1e6/2+asym_sam8*1e6/2-asym_bcm_an_ds*1e6:asym_sam2*1e6/2+asym_sam6*1e6/2-asym_bcm_an_ds*1e6 myok_cut -type scat -title "(ASAM4+ASAM8)/2-Aq:(ASAM2+ASAM6)/2-Aq" + + asym_sam1*1e6/2+asym_sam5*1e6/2-asym_bcm_an_ds*1e6:asym_sam3*1e6/2+asym_sam7*1e6/2-asym_bcm_an_ds*1e6 myok_cut -type scat -title "(ASAM1+ASAM5)/2-Aq:(ASAM3+ASAM7)/2-Aq" + asym_sam2*1e6/2+asym_sam6*1e6/2-asym_bcm_an_ds*1e6:asym_sam3*1e6/2+asym_sam7*1e6/2-asym_bcm_an_ds*1e6 myok_cut -type scat -title "(ASAM2+ASAM6)/2-Aq:(ASAM3+ASAM7)/2-Aq" + asym_sam4*1e6/2+asym_sam8*1e6/2-asym_bcm_an_ds*1e6:asym_sam3*1e6/2+asym_sam7*1e6/2-asym_bcm_an_ds*1e6 myok_cut -type scat -title "(ASAM4+ASAM8)/2-Aq:(ASAM3+ASAM7)/2-Aq" + + asym_sam1*1e6/2+asym_sam5*1e6/2-asym_bcm_an_ds*1e6:asym_sam4*1e6/2+asym_sam8*1e6/2-asym_bcm_an_ds*1e6 myok_cut -type scat -title "(ASAM1+ASAM5)/2-Aq:(ASAM4+ASAM8)/2-Aq" + asym_sam2*1e6/2+asym_sam6*1e6/2-asym_bcm_an_ds*1e6:asym_sam4*1e6/2+asym_sam8*1e6/2-asym_bcm_an_ds*1e6 myok_cut -type scat -title "(ASAM2+ASAM6)/2-Aq:(ASAM4+ASAM8)/2-Aq" + asym_sam3*1e6/2+asym_sam7*1e6/2-asym_bcm_an_ds*1e6:asym_sam4*1e6/2+asym_sam8*1e6/2-asym_bcm_an_ds*1e6 myok_cut -type scat -title "(ASAM3+ASAM7)/2-Aq:(ASAM4+ASAM8)/2-Aq" + + asym_sam1*1e6/2+asym_sam5*1e6/2-asym_sam3*1e6/2-asym_sam7*1e6/2 myok_cut -title "(ASAM1+ASAM5)/2-(ASAM3+ASAM7)/2" + asym_sam2*1e6/2+asym_sam6*1e6/2-asym_sam3*1e6/2-asym_sam7*1e6/2 myok_cut -title "(ASAM2+ASAM6)/2-(ASAM3+ASAM7)/2" + asym_sam4*1e6/2+asym_sam8*1e6/2-asym_sam3*1e6/2-asym_sam7*1e6/2 myok_cut -title "(ASAM4+ASAM8)/2-(ASAM3+ASAM7)/2" + + asym_sam1*1e6/2+asym_sam5*1e6/2-asym_sam2*1e6/2-asym_sam6*1e6/2 myok_cut -title "(ASAM1+ASAM5)/2-(ASAM2+ASAM6)/2" + asym_sam1*1e6/2+asym_sam5*1e6/2-asym_sam2*1e6/2-asym_sam6*1e6/2 myok_cut -title "(ASAM4+ASAM8)/2-(ASAM2+ASAM6)/2" + + asym_sam2*1e6/2+asym_sam6*1e6/2-asym_sam4*1e6/2-asym_sam8*1e6/2 myok_cut -title "(ASAM2+ASAM6)/2-(ASAM4+ASAM8)/2" + + +newpage 2 4 + title Normalized SAM Asymmetries vs us bcm + asym_sam1*1e6-asym_bcm_an_ds*1e6:asym_bcm_an_us*1e6 myok_cut -type prof -title "ASAM1-Aqds:Aqus" + asym_sam5*1e6-asym_bcm_an_ds*1e6:asym_bcm_an_us*1e6 myok_cut -type prof -title "ASAM5-Aqds:Aqus" + asym_sam2*1e6-asym_bcm_an_ds*1e6:asym_bcm_an_us*1e6 myok_cut -type prof -title "ASAM2-Aqds:Aqus" + asym_sam6*1e6-asym_bcm_an_ds*1e6:asym_bcm_an_us*1e6 myok_cut -type prof -title "ASAM6-Aqds:Aqus" + asym_sam3*1e6-asym_bcm_an_ds*1e6:asym_bcm_an_us*1e6 myok_cut -type prof -title "ASAM3-Aqds:Aqus" + asym_sam7*1e6-asym_bcm_an_ds*1e6:asym_bcm_an_us*1e6 myok_cut -type prof -title "ASAM7-Aqds:Aqus" + asym_sam4*1e6-asym_bcm_an_ds*1e6:asym_bcm_an_us*1e6 myok_cut -type prof -title "ASAM4-Aqds:Aqus" + asym_sam8*1e6-asym_bcm_an_ds*1e6:asym_bcm_an_us*1e6 myok_cut -type prof -title "ASAM8-Aqds:Aqus" + +newpage 2 4 + title Normalized SAM Asymmetry Stripcharts + asym_sam1*1e6-asym_bcm_an_ds*1e6:pattern_number myok_cut -type scat -title "SAM1" + asym_sam5*1e6-asym_bcm_an_ds*1e6:pattern_number myok_cut -type scat -title "SAM5" + asym_sam2*1e6-asym_bcm_an_ds*1e6:pattern_number myok_cut -type scat -title "SAM2" + asym_sam6*1e6-asym_bcm_an_ds*1e6:pattern_number myok_cut -type scat -title "SAM6" + asym_sam3*1e6-asym_bcm_an_ds*1e6:pattern_number myok_cut -type scat -title "SAM3" + asym_sam7*1e6-asym_bcm_an_ds*1e6:pattern_number myok_cut -type scat -title "SAM7" + asym_sam4*1e6-asym_bcm_an_ds*1e6:pattern_number myok_cut -type scat -title "SAM4" + asym_sam8*1e6-asym_bcm_an_ds*1e6:pattern_number myok_cut -type scat -title "SAM8" + +newpage 8 6 + title Normalized SAM Asymmetries vs BPMs + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type prof -title "ASAM1-Aqds:D4aX" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type prof -title "ASAM5-Aqds:D4aX" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type prof -title "ASAM2-Aqds:D4aX" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type prof -title "ASAM6-Aqds:D4aX" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type prof -title "ASAM3-Aqds:D4aX" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type prof -title "ASAM7-Aqds:D4aX" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type prof -title "ASAM4-Aqds:D4aX" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type prof -title "ASAM8-Aqds:D4aX" + +#newpage 2 4 + # title Normalized SAM Asymmetries vs BPM4aY + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type prof -title "ASAM1-Aqds:D4aY" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type prof -title "ASAM5-Aqds:D4aY" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type prof -title "ASAM2-Aqds:D4aY" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type prof -title "ASAM6-Aqds:D4aY" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type prof -title "ASAM3-Aqds:D4aY" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type prof -title "ASAM7-Aqds:D4aY" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type prof -title "ASAM4-Aqds:D4aY" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type prof -title "ASAM8-Aqds:D4aY" + +#newpage 2 4 +# title Normalized SAM Asymmetries vs BPM4eX + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type prof -title "ASAM1-Aqds:D4eX" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type prof -title "ASAM5-Aqds:D4eX" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type prof -title "ASAM2-Aqds:D4eX" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type prof -title "ASAM6-Aqds:D4eX" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type prof -title "ASAM3-Aqds:D4eX" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type prof -title "ASAM7-Aqds:D4eX" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type prof -title "ASAM4-Aqds:D4eX" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type prof -title "ASAM8-Aqds:D4eX" + +#newpage 2 4 + # title Normalized SAM Asymmetries vs BPM4eY + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type prof -title "ASAM1-Aqds:D4eY" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type prof -title "ASAM5-Aqds:D4eY" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type prof -title "ASAM2-Aqds:D4eY" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type prof -title "ASAM6-Aqds:D4eY" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type prof -title "ASAM3-Aqds:D4eY" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type prof -title "ASAM7-Aqds:D4eY" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type prof -title "ASAM4-Aqds:D4eY" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type prof -title "ASAM8-Aqds:D4eY" + +#newpage 2 4 + # title Normalized SAM Asymmetries vs BPM12X + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type prof -title "ASAM1-Aqds:D12X" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type prof -title "ASAM5-Aqds:D12X" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type prof -title "ASAM2-Aqds:D12X" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type prof -title "ASAM6-Aqds:D12X" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type prof -title "ASAM3-Aqds:D12X" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type prof -title "ASAM7-Aqds:D12X" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type prof -title "ASAM4-Aqds:D12X" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type prof -title "ASAM8-Aqds:D12X" + +#newpage 2 4 + # title Normalized SAM Asymmetries vs BPM12Y + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type prof -title "ASAM1-Aqds:D12Y" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type prof -title "ASAM5-Aqds:D12Y" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type prof -title "ASAM2-Aqds:D12Y" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type prof -title "ASAM6-Aqds:D12Y" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type prof -title "ASAM3-Aqds:D12Y" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type prof -title "ASAM7-Aqds:D12Y" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type prof -title "ASAM4-Aqds:D12Y" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type prof -title "ASAM8-Aqds:D12Y" + + +#---- + + +newpage 8 6 + title Normalized SAM Asymmetries vs BPMs scatter + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type scat -title "ASAM1-Aqds:D4aX" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type scat -title "ASAM5-Aqds:D4aX" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type scat -title "ASAM2-Aqds:D4aX" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type scat -title "ASAM6-Aqds:D4aX" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type scat -title "ASAM3-Aqds:D4aX" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type scat -title "ASAM7-Aqds:D4aX" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type scat -title "ASAM4-Aqds:D4aX" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm4aX*1e3 myok_cut -type scat -title "ASAM8-Aqds:D4aX" + +#newpage 2 4 + # title Normalized SAM Asymmetries vs BPM4aY scatter + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type scat -title "ASAM1-Aqds:D4aY" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type scat -title "ASAM5-Aqds:D4aY" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type scat -title "ASAM2-Aqds:D4aY" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type scat -title "ASAM6-Aqds:D4aY" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type scat -title "ASAM3-Aqds:D4aY" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type scat -title "ASAM7-Aqds:D4aY" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type scat -title "ASAM4-Aqds:D4aY" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm4aY*1e3 myok_cut -type scat -title "ASAM8-Aqds:D4aY" + +#newpage 2 4 + # title Normalized SAM Asymmetries vs BPM4eX scatter + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type scat -title "ASAM1-Aqds:D4eX" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type scat -title "ASAM5-Aqds:D4eX" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type scat -title "ASAM2-Aqds:D4eX" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type scat -title "ASAM6-Aqds:D4eX" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type scat -title "ASAM3-Aqds:D4eX" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type scat -title "ASAM7-Aqds:D4eX" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type scat -title "ASAM4-Aqds:D4eX" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm4eX*1e3 myok_cut -type scat -title "ASAM8-Aqds:D4eX" + +#newpage 2 4 + # title Normalized SAM Asymmetries vs BPM4eY scatter + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type scat -title "ASAM1-Aqds:D4eY" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type scat -title "ASAM5-Aqds:D4eY" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type scat -title "ASAM2-Aqds:D4eY" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type scat -title "ASAM6-Aqds:D4eY" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type scat -title "ASAM3-Aqds:D4eY" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type scat -title "ASAM7-Aqds:D4eY" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type scat -title "ASAM4-Aqds:D4eY" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm4eY*1e3 myok_cut -type scat -title "ASAM8-Aqds:D4eY" + +#newpage 2 4 + # title Normalized SAM Asymmetries vs BPM12X scatter + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type scat -title "ASAM1-Aqds:D12X" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type scat -title "ASAM5-Aqds:D12X" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type scat -title "ASAM2-Aqds:D12X" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type scat -title "ASAM6-Aqds:D12X" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type scat -title "ASAM3-Aqds:D12X" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type scat -title "ASAM7-Aqds:D12X" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type scat -title "ASAM4-Aqds:D12X" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm12X*1e3 myok_cut -type scat -title "ASAM8-Aqds:D12X" +#newpage 2 4 + # title Normalized SAM Asymmetries vs BPM12Y scatter + asym_sam1*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type scat -title "ASAM1-Aqds:D12Y" + asym_sam5*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type scat -title "ASAM5-Aqds:D12Y" + asym_sam2*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type scat -title "ASAM2-Aqds:D12Y" + asym_sam6*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type scat -title "ASAM6-Aqds:D12Y" + asym_sam3*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type scat -title "ASAM3-Aqds:D12Y" + asym_sam7*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type scat -title "ASAM7-Aqds:D12Y" + asym_sam4*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type scat -title "ASAM4-Aqds:D12Y" + asym_sam8*1e6-asym_bcm_an_ds*1e6:diff_bpm12Y*1e3 myok_cut -type scat -title "ASAM8-Aqds:D12Y" + + +#newpage 1 2 + # title Normalized Flumi Asymmetries +# asym_n_flumi1 myok_cut -title "Flumi1" + # asym_n_flumi2 myok_cut -title "Flumi2" + +#newpage 1 2 + # title Normalized Flumi Asymmetry Stripcharts + # asym_n_flumi1:pattern_number myok_cut -type prof -title "Flumi1" + # asym_n_flumi2:pattern_number myok_cut -type prof -title "Flumi2" \ No newline at end of file diff --git a/panguin/macros/sams-bcm.cfg b/panguin/macros/sams-bcm.cfg new file mode 100644 index 000000000..f714a4d81 --- /dev/null +++ b/panguin/macros/sams-bcm.cfg @@ -0,0 +1,59 @@ +# Configuration file for the online GUI +# This file is for ADCs +# All lines containing "#" are treated as comments (ignored) +# Last line MUST be blank. +# Multiple spaces are treated as one space. +# To switch to log scale, add the option logy after the name of +# the histogram + +# Default root file to look at +#rootfile pan.root +rootfile /adaq1/work1/apar/japanOutput/prexALL_1098.root +##rootfile /adaq1/work1/apar/ciprian/parity18_4416_standard.root +##rootfile /dev/shm//QwMemMapFile.map + +# Prototype rootfilename.. overrides GetRootFileName.C +##protorootfile /adaql1/work1/parity/parity04_XXXXX_standard.root +#protorootfile /adaql1/work1/apar/ciprian/parity18_4416_standard.root + +# Defined cuts +definecut evcut (pattern_number>1) +definecut cuts (CodaEventNumber>10) +definecut bcmds_cut (-1*bcm_ds>1) + +# Uncomment the below line to monitor the fill of a ROOTfile. +#watchfile + +newpage 2 4 + title SAMs test + bcm_an_ds.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam2.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam3.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam4.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam5.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam6.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam7.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + sam8.hw_sum:CodaEventNumber cuts -tree evt -type l -title Volts vs Event + +newpage 2 4 + title SAMs PPM noise floor signal + yield_sam1 evcut -tree mul -title "yield_sam1" + yield_sam2 evcut -tree mul -title "yield_sam2" + yield_sam3 evcut -tree mul -title "yield_sam3" + yield_sam4 evcut -tree mul -title "yield_sam4" + yield_sam5 evcut -tree mul -title "yield_sam5" + yield_sam6 evcut -tree mul -title "yield_sam6" + yield_sam7 evcut -tree mul -title "yield_sam7" + yield_sam8 evcut -tree mul -title "yield_sam8 test" + +newpage 2 4 + title SAMs raw-adc_channels + sam1.hw_sum_raw/sam1.num_samples:CodaEventNumber cuts -tree evt -type l + sam2.hw_sum_raw/sam2.num_samples:CodaEventNumber cuts -tree evt -type l + sam3.hw_sum_raw/sam3.num_samples:CodaEventNumber cuts -tree evt -type l + sam4.hw_sum_raw/sam4.num_samples:CodaEventNumber cuts -tree evt -type l + sam5.hw_sum_raw/sam5.num_samples:CodaEventNumber cuts -tree evt -type l + sam6.hw_sum_raw/sam5.num_samples:CodaEventNumber cuts -tree evt -type l + sam7.hw_sum_raw/sam6.num_samples:CodaEventNumber cuts -tree evt -type l + sam8.hw_sum_raw/sam7.num_samples:CodaEventNumber cuts -tree evt -type l + diff --git a/panguin/macros/showIntegrated.C b/panguin/macros/showIntegrated.C new file mode 100644 index 000000000..807f56b5b --- /dev/null +++ b/panguin/macros/showIntegrated.C @@ -0,0 +1,20 @@ +////////////////////////////////////////////////////////////////////// +// +// showIntegrated.C +// Bryan Moffit - July 2005 +// +// helper routine for PANGUIN. Plots the integrated +// convergence of a given quantity +//edit by Caryn Palatchi 3/8/2019 for japan + +void showIntegrated(TString treename, TString given_quantity, + TCut given_cut, UInt_t nbins=20) { + + gROOT->LoadMacro("~/PREX/japan/macro/Integrated.C"); + TTree *T = (TTree*)gROOT->FindObject(treename); + TGraphErrors *gr = Integrated(T, given_quantity, given_cut, nbins); + gr->SetMarkerStyle(20); + gPad->SetGridy(1); + gr->Draw("AP"); + +} diff --git a/panguin/src/panguinOnlineConfig.cc b/panguin/src/panguinOnlineConfig.cc index 827fbe72d..ccf44d7fb 100644 --- a/panguin/src/panguinOnlineConfig.cc +++ b/panguin/src/panguinOnlineConfig.cc @@ -516,7 +516,7 @@ void OnlineConfig::OverrideRootFile(UInt_t runnumber) protorootfile.ReplaceAll("XXXXX",runnostr); rootfilename = protorootfile; } else { - string fnmRoot="/adaq1/work1/apar/japanOutput/"; + string fnmRoot="/adaq1/work1/apar/japanOutput"; if(getenv("QW_ROOTFILES")) fnmRoot = getenv("QW_ROOTFILES"); else @@ -526,7 +526,7 @@ void OnlineConfig::OverrideRootFile(UInt_t runnumber) const string daqConfigs[3] = {"CH","INJ","ALL"}; int found=0; for(int i=0;i<3;i++){ - rootfilename = Form("%sprex%s_%d.root",fnmRoot.c_str(),daqConfigs[i].c_str(),runnumber); + rootfilename = Form("%s/prex%s_%d.root",fnmRoot.c_str(),daqConfigs[i].c_str(),runnumber); if( access( rootfilename.Data(), F_OK ) != -1 ){ found++; break; From 71218f70baacd8a6b6f1de57b25d85014482998d Mon Sep 17 00:00:00 2001 From: Paul King Date: Wed, 20 Mar 2019 16:51:02 -0400 Subject: [PATCH 098/102] Minor change in the OnlineGUI::TreeDraw function to generate more unique temp histogram name. Use the draw command in addition to the requested title as the input to the MD5 which is used to generate the temporary histogram name. So then different histograms with the same title will have different names. --- panguin/src/panguinOnline.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/panguin/src/panguinOnline.cc b/panguin/src/panguinOnline.cc index ac3d7620d..b116a4d09 100644 --- a/panguin/src/panguinOnline.cc +++ b/panguin/src/panguinOnline.cc @@ -909,8 +909,18 @@ void OnlineGUI::TreeDraw(vector command) { BadDraw(var+" not found"); } else if (errcode!=0) { if(!command[3].IsNull()) { + // Generate a "unique" histogram name based on the MD5 of the drawn variable, cut, drawopt, + // and plot title. + // Makes it less likely to cause a name collision if two plot titles are the same. + // If you draw the exact same plot twice, the histograms will have the same name, but + // since they are exactly the same, you likely won't notice (or it will complain at you). + TString tmpstring(var); + tmpstring += cut.GetTitle(); + tmpstring += drawopt; + tmpstring += command[3]; + TString myMD5 = tmpstring.MD5(); TH1* thathist = (TH1*)hobj; - thathist->SetNameTitle(command[3].MD5(),command[3]); + thathist->SetNameTitle(myMD5,command[3]); } } else { BadDraw("Empty Histogram"); From 89dcd6d2bae7bca2f032e512c592f1c4104a77ab Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Wed, 20 Mar 2019 19:20:02 -0400 Subject: [PATCH 099/102] Adding a configuration file to treat a disk data file as if it were online for speed testing purposes Notable changes to increase speed: no compressing, no evt tree, and aggressive tree trim --- .../prminput/simulate_online_disk_file.conf | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Parity/prminput/simulate_online_disk_file.conf diff --git a/Parity/prminput/simulate_online_disk_file.conf b/Parity/prminput/simulate_online_disk_file.conf new file mode 100644 index 000000000..0826b3b35 --- /dev/null +++ b/Parity/prminput/simulate_online_disk_file.conf @@ -0,0 +1,27 @@ +#online = yes +#ET.hostname = adaq3.jlab.org +#ET.session = par2 +#ET.station = realtime + +# Set the interpreted run number to a very high value so we always +# pick up the most recent paramter files. +#online.RunNumber = 999999 + +# Update every N events (for TMapFiles and TFile) +mapfile-update-interval = 1000 +# circular-buffer = 864000 ## 240 Hz Mode: 864000 = 240 * 60 * 60 +circular-buffer = 108000 ## 30 Hz Mode: 108000 = 30 *60 *60 +# compression-level arg (=1) TFile compression level +compression-level = 0 + +disable-mps-tree = yes +enable-tree-trim = yes + +single-output-file = TRUE +disable-slow-tree = yes +disable-histos = yes +disable-burst-tree = yes +enable-burstsum = no +enable-differences = no +enable-alternateasym = no + From a2d32f4964aaca2dcc98fcdd40f5891c1b85d2c2 Mon Sep 17 00:00:00 2001 From: Cameron Clarke Date: Fri, 22 Mar 2019 14:51:40 -0400 Subject: [PATCH 100/102] Turn off circular buffer to allow for faster online analyzer running --- Parity/prminput/simulate_online_disk_file.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Parity/prminput/simulate_online_disk_file.conf b/Parity/prminput/simulate_online_disk_file.conf index 0826b3b35..6c5eb0fc0 100644 --- a/Parity/prminput/simulate_online_disk_file.conf +++ b/Parity/prminput/simulate_online_disk_file.conf @@ -10,7 +10,8 @@ # Update every N events (for TMapFiles and TFile) mapfile-update-interval = 1000 # circular-buffer = 864000 ## 240 Hz Mode: 864000 = 240 * 60 * 60 -circular-buffer = 108000 ## 30 Hz Mode: 108000 = 30 *60 *60 +# circular-buffer = 108000 ## 30 Hz Mode: 108000 = 30 *60 *60 +# circular-buffer = 0 # Default is 0, set it to 0 to save significant computation time not using the circular buffer # compression-level arg (=1) TFile compression level compression-level = 0 From 8fd3f18c87077319493075047b81aa22cf09bde8 Mon Sep 17 00:00:00 2001 From: Paul King Date: Sat, 23 Mar 2019 15:48:31 -0400 Subject: [PATCH 101/102] Modified the parameter files for "online" mode The online_apar and simulate_online_disk_file options are now restricted to enabling the tree trimming, disabling the root file compression, and having rapid root file updates. The standard analysis configuraiton files (prex.conf, etc.) have been modifed to remove the options related to tree-trimming and disabling various trees. --- Parity/prminput/online_apar.conf | 39 ++++--------------- Parity/prminput/prex.conf | 4 -- Parity/prminput/prexCH.conf | 4 -- Parity/prminput/prex_testing.conf | 4 -- Parity/prminput/prexinj.conf | 5 +-- .../prminput/simulate_online_disk_file.conf | 10 +---- 6 files changed, 9 insertions(+), 57 deletions(-) diff --git a/Parity/prminput/online_apar.conf b/Parity/prminput/online_apar.conf index ca56791e5..16f3d5714 100644 --- a/Parity/prminput/online_apar.conf +++ b/Parity/prminput/online_apar.conf @@ -7,38 +7,13 @@ ET.station = realtime # pick up the most recent paramter files. online.RunNumber = 999999 -## Update every N events (for TMapFiles and TFile) -mapfile-update-interval = 1000 -circular-buffer = 108000 ## 864000 = 240 * 60 * 60 | 108000 = 30 *60 *60 +# Update every N events (for TMapFiles and TFile) +mapfile-update-interval = 500 +# circular-buffer = 864000 ## 240 Hz Mode: 864000 = 240 * 60 * 60 +# circular-buffer = 108000 ## 30 Hz Mode: 108000 = 30 *60 *60 +# circular-buffer = 0 # Default is 0, set it to 0 to save significant computation time not using the circular buffer +# compression-level arg (=1) TFile compression level +compression-level = 0 - -### Options for TMapFile -### For now trying to setup disk resident files -##enable-mapfile = true - -chainfiles = no -single-output-file = TRUE -disable-slow-tree = yes -disable-histos = yes -disable-burst-tree = yes -enable-burstsum = no -enable-differences = no -enable-alternateasym = no enable-tree-trim = yes -ring.size = 1 -ring.stability_cut = 0 - -QwBlindDetectorArray.normalize = no -QwDetectorArray.normalize = yes - -write-promptsummary = no -blinder.force-target-out = true - -[QwLog] -color = no -loglevel-file = 0 -#loglevel-screen = 0 -print-function = no -print-signature = no - diff --git a/Parity/prminput/prex.conf b/Parity/prminput/prex.conf index 4b23f2630..267a14d3a 100644 --- a/Parity/prminput/prex.conf +++ b/Parity/prminput/prex.conf @@ -9,11 +9,7 @@ add-config = prexbankflag.conf detectors = prex_detectors.map -chainfiles = no single-output-file = yes -enable-tree-trim = no -disable-hel-tree = no -disable-histos = no rootfile-stem = prexALL_ codafile-stem = parity_ALL_ codafile-ext = dat diff --git a/Parity/prminput/prexCH.conf b/Parity/prminput/prexCH.conf index a858142f0..25695aea8 100644 --- a/Parity/prminput/prexCH.conf +++ b/Parity/prminput/prexCH.conf @@ -9,11 +9,7 @@ add-config = prexbankflag.conf detectors = prexCH_detectors.map -chainfiles = no single-output-file = yes -enable-tree-trim = no -disable-hel-tree = no -disable-histos = no rootfile-stem = prexCH_ codafile-stem = parity_CH_ codafile-ext = dat diff --git a/Parity/prminput/prex_testing.conf b/Parity/prminput/prex_testing.conf index 232813a30..66e44a356 100644 --- a/Parity/prminput/prex_testing.conf +++ b/Parity/prminput/prex_testing.conf @@ -9,11 +9,7 @@ add-config = prexbankflag.conf detectors = prex_detectors.map -chainfiles = no single-output-file = yes -enable-tree-trim = no -disable-hel-tree = no -disable-histos = no rootfile-stem = prexALL_ codafile-stem = parity_ALL_ codafile-ext = dat diff --git a/Parity/prminput/prexinj.conf b/Parity/prminput/prexinj.conf index f456bf909..1f195e753 100644 --- a/Parity/prminput/prexinj.conf +++ b/Parity/prminput/prexinj.conf @@ -9,11 +9,8 @@ add-config = prexbankflag.conf detectors = prexinj_detectors.map -chainfiles = no + single-output-file = yes -enable-tree-trim = no -disable-hel-tree = no -disable-histos = no rootfile-stem = prexinj_ codafile-stem = parity_INJ_ codafile-ext = dat diff --git a/Parity/prminput/simulate_online_disk_file.conf b/Parity/prminput/simulate_online_disk_file.conf index 6c5eb0fc0..b5dabc441 100644 --- a/Parity/prminput/simulate_online_disk_file.conf +++ b/Parity/prminput/simulate_online_disk_file.conf @@ -8,21 +8,13 @@ #online.RunNumber = 999999 # Update every N events (for TMapFiles and TFile) -mapfile-update-interval = 1000 +mapfile-update-interval = 500 # circular-buffer = 864000 ## 240 Hz Mode: 864000 = 240 * 60 * 60 # circular-buffer = 108000 ## 30 Hz Mode: 108000 = 30 *60 *60 # circular-buffer = 0 # Default is 0, set it to 0 to save significant computation time not using the circular buffer # compression-level arg (=1) TFile compression level compression-level = 0 -disable-mps-tree = yes enable-tree-trim = yes -single-output-file = TRUE -disable-slow-tree = yes -disable-histos = yes -disable-burst-tree = yes -enable-burstsum = no -enable-differences = no -enable-alternateasym = no From 00421969f9dd2bf8e04e7f9d1aca57247787075e Mon Sep 17 00:00:00 2001 From: Paul King Date: Sat, 23 Mar 2019 15:54:09 -0400 Subject: [PATCH 102/102] Added a panel with asymmetry plots to the panguin defaultOnline.cfg macro. --- panguin/macros/defaultOnline.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/panguin/macros/defaultOnline.cfg b/panguin/macros/defaultOnline.cfg index d6c354522..b7d4ac558 100644 --- a/panguin/macros/defaultOnline.cfg +++ b/panguin/macros/defaultOnline.cfg @@ -17,3 +17,8 @@ newpage 1 2 bcm_an_us:CodaEventNumber evcut -title "BCM1 vs Eventnumber" bcm_an_us evcut -title "BCM1 vs Eventnumber" +newpage 1 2 + title BCM asymmetries + asym_bcm_an_us:CodaEventNumber evcut -title "BCM1 asymmetry vs Eventnumber" + asym_bcm_an_us-asym_bcm_an_ds evcut -title "Double difference of BCM US and DS" +