diff --git a/.gitignore b/.gitignore index 0199f1856855509136b3bc6f6f44d8a14cef4253..dbc7bd0cd56f1358748a30a00894631cbdf91ce0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ *.swp *.sw* +# Analysis output +hel_scalers_*.json + # Directories RAID REPORT_OUTPUT diff --git a/DBASE/HMS/standard.kinematics b/DBASE/HMS/standard.kinematics index ea913fdfdbd6b49ba336c1bdd15e9955b8d9305e..bf2a3b79cc52feaff5b9d123ae93054a6bbd8114 100644 --- a/DBASE/HMS/standard.kinematics +++ b/DBASE/HMS/standard.kinematics @@ -18956,7 +18956,7 @@ ppcentral = 5.6 ppartmass = 0.000511 hpartmass = 0.000511 -4255 - 4255 +4255 - 4257 gpbeam = 10.388529315138483 gtargmass_amu = 12.0107 htheta_lab = -20.0 @@ -18966,3 +18966,43 @@ ppcentral = 5.6 ppartmass = 0.000511 hpartmass = 0.000511 +4258 - 4264 +gpbeam = 10.388529315138483 +gtargmass_amu = 12.0107 +htheta_lab = -13.5 +ptheta_lab = 18.0 +hpcentral = 4.2 +ppcentral = 5.6 +ppartmass = 0.000511 +hpartmass = 0.000511 + +4265 - 4314 +gpbeam = 2.17616528690839 +gtargmass_amu = 12.0107 +htheta_lab = -11.7 +ptheta_lab = 8.5 +hpcentral = 2.08234 +ppcentral = 2.1286 +ppartmass = 0.000511 +hpartmass = 0.000511 + +4215 - 4319 +gpbeam = 2.17616528690839 +gtargmass_amu = 12.0107 +htheta_lab = -17 +ptheta_lab = 8.5 +hpcentral = 2.08234 +ppcentral = 2.1286 +ppartmass = 0.000511 +hpartmass = 0.000511 + + +4320 - 4400 +gpbeam = 2.17616528690839 +gtargmass_amu = 12.0107 +htheta_lab = -17 +ptheta_lab = 13 +hpcentral = 2.08234 +ppcentral = 2.1286 +ppartmass = 0.000511 +hpartmass = 0.000511 \ No newline at end of file diff --git a/DBASE/SHMS/standard.kinematics b/DBASE/SHMS/standard.kinematics index a7aac913d8160c01c25546a54e8d49aac609ca71..2e540cd03cc666367567ed9d74bb1f4f2007b7d1 100644 --- a/DBASE/SHMS/standard.kinematics +++ b/DBASE/SHMS/standard.kinematics @@ -19458,7 +19458,7 @@ ppcentral = 5.6 ppartmass = 0.000511 hpartmass = 0.000511 -11462 - 11462 +11462 - 11463 gpbeam = 10.388561755973763 gtargmass_amu = 12.0107 htheta_lab = -20.0 @@ -19468,3 +19468,42 @@ ppcentral = 5.6 ppartmass = 0.000511 hpartmass = 0.000511 +11464 - 11470 +gpbeam = 10.388561755973763 +gtargmass_amu = 12.0107 +htheta_lab = -13.5 +ptheta_lab = 18.0 +hpcentral = 4.2 +ppcentral = 5.6 +ppartmass = 0.000511 +hpartmass = 0.000511 + +11471 - 11519 +gpbeam = 2.17899554950577 +gtargmass_amu = 12.0107 +htheta_lab = -11.7 +ptheta_lab = 8.5 +hpcentral = 2.08234 +ppcentral = 2.1286 +ppartmass = 0.000511 +hpartmass = 0.000511 + +11520 - 11521 +gpbeam = 2.17899554950577 +gtargmass_amu = 12.0107 +htheta_lab = -17 +ptheta_lab = 8.5 +hpcentral = 2.08234 +ppcentral = 2.1286 +ppartmass = 0.000511 +hpartmass = 0.000511 + +11522 - 11600 +gpbeam = 2.17899554950577 +gtargmass_amu = 12.0107 +htheta_lab = -17 +ptheta_lab = 13 +hpcentral = 2.08234 +ppcentral = 2.1286 +ppartmass = 0.000511 +hpartmass = 0.000511 \ No newline at end of file diff --git a/DEF-files/HMS/PRODUCTION/hstackana_production.def b/DEF-files/HMS/PRODUCTION/hstackana_production.def index 28e6653747d2cd99ba5957306558d6387d04f542..5b4088b034480ceb6a3fb8d5918cc09ae2d117ae 100644 --- a/DEF-files/HMS/PRODUCTION/hstackana_production.def +++ b/DEF-files/HMS/PRODUCTION/hstackana_production.def @@ -13,10 +13,10 @@ variable T.hms.hDCREF1_tdcTimeRaw variable T.hms.hT1_tdcMultiplicity variable T.hms.hT1_tdcTime variable T.hms.hT1_tdcTimeRaw - +block T.hms.* block T.helicity.* -## block H.cer.* +block H.cer.* variable H.cer.npeSum variable H.cer.npe variable H.cer.totNumAdcHits @@ -26,7 +26,7 @@ variable H.cer.totNumTracksMatched variable H.cer.xAtCer variable H.cer.yAtCer -# block H.dc.* +block H.dc.* variable H.dc.ntrack variable H.dc.x_fp variable H.dc.xp_fp @@ -36,7 +36,7 @@ variable H.dc.yp_fp ## block H.tr.* variable H.tr.n -## block H.hod.* + block H.hod.* variable H.hod.1x.DiffDisTrack variable H.hod.1x.TrackXPos variable H.hod.1x.TrackYPos @@ -73,7 +73,7 @@ variable H.hod.1y.posAdcCounter variable H.hod.2y.negAdcCounter variable H.hod.2y.posAdcCounter -## block H.cal.* + block H.cal.* variable H.cal.1pr.eplane variable H.cal.1pr.eplane_neg variable H.cal.1pr.eplane_pos diff --git a/DEF-files/SHMS/PRODUCTION/pstackana_production.def b/DEF-files/SHMS/PRODUCTION/pstackana_production.def index f9ae9bfe2a1478dea45d230f7404b4e031c64078..33cd5bee8294edeee603476d8330177df597e6f2 100644 --- a/DEF-files/SHMS/PRODUCTION/pstackana_production.def +++ b/DEF-files/SHMS/PRODUCTION/pstackana_production.def @@ -14,10 +14,10 @@ variable T.shms.pDCREF1_tdcTimeRaw variable T.shms.pT2_tdcMultiplicity variable T.shms.pT2_tdcTime variable T.shms.pT2_tdcTimeRaw - +block T.shms.* block T.helicity.* -## block P.ngcer.* +block P.ngcer.* variable P.ngcer.npeSum variable P.ngcer.npe variable P.ngcer.totNumAdcHits @@ -27,7 +27,7 @@ variable P.ngcer.totNumTracksMatched variable P.ngcer.xAtCer variable P.ngcer.yAtCer -## block P.dc.* +block P.dc.* variable P.dc.ntrack variable P.dc.x_fp variable P.dc.xp_fp @@ -37,7 +37,7 @@ variable P.dc.yp_fp ## block P.tr.* variable P.tr.n -## block P.hod.* +block P.hod.* variable P.hod.1x.DiffDisTrack variable P.hod.1x.TrackXPos variable P.hod.1x.TrackYPos @@ -106,6 +106,7 @@ variable P.cal.pr.eplane_neg variable P.cal.pr.eplane_pos variable P.cal.pr.totnumAdcHits variable P.cal.pr.totnumGoodAdcHits +block P.cal.* ## SHMS golden track block P.gtr.* diff --git a/PARAM/GEN/gscalers.param b/PARAM/GEN/gscalers.param index 928a107941fe2d57482fbdc484692f833f69bae3..393c6586ab181cfb0d2a2fccb58333652e6fd282 100644 --- a/PARAM/GEN/gscalers.param +++ b/PARAM/GEN/gscalers.param @@ -1,12 +1,27 @@ gNumBCMs=6 +; Melanie's fit from Dec. 2019 SHMS run 9728 (Unser left from summer 2019) +gBCM_Gain = 5762, 5651, 4011.2, 9418, 2120, 1809 +gBCM_Offset = 253100, 250600, 277000, 1720, 706.2, 473.4 + +; Melanie's fit from Feb. 2020 SHMS run 10402 (Unser left from summer 2019) +;gBCM_Gain = 5785, 5657, 4011.2, 9471, 2117, 1821 +;gBCM_Offset = 252600, 250200, 277000, 1084, 733.7, 301 + +; Dave Mack's fit from Feb. 2020 SHMS run 10402 (Unser left from summer 2019) +;gBCM_Gain = 5791, 5663, 4011.2, 9496, 2126, 1826 +;gBCM_Offset = 252200, 249700, 277000, -259.4, 296.5, 33.72 + +; Dave Mack's fit from Dec. 2019 SHMS run 9728 (Unser left from summer 2019) +;gBCM_Gain = 5761, 5649, 4011.2, 9445, 2129, 1815 +;gBCM_Offset = 253000, 250600, 277000, 927.1, 446.7, 294.6 + ; summer 2019 fit -gBCM_Gain = 5757.6, 5590., 4011.2, 9364, 2125., 5180. -gBCM_Offset = 253389, 250888, 277000, 1521, 764, 1569. +;gBCM_Gain = 5757.6, 5590., 4011.2, 9364, 2125., 5180. +;gBCM_Offset = 253389, 250888, 277000, 1521, 764, 1569. -; ;gBCM_Gain = 5713, 5528, 5020, 9279, 2102., 6343. ;gBCM_Offset = 253400, 250900, 325000, 762.6, 317.9, 852.4 gBCM_Names = "BCM1 BCM2 Unser BCM4A BCM4B BCM4C" -gBCM_Current_threshold = 1.0 +gBCM_Current_threshold = 5.0 ; index = 0 to gNumBCMs-1 gBCM_Current_threshold_index = 3 diff --git a/PARAM/HMS/CAL/pcal.param.hms_2.9GeV_0_-1 b/PARAM/HMS/CAL/pcal.param.hms_2.9GeV_0_-1 new file mode 100644 index 0000000000000000000000000000000000000000..49c2daa53afff201a1f7eb33934b8c1b38ef9b64 --- /dev/null +++ b/PARAM/HMS/CAL/pcal.param.hms_2.9GeV_0_-1 @@ -0,0 +1,12 @@ +; Calibration constants for file hms_DIS_mid_full.root, 64367 events processed + +;fDeltaMin fDeltaMax fBetaMin fBetaMax fLoThr fHiThr +;-10 10 0.5 1.5 0.935711 1.10459 +hcal_pos_gain_cor= 12.05, 6.02, 8.63, 9.75, 10.68, 12.25, 11.56, 12.25, 10.44, 15.35, 14.43, 12.60, -4.22, + 10.32, 13.41, 8.66, 13.46, 8.32, 5.76, 8.23, 7.65, 8.47, 12.21, 11.99, 13.10, 11.91, + 23.97, 14.29, 18.20, 22.42, 16.85, 19.01, 23.47, 20.35, 22.47, 26.23, 18.69, 22.37, 19.69, + 30.27, 15.46, 18.99, 17.44, 17.15, 17.62, 20.90, 16.55, 18.79, 19.59, 16.89, 18.11, 21.71, +hcal_neg_gain_cor= 16.21, 15.65, 14.91, 11.06, 10.75, 13.15, 14.14, 17.66, 11.94, 10.85, 10.45, 11.35, 28.86, + 14.10, 11.79, 14.17, 13.50, 15.69, 17.06, 17.56, 16.37, 17.72, 10.95, 14.56, 12.47, 14.47, + 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, diff --git a/PARAM/HMS/CAL/pcal.param.hms_3.5GeV_0_-1 b/PARAM/HMS/CAL/pcal.param.hms_3.5GeV_0_-1 new file mode 100644 index 0000000000000000000000000000000000000000..9b6fa47a0d88915bea0905ddbdc2bb2366495b80 --- /dev/null +++ b/PARAM/HMS/CAL/pcal.param.hms_3.5GeV_0_-1 @@ -0,0 +1,12 @@ +; Calibration constants for file hms_DIS_high_full_updated.root, 58044 events processed + +;fDeltaMin fDeltaMax fBetaMin fBetaMax fLoThr fHiThr +;-10 10 0.5 1.5 0.946311 1.09607 +hcal_pos_gain_cor= 11.00, 5.94, 8.98, 10.26, 10.85, 11.99, 12.22, 12.22, 10.40, 15.73, 15.65, 12.56, 0.00, + 11.04, 12.58, 8.55, 13.89, 7.99, 5.97, 7.98, 8.26, 8.88, 10.74, 12.14, 12.25, 55.73, + 23.67, 14.18, 18.27, 22.31, 16.78, 18.60, 23.27, 20.40, 22.26, 26.54, 18.72, 21.76, 20.19, + 30.06, 15.87, 19.56, 18.23, 17.66, 19.46, 21.25, 17.13, 20.00, 20.27, 18.16, 20.79, 0.00, +hcal_neg_gain_cor= 17.50, 15.99, 14.49, 10.53, 10.71, 13.19, 13.20, 17.34, 11.89, 10.06, 9.66, 11.79, 0.00, + 12.93, 12.57, 14.05, 12.99, 16.20, 16.64, 18.16, 15.56, 16.95, 12.35, 13.74, 12.97,-15.93, + 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, diff --git a/PARAM/HMS/CER/hcer_calib.param b/PARAM/HMS/CER/hcer_calib.param index d6c650b2fda17c1b3ba63d8baa7876788ff4181f..7a4bf3c87e57307aca71842caa1335b1d639c78c 100644 --- a/PARAM/HMS/CER/hcer_calib.param +++ b/PARAM/HMS/CER/hcer_calib.param @@ -4,4 +4,7 @@ ;HMS CER calibration constants from runs 2489, 2493 and 2494 ;hcer_adc_to_npe = 1./6.318, 1./7.921 ;from cosmics 2504 -hcer_adc_to_npe = 1./8.409, 1./7.735 +;hcer_adc_to_npe = 1./8.409, 1./7.735 + +;from cosmics 3732 +hcer_adc_to_npe = 1./7.664, 1./7.904 \ No newline at end of file diff --git a/PARAM/HMS/CER/hcer_cuts.param b/PARAM/HMS/CER/hcer_cuts.param index cf482db541a1bcb372084fb92c440f4b3938b0e7..6a9274f073a2eacb204feead478ec419e357827d 100644 --- a/PARAM/HMS/CER/hcer_cuts.param +++ b/PARAM/HMS/CER/hcer_cuts.param @@ -22,7 +22,12 @@ hcer_npe_thresh = 0.5 ; ADC time window cut values used to select "good" ADC events hcer_adc_tdc_offset= 0. -; fall 2019 startup +; fall 2019 -spring 2020 analysis A1n, d2n ; cut variable is H.cer.goodAdcTdcDiffTime hcer_adcTimeWindowMin = 60., 60. hcer_adcTimeWindowMax = 200., 200. + +; No cuts +; cut variable is H.cer.goodAdcTdcDiffTime +;hcer_adcTimeWindowMin = -1000., -1000. +;hcer_adcTimeWindowMax = 1000., 1000. \ No newline at end of file diff --git a/PARAM/HMS/GEN/h_reftime_cut.param b/PARAM/HMS/GEN/h_reftime_cut.param index 3385e77dd74dcb0f89201b290e74a814ac2e18d0..32c229c7e5760dc81fe3c2bf5d47ff03a48730fc 100644 --- a/PARAM/HMS/GEN/h_reftime_cut.param +++ b/PARAM/HMS/GEN/h_reftime_cut.param @@ -15,12 +15,12 @@ ; hcer_adcrefcut=-100000. ; hcal_adcrefcut=-100000. -; determined for fall 2019 startup +; determined from fall 2019 - spring 2020 offline analysis ; cut variable = hDCREF2 hdc_tdcrefcut=-20000. ; cut variable = hT2 -hhodo_tdcrefcut=-1200. +hhodo_tdcrefcut=-1400. ; cut variable = hFADC_TREF_ROC1 -hhodo_adcrefcut=-3000. -hcer_adcrefcut=-3000. -hcal_adcrefcut=-3000. +hhodo_adcrefcut=-3400. +hcer_adcrefcut=-3400. +hcal_adcrefcut=-3400. diff --git a/PARAM/SHMS/CAL/pcal.param.shms_2.129GeV_0_-1 b/PARAM/SHMS/CAL/pcal.param.shms_2.129GeV_0_-1 new file mode 100644 index 0000000000000000000000000000000000000000..cc92f2999bf4e6ba1f0e6e7726316102983765bf --- /dev/null +++ b/PARAM/SHMS/CAL/pcal.param.shms_2.129GeV_0_-1 @@ -0,0 +1,18 @@ +; Calibration constants for file shms_elastic_5, 11980300 events processed + +pcal_neg_gain_cor = 27.69, 23.90, 28.26, 16.94, 23.09, 15.37, 22.94, 30.86, 33.77, 47.85, 25.30, 0.00, 0.00, 0.00, +pcal_pos_gain_cor = 0.00, 32.04, 23.75, 22.91, 26.97, 28.13, 22.66, 25.71, 30.87, 24.00, 12.79, 0.00, 0.00, 0.00, +pcal_arr_gain_cor = 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 0.00, 30.46, 36.38, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 26.98, 37.27, 28.76, 30.63, 38.32, 30.55, 34.62, 29.44, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 27.34, 36.57, 24.76, 25.68, 33.00, 27.10, 30.11, 24.35, 31.88, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 26.92, 31.26, 28.40, 28.86, 28.50, 24.45, 28.92, 27.50, 19.56, 27.66, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 9.98, 27.80, 28.54, 29.70, 30.74, 22.11, 24.93, 28.86, 25.55, 32.28, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 36.05, 26.76, 27.84, 27.75, 31.89, 26.16, 36.12, 39.47, 36.49, 32.78, 0.00, 0.00, 0.00, 0.00, 0.00, + 36.63, 29.92, 27.16, 25.90, 25.41, 27.08, 29.02, 33.48, 41.16, 43.74, 50.81, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 31.13, 26.30, 27.23, 29.18, 28.56, 27.67, 30.28, 29.49, 32.06, 26.44, 0.00, 0.00, 0.00, 0.00, 0.00, + 58.67, 23.78, 27.15, 29.02, 27.33, 26.80, 27.60, 30.27, 27.54, 25.51, 39.65, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 23.70, 26.62, 25.19, 25.62, 29.68, 26.96, 24.57, 31.57, 14.60, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 22.22, 22.91, 26.38, 23.23, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, diff --git a/PARAM/SHMS/CAL/pcal.param.shms_2.6GeV_0_-1 b/PARAM/SHMS/CAL/pcal.param.shms_2.6GeV_0_-1 new file mode 100644 index 0000000000000000000000000000000000000000..40a6d365c9792d3568308a2d12b7f8f63c9fd0de --- /dev/null +++ b/PARAM/SHMS/CAL/pcal.param.shms_2.6GeV_0_-1 @@ -0,0 +1,18 @@ +; Calibration constants for file shms_DIS_mid_10, 242183 events processed + +pcal_neg_gain_cor = 26.79, 24.50, 27.81, 16.96, 21.73, 15.37, 22.51, 30.95, 30.99, 43.39, 20.70, 22.64, 21.93, 46.43, +pcal_pos_gain_cor = 33.46, 33.01, 23.55, 23.76, 27.73, 27.98, 23.80, 27.04, 30.22, 18.71, 26.89, 29.12, 23.53, 0.00, +pcal_arr_gain_cor = 0.00, 0.00, 0.00, 6.11, 25.51, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 29.84, 35.01, 28.05, 35.60, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 13.72, 27.06, 36.43, 28.19, 29.57, 27.41, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 13.86, 27.05, 36.48, 24.34, 25.79, 33.21, 26.14, 39.29, 3.93, 26.62, 24.15, 23.89, 36.15, 40.51, 0.00, + 0.00, 22.63, 31.51, 28.13, 28.64, 29.16, 25.27, 29.17, 26.61, 25.04, 26.74, 30.74, 30.73, 38.11, 40.01, 0.00, + 0.00, 15.21, 26.91, 28.14, 29.05, 30.98, 23.94, 25.27, 28.93, 26.17, 31.61, 32.06, 35.37, 26.18, 32.87, 0.00, + 13.43, 22.63, 26.63, 27.23, 26.90, 32.10, 27.66, 36.28, 39.79, 37.24, 33.64, 33.61, 27.58, 28.64, 28.80, 0.00, + 14.85, 29.37, 27.12, 26.73, 25.45, 27.86, 30.91, 34.21, 42.12, 45.95, 52.08, 30.07, 33.19, 32.37, 37.88, 0.00, + 21.36, 28.86, 26.18, 27.01, 28.30, 28.03, 28.56, 30.54, 29.46, 32.98, 26.63, 31.04, 32.47, 32.05, 36.31, 0.00, + 21.17, 24.43, 27.29, 28.26, 26.15, 26.41, 26.78, 30.11, 27.98, 31.76, 30.74, 31.98, 31.73, 31.59, 29.54, 0.00, + 22.82, 22.96, 26.02, 24.24, 25.38, 29.94, 28.35, 24.06, 26.65, 29.32, 28.92, 30.79, 28.81, 32.78, 35.62, 0.00, + 24.63, 23.13, 22.97, 25.88, 28.07, 28.65, 26.18, 8.50, 14.98, 18.48, 24.59, 28.41, 28.26, 33.01, 24.12, 0.00, + 0.00, 26.73, 26.25, 31.34, 60.88, 18.73, 0.00, 0.00, 0.00, -1.17, 22.09, 41.75, 35.02, 13.61, 0.00, 0.00, + 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, diff --git a/PARAM/SHMS/CAL/pcal.param.shms_3.4GeV_0_-1 b/PARAM/SHMS/CAL/pcal.param.shms_3.4GeV_0_-1 new file mode 100644 index 0000000000000000000000000000000000000000..7ba688ebb76a47af802d4409368f313fa814881e --- /dev/null +++ b/PARAM/SHMS/CAL/pcal.param.shms_3.4GeV_0_-1 @@ -0,0 +1,18 @@ +; Calibration constants for file shms_DIS_high_10, 91047 events processed + +pcal_neg_gain_cor = 25.66, 24.27, 27.87, 16.98, 21.92, 15.97, 22.79, 31.34, 30.88, 43.37, 20.65, 22.51, 22.96, 0.00, +pcal_pos_gain_cor = 51.53, 28.55, 23.71, 24.14, 28.29, 28.53, 24.10, 27.66, 31.15, 18.81, 28.82, 40.83, 59.13, 0.00, +pcal_arr_gain_cor = 0.00, 0.00, 0.00, 11.30, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 29.17, 33.41, 27.41, 32.04, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 21.37, 27.11, 35.67, 27.87, 29.89, 26.14, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, + 0.00, 14.25, 26.41, 35.91, 24.09, 25.66, 32.79, 26.40, 0.00, 0.00, 21.26, 25.01, 0.00, 0.00, 0.00, 0.00, + 0.00, 26.32, 30.83, 27.51, 28.37, 28.84, 25.10, 28.95, 27.24, 24.13, 27.21, 31.13, 29.46, 0.00, 0.00, 0.00, + 0.00, 20.37, 26.50, 27.70, 28.60, 30.53, 23.81, 25.17, 28.76, 25.43, 31.16, 30.35, 33.53, 9.16, 0.00, 0.00, + 3.33, 21.62, 26.42, 26.55, 26.37, 31.71, 27.33, 35.83, 38.92, 36.04, 32.80, 32.98, 24.10, 17.44, 0.00, 0.00, + 13.78, 29.13, 26.60, 26.39, 25.19, 27.48, 30.33, 33.54, 41.20, 45.01, 50.77, 29.51, 32.82, 32.21, 0.00, 0.00, + 28.96, 28.50, 26.02, 26.48, 28.09, 27.66, 28.13, 30.09, 28.95, 32.44, 25.99, 30.67, 32.09, 31.97, 37.08, 0.00, + 28.19, 24.09, 26.98, 27.88, 25.81, 26.19, 26.43, 29.77, 27.45, 31.30, 30.52, 31.62, 31.44, 31.27, 28.12, 0.00, + 20.84, 22.88, 25.98, 23.85, 25.24, 29.94, 28.03, 24.15, 26.24, 28.99, 28.78, 30.60, 28.55, 32.21, 35.04, 0.00, + 32.81, 23.21, 22.68, 25.57, 27.89, 28.58, 26.16, 10.68, 17.48, 17.66, 24.81, 28.08, 27.71, 33.26, 0.00, 0.00, + 0.00, 28.09, 26.37, 31.59, 57.30, 25.47, 0.00, 0.00, 0.00, 0.00, 1.16, -3.63, 0.00, 0.00, 0.00, 0.00, + 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, diff --git a/PARAM/SHMS/DC/pdc_calib.param b/PARAM/SHMS/DC/pdc_calib.param index ed202159c100a9bffe5dbcc02efeb65bf753cfb1..ddb0036e65a2250584c1e5665717b5f46c557c4f 100644 --- a/PARAM/SHMS/DC/pdc_calib.param +++ b/PARAM/SHMS/DC/pdc_calib.param @@ -1,127 +1,127 @@ -; Lookup Table: RUN 7221 +; Lookup Table: RUN 9644 ; number of bins in time to distance lookup table pdriftbins = 190 ; number of 1st bin in table in ns pdrift1stbin=1.000000 ; bin size in ns pdriftbinsz=1 -pwc1u1fract=0.00093,0.00251,0.00523,0.00880,0.01355,0.01935,0.02619,0.03429,0.04279,0.05149,0.06113,0.07088,0.08086,0.09144,0.10242,0.11347,0.12466,0.13594,0.14748 -0.15894,0.17091,0.18295,0.19508,0.20657,0.21822,0.23048,0.24241,0.25456,0.26687,0.27867,0.29046,0.30218,0.31421,0.32616,0.33804,0.34971,0.36174,0.37340,0.38517 -0.39694,0.40890,0.42028,0.43219,0.44339,0.45445,0.46541,0.47659,0.48785,0.49917,0.51016,0.52172,0.53288,0.54374,0.55478,0.56590,0.57686,0.58797,0.59892,0.60982 -0.62045,0.63114,0.64174,0.65250,0.66266,0.67288,0.68322,0.69342,0.70382,0.71372,0.72341,0.73343,0.74329,0.75283,0.76289,0.77265,0.78226,0.79161,0.80087,0.80990 -0.81931,0.82824,0.83748,0.84653,0.85550,0.86402,0.87246,0.88106,0.88924,0.89709,0.90517,0.91272,0.92015,0.92704,0.93376,0.93974,0.94544,0.95067,0.95555,0.95964 -0.96352,0.96708,0.97022,0.97295,0.97554,0.97779,0.97958,0.98126,0.98283,0.98423,0.98551,0.98665,0.98768,0.98861,0.98943,0.99021,0.99086,0.99153,0.99205,0.99268 -0.99309,0.99353,0.99392,0.99421,0.99455,0.99489,0.99512,0.99534,0.99553,0.99581,0.99596,0.99616,0.99632,0.99651,0.99669,0.99683,0.99691,0.99699,0.99710,0.99719 -0.99728,0.99740,0.99747,0.99758,0.99765,0.99772,0.99778,0.99781,0.99788,0.99794,0.99802,0.99808,0.99814,0.99821,0.99827,0.99834,0.99839,0.99847,0.99852,0.99858 -0.99866,0.99872,0.99878,0.99886,0.99892,0.99896,0.99900,0.99906,0.99912,0.99916,0.99922,0.99928,0.99935,0.99941,0.99946,0.99949,0.99952,0.99957,0.99960,0.99965 -0.99969,0.99972,0.99975,0.99980,0.99985,0.99989,0.99991,0.99995,0.99997,0.99999,1.00000 -pwc1u2fract=0.00100,0.00272,0.00547,0.00945,0.01447,0.02087,0.02792,0.03613,0.04500,0.05439,0.06444,0.07440,0.08520,0.09618,0.10718,0.11863,0.13003,0.14158,0.15343 -0.16500,0.17686,0.18862,0.20081,0.21223,0.22484,0.23719,0.24966,0.26144,0.27301,0.28504,0.29690,0.30831,0.31976,0.33146,0.34368,0.35498,0.36654,0.37835,0.39038 -0.40192,0.41349,0.42456,0.43632,0.44760,0.45875,0.47044,0.48212,0.49278,0.50401,0.51474,0.52607,0.53710,0.54782,0.55867,0.56961,0.58033,0.59112,0.60179,0.61251 -0.62311,0.63376,0.64422,0.65488,0.66537,0.67564,0.68575,0.69599,0.70609,0.71600,0.72548,0.73537,0.74569,0.75561,0.76567,0.77514,0.78492,0.79414,0.80328,0.81223 -0.82163,0.83089,0.83966,0.84853,0.85759,0.86619,0.87461,0.88281,0.89100,0.89918,0.90675,0.91436,0.92153,0.92815,0.93457,0.94082,0.94667,0.95181,0.95638,0.96048 -0.96451,0.96787,0.97093,0.97367,0.97607,0.97813,0.97991,0.98172,0.98335,0.98471,0.98599,0.98698,0.98794,0.98891,0.98962,0.99041,0.99112,0.99174,0.99230,0.99282 -0.99332,0.99374,0.99409,0.99445,0.99480,0.99507,0.99536,0.99562,0.99588,0.99605,0.99622,0.99643,0.99653,0.99667,0.99681,0.99698,0.99717,0.99725,0.99736,0.99742 -0.99753,0.99758,0.99764,0.99771,0.99782,0.99790,0.99796,0.99803,0.99809,0.99820,0.99825,0.99830,0.99837,0.99842,0.99847,0.99853,0.99860,0.99865,0.99871,0.99875 -0.99882,0.99888,0.99891,0.99895,0.99902,0.99904,0.99909,0.99911,0.99918,0.99923,0.99930,0.99935,0.99940,0.99942,0.99946,0.99953,0.99958,0.99963,0.99969,0.99972 -0.99975,0.99979,0.99983,0.99985,0.99988,0.99990,0.99993,0.99994,0.99996,0.99997,1.00000 -pwc1x1fract=0.00101,0.00267,0.00539,0.00931,0.01449,0.02084,0.02812,0.03656,0.04544,0.05496,0.06447,0.07469,0.08522,0.09637,0.10766,0.11911,0.13035,0.14210,0.15384 -0.16563,0.17745,0.18918,0.20121,0.21339,0.22544,0.23762,0.24969,0.26158,0.27350,0.28528,0.29719,0.30941,0.32120,0.33296,0.34481,0.35651,0.36798,0.37924,0.39073 -0.40254,0.41388,0.42510,0.43653,0.44766,0.45918,0.47058,0.48149,0.49315,0.50428,0.51561,0.52707,0.53793,0.54874,0.55928,0.57033,0.58129,0.59203,0.60278,0.61351 -0.62429,0.63456,0.64536,0.65606,0.66664,0.67700,0.68721,0.69742,0.70806,0.71795,0.72802,0.73786,0.74749,0.75722,0.76714,0.77681,0.78708,0.79686,0.80645,0.81593 -0.82520,0.83452,0.84380,0.85291,0.86167,0.87048,0.87896,0.88753,0.89563,0.90341,0.91092,0.91793,0.92481,0.93168,0.93804,0.94437,0.94991,0.95490,0.95945,0.96340 -0.96714,0.97054,0.97366,0.97629,0.97846,0.98047,0.98226,0.98379,0.98507,0.98626,0.98729,0.98829,0.98913,0.98992,0.99058,0.99123,0.99172,0.99220,0.99258,0.99298 -0.99335,0.99373,0.99399,0.99430,0.99449,0.99472,0.99492,0.99511,0.99532,0.99552,0.99567,0.99583,0.99600,0.99614,0.99626,0.99633,0.99645,0.99655,0.99667,0.99679 -0.99690,0.99700,0.99711,0.99720,0.99732,0.99744,0.99754,0.99764,0.99776,0.99783,0.99791,0.99794,0.99803,0.99811,0.99818,0.99826,0.99831,0.99839,0.99844,0.99852 -0.99860,0.99866,0.99872,0.99877,0.99882,0.99885,0.99890,0.99898,0.99903,0.99909,0.99917,0.99920,0.99927,0.99932,0.99940,0.99946,0.99950,0.99954,0.99960,0.99964 -0.99968,0.99971,0.99976,0.99979,0.99985,0.99988,0.99991,0.99993,0.99995,0.99997,1.00000 -pwc1x2fract=0.00103,0.00299,0.00611,0.01038,0.01609,0.02319,0.03143,0.04020,0.04991,0.05980,0.07064,0.08171,0.09303,0.10461,0.11566,0.12739,0.13871,0.15081,0.16265 -0.17424,0.18653,0.19870,0.21040,0.22231,0.23408,0.24596,0.25794,0.26965,0.28159,0.29326,0.30467,0.31627,0.32846,0.33979,0.35116,0.36247,0.37424,0.38560,0.39702 -0.40810,0.41934,0.43046,0.44169,0.45335,0.46432,0.47539,0.48657,0.49760,0.50906,0.51996,0.53087,0.54167,0.55263,0.56358,0.57467,0.58511,0.59594,0.60652,0.61707 -0.62769,0.63822,0.64893,0.65897,0.66925,0.67939,0.68927,0.69946,0.70986,0.71969,0.72983,0.73964,0.74999,0.75956,0.76944,0.77857,0.78801,0.79740,0.80698,0.81640 -0.82547,0.83415,0.84301,0.85169,0.86091,0.86966,0.87841,0.88699,0.89530,0.90325,0.91102,0.91838,0.92581,0.93251,0.93922,0.94532,0.95085,0.95596,0.96068,0.96510 -0.96878,0.97207,0.97510,0.97772,0.97997,0.98175,0.98349,0.98485,0.98619,0.98726,0.98819,0.98919,0.98997,0.99074,0.99141,0.99201,0.99244,0.99286,0.99319,0.99360 -0.99393,0.99420,0.99442,0.99470,0.99493,0.99513,0.99532,0.99546,0.99568,0.99584,0.99600,0.99614,0.99630,0.99640,0.99656,0.99670,0.99682,0.99692,0.99700,0.99711 -0.99719,0.99730,0.99736,0.99744,0.99753,0.99761,0.99769,0.99775,0.99781,0.99786,0.99795,0.99804,0.99811,0.99818,0.99823,0.99827,0.99835,0.99840,0.99846,0.99851 -0.99857,0.99862,0.99870,0.99876,0.99882,0.99887,0.99892,0.99896,0.99901,0.99907,0.99916,0.99919,0.99927,0.99930,0.99938,0.99943,0.99949,0.99955,0.99959,0.99963 -0.99970,0.99973,0.99979,0.99982,0.99986,0.99988,0.99990,0.99993,0.99995,0.99997,1.00000 -pwc1v1fract=0.00072,0.00194,0.00409,0.00714,0.01145,0.01699,0.02331,0.03080,0.03888,0.04749,0.05654,0.06646,0.07671,0.08717,0.09783,0.10899,0.12058,0.13206,0.14362 -0.15492,0.16675,0.17874,0.19069,0.20318,0.21522,0.22755,0.23967,0.25184,0.26409,0.27654,0.28852,0.30028,0.31237,0.32431,0.33617,0.34786,0.36012,0.37160,0.38314 -0.39474,0.40655,0.41793,0.42925,0.44065,0.45184,0.46289,0.47399,0.48521,0.49619,0.50752,0.51888,0.52984,0.54092,0.55219,0.56300,0.57378,0.58428,0.59500,0.60547 -0.61632,0.62722,0.63798,0.64873,0.65892,0.66916,0.67930,0.68944,0.69982,0.70986,0.71986,0.73014,0.74025,0.75037,0.76032,0.77017,0.77962,0.78892,0.79836,0.80753 -0.81723,0.82652,0.83567,0.84444,0.85323,0.86186,0.87028,0.87877,0.88723,0.89536,0.90333,0.91072,0.91824,0.92550,0.93211,0.93826,0.94422,0.94948,0.95439,0.95869 -0.96267,0.96612,0.96918,0.97212,0.97476,0.97717,0.97920,0.98096,0.98252,0.98400,0.98524,0.98640,0.98752,0.98844,0.98927,0.99004,0.99074,0.99141,0.99191,0.99243 -0.99287,0.99331,0.99376,0.99421,0.99449,0.99478,0.99511,0.99534,0.99561,0.99579,0.99596,0.99619,0.99636,0.99653,0.99667,0.99679,0.99690,0.99702,0.99713,0.99721 -0.99730,0.99739,0.99747,0.99757,0.99767,0.99776,0.99783,0.99790,0.99800,0.99811,0.99815,0.99823,0.99828,0.99832,0.99836,0.99844,0.99850,0.99856,0.99862,0.99866 -0.99873,0.99880,0.99887,0.99890,0.99895,0.99900,0.99907,0.99912,0.99916,0.99920,0.99926,0.99931,0.99936,0.99938,0.99945,0.99952,0.99955,0.99959,0.99964,0.99968 -0.99971,0.99975,0.99977,0.99980,0.99984,0.99986,0.99989,0.99991,0.99994,0.99999,1.00000 -pwc1v2fract=0.00088,0.00254,0.00533,0.00927,0.01434,0.02077,0.02815,0.03646,0.04568,0.05500,0.06477,0.07513,0.08559,0.09643,0.10761,0.11919,0.13064,0.14230,0.15390 -0.16615,0.17851,0.19079,0.20278,0.21512,0.22748,0.23945,0.25134,0.26339,0.27524,0.28672,0.29863,0.31050,0.32248,0.33442,0.34609,0.35768,0.36948,0.38109,0.39259 -0.40440,0.41587,0.42706,0.43841,0.44977,0.46099,0.47206,0.48327,0.49460,0.50573,0.51683,0.52794,0.53877,0.54985,0.56045,0.57147,0.58229,0.59246,0.60322,0.61384 -0.62429,0.63470,0.64484,0.65551,0.66578,0.67590,0.68591,0.69644,0.70629,0.71601,0.72564,0.73563,0.74556,0.75554,0.76518,0.77502,0.78447,0.79367,0.80276,0.81249 -0.82182,0.83078,0.83969,0.84839,0.85714,0.86590,0.87474,0.88309,0.89123,0.89935,0.90709,0.91462,0.92191,0.92886,0.93542,0.94167,0.94725,0.95236,0.95703,0.96132 -0.96529,0.96869,0.97170,0.97452,0.97680,0.97882,0.98077,0.98251,0.98410,0.98526,0.98652,0.98757,0.98842,0.98931,0.99011,0.99081,0.99144,0.99203,0.99261,0.99310 -0.99355,0.99393,0.99429,0.99457,0.99492,0.99522,0.99545,0.99571,0.99598,0.99615,0.99630,0.99647,0.99665,0.99683,0.99698,0.99710,0.99719,0.99729,0.99742,0.99749 -0.99760,0.99767,0.99775,0.99782,0.99790,0.99796,0.99801,0.99810,0.99818,0.99824,0.99831,0.99836,0.99841,0.99847,0.99852,0.99857,0.99861,0.99868,0.99872,0.99878 -0.99884,0.99890,0.99897,0.99904,0.99907,0.99910,0.99915,0.99919,0.99923,0.99929,0.99932,0.99939,0.99944,0.99947,0.99950,0.99957,0.99961,0.99965,0.99968,0.99971 -0.99977,0.99979,0.99983,0.99987,0.99989,0.99992,0.99994,0.99996,0.99997,0.99999,1.00000 -pwc2v2fract=0.00092,0.00254,0.00530,0.00920,0.01441,0.02052,0.02776,0.03601,0.04503,0.05487,0.06491,0.07533,0.08589,0.09662,0.10809,0.11987,0.13153,0.14339,0.15524 -0.16718,0.17963,0.19149,0.20349,0.21512,0.22742,0.23951,0.25163,0.26356,0.27567,0.28788,0.29955,0.31148,0.32335,0.33520,0.34722,0.35890,0.37047,0.38198,0.39394 -0.40524,0.41661,0.42844,0.43996,0.45126,0.46254,0.47368,0.48499,0.49600,0.50722,0.51837,0.52907,0.54036,0.55126,0.56228,0.57335,0.58406,0.59488,0.60527,0.61586 -0.62653,0.63709,0.64756,0.65810,0.66868,0.67909,0.68941,0.69968,0.70980,0.71955,0.72920,0.73914,0.74877,0.75799,0.76758,0.77728,0.78672,0.79609,0.80503,0.81402 -0.82371,0.83279,0.84188,0.85061,0.85905,0.86748,0.87556,0.88395,0.89208,0.89995,0.90787,0.91531,0.92250,0.92929,0.93568,0.94166,0.94725,0.95226,0.95693,0.96105 -0.96466,0.96813,0.97112,0.97376,0.97616,0.97829,0.98018,0.98185,0.98331,0.98472,0.98598,0.98711,0.98808,0.98899,0.98977,0.99059,0.99129,0.99189,0.99246,0.99298 -0.99354,0.99396,0.99436,0.99481,0.99519,0.99552,0.99580,0.99605,0.99635,0.99657,0.99682,0.99699,0.99716,0.99731,0.99744,0.99757,0.99769,0.99781,0.99791,0.99800 -0.99812,0.99819,0.99826,0.99835,0.99844,0.99852,0.99857,0.99862,0.99870,0.99878,0.99883,0.99889,0.99895,0.99900,0.99903,0.99907,0.99912,0.99920,0.99923,0.99925 -0.99929,0.99930,0.99935,0.99939,0.99942,0.99945,0.99951,0.99953,0.99953,0.99956,0.99960,0.99965,0.99967,0.99970,0.99973,0.99977,0.99978,0.99981,0.99983,0.99984 -0.99986,0.99990,0.99991,0.99992,0.99992,0.99994,0.99997,0.99997,0.99998,1.00000,1.00000 -pwc2v1fract=0.00092,0.00256,0.00527,0.00937,0.01425,0.02075,0.02796,0.03611,0.04506,0.05435,0.06420,0.07484,0.08542,0.09642,0.10746,0.11843,0.12972,0.14107,0.15299 -0.16449,0.17652,0.18819,0.20003,0.21207,0.22419,0.23615,0.24816,0.25992,0.27190,0.28411,0.29618,0.30761,0.31933,0.33106,0.34291,0.35448,0.36614,0.37787,0.38958 -0.40123,0.41295,0.42440,0.43597,0.44728,0.45889,0.47008,0.48112,0.49203,0.50340,0.51450,0.52545,0.53669,0.54773,0.55883,0.57018,0.58091,0.59134,0.60192,0.61258 -0.62284,0.63365,0.64427,0.65495,0.66558,0.67567,0.68602,0.69598,0.70582,0.71605,0.72611,0.73618,0.74596,0.75546,0.76509,0.77471,0.78449,0.79409,0.80354,0.81281 -0.82197,0.83115,0.84037,0.84917,0.85801,0.86645,0.87495,0.88321,0.89128,0.89928,0.90691,0.91448,0.92157,0.92851,0.93508,0.94066,0.94623,0.95129,0.95585,0.95983 -0.96361,0.96710,0.97005,0.97251,0.97515,0.97724,0.97912,0.98080,0.98238,0.98370,0.98501,0.98617,0.98717,0.98813,0.98911,0.98993,0.99065,0.99120,0.99191,0.99236 -0.99297,0.99345,0.99381,0.99419,0.99451,0.99478,0.99512,0.99540,0.99566,0.99590,0.99612,0.99634,0.99649,0.99670,0.99685,0.99704,0.99716,0.99731,0.99746,0.99760 -0.99774,0.99787,0.99797,0.99807,0.99818,0.99824,0.99830,0.99838,0.99843,0.99853,0.99861,0.99869,0.99877,0.99886,0.99890,0.99894,0.99900,0.99906,0.99909,0.99914 -0.99921,0.99923,0.99928,0.99932,0.99934,0.99937,0.99939,0.99942,0.99945,0.99947,0.99953,0.99958,0.99960,0.99966,0.99968,0.99971,0.99975,0.99976,0.99978,0.99980 -0.99983,0.99985,0.99987,0.99989,0.99991,0.99993,0.99994,0.99995,0.99998,0.99999,1.00000 -pwc2x2fract=0.00096,0.00279,0.00580,0.01035,0.01604,0.02288,0.03108,0.03977,0.04954,0.05983,0.07046,0.08120,0.09240,0.10378,0.11559,0.12720,0.13907,0.15131,0.16337 -0.17545,0.18717,0.19948,0.21144,0.22381,0.23558,0.24728,0.25936,0.27167,0.28361,0.29531,0.30740,0.31908,0.33081,0.34250,0.35382,0.36511,0.37688,0.38848,0.40000 -0.41178,0.42333,0.43422,0.44595,0.45731,0.46857,0.48009,0.49116,0.50214,0.51322,0.52424,0.53505,0.54614,0.55713,0.56789,0.57892,0.58990,0.60064,0.61080,0.62159 -0.63215,0.64257,0.65327,0.66358,0.67391,0.68381,0.69401,0.70453,0.71526,0.72521,0.73506,0.74500,0.75465,0.76460,0.77449,0.78395,0.79340,0.80322,0.81284,0.82181 -0.83108,0.84035,0.84939,0.85829,0.86687,0.87509,0.88352,0.89180,0.89973,0.90742,0.91506,0.92229,0.92912,0.93565,0.94222,0.94810,0.95331,0.95820,0.96256,0.96654 -0.96997,0.97294,0.97573,0.97812,0.98026,0.98221,0.98377,0.98512,0.98627,0.98731,0.98841,0.98914,0.98998,0.99072,0.99140,0.99202,0.99257,0.99312,0.99354,0.99396 -0.99437,0.99467,0.99505,0.99527,0.99551,0.99573,0.99596,0.99614,0.99631,0.99652,0.99666,0.99679,0.99692,0.99706,0.99717,0.99727,0.99734,0.99746,0.99756,0.99767 -0.99778,0.99788,0.99795,0.99804,0.99810,0.99817,0.99822,0.99828,0.99832,0.99838,0.99844,0.99847,0.99853,0.99860,0.99864,0.99871,0.99877,0.99884,0.99888,0.99891 -0.99896,0.99900,0.99904,0.99911,0.99916,0.99922,0.99927,0.99929,0.99933,0.99938,0.99940,0.99947,0.99951,0.99956,0.99960,0.99964,0.99965,0.99968,0.99973,0.99976 -0.99979,0.99983,0.99984,0.99987,0.99992,0.99993,0.99994,0.99995,0.99997,0.99998,1.00000 -pwc2x1fract=0.00094,0.00287,0.00605,0.01026,0.01582,0.02258,0.03072,0.03985,0.04916,0.05907,0.06961,0.08098,0.09233,0.10352,0.11511,0.12696,0.13873,0.15067,0.16271 -0.17484,0.18695,0.19905,0.21114,0.22252,0.23445,0.24659,0.25849,0.27035,0.28224,0.29368,0.30592,0.31762,0.32919,0.34100,0.35297,0.36420,0.37567,0.38701,0.39822 -0.40937,0.42081,0.43233,0.44398,0.45508,0.46635,0.47786,0.48939,0.50031,0.51110,0.52236,0.53327,0.54439,0.55534,0.56653,0.57717,0.58810,0.59918,0.60966,0.62017 -0.63075,0.64153,0.65183,0.66234,0.67262,0.68344,0.69387,0.70407,0.71406,0.72386,0.73362,0.74401,0.75354,0.76343,0.77326,0.78289,0.79218,0.80132,0.81086,0.81987 -0.82922,0.83812,0.84692,0.85547,0.86395,0.87243,0.88097,0.88903,0.89706,0.90478,0.91241,0.91992,0.92718,0.93390,0.94011,0.94623,0.95208,0.95711,0.96159,0.96570 -0.96916,0.97222,0.97491,0.97745,0.97962,0.98160,0.98348,0.98493,0.98626,0.98747,0.98839,0.98930,0.99014,0.99083,0.99147,0.99200,0.99245,0.99290,0.99332,0.99372 -0.99407,0.99430,0.99458,0.99480,0.99499,0.99520,0.99543,0.99562,0.99574,0.99592,0.99610,0.99622,0.99634,0.99647,0.99661,0.99672,0.99685,0.99698,0.99705,0.99722 -0.99730,0.99740,0.99750,0.99759,0.99770,0.99776,0.99784,0.99791,0.99799,0.99808,0.99816,0.99824,0.99829,0.99833,0.99843,0.99847,0.99852,0.99859,0.99863,0.99871 -0.99878,0.99885,0.99892,0.99898,0.99904,0.99907,0.99912,0.99918,0.99924,0.99932,0.99940,0.99947,0.99953,0.99959,0.99964,0.99969,0.99973,0.99976,0.99979,0.99981 -0.99985,0.99987,0.99989,0.99991,0.99995,0.99997,0.99997,0.99998,0.99998,0.99999,1.00000 -pwc2u2fract=0.00082,0.00243,0.00525,0.00913,0.01443,0.02077,0.02785,0.03620,0.04513,0.05444,0.06456,0.07501,0.08546,0.09653,0.10753,0.11924,0.13072,0.14273,0.15465 -0.16648,0.17853,0.19084,0.20280,0.21501,0.22714,0.23923,0.25128,0.26294,0.27480,0.28666,0.29847,0.31011,0.32218,0.33387,0.34588,0.35744,0.36903,0.38086,0.39291 -0.40447,0.41564,0.42692,0.43786,0.44954,0.46077,0.47191,0.48334,0.49450,0.50573,0.51716,0.52842,0.53967,0.55102,0.56188,0.57236,0.58330,0.59386,0.60462,0.61548 -0.62643,0.63668,0.64743,0.65774,0.66783,0.67811,0.68899,0.69911,0.70943,0.71956,0.72964,0.73979,0.74931,0.75903,0.76888,0.77854,0.78834,0.79785,0.80724,0.81608 -0.82498,0.83400,0.84284,0.85180,0.86046,0.86904,0.87754,0.88577,0.89403,0.90216,0.90990,0.91732,0.92455,0.93142,0.93783,0.94385,0.94931,0.95452,0.95902,0.96313 -0.96679,0.97024,0.97319,0.97602,0.97835,0.98031,0.98216,0.98369,0.98509,0.98631,0.98746,0.98847,0.98944,0.99034,0.99114,0.99186,0.99256,0.99309,0.99359,0.99407 -0.99443,0.99478,0.99509,0.99536,0.99561,0.99588,0.99618,0.99643,0.99665,0.99684,0.99704,0.99721,0.99731,0.99744,0.99754,0.99766,0.99779,0.99787,0.99793,0.99800 -0.99810,0.99817,0.99823,0.99833,0.99839,0.99843,0.99850,0.99855,0.99859,0.99863,0.99868,0.99875,0.99880,0.99886,0.99891,0.99894,0.99901,0.99906,0.99909,0.99916 -0.99916,0.99920,0.99925,0.99927,0.99930,0.99933,0.99936,0.99940,0.99943,0.99946,0.99950,0.99953,0.99956,0.99959,0.99962,0.99965,0.99967,0.99971,0.99972,0.99975 -0.99979,0.99980,0.99983,0.99987,0.99989,0.99991,0.99993,0.99994,0.99995,0.99998,1.00000 -pwc2u1fract=0.00073,0.00236,0.00483,0.00820,0.01305,0.01860,0.02528,0.03284,0.04102,0.04975,0.05894,0.06850,0.07859,0.08900,0.09923,0.10981,0.12058,0.13181,0.14308 -0.15458,0.16629,0.17768,0.18932,0.20149,0.21308,0.22480,0.23657,0.24845,0.26040,0.27228,0.28392,0.29581,0.30740,0.31920,0.33091,0.34294,0.35471,0.36651,0.37824 -0.38976,0.40177,0.41350,0.42496,0.43618,0.44783,0.45921,0.47066,0.48178,0.49267,0.50398,0.51496,0.52628,0.53776,0.54888,0.55999,0.57097,0.58151,0.59227,0.60302 -0.61357,0.62438,0.63461,0.64549,0.65585,0.66626,0.67657,0.68680,0.69688,0.70711,0.71728,0.72746,0.73746,0.74733,0.75726,0.76671,0.77643,0.78620,0.79596,0.80516 -0.81431,0.82354,0.83260,0.84158,0.85052,0.85911,0.86798,0.87667,0.88496,0.89295,0.90106,0.90862,0.91590,0.92303,0.92942,0.93560,0.94144,0.94695,0.95188,0.95619 -0.96020,0.96387,0.96728,0.97043,0.97312,0.97551,0.97745,0.97925,0.98110,0.98263,0.98401,0.98533,0.98658,0.98773,0.98865,0.98964,0.99050,0.99128,0.99190,0.99256 -0.99317,0.99373,0.99425,0.99469,0.99505,0.99536,0.99564,0.99595,0.99623,0.99646,0.99670,0.99691,0.99707,0.99719,0.99736,0.99750,0.99761,0.99774,0.99783,0.99792 -0.99801,0.99807,0.99815,0.99821,0.99828,0.99834,0.99841,0.99846,0.99850,0.99855,0.99859,0.99864,0.99872,0.99877,0.99881,0.99887,0.99893,0.99901,0.99905,0.99909 -0.99914,0.99917,0.99923,0.99928,0.99931,0.99935,0.99938,0.99941,0.99943,0.99946,0.99950,0.99955,0.99959,0.99964,0.99967,0.99970,0.99974,0.99977,0.99979,0.99981 -0.99985,0.99987,0.99990,0.99992,0.99994,0.99995,0.99997,0.99997,0.99997,1.00000,1.00000 +pwc1u1fract=0.00139,0.00386,0.00756,0.01208,0.01767,0.02386,0.03078,0.03878,0.04655,0.05472,0.06388,0.07384,0.08369,0.09415,0.10424,0.11513,0.12656,0.13840,0.15067 +0.16309,0.17534,0.18768,0.19946,0.21143,0.22356,0.23568,0.24740,0.26061,0.27287,0.28485,0.29656,0.30860,0.32024,0.33210,0.34414,0.35609,0.36839,0.38039,0.39220 +0.40426,0.41640,0.42825,0.43917,0.45152,0.46331,0.47475,0.48581,0.49634,0.50769,0.51855,0.52939,0.54044,0.55157,0.56249,0.57307,0.58369,0.59467,0.60572,0.61674 +0.62758,0.63814,0.64859,0.65912,0.66972,0.68015,0.69055,0.70037,0.71091,0.72104,0.73112,0.74137,0.75168,0.76125,0.77128,0.78134,0.79087,0.80038,0.81034,0.81981 +0.82911,0.83784,0.84646,0.85523,0.86430,0.87231,0.88118,0.88991,0.89820,0.90579,0.91350,0.92027,0.92697,0.93324,0.93921,0.94489,0.95046,0.95547,0.95989,0.96369 +0.96769,0.97114,0.97393,0.97643,0.97857,0.98044,0.98202,0.98380,0.98534,0.98646,0.98764,0.98902,0.98999,0.99095,0.99186,0.99275,0.99354,0.99410,0.99470,0.99525 +0.99584,0.99636,0.99676,0.99717,0.99750,0.99777,0.99806,0.99827,0.99845,0.99857,0.99872,0.99887,0.99897,0.99911,0.99923,0.99930,0.99939,0.99946,0.99953,0.99956 +0.99961,0.99963,0.99963,0.99972,0.99973,0.99978,0.99981,0.99982,0.99985,0.99987,0.99987,0.99987,0.99988,0.99989,0.99991,0.99992,0.99992,0.99993,0.99993,0.99995 +0.99996,0.99996,0.99996,0.99996,0.99997,0.99999,0.99999,0.99999,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +pwc1u2fract=0.00159,0.00416,0.00799,0.01274,0.01859,0.02520,0.03247,0.04007,0.04896,0.05802,0.06757,0.07649,0.08637,0.09762,0.10851,0.12019,0.13172,0.14363,0.15576 +0.16829,0.18057,0.19349,0.20596,0.21851,0.23114,0.24333,0.25562,0.26831,0.28079,0.29354,0.30510,0.31710,0.32919,0.34187,0.35403,0.36550,0.37750,0.38899,0.39998 +0.41223,0.42349,0.43485,0.44624,0.45785,0.46948,0.48077,0.49184,0.50278,0.51370,0.52476,0.53549,0.54666,0.55721,0.56832,0.58003,0.59134,0.60210,0.61268,0.62330 +0.63353,0.64440,0.65485,0.66440,0.67461,0.68563,0.69564,0.70566,0.71612,0.72625,0.73611,0.74557,0.75551,0.76485,0.77483,0.78396,0.79322,0.80257,0.81132,0.82096 +0.82993,0.83854,0.84740,0.85597,0.86382,0.87219,0.88054,0.88929,0.89743,0.90529,0.91274,0.91967,0.92700,0.93367,0.93993,0.94554,0.95076,0.95517,0.95962,0.96359 +0.96724,0.97021,0.97291,0.97556,0.97810,0.98001,0.98184,0.98345,0.98503,0.98650,0.98787,0.98897,0.99009,0.99107,0.99194,0.99272,0.99358,0.99426,0.99494,0.99552 +0.99591,0.99617,0.99658,0.99685,0.99723,0.99761,0.99786,0.99803,0.99830,0.99841,0.99857,0.99872,0.99887,0.99899,0.99909,0.99920,0.99927,0.99933,0.99939,0.99945 +0.99951,0.99956,0.99959,0.99963,0.99967,0.99970,0.99972,0.99977,0.99977,0.99981,0.99984,0.99986,0.99988,0.99989,0.99990,0.99991,0.99994,0.99996,0.99997,0.99998 +0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999 +0.99999,0.99999,0.99999,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +pwc1x1fract=0.00112,0.00395,0.00783,0.01269,0.01850,0.02549,0.03329,0.04131,0.04972,0.05860,0.06824,0.07840,0.08865,0.09955,0.11057,0.12215,0.13369,0.14583,0.15777 +0.16925,0.18170,0.19340,0.20535,0.21731,0.22887,0.24124,0.25369,0.26622,0.27863,0.29120,0.30292,0.31470,0.32682,0.33896,0.35064,0.36335,0.37514,0.38689,0.39862 +0.41098,0.42340,0.43500,0.44614,0.45758,0.46875,0.48023,0.49152,0.50238,0.51323,0.52444,0.53543,0.54580,0.55631,0.56741,0.57900,0.58942,0.59947,0.60990,0.62087 +0.63122,0.64182,0.65241,0.66256,0.67297,0.68329,0.69359,0.70401,0.71416,0.72423,0.73437,0.74422,0.75456,0.76507,0.77482,0.78454,0.79402,0.80311,0.81198,0.82158 +0.83041,0.83993,0.84924,0.85818,0.86680,0.87592,0.88432,0.89273,0.90061,0.90813,0.91562,0.92324,0.93066,0.93751,0.94385,0.94972,0.95468,0.95931,0.96324,0.96687 +0.97046,0.97354,0.97653,0.97890,0.98121,0.98310,0.98502,0.98663,0.98804,0.98920,0.99033,0.99146,0.99236,0.99310,0.99380,0.99441,0.99499,0.99538,0.99589,0.99634 +0.99661,0.99704,0.99738,0.99772,0.99794,0.99813,0.99840,0.99854,0.99864,0.99871,0.99881,0.99890,0.99905,0.99915,0.99925,0.99934,0.99940,0.99946,0.99952,0.99955 +0.99957,0.99959,0.99963,0.99967,0.99968,0.99973,0.99973,0.99974,0.99975,0.99981,0.99981,0.99986,0.99987,0.99988,0.99988,0.99988,0.99989,0.99989,0.99990,0.99991 +0.99991,0.99991,0.99991,0.99991,0.99991,0.99993,0.99995,0.99995,0.99995,0.99996,0.99996,0.99996,0.99997,0.99997,0.99998,0.99999,0.99999,0.99999,0.99999,0.99999 +1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +pwc1x2fract=0.00169,0.00475,0.00921,0.01426,0.02062,0.02794,0.03579,0.04441,0.05356,0.06320,0.07352,0.08398,0.09439,0.10548,0.11655,0.12837,0.14061,0.15322,0.16548 +0.17807,0.18993,0.20122,0.21320,0.22528,0.23795,0.25008,0.26193,0.27429,0.28641,0.29841,0.31016,0.32144,0.33288,0.34443,0.35625,0.36749,0.37885,0.39026,0.40202 +0.41354,0.42481,0.43638,0.44781,0.45877,0.46977,0.48111,0.49197,0.50335,0.51481,0.52525,0.53612,0.54748,0.55897,0.56957,0.58050,0.59108,0.60139,0.61187,0.62229 +0.63259,0.64306,0.65365,0.66361,0.67421,0.68440,0.69477,0.70455,0.71466,0.72516,0.73484,0.74475,0.75439,0.76357,0.77357,0.78326,0.79241,0.80171,0.81140,0.82016 +0.82950,0.83882,0.84760,0.85637,0.86551,0.87378,0.88237,0.89037,0.89843,0.90623,0.91397,0.92166,0.92884,0.93533,0.94167,0.94759,0.95289,0.95794,0.96225,0.96627 +0.97019,0.97334,0.97647,0.97909,0.98119,0.98333,0.98498,0.98685,0.98842,0.98977,0.99082,0.99168,0.99266,0.99349,0.99421,0.99493,0.99544,0.99598,0.99649,0.99679 +0.99705,0.99731,0.99757,0.99789,0.99812,0.99826,0.99845,0.99861,0.99872,0.99888,0.99895,0.99907,0.99921,0.99931,0.99938,0.99945,0.99954,0.99958,0.99963,0.99967 +0.99972,0.99973,0.99974,0.99976,0.99977,0.99978,0.99978,0.99979,0.99982,0.99982,0.99984,0.99985,0.99986,0.99987,0.99988,0.99989,0.99989,0.99989,0.99989,0.99989 +0.99989,0.99989,0.99990,0.99990,0.99990,0.99990,0.99991,0.99992,0.99992,0.99992,0.99993,0.99995,0.99996,0.99996,0.99996,0.99997,0.99997,0.99997,0.99997,0.99997 +0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99999,1.00000 +pwc1v1fract=0.00150,0.00404,0.00828,0.01314,0.01891,0.02557,0.03278,0.04036,0.04904,0.05811,0.06716,0.07606,0.08605,0.09589,0.10637,0.11761,0.12953,0.14120,0.15355 +0.16588,0.17816,0.19034,0.20267,0.21512,0.22831,0.24082,0.25305,0.26473,0.27635,0.28834,0.30058,0.31308,0.32504,0.33732,0.34934,0.36148,0.37295,0.38515,0.39676 +0.40842,0.41991,0.43184,0.44300,0.45507,0.46625,0.47749,0.48919,0.50056,0.51194,0.52303,0.53438,0.54556,0.55623,0.56738,0.57832,0.58950,0.60091,0.61231,0.62305 +0.63377,0.64455,0.65442,0.66480,0.67509,0.68507,0.69494,0.70511,0.71568,0.72512,0.73455,0.74455,0.75447,0.76419,0.77344,0.78312,0.79258,0.80166,0.81073,0.81935 +0.82866,0.83765,0.84689,0.85581,0.86397,0.87298,0.88122,0.88949,0.89775,0.90529,0.91301,0.92032,0.92680,0.93353,0.93965,0.94529,0.95078,0.95537,0.95941,0.96345 +0.96664,0.96975,0.97274,0.97525,0.97769,0.97966,0.98174,0.98335,0.98504,0.98649,0.98750,0.98876,0.98972,0.99076,0.99165,0.99244,0.99316,0.99373,0.99418,0.99488 +0.99533,0.99578,0.99624,0.99662,0.99697,0.99724,0.99750,0.99772,0.99791,0.99808,0.99832,0.99855,0.99874,0.99886,0.99894,0.99906,0.99918,0.99932,0.99940,0.99945 +0.99953,0.99957,0.99962,0.99971,0.99973,0.99974,0.99977,0.99978,0.99983,0.99985,0.99988,0.99989,0.99989,0.99990,0.99990,0.99992,0.99992,0.99992,0.99993,0.99993 +0.99993,0.99993,0.99995,0.99995,0.99995,0.99996,0.99996,0.99996,0.99997,0.99997,0.99997,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99999,0.99999 +0.99999,0.99999,0.99999,0.99999,0.99999,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +pwc1v2fract=0.00152,0.00441,0.00845,0.01349,0.01892,0.02547,0.03306,0.04158,0.05040,0.05957,0.06914,0.07889,0.08952,0.10038,0.11107,0.12208,0.13327,0.14501,0.15658 +0.16922,0.18140,0.19367,0.20549,0.21794,0.22979,0.24231,0.25482,0.26732,0.27938,0.29090,0.30316,0.31514,0.32666,0.33846,0.35035,0.36259,0.37469,0.38610,0.39803 +0.41009,0.42228,0.43345,0.44450,0.45539,0.46680,0.47821,0.48958,0.50112,0.51236,0.52231,0.53388,0.54494,0.55630,0.56698,0.57841,0.58951,0.59985,0.61120,0.62201 +0.63255,0.64301,0.65376,0.66379,0.67390,0.68382,0.69359,0.70374,0.71373,0.72362,0.73366,0.74361,0.75342,0.76325,0.77342,0.78276,0.79239,0.80195,0.81163,0.82131 +0.83045,0.83982,0.84837,0.85695,0.86501,0.87369,0.88215,0.88988,0.89771,0.90539,0.91250,0.91948,0.92625,0.93261,0.93848,0.94434,0.94965,0.95460,0.95922,0.96322 +0.96654,0.96996,0.97317,0.97580,0.97787,0.98011,0.98184,0.98345,0.98488,0.98633,0.98765,0.98887,0.98993,0.99102,0.99198,0.99292,0.99355,0.99436,0.99483,0.99544 +0.99579,0.99630,0.99660,0.99687,0.99721,0.99751,0.99771,0.99799,0.99820,0.99840,0.99855,0.99871,0.99884,0.99898,0.99908,0.99917,0.99929,0.99940,0.99945,0.99952 +0.99955,0.99959,0.99967,0.99968,0.99969,0.99975,0.99980,0.99982,0.99982,0.99984,0.99984,0.99984,0.99987,0.99987,0.99989,0.99990,0.99992,0.99992,0.99992,0.99993 +0.99997,0.99997,0.99997,0.99997,0.99998,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +pwc2v2fract=0.00161,0.00404,0.00794,0.01274,0.01839,0.02436,0.03162,0.03910,0.04733,0.05597,0.06583,0.07610,0.08610,0.09698,0.10804,0.11959,0.13102,0.14282,0.15533 +0.16781,0.18047,0.19243,0.20514,0.21802,0.22941,0.24231,0.25484,0.26674,0.27933,0.29095,0.30260,0.31467,0.32670,0.33833,0.35029,0.36206,0.37399,0.38542,0.39737 +0.40922,0.42015,0.43183,0.44253,0.45395,0.46533,0.47676,0.48764,0.49899,0.50997,0.52126,0.53255,0.54367,0.55486,0.56606,0.57774,0.58866,0.59936,0.61043,0.62056 +0.63103,0.64139,0.65182,0.66216,0.67258,0.68291,0.69331,0.70254,0.71263,0.72267,0.73310,0.74290,0.75290,0.76294,0.77286,0.78188,0.79090,0.79968,0.80906,0.81806 +0.82745,0.83712,0.84626,0.85454,0.86301,0.87141,0.87981,0.88809,0.89588,0.90377,0.91154,0.91885,0.92575,0.93237,0.93844,0.94388,0.94914,0.95436,0.95845,0.96217 +0.96580,0.96906,0.97179,0.97458,0.97694,0.97881,0.98094,0.98271,0.98435,0.98568,0.98707,0.98825,0.98942,0.99055,0.99139,0.99201,0.99272,0.99339,0.99397,0.99451 +0.99508,0.99553,0.99586,0.99629,0.99671,0.99699,0.99732,0.99752,0.99782,0.99809,0.99830,0.99845,0.99865,0.99888,0.99895,0.99906,0.99915,0.99928,0.99936,0.99947 +0.99953,0.99959,0.99963,0.99964,0.99971,0.99973,0.99974,0.99976,0.99979,0.99980,0.99982,0.99983,0.99985,0.99986,0.99986,0.99986,0.99990,0.99991,0.99991,0.99992 +0.99993,0.99994,0.99997,0.99997,0.99997,0.99997,0.99997,0.99998,0.99999,0.99999,0.99999,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +pwc2v1fract=0.00141,0.00380,0.00720,0.01167,0.01719,0.02308,0.03038,0.03861,0.04658,0.05549,0.06462,0.07387,0.08410,0.09525,0.10644,0.11808,0.12958,0.14084,0.15295 +0.16553,0.17814,0.18998,0.20271,0.21471,0.22716,0.24007,0.25276,0.26460,0.27583,0.28790,0.29966,0.31199,0.32429,0.33644,0.34835,0.36093,0.37299,0.38514,0.39761 +0.40889,0.42060,0.43211,0.44337,0.45502,0.46611,0.47742,0.48845,0.50059,0.51162,0.52317,0.53436,0.54571,0.55678,0.56736,0.57804,0.58892,0.60017,0.61128,0.62120 +0.63176,0.64260,0.65354,0.66386,0.67413,0.68481,0.69497,0.70454,0.71435,0.72399,0.73374,0.74383,0.75356,0.76238,0.77211,0.78133,0.79058,0.80019,0.80921,0.81857 +0.82816,0.83668,0.84549,0.85393,0.86248,0.87058,0.87915,0.88766,0.89612,0.90366,0.91153,0.91874,0.92592,0.93205,0.93787,0.94344,0.94876,0.95366,0.95789,0.96235 +0.96568,0.96887,0.97171,0.97445,0.97672,0.97909,0.98099,0.98270,0.98444,0.98604,0.98721,0.98841,0.98951,0.99047,0.99142,0.99218,0.99281,0.99336,0.99399,0.99459 +0.99496,0.99545,0.99581,0.99620,0.99660,0.99692,0.99721,0.99748,0.99774,0.99797,0.99811,0.99833,0.99847,0.99860,0.99870,0.99888,0.99901,0.99908,0.99914,0.99928 +0.99934,0.99940,0.99943,0.99949,0.99951,0.99957,0.99960,0.99966,0.99969,0.99973,0.99975,0.99978,0.99978,0.99983,0.99984,0.99984,0.99985,0.99985,0.99985,0.99985 +0.99986,0.99986,0.99986,0.99989,0.99990,0.99991,0.99991,0.99991,0.99991,0.99993,0.99993,0.99994,0.99994,0.99994,0.99994,0.99994,0.99994,0.99995,0.99995,0.99995 +0.99995,0.99997,0.99997,0.99998,0.99999,0.99999,0.99999,0.99999,0.99999,1.00000,1.00000 +pwc2x2fract=0.00145,0.00424,0.00830,0.01389,0.02018,0.02752,0.03528,0.04380,0.05259,0.06200,0.07161,0.08130,0.09221,0.10344,0.11556,0.12752,0.14028,0.15264,0.16502 +0.17744,0.18996,0.20224,0.21416,0.22633,0.23776,0.25009,0.26146,0.27320,0.28539,0.29715,0.30882,0.32083,0.33294,0.34466,0.35712,0.36844,0.38014,0.39121,0.40268 +0.41390,0.42510,0.43663,0.44837,0.46011,0.47166,0.48246,0.49387,0.50506,0.51623,0.52736,0.53841,0.54916,0.56018,0.57121,0.58240,0.59288,0.60423,0.61498,0.62602 +0.63683,0.64662,0.65712,0.66796,0.67834,0.68833,0.69782,0.70796,0.71795,0.72835,0.73814,0.74777,0.75774,0.76707,0.77696,0.78644,0.79552,0.80482,0.81393,0.82373 +0.83271,0.84215,0.85102,0.85939,0.86825,0.87624,0.88413,0.89264,0.90040,0.90802,0.91576,0.92267,0.92970,0.93614,0.94187,0.94742,0.95266,0.95767,0.96185,0.96580 +0.96947,0.97247,0.97544,0.97792,0.98026,0.98218,0.98385,0.98535,0.98695,0.98813,0.98932,0.99038,0.99142,0.99223,0.99289,0.99369,0.99432,0.99485,0.99536,0.99587 +0.99631,0.99666,0.99694,0.99726,0.99762,0.99783,0.99807,0.99818,0.99830,0.99838,0.99851,0.99864,0.99873,0.99884,0.99893,0.99898,0.99906,0.99915,0.99919,0.99926 +0.99931,0.99933,0.99939,0.99945,0.99948,0.99954,0.99957,0.99960,0.99964,0.99964,0.99968,0.99970,0.99971,0.99974,0.99974,0.99975,0.99975,0.99978,0.99979,0.99980 +0.99980,0.99982,0.99983,0.99983,0.99984,0.99984,0.99984,0.99984,0.99986,0.99990,0.99990,0.99992,0.99992,0.99992,0.99992,0.99992,0.99993,0.99993,0.99994,0.99994 +0.99998,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,1.00000,1.00000 +pwc2x1fract=0.00135,0.00407,0.00741,0.01230,0.01793,0.02532,0.03227,0.03979,0.04825,0.05764,0.06759,0.07748,0.08768,0.09863,0.10959,0.12093,0.13265,0.14526,0.15766 +0.17005,0.18261,0.19466,0.20755,0.21975,0.23214,0.24426,0.25646,0.26810,0.28045,0.29241,0.30438,0.31659,0.32738,0.33926,0.35080,0.36279,0.37444,0.38564,0.39744 +0.40938,0.42125,0.43284,0.44410,0.45522,0.46662,0.47827,0.48947,0.50048,0.51163,0.52238,0.53306,0.54397,0.55512,0.56602,0.57671,0.58804,0.59882,0.60953,0.62012 +0.63019,0.64087,0.65073,0.66124,0.67111,0.68129,0.69151,0.70137,0.71142,0.72139,0.73136,0.74131,0.75146,0.76087,0.77041,0.77974,0.78926,0.79898,0.80857,0.81742 +0.82666,0.83587,0.84527,0.85460,0.86314,0.87193,0.88043,0.88803,0.89507,0.90315,0.91077,0.91838,0.92570,0.93274,0.93921,0.94494,0.95064,0.95568,0.96021,0.96445 +0.96806,0.97123,0.97401,0.97673,0.97937,0.98141,0.98313,0.98481,0.98650,0.98769,0.98873,0.98977,0.99082,0.99151,0.99234,0.99303,0.99377,0.99434,0.99484,0.99529 +0.99563,0.99594,0.99631,0.99668,0.99700,0.99718,0.99745,0.99765,0.99784,0.99794,0.99816,0.99826,0.99836,0.99852,0.99868,0.99876,0.99889,0.99894,0.99898,0.99902 +0.99907,0.99914,0.99917,0.99924,0.99929,0.99936,0.99937,0.99940,0.99942,0.99947,0.99948,0.99950,0.99953,0.99954,0.99956,0.99961,0.99962,0.99962,0.99962,0.99964 +0.99965,0.99967,0.99969,0.99972,0.99973,0.99975,0.99975,0.99975,0.99981,0.99982,0.99982,0.99982,0.99984,0.99985,0.99986,0.99987,0.99989,0.99989,0.99989,0.99990 +0.99991,0.99994,0.99994,0.99995,0.99997,0.99998,0.99998,0.99999,0.99999,1.00000,1.00000 +pwc2u2fract=0.00127,0.00364,0.00718,0.01196,0.01754,0.02335,0.03036,0.03830,0.04612,0.05463,0.06349,0.07305,0.08310,0.09383,0.10434,0.11500,0.12615,0.13893,0.15090 +0.16291,0.17533,0.18796,0.20035,0.21265,0.22433,0.23616,0.24894,0.26125,0.27310,0.28534,0.29701,0.30949,0.32156,0.33356,0.34489,0.35641,0.36871,0.38023,0.39157 +0.40281,0.41417,0.42583,0.43778,0.44943,0.46090,0.47312,0.48469,0.49622,0.50730,0.51920,0.53057,0.54192,0.55306,0.56394,0.57508,0.58608,0.59680,0.60762,0.61852 +0.62919,0.63998,0.65029,0.66079,0.67103,0.68123,0.69210,0.70197,0.71209,0.72226,0.73291,0.74273,0.75248,0.76208,0.77180,0.78083,0.79059,0.80052,0.80966,0.81881 +0.82795,0.83693,0.84579,0.85477,0.86336,0.87211,0.88019,0.88787,0.89591,0.90361,0.91093,0.91849,0.92561,0.93138,0.93796,0.94345,0.94844,0.95321,0.95822,0.96257 +0.96619,0.96945,0.97274,0.97542,0.97778,0.98001,0.98183,0.98360,0.98507,0.98668,0.98795,0.98920,0.99035,0.99127,0.99206,0.99279,0.99349,0.99408,0.99465,0.99522 +0.99582,0.99635,0.99676,0.99714,0.99738,0.99766,0.99792,0.99810,0.99831,0.99846,0.99862,0.99875,0.99888,0.99908,0.99919,0.99930,0.99943,0.99948,0.99951,0.99958 +0.99960,0.99966,0.99970,0.99974,0.99978,0.99979,0.99979,0.99982,0.99982,0.99982,0.99985,0.99985,0.99986,0.99989,0.99990,0.99993,0.99994,0.99994,0.99997,0.99997 +0.99997,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99998,0.99999,0.99999,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000,1.00000 +pwc2u1fract=0.00141,0.00429,0.00823,0.01287,0.01909,0.02527,0.03223,0.04004,0.04789,0.05653,0.06591,0.07531,0.08599,0.09607,0.10689,0.11775,0.12960,0.14102,0.15324 +0.16569,0.17832,0.19053,0.20207,0.21444,0.22650,0.23856,0.25154,0.26372,0.27602,0.28777,0.29997,0.31249,0.32471,0.33681,0.34824,0.36048,0.37252,0.38504,0.39704 +0.40898,0.42075,0.43195,0.44381,0.45467,0.46617,0.47729,0.48891,0.50049,0.51211,0.52381,0.53548,0.54715,0.55781,0.56900,0.58027,0.59069,0.60144,0.61291,0.62342 +0.63423,0.64510,0.65489,0.66501,0.67478,0.68516,0.69515,0.70536,0.71568,0.72543,0.73534,0.74566,0.75551,0.76504,0.77457,0.78425,0.79397,0.80327,0.81228,0.82144 +0.83056,0.83927,0.84819,0.85686,0.86557,0.87435,0.88287,0.89094,0.89872,0.90651,0.91359,0.92079,0.92743,0.93378,0.94014,0.94584,0.95120,0.95597,0.96074,0.96468 +0.96822,0.97122,0.97406,0.97660,0.97892,0.98095,0.98278,0.98443,0.98596,0.98718,0.98869,0.98962,0.99045,0.99123,0.99203,0.99290,0.99358,0.99397,0.99454,0.99497 +0.99558,0.99598,0.99633,0.99681,0.99713,0.99750,0.99777,0.99796,0.99816,0.99839,0.99854,0.99867,0.99883,0.99896,0.99911,0.99921,0.99930,0.99936,0.99944,0.99951 +0.99957,0.99964,0.99970,0.99973,0.99974,0.99976,0.99977,0.99978,0.99978,0.99982,0.99986,0.99990,0.99990,0.99991,0.99991,0.99992,0.99992,0.99992,0.99992,0.99992 +0.99992,0.99992,0.99993,0.99993,0.99995,0.99997,0.99997,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,0.99999 +0.99999,0.99999,0.99999,0.99999,0.99999,0.99999,1.00000,1.00000,1.00000,1.00000,1.00000 diff --git a/PARAM/SHMS/DC/pdc_tzero_per_wire.param b/PARAM/SHMS/DC/pdc_tzero_per_wire.param index 212b3e9338adb1bf1239bb2d3ed18a21f36a463b..c101ff19883e46ece51a805d6133638b8138d113 100644 --- a/PARAM/SHMS/DC/pdc_tzero_per_wire.param +++ b/PARAM/SHMS/DC/pdc_tzero_per_wire.param @@ -1,88 +1,88 @@ ptzero1u1= -0.5,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000, 0.500000, 0.500000, 0.500000, -5.106123 --5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -5.106123, -1.386374 --1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -1.386374, -0.726500 --0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, -0.726500, 2.496987 -2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 2.496987, 1.762713 -1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 1.762713, 10.500000 -10.500000, 10.500000, 10.500000, 10.500000, 10.500000, 10.500000, 10.500000, 10.500000, 10.500000, 10.500000, 10.500000 +-6.10415,-6.104147,-6.104147,-6.104147,-6.104147,-6.104147,-6.104147,-6.104147,-6.104147,-6.104147,-6.104147,-6.104147, -6.104147, -6.104147, -6.104147, -6.104147 +-6.104147, -6.104147, -6.104147, -6.104147, -2.374195, -2.374195, -6.360640, -2.095216, -5.462402, -3.310319, -4.080035, -4.094233, -7.199818, -3.379706, -6.748348, -2.836545 +-2.241054, 0.520881, -1.310645, -2.895378, -2.254919, -2.361655, -0.331255, -1.943494, -3.224538, -1.259513, -1.868752, -2.712032, -1.118799, -2.307818, -2.429531, -0.259211 +-2.228179, -3.521937, -2.043059, -1.115342, -2.914036, -5.081065, 0.137717, -0.470237, -2.762124, -2.815916, -1.410289, -2.316071, -1.325728, -1.312883, -1.981623, 1.658681 +1.999788, 1.256402, 0.749586, 1.841662, -0.886561, -0.500962, 1.176453, -0.413657, 0.962652, -2.127909, 1.101999, 0.820979, 1.170787, 3.671806, -0.470109, 0.987612 +1.680685, -0.676209, -0.978793, 1.846743, 3.061377, 0.876721, 0.250529, 3.664677, -0.731989, -0.432109, -0.322377, 3.988550, 1.237241, 4.467484, 5.379773, 5.379773 +5.379773, 5.379773, 6.460601, 6.460601, 5.200407, 5.200407, 5.200407, 5.200407, 5.200407, 5.200407, 5.200407 ptzero1u2= -0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000, -5.964299, -5.964299, -5.964299, -5.964299 --5.964299, -5.964299, -5.964299, -5.964299, -5.964299, -5.964299, -5.964299, -5.964299, -5.964299, -5.964299, -5.964299, -5.964299, -1.874481, -1.874481, -1.874481, -1.874481 --1.874481, -1.874481, -1.874481, -1.874481, -1.874481, -1.874481, -1.874481, -1.874481, -1.874481, -1.874481, -1.874481, -1.874481, 0.472490, 0.472490, 0.472490, 0.472490 -0.472490, 0.472490, 0.472490, 0.472490, 0.472490, 0.472490, 0.472490, 0.472490, 0.472490, 0.472490, 0.472490, 0.472490, 2.460675, 2.460675, 2.460675, 2.460675 -2.460675, 2.460675, 2.460675, 2.460675, 2.460675, 2.460675, 2.460675, 2.460675, 2.460675, 2.460675, 2.460675, 2.460675, 3.044031, 3.044031, 3.044031, 3.044031 -3.044031, 3.044031, 3.044031, 3.044031, 3.044031, 3.044031, 3.044031, 3.044031, 3.044031, 3.044031, 3.044031, 3.044031, -3.387810, -3.387810, -3.387810, -3.387810 --3.387810, -3.387810, -3.387810, -3.387810, -3.387810, -3.387810, -3.387810, -3.387810, -3.387810, -3.387810, -3.387810 +-5.420509,-5.420509,-5.420509,-5.420509,-5.420509,-5.420509,-5.420509,-5.420509,-5.420509,-5.420509,-5.420509,-5.420509, -5.420509, -5.420509, -5.420509, -5.420509 +-5.420509, -5.420509, -5.420509, -3.684796, -3.684796, -3.834622, -3.834455, -2.493681, -2.395549, -3.214543, -6.042830, -4.145973, -2.453108, -0.294356, -1.876694, -3.250154 +-0.849790, -0.943056, -0.934006, -1.068274, -2.196804, -1.364219, -3.824040, -1.001646, -4.043603, -3.557842, -0.267400, -2.944153, -1.972728, 0.802463, -1.413205, -1.760237 +-0.441651, -1.583760, -2.262872, -2.301044, -1.878885, -1.948635, -1.789410, -2.052393, 0.624825, -1.690120, -1.960434, -0.901982, 0.999427, 1.781095, 3.789765, 1.764202 +0.144685, 2.895316, 0.836109, 3.673067, 2.728912, 2.772950, 1.981391, 1.781030, 1.071145, -0.988689, 0.229687, -1.881924, 0.813294, 2.530613, 2.764051, 1.979659 +0.838922, -0.842107, -1.439799, 0.997401, -1.145511, 0.125667, 1.131198, -0.146220, -2.924858, 2.747004, -2.190877, 5.095326, 2.345299, 4.830686, 0.000000, 5.917215 +5.917215, 5.917215, 5.917215, -0.230403, -0.230403, -0.230403, -0.230403, -0.230403, -0.230403, -0.230403, -0.230403 ptzero1x1= --5.827438,-5.827438,-5.827438,-5.827438,-5.827438,-5.827438,-5.827438,-5.827438,-5.827438,-5.827438,-5.827438,-5.827438, -5.827438, -5.827438, -5.827438, -5.827438 --4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625, -4.274625 --2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754, -2.892754 -2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442, 2.259442 -5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154, 5.880154 +-9.082984,-9.082984,-5.341342,-7.729355,-6.155659,-8.272795,-7.159296,-11.142245,-7.114336,-4.055622,-3.363250,-5.260395, -7.588179, -7.036544, -8.164209, -6.314216 +-2.460218, -7.742104, -4.354136, -2.147099, -4.908857, -5.375783, -6.391270, -6.139074, -4.926893, -6.324475, -6.694134, -2.320137, -4.212917, -6.687927, -4.694211, -1.467265 +-1.371424, -1.952875, -5.443520, -4.687287, -2.245772, -5.926007, -3.422255, -4.304873, -4.248185, -4.493905, -3.978929, -5.374014, -2.456946, -2.164845, -3.874670, -4.447952 +-0.485304, 1.884686, -1.292349, -0.341713, 1.908737, -0.379745, -0.041981, 1.965140, -0.463075, 2.793373, 2.508525, -1.020245, 2.596746, 2.515540, -0.975920, 2.787465 +2.035571, 5.473130, 5.277697, 5.621489, 4.923277, 3.379314, 4.023274, 5.125239, 6.859229, 3.518366, 5.570977, 2.790387, 5.574847, 5.252985, 5.946376 ptzero1x2= --0.255684,-0.255684,-0.255684,-0.255684,-0.255684,-0.255684,-0.255684,-0.255684,-0.255684,-0.255684,-0.255684,-0.255684, -0.255684, -0.255684, -0.255684, 1.351684 -1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, 1.351684, -5.347648 --5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -5.347648, -1.993995 --1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, -1.993995, 0.283235 -0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235, 0.283235 +-1.455515,-1.455515,2.760784,3.728440,-0.624253,-0.463442,1.809019,2.925291,1.027638,2.620560,0.027796,2.566718, 3.541861, 0.515542, 2.576765, -0.629837 +-3.379780, 0.681271, 2.078186, 1.711791, -2.799007, -1.343749, -1.489414, 0.540778, 0.509599, 2.656883, -0.456723, -1.374476, 2.677629, -0.035866, 0.808329, -5.267762 +-5.359866, -7.749872, -7.403098, -7.899240, -7.279756, -8.423442, -6.858640, -7.515721, -5.410002, -7.903032, -6.213184, -5.151952, -7.092904, -5.390163, -4.206086, -4.072168 +-3.413855, -2.107487, -4.160799, -5.349883, -5.080401, -4.859075, -6.077430, -3.128665, -2.471347, -1.312186, -3.477219, -3.222641, -4.338361, -6.224194, -5.793901, -2.134498 +-1.171971, -0.219568, -2.753583, -0.360582, -2.168611, -3.111220, -0.994596, -1.800733, -1.140298, -1.921110, 0.087552, -1.491051, 0.811579, 0.559912, -1.048711 ptzero1v1= -0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000, 0.500000, 0.500000, 0.500000, 1.422646 -1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 1.422646, 2.920489 -2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 2.920489, 5.993825 -5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, 5.993825, -6.378275 --6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -6.378275, -4.988385 --4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, -4.988385, 0.398517 -0.398517, 0.398517, 0.398517, 0.398517, 0.398517, 0.398517, 0.398517, 0.398517, 0.398517, 0.398517, 0.398517 +1.764617,1.764617,1.764617,1.764617,1.764617,1.764617,1.764617,1.764617,1.764617,1.764617,1.764617,1.764617, 1.764617, 1.764617, 1.764617, 1.764617 +2.620249, 2.620249, 3.361246, 3.361246, -0.160659, 3.057197, -1.202629, 0.583274, -1.667214, -1.721010, 1.506679, 1.969739, 3.505766, 2.779116, 0.731216, 2.659204 +0.188470, 3.842914, 1.707693, 1.042044, -1.918816, 0.599158, 3.760396, -0.169249, 2.656168, 3.743648, -0.674492, 0.298030, 1.500758, 2.448906, 1.422671, 7.365859 +3.874756, 6.182365, 5.994843, 6.430049, 3.424288, 3.457304, 5.460560, 4.109513, 4.562518, 6.907893, 6.337386, 5.420272, 5.445236, 5.610497, 3.612338, -5.282313 +-4.176768, -6.299193, -8.282603, -6.308556, -5.400910, -4.995504, -5.205942, -6.005788, -7.140691, -7.041818, -7.287950, -6.329986, -3.473586, -5.091823, -7.349970, -6.026810 +-5.877571, -6.086294, -3.985265, -3.421530, -9.143736, -3.324594, -1.321853, -3.453982, -4.816845, -3.798552, -6.630850, -6.643702, -5.814135, -4.872330, 1.030254, -0.883740 +-10.884472, 4.137313, 4.137313, 4.137313, 4.137313, 4.665014, 4.665014, 4.665014, 4.665014, 4.665014, 4.665014 ptzero1v2= -0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000, 2.392973, 2.392973, 2.392973, 2.392973 -2.392973, 2.392973, 2.392973, 2.392973, 2.392973, 2.392973, 2.392973, 2.392973, 2.392973, 2.392973, 2.392973, 2.392973, 4.490178, 4.490178, 4.490178, 4.490178 -4.490178, 4.490178, 4.490178, 4.490178, 4.490178, 4.490178, 4.490178, 4.490178, 4.490178, 4.490178, 4.490178, 4.490178, -2.786559, -2.786559, -2.786559, -2.786559 --2.786559, -2.786559, -2.786559, -2.786559, -2.786559, -2.786559, -2.786559, -2.786559, -2.786559, -2.786559, -2.786559, -2.786559, -3.880585, -3.880585, -3.880585, -3.880585 --3.880585, -3.880585, -3.880585, -3.880585, -3.880585, -3.880585, -3.880585, -3.880585, -3.880585, -3.880585, -3.880585, -3.880585, -2.007718, -2.007718, -2.007718, -2.007718 --2.007718, -2.007718, -2.007718, -2.007718, -2.007718, -2.007718, -2.007718, -2.007718, -2.007718, -2.007718, -2.007718, -2.007718, 1.469273, 1.469273, 1.469273, 1.469273 -1.469273, 1.469273, 1.469273, 1.469273, 1.469273, 1.469273, 1.469273, 1.469273, 1.469273, 1.469273, 1.469273 +3.658809,3.658809,3.658809,3.658809,3.658809,3.658809,3.658809,3.658809,3.658809,3.658809,3.658809,3.658809, 3.658809, 3.658809, 3.658809, 1.643824 +1.643824, 1.643824, 3.474362, 0.348035, 2.864119, 2.475353, 4.078968, 2.566549, 0.489266, -0.713640, 1.464999, 1.094272, 5.083183, 2.818646, 2.176858, 2.860564 +4.047789, 3.215685, 3.385150, 5.777309, 2.756268, 5.261402, 6.030662, 3.961178, 5.215486, 2.383965, 3.889041, 2.837522, -4.411197, -4.241333, -3.472555, -2.490660 +-2.326117, -5.092194, -5.600271, -3.233446, -1.030708, -6.243408, -4.854986, -4.379089, -3.107873, -4.972495, -6.976064, -3.744005, -4.294532, -4.999087, -3.453484, -2.856475 +-3.450488, -5.773189, -5.153908, -6.045207, -6.550916, -7.806903, -2.206272, -3.110512, -6.404048, -6.867144, -3.225608, -3.828057, -0.350358, -2.595878, 0.539695, -1.728815 +-1.964789, -3.048288, -0.092773, -4.321779, -3.824010, -0.948192, -2.270305, -4.548463, -1.442645, -1.434634, -1.199022, -3.150200, -1.538544, -1.801826, 0.934675, -1.035832 +-1.420479, -1.420479, -1.420479, -1.420479, -1.095610, -1.095610, -1.095610, -1.095610, -1.095610, -1.095610, -1.095610 ptzero2v2= -0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000,0.500000, -4.296137, -4.296137, -4.296137, -4.296137 --4.296137, -4.296137, -4.296137, -4.296137, -4.296137, -4.296137, -4.296137, -4.296137, -4.296137, -4.296137, -4.296137, -4.296137, 4.787235, 4.787235, 4.787235, 4.787235 -4.787235, 4.787235, 4.787235, 4.787235, 4.787235, 4.787235, 4.787235, 4.787235, 4.787235, 4.787235, 4.787235, 4.787235, 6.639440, 6.639440, 6.639440, 6.639440 -6.639440, 6.639440, 6.639440, 6.639440, 6.639440, 6.639440, 6.639440, 6.639440, 6.639440, 6.639440, 6.639440, 6.639440, 0.762460, 0.762460, 0.762460, 0.762460 -0.762460, 0.762460, 0.762460, 0.762460, 0.762460, 0.762460, 0.762460, 0.762460, 0.762460, 0.762460, 0.762460, 0.762460, 4.290423, 4.290423, 4.290423, 4.290423 -4.290423, 4.290423, 4.290423, 4.290423, 4.290423, 4.290423, 4.290423, 4.290423, 4.290423, 4.290423, 4.290423, 4.290423, 2.566220, 2.566220, 2.566220, 2.566220 -2.566220, 2.566220, 2.566220, 2.566220, 2.566220, 2.566220, 2.566220, 2.566220, 2.566220, 2.566220, 2.566220 +-3.131143,-3.131143,-3.131143,-3.131143,-3.131143,-3.131143,-3.131143,-3.131143,-3.131143,-3.131143,-3.131143,-3.131143, -3.131143, -3.131143, -3.131143, -3.131143 +-4.794052, -4.794052, -1.990554, -1.990554, -3.271063, -4.458749, -4.410423, -5.332619, -4.958707, -5.912915, -5.537464, -3.432839, 3.138187, 3.355642, 6.436001, 4.948266 +5.313770, 3.529112, 3.935037, 2.892548, 3.892376, 3.972425, 2.522242, 3.764312, 2.367235, 2.898058, 4.950845, 2.995014, 4.873219, 4.741216, 7.052452, 4.895176 +3.835964, 4.029514, 6.828901, 5.128931, 5.009794, 6.094697, 5.498593, 5.228469, 4.938307, 3.986212, 3.727279, 3.089186, 0.174023, -0.148967, 0.073133, -0.483088 +-1.170862, -2.777975, -2.848345, -1.669898, -0.849509, -2.027339, 0.685417, 2.602732, 2.596607, -2.384013, -0.197923, 1.663254, 1.448024, 2.772983, 2.436483, 1.793634 +-0.004040, 5.046244, 1.382680, 4.552664, -1.488035, 3.597046, 3.716259, 3.284204, 1.139424, 1.629693, 2.399752, 3.047093, 0.659323, 5.206897, 3.505759, 4.813535 +4.653527, 4.653527, 4.653527, 4.653527, 4.290793, 4.290793, 3.036131, 3.036131, 3.036131, 3.036131, 3.036131 ptzero2v1= --2.231273,-2.231273,-2.231273,-2.231273,-2.231273,-2.231273,-2.231273,-2.231273,-2.231273,-2.231273,-2.231273,-2.231273, -2.231273, -2.231273, -2.231273, -7.833920 --7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, -7.833920, 5.478501 -5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 5.478501, 6.383603 -6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 6.383603, 2.568364 -2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 2.568364, 0.575286 -0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 0.575286, 4.477770 -4.477770, 4.477770, 4.477770, 4.477770, 4.477770, 4.477770, 4.477770, 4.477770, 4.477770, 4.477770, 4.477770 +-3.475367,-3.475367,-3.475367,-3.475367,-3.475367,-3.475367,-3.475367,-3.475367,-3.475367,-3.475367,-3.475367,-3.475367, -3.475367, -3.475367, -3.475367, -3.475367 +-3.475367, -6.937079, -6.937079, -6.068827, -5.318049, -3.408181, -7.096504, -6.908975, -9.095005, -7.438058, -7.128157, -5.464901, -5.670575, -7.959940, -7.667897, 5.277115 +1.682785, 2.905612, 4.566377, 4.080983, 3.674125, 2.036995, 2.069452, 5.270899, 6.255430, 3.523100, 4.179410, 4.791657, 6.990913, 3.522097, 6.199546, 3.695751 +7.385526, 3.737261, 5.340732, 5.130384, 6.082693, 5.397951, 3.271264, 4.069673, 3.756818, 3.297552, 6.007689, 7.060828, 6.359558, 3.994966, 2.953520, 0.784364 +-2.277453, 0.859623, -0.368084, 2.844545, -1.838942, 0.948613, -0.824321, 3.720170, -1.132071, -1.099194, 0.373089, 0.352536, -0.067568, 2.728302, 1.186614, -1.807079 +-1.668097, -1.850245, -0.375060, -0.226770, -1.804492, -1.051886, -2.735905, -2.041166, -1.322100, -2.431936, 6.838081, 4.665475, -0.526157, 1.287444, 1.696332, 4.835224 +4.833488, 0.000000, 5.015151, 5.015151, 5.015151, 5.015151, 5.015151, 4.630098, 4.630098, 4.630098, 4.630098 ptzero2x2= --0.347628,-0.347628,-0.347628,-0.347628,-0.347628,-0.347628,-0.347628,-0.347628,-0.347628,-0.347628,-0.347628,-0.347628, -0.347628, -0.347628, -0.347628, -2.540653 --2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, -2.540653, 0.857828 -0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 0.857828, 3.706618 -3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 3.706618, 6.317752 -6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752, 6.317752 +-2.860920,-2.860920,-3.445178,-0.305067,-1.033394,-2.344076,-2.693760,-0.411056,-0.336718,-2.343614,0.591883,-3.047245, 0.707423, 0.944775, -0.356552, -4.545826 +-5.816087, -4.965954, -4.337587, -3.095298, -5.838464, -3.895526, -7.377379, -2.428849, -4.151228, -2.026940, -3.843000, -4.969869, -5.424516, -1.369130, -4.377671, 0.103415 +0.683313, -0.850587, -2.629270, 1.928791, -1.457900, -2.034520, -2.672297, -1.423076, -1.145891, -3.064438, -0.342142, 1.137427, -1.772880, -1.181454, 2.565358, 1.145143 +6.121450, 4.008564, 1.829739, 5.084472, 0.316058, 0.446527, 0.502349, 3.872817, 3.055495, 0.297908, 0.807751, 0.371670, 2.504849, 4.571533, 2.170173, 4.854466 +5.452067, 6.409005, 4.932423, 3.052652, 3.775438, 5.077072, 4.901865, 4.713777, 4.914045, 1.681477, 4.703691, 2.003542, 2.461272, 5.180043, 2.894068 ptzero2x1= -2.328729,2.328729,2.328729,2.328729,2.328729,2.328729,2.328729,2.328729,2.328729,2.328729,2.328729,2.328729, 2.328729, 2.328729, 2.328729, 2.328729 -0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679, 0.897679 --2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086, -2.234086 --1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876, -1.858876 -7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063, 7.107063 +-1.131129,-1.131129,-0.342186,0.054928,1.632507,0.885558,0.035266,3.714384,1.021192,-0.231933,2.860042,-0.157602, 0.221978, 0.536711, -0.223358, 3.061652 +1.575594, -1.020346, -1.960504, -1.356691, -0.070318, -0.641303, 1.076934, -1.748097, -3.577445, 0.738418, -1.468828, -2.475499, -1.303425, 0.540661, 0.772654, 0.507915 +-4.071503, -4.807137, -2.245141, -2.492602, -2.127977, -5.205244, -6.070477, -5.326869, -4.282650, -2.919285, -2.149673, -5.283138, -3.211887, -5.783029, -4.693876, -6.082650 +-4.861140, -4.031041, -3.189902, -1.212387, -0.983518, -3.770887, -4.208676, -3.851643, -5.541879, -1.199461, -2.283088, -6.186605, -1.339291, -3.281207, -4.396586, -2.872799 +3.998549, 5.454414, 7.864552, 6.425008, 5.414909, 7.194920, 3.401016, 5.121460, 4.318614, 5.006980, 7.350938, 3.373786, 5.049290, 5.252344, 5.833845 ptzero2u2= -10.500000,10.500000,10.500000,10.500000,10.500000,10.500000,10.500000,10.500000,10.500000,10.500000,10.500000,10.500000, 3.517735, 3.517735, 3.517735, 3.517735 -3.517735, 3.517735, 3.517735, 3.517735, 3.517735, 3.517735, 3.517735, 3.517735, 3.517735, 3.517735, 3.517735, 3.517735, 4.367973, 4.367973, 4.367973, 4.367973 -4.367973, 4.367973, 4.367973, 4.367973, 4.367973, 4.367973, 4.367973, 4.367973, 4.367973, 4.367973, 4.367973, 4.367973, -2.664750, -2.664750, -2.664750, -2.664750 --2.664750, -2.664750, -2.664750, -2.664750, -2.664750, -2.664750, -2.664750, -2.664750, -2.664750, -2.664750, -2.664750, -2.664750, -0.754254, -0.754254, -0.754254, -0.754254 --0.754254, -0.754254, -0.754254, -0.754254, -0.754254, -0.754254, -0.754254, -0.754254, -0.754254, -0.754254, -0.754254, -0.754254, -1.920142, -1.920142, -1.920142, -1.920142 --1.920142, -1.920142, -1.920142, -1.920142, -1.920142, -1.920142, -1.920142, -1.920142, -1.920142, -1.920142, -1.920142, -1.920142, 6.438833, 6.438833, 6.438833, 6.438833 -6.438833, 6.438833, 6.438833, 6.438833, 6.438833, 6.438833, 6.438833, 6.438833, 6.438833, 6.438833, 6.438833 +5.122712,5.122712,5.122712,5.122712,5.122712,5.122712,5.122712,5.122712,5.122712,5.122712,5.122712,5.122712, 5.122712, 5.122712, 5.122712, 4.044112 +4.044112, 4.850569, 1.016817, 0.975164, 3.983352, 4.865721, 1.284360, 1.805573, 1.353265, 0.770877, 1.807337, 2.579770, 3.273903, 4.694862, 5.197214, 7.189723 +4.611238, 3.951058, 1.071597, 4.586074, 1.669006, 1.883301, 3.955336, 2.798457, 3.002370, 4.060851, 3.120580, 3.578095, -5.578771, -5.716944, -4.705403, -2.076036 +-2.401661, -0.409305, -2.982651, -4.010824, -3.111839, -5.328460, -4.081858, -5.957324, -6.730613, -3.993957, -6.416606, -3.261509, -4.946407, 0.643078, -3.612093, -2.083659 +-0.395652, -0.419887, -3.843777, -3.164978, -3.086033, -5.222517, -5.818676, -5.281104, -2.284206, -2.456847, -3.270275, -5.352085, -1.233761, -1.122563, -2.891151, -2.794497 +-2.137117, -4.578306, -2.310933, -3.201211, -4.831781, -2.223823, -2.490601, -2.128483, -1.067888, -3.518882, -4.230532, -3.940989, 5.025491, 5.019786, 5.370418, 5.217605 +4.851616, 5.211333, 5.267308, 4.447097, 4.661537, 4.661537, 4.661537, 4.661537, 4.831785, 4.831785, 4.831785 ptzero2u1= -8.107141,8.107141,8.107141,8.107141,8.107141,8.107141,8.107141,8.107141,8.107141,8.107141,8.107141,8.107141, 8.107141, 8.107141, 8.107141, -1.561904 --1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, -1.561904, 4.586367 -4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 4.586367, 6.257599 -6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, 6.257599, -0.645992 --0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -0.645992, -2.527460 --2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -2.527460, -16.011216 --16.011216, -16.011216, -16.011216, -16.011216, -16.011216, -16.011216, -16.011216, -16.011216, -16.011216, -16.011216, -16.011216 +4.163408,4.163408,4.163408,4.163408,4.163408,4.163408,4.163408,4.163408,4.163408,4.163408,4.163408,4.163408, 4.163408, 4.163408, 4.163408, -4.545692 +-4.545692, 3.762992, -0.734140, -3.300423, -5.093839, -1.334398, -2.839265, -1.153367, -0.457191, 0.672418, 1.996000, -0.112267, 0.131665, 1.542080, 2.861895, 4.724193 +2.226589, 2.397079, 0.535692, 2.222879, 3.388967, 5.350307, 1.120432, 4.654635, 5.318461, 4.724172, 3.649646, 4.749040, 3.707131, 4.911848, 3.510100, 6.312785 +5.337176, 5.662769, 4.277806, 3.357406, 2.911427, 4.818395, 4.708373, 4.918739, 3.890620, 4.721191, 6.172457, 4.297524, 4.766724, 3.890425, 6.152707, -3.248946 +-1.053776, -3.164525, -4.302788, -2.984250, -2.372916, -0.281439, -3.509460, 0.906340, -2.112816, -3.792941, -3.424423, 0.856765, -3.558843, 3.020733, -1.617417, -4.152148 +-2.266041, -5.584980, -4.639555, -3.919593, -3.839059, -3.848369, -3.789747, -4.845875, -1.085169, -6.557643, -2.244896, 0.634956, -2.165798, -0.839240, -1.424016, 5.546462 +5.392115, 5.400203, 5.194105, 5.749758, 4.635738, 4.635738, 4.635738, 4.635738, 4.655266, 4.655266, 4.655266 diff --git a/PARAM/SHMS/GEN/p_reftime_cut.param b/PARAM/SHMS/GEN/p_reftime_cut.param index 0b364853f626194c65709b01d76a0d651bcbe591..983701f19922c2d55edb0663913b6c83cc194f96 100644 --- a/PARAM/SHMS/GEN/p_reftime_cut.param +++ b/PARAM/SHMS/GEN/p_reftime_cut.param @@ -17,14 +17,14 @@ ; paero_adcrefcut=-100000. ; pcal_adcrefcut=-100000. -; determined for fall 2019 startup +; determined from fall 2019 - spring 2020 offline analysis ; cut variable = pDCREF(min) -pdc_tdcrefcut=-14500. +pdc_tdcrefcut=-14400. ; cut variable = pT1 -phodo_tdcrefcut=-3600. +phodo_tdcrefcut=-3400. ; cut variable = pFADC_TREF_ROC2 -phodo_adcrefcut=-4500. -pngcer_adcrefcut=-4500. -phgcer_adcrefcut=-4500. -paero_adcrefcut=-4500. -pcal_adcrefcut=-4500. +phodo_adcrefcut=-4200. +pngcer_adcrefcut=-4200. +phgcer_adcrefcut=-4200. +paero_adcrefcut=-4200. +pcal_adcrefcut=-4200. diff --git a/PARAM/SHMS/NGCER/pngcer_cuts.param b/PARAM/SHMS/NGCER/pngcer_cuts.param index acbcdfe99d733486831a4f6b0769e1d4d9d4da2d..69b02ea8c4888b5000e586ac02fb9949631a0947 100644 --- a/PARAM/SHMS/NGCER/pngcer_cuts.param +++ b/PARAM/SHMS/NGCER/pngcer_cuts.param @@ -20,7 +20,12 @@ pngcer_npe_thresh = 0.5 ; ADC time window cut values used to select "good" ADC events pngcer_adc_tdc_offset = 200.0 -; fall 2019 startup +; fall 2019 - spring 2020 analysis A1n, d2n ; cut variable is P.ngcer.goodAdcTdcDiffTime pngcer_adcTimeWindowMin = -20.0, -20.0, -20.0, -20.0 -pngcer_adcTimeWindowMax = 80.0, 80.0, 80.0, 80.0 \ No newline at end of file +pngcer_adcTimeWindowMax = 80.0, 80.0, 80.0, 80.0 + +; No cuts +; cut variable is P.ngcer.goodAdcTdcDiffTime +;pngcer_adcTimeWindowMin = -1000.0, -1000.0, -1000.0, -1000.0 +;pngcer_adcTimeWindowMax = 1000.0, 1000.0, 1000.0, 1000.0 \ No newline at end of file diff --git a/PARAM/TRIG/thms.param b/PARAM/TRIG/thms.param index 4a93bc5ecec2a5b2de46d6dff6a368431cc2b43a..43be40b995b18b1059423758fe3755fb4f0fcf88 100644 --- a/PARAM/TRIG/thms.param +++ b/PARAM/TRIG/thms.param @@ -10,11 +10,11 @@ t_hms_tdcchanperns = 0.09766 helicity_freq = 120+.7*120/(70*1000) ; cut variable is hT1 -; determined for fall 2019 startup -t_hms_trig_tdcrefcut = -1200. +; determined from fall 2019 - spring 2020 analysis +t_hms_trig_tdcrefcut = -1400. ; cut variable is hFADC_TREF_ROC1 -; determined for fall 2019 startup -t_hms_trig_adcrefcut = -3000. +; determined from fall 2019 - spring 2020 analysis +t_hms_trig_adcrefcut = -3400. ; bar num: 1 2 3 4 5 6 7 8 9 10 11 12 13 t_hms_adcNames = "hASUM hBSUM hCSUM hDSUM hPSHWR hSHWR hAER hCER hFADC_TREF_ROC1 pHEL_QRT pHEL_NEG pHEL_POS pHEL_MPS" @@ -22,16 +22,16 @@ t_hms_adcNames = "hASUM hBSUM hCSUM hDSUM hPSHWR hSHWR hAER hCER hFADC_TREF_ROC1 ; bar num: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 t_hms_tdcNames = "h1X h1Y h2X h2Y h1T h2T hT1 hASUM hBSUM hCSUM hDSUM hPRLO hPRHI hSHWR hEDTM hCER hT2 hDCREF1 hDCREF2 hDCREF3 hDCREF4 hDCREF5 hTRIG1 hTRIG2 hTRIG3 hTRIG4 hTRIG5 hTRIG6 pTRIG1 pTRIG2 pTRIG3 pTRIG4 pTRIG5 pTRIG6 pSTOF pEL_LO_LO pEL_LO pEL_HI pEL_REAL pEL_CLEAN hSTOF hEL_LO_LO hEL_LO hEL_HI hEL_REAL hEL_CLEAN hT3 pPRE40 pPRE100 pPRE150 pPRE200 hPRE40 hPRE100 hPRE150 hPRE200 hRF hHODO_RF" -t_hms_TdcTimeWindowMin = 900, 900, 1000, 1000, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 21200, 21100, 21050, - 21150, 21300, 0, 0, 0, 0, 0, 0, 0, 0, +t_hms_TdcTimeWindowMin = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -t_hms_TdcTimeWindowMax = 1500, 1500, 1600, 1600, 100000, 100000, 100000, 100000, 100000, 100000, - 100000, 100000, 100000, 100000, 100000, 100000, 100000, 21600, 21500, 21450, - 21550, 21700, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, +t_hms_TdcTimeWindowMax = 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, + 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, + 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000 diff --git a/PARAM/TRIG/tshms.param b/PARAM/TRIG/tshms.param index 3c72afc11e6cf3118d4201e0f8af4f207aeb20c7..ab244db02a48ca187c024081e35ede6cdd1e8e14 100644 --- a/PARAM/TRIG/tshms.param +++ b/PARAM/TRIG/tshms.param @@ -11,11 +11,11 @@ t_shms_trig_adcrefcut=-5000. helicity_freq = 120.0007547169 ; cut variable is pT2 -; determined for fall 2019 startup -t_shms_trig_tdcrefcut = -3600. +; determined from fall 2019 - spring 2020 analysis +t_shms_trig_tdcrefcut = -3400. ; cut variable is pFADC_TREF_ROC2 -; determined for fall 2019 startup -t_shms_trig_adcrefcut = -4500. +; determined from fall 2019 - spring 2020 analysis +t_shms_trig_adcrefcut = -4200. ; bar num: 1 2 3 4 5 6 7 8 9 10 11 t_shms_adcNames = "pAER pHGCER pNGCER pPSHWR pFADC_TREF_ROC2 pHGCER_MOD pNGCER_MOD pHEL_QRT pHEL_NEG pHEL_POS pHEL_MPS" @@ -23,16 +23,16 @@ t_shms_adcNames = "pAER pHGCER pNGCER pPSHWR pFADC_TREF_ROC2 pHGCER_MOD pNGCER_M ; BAR NUM: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 t_shms_tdcNames = "pT1 pT2 p1X p1Y p2X p2Y p1T p2T pT3 pAER pHGCER pNGCER pDCREF1 pDCREF2 pDCREF3 pDCREF4 pDCREF5 pDCREF6 pDCREF7 pDCREF8 pDCREF9 pDCREF10 pEDTM pPRLO pPRHI pTRIG1 pTRIG2 pTRIG3 pTRIG4 pTRIG5 pTRIG6 hTRIG1 hTRIG2 hTRIG3 hTRIG4 hTRIG5 hTRIG6 pSTOF pEL_LO_LO pEL_LO pEL_HI pEL_REAL pEL_CLEAN hSTOF hEL_LO_LO hEL_LO hEL_HI hEL_REAL hEL_CLEAN pPRE40 pPRE100 pPRE150 pPRE200 hPRE40 hPRE100 hPRE150 hPRE200 pRF" -t_shms_TdcTimeWindowMin = 0, 0, 3000, 3000, 3100, 3100, 0, 0, 0, 0, - 0, 0, 15250, 15275, 15300, 15325, 15375, 15400, 15425, 15400, - 15350, 15450, 0, 0, 0, 0, 0, 0, 0, 0, +t_shms_TdcTimeWindowMin = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -t_shms_TdcTimeWindowMax = 100000, 100000, 4000, 4000, 4100, 4100, 100000, 100000, 100000, 100000, - 100000, 100000, 15650, 15675, 15700, 15725, 15775, 15800, 15825, 15800, - 15750, 15850, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, +t_shms_TdcTimeWindowMax = 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, + 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, + 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000 diff --git a/CALIBRATION/dc_calib/scripts/DC_calib.C b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/DC_calib.C similarity index 80% rename from CALIBRATION/dc_calib/scripts/DC_calib.C rename to POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/DC_calib.C index 981d5f0815f7ed6c1941102ef208460a001b5b4e..32a2d59d11da96573828a6a5a62433dcd8c65229 100644 --- a/CALIBRATION/dc_calib/scripts/DC_calib.C +++ b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/DC_calib.C @@ -22,9 +22,11 @@ DC_calib::DC_calib(string a, TString b, const int c, Long64_t d, TString e, stri main_dir = NULL; plane_dt = NULL; plane_dt_corr = NULL; + plane_wire = NULL; cell_dt = NULL; cell_dt_corr = NULL; fitted_cell_dt = NULL; + fitted_cell_dt_integral = NULL; dt_vs_wire = NULL; dt_vs_wire_corr = NULL; offset = NULL; @@ -41,6 +43,8 @@ DC_calib::DC_calib(string a, TString b, const int c, Long64_t d, TString e, stri tZero_fit = NULL; graph = NULL; gr1_canv = NULL; + wireSegLow = NULL; + wireSegHigh = NULL; if(mode=="card") { @@ -86,6 +90,7 @@ DC_calib::~DC_calib() delete [] dt_vs_wire_corr; dt_vs_wire_corr = NULL; delete [] plane_dt; plane_dt = NULL; delete [] plane_dt_corr; plane_dt_corr = NULL; + delete [] plane_wire; plane_wire = NULL; //free 2d dynamic array cell_dt[][] @@ -98,12 +103,15 @@ DC_calib::~DC_calib() delete [] cell_dt[ip]; delete [] cell_dt_corr[ip]; delete [] fitted_cell_dt[ip]; + delete [] fitted_cell_dt_integral[ip]; delete [] bin_max[ip]; delete [] bin_maxContent[ip]; delete [] time_max[ip]; delete [] twenty_perc_maxContent[ip]; delete [] ref_time[ip]; delete [] offset[ip]; + delete [] wireSegLow[ip]; + delete [] wireSegHigh[ip]; @@ -134,14 +142,17 @@ DC_calib::~DC_calib() delete [] t_zero_err; t_zero_err = NULL; delete [] t_zero_final; t_zero_final = NULL; delete [] cell_dt; cell_dt = NULL; - delete [] cell_dt_corr; cell_dt_corr = NULL; + delete [] cell_dt_corr; cell_dt_corr = NULL; delete [] fitted_cell_dt; fitted_cell_dt = NULL; + delete [] fitted_cell_dt_integral; fitted_cell_dt_integral= NULL; delete [] bin_max; bin_max = NULL; delete [] bin_maxContent; bin_maxContent = NULL; delete [] time_max; time_max = NULL; delete [] twenty_perc_maxContent; twenty_perc_maxContent = NULL; delete [] ref_time; ref_time = NULL; delete [] offset; offset = NULL; + delete [] wireSegLow; wireSegLow = NULL; + delete [] wireSegHigh; wireSegHigh = NULL; if (mode=="card") @@ -465,8 +476,9 @@ void DC_calib::AllocateDynamicArrays() //Allocate 1D dynamic arrays plane_dt = new TH1F[NPLANES]; //create plane drift time histo 1Darray ( get_pdc_time_histo.C ) - plane_dt_corr = new TH1F[NPLANES]; //create plane drift times to store after applying tzero correction - dt_vs_wire = new TH2F[NPLANES]; //create wire drift time and 'drifttime vs wire' arrays + plane_dt_corr = new TH1F[NPLANES]; + plane_wire = new TH1F[NPLANES]; //create plane wirenum + dt_vs_wire = new TH2F[NPLANES]; //create wire drift time and 'drifttime vs wire' arrays dt_vs_wire_corr = new TH2F[NPLANES]; //Allocate 2D dynamic arrays @@ -476,13 +488,16 @@ void DC_calib::AllocateDynamicArrays() t_zero_final = new Double_t*[NPLANES]; cell_dt = new TH1F*[NPLANES]; /*create array to store cell drift times*/ cell_dt_corr = new TH1F*[NPLANES]; - fitted_cell_dt = new TH1F*[NPLANES]; /*create array to store cell drift times*/ + fitted_cell_dt = new TH1F*[NPLANES]; /*create array to store cell drift times*/ + fitted_cell_dt_integral = new TH1F*[NPLANES]; bin_max = new Int_t*[NPLANES]; /*Array to store the bin number corresponding to the drift time distribution peak*/ bin_maxContent = new Int_t*[NPLANES]; /*Array to store the content (# events) corresponding to the bin with maximum content*/ time_max = new Double_t*[NPLANES]; /*Array to store the x-axis(drift time (ns)) corresponding to bin_max*/ twenty_perc_maxContent = new Double_t*[NPLANES]; /*Array to store 20% of maximum bin content (peak)*/ ref_time = new Double_t*[NPLANES]; /*Array to store ref_time(time corresp. to 20% of peak) times for each sense wire*/ offset = new Double_t*[NPLANES]; + wireSegLow = new Int_t*[NPLANES]; + wireSegHigh = new Int_t*[NPLANES]; if (mode=="card") @@ -515,12 +530,15 @@ void DC_calib::AllocateDynamicArrays() cell_dt[ip] = new TH1F[nwires[ip]]; cell_dt_corr[ip] = new TH1F[nwires[ip]]; fitted_cell_dt[ip] = new TH1F[nwires[ip]]; + fitted_cell_dt_integral[ip] = new TH1F[nwires[ip]]; bin_max[ip] = new Int_t[nwires[ip]]; bin_maxContent[ip] = new Int_t[nwires[ip]]; time_max[ip] = new Double_t[nwires[ip]]; twenty_perc_maxContent[ip] = new Double_t[nwires[ip]]; ref_time[ip] = new Double_t[nwires[ip]]; offset[ip] = new Double_t[nwires[ip]]; + wireSegLow[ip] = new Int_t[nwires[ip]]; + wireSegHigh[ip] = new Int_t[nwires[ip]]; if (mode=="card") @@ -575,7 +593,16 @@ void DC_calib::CreateHistoNames() plane_dt_corr[ip].SetBins(NBINS, MINBIN, MAXBIN); plane_dt_corr[ip].SetXTitle("Drift Time (ns)"); plane_dt_corr[ip].SetYTitle("Number of Entries / 1 ns"); + + //Set-Up plane wirenum histo labels + plane_wire_name = plane_names[ip]+"_wirenum"; + plane_wire_title = spec + " DC, Plane "+plane_names[ip]+" Wire Number"; + plane_wire[ip].SetName(plane_wire_name); + plane_wire[ip].SetTitle(plane_wire_title); + plane_wire[ip].SetBins(nwires[ip], 0.5, nwires[ip]+0.5); + plane_wire[ip].SetXTitle("Wire Number"); + plane_wire[ip].SetYTitle("Number of Entries per Wire"); //Set-Up Drift Time vs. Wire Number Histos labels @@ -615,6 +642,16 @@ void DC_calib::CreateHistoNames() fitted_cell_dt[ip][wire].SetXTitle("Drift Time (ns)"); fitted_cell_dt[ip][wire].SetYTitle("Number of Entries / 1 ns"); + fitted_cell_dt_integral_name = Form("Wire_%d_Integral", wire+1); + fitted_cell_dt_integral_title = spec + " DC Plane " +plane_names[ip] + Form(": Wire_%d_Integral", wire+1); + + fitted_cell_dt_integral[ip][wire].SetName(fitted_cell_dt_integral_name); + fitted_cell_dt_integral[ip][wire].SetTitle(fitted_cell_dt_integral_title); + fitted_cell_dt_integral[ip][wire].SetBins(NBINS, MINBIN, MAXBIN); + fitted_cell_dt_integral[ip][wire].SetXTitle("Drift Time Integral (ns)"); + fitted_cell_dt_integral[ip][wire].SetYTitle("Number of Entries / 1 ns"); + + cell_dt_corr[ip][wire].SetName(cell_dt_name); cell_dt_corr[ip][wire].SetTitle(cell_dt_title); cell_dt_corr[ip][wire].SetBins(NBINS, MINBIN, MAXBIN); @@ -1006,6 +1043,7 @@ void DC_calib::EventLoop(string option="") { //Fill uncorrected plane drift times (from: get_pdc_time_histo.C ) plane_dt[ip].Fill(drift_time[ip][j] - offset[ip][wire-1]); + plane_wire[ip].Fill(wire); dt_vs_wire[ip].Fill(wire_num[ip][j], drift_time[ip][j] - offset[ip][wire-1]); cell_dt[ip][wire-1].Fill(drift_time[ip][j] - offset[ip][wire-1]); fitted_cell_dt[ip][wire-1].Fill(drift_time[ip][j] - offset[ip][wire-1]); @@ -1334,6 +1372,316 @@ void DC_calib::FitWireDriftTime() } //End FitWireDriftTime() method +//____________________________________________________________________________________ +void DC_calib::FitWireIntegralDriftTime(string fitFunc) +{ + int firstBinWire=0, lastBinWire=0; + Double_t entries_wire = 0, entris_tmp=0; + int wireSegsLow=0, wireSegsHigh=0; + Double_t *cell_dt_integral_tmp; + Double_t fitRmin=0, fitRmax=0; + int fitRmin_flag=0, fitRmax_flag=0; + int adjLow=0, adjHigh=0; + int cell_entries_tmp=0; + Double_t fitThrsLow=0.05, fitThrsHigh=0.3; + if(fitFunc=="heaviside"){ + fitThrsHigh=0.22; + }else if(fitFunc=="linear"){ + fitThrsHigh=0.3; + } + + + TF1 *tZero_fit = new TF1("tZero_fit", "[0]*x + [1]", MINBIN, MAXBIN); + TF1 *tZero_fit_heaviside = new TF1("tZero_fit_heaviside", "([1]*(x-[0])+[2]*(x-[0])^2+[3]*(x-[0])^3)/(1+e^(-1000*(x-[0])))", MINBIN, MAXBIN); + + //Loop over Planes + for (Int_t ip = 0; ip < NPLANES; ip++){ + firstBinWire = plane_wire[ip].FindFirstBinAbove(MINENTRIES); + lastBinWire = plane_wire[ip].FindLastBinAbove(MINENTRIES); + entries_wire = plane_wire[ip].GetEntries(); + wire_integral[ip] = plane_wire[ip].GetIntegral(); + + + cout<<"firstBinWire "<<firstBinWire<<" lastBinWire "<<lastBinWire<<endl; + + entris_tmp=0; + wireSegsLow=0; + for(int i=0; i<=firstBinWire; i++){ + if(((wire_integral[ip][i]*entries_wire) - entris_tmp)>=MINENTRIES){ + wireSegLow[ip][wireSegsLow]=i; + entris_tmp=(wire_integral[ip][i]*entries_wire); + wireSegsLow++; + + } + } + + entris_tmp=0; + wireSegsHigh=0; + for(int i=nwires[ip]-1; i>=lastBinWire; i--){ + if(((1-wire_integral[ip][i])*entries_wire - entris_tmp)>=MINENTRIES){ + wireSegHigh[ip][wireSegsHigh]=i; + entris_tmp=((1-wire_integral[ip][i])*entries_wire); + wireSegsHigh++; + + } + } + + //Loop over DC sense wires with nentries above a threshold + for (wire = firstBinWire+1; wire < lastBinWire; wire++){ + + if(cell_dt[ip][wire].GetEntries()<MINENTRIES*0.2){ + cout<<"No events for plane: "<< plane_names[ip]<<", "<<"wire: "<< wire+1<<". Fill the Histogram with adjacent non-zero Histograms"<<endl; + + adjLow=1; + while(cell_dt[ip][wire-adjLow].GetEntries()==0){ + adjLow++; + } + cell_dt[ip][wire].Add(&cell_dt[ip][wire-adjLow]); + + adjHigh=1; + while(cell_dt[ip][wire+adjHigh].GetEntries()==0){ + adjHigh++; + } + cell_dt[ip][wire].Add(&cell_dt[ip][wire+adjHigh]); + } + + cell_dt_integral_tmp = cell_dt[ip][wire].GetIntegral(); + cell_entries_tmp = cell_dt[ip][wire].GetEntries(); + + fitRmin=fitRmax=0; + fitRmin_flag=fitRmax_flag=0; + + //Fill the integral of drift time to histgram and calculate the fit range + for(int i=0; i<NBINS; i++){ + cell_dt_integral_tmp[i]=cell_dt_integral_tmp[i]*cell_entries_tmp; + fitted_cell_dt_integral[ip][wire].SetBinContent(i, cell_dt_integral_tmp[i]); + fitted_cell_dt_integral[ip][wire].SetBinError(i, 1); + if(cell_dt_integral_tmp[i]>=fitThrsLow * cell_entries_tmp &&(!fitRmin_flag)){ + fitRmin=fitted_cell_dt_integral[ip][wire].GetBinCenter(i); + fitRmin_flag++; + }else if(cell_dt_integral_tmp[i]>=fitThrsHigh * cell_entries_tmp &&(!fitRmax_flag)){ + fitRmax=fitted_cell_dt_integral[ip][wire].GetBinCenter(i); + fitRmax_flag++; + } + } + + if(fitFunc=="linear"){ + tZero_fit->SetParName(0, "slope"); + tZero_fit->SetParName(1, "y-int"); + tZero_fit->SetParameter(0, 1.0); + tZero_fit->SetParameter(1, 1.0); + + fitted_cell_dt_integral[ip][wire].Fit("tZero_fit","Q","",fitRmin,fitRmax); + gStyle->SetOptFit(1); + + m = tZero_fit->GetParameter(0); + y_int = tZero_fit->GetParameter(1); + m_err = tZero_fit->GetParError(0); + y_int_err = tZero_fit->GetParError(1); + + t_zero[ip][wire] = - y_int/m ; + t_zero_err[ip][wire] = sqrt(y_int_err*y_int_err/(m*m) + y_int*y_int*m_err*m_err/(m*m*m*m) ); + }else if(fitFunc=="heaviside"){ + tZero_fit_heaviside->SetParName(0, "start point"); + tZero_fit_heaviside->SetParName(1, "1st order"); + tZero_fit_heaviside->SetParName(2, "2nd order"); + tZero_fit_heaviside->SetParName(3, "3rd order"); + tZero_fit_heaviside->SetParameter(0, 0); + tZero_fit_heaviside->SetParameter(1, 14); + tZero_fit_heaviside->SetParameter(2, 1.0); + tZero_fit_heaviside->SetParameter(3, 1.0); + + fitted_cell_dt_integral[ip][wire].Fit("tZero_fit_heaviside","Q","",-40,fitRmax); + gStyle->SetOptFit(1); + + m = tZero_fit_heaviside->GetParameter(0); + m_err = tZero_fit_heaviside->GetParError(0); + + t_zero[ip][wire] = m; + t_zero_err[ip][wire] = m_err; + } + + + + } + + for(int j=0; j<wireSegsLow; j++){ + + if(j==0){ + for(wire = 0; wire < wireSegLow[ip][j]; wire++){ + cell_dt[ip][wireSegLow[ip][j]].Add(&cell_dt[ip][wire]); + } + cell_dt[ip][wireSegLow[ip][j]].SetTitle(spec + " DC Plane " +plane_names[ip] + Form(": Uncorr Wire_%d to %d", 1,(int)wireSegLow[ip][j])); + }else if(j>=1){ + for(wire = wireSegLow[ip][j-1]+1; wire < wireSegLow[ip][j]; wire++){ + cell_dt[ip][wireSegLow[ip][j]].Add(&cell_dt[ip][wire]); + } + cell_dt[ip][wireSegLow[ip][j]].SetTitle(spec + " DC Plane " +plane_names[ip] + Form(": Uncorr Wire_%d to %d", (int)wireSegLow[ip][j-1]+1,(int)wireSegLow[ip][j])); + } + + + cell_dt_integral_tmp = cell_dt[ip][wireSegLow[ip][j]].GetIntegral(); + cell_entries_tmp = cell_dt[ip][wireSegLow[ip][j]].GetEntries(); + fitRmin=fitRmax=0; + fitRmin_flag=fitRmax_flag=0; + + + for(int i=0; i<NBINS; i++){ + cell_dt_integral_tmp[i]=cell_dt_integral_tmp[i]*cell_entries_tmp; + fitted_cell_dt_integral[ip][wireSegLow[ip][j]].SetBinContent(i, cell_dt_integral_tmp[i]); + fitted_cell_dt_integral[ip][wire].SetBinError(i, 1); + if(cell_dt_integral_tmp[i]>=fitThrsLow * cell_entries_tmp &&(!fitRmin_flag)){ + fitRmin=fitted_cell_dt_integral[ip][wireSegLow[ip][j]].GetBinCenter(i); + fitRmin_flag++; + }else if(cell_dt_integral_tmp[i]>=fitThrsHigh * cell_entries_tmp &&(!fitRmax_flag)){ + fitRmax=fitted_cell_dt_integral[ip][wireSegLow[ip][j]].GetBinCenter(i); + fitRmax_flag++; + } + + } + + if(fitFunc=="linear"){ + fitted_cell_dt_integral[ip][wireSegLow[ip][j]].Fit("tZero_fit","Q","",fitRmin,fitRmax); + gStyle->SetOptFit(1); + + m = tZero_fit->GetParameter(0); + y_int = tZero_fit->GetParameter(1); + m_err = tZero_fit->GetParError(0); + y_int_err = tZero_fit->GetParError(1); + + if(j==0){ + for(wire = 0; wire <= wireSegLow[ip][j]; wire++){ + t_zero[ip][wire] = - y_int/m ; + t_zero_err[ip][wire] = sqrt(y_int_err*y_int_err/(m*m) + y_int*y_int*m_err*m_err/(m*m*m*m) ); + } + }else if(j>=1){ + for(wire = wireSegLow[ip][j-1]+1; wire <= wireSegLow[ip][j]; wire++){ + t_zero[ip][wire] = - y_int/m ; + t_zero_err[ip][wire] = sqrt(y_int_err*y_int_err/(m*m) + y_int*y_int*m_err*m_err/(m*m*m*m) ); + } + } + }else if(fitFunc=="heaviside"){ + tZero_fit_heaviside->SetParName(0, "start point"); + tZero_fit_heaviside->SetParName(1, "1st order"); + tZero_fit_heaviside->SetParName(2, "2nd order"); + tZero_fit_heaviside->SetParName(3, "3rd order"); + tZero_fit_heaviside->SetParameter(0, -1); + tZero_fit_heaviside->SetParameter(1, 14); + tZero_fit_heaviside->SetParameter(2, 1.0); + tZero_fit_heaviside->SetParameter(3, 1.0); + + fitted_cell_dt_integral[ip][wire].Fit("tZero_fit_heaviside","Q","",-40,fitRmax); + gStyle->SetOptFit(1); + + m = tZero_fit_heaviside->GetParameter(0); + m_err = tZero_fit_heaviside->GetParError(0); + + if(j==0){ + for(wire = 0; wire <= wireSegLow[ip][j]; wire++){ + t_zero[ip][wire] = m ; + t_zero_err[ip][wire] = m_err; + } + }else if(j>=1){ + for(wire = wireSegLow[ip][j-1]+1; wire <= wireSegLow[ip][j]; wire++){ + t_zero[ip][wire] = m ; + t_zero_err[ip][wire] = m_err; + } + } + } + + } + + for(int j=0; j<wireSegsHigh; j++){ + + if(j==0){ + for(wire = nwires[ip]-1; wire > wireSegHigh[ip][j]; wire--){ + cell_dt[ip][wireSegHigh[ip][j]].Add(&cell_dt[ip][wire]); + } + cell_dt[ip][wireSegHigh[ip][j]].SetTitle(spec + " DC Plane " +plane_names[ip] + Form(": Fitted Wire_%d to %d", 1,(int)wireSegHigh[ip][j])); + }else if(j>=1){ + for(wire = wireSegHigh[ip][j-1]-1; wire > wireSegHigh[ip][j]; wire--){ + cell_dt[ip][wireSegHigh[ip][j]].Add(&cell_dt[ip][wire]); + } + cell_dt[ip][wireSegHigh[ip][j]].SetTitle(spec + " DC Plane " +plane_names[ip] + Form(": Fitted Wire_%d to %d", (int)wireSegHigh[ip][j-1]+1,(int)wireSegHigh[ip][j])); + } + + + cell_dt_integral_tmp = cell_dt[ip][wireSegHigh[ip][j]].GetIntegral(); + cell_entries_tmp = cell_dt[ip][wireSegHigh[ip][j]].GetEntries(); + fitRmin=fitRmax=0; + fitRmin_flag=fitRmax_flag=0; + + for(int i=0; i<NBINS; i++){ + cell_dt_integral_tmp[i]=cell_dt_integral_tmp[i]*cell_entries_tmp; + fitted_cell_dt_integral[ip][wireSegHigh[ip][j]].SetBinContent(i, cell_dt_integral_tmp[i]); + fitted_cell_dt_integral[ip][wire].SetBinError(i, 1); + if(cell_dt_integral_tmp[i]>=fitThrsLow * cell_entries_tmp &&(!fitRmin_flag)){ + fitRmin=fitted_cell_dt_integral[ip][wireSegHigh[ip][j]].GetBinCenter(i); + fitRmin_flag++; + }else if(cell_dt_integral_tmp[i]>=fitThrsHigh * cell_entries_tmp &&(!fitRmax_flag)){ + fitRmax=fitted_cell_dt_integral[ip][wireSegHigh[ip][j]].GetBinCenter(i); + fitRmax_flag++; + } + + } + if(fitFunc=="linear"){ + fitted_cell_dt_integral[ip][wireSegHigh[ip][j]].Fit("tZero_fit","Q","",fitRmin,fitRmax); + gStyle->SetOptFit(1); + + m = tZero_fit->GetParameter(0); + y_int = tZero_fit->GetParameter(1); + m_err = tZero_fit->GetParError(0); + y_int_err = tZero_fit->GetParError(1); + + + if(j==0){ + for(wire = nwires[ip]-1; wire >= wireSegHigh[ip][j]; wire--){ + t_zero[ip][wire] = - y_int/m ; + t_zero_err[ip][wire] = sqrt(y_int_err*y_int_err/(m*m) + y_int*y_int*m_err*m_err/(m*m*m*m) ); + } + }else if(j>=1){ + for(wire = wireSegHigh[ip][j-1]+1; wire >= wireSegHigh[ip][j]; wire--){ + t_zero[ip][wire] = - y_int/m ; + t_zero_err[ip][wire] = sqrt(y_int_err*y_int_err/(m*m) + y_int*y_int*m_err*m_err/(m*m*m*m) ); + } + } + }else if(fitFunc=="heaviside"){ + tZero_fit_heaviside->SetParName(0, "start point"); + tZero_fit_heaviside->SetParName(1, "1st order"); + tZero_fit_heaviside->SetParName(2, "2nd order"); + tZero_fit_heaviside->SetParName(3, "3rd order"); + tZero_fit_heaviside->SetParameter(0, 0); + tZero_fit_heaviside->SetParameter(1, 14); + tZero_fit_heaviside->SetParameter(2, 1.0); + tZero_fit_heaviside->SetParameter(3, 1.0); + + fitted_cell_dt_integral[ip][wire].Fit("tZero_fit_heaviside","Q","",-40,fitRmax); + gStyle->SetOptFit(1); + + m = tZero_fit_heaviside->GetParameter(0); + m_err = tZero_fit_heaviside->GetParError(0); + + if(j==0){ + for(wire = nwires[ip]-1; wire >= wireSegHigh[ip][j]; wire--){ + t_zero[ip][wire] = m ; + t_zero_err[ip][wire] = m_err; + } + }else if(j>=1){ + for(wire = wireSegHigh[ip][j-1]+1; wire >= wireSegHigh[ip][j]; wire--){ + t_zero[ip][wire] = m ; + t_zero_err[ip][wire] = m_err; + } + } + } + + + + } + + } + +} //End FitWireDriftTime() method + //_______________________________________________________________________ void DC_calib::GetTwentyPercent_Card() { @@ -1558,15 +1906,19 @@ void DC_calib::FitCardDriftTime() } //end FitCardDriftTime() method //________________________________________________________________ -void DC_calib::Calculate_tZero() +void DC_calib::Calculate_tZero(string fitOption, string fitFunc="heaviside") { //CalcT0Historical(); if (mode=="wire") { - GetTwentyPercent_Peak(); - FitWireDriftTime(); + if(fitOption=="raw"){ + GetTwentyPercent_Peak(); + FitWireDriftTime(); + }else if(fitOption=="integral"){ + FitWireIntegralDriftTime(fitFunc); + } } else if (mode=="card") @@ -1597,15 +1949,18 @@ void DC_calib::WriteTZeroParam() //cout << "Plane: " << ip << " :: wire: " << wire+1 << " :: " << "tzero_final: "<< t_zero_final[ip][wire] << endl; if (wire <= 10) { - out_txtFILE << setprecision(6) << t_zero_final[ip][wire] << fixed << ","; + out_txtFILE << setprecision(6) << (t_zero[ip][wire] + offset[ip][wire]) << fixed << ","; + // cout<< (t_zero[ip][wire] + offset[ip][wire]) << ","; } else if (wire>10 && wire <(nwires[ip]-1)) { - out_txtFILE << setprecision(6) << t_zero_final[ip][wire] << ((wire+1) % 16 ? ", " : "\n") << fixed; + out_txtFILE << setprecision(6) << (t_zero[ip][wire] + offset[ip][wire]) << ((wire+1) % 16 ? ", " : "\n") << fixed; + // cout << (t_zero[ip][wire] + offset[ip][wire]) << ((wire+1) % 16 ? ", " : "\n") ; } else if (wire==nwires[ip]-1) { - out_txtFILE << setprecision(6) << t_zero_final[ip][wire] << fixed << endl; + out_txtFILE << setprecision(6) << (t_zero[ip][wire] + offset[ip][wire]) << fixed << endl; + // cout << (t_zero[ip][wire] + offset[ip][wire]) << endl; } @@ -1618,8 +1973,10 @@ void DC_calib::WriteTZeroParam() } //end WriteTZeroParam() Method //_________________________________________________________________________________ -void DC_calib::WriteLookUpTable() +void DC_calib::WriteLookUpTable(string calibType = "tzero") { + TH1F *plane_dt_tmp; + otxtfile_name = "./"+spec+"_DC_"+mode.c_str()+"Log_"+std::to_string(run_NUM)+"/"+spectre+"dc_calib_"+std::to_string(run_NUM)+".param"; out_txtFILE.open(otxtfile_name); Double_t t_offset_firstbin = 0.0; @@ -1632,13 +1989,17 @@ void DC_calib::WriteLookUpTable() out_txtFILE << "; bin size in ns" << "\n"; out_txtFILE << spectre+"driftbinsz=1" << "\n"; -//Loop over each plane of hms/shms Drift Chambers (DC1 & DC2) - + //Loop over each plane of hms/shms Drift Chambers (DC1 & DC2) for (int ip=0; ip<NPLANES; ip++){ - + if(calibType=="tzero"){ + plane_dt_tmp =(TH1F* ) plane_dt_corr[ip].Clone(); + }else if(calibType=="dist"){ + plane_dt_tmp =(TH1F* ) plane_dt[ip].Clone(); + } + //Get bin corresponding to t0 = 0 ns - bin_t0[ip] = plane_dt_corr[ip].GetXaxis()->FindBin(t_offset_firstbin); + bin_t0[ip] = plane_dt_tmp->GetXaxis()->FindBin(t_offset_firstbin); //Get final bin bin_final[ip] = bin_t0[ip] + TOTAL_BINS; @@ -1649,7 +2010,7 @@ void DC_calib::WriteLookUpTable() for (int bin = bin_t0[ip]; bin <= bin_final[ip]; bin ++ ) { - bin_Content[ip] = plane_dt_corr[ip].GetBinContent(bin); + bin_Content[ip] = plane_dt_tmp->GetBinContent(bin); binContent_TOTAL[ip] = bin_Content[ip] + binContent_TOTAL[ip]; @@ -1668,7 +2029,7 @@ void DC_calib::WriteLookUpTable() for (int bin = bin_t0[ip]; bin <= bin_final[ip]; bin++) { - bin_Content[ip] = plane_dt_corr[ip].GetBinContent(bin); + bin_Content[ip] = plane_dt_tmp->GetBinContent(bin); binSUM[ip] = binSUM[ip] + bin_Content[ip]; @@ -1676,14 +2037,14 @@ void DC_calib::WriteLookUpTable() bin_count = bin_count + 1; if (bin_count <= 16 ) { - out_txtFILE << setprecision(5) << lookup_value[ip] << fixed << ","; + out_txtFILE << setprecision(5) << lookup_value[ip] << fixed << ","; } else if (bin_count >16 && bin_count <= TOTAL_BINS) { - out_txtFILE << setprecision(5) << lookup_value[ip] << ((bin_count+1) % 20 ? "," : "\n") << fixed; + out_txtFILE << setprecision(5) << lookup_value[ip] << ((bin_count+1) % 20 ? "," : "\n") << fixed; } else { - out_txtFILE << setprecision(5) << lookup_value[ip] << fixed << endl; + out_txtFILE << setprecision(5) << lookup_value[ip] << fixed << endl; } } //END LOOP OVER plane drift time BINS @@ -1800,6 +2161,24 @@ void DC_calib::WriteToFile(Int_t debug = 0) } } //END LOOP OVER PLANES + + //-------Write Fitted Integrated Wire Drift Time histos to FILE---------------------------- + + + main_dir = out_file->mkdir("fitted_wire_drift_times_integral"); + + for (int ip=0; ip<NPLANES; ip++){ + + // create planes sub-directories to store fitted wire drift times + (main_dir->mkdir("plane "+plane_names[ip], ""))->cd(); + + for (wire = 0; wire < nwires[ip]; wire++) + { + fitted_cell_dt_integral[ip][wire].Write(); //Write wire driftimes to FILE + + } + + } //END LOOP OVER PLANES //-----Write 'tzero' values to a TEXT FILE-------------------- diff --git a/CALIBRATION/dc_calib/scripts/DC_calib.h b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/DC_calib.h similarity index 92% rename from CALIBRATION/dc_calib/scripts/DC_calib.h rename to POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/DC_calib.h index c73a8ba72d5f0ca55305eec082685038805eae49..0c68017bf6352a3dddeb6188fd9f2a887b4edad2 100644 --- a/CALIBRATION/dc_calib/scripts/DC_calib.h +++ b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/DC_calib.h @@ -6,6 +6,7 @@ #define NBINS 400 #define MINBIN -50.0 #define MAXBIN 350.0 +#define MINENTRIES 150 #define TOTAL_BINS 189 class DC_calib { @@ -36,11 +37,12 @@ class DC_calib void EventLoop(string option); void WriteToFile(Int_t debug); // void CalcT0Historical(); - void Calculate_tZero(); + void Calculate_tZero(string fitOption, string fitFunc); void GetTwentyPercent_Peak(); void FitWireDriftTime(); + void FitWireIntegralDriftTime(string fitFunc); void WriteTZeroParam(); - void WriteLookUpTable(); + void WriteLookUpTable(string calibType); private: @@ -99,6 +101,7 @@ class DC_calib Double_t drift_time[NPLANES][1000]; Double_t wire_num[NPLANES][1000]; + Double_t *wire_integral[NPLANES]; Int_t nwires[NPLANES]; @@ -106,6 +109,8 @@ class DC_calib //Declare variables to plot and save histo (dt = drift time) TString plane_dt_name; TString plane_dt_title; + TString plane_wire_name; + TString plane_wire_title; TString plane_dt_name_corr; TString plane_dt_title_corr; @@ -115,7 +120,9 @@ class DC_calib TString cell_dt_title; TString fitted_cell_dt_name; - TString fitted_cell_dt_title; + TString fitted_cell_dt_title; + TString fitted_cell_dt_integral_name; + TString fitted_cell_dt_integral_title; TString dt_vs_wire_name; TString dt_vs_wire_title; @@ -129,9 +136,11 @@ class DC_calib //Declare variables to store histograms TH1F *plane_dt; TH1F *plane_dt_corr; + TH1F *plane_wire; TH1F **cell_dt; TH1F **cell_dt_corr; TH1F **fitted_cell_dt; + TH1F **fitted_cell_dt_integral; TH2F *dt_vs_wire; TH2F *dt_vs_wire_corr; @@ -153,7 +162,9 @@ class DC_calib Double_t **time_max; Double_t **twenty_perc_maxContent; Double_t **ref_time; - + Int_t **wireSegLow; + Int_t **wireSegHigh; + //variables to be used in loop over bins for wire drift time Int_t content_bin; //stores content for each bin Int_t counts; //a counter used to count the number of bins that have >20% max bin content for a plane diff --git a/CALIBRATION/dc_calib/scripts/README.md b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/README.md similarity index 69% rename from CALIBRATION/dc_calib/scripts/README.md rename to POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/README.md index 676b61462ea4b104629b121b729f2fc288dab3ec..6494129a4bb797eb668444394ed1106e99558772 100644 --- a/CALIBRATION/dc_calib/scripts/README.md +++ b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/README.md @@ -6,7 +6,8 @@ This directory contains the code for calibrating the pair of HMS/SHMS drift cham Directory structure ---------------------- -* hallc_replay/CALIBRATION/dc_calib/scripts/main_calib.C : steering C++ code that executes the methods in DC_Calib.C +* hallc_replay/CALIBRATION/dc_calib/scripts/main_calib.C : old steering C++ code that executes the methods in DC_Calib.C +* hallc_replay/CALIBRATION/dc_calib/scripts/main_calib_distonly.C : new steering C++ code that executes the methods in DC_Calib.C, should use this one * hallc_replay/CALIBRATION/dc_calib/scripts/DC_Calib.C : Calibration Code where all the class methods are defined * hallc_replay/CALIBRATION/dc_calib/scripts/DC_Calib.h : Header file containing the variable definitions used in the methods @@ -17,7 +18,8 @@ Running code NOTE: p: SHMS, h: HMS, <spec>: HMS, or SHMS * First set the parameter 'p(h)_using_tzero_per_wire = 0' in the - parameter file located in: hallc_replay/PARAM/<spec>/DC/p(h)dc_cuts.param + parameter file located in: hallc_replay/PARAM/<spec>/DC/p(h)dc_cuts.param, + skip this step if you only calibrate drift distance with the old tzero * Replay the data to produce the uncalibrated root file to be used as input in the calibration NOTE: Make sure to include the necessary leafs if you want to make any pid cuts. @@ -33,28 +35,7 @@ NOTE: p: SHMS, h: HMS, <spec>: HMS, or SHMS * From the hallc_replay execute: ./hcana SCRIPTS/<spec>/PRODUCTION/<replay_script.C> * From the directory where this README file is: - -Open and modify 'DC_Calib obj()' line. This line has the following format: - - ------------------------------------------------------------------------------------------------- - DC_calib obj("<spec_flag>", "/path/to/ROOTfile/", run_NUM, event_NUM, "<pid_flag>"); - - **The <spec_flag> and <pid_flag> have the possible arguments: - - <spec_flag>: HMS, SHMS - - <pid_flag>: pid_elec, pid_hadron, dc_1hit, pid_kFLASE - - When the <pid_flag> is selected, the calibration script applies the following cuts: - - 1) pid_elec: P.ngcer.npeSum > 1.0 && T.shms.pEL_CLEAN_tdcTime > 0.0 (for HMS: H.cer.npeSum > 1.0 && T.hms.hEL_CLEAN_tdcTime > 0.0 ) - 2) pid_hadron: P.ngcer.npeSum < 1.0 (for HMS: H.cer.npeSum < 1.0 ) - 3) dc_1hit: Ndata.P(H).dc.plane.time == 1 && Ndata.P(H).dc.plane.wirenum == 1, where plane-> 1u1, 1u2, ... - NOTE: The Ndata cut, requires a single hit in each chamber per plane per event - 4) pid_kFALSE: No cuts are applied. - ------------------------------------------------------------------------------------------------- - - -* Once the arguments are specified, execute: root -l main_calib.C + execute hcana -b 'main_calib_distonly.C("(S)HMS",run,entries,"wire or card","tzero or dist"(calib. tzero and dist., or calib. dist. only),"raw or integral"(fit the raw drift time or the integrated drift time),"linear or heaviside"(fit tzero with linear or step function(only for "integral")))' When the calibration is completed, a directory will be created under the name: <spec_flag>_DC_Log_runNUM/ @@ -78,8 +59,8 @@ When the calibration is completed, a directory will be created under the name: < -> /hallc_replay/PARAM/<spec>/DC/hdc_tzero_per_wire.param * Set the parameter 'p(h)_using_tzero_per_wire = 1' in the - parameter file located in: hallc_replay/PARAM/<spec>/DC/p(h)dc_cuts.param - + parameter file located in: hallc_replay/PARAM/<spec>/DC/p(h)dc_cuts.param, + skip this step if you only calibrate drift distance with the old tzero * From the hallc_replay execute: ./hcana SCRIPTS/SHMS/PRODUCTION/<replay_script.C> once again. diff --git a/CALIBRATION/dc_calib/scripts/alignDC.py b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/alignDC.py similarity index 100% rename from CALIBRATION/dc_calib/scripts/alignDC.py rename to POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/alignDC.py diff --git a/CALIBRATION/dc_calib/scripts/main_calib.C b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/main_calib.C similarity index 100% rename from CALIBRATION/dc_calib/scripts/main_calib.C rename to POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/main_calib.C diff --git a/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/main_calib_distonly.C b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/main_calib_distonly.C new file mode 100644 index 0000000000000000000000000000000000000000..a2afecae1a65c6227c8fc47f984119ae05996166 --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/main_calib_distonly.C @@ -0,0 +1,57 @@ +//Main Calibration Code +#include "DC_calib.h" +#include "TString.h" +#include "DC_calib.C" +#include <iostream> +#include <ctime> +using namespace std; + +int main_calib_distonly(TString type = "SHMS",int run = 9644, int entries = -1, const string mode = "wire"/*"wire or card"*/, TString calibType = "tzero"/*tzero or dist*/, const string fitOption = "integral"/*raw or integral*/, const string fitFunc = "heaviside"/*linear or heaviside*/) +{ + + //prevent root from displaying graphs while executing + gROOT->SetBatch(1); + if(calibType.CompareTo("tzero")&&calibType.CompareTo("dist")){ + cout << "Incalid calibration type selected, choose between 'tzero' or 'dist'.\n"<<endl; + return 1; + }; + + //measure execution time + clock_t cl; + cl = clock(); + type.ToLower(); + TString rootFile(Form("../../../ROOTfiles/%s_replay_production_all_%05i_%i_unCal.root", type.Data(),run, entries)); + + + cout << rootFile.Data() << endl; + //pid_elec, pid_kFALSE (no PID cuts) + // | + // v + type.ToUpper(); + DC_calib obj(type.Data(), rootFile.Data(), run, -1, "pid_elec", mode); + //use the following line if you want to specify the root file path + //DC_calib obj("SHMS", "../../../ROOTfiles/shms_replay_production_all_09644_-1_wireCal.root", 9644, -1, "pid_elec", "wire"); + + obj.setup_Directory(); + obj.SetPlaneNames(); + obj.GetDCLeafs(); + obj.AllocateDynamicArrays(); + obj.SetTdcOffset(); + obj.CreateHistoNames(); + obj.EventLoop("FillUncorrectedTimes"); // if you only want to do drift distance calibration, use option "FillUncorrectedTimes" only + if(!calibType.CompareTo("tzero")){ + obj.Calculate_tZero(fitOption, fitFunc); + obj.EventLoop("ApplyT0Correction"); + obj.WriteTZeroParam(); + obj.WriteLookUpTable(calibType.Data()); // if you only want to do drift distance calibration, use option "dist", for tzero calib use "tzero" + obj.WriteToFile(1); //set argument to (1) for debugging + }else if(!calibType.CompareTo("dist")){ + obj.WriteLookUpTable(calibType.Data()); // if you only want to do drift distance calibration, use option "dist", for tzero calib use "tzero" + } + + //stop clock + cl = clock() - cl; + cout << "execution time: " << cl/(double)CLOCKS_PER_SEC << " sec" << endl; + + return 0; +} diff --git a/CALIBRATION/dc_calib/scripts/makeAlignmentPlots.C b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/makeAlignmentPlots.C similarity index 100% rename from CALIBRATION/dc_calib/scripts/makeAlignmentPlots.C rename to POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/makeAlignmentPlots.C diff --git a/CALIBRATION/dc_calib/scripts/replay_aligndc_shms.C b/POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/replay_aligndc_shms.C similarity index 100% rename from CALIBRATION/dc_calib/scripts/replay_aligndc_shms.C rename to POLHE3_SCRIPTS/Calibration_files-Junhao_DC/scripts/replay_aligndc_shms.C diff --git a/POLHE3_SCRIPTS/Calibration_files-Melanie-Calorimeter-BCM/MR_calib_params.docx b/POLHE3_SCRIPTS/Calibration_files-Melanie-Calorimeter-BCM/MR_calib_params.docx new file mode 100644 index 0000000000000000000000000000000000000000..11b6f82c16ccbfbe988902240166911a5036696e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Melanie-Calorimeter-BCM/MR_calib_params.docx differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Melanie-Calorimeter-BCM/MR_calib_params.txt b/POLHE3_SCRIPTS/Calibration_files-Melanie-Calorimeter-BCM/MR_calib_params.txt new file mode 100644 index 0000000000000000000000000000000000000000..6073e086ca0834e0c1f421a7d3f260f3cf3cc06f --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Melanie-Calorimeter-BCM/MR_calib_params.txt @@ -0,0 +1,39 @@ +Starting point was a clone of the master branch of https://eicweb.phy.anl.gov/jlab/hallc/exp/polhe3/hallc_replay.git +to: /group/c-polhe3/Users/mrehfuss/hallc_replay/ in March + +UPDATED PARAM FILES: + +Done first in April/May: +Reference Time Cuts + • located in /group/c-polhe3/Users/mrehfuss/hallc_replay/PARAM/(S)HMS/GEN/(p)(h)_reftime_cut.param + • SHMS runs used for studies: 10614, 10602, 10744, 10698, 10337, 10433, 9779, 9780, 10793, 10794 + • HMS runs used for studies: 2608, 2636, 3408, 3419, 2673, 2716, 3199, 3615, 3616 + +*HMS/SHMS Calorimeter Detector Time Window studies done next, and all params were unchanged** + +Done third in June/July: +CALORIMETERS + • “(S)HMS_final_cal_param” + ◦ contains new gain constants for each spectrometer for A1n: + ▪ 2.129, 2.6, & 3.4 GeV for SHMS + ▪ 2.9 & 3.5 GeV for HMS + ◦ HMS: calibration script CALIBRATION/hms_cal_calib/hcal_calib.cpp+ was used for runs chained together for each momentum setting + ▪ 2.9 GeV: 3196 - 3205 + ▪ 3.5 GeV: 3408, 3411, 3418-3425 + ◦ SHMS: calibration script CALIBRATION/shms_cal_calib/pcal_calib.cpp+ was used for runs chained together for each momentum setting: + ▪ 2.129 GeV: 9833, 9839, 9840-9842 + ▪ 2.6 GeV: 10337-10341, 10433 - 10437 + ▪ 3.4 GeV: 10602, 10614, 10698, 10678, 10641-10646 + ◦ located in /group/c-polhe3/Users/mrehfuss/hallc_replay/PARAM/HMS/CAL/hcal_calib.param + + + +**git pull done periodically throughout** + + + +Done fourth in September/October +BCMs + • “gscalers.param” + ◦ located in /group/c-polhe3/Users/mrehfuss/hallc_replay/PARAM/GEN/gscalers.param + ◦ Used Deb Biswas’ BCM calibration script for the procedure: https://github.com/JeffersonLab/hallc_bcm_calib diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_02608_cer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_02608_cer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2a8b2ec25f9ad9e6698d6fd13589a5e54470897f Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_02608_cer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_02608_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_02608_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e51d8c6637f7422adcf2e7a8ca96c74b32f315e9 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_02608_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03408_cer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03408_cer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..885c415561aebedb201592c3a8edf973f156a88b Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03408_cer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03408_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03408_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..96ed8b297147347a2ccf30c9a634e2a524bc8fe8 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03408_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03616_cer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03616_cer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2dc398cfaf8e9082ce5d781f1ff5d08b15f3ab80 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03616_cer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03616_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03616_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7dd9c3855e8115c3726565ef545ebbb579d30276 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03616_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03994_cer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03994_cer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7b47947272ac3812cbb7c1c2c9fd1ea52ea62cd6 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03994_cer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03994_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03994_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b3cf5b26170334fa1b4c60f9945e76ef26eec899 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_03994_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04148_cer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04148_cer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9da4a64e884caf2e64aefa3d48b676ae95a8f6d1 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04148_cer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04148_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04148_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8d64699f9376221e4adb24626a84d968b4931df7 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04148_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04192_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04192_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0354019caf21675421518b07fb92ffe5bc7ad303 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04192_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04195_cer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04195_cer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e7866e72a0b9491c9f62291a5acbc028d676e74d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04195_cer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04195_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04195_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..70a6f7a0b0daa952a2eec55a286ccfa77422b97c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04195_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04196_cer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04196_cer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dbff5db3e089911462481e91c802949247cd9d9e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04196_cer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04196_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04196_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..23233e2dc6966f275c6ce179650aab3b11580021 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04196_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04306_cer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04306_cer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..86255f558cdeee17e3a220d3f91f67878b714383 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04306_cer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04306_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04306_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..84457685760f442d316086b9245642ea2d2538ee Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04306_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04331_cer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04331_cer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7ae83de066ea2a8fbca71eb0121454098086f509 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04331_cer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04331_cer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04331_cer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a4d249fbf1297ffa0421465c906578b1c722ed43 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/HMS_plots/HMS_04331_cer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09740_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09740_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a40a256281feffcfe449156ef4fb366f94f7aaac Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09740_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09740_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09740_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6ef845e317d9edb1f2d7ecf5eb43c6bc2bfe8713 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09740_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09779_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09779_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..62bc5b304fa5f16d16a1b77e3af735c5f0b612fe Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09779_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09779_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09779_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cdc40498a48adb15192d23960c84eadb994c6ddc Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09779_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09780_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09780_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..839aa841441591ae8200746b6e436b59980e3551 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09780_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09780_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09780_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..19471f24f2e25e90c61982a5b871df1613a6c357 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09780_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09781_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09781_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7294e81e4a182f51249f6f8f2d4d761823cb569a Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09781_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09781_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09781_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b01421e216276c7daf871e443c55d3270e57b084 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_09781_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10337_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10337_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4e228a55591ade9294e93b1f46b8b40f9de9ab8b Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10337_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10337_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10337_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f28a3531bfc33309c599f7ab5d4a2b73e01926c7 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10337_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10433_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10433_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f2c884e0ed76701440eed1376584c08420c86099 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10433_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10433_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10433_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5c1a06e2111f0f04f3acdc2311470a5b7bbe7eee Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10433_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10602_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10602_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f5cdec6dc9b3b9fe495bf0a67166851404754366 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10602_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10602_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10602_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a9dbe827f9fa49889bb0d9b574b6c0811e5d5ef2 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10602_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10614_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10614_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eee7884e50a70ff10d1249b86c7d4d97ace78733 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10614_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10614_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10614_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2e7cae0436bb29453d6ab02aa24dbecca4777196 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10614_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10698_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10698_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..75a97a14804359242d5d08191e76deaaeaad1ad7 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10698_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10698_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10698_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bd628ad977d39d3278e058b9d72c7ac164944a1d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10698_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10744_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10744_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e8eb62819302ce8b34d9b3babb91f81e78b71e53 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10744_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10744_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10744_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..badfa73d70af030fdccaa4013f8e7a710e6bb4c3 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10744_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10793_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10793_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..314df8abd92e8946e5e906090d9f935d53bb3ff5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10793_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10793_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10793_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6baef35efc926d2161c44080e313fac73b0930b6 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10793_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10794_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10794_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a0cb756cd9235f6847ae97676b7dc4a99e308bdd Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10794_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10794_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10794_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..87cefab083c53fdd9fc15a00d63aadf16ae245de Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_10794_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11210_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11210_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ba7482fe308dd63e1778314e53a560ca48526495 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11210_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11210_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11210_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06bb4475e1e7638158e466d9cd2a247964a90e78 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11210_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11217_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11217_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9f89b2bbae025056254738370312dd60cd62fd55 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11217_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11217_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11217_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9e57b6dc7ae543d9e1aeb0468c3355a209d3db9d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11217_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11358_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11358_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..372243a7efd11e00551d25010f6724faeb3e619c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11358_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11358_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11358_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b2d540bc52073a6917725a5c2ba47bf35a0cce1e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11358_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11369_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11369_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cece88f95ef893ace290e041152e0551b9ff7bf5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11369_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11369_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11369_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..796f083511ac244f1b38f9f10ad27a41f24f2c6e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11369_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11395_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11395_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1e25b8265d756d157b254007b2e9ab255b0e6d7c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11395_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11395_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11395_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ece459d84a5c19f40d1750f6f88a269a117197b9 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11395_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11396_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11396_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ad4f0d5fda67749c41ec2a1b20d9126d69e7cc7c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11396_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11396_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11396_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5c7b778c946048b387da7f7d90e665b2d0d7705b Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11396_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11398_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11398_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..76c8c3da191148b2bc018dfeccfa795a415f1f7f Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11398_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11398_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11398_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..246a9ace6c17a582b901d62e892763117d0f6db5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11398_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11498_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11498_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..03b898adfcfd1e3d47eab7450c997cb195c3cf9a Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11498_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11498_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11498_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7c2f784f188c84331161f5da57063985e86cea37 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11498_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11538_ngcer_Multiplicity.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11538_ngcer_Multiplicity.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8b44f4eca4383181ae007e3e3a3b370ebd2ebf17 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11538_ngcer_Multiplicity.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11538_ngcer_TimeWindowCut.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11538_ngcer_TimeWindowCut.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3c2bd1041d9718f92f03c1f0ceec8ea15b1cb817 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_11538_ngcer_TimeWindowCut.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/cer_hms.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/cer_hms.C new file mode 100644 index 0000000000000000000000000000000000000000..b6ab77a76a1a05d36726a63f16266b53d40dd066 --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/cer_hms.C @@ -0,0 +1,294 @@ +#include <iostream> +#include <fstream> +#include <string> +#include <TFile.h> +#include <TDirectory.h> +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TH2.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" + +using namespace std; + +static const double degtorad = 3.141592653589793/180.; + + +void cer_hms(){ + + +//Declare root file + +char run_num[20]; +cout<<"Enter HMS Run number:"<<endl; +cin>> run_num; + +TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/hms_replay_production_all_%s_200000.root",run_num); +TFile *fileIN = new TFile(filename); + + + +//Declare Tree + +TTree *T = (TTree*)fileIN->Get("T"); + +// Acquire the number of entries + +Long64_t nentries; +nentries = T->GetEntries(); + +// Acquire the branches + +Int_t npmt=2; + +Double_t cer_goodAdcTdcDiffTime[30],cer_counter[30],cer_mult[30],cer_adcPulseTime[30],cer_goodAdcPulseAmp[30],cer_goodAdcPulseInt[30]; +Double_t starttime; +Int_t ndata_cer_pulseint; + +T->SetBranchAddress("H.hod.starttime", &starttime); +T->SetBranchAddress("H.cer.adcPulseTime", &cer_adcPulseTime); + +T->SetBranchAddress("Ndata.H.cer.adcPulseInt", &ndata_cer_pulseint); +T->SetBranchAddress("H.cer.adcCounter", &cer_counter); + +T->SetBranchAddress("H.cer.goodAdcMult", &cer_mult); + +T->SetBranchAddress("H.cer.goodAdcTdcDiffTime",&cer_goodAdcTdcDiffTime); + +T->SetBranchAddress("H.cer.goodAdcPulseAmp", &cer_goodAdcPulseAmp); +T->SetBranchAddress("H.cer.goodAdcPulseInt", &cer_goodAdcPulseInt); + +// Declare histos + +TH1F *histo_good[npmt]; +TH1F *histo_goodMult[npmt]; +TH1F *histoRaw[npmt]; +TH1F *histoRawMult[npmt]; +TH1F *multiplicity[npmt]; +TH2F *goodDiffTime_goodPulseInt[npmt]; +TH2F *goodDiffTime_goodPulseAmp[npmt]; + +for(Int_t i=1; i<npmt+1; i++){ + TString name=Form("hCer%d",i); + TString nameMult=Form("hCerMult%d",i); + TString nameRaw=Form("hCerRaw%d",i); + TString nameRawMult=Form("hCerRawMult%d",i); + TString title=Form("HMS Cherenkov AdcTdcTimeDiff: PMT %d",i); + TString mtitle=Form("HMS CER Multiplicity Plot: PMT %d",i); + multiplicity[i]=new TH1F("multiplicity",mtitle,200,0,6); + histo_good[i]=new TH1F(name,title,400,-100,300); + histo_goodMult[i]=new TH1F(nameMult,title,400,-100,300); + histoRaw[i]=new TH1F(nameRaw,title,400,-100,300); + histoRawMult[i]=new TH1F(nameRawMult,title,400,-100,300); + /* histo_good[i]=new TH1F(name,title,250,50,200); + histo_goodMult[i]=new TH1F(nameMult,title,250,50,200); + histoRaw[i]=new TH1F(nameRaw,title,250,50,200); + histoRawMult[i]=new TH1F(nameRawMult,title,250,50,200);*/ + + TString title2=Form("goodPulseInt vs goodDiffTime: PMT %d",i); + TString title3=Form("goodPulseAmp vs goodDiffTime: PMT %d",i); + goodDiffTime_goodPulseInt[i]=new TH2F("goodDiffTime_goodPulseInt",title2,400,-100,250,400,0,200); + goodDiffTime_goodPulseAmp[i]=new TH2F("goodDiffTime_goodPulseAmp",title3,400,-100,250,400,0,300); + +} + + +// Loop of entries in tree + + +for(Long64_t ievent=0; ievent < nentries; ievent++){ //loop over no. of entries + T->GetEntry(ievent); + +for (Int_t counter=1; counter< npmt+1; counter++){ + multiplicity[counter]->Fill(cer_mult[counter-1]); //Fill multiplicity histogram + histo_good[counter]->Fill(cer_goodAdcTdcDiffTime[counter-1]); //Fill histogram with events that pass the detector time window cuts: good variable + if(cer_mult[counter-1]==1){ + histo_goodMult[counter]->Fill(cer_goodAdcTdcDiffTime[counter-1]); //Fill histogram with events that pass the detector time window cuts: good variable + goodDiffTime_goodPulseInt[counter]->Fill(cer_goodAdcTdcDiffTime[counter-1],cer_goodAdcPulseInt[counter-1]); + goodDiffTime_goodPulseAmp[counter]->Fill(cer_goodAdcTdcDiffTime[counter-1],cer_goodAdcPulseAmp[counter-1]); + } +} + + + + for (Int_t nhit=0; nhit < ndata_cer_pulseint; nhit++){ //loop over hits + for(Int_t counter=1; counter<npmt+1; counter++){ //loop over pmts/counter + if(cer_counter[nhit]==counter){ //associate right it to right pmt + histoRaw[counter]->Fill(starttime-cer_adcPulseTime[nhit]); //Fill time difference histogram + if(cer_mult[counter-1]==1){ + histoRawMult[counter]->Fill(starttime-cer_adcPulseTime[nhit]); //Fill time differnece histogram with multiplicity=1 + } + } + } + } +} + + + +//Find largest histogram peak to set Y scale + Float_t adcmax=0; + Float_t temp=0; + for(Int_t i=0;i<npmt;i++) + { + temp=histoRaw[i]->GetMaximum(); + if (temp>adcmax)adcmax=temp; + } + cout << "Max was: "<<adcmax<<endl; + + //Create Reference Cut Line + + TLine *lower_old=new TLine(60,0,60,adcmax); + TLine *upper_old=new TLine(200,0,200,adcmax); + + TLine *upper_new1=new TLine(160,0,160,adcmax); + TLine *lower_new1=new TLine(100,0,100,adcmax); + + TLine *upper_new2=new TLine(160,0,160,adcmax); + TLine *lower_new2=new TLine(120,0,120,adcmax); + + + lower_old->SetLineStyle(2); + lower_old->SetLineColor(kBlack); + upper_old->SetLineStyle(2); + upper_old->SetLineColor(kBlack); + + lower_new1->SetLineStyle(2); + lower_new1->SetLineColor(kRed); + lower_new1->SetLineWidth(2); + upper_new1->SetLineStyle(2); + upper_new1->SetLineColor(kRed); + upper_new1->SetLineWidth(2); + + lower_new2->SetLineStyle(2); + lower_new2->SetLineColor(kRed); + lower_new2->SetLineWidth(2); + upper_new2->SetLineStyle(2); + upper_new2->SetLineColor(kRed); + upper_new2->SetLineWidth(2); + + + +//Draw histograms + +TCanvas *c1=new TCanvas("c1","c1",1000,700); + c1->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c1->cd(counter); + gPad->SetLogy(); + multiplicity[counter]->Draw(); + } + c1->Update(); + c1->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/Detector_plots/cherenkov/HMS_plots/HMS_%s_cer_Multiplicity.pdf",run_num)); + + +TCanvas *c2=new TCanvas("c2","c2",1000,700); + c2->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c2->cd(counter); + gPad->SetLogy(); + + //histo_good[counter]->GetYaxis()->SetRangeUser(0.2,170000); + histo_good[counter]->SetLineColor(9); + histo_goodMult[counter]->SetLineColor(6); + histo_goodMult[counter]->SetLineWidth(2); + + histoRaw[counter]->SetLineColor(1); + histoRawMult[counter]->SetLineColor(2); + histoRawMult[counter]->SetLineWidth(2); + + histoRaw[counter]->Draw(); + histoRawMult[counter]->Draw("SAME"); + + histo_good[counter]->Draw("SAME"); + histo_goodMult[counter]->Draw("same"); + + // Draw cut lines + lower_old->Draw("same"); + upper_old->Draw("same"); + + /* if(counter==2){ + lower_new2->Draw("same"); + upper_new2->Draw("same"); + } + else{ + lower_new1->Draw("same"); + upper_new1->Draw("same"); + }*/ + + + TLegend *leg = new TLegend(.1,.6,.5,.9); + + leg->AddEntry(histoRaw[1],"cer_AdcPulseTime - hodo_starttime (no cut)","l"); + leg->AddEntry(histoRawMult[1],"cer_AdcPulseTime - hodo_starttime (mult==1)","l"); + leg->AddEntry(histo_good[1],"cer_GoodAdcTdcTimeDiff (no cut)","l"); + leg->AddEntry(histo_goodMult[1],"cer_GoodAdcTdcTimeDiff (mult==1)","l"); + + leg->Draw(); + } + + c2->Update(); + c2->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/Detector_plots/cherenkov/HMS_plots/HMS_%s_cer_TimeWindowCut.pdf",run_num)); + + + + + +TCanvas *c3=new TCanvas("c3","c3",1000,700); + c3->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c3->cd(counter); + gPad->SetLogz(); + goodDiffTime_goodPulseInt[counter]->Draw("colz"); + } + c3->Update(); + c3->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/Detector_plots/cherenkov/HMS_plots/HMS_%s_cer_goodDiffTime_vs_goodPulseInt.pdf",run_num)); + + +TCanvas *c4=new TCanvas("c4","c4",1000,700); + c4->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c4->cd(counter); + gPad->SetLogz(); + goodDiffTime_goodPulseAmp[counter]->Draw("colz"); + } + c4->Update(); + c4->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/Detector_plots/cherenkov/HMS_plots/HMS_%s_cer_goodDiffTime_vs_goodPulseAmp.pdf",run_num)); +return 0; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/hgcer_shms.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/hgcer_shms.C new file mode 100644 index 0000000000000000000000000000000000000000..7dd6b46ba5d1c94e734334bb07f3d40bf37c56be --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/hgcer_shms.C @@ -0,0 +1,215 @@ +#include <iostream> +#include <fstream> +#include <string> +#include <TFile.h> +#include <TDirectory.h> +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" + +using namespace std; + +static const double degtorad = 3.141592653589793/180.; + + +void hgcer_shms(){ + + +//Declare root file + +TFile *fileIN = new TFile("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/shms_replay_production_all_10793_200000.root"); + +//Declare Tree + +TTree *T = (TTree*)fileIN->Get("T"); + +// Acquire the number of entries + +Long64_t nentries; +nentries = T->GetEntries(); + +// Acquire the branches + +Int_t npmt=4; + +Double_t hgcer_goodAdcTdcDiffTime[npmt],hgcer_counter[npmt],hgcer_mult[npmt],hgcer_adcPulseTime[npmt]; +Double_t starttime; + + +T->SetBranchAddress("P.hgcer.goodAdcTdcDiffTime",&hgcer_goodAdcTdcDiffTime); +T->SetBranchAddress("P.hgcer.goodAdcMult", &hgcer_mult); +T->SetBranchAddress("P.hgcer.adcCounter", &hgcer_counter); +T->SetBranchAddress("P.hod.starttime", &starttime); +T->SetBranchAddress("P.hgcer.adcPulseTime", &hgcer_adcPulseTime); + + + + +// Declare histos + +TH1F *hg_histo[npmt]; +TH1F *hg_histoMult[npmt]; +TH1F *hg_histoRaw[npmt]; +TH1F *hg_histoMultRaw[npmt]; +TH1F *hg_multiplicity[npmt]; + +for(Int_t i=0; i<npmt; i++){ + TString name=Form("hHCer%d",i+1); + TString nameMult=Form("hHCerMult%d",i+1); + TString nameRaw=Form("hHCerRaw%d",i+1); + TString nameMultRaw=Form("hHCerMultRaw%d",i+1); + TString title=Form("SHMS Heavy gas Cherenkov AdcTdcTimeDiff: PMT %d",i+1); + TString mtitle=Form("SHMS HGCER Multiplicity Plot: PMT %d",i+1); + hg_multiplicity[i]=new TH1F("hg_multiplicity",mtitle,200,0,6); + hg_histo[i]=new TH1F(name,title,200,-500,300); + hg_histoMult[i]=new TH1F(nameMult,title,200,-500,300); + hg_histoRaw[i]=new TH1F(nameRaw,title,200,-500,300); + hg_histoMultRaw[i]=new TH1F(nameMultRaw,title,200,-500,300); +} + + +// Loop of entries in tree + +for(Long64_t ievent=0; ievent < nentries; ievent++){ + T->GetEntry(ievent); + for (Int_t ipmt=0; ipmt < npmt; ipmt++){ + hg_multiplicity[ipmt]->Fill(hgcer_mult[ipmt]); + hg_histo[ipmt]->Fill(hgcer_goodAdcTdcDiffTime[ipmt]); + if(hgcer_mult[ipmt]==1.0){ + hg_histoMult[ipmt]->Fill(hgcer_goodAdcTdcDiffTime[ipmt]); + } + } + for (Int_t ipmt=0; ipmt < npmt; ipmt++){ + hg_histoRaw[ipmt]->Fill(starttime-hgcer_adcPulseTime[ipmt]); + if(hgcer_mult[ipmt]==1.0){ + hg_histoMultRaw[ipmt]->Fill(starttime-hgcer_adcPulseTime[ipmt]); + } + } +} +TCanvas *c1=new TCanvas("c1","c1",1000,700); + c1->Divide(2,2); + for(Int_t ipmt = 0; ipmt < npmt; ipmt++){ + c1->cd(ipmt+1); + gPad->SetLogy(); + hg_multiplicity[ipmt]->Draw(); + } + c1->Update(); + + +//Find largest histogram peak to set Y scale + Float_t adcmax=0; + Float_t temp=0; + for(Int_t i=0;i<npmt;i++) + { + temp=hg_histoRaw[i]->GetMaximum(); + if (temp>adcmax)adcmax=temp; + } + cout << "Max was: "<<adcmax<<endl; + + //Create Reference Cut Line + TLine *lower=new TLine(70,0,70,adcmax); + TLine *upper=new TLine(0,0,0,adcmax); + lower->SetLineStyle(2); + lower->SetLineColor(kRed); + upper->SetLineStyle(2); + upper->SetLineColor(kRed); + + + + +TCanvas *c2=new TCanvas("c2","c2",1000,700); + c2->Divide(2,2); + for(Int_t ipmt = 0; ipmt < npmt; ipmt++){ + c2->cd(ipmt+1); + gPad->SetLogy(); + hg_histo[ipmt]->SetLineColor(9); + hg_histoMult[ipmt]->SetLineColor(6); + hg_histoRaw[ipmt]->SetLineColor(1); + hg_histoMultRaw[ipmt]->SetLineColor(2); + hg_histo[ipmt]->Draw(); + hg_histoMult[ipmt]->Draw("SAME"); + hg_histoRaw[ipmt]->Draw("SAME"); + hg_histoMultRaw[ipmt]->Draw("SAME"); + // Draw cut lines + lower->Draw("same"); + upper->Draw("same"); + TLegend *leg = new TLegend(.1,.62,.5,.9); + leg->AddEntry(hg_histo[1],"hgcer_GoodAdcTdcTimeDiff (no cut)","l"); + leg->AddEntry(hg_histoMult[1],"hgcer_GoodAdcTdcTimeDiff (multiplicity==1)","l"); + leg->AddEntry(hg_histoRaw[1],"hgcer_AdcPulseTime - hodo_starttime","l"); + leg->AddEntry(hg_histoMultRaw[1],"hgcer_AdcPulseTime - hodo_starttime(multiplicity==1)","l"); + leg->Draw(); + + } + + c2->Update(); +return 0; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + + + +//Using chain insted of TTree, mostly useful while handling more than one rootfile. + + + TFile *fileIN; + + TChain chain("T"); + + cout << "what a fuck? " << endl; + Double_t pFADC_TREF_ROC2_adcPulseTimeRaw; + + chain.Add("/u/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/shms_replay_production_all_10614_200000.root"); + chain.SetBranchAddress("T.shms.pFADC_TREF_ROC2_adcPulseTimeRaw",& pFADC_TREF_ROC2_adcPulseTimeRaw); + + TH1F *histogram=new TH1F("histogram","pFADC_TREF_ROC2_adcPulseTimeRaw",200,0,10000); + Int_t entries=chain.GetEntries(); + for( Int_t i=0;i<entries;i++){ + chain.GetEntry(i); + histogram->Fill(pFADC_TREF_ROC2_adcPulseTimeRaw); + } + histogram->Draw(); + + cout<<entries<<endl; + + + -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/ngcer_shms.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/ngcer_shms.C new file mode 100644 index 0000000000000000000000000000000000000000..08444d7f344906f537e8e775b3a6cbbbeebc8c49 --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/cherenkov/ngcer_shms.C @@ -0,0 +1,299 @@ +#include <iostream> +#include <fstream> +#include <string> +#include <TFile.h> +#include <TDirectory.h> +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" + +using namespace std; + + + + +void ngcer_shms(){ + + +//Declare root file +char run_num[20]; +cout<<"Enter SHMS Run number:"<<endl; +cin>> run_num; + +TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/shms_replay_production_all_%s_200000.root",run_num);//A1N +//TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/shms_replay_production_default_%s_-1.root",run_num);//D2N +TFile *fileIN = new TFile(filename); + +//Declare Tree + +TTree *T = (TTree*)fileIN->Get("T"); + +// Acquire the number of entries + +Long64_t nentries; +nentries = T->GetEntries(); + +// Acquire the branches + +Int_t npmt=4; + + +Double_t ngcer_goodAdcTdcDiffTime[30],ngcer_counter[30],ngcer_mult[30],ngcer_adcPulseTime[30],ngcer_goodAdcPulseAmp[30],ngcer_goodAdcPulseInt[30];; +Double_t starttime; +Int_t ndata_ngcer_pulseint; + + +T->SetBranchAddress("P.hod.starttime", &starttime); +T->SetBranchAddress("P.ngcer.adcPulseTime", &ngcer_adcPulseTime); + +T->SetBranchAddress("Ndata.P.ngcer.adcPulseInt", &ndata_ngcer_pulseint); //hit list +T->SetBranchAddress("P.ngcer.adcCounter", &ngcer_counter); //pmts + +T->SetBranchAddress("P.ngcer.goodAdcMult", &ngcer_mult); + +T->SetBranchAddress("P.ngcer.goodAdcTdcDiffTime",&ngcer_goodAdcTdcDiffTime); // events that pass the detector time window cuts + +T->SetBranchAddress("P.ngcer.goodAdcPulseAmp", &ngcer_goodAdcPulseAmp); +T->SetBranchAddress("P.ngcer.goodAdcPulseInt", &ngcer_goodAdcPulseInt); + + +// Declare histos + +TH1F *ng_histo_good[npmt]; +TH1F *ng_histo_goodMult[npmt]; +TH1F *ng_histoRaw[npmt]; +TH1F *ng_histoRawMult[npmt]; +TH1F *ng_multiplicity[npmt]; +TH2F *goodDiffTime_goodPulseInt[npmt]; +TH2F *goodDiffTime_goodPulseAmp[npmt]; + + +for(Int_t i=1; i<npmt+1; i++){ + TString name=Form("hNCer%d",i); + TString nameMult=Form("hNCerMult%d",i); + TString nameRaw=Form("hNCerRaw%d",i); + TString nameRawMult=Form("hNCerRawMult%d",i); + TString title=Form("SHMS Noble Gas Cherenkov AdcTdcTimeDiff: PMT %d",i); + TString mtitle=Form("SHMS NGCER Multiplicity Plot: PMT %d",i); + ng_multiplicity[i]=new TH1F("ng_multiplicity",mtitle,200,0,6); + ng_histo_good[i]=new TH1F(name,title,200,-100,100); + ng_histo_goodMult[i]=new TH1F(nameMult,title,200,-100,100); + ng_histoRaw[i]=new TH1F(nameRaw,title,200,-100,100); + ng_histoRawMult[i]=new TH1F(nameRawMult,title,200,-100,100); + + TString title2=Form("goodPulseInt vs goodDiffTime: PMT %d",i); + TString title3=Form("goodPulseAmp vs goodDiffTime: PMT %d",i); + goodDiffTime_goodPulseInt[i]=new TH2F("goodDiffTime_goodPulseInt",title2,400,-100,250,400,0,200); + goodDiffTime_goodPulseAmp[i]=new TH2F("goodDiffTime_goodPulseAmp",title3,400,-100,250,400,0,300); +} + + +// Loop of entries in tree + + + +for(Long64_t ievent=0; ievent < nentries; ievent++){ //loop over no. of entries + T->GetEntry(ievent); + + for (Int_t counter=1; counter< npmt+1; counter++){ + ng_multiplicity[counter]->Fill(ngcer_mult[counter-1]); //Fill multiplicity histogram + ng_histo_good[counter]->Fill(ngcer_goodAdcTdcDiffTime[counter-1]); //Fill histogram with events that pass the detector time window cuts: good variable + if(ngcer_mult[counter-1]==1){ + ng_histo_goodMult[counter]->Fill(ngcer_goodAdcTdcDiffTime[counter-1]); //Fill histogram with events that pass the detector time window cuts: good variable + goodDiffTime_goodPulseInt[counter]->Fill(ngcer_goodAdcTdcDiffTime[counter-1],ngcer_goodAdcPulseInt[counter-1]); + goodDiffTime_goodPulseAmp[counter]->Fill(ngcer_goodAdcTdcDiffTime[counter-1],ngcer_goodAdcPulseAmp[counter-1]); + } + } + + for (Int_t nhit=0; nhit < ndata_ngcer_pulseint; nhit++){ //loop over hits + for(Int_t counter=1; counter<npmt+1; counter++){ //loop over pmts/counter + if(ngcer_counter[nhit]==counter){ //associate right it to right pmt + ng_histoRaw[counter]->Fill(starttime-ngcer_adcPulseTime[nhit]); //Fill time difference histogram + if(ngcer_mult[counter-1]==1){ + ng_histoRawMult[counter]->Fill(starttime-ngcer_adcPulseTime[nhit]); //Fill time difference histogram + } + } + } + } +} + + + +//Find largest histogram peak to set Y scale + + Float_t adcmax=0; + Float_t temp=0; + for(Int_t i=1;i<npmt+1;i++) + { + temp=ng_histoRaw[i]->GetMaximum(); + if (temp>adcmax)adcmax=temp; + } + cout << "Max was: "<<adcmax<<endl; + + + +//Create Reference Cut Lines + + TLine *upper_old=new TLine(80,0,80,adcmax); + TLine *lower_old=new TLine(-20,0,-20,adcmax); + + TLine *upper_new1=new TLine(50,0,50,adcmax); + TLine *lower_new1=new TLine(18,0,18,adcmax); + + TLine *upper_new2=new TLine(70,0,70,adcmax); + TLine *lower_new2=new TLine(28,0,28,adcmax); + + lower_old->SetLineStyle(2); + lower_old->SetLineColor(kBlack); + upper_old->SetLineStyle(2); + upper_old->SetLineColor(kBlack); + + lower_new1->SetLineStyle(2); + lower_new1->SetLineColor(kRed); + lower_new1->SetLineWidth(2); + upper_new1->SetLineStyle(2); + upper_new1->SetLineColor(kRed); + upper_new1->SetLineWidth(2); + + lower_new2->SetLineStyle(2); + lower_new2->SetLineColor(kRed); + lower_new2->SetLineWidth(2); + upper_new2->SetLineStyle(2); + upper_new2->SetLineColor(kRed); + upper_new2->SetLineWidth(2); + + + + +//Draw histograms + +TCanvas *c1=new TCanvas("c1","c1",1000,700); + c1->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c1->cd(counter); + gPad->SetLogy(); + ng_multiplicity[counter]->Draw(); + } + c1->Update(); + // c1->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_%s_ngcer_Multiplicity.pdf",run_num)); + + +TCanvas *c2=new TCanvas("c2","c2",1000,700); + c2->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c2->cd(counter); + gPad->SetLogy(); + ng_histo_good[counter]->GetYaxis()->SetRangeUser(0.2,170000); + + ng_histo_good[counter]->SetLineColor(9); + // ng_histo_good[counter]->SetFillStyle(3144); + // ng_histo_good[counter]->SetFillColor(9); + + ng_histo_goodMult[counter]->SetLineColor(2); + ng_histo_goodMult[counter]->SetLineWidth(2); + // ng_histo_goodMult[counter]->SetFillStyle(3018); + // ng_histo_goodMult[counter]->SetFillColor(2); + + ng_histoRaw[counter]->SetLineColor(1); + //ng_histoRaw[counter]->SetFillStyle(3395); + // ng_histoRaw[counter]->SetFillColor(1); + + ng_histoRawMult[counter]->SetLineColor(6); + ng_histoRawMult[counter]->SetLineWidth(2); + //ng_histoRawMult[counter]->SetFillStyle(3005); + // ng_histoRawMult[counter]->SetFillColor(6); + + ng_histoRaw[counter]->Draw(); + ng_histoRawMult[counter]->Draw("SAME"); + ng_histo_good[counter]->Draw("SAME"); + ng_histo_goodMult[counter]->Draw("SAME"); + + // Draw cut lines + lower_old->Draw("same"); + upper_old->Draw("same"); + + /* if(counter==4){ + lower_new2->Draw("same"); + upper_new2->Draw("same"); + } + else{ + lower_new1->Draw("same"); + upper_new1->Draw("same"); + } + */ + + TLegend *leg = new TLegend(.1,.52,.53,.9); + leg->AddEntry(ng_histoRaw[1],"ngcer_AdcPulseTime - hodo_starttime (no cut)","l"); + leg->AddEntry(ng_histoRawMult[1],"ngcer_AdcPulseTime - hodo_starttime (mult==1)","l"); + leg->AddEntry(ng_histo_good[1],"ngcer_GoodAdcTdcTimeDiff (no cut)","l"); + leg->AddEntry(ng_histo_goodMult[1],"ngcer_GoodAdcTdcTimeDiff (mult==1)","l"); + + leg->Draw(); + + + } + + c2->Update(); + //c2->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/Detector_time_window_cuts/cherenkov/SHMS_plots/SHMS_%s_ngcer_TimeWindowCut.pdf",run_num)); + + + +TCanvas *c3=new TCanvas("c3","c3",1000,700); + c3->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c3->cd(counter); + gPad->SetLogz(); + goodDiffTime_goodPulseInt[counter]->Draw("colz"); + } + c3->Update(); + c3->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/Detector_plots/cherenkov/SHMS_plots/SHMS_%s_ngcer_goodDiffTime_vs_goodPulseInt.pdf",run_num)); + + +TCanvas *c4=new TCanvas("c4","c4",1000,700); + c4->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c4->cd(counter); + gPad->SetLogz(); + goodDiffTime_goodPulseAmp[counter]->Draw("colz"); + } + c4->Update(); + c4->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/Detector_plots/cherenkov/SHMS_plots/SHMS_%s_ngcer_goodDiffTime_vs_goodPulseAmp.pdf",run_num)); +return 0; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/plot_them_ngnew.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/plot_them_ngnew.C new file mode 100644 index 0000000000000000000000000000000000000000..d25bdd272077fa37a6b92abe31a2c5102d5ef8f9 --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Detector_time_window_cuts/plot_them_ngnew.C @@ -0,0 +1,1055 @@ +#include <iostream> +#include <fstream> +#include <string> +#include <TFile.h> +#include <TDirectory.h> +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" + +using namespace std; + +static const double degtorad = 3.141592653589793/180.; + +void formatit_2dd(TH2F *histo, TString bar, TString xax, TString yax, Int_t flag){ + + gPad->SetTicks(1,1); + gPad->SetLeftMargin(0.21); + gPad->SetRightMargin(0.11); + gPad->SetTopMargin(0.03); + gPad->SetBottomMargin(0.13); + + + histo->SetLabelSize(0.035, "x"); + histo->SetLabelSize(0.035, "y"); + histo->GetXaxis()->SetTitleSize(0.055); + histo->GetYaxis()->SetTitleSize(0.055); + histo->GetXaxis()->CenterTitle(1); + histo->GetYaxis()->CenterTitle(1); + histo->GetXaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitleOffset(1.3); + histo->GetYaxis()->SetTitle(yax); + histo->GetXaxis()->SetTitle(xax); + // histo->SetLineColor(kPink+10); + // histo->SetLineWidth(3); + // histo->SetLineStyle(2); + histo->Draw("colz"); + + if (flag == 0){ + + auto leg = new TLegend(0.2,0.85,0.35,0.95); + leg->SetFillColor(-1); + leg->SetFillStyle(0); + leg->SetTextSize(0.055); + leg->SetTextColor(kAzure+7); + leg->SetBorderSize(0); + leg->AddEntry(histo,bar,""); + leg->Draw("same"); + + } + +} + +void formatit_1h(TH1F *histo, TString xax, TString yax, TString bar){ + + gPad->SetTicks(1,1); + gPad->SetLeftMargin(0.21); + gPad->SetRightMargin(0.11); + gPad->SetTopMargin(0.03); + gPad->SetBottomMargin(0.13); + gPad->SetLogy(); + + histo->SetLabelSize(0.045, "x"); + histo->SetLabelSize(0.045, "y"); + histo->GetXaxis()->SetTitleSize(0.055); + histo->GetYaxis()->SetTitleSize(0.055); + histo->GetXaxis()->CenterTitle(1); + histo->GetYaxis()->CenterTitle(1); + histo->GetXaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitle(yax); + histo->GetXaxis()->SetTitle(xax); + // histo->SetFillStyle(3315); + histo->SetLineWidth(3); + histo->SetLineStyle(1); + histo->SetLineColor(kOrange+7); + // histo->SetFillColor(kOrange+10); + histo->Draw(""); + + auto leg1 = new TLegend(0.15,0.85,0.65,0.95); + leg1->SetFillColor(-1); + leg1->SetFillStyle(0); + leg1->SetTextSize(0.055); + leg1->SetTextColor(kOrange+7); + leg1->SetBorderSize(0); + leg1->AddEntry(histo,bar,""); + leg1->Draw("same"); + + /* if (flag == 0){ + + TLine *linex = new TLine(30.,0.,30.,600.); + TLine *liney = new TLine(0.,30.,600.,30.); + linex->SetLineColor(kOrange+7); + liney->SetLineColor(kOrange+7); + linex->Draw("same"); + liney->Draw("same"); + + } + + TF1 *gaus1 = new TF1("gaus1","gaus",xmin,xmax); + gaus1->SetLineColor(kMagenta-9); + gaus1->SetLineStyle(2); + gaus1->SetLineWidth(5); + histo->Fit("gaus1","R"); + gaus1->Draw("same"); + + Float_t mean = gaus1->GetParameter(1); + Float_t err_mean = gaus1->GetParError(1); + Float_t sigma = gaus1->GetParameter(2); + + TString legis_1, legis_2; + legis_1 = Form("#mu(#pi) = %4.3f", mean); + legis_2 = Form("sigma = %4.3f", sigma); + + leg = new TLegend(0.55,0.9,0.85,0.93); + leg->SetFillColor(-1); + leg->SetFillStyle(0); + leg->SetTextSize(0.055); + leg->SetTextColor(kMagenta-9); + leg->SetBorderSize(0); + leg->AddEntry(histo,legis_1,""); + leg->Draw("same"); + + cout << " mean sigma: " << mean << " " << sigma << endl; + dbfilee << pmt << " " << mean << " " << err_mean << "\n"; + // cout << " file name is: " << &dbfilee << endl; */ + +} + +void formatit_1h_same(TH1F *histo, TString xax, TString yax, TString bar){ + + gPad->SetTicks(1,1); + gPad->SetLeftMargin(0.21); + gPad->SetRightMargin(0.11); + gPad->SetTopMargin(0.03); + gPad->SetBottomMargin(0.13); + gPad->SetLogy(); + + histo->SetLabelSize(0.045, "x"); + histo->SetLabelSize(0.045, "y"); + histo->GetXaxis()->SetTitleSize(0.055); + histo->GetYaxis()->SetTitleSize(0.055); + histo->GetXaxis()->CenterTitle(1); + histo->GetYaxis()->CenterTitle(1); + histo->GetXaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitle(yax); + histo->GetXaxis()->SetTitle(xax); + histo->SetFillStyle(3356); + histo->SetLineStyle(2); + histo->SetLineWidth(1); + histo->SetLineColor(kBlue-7); + histo->SetFillColor(kBlue-7); + histo->Draw("same"); + + auto leg1 = new TLegend(0.15,0.77,0.65,0.87); + leg1->SetFillColor(-1); + leg1->SetFillStyle(0); + leg1->SetTextSize(0.055); + leg1->SetTextColor(kBlue-7); + leg1->SetBorderSize(0); + leg1->AddEntry(histo,bar,""); + leg1->Draw("same"); + +} + + +void formatit_1h_same2(TH1F *histo, TString xax, TString yax, TString bar){ + + gPad->SetTicks(1,1); + gPad->SetLeftMargin(0.21); + gPad->SetRightMargin(0.11); + gPad->SetTopMargin(0.03); + gPad->SetBottomMargin(0.13); + gPad->SetLogy(); + + histo->SetLabelSize(0.045, "x"); + histo->SetLabelSize(0.045, "y"); + histo->GetXaxis()->SetTitleSize(0.055); + histo->GetYaxis()->SetTitleSize(0.055); + histo->GetXaxis()->CenterTitle(1); + histo->GetYaxis()->CenterTitle(1); + histo->GetXaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitle(yax); + histo->GetXaxis()->SetTitle(xax); + histo->SetFillStyle(3356); + histo->SetLineStyle(2); + histo->SetLineWidth(3); + histo->SetLineColor(kBlack); + // histo->SetFillColor(kAzure-3); + histo->Draw("same"); + + auto leg1 = new TLegend(0.15,0.67,0.65,0.77); + leg1->SetFillColor(-1); + leg1->SetFillStyle(0); + leg1->SetTextSize(0.055); + leg1->SetTextColor(kBlack); + leg1->SetBorderSize(0); + leg1->AddEntry(histo,bar,""); + leg1->Draw("same"); + +} + +void formatit_1h_same3(TH1F *histo, TString xax, TString yax, TString bar){ + + gPad->SetTicks(1,1); + gPad->SetLeftMargin(0.21); + gPad->SetRightMargin(0.11); + gPad->SetTopMargin(0.03); + gPad->SetBottomMargin(0.13); + gPad->SetLogy(); + + histo->SetLabelSize(0.045, "x"); + histo->SetLabelSize(0.045, "y"); + histo->GetXaxis()->SetTitleSize(0.055); + histo->GetYaxis()->SetTitleSize(0.055); + histo->GetXaxis()->CenterTitle(1); + histo->GetYaxis()->CenterTitle(1); + histo->GetXaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitle(yax); + histo->GetXaxis()->SetTitle(xax); + histo->SetFillStyle(3490); + histo->SetLineStyle(3); + histo->SetLineWidth(3); + histo->SetLineColor(kPink+7); + histo->SetFillColor(kPink+7); + histo->Draw("same"); + + auto leg1 = new TLegend(0.15,0.57,0.65,0.67); + leg1->SetFillColor(-1); + leg1->SetFillStyle(0); + leg1->SetTextSize(0.055); + leg1->SetTextColor(kPink+7); + leg1->SetBorderSize(0); + leg1->AddEntry(histo,bar,""); + leg1->Draw("same"); + +} + +void formatit_1h_same4(TH1F *histo, TString xax, TString yax, TString bar){ + + gPad->SetTicks(1,1); + gPad->SetLeftMargin(0.21); + gPad->SetRightMargin(0.11); + gPad->SetTopMargin(0.03); + gPad->SetBottomMargin(0.13); + gPad->SetLogy(); + + histo->SetLabelSize(0.045, "x"); + histo->SetLabelSize(0.045, "y"); + histo->GetXaxis()->SetTitleSize(0.055); + histo->GetYaxis()->SetTitleSize(0.055); + histo->GetXaxis()->CenterTitle(1); + histo->GetYaxis()->CenterTitle(1); + histo->GetXaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitle(yax); + histo->GetXaxis()->SetTitle(xax); + // histo->SetFillStyle(3244); + histo->SetLineStyle(1); + histo->SetLineWidth(4); + histo->SetLineColor(kTeal+1); + // histo->SetFillColor(kTeal+1); + histo->Draw("same"); + + auto leg1 = new TLegend(0.15,0.47,0.65,0.57); + leg1->SetFillColor(-1); + leg1->SetFillStyle(0); + leg1->SetTextSize(0.055); + leg1->SetTextColor(kTeal+1); + leg1->SetBorderSize(0); + leg1->AddEntry(histo,bar,""); + leg1->Draw("same"); + +} + +void formatit_1h_same5(TH1F *histo, TString xax, TString yax, TString bar){ + + gPad->SetTicks(1,1); + gPad->SetLeftMargin(0.21); + gPad->SetRightMargin(0.11); + gPad->SetTopMargin(0.03); + gPad->SetBottomMargin(0.13); + gPad->SetLogy(); + + histo->SetLabelSize(0.045, "x"); + histo->SetLabelSize(0.045, "y"); + histo->GetXaxis()->SetTitleSize(0.055); + histo->GetYaxis()->SetTitleSize(0.055); + histo->GetXaxis()->CenterTitle(1); + histo->GetYaxis()->CenterTitle(1); + histo->GetXaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitleOffset(1.1); + histo->GetYaxis()->SetTitle(yax); + histo->GetXaxis()->SetTitle(xax); + // histo->SetFillStyle(3244); + histo->SetLineStyle(4); + histo->SetLineWidth(3); + histo->SetLineColor(kRed+2); + // histo->SetFillColor(kTeal+1); + histo->Draw("same"); + + auto leg1 = new TLegend(0.15,0.47,0.65,0.57); + leg1->SetFillColor(-1); + leg1->SetFillStyle(0); + leg1->SetTextSize(0.055); + leg1->SetTextColor(kRed+2); + leg1->SetBorderSize(0); + leg1->AddEntry(histo,bar,""); + leg1->Draw("same"); + +} + +int main(){ + + TFile *myfile; + + TChain chain("T"); + + cout << "what a fuck? " << endl; + + chain.Add("/lustre19/expphy/cache/hallc/E12-10-002/simona/ROOTfiles/shms_replay_production_all_2552_1500000.root"); + + + Double_t ngcer_pulseint[30], ngcer_counter[30], ngcer_errflag[30], ngcer_gooddifftime[30], beta; + Int_t ndata_ngcer_pulseint, ndata_ngcer_mult; + + Double_t ngcer, etotnorm, premean, preneg, prepos, goodint[30]; + Double_t inside, starttime, ngcer_pulseamp[30], ngcer_pulsetime[30]; + Double_t ngcer_goodpulseamp[30], ngcer_goodpulsetime[30], ngcer_goodpulseint[30]; + + Double_t reftime_amp, ngcer_mult[30], delta, xfp, yfp, xpfp,ypfp, reftime; + + chain.SetBranchAddress("Ndata.P.ngcer.adcPulseInt", &ndata_ngcer_pulseint); + + chain.SetBranchAddress("P.ngcer.adcCounter", &ngcer_counter[0]); + chain.SetBranchAddress("P.ngcer.adcPulseInt", &ngcer_pulseint[0]); + chain.SetBranchAddress("P.ngcer.adcPulseAmp", &ngcer_pulseamp[0]); + chain.SetBranchAddress("P.ngcer.adcPulseTime", &ngcer_pulsetime[0]); + + chain.SetBranchAddress("P.ngcer.goodAdcPulseInt", &ngcer_goodpulseint[0]); + chain.SetBranchAddress("P.ngcer.goodAdcPulseAmp", &ngcer_goodpulseamp[0]); + chain.SetBranchAddress("P.ngcer.goodAdcTdcDiffTime", &ngcer_gooddifftime[0]); + + chain.SetBranchAddress("P.ngcer.adcErrorFlag", &ngcer_errflag[0]); + + chain.SetBranchAddress("Ndata.P.ngcer.goodAdcMult", &ndata_ngcer_mult); + chain.SetBranchAddress("P.ngcer.goodAdcMult", &ngcer_mult[0]); + + chain.SetBranchAddress("P.cal.etottracknorm", &etotnorm); + chain.SetBranchAddress("P.ngcer.npeSum", &ngcer); + chain.SetBranchAddress("P.hod.betanotrack", &beta); + chain.SetBranchAddress("P.dc.InsideDipoleExit", &inside); + + chain.SetBranchAddress("P.hod.starttime", &starttime); + chain.SetBranchAddress("P.gtr.dp", &delta); + + chain.SetBranchAddress("P.dc.x_fp", &xfp); + chain.SetBranchAddress("P.dc.y_fp", &yfp); + + chain.SetBranchAddress("P.dc.xp_fp", &xpfp); + chain.SetBranchAddress("P.dc.yp_fp", &ypfp); + chain.SetBranchAddress("P.hod.betanotrack", &beta); + + chain.SetBranchAddress("T.shms.pFADC_TREF_ROC2_adcPulseAmpRaw", &reftime_amp); + chain.SetBranchAddress("T.shms.pFADC_TREF_ROC2_adcPulseTimeRaw", &reftime); + + + TH1F* int_ngcer[9]; + TH1F* int_goodngcer[9]; + TH1F* amp_ngcer[9]; + TH1F* delta_per_pmt[9]; + + TH1F* amp_pmt4only; + + TH1F* pmt0_01crosstalk; + TH1F* pmt1_01crosstalk; + + TH1F* amp_goodngcer[9]; + TH1F* time_ngcer[9]; + TH1F* time_ngcer_calo[9]; + TH1F* time_ngcer_calo_reftime[9]; + TH1F* time_ngcer_delta[9]; + TH1F* time_ngcer_pmt1; + TH1F* time_ngcer_pmt1_from4; + TH1F* time_ngcer_pmt2; + TH1F* time_ngcer_pmt3; + TH1F* time_ngcer_pmt4; + + TH1F* time_ngcer_pmt4_inside; + TH1F* time_ngcer_pmt4_tref; + + TH1F* time_goodngcer[9]; + TH1F* time_ngcer_reftime[9]; + + TH2F* time_1vs2; + TH2F* time_ngcer_pmt1_xy; + TH2F* time_ngcer_pmt1_xy_delta; + + TH2F* time_ngcer_pmt3_xy; + TH2F* time_ngcer_pmt3_xy_w; + TH2F* time_ngcer_pmt3_dv; + TH2F* time_ngcer_pmt3_xy_delta; + TH2F* time_ngcer_pmt3_xy_w_delta; + TH2F* time_ngcer_pmt3_dv_delta; + + TH2F* time_ngcer_pmt2_xy; + TH2F* time_ngcer_pmt2_xy_w; + TH2F* time_ngcer_pmt2_dv; + TH2F* time_ngcer_pmt2_xy_delta; + TH2F* time_ngcer_pmt2_xy_w_delta; + TH2F* time_ngcer_pmt2_dv_delta; + + TH2F* time_ngcer_pmt1_xy_w; + TH2F* time_ngcer_pmt1_dv; + TH2F* time_ngcer_pmt1_xy_w_delta; + TH2F* time_ngcer_pmt1_dv_delta; + + TH2F* time_ngcer_pmt4_xy; + TH2F* time_ngcer_pmt4_xy_w; + TH2F* time_ngcer_pmt4_dv; + TH2F* time_ngcer_pmt4_xy_delta; + TH2F* time_ngcer_pmt4_xy_w_delta; + TH2F* time_ngcer_pmt4_dv_delta; + + TH2F* time_ngcer_pmt4_xp; + TH2F* time_ngcer_pmt4_xp_w; + TH2F* time_ngcer_pmt4_dvxp; + TH2F* time_ngcer_pmt4_xp_delta; + TH2F* time_ngcer_pmt4_xp_w_delta; + TH2F* time_ngcer_pmt4_dvxp_delta; + + TH2F* time_ngcer_pmt3_xp; + TH2F* time_ngcer_pmt3_xp_w; + TH2F* time_ngcer_pmt3_dvxp; + + TH2F* time_ngcer_pmt3_xp_delta; + TH2F* time_ngcer_pmt3_xp_w_delta; + TH2F* time_ngcer_pmt3_dvxp_delta; + + TH2F* time_ngcer_pmt2_xp; + TH2F* time_ngcer_pmt2_xp_w; + TH2F* time_ngcer_pmt2_dvxp; + TH2F* time_ngcer_pmt2_xp_delta; + TH2F* time_ngcer_pmt2_xp_w_delta; + TH2F* time_ngcer_pmt2_dvxp_delta; + + TH2F* time_ngcer_pmt1_xp; + TH2F* time_ngcer_pmt1_xp_w; + TH2F* time_ngcer_pmt1_dvxp; + + TH2F* time_ngcer_pmt1_only_xy; + TH2F* time_ngcer_pmt1_only_xy_w; + TH2F* time_ngcer_pmt1_only_dv; + + TH2F* time_ngcer_pmt2_only_xy; + TH2F* time_ngcer_pmt2_only_xy_w; + TH2F* time_ngcer_pmt2_only_dv; + + TH2F* time_ngcer_pmt3_only_xy; + TH2F* time_ngcer_pmt3_only_xy_w; + TH2F* time_ngcer_pmt3_only_dv; + + TH2F* time_ngcer_pmt4_only_xy; + TH2F* time_ngcer_pmt4_only_xy_w; + TH2F* time_ngcer_pmt4_only_dv; + + + TH2F* time_ngcer_pmt1_xp_delta; + TH2F* time_ngcer_pmt1_xp_w_delta; + TH2F* time_ngcer_pmt1_dvxp_delta; + + TH1F* time_ngcer_pmt1_1ddelta; + TH1F* time_ngcer_pmt2_1ddelta; + TH1F* time_ngcer_pmt3_1ddelta; + TH1F* time_ngcer_pmt4_1ddelta; + + for(Int_t mm = 0; mm < 8; mm++){ + int_ngcer[mm] = new TH1F("","",100,0.,100.); + int_goodngcer[mm] = new TH1F("","",100,0.,100.); + + amp_ngcer[mm] = new TH1F("","",500,0.,600.); + amp_goodngcer[mm] = new TH1F("","",500,0.,600.); + + time_ngcer[mm] = new TH1F("","",300,-80.,20.); + time_ngcer_calo[mm] = new TH1F("","",300,-80.,20.); + time_ngcer_calo_reftime[mm] = new TH1F("","",300,-80.,20.); + time_ngcer_delta[mm] = new TH1F("","",300,-80.,20.); + time_goodngcer[mm] = new TH1F("","",300,-80.,20.); + time_ngcer_reftime[mm] = new TH1F("","",300,-80.,20.); + delta_per_pmt[mm] = new TH1F("","",100,-30.,40.); + + } + + time_1vs2 = new TH2F("","",700,-200.,200.,700,-200.,200.); + time_ngcer_pmt1 = new TH1F("","",300,-80.,20.); + + time_ngcer_pmt1_xy = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt1_xy_w = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt1_dv = new TH2F("","",140,-40.,40.,150,-60.,60.); + + time_ngcer_pmt1_only_xy = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt1_only_xy_w = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt1_only_dv = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt2_only_xy = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt2_only_xy_w = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt2_only_dv = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt3_only_xy = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt3_only_xy_w = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt3_only_dv = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt4_only_xy = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt4_only_xy_w = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt4_only_dv = new TH2F("","",140,-40.,40.,150,-60.,60.); + + + time_ngcer_pmt1_xy_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt1_xy_w_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt1_dv_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + + + time_ngcer_pmt2_xy = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt2_xy_w = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt2_dv = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt2_xy_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt2_xy_w_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt2_dv_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + + time_ngcer_pmt3_xy = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt3_xy_w = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt3_dv = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt3_xy_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt3_xy_w_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt3_dv_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + + time_ngcer_pmt4_xy = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt4_xy_w = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt4_dv = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt4_xy_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt4_xy_w_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + time_ngcer_pmt4_dv_delta = new TH2F("","",140,-40.,40.,150,-60.,60.); + + time_ngcer_pmt4_xp = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt4_xp_w = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt4_dvxp = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + + time_ngcer_pmt4_xp_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt4_xp_w_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt4_dvxp_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + + time_ngcer_pmt3_xp = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt3_xp_w = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt3_dvxp = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + + time_ngcer_pmt3_xp_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt3_xp_w_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt3_dvxp_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + + time_ngcer_pmt2_xp = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt2_xp_w = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt2_dvxp = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + + time_ngcer_pmt2_xp_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt2_xp_w_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt2_dvxp_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + + time_ngcer_pmt1_xp = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt1_xp_w = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt1_dvxp = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + + time_ngcer_pmt1_xp_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt1_xp_w_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + time_ngcer_pmt1_dvxp_delta = new TH2F("","",100,-0.2,0.2,150,-60.,60.); + + time_ngcer_pmt1_from4 = new TH1F("","",300,-80.,20.); + time_ngcer_pmt2 = new TH1F("","",300,-80.,20.); + time_ngcer_pmt3 = new TH1F("","",300,-80.,20.); + time_ngcer_pmt4 = new TH1F("","",300,-80.,20.); + time_ngcer_pmt4_inside = new TH1F("","",300,-80.,20.); + + time_ngcer_pmt4_tref = new TH1F("","",2000,0.,7000.); + + amp_pmt4only = new TH1F("","",500,0.,600.); + + pmt0_01crosstalk = new TH1F("","",500,0.,600.); + pmt1_01crosstalk = new TH1F("","",500,0.,600.); + + time_ngcer_pmt1_1ddelta = new TH1F("","",100,-30.,40.); + time_ngcer_pmt2_1ddelta = new TH1F("","",100,-30.,40.); + time_ngcer_pmt3_1ddelta = new TH1F("","",100,-30.,40.); + time_ngcer_pmt4_1ddelta = new TH1F("","",100,-30.,40.); + + ofstream outfilemore("pmt3_34_crosstalk.txt"); + ofstream outfilemore1("pmt4_34_crosstalk.txt"); + + Int_t nentries = chain.GetEntries(); + // for(Int_t i=0; i < nentries; i++){ + for(Int_t i=0; i < 800000; i++){ + + chain.GetEntry(i); + + // this is to check crosstalk + + if (ngcer_mult[3] == 1. && ngcer_mult[2] == 1. && ngcer_mult[0] == 0 && ngcer_mult[1] == 0){ + + for(Int_t nhit = 0; nhit < ndata_ngcer_pulseint; nhit++){ + + Double_t timediff2 = starttime - ngcer_pulsetime[nhit]; + + if (delta > -10. && delta < 22.){ + + if (ngcer_counter[nhit] == 3 && ngcer_pulseamp[nhit] > 0.){ + outfilemore << i << setw(20) << nhit << setw(20) << ngcer_counter[nhit] << setw(20) << ngcer_pulseint[nhit] << setw(20) << ngcer_pulseamp[nhit] << setw(20) << timediff2 << endl; + } + if (ngcer_counter[nhit] == 4 && ngcer_pulseamp[nhit] > 0.){ + outfilemore1 << i << setw(20) << nhit << setw(20) << ngcer_counter[nhit] << setw(20) << ngcer_pulseint[nhit] << setw(20) << ngcer_pulseamp[nhit] << setw(20) << timediff2 << endl; + } + + } + + } + } + // end of checking crosstalk + + + for (Int_t counter = 1; counter < 5; counter++){ + + // if(etotnorm > 0.7){ + + int_goodngcer[counter]->Fill(ngcer_goodpulseint[counter-1]); + amp_goodngcer[counter]->Fill(ngcer_goodpulseamp[counter-1]); + time_goodngcer[counter]->Fill(ngcer_gooddifftime[counter-1]); + // } + } + + for(Int_t nhit = 0; nhit < ndata_ngcer_pulseint; nhit++){ + + for (Int_t counter = 1; counter < 5; counter++){ + + if(ngcer_counter[nhit] == counter){ + + // INT and AMP per counter for all hits per event; no other cuts + int_ngcer[counter]->Fill(ngcer_pulseint[nhit]); + amp_ngcer[counter]->Fill(ngcer_pulseamp[nhit]); + + // TIME DIFF per counter for all hits per event; no other cuts + Double_t timediff = starttime - ngcer_pulsetime[nhit]; + time_ngcer[counter]->Fill(timediff); + + if (etotnorm > 0.7){ + // TIME DIFF per counter for all hits per event but with a CALO cut to select ELECTRONS + time_ngcer_calo[counter]->Fill(timediff); + + if(reftime > 2500.){ + time_ngcer_calo_reftime[counter]->Fill(timediff); + } + } + + // TIME DIFF per counter for all hits per event but with a cut to avoid corrupted REF TIMES + if (reftime_amp > 1.){ + time_ngcer_reftime[counter]->Fill(timediff); + } + + // TIME DIFF per counter for all hits per event but with a DELTA cut + if (delta > -10. && delta < 22.){ + time_ngcer_delta[counter]->Fill(timediff); + } + + // fill in delta distr + + delta_per_pmt[counter]->Fill(delta); + + // all this is for stuff in the small peak for PMT 1 + if(ngcer_counter[nhit] == 1 && timediff > -45. && timediff < -30. && ngcer_pulseamp[nhit] > 0.){ + Double_t xcer = xfp - 89.1 * xpfp; + Double_t ycer = yfp - 89.1 * ypfp; + + // x vs y with AMP as weight + time_ngcer_pmt1_xy->Fill(ycer,xcer); + time_ngcer_pmt1_xy_w->Fill(ycer,xcer,ngcer_pulseamp[nhit]); + time_ngcer_pmt1_dv->Divide(time_ngcer_pmt1_xy_w,time_ngcer_pmt1_xy); + + // x vs y with AMP as weight but with a DELTA cut + if(delta > -10. && delta < 22.){ + time_ngcer_pmt1_xy_delta->Fill(ycer,xcer); + time_ngcer_pmt1_xy_w_delta->Fill(ycer,xcer,ngcer_pulseamp[nhit]); + time_ngcer_pmt1_dv_delta->Divide(time_ngcer_pmt1_xy_w_delta,time_ngcer_pmt1_xy_delta); + } + // x vs xpfp with AMP as weight + time_ngcer_pmt1_xp->Fill(xpfp,xfp); + time_ngcer_pmt1_xp_w->Fill(xpfp,xfp,ngcer_pulseamp[nhit]); + time_ngcer_pmt1_dvxp->Divide(time_ngcer_pmt1_xp_w,time_ngcer_pmt1_xp); + + // x vs xpfp with AMP as weight but with DELTA cut + if(delta > -10. && delta < 22.){ + time_ngcer_pmt1_xp_delta->Fill(xpfp,xfp); + time_ngcer_pmt1_xp_w_delta->Fill(xpfp,xfp,ngcer_pulseamp[nhit]); + time_ngcer_pmt1_dvxp_delta->Divide(time_ngcer_pmt1_xp_w_delta,time_ngcer_pmt1_xp_delta); + } + + // Multiplicity distr. for PMT 2 when PMT 1 had stuff in small peak + + + // 1 D delta distribution in the small peak + time_ngcer_pmt1_1ddelta->Fill(delta); + + } + + + if(ngcer_counter[nhit] == 2 && timediff > -37. && timediff < -26. && ngcer_pulseamp[nhit] > 0.){ + Double_t xcer = xfp - 89.1 * xpfp; + Double_t ycer = yfp - 89.1 * ypfp; + + time_ngcer_pmt2_xy->Fill(ycer,xcer); + time_ngcer_pmt2_xy_w->Fill(ycer,xcer,ngcer_pulseamp[nhit]); + time_ngcer_pmt2_dv->Divide(time_ngcer_pmt2_xy_w,time_ngcer_pmt2_xy); + + // X vs Y with DELTA cut + if (delta > -10. && delta < 22.){ + time_ngcer_pmt2_xy_delta->Fill(ycer,xcer); + time_ngcer_pmt2_xy_w_delta->Fill(ycer,xcer,ngcer_pulseamp[nhit]); + time_ngcer_pmt2_dv_delta->Divide(time_ngcer_pmt2_xy_w_delta,time_ngcer_pmt2_xy_delta); + } + + time_ngcer_pmt2_xp->Fill(xpfp,xfp); + time_ngcer_pmt2_xp_w->Fill(xpfp,xfp,ngcer_pulseamp[nhit]); + time_ngcer_pmt2_dvxp->Divide(time_ngcer_pmt2_xp_w,time_ngcer_pmt2_xp); + + if(delta > -10. && delta < 22.){ + time_ngcer_pmt2_xp_delta->Fill(xpfp,xfp); + time_ngcer_pmt2_xp_w_delta->Fill(xpfp,xfp,ngcer_pulseamp[nhit]); + time_ngcer_pmt2_dvxp_delta->Divide(time_ngcer_pmt2_xp_w_delta,time_ngcer_pmt2_xp_delta); + } + + time_ngcer_pmt2_1ddelta->Fill(delta); + } + + + if(ngcer_counter[nhit] == 3 && timediff > -38. && timediff < -28. && ngcer_pulseamp[nhit] > 0.){ + Double_t xcer = xfp - 89.1 * xpfp; + Double_t ycer = yfp - 89.1 * ypfp; + + time_ngcer_pmt3_xy->Fill(ycer,xcer); + time_ngcer_pmt3_xy_w->Fill(ycer,xcer,ngcer_pulseamp[nhit]); + time_ngcer_pmt3_dv->Divide(time_ngcer_pmt3_xy_w,time_ngcer_pmt3_xy); + + // X vs Y with DELTA + if(delta > -10. && delta < 22.){ + time_ngcer_pmt3_xy_delta->Fill(ycer,xcer); + time_ngcer_pmt3_xy_w_delta->Fill(ycer,xcer,ngcer_pulseamp[nhit]); + time_ngcer_pmt3_dv_delta->Divide(time_ngcer_pmt3_xy_w_delta,time_ngcer_pmt3_xy_delta); + } + + time_ngcer_pmt3_xp->Fill(xpfp,xfp); + time_ngcer_pmt3_xp_w->Fill(xpfp,xfp,ngcer_pulseamp[nhit]); + time_ngcer_pmt3_dvxp->Divide(time_ngcer_pmt3_xp_w,time_ngcer_pmt3_xp); + + if(delta > -10. && delta < 22.){ + time_ngcer_pmt3_xp_delta->Fill(xpfp,xfp); + time_ngcer_pmt3_xp_w_delta->Fill(xpfp,xfp,ngcer_pulseamp[nhit]); + time_ngcer_pmt3_dvxp_delta->Divide(time_ngcer_pmt3_xp_w_delta,time_ngcer_pmt3_xp_delta); + } + + time_ngcer_pmt3_1ddelta->Fill(delta); + } + if(ngcer_counter[nhit] == 4 && timediff > -40. && timediff < -32. && ngcer_pulseamp[nhit] > 0.){ + Double_t xcer = xfp - 89.1 * xpfp; + Double_t ycer = yfp - 89.1 * ypfp; + + time_ngcer_pmt4_xy->Fill(ycer,xcer); + time_ngcer_pmt4_xy_w->Fill(ycer,xcer,ngcer_pulseamp[nhit]); + time_ngcer_pmt4_dv->Divide(time_ngcer_pmt4_xy_w,time_ngcer_pmt4_xy); + + // X vs Y with DELTA + if(delta > -10. && delta < 22.){ + time_ngcer_pmt4_xy_delta->Fill(ycer,xcer); + time_ngcer_pmt4_xy_w_delta->Fill(ycer,xcer,ngcer_pulseamp[nhit]); + time_ngcer_pmt4_dv_delta->Divide(time_ngcer_pmt4_xy_w,time_ngcer_pmt4_xy); + } + + time_ngcer_pmt4_xp->Fill(xpfp,xfp); + time_ngcer_pmt4_xp_w->Fill(xpfp,xfp,ngcer_pulseamp[nhit]); + time_ngcer_pmt4_dvxp->Divide(time_ngcer_pmt4_xp_w,time_ngcer_pmt4_xp); + + if(delta > -10. && delta < 22.){ + time_ngcer_pmt4_xp_delta->Fill(xpfp,xfp); + time_ngcer_pmt4_xp_w_delta->Fill(xpfp,xfp,ngcer_pulseamp[nhit]); + time_ngcer_pmt4_dvxp_delta->Divide(time_ngcer_pmt4_xp_w_delta,time_ngcer_pmt4_xp_delta); + } + + time_ngcer_pmt4_1ddelta->Fill(delta); + time_ngcer_pmt4_tref->Fill(reftime); + + + + } + + + if(ngcer_counter[nhit] == 1 && ngcer_mult[1] == 0. && ngcer_mult[2] == 0. && ngcer_mult[3] == 0. && ngcer_pulseamp[nhit] > 0.5){ + Double_t xcerr = xfp - 89.1 * xpfp; + Double_t ycerr = yfp - 89.1 * ypfp; + time_ngcer_pmt1->Fill(timediff); + time_ngcer_pmt1_only_xy->Fill(ycerr,xcerr); + time_ngcer_pmt1_only_xy_w->Fill(ycerr,xcerr,ngcer_pulseamp[nhit]); + time_ngcer_pmt1_only_dv->Divide(time_ngcer_pmt1_only_xy_w,time_ngcer_pmt1_only_xy); + } + if(ngcer_counter[nhit] == 2 && ngcer_mult[0] == 0. && ngcer_mult[2] == 0. && ngcer_mult[3] == 0. && ngcer_pulseamp[nhit] > 0.){ + Double_t xcerr = xfp - 89.1 * xpfp; + Double_t ycerr = yfp - 89.1 * ypfp; + time_ngcer_pmt2->Fill(timediff); + time_ngcer_pmt2_only_xy->Fill(ycerr,xcerr); + time_ngcer_pmt2_only_xy_w->Fill(ycerr,xcerr,ngcer_pulseamp[nhit]); + time_ngcer_pmt2_only_dv->Divide(time_ngcer_pmt2_only_xy_w,time_ngcer_pmt2_only_xy); + } + if(ngcer_counter[nhit] == 3 && ngcer_mult[0] == 0. && ngcer_mult[1] == 0. && ngcer_mult[3] == 0. && ngcer_pulseamp[nhit] > 0.5){ + Double_t xcerr = xfp - 89.1 * xpfp; + Double_t ycerr = yfp - 89.1 * ypfp; + time_ngcer_pmt3->Fill(timediff); + time_ngcer_pmt3_only_xy->Fill(ycerr,xcerr); + time_ngcer_pmt3_only_xy_w->Fill(ycerr,xcerr,ngcer_pulseamp[nhit]); + time_ngcer_pmt3_only_dv->Divide(time_ngcer_pmt3_only_xy_w,time_ngcer_pmt3_only_xy); + } + + if(ngcer_counter[nhit] == 1 && ngcer_mult[1] == 0. && ngcer_mult[2] == 0.){ + time_ngcer_pmt1_from4->Fill(timediff); + + } + + if(ngcer_counter[nhit] == 4 && ngcer_mult[0] == 0. && ngcer_mult[1] == 0. && ngcer_mult[2] == 0. && ngcer_pulseamp[nhit] > 0.5){ + Double_t xcerr = xfp - 89.1 * xpfp; + Double_t ycerr = yfp - 89.1 * ypfp; + time_ngcer_pmt4->Fill(timediff); + time_ngcer_pmt4_only_xy->Fill(ycerr,xcerr); + time_ngcer_pmt4_only_xy_w->Fill(ycerr,xcerr,ngcer_pulseamp[nhit]); + time_ngcer_pmt4_only_dv->Divide(time_ngcer_pmt4_only_xy_w,time_ngcer_pmt4_only_xy); + + if (timediff > -39. && timediff < -31.){ + amp_pmt4only->Fill(ngcer_pulseamp[nhit]); + } + if(inside == 1){ + time_ngcer_pmt4_inside->Fill(timediff); + } + + } + + + /* if (i > 98461 && i < 98469){ + + cout << "ev, hit, counter, pulsetime, starttime, timediff: " << i << " " << nhit << " " << ngcer_counter[nhit] << " " << ngcer_pulsetime[nhit] << " " << starttime << " " << timediff << endl; + + } */ + + } // if counter = .. + + } // closes the counter loop + + } // closes the hit per entry loop + + } // closes the entry loop + + + // gStyle->SetOptStat(kTrue); + gStyle->SetCanvasColor(10); + gStyle->SetFrameFillColor(10); + gStyle->SetCanvasBorderMode(0); + gStyle->SetPadBorderMode(0); + // gStyle->SetPalette(kCMYK); + // gStyle->SetPalette(kBrownCyan); + gStyle->SetPalette(kMint); + // gStyle->SetPalette(kCandy); + + gStyle->SetOptStat(0); + + + // Pulse integral all and good + + TCanvas *c12 = new TCanvas("c12","",900,900); + c12->Divide(2,2); + for(Int_t mmm = 1; mmm < 5; mmm++){ + c12->cd(mmm); + formatit_1h(int_ngcer[mmm],"ADC Pulse Integral (pC)","Events","all hits"); + formatit_1h_same(int_goodngcer[mmm],"","","good hits"); + } + c12->Print("ngcer_int.png"); + + // llllllllllllllllllllllllllllllllllllllll + + // Pulse amplitude all and good + + TCanvas *c13 = new TCanvas("c13","",900,900); + c13->Divide(2,2); + for(Int_t mmm = 1; mmm < 5; mmm++){ + c13->cd(mmm); + formatit_1h(amp_ngcer[mmm],"ADC Pulse Amplitude (mV)","Events","all hits"); + formatit_1h_same(amp_goodngcer[mmm],"","","good hits"); + if (mmm == 4){ + // formatit_1h_same4(amp_pmt4only,"","","PMT 4 only"); + // formatit_1h_same4(time_ngcer_pmt1_from4,"","","PMT 1, 4"); + } + } + c13->Print("ngcer_amp.png"); + + // llllllllllllllllllllllllllllllllllllllll + + // Pulse time all and good + + TCanvas *c14 = new TCanvas("c14","",900,900); + c14->Divide(2,2); + for(Int_t mmm = 1; mmm < 5; mmm++){ + c14->cd(mmm); + formatit_1h(time_ngcer[mmm],"StartTime - ADC Pulse Time (ns)","Events","all hits"); + formatit_1h_same3(time_ngcer_calo[mmm],"","","cal > 0.7"); + formatit_1h_same2(time_ngcer_reftime[mmm],"","","refamp cut"); + formatit_1h_same4(time_ngcer_delta[mmm],"","","delta cut"); + // formatit_1h_same5(time_ngcer_calo_reftime[mmm],"","","reftime cut"); + + if (mmm == 1){ + formatit_1h_same(time_ngcer_pmt1,"","","PMT 1 only"); + } + if (mmm == 2){ + formatit_1h_same(time_ngcer_pmt2,"","","PMT 2 only"); + } + if (mmm == 3){ + formatit_1h_same(time_ngcer_pmt3,"","","PMT 3 only"); + } + if (mmm == 4){ + formatit_1h_same(time_ngcer_pmt4,"","","PMT 4 only"); + // formatit_1h_same4(time_ngcer_pmt4_inside,"","","PMT 4, inside"); + } + + } + c14->Print("ngcer_time_reftime.png"); + + // llllllllllllllllllllllllllllllllllllllll + + // Y vs X for small peak + + TCanvas *c15 = new TCanvas("c15","",900,900); + c15->Divide(2,2); + c15->cd(1); + formatit_2dd(time_ngcer_pmt1_dv,"PMT 1 (small peak)","Y at Cher (cm)","X at Cher (cm)",0); + c15->cd(2); + formatit_2dd(time_ngcer_pmt2_dv,"PMT 2 (small peak)","Y at Cher (cm)","X at Cher (cm)",0); + c15->cd(3); + formatit_2dd(time_ngcer_pmt3_dv,"PMT 3 (small peak)","Y at Cher (cm)","X at Cher (cm)",0); + c15->cd(4); + formatit_2dd(time_ngcer_pmt4_dv,"PMT 4 (small peak)","Y at Cher (cm)","X at Cher (cm)",0); + + c15->Print("ngcer_xycer_smallpeak.png"); + + // Y vs X for small peak with delta cut + + TCanvas *c25 = new TCanvas("c25","",900,900); + c25->Divide(2,2); + c25->cd(1); + formatit_2dd(time_ngcer_pmt1_dv_delta,"PMT 1 (small peak), delta cut","Y at Cher (cm)","X at Cher (cm)",0); + c25->cd(2); + formatit_2dd(time_ngcer_pmt2_dv_delta,"PMT 2 (small peak), delta cut","Y at Cher (cm)","X at Cher (cm)",0); + c25->cd(3); + formatit_2dd(time_ngcer_pmt3_dv_delta,"PMT 3 (small peak), delta cut","Y at Cher (cm)","X at Cher (cm)",0); + c25->cd(4); + formatit_2dd(time_ngcer_pmt4_dv_delta,"PMT 4 (small peak), delta cut","Y at Cher (cm)","X at Cher (cm)",0); + + c25->Print("ngcer_xycer_smallpeak_deltacut.png"); + + + // Y vs X for small peak with delta cut + + TCanvas *c35 = new TCanvas("c35","",900,900); + c35->Divide(2,2); + c35->cd(1); + formatit_2dd(time_ngcer_pmt1_only_dv,"PMT 1 only","Y at Cher (cm)","X at Cher (cm)",0); + c35->cd(2); + formatit_2dd(time_ngcer_pmt2_only_dv,"PMT 2 only","Y at Cher (cm)","X at Cher (cm)",0); + c35->cd(3); + formatit_2dd(time_ngcer_pmt3_only_dv,"PMT 3 only","Y at Cher (cm)","X at Cher (cm)",0); + c35->cd(4); + formatit_2dd(time_ngcer_pmt4_only_dv,"PMT 4 only","Y at Cher (cm)","X at Cher (cm)",0); + + c35->Print("ngcer_xycer_perpmtonly.png"); + + + // delta for small peak + + TCanvas *c16 = new TCanvas("c16","",900,900); + c16->Divide(2,2); + c16->cd(1); + formatit_1h(delta_per_pmt[1],"Delta (%)","Events","PMT 1, all hits/events"); + formatit_1h_same(time_ngcer_pmt1_1ddelta,"","","PMT 1, small peak"); + c16->cd(2); + formatit_1h(delta_per_pmt[2],"Delta (%)","Events","PMT 2, all hits/events"); + formatit_1h_same(time_ngcer_pmt2_1ddelta,"","","PMT 2, small peak"); + c16->cd(3); + formatit_1h(delta_per_pmt[3],"Delta (%)","Events","PMT 3, all hits/events"); + formatit_1h_same(time_ngcer_pmt3_1ddelta,"","","PMT 3, small peak"); + c16->cd(4); + formatit_1h(delta_per_pmt[4],"Delta (%)","Events","PMT 4, all hits/events"); + formatit_1h_same(time_ngcer_pmt4_1ddelta,"","","PMT 4, small peak"); + + c16->Print("ngcer_delta_smallpeak_andall.png"); + + // --------------------------------------- + + TCanvas *c17 = new TCanvas("c17","",900,900); + c17->Divide(2,2); + + c17->cd(1); + formatit_2dd(time_ngcer_pmt1_dvxp,"PMT 1 (small peak), no cut","XP_FP (rad)","X at Cher (cm)",0); + c17->cd(2); + formatit_2dd(time_ngcer_pmt2_dvxp,"PMT 2 (small peak), no cut","XP_FP (rad)","X at Cher (cm)",0); + c17->cd(3); + formatit_2dd(time_ngcer_pmt3_dvxp,"PMT 3 (small peak), no cut","XP_FP (rad)","X at Cher (cm)",0); + c17->cd(4); + formatit_2dd(time_ngcer_pmt4_dvxp,"PMT 4 (small peak), no cut","XP_FP (rad)","X at Cher (cm)",0); + + c17->Print("ngcer_xpfpcer_smallpeak.png"); + + ////////////////////////// + + /* TCanvas *c18 = new TCanvas("c18","",900,900); + c18->Divide(2,2); + c18->cd(4); + formatit_1h(time_ngcer_pmt4_tref,"","","PMT 1, tdiff: (-42,-31)"); */ + + ////////////////////////// + + TCanvas *c19 = new TCanvas("c19","",900,900); + c19->Divide(2,2); + + c19->cd(1); + formatit_2dd(time_ngcer_pmt1_dvxp_delta,"PMT 1 (small peak), delta cut","XP_FP (rad)","X at Cher (cm)",0); + c19->cd(2); + formatit_2dd(time_ngcer_pmt2_dvxp_delta,"PMT 2 (small peak), delta cut","XP_FP (rad)","X at Cher (cm)",0); + c19->cd(3); + formatit_2dd(time_ngcer_pmt3_dvxp_delta,"PMT 3 (small peak), delta cut","XP_FP (rad)","X at Cher (cm)",0); + c19->cd(4); + formatit_2dd(time_ngcer_pmt4_dvxp_delta,"PMT 4 (small peak), delta cut","XP_FP (rad)","X at Cher (cm)",0); + + c19->Print("ngcer_xpfpcer_delta_smallpeak.png"); + + + + + return 0; + +} + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Readme.txt b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b4f3e2a6bd4457d0f332d89e0fbdf1c846bb473 --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Readme.txt @@ -0,0 +1,80 @@ + +This repository contains all analysis scripts used for d2n experiment (2020). + + + + + +*********************************************************************************************************** +A1n analysis before starting d2n analysis: + +1. May 1st, 2020: git clone from https://eicweb.phy.anl.gov/jlab/hallc/exp/polhe3/hallc_replay.git + +2. May 26th, 2020: Created branch murchhana_replays. All A1n analysis work was done in this branch. + +3. May 27th, 2020 : merge request created for the fixed typo in hms replay script h_fadc_debug_param. Merge branch "murchhana_replays" into "master". + +4. October 6th, 2020: Pulled "master" to branch "murchhana_replays". + + + + + + + +*********************************************************************************************************** +Starting point for d2n analysis: + +1. August 18th, 2020: Created new branch murchhana_d2n. All d2n analysis work is being done in this branch. + +2. October 12th, 2020: Pulled "master" to branch "murchhana_d2n". + +3. Most recent SHMS/HMS run numbers were not present in the standard.kinematics files. Added those run numbers manually to replay required SHMS/HMS runs. + + +***************** Reference timing cuts ****************** + +1. Changed all t_shms_TdcTimeWindowMin and t_hms_TdcTimeWindowMin to 0 and t_shms_TdcTimeWindowMax and t_hms_TdcTimeWindowMax to 100000. + +2. Did a 200000 replay for SHMS runs 11395,11396,11398,11358,11369,11210,11217,11498,11538 and HMS runs 4195,4196,4192,4148,4160,3993,3994,4306,4331. + +3. The script to check reference time cuts are in /group/c-polhe3/Users/murchhana/d2n_2020/Ref_time_analysis folder. + +4. Checked reference time cuts for all those runs and the cuts were determined to be same as A1n. + + +******************** Detector time window cuts ***************** + +1. Performed the detector time window check for HMS and SHMS Noble gas Cherenkov. + +2. Set the determined reference time cuts in param files. +/group/c-polhe3/Users/murchhana/hallc_replay/PARAM/HMS/GEN/h_reftime_cut.param +/group/c-polhe3/Users/murchhana/hallc_replay/PARAM/SHMS/GEN/p_reftime_cut.param +/group/c-polhe3/Users/murchhana/hallc_replay/PARAM/TRIG/thms.param +/group/c-polhe3/Users/murchhana/hallc_replay/PARAM/TRIG/tshms.param + +3. Made the software time window cuts wider fot Cherenkov (pngcer_cuts.param, hCER_cuts.param), Hodoscope (phodo_cuts.param, hhodo_cuts.param), Calorimeter (pcal_cuts.param, hcal_cuts.param), Drift Chamber (pdc_cuts.param, hdc_cuts.param). + +4. Did a 200000 replay for SHMS runs 11498,11538,11395,11396,11398,11358,11369,11210,11217 and HMS runs 4306,4331,4195,4192,4196,3994,4148. + +5. Junhao, Mingyu and Melanie used these root files to check the Hodoscope, DC and calorimeter time window. I did the Cherenkov time window check. + +6. All Cherenkov time window scripts are in /group/c-polhe3/Users/murchhana/d2n_2020/Detector_time_window_cuts/cherenkov folder. + +7. The Cherenkov time window cuts were found to be for SHMS/ HMS were same as A1n. + + +**************** Cherenkov Calibration ****************** + +1. Set the obtained detector time window cuts were set in hcer_cuts.param/p_ngcer_cuts.param filed in hallc_replay/PARAM folder. + +2. Did a 200000 replay of HMS runs 4306,4267,4195,3732 and SHMS run 11538. + +3. Both HMS and SHMS calibration scripts are in /group/c-polhe3/Users/murchhana/d2n_2020/cherenkov_calibration folder. + +4. HMS Cherenkov calibration was done using both Method 1 and Method 2 and the result differed by significat amount for run 4306. As Method 1 is reliable because we directly fit the single photo electron peak, chose the calibration constant obtained from cosmic run 03732 (lowest background gived better peak location). Set the calibration constant in hcer_calib.param file. + +5. SHMS CHerenkov calibration was done using Method 2 only for run 11538.The old calibration constants present in the param file were obtained from run 9643,9644,9645. The new calibration constants obtained from run 11538 agrees well with the old oned for PMT2, PMT 3 and PMT 4. I will update the SHMS calibration constant in the p_ngcer_calib.param file after discussing with others. + + + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_3993_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_3993_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a2e7493e8435303482abec3c998585b797dfd31f Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_3993_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_3994_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_3994_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7c83f60724be2a107ee5c3be4fd408bab2bf0943 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_3994_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4148_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4148_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f50b75412b94edb009a25de85700e75348b02dd8 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4148_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4160_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4160_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b9a9b22633bc7cd682a37bdd56089e642d20be88 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4160_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4192_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4192_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fa96fdef1e28abdf18c299f29f2e0cb8c70a3eae Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4192_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4195_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4195_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..70070a7583a13e2885a5096c09a3883e58299075 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4195_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4196_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4196_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1704970f3742c576a1e6ca1d885fe53562952efb Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4196_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4306_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4306_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..67fc04c15e2f33bd37a3fa5c84d5269d67a24f6e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4306_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4331_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4331_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..da4e8e34c1e705647eb870ad5071ccec55adae02 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1-5_4331_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_3993_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_3993_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..af838cf40aec159ad9d6584c3fcf65e1683cb9b3 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_3993_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_3994_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_3994_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..26c6da0c4c105fee3e1d70042e1c29bd96d3b412 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_3994_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4148_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4148_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..938164f3d8b733c0ab53680c824144e84268a4b4 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4148_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4160_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4160_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d68d13396d30a1c0e4aacb112afea052bc4cbd95 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4160_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4192_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4192_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2123537a80b45bf84d6accdb405875e970a1f2e6 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4192_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4195_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4195_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f8b3d236d2fa4a4915630ab55c42ad633855eded Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4195_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4306_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4306_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06faa6c6cc315429e94d7b068cc31c02d6605344 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4306_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4331_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4331_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..98881d0d3098bd9639bd80405ce84ed8cdb8f7bb Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hDCREF1_4331_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_3993_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_3993_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..59dbff1f96e11429014c185c3c0d68baa81d853b Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_3993_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_3994_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_3994_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e9f7d33cafab2ae701d911c962392de6466c64db Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_3994_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4148_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4148_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cd06e5b5c559302d993e9fc7e264f5092b5ef049 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4148_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4160_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4160_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e60ae28d1b979b05a77b8b1528ff9bb9798b477a Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4160_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4192_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4192_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..685eb0025ba933f35db1a14e5fe649eb57effe73 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4192_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4195_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4195_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f22ef53803251ab245680694ab55111a634c4a67 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4195_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4196_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4196_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c98e16597f7dd5d305c232e65c6210fb0e98a9b3 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4196_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4306_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4306_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bca524962a2e86bc24c1dc8f738e1d26af99cc71 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4306_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4331_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4331_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5706a2fd7d9701bafddd1bb8569285fd5ff8ef6d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hFADC_ROC1_4331_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_3993_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_3993_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2db0b35f983b8c8e6cb4232ed6904ddca78f7640 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_3993_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_3994_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_3994_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5ec3deda1b746de9e6597400a466554554c2cb97 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_3994_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4148_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4148_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c4954a879413af59e1abd4ce34c14dabd66b840a Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4148_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4160_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4160_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..083a2ff9119c0e440025bf1cb1d5ac66727bfe43 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4160_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4192_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4192_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4fcf2b7a8aa566e67bf3f07f67b7fb96323d0ea3 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4192_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4195_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4195_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ca0691727cfc73d8875a7c716487957035241827 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4195_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4196_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4196_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5966866826724e45c76020674d0c2a47cec34e20 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4196_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4306_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4306_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..12e8d6b760706617f964765b496dece4c04d6868 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4306_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4331_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4331_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8be291f98727358b277f0ee1d8717ac74973cd70 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/HMS_plots/hT2_4331_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_10803.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_10803.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bad6d4448da7291342633612c430f4c89bc79109 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_10803.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_10886.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_10886.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1b9f84d5a9f3c30be6d58454c816bb56e18e60f4 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_10886.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11046.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11046.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1a6f8c8522bab65dc967172310c59158856ea8d9 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11046.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11055.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11055.pdf new file mode 100644 index 0000000000000000000000000000000000000000..72077b5d820e68906b0aa749d9eab585781174dd Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11055.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11074.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11074.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06cf65edfab385fb431fe6e5335f8f279ec2361c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11074.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11210_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11210_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c3378d474129cbc671c49120febe55a544b80c50 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11210_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11217_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11217_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..753a5cd028fd6b1f1d0c92754083645f6512e9f5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11217_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11358_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11358_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b04218394f4f8c54b3ad1f4f00ebf954f5732ad8 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11358_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11369_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11369_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..03128f19a90395e50a6b31e298db4041d88fbea9 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11369_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11395.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11395.pdf new file mode 100644 index 0000000000000000000000000000000000000000..433b37ff2529e0e4b00dea33a8bc4806ea2eeb2f Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11395.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11395_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11395_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..04d9d4b0af9f82dc7016926c64917d68806f9f30 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11395_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11396.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11396.pdf new file mode 100644 index 0000000000000000000000000000000000000000..aa38804ba73a1c4914f2951011c6d50a615d2a1e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11396.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11396_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11396_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..34d6e3a0df3a987b4c9c5d725e71d8014e95cef8 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11396_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11398.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11398.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a283b7fa9fd4afa6b9ac097dffd53475f7680b94 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11398.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11398_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11398_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..71c1d45247a6708aed034cba4dc5d485dd8a1576 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11398_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11498_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11498_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..413dda330de0eed0a08d5ea70f47e4c104fd5087 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11498_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11538_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11538_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..540ff3aa44b3b243ec189f73d4abfaf145e92ad4 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/PT1_pT2_11538_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_10803.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_10803.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6cd309ad7103098677f8c6d3a5dd831f9f97514f Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_10803.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_10886.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_10886.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b94c9ca0b04b6ed29ff341ebde1487595bfa2e4e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_10886.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11046.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11046.pdf new file mode 100644 index 0000000000000000000000000000000000000000..38ffe00972175144789b4d67924f7e694325d346 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11046.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11055.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11055.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d521924533259fc5c977f5e3ddf11e480b492046 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11055.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11074.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11074.pdf new file mode 100644 index 0000000000000000000000000000000000000000..125ba11f20b4614d4a76eaa957c73bc05e51ffec Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11074.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11210_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11210_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a857440e00762735a818ccea0d0b0e693a453b37 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11210_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11217_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11217_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1084aa81d30e0d4c8d6c903621c016fc036b3e95 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11217_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11358_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11358_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d7e2ed733d9fe0ab57fab693acee1e83e9644c24 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11358_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11369_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11369_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2f58d757a0937e545a0d5aa86face0069a6857b0 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11369_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11395.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11395.pdf new file mode 100644 index 0000000000000000000000000000000000000000..301c7c205fd0d57f042d27c355ae95888a6073a2 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11395.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11395_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11395_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4984ab1ec8aad1cc20c3b0b84f8ccafe0a129be5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11395_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11396.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11396.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7543da0a4134c2cb8396a9719b3827eda7206baa Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11396.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11396_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11396_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ef1416dd5017b1680a6792e7a6d31670e7647b9d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11396_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11398.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11398.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f023db0f4830c5012ec5b1a878cd2a543732e64c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11398.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11398_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11398_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d38140f36fa5b3605230318f863ee842996a2ce8 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11398_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11498_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11498_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dd426653955d56726a8d53d2dd43c30ffc00c5d7 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11498_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11538_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11538_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7ffa558786c73293dfd4316a9c7f5d6dc5dae0a6 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_11538_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_14400.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_14400.pdf new file mode 100644 index 0000000000000000000000000000000000000000..72737162aba4a237f48c6de17c9bc2ec660992b9 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_14400.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_real_11046.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_real_11046.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f6068d22a12b5bd1f85960a05d4ffb6e214229ee Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1-10_real_11046.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_10803.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_10803.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ab9a26e3a0fe3a2d6e04702bcd3621cb78dfc789 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_10803.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_10886.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_10886.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2d93dd5ee6e6d5fd4146053a28fab10d52546c50 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_10886.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11055.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11055.pdf new file mode 100644 index 0000000000000000000000000000000000000000..181ccf49737d936ba4d3528148295be9d1f721dd Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11055.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11074.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11074.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b8bf2cd5b561d22d99f7862fac7c14456ae06a0e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11074.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11210_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11210_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ebb501113fd2a7d3f6a734e3c90cb82927fda197 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11210_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11217_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11217_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0331b35e9bcc1c373c8e75e36882373ee093f724 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11217_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11358_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11358_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..de7b2be49d244e3c45e5ff6c57f9c48822dc9ecc Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11358_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11369_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11369_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eab08fda452329cd85aaab3efd54833ce20da115 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11369_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11395.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11395.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d927f846d78468e6f8a6f3c199e27c0ad9e6219c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11395.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11395_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11395_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..80773a9591cd7b45b3019551567315006e062068 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11395_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11396.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11396.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1490242269805f675dd265749086dfdc9d8b6e00 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11396.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11396_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11396_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..33d4f735ee23fc73f9d441f98343e733fa2713c5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11396_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11398.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11398.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4fca7e745e6b30c63b384c5b4c4dc78d03fa9259 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11398.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11398_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11398_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..884b6b9da24748c74990e85567aa297ebac05db7 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11398_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11498_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11498_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e0d0b15633182d24ff4b89553b33426e8f96b985 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11498_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11538_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11538_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eed7b9b582a2f498a83130fa1a0c0327e7e9e64f Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pDCREF1_11538_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_10803.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_10803.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b4d71f0eb7deb9c3e56007f2f92f4e0c2e5a0590 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_10803.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_10886.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_10886.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5438bb7834116f7cd412e868cb41c002254aa8e5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_10886.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11046.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11046.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eeda6149f413b7e665c3253987fa4a7ed5b25e93 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11046.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11055.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11055.pdf new file mode 100644 index 0000000000000000000000000000000000000000..315d770e06a0917a4ff267739b1d6c490f9c55a7 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11055.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11074.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11074.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bb22e0d1fccbc584df69c0e9737d38a408949398 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11074.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11210_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11210_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..edc6072a32e9ae49f4ebba40a00e2e0210e98fbe Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11210_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11217_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11217_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a8da4332c48b27f8f0cc3d7e8c42675111de6e08 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11217_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11358_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11358_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..92d5d1d78a5dad04429fdb7670ca90048671c546 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11358_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11369_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11369_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1c007fe98f4d06b51c2cdc359291f4e9940bfe5d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11369_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11395.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11395.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8d4e2185762e4a58b5aba3a5835610c0595e5cd2 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11395.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11395_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11395_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fc58455392b02f44f344372b6a35acac0afd2855 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11395_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11396.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11396.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ff41107ac45c56c4cfab814d102bff77fff363b6 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11396.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11396_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11396_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7f55b239b1e4471f28e30293903e95cfd16c45fa Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11396_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11398.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11398.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ebcbab1f67477ebc57961a7c7d3d36f3265c6230 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11398.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11398_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11398_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a7e2c4c4c8d1005082e39049cf948004fd0b5f0f Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11398_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11498_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11498_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0d23a6f8ac924eb8d2488c006a88085352835404 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11498_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11538_october.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11538_october.pdf new file mode 100644 index 0000000000000000000000000000000000000000..459736751403fceee7731fbe153a57c38b7c1fe7 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/SHMS_plots/pFADC_ROC2_11538_october.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/ref_time_plots_HMS.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/ref_time_plots_HMS.C new file mode 100644 index 0000000000000000000000000000000000000000..4884f865378361bcfa9bedc1e0f5850022b4878d --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/ref_time_plots_HMS.C @@ -0,0 +1,261 @@ +#include <fstream> +#include <iostream> +#include <sstream> +#include <string> +#include <vector> +#include <cstring> +#include <functional> +#include <numeric> + + +#include "TROOT.h" +#include "TNtuple.h" +#include "TFile.h" +#include "TROOT.h" +#include "TCanvas.h" +#include "TGraphErrors.h" +#include "TGraph.h" +#include "TF1.h" +#include "TPad.h" +#include "TH1F.h" +#include "TLegend.h" +#include "TStyle.h" + +using namespace std; + +void ref_time_plots_HMS() + +{ + TFile *fileIN = new TFile("/u/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/hms_replay_production_all_04331_200000.root"); + // TFile *fileIN = new TFile("/u/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/hms_replay_production_default_11398_-1.root"); //D2N full replay default + + auto T1 = (TTree*)fileIN->Get("T"); + + gStyle->SetOptFit(1111); //setting stat bar options + gStyle->SetStatFormat("6.6g"); + //gStyle->SetStatY(0.9); + //gStyle->SetStatX(0.9); + // gStyle->SetStatW(0.); + // gStyle->SetStatH(0.1); + gStyle->SetLegendFont(42); + gStyle->SetLegendTextSize(0.015); + + + Int_t hFADC_cut=3400;//3400 for A1n + Int_t hT1_cut=1400;//1400 for A1n + Int_t hDCREF_cut=20000; + + Int_t hFADC_y_max=40000; + Int_t hT1_y_max=40000; + Int_t hDCREF_y_max=100000; + + // Create lines to show the reference time cuts + TLine *hFADC_line=new TLine(hFADC_cut,0,hFADC_cut,hFADC_y_max); + TLine *hT1_line=new TLine(hT1_cut,0,hT1_cut,hT1_y_max); + TLine *hDCREF_line=new TLine(hDCREF_cut,0,hDCREF_cut,hDCREF_y_max); + + hFADC_line->SetLineStyle(9); + hFADC_line->SetLineColor(kRed); + hFADC_line->SetLineWidth(2); + hT1_line->SetLineStyle(9); + hT1_line->SetLineColor(kRed); + hT1_line->SetLineWidth(2); + hDCREF_line->SetLineStyle(9); + hDCREF_line->SetLineColor(kRed); + hDCREF_line->SetLineWidth(2); + + + + auto c1= new TCanvas("c1","HMS Reference Times Plots FADC (CAL,CER,HODO)"); + gPad->SetLogy(); + + TH1F *hFADC_TREF_ROC1_adcPulseTimeRaw_no_cut=new TH1F("hFADC_TREF_ROC1_adcPulseTimeRaw_no_cut","hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1-3",200,0,5000); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPulseTimeRaw>>hFADC_TREF_ROC1_adcPulseTimeRaw_no_cut"); + + TH1F *hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1=new TH1F("hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1","hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1-3",200,0,5000); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPulseTimeRaw>>hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1","T.hms.hFADC_TREF_ROC1_adcMultiplicity==1"); + + TH1F *hFADC_TREF_ROC1_adcPulseTimeRaw_cut_2=new TH1F("hFADC_TREF_ROC1_adcPulseTimeRaw_cut_2","hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1-3",200,0,5000); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPulseTimeRaw>>hFADC_TREF_ROC1_adcPulseTimeRaw_cut_2","T.hms.hFADC_TREF_ROC1_adcMultiplicity==2"); + + TH1F *hFADC_TREF_ROC1_adcPulseTimeRaw_cut_3=new TH1F("hFADC_TREF_ROC1_adcPulseTimeRaw_cut_3","hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1-3",200,0,5000); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPulseTimeRaw>>hFADC_TREF_ROC1_adcPulseTimeRaw_cut_3","T.hms.hFADC_TREF_ROC1_adcMultiplicity==3"); + + + hFADC_TREF_ROC1_adcPulseTimeRaw_no_cut->SetLineColor(1); + hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1->SetLineColor(2); + hFADC_TREF_ROC1_adcPulseTimeRaw_cut_2->SetLineColor(3); + hFADC_TREF_ROC1_adcPulseTimeRaw_cut_3->SetLineColor(4); + hFADC_TREF_ROC1_adcPulseTimeRaw_no_cut->Draw(); + hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1->Draw("SAME"); + hFADC_TREF_ROC1_adcPulseTimeRaw_cut_2->Draw("SAME"); + hFADC_TREF_ROC1_adcPulseTimeRaw_cut_3->Draw("SAME"); + + auto legend = new TLegend(0.1,0.7,0.48,0.9); + // legend->SetHeader("The Legend Title","C"); // option "C" allows to center the header + legend->AddEntry(hFADC_TREF_ROC1_adcPulseTimeRaw_no_cut,"no multiplicity cuts","l"); + legend->AddEntry(hFADC_TREF_ROC1_adcPulseTimeRaw_cut_1,"T.hms.hFADC_TREF_ROC1_adcMultiplicity==1","l"); + legend->AddEntry(hFADC_TREF_ROC1_adcPulseTimeRaw_cut_2,"T.hms.hFADC_TREF_ROC1_adcMultiplicity==2","l"); + legend->AddEntry(hFADC_TREF_ROC1_adcPulseTimeRaw_cut_3,"T.hms.hFADC_TREF_ROC1_adcMultiplicity==3","l"); + legend->Draw(); +hFADC_line->Draw("SAME"); + c1->Update(); + + + /* + auto c2= new TCanvas("c1","HMS Reference Times Plots TDC (HODO)"); + c2->Divide(2,2); + c2->cd(1); + gPad->SetLogy(); + T1->Draw("T.hms.hT1_tdcMultiplicity>>hT1_tdcMultiplicity"); + + c2->cd(2); + T1->Draw("T.hms.hT1_tdcTimeRaw>>hT1_tdcTimeRaw"); + + + c2->cd(3); + T1->Draw("T.hms.hT2_tdcMultiplicity>>hT2_tdcMultiplicity"); + + c2->cd(4); + T1->Draw("T.hms.hT2_tdcTimeRaw>>hT2_tdcTimeRaw"); + + c2->Modified(); + c2->Update(); + */ + + auto c2= new TCanvas("c2","HMS Reference Times Plots TDC (HODO)"); + + gPad->SetLogy(); + TH1F *hT2_tdcTimeRaw_cut_1=new TH1F("hT2_tdcTimeRaw_cut_1","hT2_tdcTimeRaw_cut_1-3",200,0,2500); + T1->Draw("T.hms.hT2_tdcTimeRaw>>hT2_tdcTimeRaw_cut_1","T.hms.hT2_tdcMultiplicity==1"); + + TH1F *hT2_tdcTimeRaw_cut_2=new TH1F("hT2_tdcTimeRaw_cut_2","hT2_tdcTimeRaw_cut_1-3",200,0,2500); + T1->Draw("T.hms.hT2_tdcTimeRaw>>hT2_tdcTimeRaw_cut_2","T.hms.hT2_tdcMultiplicity==2"); + + TH1F *hT2_tdcTimeRaw_cut_3=new TH1F("hT2_tdcTimeRaw_cut_3","hT2_tdcTimeRaw_cut_1-3",200,0,2500); + T1->Draw("T.hms.hT2_tdcTimeRaw>>hT2_tdcTimeRaw_cut_3","T.hms.hT2_tdcMultiplicity==3"); + + hT2_tdcTimeRaw_cut_1->SetLineColor(2); + hT2_tdcTimeRaw_cut_2->SetLineColor(3); + hT2_tdcTimeRaw_cut_3->SetLineColor(4); + hT2_tdcTimeRaw_cut_1->Draw(); + hT2_tdcTimeRaw_cut_2->Draw("SAME"); + hT2_tdcTimeRaw_cut_3->Draw("SAME"); + auto legend2 = new TLegend(0.1,0.7,0.48,0.9); + + legend2->AddEntry(hT2_tdcTimeRaw_cut_1,"T.hms.hT2_tdcMultiplicity==1","l"); + legend2->AddEntry(hT2_tdcTimeRaw_cut_2,"T.hms.hT2_tdcMultiplicity==2","l"); + legend2->AddEntry(hT2_tdcTimeRaw_cut_3,"T.hms.hT2_tdcMultiplicity==3","l"); + legend2->Draw(); + + hT1_line->Draw("SAME"); + hT2_tdcTimeRaw_cut_1->SetAxisRange(0.1,2500,"X"); + hT2_tdcTimeRaw_cut_1->SetAxisRange(0.1,1000000,"Y"); + c2->Modified(); + c2->Update(); + + + auto c3= new TCanvas("c3","HMS Reference Times Plots TDC (DC)"); + + c3->Divide(2,1); + c3->cd(1); + + gPad->SetLogy(); + TH1F *hDCREF1_tdcTimeRaw=new TH1F("hDCREF1_tdcTimeRaw","hDCREF1-5_tdcTimeRaw",1000,0,24000); + TH1F *hDCREF2_tdcTimeRaw=new TH1F("hDCREF2_tdcTimeRaw","hDCREF1-5_tdcTimeRaw",1000,0,24000); + TH1F *hDCREF3_tdcTimeRaw=new TH1F("hDCREF3_tdcTimeRaw","hDCREF1-5_tdcTimeRaw",1000,0,24000); + TH1F *hDCREF4_tdcTimeRaw=new TH1F("hDCREF4_tdcTimeRaw","hDCREF1-5_tdcTimeRaw",1000,0,24000); + TH1F *hDCREF5_tdcTimeRaw=new TH1F("hDCREF5_tdcTimeRaw","hDCREF1-5_tdcTimeRaw",1000,0,24000); + + T1->Draw("T.hms.hDCREF1_tdcTimeRaw>>hDCREF1_tdcTimeRaw"); + T1->Draw("T.hms.hDCREF2_tdcTimeRaw>>hDCREF1_tdcTimeRaw"); + T1->Draw("T.hms.hDCREF3_tdcTimeRaw>>hDCREF1_tdcTimeRaw"); + T1->Draw("T.hms.hDCREF4_tdcTimeRaw>>hDCREF1_tdcTimeRaw"); + T1->Draw("T.hms.hDCREF5_tdcTimeRaw>>hDCREF5_tdcTimeRaw"); + + hDCREF1_tdcTimeRaw->SetAxisRange(0.1,24000,"X"); + hDCREF1_tdcTimeRaw->SetAxisRange(0.1,100000000,"Y"); + + hDCREF1_tdcTimeRaw->SetLineColor(45); + hDCREF2_tdcTimeRaw->SetLineColor(46); + hDCREF3_tdcTimeRaw->SetLineColor(47); + hDCREF4_tdcTimeRaw->SetLineColor(48); + hDCREF5_tdcTimeRaw->SetLineColor(49); + + + hDCREF1_tdcTimeRaw->Draw(); + hDCREF2_tdcTimeRaw->Draw("SAME"); + hDCREF3_tdcTimeRaw->Draw("SAME"); + hDCREF4_tdcTimeRaw->Draw("SAME"); + hDCREF5_tdcTimeRaw->Draw("SAME"); + + hDCREF_line->Draw("SAME"); + + auto legend3 = new TLegend(0.1,0.6,0.2,0.9); + legend3->AddEntry(hDCREF1_tdcTimeRaw,"hDCREF1","l"); + legend3->AddEntry(hDCREF2_tdcTimeRaw,"hDCREF2","l"); + legend3->AddEntry(hDCREF3_tdcTimeRaw,"hDCREF3","l"); + legend3->AddEntry(hDCREF4_tdcTimeRaw,"hDCREF4","l"); + legend3->AddEntry(hDCREF5_tdcTimeRaw,"hDCREF5","l"); + + legend3->Draw(); + c3->Update(); + + + c3->cd(2); + + gPad->SetLogy(); + TH1F *hDCREF1_tdcMultiplicity=new TH1F("hDCREF1_tdcMultiplicity","hDCREF1_tdcMultiplicity",100,0,4); + + T1->Draw("T.hms.hDCREF1_tdcMultiplicity>>hDCREF1_tdcMultiplicity"); + + hDCREF1_tdcMultiplicity->SetLineColor(2); + hDCREF1_tdcMultiplicity->Draw(); + + + c3->Modified(); + c3->Update(); + + + + auto c4= new TCanvas("c4","HMS Reference Times Plots TDC (DC)"); + gPad->SetLogy(); + TH1F *hDCREF1_tdcTimeRaw_cut_1=new TH1F("hDCREF1_tdcTimeRaw_cut_1","hDCREF1-5_tdcTimeRaw_cut_1-3",1000,0,24000); + T1->Draw("T.hms.hDCREF1_tdcTimeRaw>>hDCREF1_tdcTimeRaw_cut_1","T.hms.hDCREF1_tdcMultiplicity==1"); + TH1F *hDCREF1_tdcTimeRaw_cut_2=new TH1F("hDCREF1_tdcTimeRaw_cut_2","hDCREF1-5_tdcTimeRaw_cut_1-3",1000,0,24000); + T1->Draw("T.hms.hDCREF1_tdcTimeRaw>>hDCREF1_tdcTimeRaw_cut_2","T.hms.hDCREF1_tdcMultiplicity==2"); + TH1F *hDCREF1_tdcTimeRaw_cut_3=new TH1F("hDCREF1_tdcTimeRaw_cut_3","hDCREF1-5_tdcTimeRaw_cut_1-3",1000,0,24000); + T1->Draw("T.hms.hDCREF1_tdcTimeRaw>>hDCREF1_tdcTimeRaw_cut_3","T.hms.hDCREF1_tdcMultiplicity==3"); + + + hDCREF1_tdcTimeRaw_cut_1->SetAxisRange(0.1,24000,"X"); + hDCREF1_tdcTimeRaw_cut_1->SetAxisRange(0.1,100000000,"Y"); + hDCREF1_tdcTimeRaw_cut_1->SetLineColor(1); + hDCREF1_tdcTimeRaw_cut_2->SetLineColor(2); + hDCREF1_tdcTimeRaw_cut_3->SetLineColor(3); + hDCREF1_tdcTimeRaw_cut_1->Draw(); + hDCREF1_tdcTimeRaw_cut_2->Draw("SAME"); + hDCREF1_tdcTimeRaw_cut_3->Draw("SAME"); + hDCREF_line->Draw("SAME"); + + auto legend4 = new TLegend(0.1,0.7,0.35,0.9); + legend4->AddEntry(hDCREF1_tdcTimeRaw_cut_1,"T.hms.hDCREF1_tdcMultiplicity==1","l"); + legend4->AddEntry(hDCREF1_tdcTimeRaw_cut_2,"T.hms.hDCREF1_tdcMultiplicity==2","l"); + legend4->AddEntry(hDCREF1_tdcTimeRaw_cut_3,"T.hms.hDCREF1_tdcMultiplicity==3","l"); + legend4->Draw(); + + c4->Modified(); + c4->Update(); + + + + /* + + + auto T2 = (TTree*)fileIN->Get("TSH;1"); + auto c1= new TCanvas("c1","HMS Scaler Rate"); + T2->Draw("H.pTRIG1.scalerRate>>scalerRate"); + */ + return 0; + +} diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/ref_time_plots_SHMS.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/ref_time_plots_SHMS.C new file mode 100644 index 0000000000000000000000000000000000000000..6da5d12c942d4bf6a1b6f2af372c5ec11dca3ba4 --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/Ref_time_analysis/ref_time_plots_SHMS.C @@ -0,0 +1,476 @@ +#include <fstream> +#include <iostream> +#include <sstream> +#include <string> +#include <vector> +#include <cstring> +#include <functional> +#include <numeric> + + +#include "TROOT.h" +#include "TNtuple.h" +#include "TFile.h" +#include "TROOT.h" +#include "TCanvas.h" +#include "TGraphErrors.h" +#include "TGraph.h" +#include "TF1.h" +#include "TPad.h" +#include "TH1F.h" +#include "TLegend.h" +#include "TStyle.h" + +using namespace std; + +void ref_time_plots_SHMS() +{ +Int_t nbin1=500; //200 before +Int_t nbin2=500; //100 before +Int_t nbin3=1000; + + TFile *fileIN = new TFile("/u/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/shms_replay_production_all_11538_200000.root"); // A1N +//TFile *fileIN = new TFile("/u/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/shms_replay_production_default_11369_-1.root"); //D2N full replay default + //TFile *fileIN = new TFile("/u/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/shms_replay_production_all_10886_-1.root"); //D2N full replay full branch + auto T1 = (TTree*)fileIN->Get("T"); + + gStyle->SetOptFit(1111); //setting stat bar options + gStyle->SetStatFormat("6.6g"); + //gStyle->SetStatY(0.9); + //gStyle->SetStatX(0.9); + // gStyle->SetStatW(0.); + // gStyle->SetStatH(0.1); + gStyle->SetLegendFont(42); + gStyle->SetLegendTextSize(0.015); + + + Int_t pFADC_cut=4200;//4200 for A1n + Int_t pT1_cut=3400;//3400 for A1n + Int_t pDCREF_cut=14400; + + Int_t pFADC_y_max=40000; + Int_t pT1_y_max=40000; + Int_t pDCREF_y_max=100000; + + + + // Create lines to show the reference time cuts + TLine *pFADC_line=new TLine(pFADC_cut,0,pFADC_cut,pFADC_y_max); + TLine *pT1_line=new TLine(pT1_cut,0,pT1_cut,pT1_y_max); + TLine *pDCREF_line=new TLine(pDCREF_cut,0,pDCREF_cut,pDCREF_y_max); + + pFADC_line->SetLineStyle(9); + pFADC_line->SetLineColor(kRed); + pFADC_line->SetLineWidth(2); + pT1_line->SetLineStyle(9); + pT1_line->SetLineColor(kRed); + pT1_line->SetLineWidth(2); + pDCREF_line->SetLineStyle(9); + pDCREF_line->SetLineColor(kRed); + pDCREF_line->SetLineWidth(2); + + + auto c1= new TCanvas("c1","SHMS Reference Times Plots FADC (CAL,CER,HODO)"); + gPad->SetLogy(); + + TH1F *pFADC_TREF_ROC2_adcPulseTimeRaw_no_cut=new TH1F("pFADC_TREF_ROC2_adcPulseTimeRaw_no_cut","pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1-3",nbin1,0,6000); + T1->Draw("T.shms.pFADC_TREF_ROC2_adcPulseTimeRaw>>pFADC_TREF_ROC2_adcPulseTimeRaw_no_cut"); + + TH1F *pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1=new TH1F("pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1","pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1-3",nbin1,0,6000); + T1->Draw("T.shms.pFADC_TREF_ROC2_adcPulseTimeRaw>>pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1","T.shms.pFADC_TREF_ROC2_adcMultiplicity==1"); + + TH1F *pFADC_TREF_ROC2_adcPulseTimeRaw_cut_2=new TH1F("pFADC_TREF_ROC2_adcPulseTimeRaw_cut_2","pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1-3",nbin1,0,6000); + T1->Draw("T.shms.pFADC_TREF_ROC2_adcPulseTimeRaw>>pFADC_TREF_ROC2_adcPulseTimeRaw_cut_2","T.shms.pFADC_TREF_ROC2_adcMultiplicity==2"); + + TH1F *pFADC_TREF_ROC2_adcPulseTimeRaw_cut_3=new TH1F("pFADC_TREF_ROC2_adcPulseTimeRaw_cut_3","pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1-3",nbin1,0,6000); + T1->Draw("T.shms.pFADC_TREF_ROC2_adcPulseTimeRaw>>pFADC_TREF_ROC2_adcPulseTimeRaw_cut_3","T.shms.pFADC_TREF_ROC2_adcMultiplicity==3"); + + pFADC_TREF_ROC2_adcPulseTimeRaw_no_cut->SetLineColor(1); + pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1->SetLineColor(2); + pFADC_TREF_ROC2_adcPulseTimeRaw_cut_2->SetLineColor(3); + pFADC_TREF_ROC2_adcPulseTimeRaw_cut_3->SetLineColor(4); + pFADC_TREF_ROC2_adcPulseTimeRaw_no_cut->Draw(); + pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1->Draw("SAME"); + pFADC_TREF_ROC2_adcPulseTimeRaw_cut_2->Draw("SAME"); + pFADC_TREF_ROC2_adcPulseTimeRaw_cut_3->Draw("SAME"); + pFADC_line->Draw("SAME"); + + auto legend = new TLegend(0.1,0.7,0.4,0.9); + // legend->SetHeader("The Legend Title","C"); // option "C" allows to center the header + legend->AddEntry(pFADC_TREF_ROC2_adcPulseTimeRaw_no_cut,"no multiplicity cuts","l"); + legend->AddEntry(pFADC_TREF_ROC2_adcPulseTimeRaw_cut_1,"T.shms.pFADC_TREF_ROC2_adcMultiplicity==1","l"); + legend->AddEntry(pFADC_TREF_ROC2_adcPulseTimeRaw_cut_2,"T.shms.pFADC_TREF_ROC2_adcMultiplicity==2","l"); + legend->AddEntry(pFADC_TREF_ROC2_adcPulseTimeRaw_cut_3,"T.shms.pFADC_TREF_ROC2_adcMultiplicity==3","l"); + legend->Draw(); + + c1->Update(); + + + + + + auto c2= new TCanvas("c2","SHMS Reference Times Plots TDC (HODO)"); + c2->Divide(2,1); + c2->cd(1); + gPad->SetLogy(); + TH1F *pT1_tdcTimeRaw_cut_1=new TH1F("pT1_tdcTimeRaw_cut_1","pT1_tdcTimeRaw_cut_1-3",nbin2,0,5000); + T1->Draw("T.shms.pT1_tdcTimeRaw>>pT1_tdcTimeRaw_cut_1","T.shms.pT1_tdcMultiplicity==1"); + + TH1F *pT1_tdcTimeRaw_cut_2=new TH1F("pT1_tdcTimeRaw_cut_2","pT1_tdcTimeRaw_cut_1-3",nbin2,0,5000); + T1->Draw("T.shms.pT1_tdcTimeRaw>>pT1_tdcTimeRaw_cut_2","T.shms.pT1_tdcMultiplicity==2"); + + TH1F *pT1_tdcTimeRaw_cut_3=new TH1F("pT1_tdcTimeRaw_cut_3","pT1_tdcTimeRaw_cut_1-3",nbin2,0,5000); + T1->Draw("T.shms.pT1_tdcTimeRaw>>pT1_tdcTimeRaw_cut_3","T.shms.pT1_tdcMultiplicity==3"); + + pT1_tdcTimeRaw_cut_1->SetLineColor(2); + pT1_tdcTimeRaw_cut_2->SetLineColor(3); + pT1_tdcTimeRaw_cut_3->SetLineColor(4); + pT1_tdcTimeRaw_cut_1->Draw(); + pT1_tdcTimeRaw_cut_2->Draw("SAME"); + pT1_tdcTimeRaw_cut_3->Draw("SAME"); + pT1_line->Draw("SAME"); + auto legend1 = new TLegend(0.1,0.7,0.4,0.9); + + legend1->AddEntry(pT1_tdcTimeRaw_cut_1,"T.shms.pT1_tdcMultiplicity==1","l"); + legend1->AddEntry(pT1_tdcTimeRaw_cut_2,"T.shms.pT1_tdcMultiplicity==2","l"); + legend1->AddEntry(pT1_tdcTimeRaw_cut_3,"T.shms.pT1_tdcMultiplicity==3","l"); + legend1->Draw(); + + pT1_tdcTimeRaw_cut_1->SetAxisRange(0.1,5000,"X"); + pT1_tdcTimeRaw_cut_1->SetAxisRange(0.1,10000000,"Y"); + + c2->cd(2); + gPad->SetLogy(); + TH1F *pT2_tdcTimeRaw_cut_1=new TH1F("pT2_tdcTimeRaw_cut_1","pT2_tdcTimeRaw_cut_1-3",nbin2,0,5000); + T1->Draw("T.shms.pT2_tdcTimeRaw>>pT2_tdcTimeRaw_cut_1","T.shms.pT2_tdcMultiplicity==1"); + + TH1F *pT2_tdcTimeRaw_cut_2=new TH1F("pT2_tdcTimeRaw_cut_2","pT2_tdcTimeRaw_cut_1-3",nbin2,0,5000); + T1->Draw("T.shms.pT2_tdcTimeRaw>>pT2_tdcTimeRaw_cut_2","T.shms.pT2_tdcMultiplicity==2"); + + TH1F *pT2_tdcTimeRaw_cut_3=new TH1F("pT2_tdcTimeRaw_cut_3","pT2_tdcTimeRaw_cut_1-3",nbin2,0,5000); + T1->Draw("T.shms.pT2_tdcTimeRaw>>pT2_tdcTimeRaw_cut_3","T.shms.pT2_tdcMultiplicity==3"); + + pT2_tdcTimeRaw_cut_1->SetLineColor(2); + pT2_tdcTimeRaw_cut_2->SetLineColor(3); + pT2_tdcTimeRaw_cut_3->SetLineColor(4); + pT2_tdcTimeRaw_cut_1->Draw(); + pT2_tdcTimeRaw_cut_2->Draw("SAME"); + pT2_tdcTimeRaw_cut_3->Draw("SAME"); + pT1_line->Draw("SAME"); + auto legend2 = new TLegend(0.1,0.7,0.4,0.9); + + legend2->AddEntry(pT2_tdcTimeRaw_cut_1,"T.shms.pT2_tdcMultiplicity==1","l"); + legend2->AddEntry(pT2_tdcTimeRaw_cut_2,"T.shms.pT2_tdcMultiplicity==2","l"); + legend2->AddEntry(pT2_tdcTimeRaw_cut_3,"T.shms.pT2_tdcMultiplicity==3","l"); + legend2->Draw(); + pT2_tdcTimeRaw_cut_1->SetAxisRange(0.1,5000,"X"); + pT2_tdcTimeRaw_cut_1->SetAxisRange(0.1,10000000,"Y"); + c2->Update(); + + + auto c3= new TCanvas("c3","SHMS Reference Times Plots TDC (DC)"); + gPad->SetLogy(); + + TH1F *pDCREF1_tdcTimeRaw=new TH1F("pDCREF1_tdcTimeRaw","pDCREF1-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF1_tdcTimeRaw>>pDCREF1_tdcTimeRaw_cut_1"); + TH1F *pDCREF2_tdcTimeRaw=new TH1F("pDCREF2_tdcTimeRaw","pDCREF1-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF2_tdcTimeRaw>>pDCREF2_tdcTimeRaw"); + TH1F *pDCREF3_tdcTimeRaw=new TH1F("pDCREF3_tdcTimeRaw","pDCREF3-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF3_tdcTimeRaw>>pDCREF3_tdcTimeRaw"); + TH1F *pDCREF4_tdcTimeRaw=new TH1F("pDCREF4_tdcTimeRaw","pDCREF4-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF4_tdcTimeRaw>>pDCREF4_tdcTimeRaw"); + TH1F *pDCREF5_tdcTimeRaw=new TH1F("pDCREF5_tdcTimeRaw","pDCREF1-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF5_tdcTimeRaw>>pDCREF5_tdcTimeRaw"); + TH1F *pDCREF6_tdcTimeRaw=new TH1F("pDCREF6_tdcTimeRaw","pDCREF1-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF6_tdcTimeRaw>>pDCREF6_tdcTimeRaw"); + TH1F *pDCREF7_tdcTimeRaw=new TH1F("pDCREF7_tdcTimeRaw","pDCREF1-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF7_tdcTimeRaw>>pDCREF7_tdcTimeRaw"); + TH1F *pDCREF8_tdcTimeRaw=new TH1F("pDCREF8_tdcTimeRaw","pDCREF1-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF8_tdcTimeRaw>>pDCREF8_tdcTimeRaw"); + TH1F *pDCREF9_tdcTimeRaw=new TH1F("pDCREF9_tdcTimeRaw","pDCREF1-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF9_tdcTimeRaw>>pDCREF9_tdcTimeRaw"); + TH1F *pDCREF10_tdcTimeRaw=new TH1F("pDCREF10_tdcTimeRaw","pDCREF1-10_tdcTimeRaw",nbin3,0,17000); + T1->Draw("T.shms.pDCREF10_tdcTimeRaw>>pDCREF10_tdcTimeRaw"); + + pDCREF1_tdcTimeRaw->SetAxisRange(0.1,17000,"X"); + pDCREF1_tdcTimeRaw->SetAxisRange(0.1,1000000,"Y"); + + pDCREF1_tdcTimeRaw->SetLineColor(45); + pDCREF2_tdcTimeRaw->SetLineColor(46); + pDCREF3_tdcTimeRaw->SetLineColor(47); + pDCREF4_tdcTimeRaw->SetLineColor(48); + pDCREF5_tdcTimeRaw->SetLineColor(49); + pDCREF6_tdcTimeRaw->SetLineColor(40); + pDCREF7_tdcTimeRaw->SetLineColor(41); + pDCREF8_tdcTimeRaw->SetLineColor(42); + pDCREF9_tdcTimeRaw->SetLineColor(43); + pDCREF10_tdcTimeRaw->SetLineColor(44); + + pDCREF1_tdcTimeRaw->Draw(); + pDCREF2_tdcTimeRaw->Draw("SAME"); + pDCREF3_tdcTimeRaw->Draw("SAME"); + pDCREF4_tdcTimeRaw->Draw("SAME"); + pDCREF6_tdcTimeRaw->Draw("SAME"); + pDCREF7_tdcTimeRaw->Draw("SAME"); + pDCREF8_tdcTimeRaw->Draw("SAME"); + pDCREF9_tdcTimeRaw->Draw("SAME"); + pDCREF10_tdcTimeRaw->Draw("SAME"); + pDCREF_line->Draw("SAME"); + + auto legend3 = new TLegend(0.1,0.6,0.2,0.9); + legend3->AddEntry(pDCREF1_tdcTimeRaw,"pDCREF1","l"); + legend3->AddEntry(pDCREF2_tdcTimeRaw,"pDCREF2","l"); + legend3->AddEntry(pDCREF3_tdcTimeRaw,"pDCREF3","l"); + legend3->AddEntry(pDCREF4_tdcTimeRaw,"pDCREF4","l"); + legend3->AddEntry(pDCREF5_tdcTimeRaw,"pDCREF5","l"); + legend3->AddEntry(pDCREF6_tdcTimeRaw,"pDCREF6","l"); + legend3->AddEntry(pDCREF7_tdcTimeRaw,"pDCREF7","l"); + legend3->AddEntry(pDCREF8_tdcTimeRaw,"pDCREF8","l"); + legend3->AddEntry(pDCREF9_tdcTimeRaw,"pDCREF9","l"); + legend3->AddEntry(pDCREF10_tdcTimeRaw,"pDCREF10","l"); + legend3->Draw(); + c3->Update(); + + + auto c4= new TCanvas("c4","SHMS Reference Times Plots TDC (DC)"); + gPad->SetLogy(); + + TH1F *pDCREF1_tdcTimeRaw_cut_1=new TH1F("pDCREF1_tdcTimeRaw_cut_1","pDCREF1_tdcTimeRaw_cut_1-3",nbin3,0,17000); + T1->Draw("T.shms.pDCREF1_tdcTimeRaw>>pDCREF1_tdcTimeRaw_cut_1","T.shms.pDCREF1_tdcMultiplicity==1"); + TH1F *pDCREF1_tdcTimeRaw_cut_2=new TH1F("pDCREF1_tdcTimeRaw_cut_2","pDCREF1_tdcTimeRaw_cut_1-3",nbin3,0,17000); + T1->Draw("T.shms.pDCREF1_tdcTimeRaw>>pDCREF1_tdcTimeRaw_cut_2","T.shms.pDCREF1_tdcMultiplicity==2"); + TH1F *pDCREF1_tdcTimeRaw_cut_3=new TH1F("pDCREF1_tdcTimeRaw_cut_3","pDCREF1_tdcTimeRaw_cut_1-3",nbin3,0,17000); + T1->Draw("T.shms.pDCREF1_tdcTimeRaw>>pDCREF1_tdcTimeRaw_cut_3","T.shms.pDCREF1_tdcMultiplicity==3"); + + pDCREF1_tdcTimeRaw_cut_1->SetAxisRange(0.1,17000,"X"); + pDCREF1_tdcTimeRaw_cut_1->SetAxisRange(0.1,100000000,"Y"); + pDCREF1_tdcTimeRaw_cut_1->SetLineColor(1); + pDCREF1_tdcTimeRaw_cut_2->SetLineColor(2); + pDCREF1_tdcTimeRaw_cut_3->SetLineColor(3); + pDCREF1_tdcTimeRaw_cut_1->Draw(); + pDCREF1_tdcTimeRaw_cut_2->Draw("SAME"); + pDCREF1_tdcTimeRaw_cut_3->Draw("SAME"); + pDCREF_line->Draw("SAME"); + + auto legend4 = new TLegend(0.1,0.7,0.35,0.9); + legend4->AddEntry(pDCREF1_tdcTimeRaw_cut_1,"T.shms.pDCREF1_tdcMultiplicity==1","l"); + legend4->AddEntry(pDCREF1_tdcTimeRaw_cut_2,"T.shms.pDCREF1_tdcMultiplicity==2","l"); + legend4->AddEntry(pDCREF1_tdcTimeRaw_cut_3,"T.shms.pDCREF1_tdcMultiplicity==3","l"); + legend4->Draw(); + + c4->Update(); + return 0; + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /* + c1->Divide(2,1); + c1->cd(1); + T1->Draw("T.shms.pFADC_TREF_ROC2_adcPulseTimeRaw>>pFADC_TREF_ROC2_adcPulseTimeRaw"); + + c1->cd(2); + T1->Draw("T.shms.pFADC_TREF_ROC2_adcMultiplicity>>pFADC_TREF_ROC2_adcMultiplicity"); + + c1->cd(3); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPulseTime>>hFADC_TREF_ROC1_adcPulseTime"); + + c1->cd(4); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPulseAmpRaw>>hFADC_TREF_ROC1_adcPulseAmpRaw"); + + c1->cd(5); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPulseAmp>>hFADC_TREF_ROC1_adcPulseAmp"); + + c1->cd(6); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPulseIntRaw>>hFADC_TREF_ROC1_adcPulseIntRaw"); + + c1->cd(7); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPulseInt>>hFADC_TREF_ROC1_adcPulseInt"); + + c1->cd(8); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPedRaw>>hFADC_TREF_ROC1_adcPedRaw"); + + c1->cd(9); + T1->Draw("T.hms.hFADC_TREF_ROC1_adcPed>>hFADC_TREF_ROC1_adcPed"); + + c1->Modified(); + c1->Update(); + + + + + auto c2= new TCanvas("c1","HMS Reference Times Plots TDC (HODO)"); + c2->Divide(2,2); + + c2->cd(1); + T1->Draw("T.hms.hT1_tdcMultiplicity>>hT1_tdcMultiplicity"); + + c2->cd(2); + T1->Draw("T.hms.hT1_tdcTimeRaw>>hT1_tdcTimeRaw"); + + + c2->cd(3); + T1->Draw("T.hms.hT2_tdcMultiplicity>>hT2_tdcMultiplicity"); + + c2->cd(4); + T1->Draw("T.hms.hT2_tdcTimeRaw>>hT2_tdcTimeRaw"); + + c2->Modified(); + c2->Update(); + */ + + + /* + + auto c3= new TCanvas("c3","HMS Reference Times Plots TDC (DC)"); + + c3->Divide(2,1); + c3->cd(1); + TH1F *hDCREF1_tdcTimeRaw=new TH1F("hDCREF1_tdcTimeRaw","hDCREF1,5_tdcTimeRaw",100,0,24000); + TH1F *hDCREF5_tdcTimeRaw=new TH1F("hDCREF5_tdcTimeRaw","hDCREF1,5_tdcTimeRaw",100,0,24000); + T1->Draw("T.hms.hDCREF1_tdcTimeRaw>>hDCREF1_tdcTimeRaw"); + T1->Draw("T.hms.hDCREF5_tdcTimeRaw>>hDCREF5_tdcTimeRaw"); + hDCREF1_tdcTimeRaw->SetLineColor(2); + hDCREF1_tdcTimeRaw->Draw(); + hDCREF5_tdcTimeRaw->SetLineColor(3); + hDCREF5_tdcTimeRaw->Draw("SAME"); + auto legend1 = new TLegend(0.1,0.7,0.48,0.9); + legend1->AddEntry(hDCREF1_tdcTimeRaw,"T.hms.hDCREF1_tdcTimeRaw","l"); + legend1->AddEntry(hDCREF5_tdcTimeRaw,"T.hms.hDCREF5_tdcTimeRaw","l"); + legend1->Draw(); + + + c3->cd(2); + TH1F *hDCREF1_tdcMultiplicity=new TH1F("hDCREF1_tdcMultiplicity","hDCREF1,5_tdcMultiplicity",100,0,4); + TH1F *hDCREF5_tdcMultiplicity=new TH1F("hDCREF5_tdcMultiplicity","hDCREF1,5_tdcMultiplicity",100,0,4); + T1->Draw("T.hms.hDCREF1_tdcMultiplicity>>hDCREF1_tdcMultiplicity"); + T1->Draw("T.hms.hDCREF5_tdcMultiplicity>>hDCREF5_tdcMultiplicity"); + hDCREF1_tdcMultiplicity->SetLineColor(2); + hDCREF1_tdcMultiplicity->Draw(); + hDCREF5_tdcMultiplicity->SetLineColor(3); + hDCREF5_tdcMultiplicity->Draw("SAME"); + auto legend2 = new TLegend(0.1,0.7,0.48,0.9); + legend2->AddEntry(hDCREF1_tdcMultiplicity,"T.hms.hDCREF1_tdcMultiplicity","l"); + legend2->AddEntry(hDCREF5_tdcMultiplicity,"T.hms.hDCREF5_tdcMultiplicity","l"); + legend2->Draw(); + + + c3->Modified(); + c3->Update(); + */ + + /* + auto c3= new TCanvas("c3","HMS Reference Times Plots TDC (DC)"); + c3->Divide(2,2); + c3->cd(1); + TH1F *hDCREF1_tdcTimeRaw_cut_1=new TH1F("hDCREF1_tdcTimeRaw_cut_1","hDCREF1_tdcTimeRaw_cut_1",100,0,24000); + T1->Draw("T.hms.hDCREF1_tdcTimeRaw>>hDCREF1_tdcTimeRaw_cut_1","T.hms.hDCREF1_tdcMultiplicity==1"); + + TH1F *hDCREF5_tdcTimeRaw_cut_1=new TH1F("hDCREF5_tdcTimeRaw_cut_1","hDCREF5_tdcTimeRaw_cut_1",100,0,24000); + T1->Draw("T.hms.hDCREF5_tdcTimeRaw>>hDCREF5_tdcTimeRaw_cut_1","T.hms.hDCREF5_tdcMultiplicity==1"); + + hDCREF1_tdcTimeRaw_cut_1->SetLineColor(2); + hDCREF5_tdcTimeRaw_cut_1->SetLineColor(3); + hDCREF1_tdcTimeRaw_cut_1->Draw(); + hDCREF5_tdcTimeRaw_cut_1->Draw("SAME"); + auto legend1 = new TLegend(0.1,0.7,0.48,0.9); + legend1->AddEntry(hDCREF1_tdcTimeRaw_cut_1,"T.hms.hDCREF1_tdcMultiplicity==1","l"); + legend1->AddEntry(hDCREF5_tdcTimeRaw_cut_1,"T.hms.hDCREF5_tdcMultiplicity==1","l"); + legend1->Draw(); + + + + c3->cd(2); + TH1F *hDCREF1_tdcTimeRaw_cut_2=new TH1F("hDCREF1_tdcTimeRaw_cut_2","hDCREF1_tdcTimeRaw_cut_2",100,0,24000); + T1->Draw("T.hms.hDCREF1_tdcTimeRaw>>hDCREF1_tdcTimeRaw_cut_2","T.hms.hDCREF1_tdcMultiplicity==2"); + + TH1F *hDCREF5_tdcTimeRaw_cut_2=new TH1F("hDCREF5_tdcTimeRaw_cut_2","hDCREF5_tdcTimeRaw_cut_2",100,0,24000); + T1->Draw("T.hms.hDCREF5_tdcTimeRaw>>hDCREF5_tdcTimeRaw_cut_2","T.hms.hDCREF5_tdcMultiplicity==2"); + + hDCREF1_tdcTimeRaw_cut_2->SetLineColor(2); + hDCREF5_tdcTimeRaw_cut_2->SetLineColor(3); + hDCREF1_tdcTimeRaw_cut_2->Draw(); + hDCREF5_tdcTimeRaw_cut_2->Draw("SAME"); + auto legend2 = new TLegend(0.1,0.7,0.48,0.9); + legend2->AddEntry(hDCREF1_tdcTimeRaw_cut_2,"T.hms.hDCREF1_tdcMultiplicity==2","l"); + legend2->AddEntry(hDCREF5_tdcTimeRaw_cut_2,"T.hms.hDCREF5_tdcMultiplicity==2","l"); + legend2->Draw(); + + + c3->cd(3); + TH1F *hDCREF1_tdcTimeRaw_cut_3=new TH1F("hDCREF1_tdcTimeRaw_cut_3","hDCREF1_tdcTimeRaw_cut_3",100,0,24000); + T1->Draw("T.hms.hDCREF1_tdcTimeRaw>>hDCREF1_tdcTimeRaw_cut_3","T.hms.hDCREF1_tdcMultiplicity==3"); + + TH1F *hDCREF5_tdcTimeRaw_cut_3=new TH1F("hDCREF5_tdcTimeRaw_cut_3","hDCREF5_tdcTimeRaw_cut_3",100,0,24000); + T1->Draw("T.hms.hDCREF5_tdcTimeRaw>>hDCREF5_tdcTimeRaw_cut_3","T.hms.hDCREF5_tdcMultiplicity==3"); + + hDCREF1_tdcTimeRaw_cut_3->SetLineColor(2); + hDCREF5_tdcTimeRaw_cut_3->SetLineColor(3); + hDCREF1_tdcTimeRaw_cut_3->Draw(); + hDCREF5_tdcTimeRaw_cut_3->Draw("SAME"); + auto legend3 = new TLegend(0.1,0.7,0.48,0.9); + legend3->AddEntry(hDCREF1_tdcTimeRaw_cut_3,"T.hms.hDCREF1_tdcMultiplicity==3","l"); + legend3->AddEntry(hDCREF5_tdcTimeRaw_cut_3,"T.hms.hDCREF5_tdcMultiplicity==3","l"); + legend3->Draw(); + + c3->Modified(); + c3->Update(); + + + + auto T2 = (TTree*)fileIN->Get("TSH;1"); + auto c1= new TCanvas("c1","HMS Scaler Rate"); + T2->Draw("H.pTRIG1.scalerRate>>scalerRate"); + */ + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseAmp.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseAmp.pdf new file mode 100644 index 0000000000000000000000000000000000000000..81cffa8ab0ae64ac428a77232b6abbf344adb843 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseAmp.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseInt.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseInt.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2487374b4b4dce278963944fb6245572aeb372c5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseInt.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseInt_fit.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseInt_fit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1c949e4de4c98b3afcfa12fe5c411ad1239f5baa Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseInt_fit.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseInt_new_replay1.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseInt_new_replay1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4dd7710cd26fbc12aa37864cb4421ecc2e1870db Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_goodAdcPulseInt_new_replay1.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_npe_new_replay1.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_npe_new_replay1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..74d731c6ff3f57fee9ef26813131fb22938fc45c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_02608_cer_npe_new_replay1.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseAmp.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseAmp.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dbfafa27c732d54c7c70116fca5bf5094ba0126e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseAmp.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseInt.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseInt.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0961ba1d61570d9693ab785c14ae1aa9f168d212 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseInt.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseInt_fit.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseInt_fit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..290ce6119d379ec98401424093e386bac1d4802b Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseInt_fit.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseInt_new_replay1.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseInt_new_replay1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2362c9df83c08c49dfc9437749b3d69f4afce7e3 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_goodAdcPulseInt_new_replay1.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_npe_new_replay1.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_npe_new_replay1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..76ca3d34d0963e0f1078b76782c54f94302010fa Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03419_cer_npe_new_replay1.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03585_cer_goodAdcPulseAmp.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03585_cer_goodAdcPulseAmp.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7a4c24db476d1aa816aa7bfbd99a327640712ab9 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03585_cer_goodAdcPulseAmp.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03585_cer_goodAdcPulseInt.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03585_cer_goodAdcPulseInt.pdf new file mode 100644 index 0000000000000000000000000000000000000000..30a872fc7eca7a5f08c4f0d2e61f7f105dabe7b9 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03585_cer_goodAdcPulseInt.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03616_cer_goodAdcPulseAmp.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03616_cer_goodAdcPulseAmp.pdf new file mode 100644 index 0000000000000000000000000000000000000000..21fbabeca8fbed0f2a992ce59b9728e35aaaaa65 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03616_cer_goodAdcPulseAmp.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03616_cer_goodAdcPulseInt.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03616_cer_goodAdcPulseInt.pdf new file mode 100644 index 0000000000000000000000000000000000000000..470036004afff18937468100d21ea1c805351d9e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03616_cer_goodAdcPulseInt.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03616_cer_goodAdcPulseInt_fit.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03616_cer_goodAdcPulseInt_fit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c1598bcd4590525e8de7240187a65c77841a11fc Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03616_cer_goodAdcPulseInt_fit.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03732_cer_goodAdcPulseInt_fit.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03732_cer_goodAdcPulseInt_fit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c4748e5f6d8d7d6dafd4ae26320390e744fb6275 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03732_cer_goodAdcPulseInt_fit.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03732_cer_npe.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03732_cer_npe.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5b648b2c711a109b1e91ad27ff510e8780fa7d8a Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_03732_cer_npe.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04195_cer_goodAdcPulseInt_fit.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04195_cer_goodAdcPulseInt_fit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9433d9c9dfa254cded29ebfa3c502565b5b79a4f Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04195_cer_goodAdcPulseInt_fit.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04195_cer_goodAdcPulseInt_zoom_fit.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04195_cer_goodAdcPulseInt_zoom_fit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cce93b00aa5689b2dd31ab7685bc449c406cb1eb Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04195_cer_goodAdcPulseInt_zoom_fit.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04195_cer_npe.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04195_cer_npe.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ff57b86e44ee162192002e9cb59dbc0ea723e44a Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04195_cer_npe.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04267_cer_goodAdcPulseInt_fit.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04267_cer_goodAdcPulseInt_fit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..62d9a5c584ceb6d183ac223563e7bb57a51f7bcf Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04267_cer_goodAdcPulseInt_fit.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04267_cer_goodAdcPulseInt_zoom_fit.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04267_cer_goodAdcPulseInt_zoom_fit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..44d4a527c9148255dbe472d0e4c5d4260dfc3082 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04267_cer_goodAdcPulseInt_zoom_fit.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04267_cer_npe.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04267_cer_npe.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b01bf2415f1bbee2f92e8b46972b2b7afd87e03b Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04267_cer_npe.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04306_cer_goodAdcPulseInt_fit.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04306_cer_goodAdcPulseInt_fit.pdf new file mode 100644 index 0000000000000000000000000000000000000000..301dd659de413c6321e717d03bbab95290504c74 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04306_cer_goodAdcPulseInt_fit.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04306_cer_npe.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04306_cer_npe.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e7c35dc90813853154ddd9bde6172709e36c8121 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_04306_cer_npe.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4fc2da459aec4510ebf1c1eab49023749f2094ab Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_04306.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_04306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..744e9f6c690402ff47c9e3372065922f49fcfbfe Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_04306.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_04306_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_04306_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e771a4be2eb638b6c3678dbc7fbf6a143b0df825 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_04306_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_04317_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_04317_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..68012e2f3e211d0b988afa6714bdda01d7f897e4 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/cal_energy_1d_04317_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6586879bb633fddcd2bb78c2e496f2bea895d69b Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_04306_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_04306_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..184dda48993b26a19e4c2787dc87222dab33f01b Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_04306_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_04306_E0.9_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_04306_E0.9_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..424ffcbc164333e9673cdcf3a1af6b0218d764a6 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_04306_E0.9_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_04306_E_0.9_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_04306_E_0.9_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..91ccb5e0a826d1b803e92666d1f942ef9fc8f93d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_04306_E_0.9_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_presh_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_presh_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..00bd60fd3f8262f6dbb44a9767949985218d39b2 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_cuts_presh_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_fit_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_fit_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3ea66fcf47a45ac9e44c918f25f5a28965cfe002 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_fit_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_fit_linscale_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_fit_linscale_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c83973053b2697cd02184b03e9b4507ec3ac17fc Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_fit_linscale_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_gaus_fit_04306.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_gaus_fit_04306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d26f0f0b654a7365cdb3a60ec21125e3010aeba6 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_gaus_fit_04306.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_gaus_fit_200000replay_04195_E0.9.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_gaus_fit_200000replay_04195_E0.9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..842618a6acc1d29533e00e73eca4041165f41e82 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_gaus_fit_200000replay_04195_E0.9.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_gaus_fit_200000replay_04306.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_gaus_fit_200000replay_04306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..61377b82db81e0ffc0d9fd47cbebb6e4d632c940 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_gaus_fit_200000replay_04306.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_200000replay_04195.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_200000replay_04195.pdf new file mode 100644 index 0000000000000000000000000000000000000000..51ddb2e4c2fc989bb659a2b2285e840716bd2b2e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_200000replay_04195.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_200000replay_04306.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_200000replay_04306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..aeb50550bf9bedc38ca3f9f8d01e5760bbcac28f Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_200000replay_04306.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_E0.9_200000replay_04195.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_E0.9_200000replay_04195.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1253a7dd11c6b97166e37855e900eea553e11009 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_E0.9_200000replay_04195.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_E0.9_200000replay_04306.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_E0.9_200000replay_04306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..87d36789a2aa3eb6d04ad41d7b25cce4c9a9689d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/goodAdcPulseInt_poisson_fit_E0.9_200000replay_04306.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8b4efeea09efdb17eb9cb6c73da4b50182ad44f8 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04195.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04195.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eb69419b0f4466194822d9d7c1d3373f0d01ec61 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04195.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04306.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d045bcc8592675f38722a5568e8a4f4952719d72 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04306.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04306_E0.9.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04306_E0.9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5018fb77a552db5f52f7f326d5e4ac1a6323ed9d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04306_E0.9.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04306_new_method.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04306_new_method.pdf new file mode 100644 index 0000000000000000000000000000000000000000..88d734c684bb9b29e6a0b352c51ea49a360eba42 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04306_new_method.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04317.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04317.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3e16004211737a07d65e87ad3ec12c9505357029 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_04317.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_bigBin_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_bigBin_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..84b184aff243be338c9c7b1f2bfae7be76e10bc1 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_bigBin_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_bigBin_prsh_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_bigBin_prsh_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cf7d1f57c4c3a5fb2689531dd175c1b70db33095 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt1_bigBin_prsh_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bd2bbfa258e11b78396e3d64f8e0967cbe124840 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04195.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04195.pdf new file mode 100644 index 0000000000000000000000000000000000000000..25273ebaf13d8c84661998c89430ed7b3572c7ee Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04195.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04306.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d508982b80d599334137a7c45b8b7d306a7de05c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04306.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04306_E0.9.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04306_E0.9.pdf new file mode 100644 index 0000000000000000000000000000000000000000..485189f51e19c6ea39a917a8f91584c58a8e0d0a Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04306_E0.9.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04306_new_method.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04306_new_method.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6946c13b0bc15a3a94a429cb35d75fe4d3830d6d Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04306_new_method.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04317.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04317.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ca5d40bf7e84871bb21a75f108e6165a04efafd5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_04317.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_bigBin_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_bigBin_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6b5212e57b9e83a53889a9051870c01a1ebc4cd1 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_bigBin_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_bigBin_prsh_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_bigBin_prsh_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e32ba7cf3a8c3fbcf3b107fd7f959e4eff382a56 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/meanNpe_pmt2_bigBin_prsh_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorX_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorX_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..695f5fb9f455f2bb1ca9c2fd9f0d3f1b40940a0c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorX_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorX_04306_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorX_04306_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..81d497bab4025298ba07cc25c68853b959e5e933 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorX_04306_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorY_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorY_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..516e60bbb84aa861bf400147c31e6863e5e826ec Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorY_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorY_04306_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorY_04306_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d37cb259a6ac8ed6f8988ad3b3f1471582d831d0 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/miirrorY_04306_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f37c8aebff4e043bf35983cf05bd3eaa0d809045 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_04195_E0.9_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_04195_E0.9_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..922a7dc521931f50f6989b9f7f931f43dc2e1a46 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_04195_E0.9_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_04306_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_04306_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b5c5a62cb15042b5755238d58a15ff1e69b798e7 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_04306_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_04306_E0.9_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_04306_E0.9_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f9bd596aa060bbb0c1852db83e989fd3ceaafb1e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_XY_04306_E0.9_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_X_04195_E0.9_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_X_04195_E0.9_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0ae3e8a31bd3ec0b85b11f3263cddef7ff2238f3 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_X_04195_E0.9_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_X_04306_E0.9_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_X_04306_E0.9_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fa12c2ea74c3abc0a425392cb4e9fe32925cb1ed Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_X_04306_E0.9_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_Y_04195_E0.9_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_Y_04195_E0.9_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..131a77c157be9e175d7d5598f4085acb4b3accb8 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_Y_04195_E0.9_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_Y_04306_E0.9_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_Y_04306_E0.9_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..41018fffd1bffbb763fa35ae3d831d81db53a5b6 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/mirror_Y_04306_E0.9_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_02608.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_02608.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d4a501facf44f66835b16d80876d783d36b9cff1 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_02608.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_04195_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_04195_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0ed9cf2357de8fbdad88f20853fd80f97ac8a31c Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_04195_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_04306.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_04306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cce8797b8739be7d00f3cd83a9fbf2561565fcdd Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_04306.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_2D_04195_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_2D_04195_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..698e1e2657acf1aee7ffe9a96158528b394eaf18 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_2D_04195_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_2D_04306_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_2D_04306_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fe2c6c14333d45987b25a0775a0a949aa3efac4b Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_2D_04306_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_2D_04317_200000.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_2D_04317_200000.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b1ef943faf140fbebd88628de2cec64bdc1559ae Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/Method2/totEnergy_ShEnergy_2D_04317_200000.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/tot_energyvs_shower_4306.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/tot_energyvs_shower_4306.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a188393c97346bbcb8f9f14742691542bdbfe5a5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/HMS_CER_Calib_Plots/tot_energyvs_shower_4306.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/mirror_XY_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/mirror_XY_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..21563950e69975b2bbdb49638ccc1efde8335be5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/mirror_XY_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/mirror_X_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/mirror_X_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..60225fd8a1a9ab313b4246901b18b645c7ad5f07 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/mirror_X_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/mirror_Y_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/mirror_Y_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..39c50cbdffab3ed48d3258e25283620bcef8d127 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/mirror_Y_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt1_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt1_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7db9a1d85d2e6270fefef82b30df9f07bc7e02d5 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt1_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt2_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt2_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bdb82ecb126c40aeb772979c28e1c68e53cf8bfb Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt2_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt3_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt3_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cfbcaf3228ab4c314e1a1c888524642ebc1945ec Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt3_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt4_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt4_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0ea6c2c8a84f41a7ee79bb1e4abf2bb1f68fce94 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/npe_pmt4_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/pulseInt_gaussian_fit_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/pulseInt_gaussian_fit_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bcd663fdc166549f2b1065b548677ef43b13f09e Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/pulseInt_gaussian_fit_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/pulseInt_posson_fit_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/pulseInt_posson_fit_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0390b0d45387bd1006f404d00c1ed7c535f99598 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/pulseInt_posson_fit_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/total_energy_1d_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/total_energy_1d_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..41504346aba4bc884639b95f0c3248cb015ee491 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/total_energy_1d_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/total_energy_vs_shower_11538.pdf b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/total_energy_vs_shower_11538.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3c6a61bee10eff1585a9a80843a5dbcd6a1f43b2 Binary files /dev/null and b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/SHMS_calib_plots/total_energy_vs_shower_11538.pdf differ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/cer_calib_hms.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/cer_calib_hms.C new file mode 100644 index 0000000000000000000000000000000000000000..4599aff1f13f580fa11e0ed34a553233cb45926f --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/cer_calib_hms.C @@ -0,0 +1,515 @@ +#include <iostream> +#include <fstream> +#include <string> +#include <TFile.h> +#include <TDirectory.h> +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TH2.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" +#include <TLine.h> + +using namespace std; + +// Draft of a program to conduct ngcer calibration for SHMS by hand using "Method 1" from Simona. +// https://logbooks.jlab.org/entry/3650663 +// https://hallcweb.jlab.org/DocDB/0010/001053/001/wisewordsoncheranalysis.pdf +// murchhanaroy@uky.edu +// AUgust 2020 + + +void cer_calib_hms(){ + + gStyle->SetOptFit(1111); //setting stat bar options + gStyle->SetStatFormat("6.6g"); + gStyle->SetLegendFont(42); + gStyle->SetLegendTextSize(0.01); + + +//Declare root file +char run_num[20]; +cout<<"Enter HMS Run number (Including leading 0):"<<endl; +cin>> run_num; + +//TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/hms_replay_production_all_%s_200000.root",run_num); +TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/hms_replay_production_default_%s_-1.root",run_num); +TFile *fileIN = new TFile(filename); + + +//Declare Tree +TTree *T = (TTree*)fileIN->Get("T"); + +// Acquire the number of entries +Long64_t nentries; +nentries = T->GetEntries(); + +// Acquire the branches +Int_t npmt=2; + +//define the arrays we are going to put the branches in. + + Double_t ngcer_goodAdcTdcDiffTime[4],ngcer_counter[30],ngcer_mult[30],ngcer_adcPulseTime[30],ngcer_goodAdcPulseAmp[4],ngcer_goodAdcPulseInt[4],ngcer_npe[4]; + Double_t cal_eprtracknorm, cal_etracknorm,ngcer_XatCer,ngcer_YatCer, delta; //good == array of 4. (This is what Brad said, he can probably explain more why). + Double_t starttime; + Int_t ndata_ngcer_pulseint; + +T->SetBranchAddress("H.hod.starttime", &starttime); +T->SetBranchAddress("H.cer.adcPulseTime", &ngcer_adcPulseTime); + +T->SetBranchAddress("Ndata.H.cer.adcPulseInt", &ndata_ngcer_pulseint); //hit list +T->SetBranchAddress("H.cer.adcCounter", &ngcer_counter); //pmts + +T->SetBranchAddress("H.cer.goodAdcMult", &ngcer_mult); + +T->SetBranchAddress("H.cer.goodAdcTdcDiffTime",&ngcer_goodAdcTdcDiffTime); // events that pass the detector time window cuts + + T->SetBranchAddress("H.cer.goodAdcPulseAmp", &ngcer_goodAdcPulseAmp); + T->SetBranchAddress("H.cer.goodAdcPulseInt", &ngcer_goodAdcPulseInt); + + T-> SetBranchAddress("H.cer.xAtCer",&ngcer_XatCer); + T-> SetBranchAddress("H.cer.yAtCer",&ngcer_YatCer); + T-> SetBranchAddress("H.cer.npe",&ngcer_npe); + + ////Energy variables for the shower and preshower + T->SetBranchAddress("H.cal.etracknorm", &cal_etracknorm); // shower + preshower energy (I'm not exactly sure how these are "normalized" but these are the variables Brad and Xiaochao wanted me to use) + T->SetBranchAddress("H.cal.eprtracknorm", &cal_eprtracknorm); // preshower energy + T->SetBranchAddress("H.gtr.dp", &delta); + + + + + + +//// Declare histos and fits. + + //Old code is counting from 1 so we need arrays of 5. + + TH1F *ng_goodAdcPulseAmp[5]; //no cuts, only the branch itself + TH1F *ng_goodAdcPulseInt[5]; + + TH1F *ng_goodAdcPulseAmp_multcut[5]; // multiplicity=1 cut applied + TH1F *ng_goodAdcPulseInt_multcut[5]; + TH1F *ng_goodAdcPulseInt_multcut_fit[5]; + + TH1F *ng_goodAdcPulseAmp_multcut_nonphys1[5]; // multiplicity=1 cut applied, only cal cut + TH1F *ng_goodAdcPulseInt_multcut_nonphys1[5]; + + TH1F *ng_goodAdcPulseAmp_multcut_nonphys2[5]; // multiplicity=1 cut applied, only xatcer, yatcer not equal 0 + TH1F *ng_goodAdcPulseInt_multcut_nonphys2[5]; + + TH1F *ng_goodAdcPulseAmp_multcut_nonphys[5]; // multiplicity=1 cut applied + TH1F *ng_goodAdcPulseInt_multcut_nonphys[5]; + + TH1F *ng_goodAdcPulseAmp_multcut_single[5]; // multiplicity=1 cut applied + TH1F *ng_goodAdcPulseInt_multcut_single[5]; + + TH1F *ng_goodAdcTdcDiffTime[5]; // histo after cuts are applied + TH1F *ngcer_npe_histo[5]; + + + + TF1 *gausFitnpe1, *gausFitnpe2; + + TF1 *gausFitAmp1, *gausFitAmp2; + TF1 *gausFitInt1, *gausFitInt2; +TF1 *gausFitInt_zoom1, *gausFitInt_zoom2; + + + + + // initializing histos that are for each PMT + for(Int_t i=1; i<npmt+1; i++){ + TString namePulseAmp=Form("hNcerPulseAmp%d",i); + TString titlePulseAmp=Form("PMT%d: HMS CER goodAdcPulseAmp raw branch, Run %s",i,run_num); + TString namePulseInt=Form("hNcerPulseInt%d",i); + TString titlePulseInt=Form("PMT%d: HMS CER goodAdcPulseInt raw branch, Run %s",i,run_num); + + + TString namePulseAmp_multcut=Form("hNcerPulseAmp%d multcut",i); + TString titlePulseAmp_multcut=Form("PMT%d: HMS CER goodAdcPulseAmp raw brunch mult cut Run %s",i,run_num); + TString namePulseInt_multcut=Form("hNcerPulseInt%d multcut",i); + TString titlePulseInt_multcut=Form("PMT%d: HMS CER goodAdcPulseInt raw branch mult cut %s",i,run_num); + + TString namePulseInt_multcut_fit=Form("hNcerPulseInt%d multcut_fit",i); + TString titlePulseInt_multcut_fit=Form("PMT%d: HMS CER goodAdcPulseInt raw branch mult cut %s",i,run_num); + + + TString namePulseAmp_multcut_nonphys=Form("hNcerPulseAmp%d nonphyscut",i); + TString titlePulseAmp_multcut_nonphys=Form("PMT%d: HMS CER goodAdcPulseAmp non phys cut mult cut Run %s",i,run_num); + TString namePulseInt_multcut_nonphys=Form("hNcerPulseInt%d nonphysut",i); + TString titlePulseInt_multcut_nonphys=Form("PMT%d: HMS CER goodAdcPulseInt non phys cut mult cut %s",i,run_num); + + TString namePulseAmp_multcut_nonphys1=Form("hNcerPulseAmp%d nonphys1cut",i); + TString titlePulseAmp_multcut_nonphys1=Form("PMT%d: HMS CER goodAdcPulseAmp non phys cut1 mult cut Run %s",i,run_num); + TString namePulseInt_multcut_nonphys1=Form("hNcerPulseInt%d nonphys1cut",i); + TString titlePulseInt_multcut_nonphys1=Form("PMT%d: HMS CER goodAdcPulseInt non phys cut1 mult cut %s",i,run_num); + + TString namePulseAmp_multcut_nonphys2=Form("hNcerPulseAmp%d nonphys2cut",i); + TString titlePulseAmp_multcut_nonphys2=Form("PMT%d: HMS CER goodAdcPulseAmp non phys cut2 mult cut Run %s",i,run_num); + TString namePulseInt_multcut_nonphys2=Form("hNcerPulseInt%d nonphys2cut",i); + TString titlePulseInt_multcut_nonphys2=Form("PMT%d: HMS CER goodAdcPulseInt non phys cut2 mult cut %s",i,run_num); + + TString namePulseAmp_multcut_single=Form("hNcerPulseAmp%d allcut",i); + TString titlePulseAmp_multcut_single=Form("PMT%d: HMS CER goodAdcPulseAmp non-physical cut, mult cut, single pmt %s",i,run_num); + TString namePulseInt_multcut_single=Form("hNcerPulseInt%d allcut",i); + TString titlePulseInt_multcut_single=Form("PMT%d: HMS CER goodAdcPulseInt non-physical cut, mult cut, single pmt %s",i,run_num); + + ng_goodAdcPulseAmp[i]= new TH1F(namePulseAmp, titlePulseAmp,240,0,120); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt[i]= new TH1F(namePulseInt, titlePulseInt, 140, 0,70);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseInt_multcut_fit[i]= new TH1F(namePulseInt_multcut_fit, titlePulseInt_multcut_fit, 500,0,20); + + + ng_goodAdcPulseAmp_multcut[i]= new TH1F(namePulseAmp_multcut, titlePulseAmp_multcut,240,0,120); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_multcut[i]= new TH1F(namePulseInt_multcut, titlePulseInt_multcut, 140,0,70);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_multcut_nonphys1[i]= new TH1F(namePulseAmp_multcut_nonphys1, titlePulseAmp_multcut_nonphys1,240,0,120); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_multcut_nonphys1[i]= new TH1F(namePulseInt_multcut_nonphys1, titlePulseInt_multcut_nonphys1, 140,0,70);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_multcut_nonphys2[i]= new TH1F(namePulseAmp_multcut_nonphys2, titlePulseAmp_multcut_nonphys2,240,0,120); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_multcut_nonphys2[i]= new TH1F(namePulseInt_multcut_nonphys2, titlePulseInt_multcut_nonphys2, 140,0,70);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_multcut_nonphys[i]= new TH1F(namePulseAmp_multcut_nonphys, titlePulseAmp_multcut_nonphys,240,0,120); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_multcut_nonphys[i]= new TH1F(namePulseInt_multcut_nonphys, titlePulseInt_multcut_nonphys, 140,0,70);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_multcut_single[i]= new TH1F(namePulseAmp_multcut_single, titlePulseAmp_multcut_single,240,0,120); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_multcut_single[i]= new TH1F(namePulseInt_multcut_single, titlePulseInt_multcut_single, 140,0,70);// (200 for 9740) (50 for 9753) + + ng_goodAdcTdcDiffTime[i]=new TH1F(Form("goodAdcTdcDiffTime PMT%d run %s",i,run_num),Form("goodAdcTdcDiffTime PMT%d run %s",i,run_num),150,-50,100); + + ngcer_npe_histo[i]=new TH1F(Form("H.cer.npe[%d] run %s",i,run_num),Form("H.cer.npe[%d] run %s",i,run_num),100,0,10); +} + + + + + + + /********************************************************************************************************************/ + // Begining of analysis on all the events and applying cuts + +// Loop of entries in tree + cout << "nentries= "<<nentries<<endl; + for(Long64_t ievent=0; ievent < nentries; ievent++){ //can be lowered for testing + + //if (ievent % 10000 == 0){//printing progress updates to the terminal + // cout<< "ievent= "<<ievent <<endl; + // } + + T->GetEntry(ievent); + + //Filling up the RAW histos. Counting from 1. + for (int i=1; i<npmt+1;i++){ + ng_goodAdcPulseAmp[i]->Fill(ngcer_goodAdcPulseAmp[i-1]); + ng_goodAdcPulseInt[i]->Fill(ngcer_goodAdcPulseInt[i-1]); + ng_goodAdcTdcDiffTime[i]->Fill(ngcer_goodAdcTdcDiffTime[i-1]); + if(ngcer_mult[i-1]==1){ + ng_goodAdcPulseAmp_multcut[i]->Fill(ngcer_goodAdcPulseAmp[i-1]); // only multiplicity cut on raw brunch + ng_goodAdcPulseInt_multcut[i]->Fill(ngcer_goodAdcPulseInt[i-1]); + ng_goodAdcPulseInt_multcut_fit[i]->Fill(ngcer_goodAdcPulseInt[i-1]); + ngcer_npe_histo[i]->Fill(ngcer_npe[i-1]); + } + } + + + + // now we ARE CHECKING if only one PMT had a singnal + for (Int_t counterNew=1; counterNew< npmt+1; counterNew++){ // counting from 1 + + //apply mutiplicity cuts + if(ngcer_mult[counterNew-1]==1){ + //// cut out any non-physical singnals. There is a line at x=y in the calorimeter that isn't physical, one at a time. + if(cal_eprtracknorm>0 && cal_etracknorm>0 && cal_eprtracknorm < cal_etracknorm){ + ng_goodAdcPulseAmp_multcut_nonphys1[counterNew]->Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + ng_goodAdcPulseInt_multcut_nonphys1[counterNew]->Fill(ngcer_goodAdcPulseInt[counterNew-1]); + } + if(ngcer_YatCer != 0 && ngcer_XatCer != 0){ + ng_goodAdcPulseAmp_multcut_nonphys2[counterNew]->Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + ng_goodAdcPulseInt_multcut_nonphys2[counterNew]->Fill(ngcer_goodAdcPulseInt[counterNew-1]); + + } + + //// cut out any non-physical singnals. There is a line at x=y in the calorimeter that isn't physical. + if(ngcer_YatCer != 0 && ngcer_XatCer != 0){ + if(cal_eprtracknorm>0 && cal_etracknorm>0 && cal_eprtracknorm < cal_etracknorm){ + + + Bool_t singleFlagAmp=kTRUE; // flags to help identify if there was singnal in only one PMT at a time + Bool_t singleFlagInt=kFALSE; + + + ng_goodAdcPulseAmp_multcut_nonphys[counterNew]->Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + ng_goodAdcPulseInt_multcut_nonphys[counterNew]->Fill(ngcer_goodAdcPulseInt[counterNew-1]); + + + if(ngcer_goodAdcPulseAmp[counterNew-1]>0) + { + singleFlagAmp=kTRUE; // this assignement is redundent + for (Int_t counter2=1; counter2 <npmt+1;counter2++){ + if (counterNew != counter2 && ngcer_goodAdcPulseAmp[counter2-1] >0){// loop over the other PMT's (that are not itself) and see if there was a signal + singleFlagAmp = kFALSE; // there was a signal in one of the other PMTs, so event was not in one single pmt + } + } + if (singleFlagAmp) + {// if event was in one single pmt + ng_goodAdcPulseAmp_multcut_single[counterNew]->Fill(ngcer_goodAdcPulseAmp[counterNew-1]); //Fill histo with the goodAdcPulseAmp branch without any cuts + }// end singleFlagAmp check + }// end looking at AdcPulseAmp + + + + //looking at AdcPulseInt + if(ngcer_goodAdcPulseInt[counterNew-1]>0){ + singleFlagInt=kTRUE;// redundent statment + for (Int_t counter3=1; counter3 <npmt+1;counter3++){ + if (counterNew != counter3 && ngcer_goodAdcPulseInt[counter3-1] >0){// loop over the other PMTs to see if any had a signal + singleFlagInt = kFALSE; // event was not in 1 single pmt + } + } + if (singleFlagInt){// if event was in 1 single pmt + ng_goodAdcPulseInt_multcut_single[counterNew]->Fill(ngcer_goodAdcPulseInt[counterNew-1]); //Fill histo with the goodAdcPulseInt branch without shower cuts + } //end of single PMT check + }// end of AdcPulseInt analysis + + } + }//end of non-physical check + + }//end of multiplicity==1 cut for the pmt under calibration + } // end of single PMT analysis + }//end of event loop + + // Ending of analysis of events and applying all the cuts + /***************************************************************************************************************************/ + + + //Graph the results! + /* + // graph the AdcPulseAmp histos +TCanvas *c1=new TCanvas("c1","c1",1000,700); + c1->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c1->cd(counter); + gPad->SetLogy(); + + ng_goodAdcPulseAmp[counter]->SetLineColor(1);//black + ng_goodAdcPulseAmp[counter]->SetLineWidth(1); + ng_goodAdcPulseAmp[counter]->Draw(); + + ng_goodAdcPulseAmp_multcut[counter]->SetLineColor(416);//green + ng_goodAdcPulseAmp_multcut[counter]->SetLineWidth(1); + ng_goodAdcPulseAmp_multcut[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_multcut_nonphys1[counter]->SetLineColor(632);//Red + ng_goodAdcPulseAmp_multcut_nonphys1[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_multcut_nonphys1[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_multcut_nonphys2[counter]->SetLineColor(880);//violet + ng_goodAdcPulseAmp_multcut_nonphys2[counter]->SetLineWidth(1); + ng_goodAdcPulseAmp_multcut_nonphys2[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_multcut_nonphys[counter]->SetLineColor(800);//orange + ng_goodAdcPulseAmp_multcut_nonphys[counter]->SetLineWidth(1); + ng_goodAdcPulseAmp_multcut_nonphys[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_multcut_single[counter]->SetLineColor(7);//pink + ng_goodAdcPulseAmp_multcut_single[counter]->SetLineWidth(1); + ng_goodAdcPulseAmp_multcut_single[counter]->Draw("SAME"); + + TLegend *legend1 = new TLegend(0.1,0.6,0.6,0.9); + + legend1->AddEntry(ng_goodAdcPulseAmp[counter],"ng_goodAdcPulseAmp(raw branch)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_multcut[counter],"ng_goodAdcPulseAmp (mul=1)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_multcut_nonphys2[counter],"ng_goodAdcPulseAmp (mul=1,ngcer_YatCer != 0 && ngcer_XatCer != 0 )","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_multcut_nonphys1[counter],"#splitline{ng_goodAdcPulseAmp (mul=1, cal_eprtracknorm>0 &&}{ cal_etracknorm>0 && cal_eprtracknorm < cal_etracknorm)}","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_multcut_nonphys[counter],"#splitline{ng_goodAdcPulseAmp (mul=1,ngcer_YatCer != 0 &&}{#splitline{ngcer_XatCer != 0,cal_eprtracknorm>0 &&}{ cal_etracknorm>0 && cal_eprtracknorm < cal_etracknorm)}}","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_multcut_single[counter],"ng_goodAdcPulseAmp (mul=1,all cuts,single pmt)","l"); + legend1->Draw(); + } + c1->Update(); + + + // Graph the AdcPulseInt histos +TCanvas *c2=new TCanvas("c2","c2",1000,700); + c2->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c2->cd(counter); + gPad->SetLogy(); + + ng_goodAdcPulseInt[counter]->SetLineColor(kBlack);//black + ng_goodAdcPulseInt[counter]->SetLineWidth(1); + ng_goodAdcPulseInt[counter]->Draw(); + + ng_goodAdcPulseInt_multcut[counter]->SetLineColor(416);//green + ng_goodAdcPulseInt_multcut[counter]->SetLineWidth(1); + ng_goodAdcPulseInt_multcut[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_multcut_nonphys1[counter]->SetLineColor(632);//blue + ng_goodAdcPulseInt_multcut_nonphys1[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_multcut_nonphys1[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_multcut_nonphys2[counter]->SetLineColor(880);//blue + ng_goodAdcPulseInt_multcut_nonphys2[counter]->SetLineWidth(1); + ng_goodAdcPulseInt_multcut_nonphys2[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_multcut_nonphys[counter]->SetLineColor(800);//blue + ng_goodAdcPulseInt_multcut_nonphys[counter]->SetLineWidth(1); + ng_goodAdcPulseInt_multcut_nonphys[counter]->Draw("SAME"); + + + ng_goodAdcPulseInt_multcut_single[counter]->SetLineColor(7);//magenta + ng_goodAdcPulseInt_multcut_single[counter]->SetLineWidth(1); + ng_goodAdcPulseInt_multcut_single[counter]->Draw("SAME"); + TLegend *legend2 = new TLegend(0.1,0.6,0.6,0.9); + + legend2->AddEntry(ng_goodAdcPulseInt[counter],"ng_goodAdcPulseInt(raw branch)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_multcut[counter],"ng_goodAdcPulseInt (mul=1)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_multcut_nonphys2[counter],"ng_goodAdcPulseAInt (mul=1,ngcer_YatCer != 0 && ngcer_XatCer != 0 )","l"); + legend2->AddEntry(ng_goodAdcPulseInt_multcut_nonphys1[counter],"#splitline{ng_goodAdcPulseInt (mul=1, cal_eprtracknorm>0 &&}{ cal_etracknorm>0 && cal_eprtracknorm < cal_etracknorm)}","l"); + legend2->AddEntry(ng_goodAdcPulseInt_multcut_nonphys[counter],"#splitline{ng_goodAdcPulseInt (mul=1,ngcer_YatCer != 0 &&}{#splitline{ngcer_XatCer != 0,cal_eprtracknorm>0 &&}{ cal_etracknorm>0 && cal_eprtracknorm < cal_etracknorm)}}","l"); + legend2->AddEntry(ng_goodAdcPulseInt_multcut_single[counter],"ng_goodAdcPulseInt (mul=1,all cuts,single pmt)","l"); + legend2->Draw(); + } + c2->Update(); + */ + +//declare fits for 1D histos. Change as desired. + Double_t FitAmpMinArray[3]={-1000,12.5,12.5}; // {flag, PMT1, PMT2} Where to start the Amp fits for each PMT + Double_t FitAmpMaxArray[3]={-1000,24.5,24.5}; // {flag, PMT1, PMT2} Where to end the Amp fits + + Double_t FitIntMinArray[3]={-1000,6.2,6.2}; //{flag, PMT1, PMT2} Where to start the Int fits + Double_t FitIntMaxArray[3]={-1000,10.5,10.5};//{flag, PMT1, PMT2} Where to end the Int fits + + Double_t FitnpeMinArray[3]={-1000,0.78,0.78}; //{flag, PMT1, PMT2} Where to start the Int fits + Double_t FitnpeMaxArray[3]={-1000,1.22,1.22};//{flag, PMT1, PMT2} Where to end the Int fits + + + gausFitAmp1 = new TF1("gausFitAmp1", "gaus",FitAmpMinArray[1],FitAmpMaxArray[1]); // PMT 1 + gausFitInt1 = new TF1("gausFitInt1", "gaus",FitIntMinArray[1],FitIntMaxArray[1]); + gausFitInt_zoom1 = new TF1("gausFitInt_zoom1", "gaus",FitIntMinArray[1],FitIntMaxArray[1]); + gausFitnpe1 = new TF1("gausFitnpe1", "gaus",FitnpeMinArray[1],FitnpeMaxArray[1]); + + gausFitAmp2 = new TF1("gausFitAmp2", "gaus",FitAmpMinArray[2],FitAmpMaxArray[2]);// PMT 2 + gausFitInt2 = new TF1("gausFitInt2", "gaus",FitIntMinArray[2],FitIntMaxArray[2]); + gausFitInt_zoom2 = new TF1("gausFitInt_zoom2", "gaus",FitIntMinArray[2],FitIntMaxArray[2]); + gausFitnpe2 = new TF1("gausFitnpe2", "gaus",FitnpeMinArray[2],FitnpeMaxArray[2]); + + + /* + + // graph the results on AdcPulseAmp from all the cuts and fit gaussian + TCanvas *c15=new TCanvas("c15","c15",1000,700); + c15->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c15->cd(counter); + gPad->SetLogy(); + ng_goodAdcPulseAmp_multcut[counter] -> Fit(Form("gausFitAmp%d",counter),"R"); // comment out if you don't want to fit the ngcer + ng_goodAdcPulseAmp_multcut[counter]->SetLineColor(4); + ng_goodAdcPulseAmp_multcut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_multcut[counter]->Draw("SAME"); + } + c15->Update(); + c15->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_%s_cer_goodAdcPulseAmp.pdf",run_num)); + */ + // graph the results on AdcPulseInt from the cuts + TCanvas *c16=new TCanvas("c16","c16",1000,700); + c16->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c16->cd(counter); + gPad->SetLogy(); + ng_goodAdcPulseInt_multcut_fit[counter] -> Fit(Form("gausFitInt_zoom%d",counter),"R"); // comment out if you don't want to fit the ngcer + ng_goodAdcPulseInt_multcut_fit[counter]->SetLineColor(4); + ng_goodAdcPulseInt_multcut_fit[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_multcut_fit[counter]->Draw("SAME"); + } + c16->Update(); + c16->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_%s_cer_goodAdcPulseInt_fit.pdf",run_num)); + + TCanvas *c17=new TCanvas("c17","c17",1000,700); + c17->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c17->cd(counter); + gPad->SetLogy(); + ng_goodAdcPulseInt_multcut[counter] -> Fit(Form("gausFitInt%d",counter),"R"); // comment out if you don't want to fit the ngcer + ng_goodAdcPulseInt_multcut[counter]->SetLineColor(4); + ng_goodAdcPulseInt_multcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_multcut[counter]->Draw("SAME"); + } + c17->Update(); + c17->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_%s_cer_goodAdcPulseInt_new_replay1.pdf",run_num)); + + + Double_t mean[5]; + Double_t sigma[5]; + Double_t npe[5]; // "number of photoelectrons" + Double_t spe[5]; // "integral per single photo electron" + Double_t calic_const[5]; + mean[1]=gausFitInt1-> GetParameter(1); + sigma[1]=gausFitInt1->GetParameter(2); + mean[2]=gausFitInt2-> GetParameter(1); + sigma[2]=gausFitInt2->GetParameter(2); + + cout<<"***************************************************************************"<<endl; + cout<<"PulseInt Fit for Run "<<run_num<<endl; + for (int i=1;i<3;i++){ + spe[i] = mean[i]; + cout<<"PMT"<<i<<": mean = "<<mean[i]<<"; sigma ="<<sigma[i]<<endl; + //cout<<"PMT"<<i<<":npe = (mean/sigma)^2 = "<< npe[i] << "; spe = mean/npe = "<<spe[i]<<endl; + cout<<"PMT"<<i<<":The calibration constant in the parameter file is 1/spe = "<<1/spe[i]<<endl; + } + + cout<<"***************************************************************************"<<endl; + + + //graph the H.cer.npe +TCanvas *c19=new TCanvas("c19","c19",1000,700); + c19-> Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c19->cd(counter); + gPad->SetLogy(); + ngcer_npe_histo[counter]-> Fit(Form("gausFitnpe%d",counter),"R"); + ngcer_npe_histo[counter]->SetLineColor(kBlack); + ngcer_npe_histo[counter]->SetLineWidth(2); + ngcer_npe_histo[counter]->Draw("SAME"); + + } + c19-> Update(); + c19->SaveAs(Form("/u/group/c-polhe3/Users/murchhana/A1N_2020/cherenkov_calibration/HMS_CER_Calib_Plots/HMS_%s_cer_npe_new_replay1.pdf",run_num)); + + + + + +return 0; +} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/cer_calib_hms_method2.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/cer_calib_hms_method2.C new file mode 100644 index 0000000000000000000000000000000000000000..a7674c99599bed8b97c3c751155e17feb2d89b07 --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/cer_calib_hms_method2.C @@ -0,0 +1,898 @@ +#include <iostream> +#include <fstream> +#include <string> +#include <TFile.h> +#include <TDirectory.h> +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TH2.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" +#include <TLine.h> + +using namespace std; + +// Draft of a program to conduct ngcer calibration for SHMS by hand using "Method 2" from Simona. +// https://logbooks.jlab.org/entry/3650663 +// https://hallcweb.jlab.org/DocDB/0010/001053/001/wisewordsoncheranalysis.pdf +// murchhanaroy@uky.edu +// August 2020 + + +void cer_calib_hms_method2() +{ + + gStyle->SetOptFit(1111); //setting stat bar options + gStyle->SetStatFormat("6.6g"); + gStyle->SetLegendFont(42); + gStyle->SetLegendTextSize(0.01); + +//Declare root file +char run_num[20]; +cout<<"Enter HMS Run number (Including leading 0):"<<endl; +cin>> run_num; + +TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/hms_replay_production_all_%s_200000.root",run_num); +TFile *fileIN = new TFile(filename); + + +//Declare Tree +TTree *T = (TTree*)fileIN->Get("T"); + +// Acquire the number of entries +Long64_t nentries; +nentries = T->GetEntries(); + +// Acquire the branches +Int_t npmt=2; + +//define the arrays we are going to put the branches in. + + Double_t ngcer_goodAdcTdcDiffTime[4],ngcer_counter[30],ngcer_mult[30],ngcer_adcPulseTime[30],ngcer_goodAdcPulseAmp[4],ngcer_goodAdcPulseInt[4]; + Double_t cal_eprtracknorm, cal_etracknorm,ngcer_XatCer,ngcer_YatCer, delta, win; //good == array of 4. (This is what Brad said, he can probably explain more why). + Double_t starttime; + Int_t ndata_ngcer_pulseint; + +T->SetBranchAddress("H.hod.starttime", &starttime); +T->SetBranchAddress("H.cer.adcPulseTime", &ngcer_adcPulseTime); + +T->SetBranchAddress("Ndata.H.cer.adcPulseInt", &ndata_ngcer_pulseint); //hit list +T->SetBranchAddress("H.cer.adcCounter", &ngcer_counter); //pmts + +T->SetBranchAddress("H.cer.goodAdcMult", &ngcer_mult); + +T->SetBranchAddress("H.cer.goodAdcTdcDiffTime",&ngcer_goodAdcTdcDiffTime); // events that pass the detector time window cuts + + T->SetBranchAddress("H.cer.goodAdcPulseAmp", &ngcer_goodAdcPulseAmp); + T->SetBranchAddress("H.cer.goodAdcPulseInt", &ngcer_goodAdcPulseInt); + + T-> SetBranchAddress("H.cer.xAtCer",&ngcer_XatCer); + T-> SetBranchAddress("H.cer.yAtCer",&ngcer_YatCer); + + ////Energy variables for the shower and preshower + T->SetBranchAddress("H.cal.etottracknorm", &cal_etracknorm); // shower + preshower energy (I'm not exactly sure how these are "normalized" but these are the variables Brad and Xiaochao wanted me to use) + T->SetBranchAddress("H.cal.eprtracknorm", &cal_eprtracknorm); // preshower energy + T->SetBranchAddress("H.gtr.dp", &delta); + T->SetBranchAddress("H.react.z", &win); + + //****************************************************************************************************************************************************************** + + /* +The cuts that used on the ADC pulse integral (P.ngcer.goodAdcPulseInt) are the following: + +-- H.cal.etottracknorm>0.8 to choose electrons. + +-- H.gtr.dp > -9 && P.gtr.dp < 9. + +-- timing window cuts (H.cer.goodAdcTdcDiffTime) (already set in the corresponding parameter file in hallc_replay ) + +--NGCER X and Y cuts for each PMT. + +--Requiring good Adc multiplicity == 1 for the pmt undr calibration and multiplicity == 0 for the other pmts. + */ + +//******************************************************************************************************************************************************************* + +// Declare histos and fits. + +//Old code is counting from 1 so we need arrays of 5. + +//histos of goodAdcPulseAmp and goodAdcPulseInt + + TH1F *ng_goodAdcPulseAmp[5]; //no cuts, only the branch itself + TH1F *ng_goodAdcPulseInt[5]; + + + TH1F *ng_goodAdcPulseAmp_nocut[5]; //single pmt condition applied, non-physical cut applied, no other cuts + TH1F *ng_goodAdcPulseInt_nocut[5]; + + TH1F *ng_goodAdcPulseAmp_Calcut[5]; // single pmt condition applied, only Calorimeter cut applied + TH1F *ng_goodAdcPulseInt_Calcut[5]; + + TH1F *ng_goodAdcPulseInt_PreShowercut[5]; + + TH1F *ng_goodAdcPulseAmp_gtrcut[5]; // single pmt condition applied, only gtrcut applied + TH1F *ng_goodAdcPulseInt_gtrcut[5]; + + TH1F *ng_goodAdcPulseAmp_xycut[5]; //single pmt condition applied, only xy cuts applied + TH1F *ng_goodAdcPulseInt_xycut[5]; + + TH1F *ng_goodAdcPulseAmp_allcut[5]; // single pmt condition applied, all cuts applied + TH1F *ng_goodAdcPulseInt_allcut[5]; + + + TH1F *ng_goodAdcTdcDiffTime[5]; // histo after cuts are applied + + + // histos of mirror + + TH2F *ng_xyCerRaw[5]; // 2D histo of whatever is in the branch + + TH1F *XatCerHistoRAW[5];// 1D histo of whatever in the branch + TH1F *YatCerHistoRAW[5]; + + TH2F *ng_xyCer_nocut[5]; // no shower cut and no single PMT cut + TH2F *ng_xyCer_SinglePmt[5]; // no shower cut and single PMT cut + TH2F *ng_xyCer_SinglePmt_Calcut[5]; // shower cut and "single PMT" cut + + TH1F *XatCerHisto_nocut[5]; // same as above, just in 1D so we can look at applying cuts to it more carefully + TH1F *YatCerHisto_nocut[5]; + TH1F *XatCerHisto_SinglePmt[5]; + TH1F *YatCerHisto_SinglePmt[5]; + TH1F *XatCerHisto_SinglePmt_Calcut[5]; + TH1F *YatCerHisto_SinglePmt_Calcut[5]; + + //histos of calorimeter energy + + TH2F *shwr_totalen; // Total Energy on Y, Shower energy on X + TH2F *shwr_prshwr; ;// Shower Energy on Y, Preshower energy on X + TH2F *prshwr_totalen; // Total Energy on Y, Preshower energy on X + + TH1F *TotalCalEnergyRAW; // before non-physical cuts, whatever in the branch + TH1F *ShowerEnergyRAW; + TH1F *PreshowerEnergyRAW; + + TH1F *TotalCalEnergy;// after non-physical cuts + TH1F *ShowerEnergy; + TH1F *PreshowerEnergy; + + //fitting histos + + TF1 *gausFitAmp1, *gausFitAmp2; + TF1 *gausFitInt1, *gausFitInt2; + TF1 *gausFitnpe1, *gausFitnpe2; + + TF1 *poisFitInt1, *poisFitInt2; + //**************************************************************************************************************************************************************************** + + //Define all histos + + //Make shower vs preshower energy 2D histo + + Double_t shwr_prshwr_yaxis_max =1.5; //variable to change the histogram axis (so we don't have to change it in the drawn cut lines) + Double_t shwr_prshwr_xaxis_max =1.5; + + shwr_totalen = new TH2F(Form("total energy vs shower energy run #%s",run_num), Form("total energy vs shower energy run #%s",run_num), 300, 0, shwr_prshwr_xaxis_max, 300, 0, shwr_prshwr_yaxis_max); + shwr_prshwr= new TH2F(Form("shower energy vs preshower energy run #%s",run_num), Form("shower energy vs preshower energy run #%s",run_num), 300, 0, shwr_prshwr_xaxis_max, 300, 0, shwr_prshwr_yaxis_max); + prshwr_totalen= new TH2F(Form("total energy vs preshower energy run #%s" ,run_num), Form("total energy vs preshower energy run #%s",run_num), 300, 0, shwr_prshwr_xaxis_max, 300, 0, shwr_prshwr_yaxis_max); + + TotalCalEnergyRAW=new TH1F(Form("total energy RAW etracknorm run #%s",run_num),Form("total energy RAW etracknorm run #%s",run_num),200,0,2); + ShowerEnergyRAW=new TH1F(Form("Shower Energy RAW (etracknorm - eprtracknorm) run #%s",run_num),Form("Shower Energy RAW (etracknorm - eprtracknorm) run #%s",run_num),200,0,2); + PreshowerEnergyRAW=new TH1F(Form("Preshower Energy RAW eprtracknorm run #%s",run_num),Form("Preshower Energy RAW eprtracknorm run #%s",run_num),200,0,2); + + TotalCalEnergy=new TH1F(Form("total energy etracknorm run #%s",run_num),Form("total energy etracknorm run #%s",run_num),200,0,2); + ShowerEnergy=new TH1F(Form("Shower Energy (etracknorm - eprtracknorm) run #%s",run_num),Form("Shower Energy (etracknorm - eprtracknorm) run #%s",run_num),200,0,2); + PreshowerEnergy=new TH1F(Form("Preshower Energy eprtracknorm run #%s",run_num),Form("Preshower Energy eprtracknorm run #%s",run_num),200,0,2); + + + + //ng_xyCerRAW=new TH2F(Form("XatCer vs YatCer RAW run #%s",run_num), Form("XatCer vs YatCer RAW run # %s",run_num),600, -60, 40, 600, --60, 40); + //ng_xyCer =new TH2F(Form("XatCer vs YatCer for all, run #%s",run_num), Form("XatCer vs YatCer for all, run #%s",run_num),400,-40,40,400,-40,40); + + + // initializing histos that are for each PMT + for(Int_t i=1; i<npmt+1; i++) +{ + TString namePulseAmp=Form("hNcerPulseAmp%d",i); + TString titlePulseAmp=Form("PMT%d: HMS CER goodAdcPulseAmp, Run %s",i,run_num); + TString namePulseInt=Form("hNcerPulseInt%d",i); + TString titlePulseInt=Form("PMT%d: HMS CER goodAdcPulseInt, Run %s",i,run_num); + + TString namePulseAmp_nocut=Form("hNcerPulseAmp%d nocut",i); + TString titlePulseAmp_nocut=Form("PMT%d: HMS CER goodAdcPulseAmp, Run %s",i,run_num); + TString namePulseInt_nocut=Form("hNcerPulseInt%d nocut",i); + TString titlePulseInt_nocut=Form("PMT%d: HMS CER goodAdcPulseInt nocut, Run %s",i,run_num); + + TString namePulseAmp_Calcut=Form("hNcerPulseAmp%d Calcut",i); + TString titlePulseAmp_Calcut=Form("PMT%d: HMS CER goodAdcPulseAmp Cal cut, Run %s",i,run_num); + TString namePulseInt_Calcut=Form("hNcerPulseInt%d Calcut",i); + TString titlePulseInt_Calcut=Form("PMT%d: HMS CER goodAdcPulseInt Cal cut, Run %s",i,run_num); + + + TString namePulseInt_PreShowercut=Form("hNcerPulseInt%d PreShowercut",i); + TString titlePulseInt_PreShowercut=Form("PMT%d: HMS CER goodAdcPulseInt PreShower cut, Run %s",i,run_num); + + TString namePulseAmp_gtrcut=Form("hNcerPulseAmp%d gtrcut",i); + TString titlePulseAmp_gtrcut=Form("PMT%d: HMS CER goodAdcPulseAmp gtr cut, Run %s",i,run_num); + TString namePulseInt_gtrcut=Form("hNcerPulseInt%d gtrcut",i); + TString titlePulseInt_gtrcut=Form("PMT%d: HMS CER goodAdcPulseInt gtr cut, Run %s",i,run_num); + + TString namePulseAmp_xycut=Form("hNcerPulseAmp%d xycut",i); + TString titlePulseAmp_xycut=Form("PMT%d: HMS CER goodAdcPulseAmp xy cut Run %s",i,run_num); + TString namePulseInt_xycut=Form("hNcerPulseInt%d xycut",i); + TString titlePulseInt_xycut=Form("PMT%d: HMS CER goodAdcPulseInt xy cut Run %s",i,run_num); + + TString namePulseAmp_allcut=Form("hNcerPulseAmp%d allcut",i); + TString titlePulseAmp_allcut=Form("PMT%d: HMS CER goodAdcPulseAmp Cal cut,gtr cut, xy cut Run %s",i,run_num); + TString namePulseInt_allcut=Form("hNcerPulseInt%d allcut",i); + TString titlePulseInt_allcut=Form("PMT%d: HMS CER goodAdcPulseInt Cal cut, gtr cut, xy cut Run %s",i,run_num); + + + + ng_goodAdcPulseAmp[i]= new TH1F(namePulseAmp, titlePulseAmp,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt[i]= new TH1F(namePulseInt, titlePulseInt, 140, 0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_nocut[i]= new TH1F(namePulseAmp_nocut, titlePulseAmp_nocut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_nocut[i]= new TH1F(namePulseInt_nocut, titlePulseInt_nocut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_Calcut[i]= new TH1F(namePulseAmp_Calcut, titlePulseAmp_Calcut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_Calcut[i]= new TH1F(namePulseInt_Calcut, titlePulseInt_Calcut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseInt_PreShowercut[i]= new TH1F(namePulseInt_PreShowercut, titlePulseInt_PreShowercut, 140,0,140); + + ng_goodAdcPulseAmp_gtrcut[i]= new TH1F(namePulseAmp_gtrcut, titlePulseAmp_gtrcut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_gtrcut[i]= new TH1F(namePulseInt_gtrcut, titlePulseInt_gtrcut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_xycut[i]= new TH1F(namePulseAmp_xycut, titlePulseAmp_xycut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_xycut[i]= new TH1F(namePulseInt_xycut, titlePulseAmp_xycut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_allcut[i]= new TH1F(namePulseAmp_allcut, titlePulseAmp_allcut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_allcut[i]= new TH1F(namePulseInt_allcut, titlePulseInt_allcut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcTdcDiffTime[i]=new TH1F(Form("goodAdcTdcDiffTime PMT%d run %s",i,run_num),Form("goodAdcTdcDiffTime PMT%d run %s",i,run_num),150,-50,100); + + ng_xyCerRaw[i]=new TH2F(Form("YatCer vs XatCer Raw PMT%d %s",i,run_num), Form("YatCer vs XatCer Raw PMT%d %s",i,run_num),525, -65, 40, 400, -40, 40); + ng_xyCer_nocut[i]=new TH2F(Form("YatCer vs XatCer PMT%d nocut %s",i,run_num), Form("YatCer vs XatCer PMT%d non-physical cuts applied, no other cuts %s",i,run_num),525, -65, 40, 400, -40, 40); + ng_xyCer_SinglePmt[i]=new TH2F(Form("YatCer vs XatCer PMT%d SinglePmt %s",i,run_num), Form("YatCer vs XatCer PMT%d SinglePmt %s",i,run_num),525, -65, 40, 400, -40, 40); + ng_xyCer_SinglePmt_Calcut[i]=new TH2F(Form("YatCer vs XatCer PMT%d SinglePmt Cal cut %s",i,run_num), Form("YatCer vs XatCer PMT%d SinglePmt Calcut %s",i,run_num),525, -65, 40, 400, -40, 40); + + XatCerHisto_nocut[i] =new TH1F(Form("XatCerHisto_nocut PMT%d %s",i,run_num), Form("XatCerHisto PMT%d nocut %s",i,run_num),400,-65,40); + YatCerHisto_nocut[i] =new TH1F(Form("YatCerHisto_nocut PMT%d %s",i,run_num), Form("YatCerHisto PMT%d nocut %s",i,run_num),400,-40,40); + + XatCerHisto_SinglePmt[i] =new TH1F(Form("XatCerHisto_SinglePmt PMT%d Single%s",i,run_num), Form("XatCerHisto PMT%d SinglePmt %s",i,run_num),400,-65,40); + YatCerHisto_SinglePmt[i] =new TH1F(Form("YatCerHisto_SinglePmt PMT%d %s",i,run_num), Form("YatCerHisto PMT%d SinglePmt %s",i,run_num),400,-40,40); + + XatCerHisto_SinglePmt_Calcut[i] =new TH1F(Form("XatCerHisto_SinglePmt_Calcut PMT%d %s",i,run_num), Form("XatCerHisto SinglePmt Cal cut PMT%d %s",i,run_num),400,-65,40); + YatCerHisto_SinglePmt_Calcut[i] =new TH1F(Form("YatCerHisto_SinglePmt_Calcut PMT%d %s",i,run_num), Form("YatCerHisto SinglePmt Cal cut PMT%d %s",i,run_num),400,-40,40); + + XatCerHistoRAW[i] =new TH1F(Form("XatCerHisto PMT%d RAW %s",i,run_num), Form("XatCerHisto PMT%d RAW %s",i,run_num),400,-65,40); + YatCerHistoRAW[i] =new TH1F(Form("YatCerHisto PMT%d RAW %s",i,run_num), Form("YatCerHisto PMT%d RAW %s",i,run_num),400,-40,40); +} + + //************************************************************************************************************************************************************************************************* + + //Assign shower cuts (should be based on results from the shower vs preshower 2D histo) + Double_t cal_y_cut_lower, cal_y_cut_upper, cal_x_cut_lower, cal_x_cut_upper; + // y-axis + cal_y_cut_lower=0.9; //set to 0 if you don't want to cut the ngcer data. (0.95-1.15 for run 9740) (0-0.3 for 9573) (0.1-0.6 for 10337) + cal_y_cut_upper=1.35; //set to a big number (ex. 2) if you don't want a cut + // x- axis + cal_x_cut_lower=0.45; //set to 0 if you don't want to cut the ngcer data. (0.45-0.75 for run 9740) (0-0.07 for 9573) (0.025-0.06 for 10337) + cal_x_cut_upper=1.1; //set to a big number (ex. 2) if you don't want a cut + + // XatCer, YatCer cuts + Double_t XatCerCutLower[5]={-1000,-1,-27}; //Old code is counting from 1 + Double_t XatCerCutUpper[5]={-1000,20,-3}; + Double_t YatCerCutLower[5]={-1000,-12,-10};// {FLAG, PMT1, PMT2} + Double_t YatCerCutUpper[5]={-1000,16,12}; + + +//declare fits for 1D histos. Change as desired. + +Double_t FitAmpMinArray[3]={-1000,50,50}; // {flag, PMT1, PMT2} Where to start the Amp fits for each PMT + Double_t FitAmpMaxArray[3]={-1000,130,130}; // {flag, PMT1, PMT2} Where to end the Amp fits + + Double_t FitIntMinArray[3]={-1000,20,20}; //{flag, PMT1, PMT2} Where to start the Int fits + Double_t FitIntMaxArray[3]={-1000,58,65};//{flag, PMT1, PMT2} Where to end the Int fits + + Double_t FitnpeMinArray[3]={-1000,50,50}; //{flag, PMT1, PMT2} Where to start the Int fits + Double_t FitnpeMaxArray[3]={-1000,120,120};//{flag, PMT1, PMT2} Where to end the Int fits + + gausFitAmp1 = new TF1("gausFitAmp1", "gaus",FitAmpMinArray[1],FitAmpMaxArray[1]); // PMT 1 + gausFitInt1 = new TF1("gausFitInt1", "gaus",FitIntMinArray[1],FitIntMaxArray[1]); + gausFitnpe1 = new TF1("gausFitnpe1", "gaus",FitnpeMinArray[1],FitnpeMaxArray[1]); + + gausFitAmp2 = new TF1("gausFitAmp2", "gaus",FitAmpMinArray[2],FitAmpMaxArray[2]);// PMT 2 + gausFitInt2 = new TF1("gausFitInt2", "gaus",FitIntMinArray[2],FitIntMaxArray[2]); + gausFitnpe2 = new TF1("gausFitnpe2", "gaus",FitnpeMinArray[2],FitnpeMaxArray[2]); + + poisFitInt1 = new TF1("poisFitInt1", "[0]*TMath::Power(([1]/[2]),(x/[2]))*(TMath::Exp(-([1]/[2])))/TMath::Gamma((x/[2])+1)",FitIntMinArray[1],FitIntMaxArray[1]); + poisFitInt1->SetParameters(1000,44,7.9); + poisFitInt2 = new TF1("poisFitInt2", "[0]*TMath::Power(([1]/[2]),(x/[2]))*(TMath::Exp(-([1]/[2])))/TMath::Gamma((x/[2])+1)",FitIntMinArray[2],FitIntMaxArray[2]); + poisFitInt2->SetParameters(1000,44,7.9); + //******************************************************************************************************************************************************************************************************* + + // Begining of analysis on all the events and applying cuts + +// Loop of entries in tree + cout << "nentries= "<<nentries<<endl; + for(Long64_t ievent=0; ievent < nentries; ievent++){ //can be lowered for testing + + if (ievent % 10000 == 0){//printing progress updates to the terminal + cout<< "ievent= "<<ievent <<endl; + } + + T->GetEntry(ievent); + + //Filling up the RAW histos. Counting from 1. + for (int i=1; i<npmt+1;i++){ + XatCerHistoRAW[i] -> Fill(ngcer_XatCer); + YatCerHistoRAW[i] -> Fill(ngcer_YatCer); + ng_goodAdcPulseAmp[i]->Fill(ngcer_goodAdcPulseAmp[i-1]); + ng_goodAdcPulseInt[i]->Fill(ngcer_goodAdcPulseInt[i-1]); + ng_goodAdcTdcDiffTime[i]->Fill(ngcer_goodAdcTdcDiffTime[i-1]); + ng_xyCerRaw[i]->Fill(ngcer_XatCer, ngcer_YatCer); + } + + TotalCalEnergyRAW ->Fill(cal_etracknorm); + ShowerEnergyRAW -> Fill(cal_etracknorm-cal_eprtracknorm); + PreshowerEnergyRAW ->Fill(cal_eprtracknorm); + + + ////Fill 2D histo for shower vs preshower energy. + //// cut out any non-physical singnals. There is a line at x=y in the calorimeter that isn't physical. + if (ngcer_YatCer != 0 && ngcer_XatCer != 0){ + if(cal_eprtracknorm>0 && cal_etracknorm>0 && cal_eprtracknorm < cal_etracknorm){ + shwr_totalen -> Fill( cal_etracknorm-cal_eprtracknorm, cal_etracknorm); //Fill(x,y). Total Energy on Y, Shower energy on X + shwr_prshwr -> Fill (cal_etracknorm-cal_eprtracknorm, cal_eprtracknorm);// Shower Energy on X, Preshower energy on Y + prshwr_totalen -> Fill (cal_eprtracknorm , cal_etracknorm);// Total Energy on Y, Preshower energy on X + TotalCalEnergy ->Fill(cal_etracknorm); + ShowerEnergy -> Fill(cal_etracknorm-cal_eprtracknorm); + PreshowerEnergy ->Fill(cal_eprtracknorm); + //ng_xyCer -> Fill(ngcer_YatCer,ngcer_XatCer); //Fill(xaxis,yaxis) + + + + Bool_t singleFlagAmp=kTRUE; // flags to help identify if there was singnal in only one PMT at a time + Bool_t singleFlagInt=kFALSE; + + // now we ARE CHECKING if only one PMT had a singnal + for (Int_t counterNew=1; counterNew< npmt+1; counterNew++){ // counting from 1 + + //apply mutiplicity cuts + if(ngcer_mult[counterNew-1]==1){ + + ng_xyCer_nocut[counterNew] -> Fill(ngcer_YatCer,ngcer_XatCer); + + if(ngcer_goodAdcPulseAmp[counterNew-1]>0) + { + singleFlagAmp=kTRUE; // this assignement is redundent + for (Int_t counter2=1; counter2 <npmt+1;counter2++){ + if (counterNew != counter2 && ngcer_goodAdcPulseAmp[counter2-1] >0){// loop over the other PMT's (that are not itself) and see if there was a signal + singleFlagAmp = kFALSE; // there was a signal in one of the other PMTs, so event was not in one single pmt + } + } + if (singleFlagAmp) + {// if event was in one single pmt + XatCerHisto_SinglePmt[counterNew] -> Fill(ngcer_XatCer); + YatCerHisto_SinglePmt[counterNew] -> Fill(ngcer_YatCer); + ng_xyCer_SinglePmt[counterNew] -> Fill(ngcer_XatCer,ngcer_YatCer); + + ng_goodAdcPulseAmp_nocut[counterNew]->Fill(ngcer_goodAdcPulseAmp[counterNew-1]); //Fill histo with the goodAdcPulseAmp branch without any cuts + + + + // apply shower/calorimeter cut + + //if(cal_etracknorm > 0.8){ + if(cal_etracknorm > cal_y_cut_lower && cal_etracknorm < cal_y_cut_upper && (cal_etracknorm-cal_eprtracknorm) > cal_x_cut_lower && (cal_etracknorm-cal_eprtracknorm) < cal_x_cut_upper){ + XatCerHisto_SinglePmt_Calcut[counterNew] -> Fill(ngcer_XatCer);// fill xy histos + YatCerHisto_SinglePmt_Calcut[counterNew] -> Fill(ngcer_YatCer); + ng_xyCer_SinglePmt_Calcut[counterNew] -> Fill(ngcer_XatCer,ngcer_YatCer); + + ng_goodAdcPulseAmp_Calcut[counterNew]-> Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + }// end shower cut + + //applying X Y cuts + if(ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew]){ + ng_goodAdcPulseAmp_xycut[counterNew]-> Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + }//end of XY cuts + + //applying gtr/delta cuts + if(delta > -9.0 && delta < 9.0){ + ng_goodAdcPulseAmp_gtrcut[counterNew]-> Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + }//end of gtr cuts + + //applying all cuts + //if(cal_etracknorm > 0.8 && ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew] && delta > -10.0 && delta < 22.0) + if(cal_etracknorm > cal_y_cut_lower && cal_etracknorm < cal_y_cut_upper && (cal_etracknorm-cal_eprtracknorm) > cal_x_cut_lower && (cal_etracknorm-cal_eprtracknorm)< cal_x_cut_upper && ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew] && delta > -9.0 && delta < 9.0 && win > -14 && win <14) + { + ng_goodAdcPulseAmp_allcut[counterNew]-> Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + }//end of all cuts + + }// end singleFlagAmp check + }// end looking at AdcPulseAmp + + + //looking at AdcPulseInt + if(ngcer_goodAdcPulseInt[counterNew-1]>0){ + singleFlagInt=kTRUE;// redundent statment + for (Int_t counter3=1; counter3 <npmt+1;counter3++){ + if (counterNew != counter3 && ngcer_goodAdcPulseInt[counter3-1] >0){// loop over the other PMTs to see if any had a signal + singleFlagInt = kFALSE; // event was not in 1 single pmt + } + } + if (singleFlagInt){// if event was in 1 single pmt + ng_goodAdcPulseInt_nocut[counterNew]->Fill(ngcer_goodAdcPulseInt[counterNew-1]); //Fill histo with the goodAdcPulseInt branch without shower cuts + + //shower cut if + //if(cal_etracknorm > 0.8){ + if(cal_etracknorm > cal_y_cut_lower && cal_etracknorm < cal_y_cut_upper && (cal_etracknorm-cal_eprtracknorm) > cal_x_cut_lower && (cal_etracknorm-cal_eprtracknorm) < cal_x_cut_upper){ + ng_goodAdcPulseInt_Calcut[counterNew]-> Fill(ngcer_goodAdcPulseInt[counterNew-1]); + }// end of shower calorimeter cuts + if((cal_eprtracknorm)>0.1 && (cal_eprtracknorm)<0.8){ + ng_goodAdcPulseInt_PreShowercut[counterNew]-> Fill(ngcer_goodAdcPulseInt[counterNew-1]); + } + + + + //applying X Y cuts + if(ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew]){ + ng_goodAdcPulseInt_xycut[counterNew]-> Fill(ngcer_goodAdcPulseInt[counterNew-1]); + // ng_goodAdcTdcDiffTime[counterNew]->Fill(ngcer_goodAdcTdcDiffTime[counterNew-1]); + }// end of XY cut + + //applying gtr/delta cuts + if(delta > -9.0 && delta < 9.0){ + ng_goodAdcPulseInt_gtrcut[counterNew]-> Fill(ngcer_goodAdcPulseInt[counterNew-1]); + }//end of gtr cuts + + //applying all cuts + // if(cal_etracknorm > 0.8 && ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew] && delta > -8.0 && delta < 8.0) + if(cal_etracknorm > cal_y_cut_lower && cal_etracknorm < cal_y_cut_upper && (cal_etracknorm-cal_eprtracknorm) > cal_x_cut_lower && (cal_etracknorm-cal_eprtracknorm) < cal_x_cut_upper && ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew] && delta > -9.0 && delta < 9.0 && win < 14 && win > -14) + { + ng_goodAdcPulseInt_allcut[counterNew]-> Fill(ngcer_goodAdcPulseInt[counterNew-1]); + }//end of all cuts + + } //end of single PMT check + }// end of AdcPulseInt analysis + + }//end of multiplicity==1 cut for the pmt under calibration + } // end of single PMT analysis + } + }//end of non-physical check + }//end of event loop + + // Ending of analysis of events and applying all the cuts + /***************************************************************************************************************************/ + + + //Graph the results! + + // graph the AdcPulseAmp histos +TCanvas *c1=new TCanvas("c1","c1",1000,700); + c1->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c1->cd(counter); + gPad->SetLogy(); + // ng_goodAdcPulseAmp[counter] -> Fit("gausFitAmp","R"); // comment out if you don't want to fit the ngcer + + ng_goodAdcPulseAmp[counter]->SetLineColor(1);//black + ng_goodAdcPulseAmp[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp[counter]->Draw(); + + ng_goodAdcPulseAmp_nocut[counter]->SetLineColor(3);//green + ng_goodAdcPulseAmp_nocut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_nocut[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_Calcut[counter]->SetLineColor(4);//blue + ng_goodAdcPulseAmp_Calcut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_Calcut[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_gtrcut[counter]->SetLineColor(5);//yellow + ng_goodAdcPulseAmp_gtrcut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_gtrcut[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_xycut[counter]->SetLineColor(6);//magenta + ng_goodAdcPulseAmp_xycut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_xycut[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_allcut[counter]->SetLineColor(2);//red + ng_goodAdcPulseAmp_allcut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_allcut[counter]->Draw("SAME"); + + TLegend *legend1 = new TLegend(0.1,0.6,0.5,0.9); + + legend1->AddEntry(ng_goodAdcPulseAmp[counter],"ng_goodAdcPulseAmp(raw branch)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_nocut[counter],"ng_goodAdcPulseAmp (mul=1, non-physical cut)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_Calcut[counter],"ng_goodAdcPulseAmp (mul=1, non-physical cut, cal cut)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_gtrcut[counter],"ng_goodAdcPulseAmp (mul=1, non-physical cut, gtr cut)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_xycut[counter],"ng_goodAdcPulseAmp (mul=1, non-physical cut, xy cut)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_allcut[counter],"ng_goodAdcPulseAmp (mul=1, all cuts)","l"); + legend1->Draw(); + } + c1->Update(); + + + // Graph the AdcPulseInt histos +TCanvas *c2=new TCanvas("c2","c2",1000,700); + c2->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c2->cd(counter); + gPad->SetLogy(); + //ng_goodAdcPulseInt[counter] -> Fit("gausFitInt","R"); // comment out if you don't want to fit the ngcer + + ng_goodAdcPulseInt[counter]->SetLineColor(1);//black + ng_goodAdcPulseInt[counter]->SetLineWidth(2); + ng_goodAdcPulseInt[counter]->Draw(); + + ng_goodAdcPulseInt_nocut[counter]->SetLineColor(3);//green + ng_goodAdcPulseInt_nocut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_nocut[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_Calcut[counter]->SetLineColor(4);//blue + ng_goodAdcPulseInt_Calcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_Calcut[counter]->Draw("SAME"); + + + ng_goodAdcPulseInt_PreShowercut[counter]->SetLineColor(28);//brown + ng_goodAdcPulseInt_PreShowercut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_PreShowercut[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_gtrcut[counter]->SetLineColor(5);//yellow + ng_goodAdcPulseInt_gtrcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_gtrcut[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_xycut[counter]->SetLineColor(6);//magenta + ng_goodAdcPulseInt_xycut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_xycut[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_allcut[counter]->SetLineColor(2);//red + ng_goodAdcPulseInt_allcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_allcut[counter]->Draw("SAME"); + + + TLegend *legend2 = new TLegend(0.1,0.6,0.5,0.9); + + legend2->AddEntry(ng_goodAdcPulseInt[counter],"ng_goodAdcPulseInt(raw branch)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_nocut[counter],"ng_goodAdcPulseInt (mul=1, non-physical cut)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_PreShowercut[counter],"ng_goodAdcPulseInt (mul=1, non-physical cut,PreShower cut (0.1 < PrSh < 0.8))","l"); + legend2->AddEntry(ng_goodAdcPulseInt_Calcut[counter],"ng_goodAdcPulseInt (mul=1, non-physical cut, cal cut)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_gtrcut[counter],"ng_goodAdcPulseInt (mul=1, non-physical cut, gtr cut)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_xycut[counter],"ng_goodAdcPulseInt (mul=1, non-physical cut, xy cut)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_allcut[counter],"ng_goodAdcPulseInt (mul=1, all cuts)","l"); + legend2->Draw(); + } + c2->Update(); + + + + // Create lines to show the shower calorimeter cuts. TLine(x1, y1, x2, y2) + TLine *cal_y_lower_line=new TLine(0,cal_y_cut_lower,shwr_prshwr_xaxis_max,cal_y_cut_lower); // y axis + TLine *cal_y_upper_line=new TLine(0,cal_y_cut_upper,shwr_prshwr_xaxis_max,cal_y_cut_upper); + TLine *cal_x_lower_line=new TLine(cal_x_cut_lower,0,cal_x_cut_lower,shwr_prshwr_yaxis_max); // x axis + TLine *cal_x_upper_line=new TLine(cal_x_cut_upper,0,cal_x_cut_upper,shwr_prshwr_yaxis_max); + cal_y_lower_line->SetLineStyle(9); + cal_y_lower_line->SetLineColor(kRed); + cal_y_lower_line->SetLineWidth(2); + cal_y_upper_line->SetLineStyle(9); + cal_y_upper_line->SetLineColor(kRed); + cal_y_upper_line->SetLineWidth(2); + cal_x_lower_line->SetLineStyle(9); + cal_x_lower_line->SetLineColor(kRed); + cal_x_lower_line->SetLineWidth(2); + cal_x_upper_line->SetLineStyle(9); + cal_x_upper_line->SetLineColor(kRed); + cal_x_upper_line->SetLineWidth(2); + + // make lines for the XY cuts + TLine *XatCerLowerLines[5]; // old code is counting from 1 + TLine *YatCerLowerLines[5]; + TLine *XatCerUpperLines[5]; + TLine *YatCerUpperLines[5]; + //// TLine(x1,y1,x2,y2) + for (int i=1;i<5;i++){//counting from 1 + XatCerLowerLines[i]= new TLine(XatCerCutLower[i],-40,XatCerCutLower[i],40); + XatCerLowerLines[i]->SetLineStyle(9); + XatCerLowerLines[i]->SetLineColor(kRed); + XatCerLowerLines[i]->SetLineWidth(1); + + XatCerUpperLines[i]= new TLine(XatCerCutUpper[i],-40,XatCerCutUpper[i],40); + XatCerUpperLines[i]->SetLineStyle(9); + XatCerUpperLines[i]->SetLineColor(kRed); + XatCerUpperLines[i]->SetLineWidth(1); + + YatCerLowerLines[i]= new TLine(-65,YatCerCutLower[i],40,YatCerCutLower[i]); + YatCerLowerLines[i]->SetLineStyle(9); + YatCerLowerLines[i]->SetLineColor(kRed); + YatCerLowerLines[i]->SetLineWidth(1); + + YatCerUpperLines[i]= new TLine(-65,YatCerCutUpper[i],40,YatCerCutUpper[i]); + YatCerUpperLines[i]->SetLineStyle(9); + YatCerUpperLines[i]->SetLineColor(kRed); + YatCerUpperLines[i]->SetLineWidth(1); + } + + + // graph the total energy on Y, shower energy on X + TCanvas *c3=new TCanvas("c3","c3",1000,700); + shwr_totalen -> Draw("colz"); + shwr_totalen->GetXaxis()->SetTitle("Shower energy"); + shwr_totalen->GetYaxis()->SetTitle("Total energy"); + cal_y_lower_line -> Draw(); + cal_y_upper_line -> Draw(); + cal_x_lower_line -> Draw(); + cal_x_upper_line -> Draw(); + c3->Update(); + + // graph the XY histos for each PMT raw + TCanvas *c11=new TCanvas("c11","c11",1000,700); + c11-> Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c11->cd(counter); + ng_xyCerRaw[counter]->Draw("colz"); + XatCerLowerLines[counter] -> Draw(); + XatCerUpperLines[counter] -> Draw(); + YatCerLowerLines[counter] -> Draw(); + YatCerUpperLines[counter] -> Draw(); + ng_xyCerRaw[counter]->GetXaxis()->SetTitle("YatCer"); + ng_xyCerRaw[counter]->GetYaxis()->SetTitle("XatCer"); + } + c11-> Update(); + + +// graph the XY histos for each PMT without the shower cuts and without single pmt cuts, only non-physical cuts + TCanvas *c12=new TCanvas("c12","c12",1000,700); + c12-> Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c12->cd(counter); + ng_xyCer_nocut[counter]->Draw("colz"); + XatCerLowerLines[counter] -> Draw(); + XatCerUpperLines[counter] -> Draw(); + YatCerLowerLines[counter] -> Draw(); + YatCerUpperLines[counter] -> Draw(); + ng_xyCer_nocut[counter]->GetXaxis()->SetTitle("XatCer"); + ng_xyCer_nocut[counter]->GetYaxis()->SetTitle("YatCer"); + } + c12-> Update(); + + +// graph the xy plots without the shower cut and with single pmt cut + TCanvas *c17=new TCanvas("c17","c17",1000,700); + c17-> Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c17->cd(counter); + ng_xyCer_SinglePmt[counter]->Draw("colz"); + XatCerLowerLines[counter] -> Draw(); + XatCerUpperLines[counter] -> Draw(); + YatCerLowerLines[counter] -> Draw(); + YatCerUpperLines[counter] -> Draw(); + ng_xyCer_SinglePmt[counter]->GetXaxis()->SetTitle("XatCer"); + ng_xyCer_SinglePmt[counter]->GetYaxis()->SetTitle("YatCer"); + } + c17-> Update(); + + + // graoh the xy plots. with shower cut, with single pmt cut +TCanvas *c18=new TCanvas("c18","c18",1000,700); + c18-> Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c18->cd(counter); + ng_xyCer_SinglePmt_Calcut[counter]->Draw("colz"); + XatCerLowerLines[counter] -> Draw(); + XatCerUpperLines[counter] -> Draw(); + YatCerLowerLines[counter] -> Draw(); + YatCerUpperLines[counter] -> Draw(); + ng_xyCer_SinglePmt_Calcut[counter]->GetXaxis()->SetTitle("XatCer"); + ng_xyCer_SinglePmt_Calcut[counter]->GetYaxis()->SetTitle("YatCer"); + } + c18-> Update(); + + + + // graphing the 1D X histos +TCanvas *c5=new TCanvas("c5","c5",1000,700); + c5->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c5->cd(counter); + gPad->SetLogy(); + + XatCerHistoRAW[counter]->SetLineWidth(2); + XatCerHistoRAW[counter]->SetLineColor(1); + XatCerHistoRAW[counter]->Draw(); + + XatCerHisto_SinglePmt[counter]->SetLineWidth(2); + XatCerHisto_SinglePmt[counter]->SetLineColor(4); + XatCerHisto_SinglePmt[counter]->Draw("SAME"); + + XatCerHisto_SinglePmt_Calcut[counter]->SetLineWidth(2); + XatCerHisto_SinglePmt_Calcut[counter]->SetLineColor(2); + XatCerHisto_SinglePmt_Calcut[counter]->Draw("SAME"); + + + TLegend *legend3 = new TLegend(0.1,0.75,0.4,0.9); + + legend3->AddEntry(XatCerHistoRAW[counter],"XatCer(raw branch)","l"); + legend3->AddEntry(XatCerHisto_SinglePmt[counter],"XatCer (ngcer_mult=1, non-physical cut, single pmt)","l"); + legend3->AddEntry(XatCerHisto_SinglePmt_Calcut[counter],"XatCer (ngcer_mult=1, non-physical cut,single pmt, cal cut)","l"); + legend3->Draw(); + } + c5->Update(); + + + // Graphing the 1D Y histos +TCanvas *c6=new TCanvas("c6","c6",1000,700); + c6->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c6->cd(counter); + gPad->SetLogy(); + + YatCerHistoRAW[counter]->SetLineWidth(2); + YatCerHistoRAW[counter]->SetLineColor(1); + YatCerHistoRAW[counter]->Draw(); + + YatCerHisto_SinglePmt[counter]->SetLineWidth(2); + YatCerHisto_SinglePmt[counter]->SetLineColor(4); + YatCerHisto_SinglePmt[counter]->Draw("SAME"); + + YatCerHisto_SinglePmt_Calcut[counter]->SetLineWidth(2); + YatCerHisto_SinglePmt_Calcut[counter]->SetLineColor(2); + YatCerHisto_SinglePmt_Calcut[counter]->Draw("SAME"); + TLegend *legend4 = new TLegend(0.1,0.75,0.4,0.9); + + legend4->AddEntry(YatCerHistoRAW[counter],"YatCer(raw branch)","l"); + legend4->AddEntry(YatCerHisto_SinglePmt[counter],"YatCer (ngcer_mult=1, non-physical cut, single pmt)","l"); + legend4->AddEntry(YatCerHisto_SinglePmt_Calcut[counter],"YatCer (ngcer_mult=1, non-physical cut,single pmt, cal cut)","l"); + legend4->Draw(); + + } + c6->Update(); + + + + TCanvas *c8=new TCanvas("c8","c8",1000,700); + gPad->SetLogy(); + + TLegend *EnergyLegend = new TLegend(0.7,0.2,0.9,0.6); + + TotalCalEnergy -> SetLineColor(kGreen); + TotalCalEnergy -> SetLineWidth(2); + EnergyLegend ->AddEntry(TotalCalEnergy,"Total Cal Energy (non-physical cut)","l"); + TotalCalEnergy -> Draw(); + + ShowerEnergy -> SetLineColor(kBlue); + EnergyLegend -> AddEntry(ShowerEnergy, "Total Shower Energy (non-physical cut)", "l"); + ShowerEnergy -> Draw("SAME"); + + PreshowerEnergy -> SetLineColor(kRed); + PreshowerEnergy -> SetLineWidth(2); + EnergyLegend -> AddEntry(PreshowerEnergy, "Total PreShower Energy (non-physical cut)", "l"); + PreshowerEnergy -> Draw("SAME"); + + EnergyLegend-> Draw("SAME"); + c8->Update(); + + TCanvas *c13=new TCanvas("c13","c13",1000,700); + gPad->SetLogy(); + + TLegend *EnergyLegendRAW = new TLegend(0.7,0.2,0.9,0.6); + + TotalCalEnergyRAW -> SetLineColor(kGreen); + TotalCalEnergyRAW-> SetLineWidth(2); + EnergyLegendRAW->AddEntry(TotalCalEnergy,"Total Cal Energy (RAW)","l"); + TotalCalEnergyRAW-> Draw(); + + ShowerEnergyRAW -> SetLineColor(kBlue); + EnergyLegendRAW -> AddEntry(ShowerEnergy, "Total Shower Energy (RAW)", "l"); + ShowerEnergyRAW -> Draw("SAME"); + + PreshowerEnergyRAW -> SetLineColor(kRed); + PreshowerEnergyRAW -> SetLineWidth(2); + EnergyLegendRAW -> AddEntry(PreshowerEnergy, "Total PreShower Energy (RAW)", "l"); + PreshowerEnergyRAW -> Draw("SAME"); + + EnergyLegendRAW-> Draw("SAME"); + c13->Update(); + + + + // graph the results on AdcPulseInt from all the cuts and fit gaussian + TCanvas *c15=new TCanvas("c15","c15",1000,700); + c15->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c15->cd(counter); + gPad->SetLogy(); + ng_goodAdcPulseInt_allcut[counter] -> Fit(Form("gausFitInt%d",counter),"R"); // comment out if you don't want to fit the ngcer + ng_goodAdcPulseInt_allcut[counter]->SetLineColor(4); + ng_goodAdcPulseInt_allcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_allcut[counter]->Draw("SAME"); + } + c15->Update(); + /* + // graph the results on AdcPulseInt from the cuts and fir Poisson + TCanvas *c16=new TCanvas("c16","c16",1000,700); + c16->Divide(2,1); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c16->cd(counter); + gPad->SetLogy(); + ng_goodAdcPulseInt_allcut[counter] -> Fit(Form("poisFitInt%d",counter),"R"); // comment out if you don't want to fit the ngcer + ng_goodAdcPulseInt_allcut[counter]->SetLineColor(4); + ng_goodAdcPulseInt_allcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_allcut[counter]->Draw("SAME"); + } + c16->Update(); + */ + Double_t mean[3]; + Double_t sigma[3]; + Double_t npe[3]; // "number of photoelectrons" + Double_t spe[3]; // "integral per single photo electron" + Double_t calic_const[3]; + mean[1]=gausFitInt1-> GetParameter(1); + sigma[1]=gausFitInt1->GetParameter(2); + mean[2]=gausFitInt2-> GetParameter(1); + sigma[2]=gausFitInt2->GetParameter(2); + + + cout<<"***************************************************************************"<<endl; + cout<<"PulseInt Fit for Run "<<run_num<<endl; + for (int i=1;i<3;i++){ + npe[i] = (mean[i] * mean[i])/(sigma[i] * sigma[i]); + spe[i] = mean[i]/npe[i]; + cout<<"PMT"<<i<<": mean ="<<mean[i]<<" sigma ="<<sigma[i]<<endl; + cout<<"PMT"<<i<<":npe =(mean/sigma)^2="<< npe[i] << ", spe = mean/npe="<<spe[i]<<endl; + cout<<"PMT"<<i<<":The calibration constant in the parameter file is 1/spe ="<<1/spe[i]<<endl; + } + + cout<<"***************************************************************************"<<endl; + + /* + //graph the effect of the cuts on the timing plot +TCanvas *c19=new TCanvas("c19","c19",1000,700); + c19-> Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c19->cd(counter); + gPad->SetLogy(); + ng_goodAdcTdcDiffTimeRAW[counter]->SetLineColor(kGreen); + ng_goodAdcTdcDiffTimeRAW[counter]->SetLineWidth(2); + ng_goodAdcTdcDiffTimeRAW[counter]->Draw(); + ng_goodAdcTdcDiffTime[counter]->SetLineColor(kMagenta); + ng_goodAdcTdcDiffTime[counter]->Draw("SAME"); + } + c19-> Update(); + */ + +return 0; + +} + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/hms_method2_improvement.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/hms_method2_improvement.C new file mode 100644 index 0000000000000000000000000000000000000000..20bccf4c9ecdfcfce518f3f67b89497503e0fd2c --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/hms_method2_improvement.C @@ -0,0 +1,306 @@ +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TH2.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" +#include <TLine.h> + +using namespace std; + +void hms_method2_improvement() +{ + + gStyle->SetOptFit(1111); //setting stat bar options + gStyle->SetStatFormat("6.6g"); + gStyle->SetLegendFont(42); + gStyle->SetLegendTextSize(0.01); + + const int nbinsx = 240; + const int nbinsy = 40 ; + int npmt=2; + //Declare root file + char run_num[20]; + cout<<"Enter HMS Run number (Including leading 0):"<<endl; + cin>> run_num; + + TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/hms_replay_production_all_%s_200000.root",run_num); + TFile *fileIN = new TFile(filename); + + + //Declare Tree +TTree *T = (TTree*)fileIN->Get("T"); + +// Acquire the number of entries +Long64_t nentries; +nentries = T->GetEntries(); + + Double_t ngcer_mult[3], ngcer_goodAdcPulseInt[3], ngcer_npe[3]; + Double_t ngcer_XatCer, ngcer_YatCer,cal_etracknorm,cal_eprtracknorm; + + +T->SetBranchAddress("H.cer.goodAdcPulseInt", &ngcer_goodAdcPulseInt); + +T->SetBranchAddress("H.cer.npe", &ngcer_npe); + T->SetBranchAddress("H.cer.goodAdcMult", &ngcer_mult); + T-> SetBranchAddress("H.cer.xAtCer",&ngcer_XatCer); + T-> SetBranchAddress("H.cer.yAtCer",&ngcer_YatCer); + T->SetBranchAddress("H.cal.etottracknorm", &cal_etracknorm); // shower + preshower energy (I'm not exactly sure how these are "normalized" but these are the variables Brad and Xiaochao wanted me to use) + T->SetBranchAddress("H.cal.eprtracknorm", &cal_eprtracknorm); // preshower energy + + + + std::vector< TCut > cuts = {"H.cer.goodAdcMult[0]==1 && H.cal.etottracknorm > 0.9 && H.cal.etottracknorm < 1.35 && (H.cal.etottracknorm-H.cal.eprtracknorm) > 0.45 && (H.cal.etottracknorm-H.cal.eprtracknorm) < 1.1"," H.cer.goodAdcMult[1]==1 && H.cal.etottracknorm > 0.9 && H.cal.etottracknorm < 1.35 && (H.cal.etottracknorm-H.cal.eprtracknorm) > 0.45 && (H.cal.etottracknorm-H.cal.eprtracknorm) < 1.1"};//d2n cuts + + // std::vector< TCut > cuts = {"H.cer.goodAdcMult[0]==1 && H.cal.eprtracknorm > 0.1 && H.cal.eprtracknorm < 0.8"," H.cer.goodAdcMult[1]==1 && H.cal.eprtracknorm > 0.1 && H.cal.eprtracknorm < 0.8"}; + +// XatCer, YatCer cuts + Double_t XatCerCutLower[3]={-1000,4,-28}; //Old code is counting from 1 + Double_t XatCerCutUpper[3]={-1000,12,-3.5}; + Double_t YatCerCutLower[3]={-1000,4.4,-14};// {FLAG, PMT1, PMT2} + Double_t YatCerCutUpper[3]={-1000,15,8}; + + // make lines for the XY cuts + TLine *XatCerLowerLines[3]; // old code is counting from 1 + TLine *YatCerLowerLines[3]; + TLine *XatCerUpperLines[3]; + TLine *YatCerUpperLines[3]; + //// TLine(x1,y1,x2,y2) + for (int i=1;i<3;i++){//counting from 1 + XatCerLowerLines[i]= new TLine(-40,XatCerCutLower[i],40,XatCerCutLower[i]); + XatCerLowerLines[i]->SetLineStyle(9); + XatCerLowerLines[i]->SetLineColor(kRed); + XatCerLowerLines[i]->SetLineWidth(1); + + XatCerUpperLines[i]= new TLine(-40,XatCerCutUpper[i],40,XatCerCutUpper[i]); + XatCerUpperLines[i]->SetLineStyle(9); + XatCerUpperLines[i]->SetLineColor(kRed); + XatCerUpperLines[i]->SetLineWidth(1); + + YatCerLowerLines[i]= new TLine(YatCerCutLower[i],-60,YatCerCutLower[i],20); + YatCerLowerLines[i]->SetLineStyle(9); + YatCerLowerLines[i]->SetLineColor(kRed); + YatCerLowerLines[i]->SetLineWidth(1); + + YatCerUpperLines[i]= new TLine(YatCerCutUpper[i],-60,YatCerCutUpper[i],20); + YatCerUpperLines[i]->SetLineStyle(9); + YatCerUpperLines[i]->SetLineColor(kRed); + YatCerUpperLines[i]->SetLineWidth(1); + } + + TCanvas* c1 = new TCanvas("c1", "Mean NPE Distribution (With Multiplicity Cut) PMT 1", 1800, 600); + c1->Divide(3,1); + + c1->cd(1); + T->Draw(Form("H.cer.xAtCer:H.cer.yAtCer>>cleanEventDistrMult1(%i,-40,40,%i,-40,40)",nbinsy,nbinsx),cuts.at(0),"colz"); //clean electron x/y event distrubtion + TH2F *cleanEventDistrMult1 = (TH2F*)gDirectory->Get("cleanEventDistrMult1"); + cleanEventDistrMult1->SetTitle("Clean Electron Event Distribution;Y Position;X Position"); + + c1->cd(2); + T->Draw(Form("H.cer.xAtCer:H.cer.yAtCer>>cleanTotNpeDistrMult1(%i,-40,40,%i,-40,40)",nbinsy,nbinsx),cuts.at(0)*"H.cer.npe[0]","colz"); //clean electron x/y npe distribution + TH2F *cleanTotNpeDistrMult1 = (TH2F*)gDirectory->Get("cleanTotNpeDistrMult1"); + cleanTotNpeDistrMult1->SetTitle("Clean Electron Total NPE Distribution;Y Position;X Position"); + + c1->cd(3); + TH2F* cleanMeanNpeDistrMult1= (TH2F*)cleanTotNpeDistrMult1->Clone(); + cleanMeanNpeDistrMult1->Divide(cleanEventDistrMult1); // clean electron x/y mean npe per event distribution (cleanTotNpeDistr/cleanEventDistr) + cleanMeanNpeDistrMult1->Draw("colz"); + cleanMeanNpeDistrMult1->SetTitle("Clean Electron Mean NPE/Event Distribution;Y Position;X Position"); + XatCerLowerLines[1] -> Draw(); + XatCerUpperLines[1] -> Draw(); + YatCerLowerLines[1] -> Draw(); + YatCerUpperLines[1] -> Draw(); + + TCanvas* c2 = new TCanvas("c2", "Mean NPE Distribution (With Multiplicity Cut) PMT 2", 1800, 600); + c2->Divide(3,1); + + c2->cd(1); + T->Draw(Form("H.cer.xAtCer:H.cer.yAtCer>>cleanEventDistrMult2(%i,-40,40,%i,-60,20)",nbinsy,nbinsx),cuts.at(1),"colz"); //clean electron x/y event distrubtion + TH2F *cleanEventDistrMult2 = (TH2F*)gDirectory->Get("cleanEventDistrMult2"); + cleanEventDistrMult2->SetTitle("Clean Electron Event Distribution;Y Position;X Position"); + + c2->cd(2); + T->Draw(Form("H.cer.xAtCer:H.cer.yAtCer>>cleanTotNpeDistrMult2(%i,-40,40,%i,-60,20)",nbinsy,nbinsx),cuts.at(1)*"H.cer.npe[1]","colz"); //clean electron x/y npe distribution + TH2F *cleanTotNpeDistrMult2 = (TH2F*)gDirectory->Get("cleanTotNpeDistrMult2"); + cleanTotNpeDistrMult2->SetTitle("Clean Electron Total NPE Distribution;Y Position;X Position"); + + c2->cd(3); + TH2F* cleanMeanNpeDistrMult2= (TH2F*)cleanTotNpeDistrMult2->Clone(); + cleanMeanNpeDistrMult2->Divide(cleanEventDistrMult2); // clean electron x/y mean npe per event distribution (cleanTotNpeDistr/cleanEventDistr) + cleanMeanNpeDistrMult2->Draw("colz"); + cleanMeanNpeDistrMult2->SetTitle("Clean Electron Mean NPE/Event Distribution;Y Position;X Position"); + XatCerLowerLines[2] -> Draw(); + XatCerUpperLines[2] -> Draw(); + YatCerLowerLines[2] -> Draw(); + YatCerUpperLines[2] -> Draw(); + + + return 0; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + //TCut clean_electrons_w_mult1 = "H.cer.goodAdcMult[0]==1 && H.cal.etottracknorm > 0.9 && H.cal.etottracknorm < 1.25 && H.cal.eprtracknorm > 0.35 && H.cal.eprtracknorm < 1"; // Clean electrons with multiplicity cut + //TCut clean_electrons_w_mult2 = " H.cer.goodAdcMult[1]==1 && H.cal.etottracknorm > 0.9 && H.cal.etottracknorm < 1.25 && H.cal.eprtracknorm > 0.35 && H.cal.eprtracknorm < 1"; // Clean electrons with multiplicity cut + + + + + + + + + + + + + /* + TH2F *cleanEventDistrMult[2]; + TH2F *cleanTotgoodAdcPulseIntDistrMult[2]; + TH2F *cleanMeangoodAdcPulseIntDistrMult[2]; + +for(Int_t counter = 1; counter < npmt+1; counter++){ + cleanEventDistrMult[counter-1]=new TH2F(Form("cleanEventDistrMult PMT%d %s",counter,run_num), Form("cleanEventDistrMult PMT%d %s",counter,run_num),nbins,-65,40,nbins,-65,40); + cleanTotgoodAdcPulseIntDistrMult[counter-1]=new TH2F(Form("cleanTotgoodAdcPulseIntDistrMult PMT%d %s",counter,run_num), Form("cleanTotgoodAdcPulseIntDistrMult PMT%d %s",counter,run_num),nbins,-65,40,nbins,-65,40); + cleanMeangoodAdcPulseIntDistrMult[counter-1]=new TH2F(Form("cleanMeangoodAdcPulseIntDistrMult PMT%d %s",counter,run_num), Form("cleanMeangoodAdcPulseIntDistrMult PMT%d %s",counter,run_num),nbins,-65,40,nbins,-65,40); + } + +cout << "nentries= "<<nentries<<endl; + for(Long64_t ievent=0; ievent < nentries; ievent++){ //can be lowered for testing + + if (ievent % 10000 == 0){//printing progress updates to the terminal + cout<< "ievent= "<<ievent <<endl; + } + + T->GetEntry(ievent); + for(Int_t counter = 1; counter < npmt+1; counter++){ + if(ngcer_mult[counter-1]==1){ + if(cal_etracknorm > 0.9 && cal_etracknorm < 1.25 && cal_eprtracknorm > 0.35 && cal_eprtracknorm < 1){ + cleanEventDistrMult[counter-1]->Fill(ngcer_XatCer,ngcer_YatCer); + cleanTotgoodAdcPulseIntDistrMult[counter-1]->Fill(ngcer_XatCer*ngcer_npe[counter-1],ngcer_YatCer*ngcer_npe[counter-1]); + //cleanMeangoodAdcPulseIntDistrMult[counter-1]->Fill(ngcer_XatCer,ngcer_YatCer); + } + } + }} + + + // This canvas will display Mean NPE Distribution (NPE map) + TCanvas* c1 = new TCanvas("c1", "Mean goodAdcPulseInt Distribution (With Multiplicity Cut)", 1800, 1800); + c1->Divide(3,2); + gPad->SetLogy(); + for(Int_t counter = 1; counter < npmt+1; counter++){ + int p=(3*(counter-1))+1; + + cout<<p<<endl; + c1->cd(p); + + //tr->Draw("H.cer.xAtCer:H.cer.yAtCer>>cleanEventDistrMult",cuts.at((counter-1)),"goff"); //clean electron x/y event distrubtion + cleanEventDistrMult[counter-1]->Draw("colz"); + // cleanEventDistrMult[counter-1] = (TH2F*)gDirectory->Get("cleanEventDistrMult"); + // cleanEventDistrMult[counter-1]->SetTitle("Clean Electron Event Distribution;X Position;Y Position"); + + c1->cd(p+1); + //tr->Draw("H.cer.xAtCer:H.cer.yAtCer>>cleanTotgoodAdcPulseIntDistrMult",cuts.at((counter-1))*"H.cer.goodAdcPulseInt","goff"); //clean electron x/y npe distribution + cleanTotgoodAdcPulseIntDistrMult[counter-1]->Draw("colz"); + // cleanTotNpeDistrMult[counter-1]->SetTitle("Clean Electron Total NPE Distribution;X Position;Y Position"); + + c1->cd(p+2); + cleanMeangoodAdcPulseIntDistrMult[counter-1]= (TH2F*)cleanTotgoodAdcPulseIntDistrMult[counter-1]->Clone(); + cleanMeangoodAdcPulseIntDistrMult[counter-1]->Divide(cleanEventDistrMult[counter-1]); // clean electron x/y mean npe per event distribution (cleanTotNpeDistr/cleanEventDistr) + + cleanMeangoodAdcPulseIntDistrMult[counter-1]->Draw("colz"); + // cleanMeanNpeDistrMult[counter-1]->SetTitle("Clean Electron Mean NPE/Event Distribution;X Position;Y Position"); + + } + + // This canvas will display Intrinsic Efficiency Map + TCanvas* c2 = new TCanvas("c2", "Intrinsic Efficiency Map", 1800, 600); + c2->Divide(3,1); + + c2->cd(1); + tr->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanEventDistr(%i,-40,40,%i,-40,40)",nbins,nbins),clean_electrons,"colz"); //clean electron x/y event distrubtion + TH2F *cleanEventDistr = (TH2F*)gDirectory->Get("cleanEventDistr"); + cleanEventDistr->SetTitle("Clean Electron Event Distribution;X Position;Y Position"); + + c2->cd(2); + tr->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanEventWithLightDistr(%i,-40,40,%i,-40,40)",nbins,nbins),clean_electrons_w_light,"colz"); //clean electron x/y events with light distribution + TH2F *cleanEventWithLightDistr = (TH2F*)gDirectory->Get("cleanEventWithLightDistr"); + cleanEventWithLightDistr->SetTitle("Clean Electron Event With Light Distribution;X Position;Y Position"); + + c2->cd(3); + TH2F* effMap = (TH2F*)cleanEventWithLightDistr->Clone(); + effMap->Divide(cleanEventDistr); + effMap->Draw("colz"); + effMap->GetZaxis()->SetRangeUser(0.9, 1.0); + effMap->SetTitle("Intrinsic Efficiency Map;X Position;Y Position"); + + + //writing intrinsic efficiency map and mean npe map to 2d arrays and plotting bins against each other + TCanvas* c3 = new TCanvas("c3","Scatter",1000,1000); + TGraph* g = new TGraph(); + double intrEffMap[nbins][nbins]; + double meanNpeMap[nbins][nbins]; + for (int i = 1; i <= nbins; i++){ + for (int j = 1; j <= nbins; j++){ + intrEffMap[i-1][j-1] = effMap->GetBinContent(i,j); + meanNpeMap[i-1][j-1] = cleanMeanNpeDistrMult->GetBinContent(i,j); + g->SetPoint(g->GetN(), meanNpeMap[i-1][j-1], intrEffMap[i-1][j-1]); + } + } + g->SetTitle("NGCER Efficiency Study;Mean NPE;Intrinsic Efficiency(%)"); + g->SetMarkerStyle(22); + g->Draw("ap"); + */ diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/hms_method2_improvement_new.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/hms_method2_improvement_new.C new file mode 100644 index 0000000000000000000000000000000000000000..b596320205e960ee25ea9bed857929ccbfd00509 --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/hms_method2_improvement_new.C @@ -0,0 +1,193 @@ +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TH2.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" +#include <TLine.h> + +using namespace std; + +void hms_method2_improvement_new() +{ + + gStyle->SetOptFit(1111); //setting stat bar options + gStyle->SetStatFormat("6.6g"); + gStyle->SetLegendFont(42); + gStyle->SetLegendTextSize(0.01); + + const int nbinsx = 80; + const int nbinsy = 80 ; + int npmt=2; + //Declare root file + char run_num[20]; + char nevents[20]; + cout<<"Enter HMS Run number (Including leading 0):"<<endl; + cout<<"Enter HMS run number"<<endl; + cin>> run_num; + cout<<"Enter number of events"<<endl; + cin>> nevents; + TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/hms_replay_production_all_%s_%s.root",run_num,nevents); + TFile *fileIN = new TFile(filename); + + + //Declare Tree +TTree *T = (TTree*)fileIN->Get("T"); + +// Acquire the number of entries +Long64_t nentries; +nentries = T->GetEntries(); + + Double_t ngcer_mult[3], ngcer_goodAdcPulseInt[3], ngcer_npeSum[3]; + Double_t ngcer_XatCer, ngcer_YatCer,cal_etracknorm,cal_eprtracknorm,delta; + + + +T->SetBranchAddress("H.cer.goodAdcMult", &ngcer_mult); +//T->SetBranchAddress("H.cer.npeSum", &ngcer_npeSum); +T->SetBranchAddress("H.cer.npe", &ngcer_npeSum); +T->SetBranchAddress("H.gtr.dp", &delta); +T-> SetBranchAddress("H.cer.xAtCer",&ngcer_XatCer); +T-> SetBranchAddress("H.cer.yAtCer",&ngcer_YatCer); +T->SetBranchAddress("H.cal.etottracknorm", &cal_etracknorm); // shower + preshower energy (I'm not exactly sure how these are "normalized" but these are the variables Brad and Xiaochao wanted me to use) +T->SetBranchAddress("H.cal.eprtracknorm", &cal_eprtracknorm); // preshower energy + + + TH1F *etracknorm; + etracknorm=new TH1F("etracknorm","H.cal.etracknorm",100,0,2); + TH1F *etracknorm_delta; + etracknorm_delta=new TH1F("etracknorm_delta","H.cal.etracknorm{H.gtr.dp>-9 && h,gtr.dp<9}",100,0,2); + TH1F *etracknorm_e; + etracknorm_e=new TH1F("etracknorm_e","H.cal.etracknorm{H.gtr.dp>-9 && h,gtr.dp<9 && H.cer.npeSum>0.5 && H.cal.etracknorm>0.8}",100,0,2); + TH1F *etracknorm_p; + etracknorm_p=new TH1F("etracknorm_p","H.cal.etracknorm{H.gtr.dp>-9 && h,gtr.dp<9 && H.cer.npeSum<0.1 && H.cal.etracknorm<0.8}",100,0,2); + + + TH2F *ngcer_xy; + ngcer_xy=new TH2F("ngcer_xy","XY event Distribution",nbinsx,-40,40,nbinsy,-40,40); + TH2F *ngcer_xyw; + ngcer_xyw=new TH2F("ngcer_xyw","XY event Distribution with npe",nbinsx,-40,40,nbinsy,-40,40); + TH2F *ngcer_npe; + ngcer_npe=new TH2F("ngcer_npe","npe Distribution",nbinsx,-40,40,nbinsy,-40,40); + +TH2F *ngcer_xy_e; + ngcer_xy_e=new TH2F("ngcer_xy_e","XY electron event Distribution",nbinsx,-40,40,nbinsy,-40,40); + TH2F *ngcer_xyw_e; + ngcer_xyw_e=new TH2F("ngcer_xyw_e","XY electron event Distribution with npe",nbinsx,-40,40,nbinsy,-40,40); + TH2F *ngcer_npe_e; + ngcer_npe_e=new TH2F("ngcer_npe_e","electron npe Distribution",nbinsx,-40,40,nbinsy,-40,40); + +TH2F *ngcer_xy_p; + ngcer_xy_p=new TH2F("ngcer_xy_p","XY pion event Distribution",nbinsx,-40,40,nbinsy,-40,40); + TH2F *ngcer_xyw_p; + ngcer_xyw_p=new TH2F("ngcer_xyw_p","XY pion event Distribution with npe",nbinsx,-40,40,nbinsy,-40,40); + TH2F *ngcer_npe_p; + ngcer_npe_p=new TH2F("ngcer_npe_p","pion npe Distribution",nbinsx,-40,40,nbinsy,-40,40); + +TH2F *npesum_etracknorm; +npesum_etracknorm=new TH2F("npesum_etracknorm","H.cer.npeSum : H.cal.etracknorm {H.gtr.dp>-0.9 && H.gtr.dp<9}",80,0,2,nbinsy,-40,40); + + + +cout << "nentries= "<<nentries<<endl; +for(Long64_t ievent=0; ievent < nentries; ievent++){ //loop over no. of entries T->GetEntry(ievent); +T->GetEntry(ievent); + +//if(delta > -0.9 && delta < 0.9){ +// ngcer_xy->Fill(ngcer_XatCer,ngcer_YatCer); + // ngcer_xyw->Fill(ngcer_XatCer,ngcer_YatCer,ngcer_npeSum); + // npesum_etracknorm->Fill(cal_etracknorm,ngcer_npeSum); + + if(cal_etracknorm > 0.98 && cal_etracknorm < 1.35 && (cal_etracknorm-cal_eprtracknorm)>0.45 && (cal_etracknorm-cal_eprtracknorm) <1.1 && ngcer_mult[1]==1){ + ngcer_xy_e->Fill(ngcer_XatCer,ngcer_YatCer); + ngcer_xyw_e->Fill(ngcer_XatCer,ngcer_YatCer,ngcer_npeSum[1]); + } + + if(cal_etracknorm < 0.1){ + ngcer_xy_p->Fill(ngcer_XatCer,ngcer_YatCer); + ngcer_xyw_p->Fill(ngcer_XatCer,ngcer_YatCer,ngcer_npeSum[0]); + } + //} + } +//ngcer_npe=(TH2F*)ngcer_xyw->Clone(); +//ngcer_npe->Divide(ngcer_xy); + +ngcer_npe_e=(TH2F*)ngcer_xyw_e->Clone(); +ngcer_npe_e->Divide(ngcer_xy_e); + +ngcer_npe_p=(TH2F*)ngcer_xyw_p->Clone(); +ngcer_npe_p->Divide(ngcer_xy_p); + +/* + TCanvas* c1 = new TCanvas("c1", "Mean NPE Distribution", 1800, 600); + c1->Divide(3,1); + + c1->cd(1); + ngcer_xy->Draw("colz"); + ngcer_xy->GetXaxis()->SetTitle("X"); + ngcer_xy->GetYaxis()->SetTitle("Y"); + + c1->cd(2); + ngcer_xyw->Draw("colz"); + ngcer_xyw->GetXaxis()->SetTitle("X"); + ngcer_xyw->GetYaxis()->SetTitle("Y"); + + c1->cd(3); + ngcer_npe->Draw("colz"); + ngcer_xyw->GetXaxis()->SetTitle("X"); + ngcer_xyw->GetYaxis()->SetTitle("Y"); +*/ +TCanvas* c2 = new TCanvas("c2", "Mean NPE Distribution (Electrons)", 1800, 600); + +c2->Divide(3,1); + + c2->cd(1); + ngcer_xy_e->Draw("colz"); + ngcer_xy_e->GetXaxis()->SetTitle("X"); + ngcer_xy_e->GetYaxis()->SetTitle("Y"); + + c2->cd(2); + ngcer_xyw_e->Draw("colz"); + ngcer_xyw_e->GetXaxis()->SetTitle("X"); + ngcer_xyw_e->GetYaxis()->SetTitle("Y"); + + c2->cd(3); + ngcer_npe_e->Draw("colz"); + ngcer_xyw_e->GetXaxis()->SetTitle("X"); + ngcer_xyw_e->GetYaxis()->SetTitle("Y"); + + +TCanvas* c3 = new TCanvas("c3", "Mean NPE Distribution (Pions)", 1800, 600); +/* +c3->Divide(3,1); + + c3->cd(1); + ngcer_xy_p->Draw("colz"); + ngcer_xy_p->GetXaxis()->SetTitle("X"); + ngcer_xy_p->GetYaxis()->SetTitle("Y"); + + c3->cd(2); + ngcer_xyw_p->Draw("colz"); + ngcer_xyw_p->GetXaxis()->SetTitle("X"); + ngcer_xyw_p->GetYaxis()->SetTitle("Y"); + + c3->cd(3); + ngcer_npe_p->Draw("colz"); + ngcer_xyw_p->GetXaxis()->SetTitle("X"); + ngcer_xyw_p->GetYaxis()->SetTitle("Y"); + + +TCanvas* c4 = new TCanvas("c4", "Cherenkov vs. calorimeter", 600, 600); + + npesum_etracknorm->Draw("colz"); + npesum_etracknorm->GetXaxis()->SetTitle("Total E/P"); + npesum_etracknorm->GetYaxis()->SetTitle("npeSum"); +*/ +return 0; +} diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/ngcer_calib_shms.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/ngcer_calib_shms.C new file mode 100644 index 0000000000000000000000000000000000000000..2cc9dea179d38030f089af2b422d2adbe0363ca3 --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/ngcer_calib_shms.C @@ -0,0 +1,863 @@ +#include <iostream> +#include <fstream> +#include <string> +#include <TFile.h> +#include <TDirectory.h> +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TH2.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" +#include <TLine.h> + +using namespace std; + +// Draft of a program to conduct ngcer calibration for SHMS by hand using "Method 2" from Simona. +// https://logbooks.jlab.org/entry/3650663 +// https://hallcweb.jlab.org/DocDB/0010/001053/001/wisewordsoncheranalysis.pdf +// murchhanaroy@uky.edu +// July 2020 + + +void ngcer_calib_shms(){ + + gStyle->SetOptFit(1111); //setting stat bar options + gStyle->SetStatFormat("6.6g"); + + +//Declare root file +char run_num[20]; +cout<<"Enter SHMS Run number :"<<endl; +cin>> run_num; + +TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/shms_replay_production_all_%s_200000.root",run_num); +TFile *fileIN = new TFile(filename); + + +//Declare Tree +TTree *T = (TTree*)fileIN->Get("T"); + +// Acquire the number of entries +Long64_t nentries; +nentries = T->GetEntries(); + +// Acquire the branches +Int_t npmt=4; + +//define the arrays we are going to put the branches in. + Double_t ngcer_goodAdcTdcDiffTime[4],ngcer_counter[30],ngcer_mult[30],ngcer_adcPulseTime[30],ngcer_goodAdcPulseAmp[4],ngcer_goodAdcPulseInt[4]; + Double_t cal_eprtracknorm, cal_etracknorm,ngcer_XatCer,ngcer_YatCer, delta; //good == array of 4. (This is what Brad said, he can probably explain more why). + Double_t starttime; + Int_t ndata_ngcer_pulseint; + +T->SetBranchAddress("P.hod.starttime", &starttime); +T->SetBranchAddress("P.ngcer.adcPulseTime", &ngcer_adcPulseTime); + +T->SetBranchAddress("Ndata.P.ngcer.adcPulseInt", &ndata_ngcer_pulseint); //hit list +T->SetBranchAddress("P.ngcer.adcCounter", &ngcer_counter); //pmts + +T->SetBranchAddress("P.ngcer.goodAdcMult", &ngcer_mult); + +T->SetBranchAddress("P.ngcer.goodAdcTdcDiffTime",&ngcer_goodAdcTdcDiffTime); // events that pass the detector time window cuts + + T->SetBranchAddress("P.ngcer.goodAdcPulseAmp", &ngcer_goodAdcPulseAmp); + T->SetBranchAddress("P.ngcer.goodAdcPulseInt", &ngcer_goodAdcPulseInt); + + T-> SetBranchAddress("P.ngcer.xAtCer",&ngcer_XatCer); + T-> SetBranchAddress("P.ngcer.yAtCer",&ngcer_YatCer); + + ////Energy variables for the shower and preshower + T->SetBranchAddress("P.cal.etracknorm", &cal_etracknorm); // shower + preshower energy (I'm not exactly sure how these are "normalized" but these are the variables Brad and Xiaochao wanted me to use) + T->SetBranchAddress("P.cal.eprtracknorm", &cal_eprtracknorm); // preshower energy + T->SetBranchAddress("P.gtr.dp", &delta); + + + + + /* +The cuts that used on the ADC pulse integral (P.ngcer.goodAdcPulseInt) are the following: + +-- P.cal.etottracknorm>0.8 to choose electrons. + +-- P.gtr.dp > -10 && P.gtr.dp < 22. + +-- timing window cuts (P.ngcer.goodAdcTdcDiffTime) (already set in the corresponding parameter file in hallc_replay ) + +--NGCER X and Y cuts for each PMT. + +--Requiring good Adc multiplicity == 1 for the pmt undr calibration and multiplicity == 0 for the other pmts. + */ + + +//// Declare histos and fits. + + //Old code is counting from 1 so we need arrays of 5. + + TH1F *ng_goodAdcPulseAmp[5]; //no cuts, only the branch itself + TH1F *ng_goodAdcPulseInt[5]; + + + TH1F *ng_goodAdcPulseAmp_nocut[5]; //single pmt condition applied, non-physical cut applied, no other cuts + TH1F *ng_goodAdcPulseInt_nocut[5]; + + TH1F *ng_goodAdcPulseAmp_Calcut[5]; // single pmt condition applied, only Calorimeter cut applied + TH1F *ng_goodAdcPulseInt_Calcut[5]; + + TH1F *ng_goodAdcPulseAmp_gtrcut[5]; // single pmt condition applied, only gtrcut applied + TH1F *ng_goodAdcPulseInt_gtrcut[5]; + + TH1F *ng_goodAdcPulseAmp_xycut[5]; //single pmt condition applied, only xy cuts applied + TH1F *ng_goodAdcPulseInt_xycut[5]; + + TH1F *ng_goodAdcPulseAmp_allcut[5]; // single pmt condition applied, all cuts applied + TH1F *ng_goodAdcPulseInt_allcut[5]; + + + TH1F *ng_goodAdcTdcDiffTime[5]; // histo after cuts are applied + + + TH2F *shwr_totalen; // Total Energy on Y, Shower energy on X + TH2F *shwr_prshwr; ;// Shower Energy on Y, Preshower energy on X + TH2F *prshwr_totalen; // Total Energy on Y, Preshower energy on X + + + + TH2F *ng_xyCer_nocut[5]; // no shower cut and no single PMT cut + TH2F *ng_xyCer_SinglePmt[5]; // no shower cut and single PMT cut + TH2F *ng_xyCer_SinglePmt_Calcut[5]; // shower cut and "single PMT" cut + TH2F *ng_xyCerRAW[5]; // 2D histo of whatever is in the branch + //TH2F *ng_xyCer[5]; // non-physical cuts applied + + TH1F *XatCerHisto_nocut[5]; // same as above, just in 1D so we can look at applying cuts to it more carefully + TH1F *YatCerHisto_nocut[5]; + TH1F *XatCerHisto_SinglePmt[5]; + TH1F *YatCerHisto_SinglePmt[5]; + TH1F *XatCerHisto_SinglePmt_Calcut[5]; + TH1F *YatCerHisto_SinglePmt_Calcut[5]; + + TH1F *XatCerHistoRAW[5]; + TH1F *YatCerHistoRAW[5]; + + TH1F *TotalCalEnergy; + TH1F *ShowerEnergy; + TH1F *PreshowerEnergy; + + TH1F *TotalCalEnergyRAW; // before non-physical cuts + TH1F *ShowerEnergyRAW; + TH1F *PreshowerEnergyRAW; + + TF1 *gausFitAmp; + TF1 *gausFitInt; + + TF1 *gausFitAmp1, *gausFitAmp2, *gausFitAmp3, *gausFitAmp4; + TF1 *gausFitInt1, *gausFitInt2, *gausFitInt3, *gausFitInt4; + TF1 *poisFitInt1, *poisFitInt2, *poisFitInt3, *poisFitInt4; + +//Make shower vs preshower energy 2D histo + + Double_t shwr_prshwr_yaxis_max =1.5; //variable to change the histogram axis (so we don't have to change it in the drawn cut lines) + Double_t shwr_prshwr_xaxis_max =1.5; + + shwr_totalen = new TH2F(Form("total energy vs shower energy run #%s",run_num), Form("total energy vs shower energy run #%s",run_num), 300, 0, shwr_prshwr_xaxis_max, 300, 0, shwr_prshwr_yaxis_max); + shwr_prshwr= new TH2F(Form("shower energy vs preshower energy run #%s",run_num), Form("shower energy vs preshower energy run #%s",run_num), 300, 0, shwr_prshwr_xaxis_max, 300, 0, shwr_prshwr_yaxis_max); + prshwr_totalen= new TH2F(Form("total energy vs preshower energy run #%s" ,run_num), Form("total energy vs preshower energy run #%s",run_num), 300, 0, shwr_prshwr_xaxis_max, 300, 0, shwr_prshwr_yaxis_max); + + TotalCalEnergy=new TH1F(Form("total energy etracknorm run #%s",run_num),Form("total energy etracknorm run #%s",run_num),40,0,0.2); + ShowerEnergy=new TH1F(Form("Shower Energy (etracknorm - eprtracknorm) run #%s",run_num),Form("Shower Energy (etracknorm - eprtracknorm) run #%s",run_num),40,0,0.2); + PreshowerEnergy=new TH1F(Form("Preshower Energy eprtracknorm run #%s",run_num),Form("Preshower Energy eprtracknorm run #%s",run_num),40,0,0.2); + + TotalCalEnergyRAW=new TH1F(Form("total energy RAW etracknorm run #%s",run_num),Form("total energy RAW etracknorm run #%s",run_num),200,0,2); + ShowerEnergyRAW=new TH1F(Form("Shower Energy RAW (etracknorm - eprtracknorm) run #%s",run_num),Form("Shower Energy RAW (etracknorm - eprtracknorm) run #%s",run_num),200,0,2); + PreshowerEnergyRAW=new TH1F(Form("Preshower Energy RAW eprtracknorm run #%s",run_num),Form("Preshower Energy RAW eprtracknorm run #%s",run_num),200,0,2); + + // ng_xyCerRAW=new TH2F(Form("XatCer vs YatCer RAW run #%s",run_num), Form("XatCer vs YatCer RAW run # %s",run_num),400, -40, 40, 400, -40, 40); + //ng_xyCer =new TH2F(Form("XatCer vs YatCer for all, run #%s",run_num), Form("XatCer vs YatCer for all, run #%s",run_num),400,-40,40,400,-40,40); + + + // initializing histos that are for each PMT + for(Int_t i=1; i<npmt+1; i++){ + TString namePulseAmp=Form("hNcerPulseAmp%d",i); + TString titlePulseAmp=Form("PMT%d: SHMS NGCER goodAdcPulseAmp, Run %s",i,run_num); + TString namePulseInt=Form("hNcerPulseInt%d",i); + TString titlePulseInt=Form("PMT%d: SHMS NGCER goodAdcPulseInt, Run %s",i,run_num); + + TString namePulseAmp_nocut=Form("hNcerPulseAmp%d nocut",i); + TString titlePulseAmp_nocut=Form("PMT%d: SHMS NGCER goodAdcPulseAmp, Run %s",i,run_num); + TString namePulseInt_nocut=Form("hNcerPulseInt%d nocut",i); + TString titlePulseInt_nocut=Form("PMT%d: SHMS NGCER goodAdcPulseInt nocut, Run %s",i,run_num); + + TString namePulseAmp_Calcut=Form("hNcerPulseAmp%d Calcut",i); + TString titlePulseAmp_Calcut=Form("PMT%d: SHMS NGCER goodAdcPulseAmp Cal cut, Run %s",i,run_num); + TString namePulseInt_Calcut=Form("hNcerPulseInt%d Calcut",i); + TString titlePulseInt_Calcut=Form("PMT%d: SHMS NGCER goodAdcPulseInt Cal cut, Run %s",i,run_num); + + TString namePulseAmp_gtrcut=Form("hNcerPulseAmp%d gtrcut",i); + TString titlePulseAmp_gtrcut=Form("PMT%d: SHMS NGCER goodAdcPulseAmp gtr cut, Run %s",i,run_num); + TString namePulseInt_gtrcut=Form("hNcerPulseInt%d gtrcut",i); + TString titlePulseInt_gtrcut=Form("PMT%d: SHMS NGCER goodAdcPulseInt gtr cut, Run %s",i,run_num); + + TString namePulseAmp_xycut=Form("hNcerPulseAmp%d xycut",i); + TString titlePulseAmp_xycut=Form("PMT%d: SHMS NGCER goodAdcPulseAmp xy cut Run %s",i,run_num); + TString namePulseInt_xycut=Form("hNcerPulseInt%d xycut",i); + TString titlePulseInt_xycut=Form("PMT%d: SHMS NGCER goodAdcPulseInt xy cut Run %s",i,run_num); + + TString namePulseAmp_allcut=Form("hNcerPulseAmp%d allcut",i); + TString titlePulseAmp_allcut=Form("PMT%d: SHMS NGCER goodAdcPulseAmp Cal cut,gtr cut, xy cut Run %s",i,run_num); + TString namePulseInt_allcut=Form("hNcerPulseInt%d allcut",i); + TString titlePulseInt_allcut=Form("PMT%d: SHMS NGCER goodAdcPulseInt Cal cut, gtr cut, xy cut Run %s",i,run_num); + + TString namePulseAmpRAW=Form("hNcerPulseAmp%d RAW",i); + TString titlePulseAmpRAW=Form("PMT%d: SHMS NGCER goodAdcPulseAmp RAW, Run %s",i,run_num); + TString namePulseIntRAW=Form("hNcerPulseInt%d RAW",i); + TString titlePulseIntRAW=Form("PMT%d: SHMS NGCER goodAdcPulseInt RAW, Run %s",i,run_num); + + ng_goodAdcPulseAmp[i]= new TH1F(namePulseAmp, titlePulseAmp,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt[i]= new TH1F(namePulseInt, titlePulseInt, 140, 0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_nocut[i]= new TH1F(namePulseAmp_nocut, titlePulseAmp_nocut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_nocut[i]= new TH1F(namePulseInt_nocut, titlePulseInt_nocut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_Calcut[i]= new TH1F(namePulseAmp_Calcut, titlePulseAmp_Calcut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_Calcut[i]= new TH1F(namePulseInt_Calcut, titlePulseInt_Calcut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_gtrcut[i]= new TH1F(namePulseAmp_gtrcut, titlePulseAmp_gtrcut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_gtrcut[i]= new TH1F(namePulseInt_gtrcut, titlePulseInt_gtrcut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_xycut[i]= new TH1F(namePulseAmp_xycut, titlePulseAmp_xycut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_xycut[i]= new TH1F(namePulseInt_xycut, titlePulseAmp_xycut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcPulseAmp_allcut[i]= new TH1F(namePulseAmp_allcut, titlePulseAmp_allcut,400,0,400); // (600 for 9740) (100 for 9753) + ng_goodAdcPulseInt_allcut[i]= new TH1F(namePulseInt_allcut, titlePulseInt_allcut, 140,0,140);// (200 for 9740) (50 for 9753) + + ng_goodAdcTdcDiffTime[i]=new TH1F(Form("goodAdcTdcDiffTime PMT%d run %s",i,run_num),Form("goodAdcTdcDiffTime PMT%d run %s",i,run_num),150,-50,100); + + + // ng_xyCerRaw[i]=new TH2F(Form("XatCer vs YatCer Raw PMT%d %s",i,run_num), Form("XatCer vs YatCer Raw PMT%d %s",i,run_num),400, -40, 40, 400, -40, 40); + ng_xyCer_nocut[i]=new TH2F(Form("XatCer vs YatCer PMT%d nocut %s",i,run_num), Form("XatCer vs YatCer PMT%d non-physical cuts applied, no other cuts %s",i,run_num),400, -40, 40, 400, -40, 40); + ng_xyCer_SinglePmt[i]=new TH2F(Form("XatCer vs YatCer PMT%d SinglePmt %s",i,run_num), Form("XatCer vs YatCer PMT%d SinglePmt %s",i,run_num),400, -40, 40, 400, -40, 40); + ng_xyCer_SinglePmt_Calcut[i]=new TH2F(Form("XatCer vs YatCer PMT%d SinglePmt Cal cut %s",i,run_num), Form("YatCer vs XatCer PMT%d SinglePmt Calcut %s",i,run_num),400, -40, 40, 400, -40, 40); + + XatCerHisto_nocut[i] =new TH1F(Form("XatCerHisto_nocut PMT%d %s",i,run_num), Form("XatCerHisto PMT%d nocut %s",i,run_num),400,-40,40); + YatCerHisto_nocut[i] =new TH1F(Form("YatCerHisto_nocut PMT%d %s",i,run_num), Form("YatCerHisto PMT%d nocut %s",i,run_num),400,-40,40); + + XatCerHisto_SinglePmt[i] =new TH1F(Form("XatCerHisto_SinglePmt PMT%d Single%s",i,run_num), Form("XatCerHisto PMT%d SinglePmt %s",i,run_num),400,-40,40); + YatCerHisto_SinglePmt[i] =new TH1F(Form("YatCerHisto_SinglePmt PMT%d %s",i,run_num), Form("YatCerHisto PMT%d SinglePmt %s",i,run_num),400,-40,40); + + XatCerHisto_SinglePmt_Calcut[i] =new TH1F(Form("XatCerHisto_SinglePmt_Calcut PMT%d %s",i,run_num), Form("XatCerHisto SinglePmt Cal cut PMT%d %s",i,run_num),400,-40,40); + YatCerHisto_SinglePmt_Calcut[i] =new TH1F(Form("YatCerHisto_SinglePmt_Calcut PMT%d %s",i,run_num), Form("YatCerHisto SinglePmt Cal cut PMT%d %s",i,run_num),400,-40,40); + + XatCerHistoRAW[i] =new TH1F(Form("XatCerHisto PMT%d RAW %s",i,run_num), Form("XatCerHisto PMT%d RAW %s",i,run_num),400,-40,40); + YatCerHistoRAW[i] =new TH1F(Form("YatCerHisto PMT%d RAW %s",i,run_num), Form("YatCerHisto PMT%d RAW %s",i,run_num),400,-40,40); +} + + //Assign shower cuts (should be based on results from the shower vs preshower 2D histo) + Double_t cal_y_cut_lower, cal_y_cut_upper, cal_x_cut_lower, cal_x_cut_upper; + // y-axis + cal_y_cut_lower= 0.8; //set to 0 if you don't want to cut the ngcer data. (0.95-1.15 for run 9740) (0-0.3 for 9573) (0.1-0.6 for 10337) + cal_y_cut_upper=1.4; //set to a big number (ex. 2) if you don't want a cut + // x- axis + cal_x_cut_lower=0.25; //set to 0 if you don't want to cut the ngcer data. (0.45-0.75 for run 9740) (0-0.07 for 9573) (0.025-0.06 for 10337) + cal_x_cut_upper=1.1; //set to a big number (ex. 2) if you don't want a cut + + // XatCer, YatCer cuts + Double_t XatCerCutLower[5]={-1000,0,0,-17,-13}; //Old code is counting from 1 + Double_t XatCerCutUpper[5]={-1000,5.5,3.8,-0.2,-1.0}; + Double_t YatCerCutLower[5]={-1000,0,-13.7,1.5,-16};// {FLAG, PMT1, PMT2, PMT3, PMT4} + Double_t YatCerCutUpper[5]={-1000,12,-2.2,16,0}; + + +//declare fits for 1D histos. Change as desired. + Int_t FitAmpMinArray[5]={-1000,120,100,120,100}; // {flag, PMT1, PMT2, PMT3, PMT4} Where to start the Amp fits for each PMT + Int_t FitAmpMaxArray[5]={-1000, 280,280,280,280}; // {flag, PMT1, PMT2, PMT3, PMT4} Where to end the Amp fits + + Int_t FitIntMinArray[5]={-1000,30,20,32,25}; //{flag, PMT1, PMT2, PMT3, PMT4} Where to start the Int fits + Int_t FitIntMaxArray[5]={-1000,70,60,95,85};//{flag, PMT1, PMT2, PMT3, PMT4} Where to end the Int fits + + gausFitAmp1 = new TF1("gausFitAmp1", "gaus",FitAmpMinArray[1],FitAmpMaxArray[1]); // PMT 1 + gausFitInt1 = new TF1("gausFitInt1", "gaus",FitIntMinArray[1],FitIntMaxArray[1]); + + gausFitAmp2 = new TF1("gausFitAmp2", "gaus",FitAmpMinArray[2],FitAmpMaxArray[2]);// PMT 2 + gausFitInt2 = new TF1("gausFitInt2", "gaus",FitIntMinArray[2],FitIntMaxArray[2]); + + gausFitAmp3 = new TF1("gausFitAmp3", "gaus",FitAmpMinArray[3],FitAmpMaxArray[3]);// PMT 3 + gausFitInt3 = new TF1("gausFitInt3", "gaus",FitIntMinArray[3],FitIntMaxArray[3]); + + gausFitAmp4 = new TF1("gausFitAmp4", "gaus",FitAmpMinArray[4],FitAmpMaxArray[4]);// PMT 4 + gausFitInt4 = new TF1("gausFitInt4", "gaus",FitIntMinArray[4],FitIntMaxArray[4]); + +poisFitInt1 = new TF1("poisFitInt1", "[0]*TMath::Power(([1]/[2]),(x/[2]))*(TMath::Exp(-([1]/[2])))/TMath::Gamma((x/[2])+1)",FitIntMinArray[1],FitIntMaxArray[1]); + poisFitInt1->SetParameters(1000,44,7.9); + poisFitInt2 = new TF1("poisFitInt2", "[0]*TMath::Power(([1]/[2]),(x/[2]))*(TMath::Exp(-([1]/[2])))/TMath::Gamma((x/[2])+1)",FitIntMinArray[2],FitIntMaxArray[2]); + poisFitInt2->SetParameters(1000,44,7.9); + +poisFitInt3 = new TF1("poisFitInt3", "[0]*TMath::Power(([1]/[2]),(x/[2]))*(TMath::Exp(-([1]/[2])))/TMath::Gamma((x/[2])+1)",FitIntMinArray[3],FitIntMaxArray[3]); + poisFitInt3->SetParameters(1000,44,7.9); + poisFitInt4 = new TF1("poisFitInt4", "[0]*TMath::Power(([1]/[2]),(x/[2]))*(TMath::Exp(-([1]/[2])))/TMath::Gamma((x/[2])+1)",FitIntMinArray[4],FitIntMaxArray[4]); + poisFitInt4->SetParameters(1000,44,7.9); + + /********************************************************************************************************************/ + // Begining of analysis on all the events and applying cuts + +// Loop of entries in tree + cout << "nentries= "<<nentries<<endl; + for(Long64_t ievent=0; ievent < nentries; ievent++){ //can be lowered for testing + + if (ievent % 10000 == 0){//printing progress updates to the terminal + cout<< "ievent= "<<ievent <<endl; + } + + T->GetEntry(ievent); + + //Filling up the RAW histos. Counting from 1. + for (int i=1; i<npmt+1;i++){ + XatCerHistoRAW[i] -> Fill(ngcer_XatCer); + YatCerHistoRAW[i] -> Fill(ngcer_YatCer); + ng_goodAdcPulseAmp[i]->Fill(ngcer_goodAdcPulseAmp[i-1]); + ng_goodAdcPulseInt[i]->Fill(ngcer_goodAdcPulseInt[i-1]); + ng_goodAdcTdcDiffTime[i]->Fill(ngcer_goodAdcTdcDiffTime[i-1]); + } + //ng_xyCerRaw->Fill(ngcer_YatCer, ngcer_XatCer); + TotalCalEnergyRAW ->Fill(cal_etracknorm); + ShowerEnergyRAW -> Fill(cal_etracknorm-cal_eprtracknorm); + PreshowerEnergyRAW ->Fill(cal_eprtracknorm); + + + ////Fill 2D histo for shower vs preshower energy. + //// cut out any non-physical singnals. There is a line at x=y in the calorimeter that isn't physical. + if(cal_eprtracknorm>0 && cal_etracknorm>0 && cal_eprtracknorm < cal_etracknorm && ngcer_YatCer != 0 && ngcer_XatCer != 0){ + shwr_totalen -> Fill( cal_etracknorm-cal_eprtracknorm, cal_etracknorm); //Fill(x,y). Total Energy on Y, Shower energy on X + shwr_prshwr -> Fill (cal_etracknorm-cal_eprtracknorm, cal_eprtracknorm);// Shower Energy on X, Preshower energy on Y + prshwr_totalen -> Fill (cal_eprtracknorm , cal_etracknorm);// Total Energy on Y, Preshower energy on X + TotalCalEnergy ->Fill(cal_etracknorm); + ShowerEnergy -> Fill(cal_etracknorm-cal_eprtracknorm); + PreshowerEnergy ->Fill(cal_eprtracknorm); + //ng_xyCer -> Fill(ngcer_YatCer,ngcer_XatCer); //Fill(xaxis,yaxis) + + + + Bool_t singleFlagAmp=kTRUE; // flags to help identify if there was singnal in only one PMT at a time + Bool_t singleFlagInt=kFALSE; + + // now we ARE CHECKING if only one PMT had a singnal + for (Int_t counterNew=1; counterNew< npmt+1; counterNew++){ // counting from 1 + //apply mutiplicity cuts + if(ngcer_mult[counterNew-1]==1){ + ng_xyCer_nocut[counterNew] -> Fill(ngcer_YatCer,ngcer_XatCer); + if(ngcer_goodAdcPulseAmp[counterNew-1]>0) + { + singleFlagAmp=kTRUE; // this assignement is redundent + for (Int_t counter2=1; counter2 <npmt+1;counter2++){ + if (counterNew != counter2 && ngcer_goodAdcPulseAmp[counter2-1] >0){// loop over the other PMT's (that are not itself) and see if there was a signal + singleFlagAmp = kFALSE; // there was a signal in one of the other PMTs, so event was not in one single pmt + } + } + if (singleFlagAmp) + {// if event was in one single pmt + XatCerHisto_SinglePmt[counterNew] -> Fill(ngcer_XatCer); + YatCerHisto_SinglePmt[counterNew] -> Fill(ngcer_YatCer); + ng_xyCer_SinglePmt[counterNew] -> Fill(ngcer_YatCer,ngcer_XatCer); + + ng_goodAdcPulseAmp_nocut[counterNew]->Fill(ngcer_goodAdcPulseAmp[counterNew-1]); //Fill histo with the goodAdcPulseAmp branch without any cuts + + + + // apply shower/calorimeter cut + + //if(cal_etracknorm > 0.8){ + if(cal_etracknorm > cal_y_cut_lower && cal_etracknorm < cal_y_cut_upper && cal_eprtracknorm > cal_x_cut_lower && cal_eprtracknorm < cal_x_cut_upper){ + XatCerHisto_SinglePmt_Calcut[counterNew] -> Fill(ngcer_XatCer);// fill xy histos + YatCerHisto_SinglePmt_Calcut[counterNew] -> Fill(ngcer_YatCer); + ng_xyCer_SinglePmt_Calcut[counterNew] -> Fill(ngcer_YatCer,ngcer_XatCer); + + ng_goodAdcPulseAmp_Calcut[counterNew]-> Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + }// end shower cut + //applying X Y cuts + if(ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew]){ + ng_goodAdcPulseAmp_xycut[counterNew]-> Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + }//end of XY cuts + //applying gtr/delta cuts + if(delta > -10.0 && delta < 22.0){ + ng_goodAdcPulseAmp_gtrcut[counterNew]-> Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + }//end of gtr cuts + //applying all cuts + //if(cal_etracknorm > 0.8 && ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew] && delta > -10.0 && delta < 22.0) + if(cal_etracknorm > cal_y_cut_lower && cal_etracknorm < cal_y_cut_upper && cal_eprtracknorm > cal_x_cut_lower && cal_eprtracknorm < cal_x_cut_upper && ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew] && delta > -10.0 && delta < 22.0) + { + ng_goodAdcPulseAmp_allcut[counterNew]-> Fill(ngcer_goodAdcPulseAmp[counterNew-1]); + }//end of all cuts + + }// end singleFlagAmp check + }// end looking at AdcPulseAmp + + + //looking at AdcPulseInt + if(ngcer_goodAdcPulseInt[counterNew-1]>0){ + singleFlagInt=kTRUE;// redundent statment + for (Int_t counter3=1; counter3 <npmt+1;counter3++){ + if (counterNew != counter3 && ngcer_goodAdcPulseInt[counter3-1] >0){// loop over the other PMTs to see if any had a signal + singleFlagInt = kFALSE; // event was not in 1 single pmt + } + } + if (singleFlagInt){// if event was in 1 single pmt + ng_goodAdcPulseInt_nocut[counterNew]->Fill(ngcer_goodAdcPulseInt[counterNew-1]); //Fill histo with the goodAdcPulseInt branch without shower cuts + + //shower cut if + //if(cal_etracknorm > 0.8){ + if(cal_etracknorm > cal_y_cut_lower && cal_etracknorm < cal_y_cut_upper && cal_eprtracknorm > cal_x_cut_lower && cal_eprtracknorm < cal_x_cut_upper){ + ng_goodAdcPulseInt_Calcut[counterNew]-> Fill(ngcer_goodAdcPulseInt[counterNew-1]); + }// end of shower calorimeter cuts + //applying X Y cuts + if(ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew]){ + ng_goodAdcPulseInt_xycut[counterNew]-> Fill(ngcer_goodAdcPulseInt[counterNew-1]); + // ng_goodAdcTdcDiffTime[counterNew]->Fill(ngcer_goodAdcTdcDiffTime[counterNew-1]); + }// end of XY cut + + //applying gtr/delta cuts + if(delta > -10.0 && delta < 22.0){ + ng_goodAdcPulseInt_gtrcut[counterNew]-> Fill(ngcer_goodAdcPulseInt[counterNew-1]); + }//end of gtr cuts + //applying all cuts + //if(cal_etracknorm > 0.8 && ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew] && delta > -10.0 && delta < 22.0) + if(cal_etracknorm > cal_y_cut_lower && cal_etracknorm < cal_y_cut_upper && cal_eprtracknorm > cal_x_cut_lower && cal_eprtracknorm < cal_x_cut_upper && ngcer_XatCer >XatCerCutLower[counterNew] && ngcer_XatCer <XatCerCutUpper[counterNew] && ngcer_YatCer > YatCerCutLower[counterNew] && ngcer_YatCer <YatCerCutUpper[counterNew] && delta > -10.0 && delta < 22.0) + { + ng_goodAdcPulseInt_allcut[counterNew]-> Fill(ngcer_goodAdcPulseInt[counterNew-1]); + }//end of all cuts + + } //end of single PMT check + }// end of AdcPulseInt analysis + + }//end of multiplicity==1 cut for the pmt under calibration + } // end of single PMT analysis + }//end of non-physical check + }//end of event loop + + // Ending of analysis of events and applying all the cuts + /***************************************************************************************************************************/ + + + //Graph the results! + + // graph the AdcPulseAmp histos +TCanvas *c1=new TCanvas("c1","c1",1000,700); + c1->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c1->cd(counter); + gPad->SetLogy(); + // ng_goodAdcPulseAmp[counter] -> Fit("gausFitAmp","R"); // comment out if you don't want to fit the ngcer + + ng_goodAdcPulseAmp[counter]->SetLineColor(1);//black + ng_goodAdcPulseAmp[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp[counter]->Draw(); + + ng_goodAdcPulseAmp_nocut[counter]->SetLineColor(3);//green + ng_goodAdcPulseAmp_nocut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_nocut[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_Calcut[counter]->SetLineColor(4);//blue + ng_goodAdcPulseAmp_Calcut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_Calcut[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_gtrcut[counter]->SetLineColor(5);//yellow + ng_goodAdcPulseAmp_gtrcut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_gtrcut[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_xycut[counter]->SetLineColor(6);//magenta + ng_goodAdcPulseAmp_xycut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_xycut[counter]->Draw("SAME"); + + ng_goodAdcPulseAmp_allcut[counter]->SetLineColor(2);//red + ng_goodAdcPulseAmp_allcut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_allcut[counter]->Draw("SAME"); + + TLegend *legend1 = new TLegend(0.1,0.6,0.5,0.9); + + legend1->AddEntry(ng_goodAdcPulseAmp[counter],"ng_goodAdcPulseAmp(raw branch)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_nocut[counter],"ng_goodAdcPulseAmp (mul=1, non-physical cut)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_Calcut[counter],"ng_goodAdcPulseAmp (mul=1, non-physical cut, cal cut)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_gtrcut[counter],"ng_goodAdcPulseAmp (mul=1, non-physical cut, gtr cut)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_xycut[counter],"ng_goodAdcPulseAmp (mul=1, non-physical cut, xy cut)","l"); + legend1->AddEntry(ng_goodAdcPulseAmp_allcut[counter],"ng_goodAdcPulseAmp (mul=1, all cuts)","l"); + legend1->Draw(); + } + c1->Update(); + + + // Graph the AdcPulseInt histos +TCanvas *c2=new TCanvas("c2","c2",1000,700); + c2->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c2->cd(counter); + gPad->SetLogy(); + //ng_goodAdcPulseInt[counter] -> Fit("gausFitInt","R"); // comment out if you don't want to fit the ngcer + + ng_goodAdcPulseInt[counter]->SetLineColor(1);//black + ng_goodAdcPulseInt[counter]->SetLineWidth(2); + ng_goodAdcPulseInt[counter]->Draw(); + + ng_goodAdcPulseInt_nocut[counter]->SetLineColor(3);//green + ng_goodAdcPulseInt_nocut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_nocut[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_Calcut[counter]->SetLineColor(4);//blue + ng_goodAdcPulseInt_Calcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_Calcut[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_gtrcut[counter]->SetLineColor(5);//yellow + ng_goodAdcPulseInt_gtrcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_gtrcut[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_xycut[counter]->SetLineColor(6);//magenta + ng_goodAdcPulseInt_xycut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_xycut[counter]->Draw("SAME"); + + ng_goodAdcPulseInt_allcut[counter]->SetLineColor(2);//red + ng_goodAdcPulseInt_allcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_allcut[counter]->Draw("SAME"); + + + TLegend *legend2 = new TLegend(0.1,0.6,0.5,0.9); + + legend2->AddEntry(ng_goodAdcPulseInt[counter],"ng_goodAdcPulseInt(raw branch)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_nocut[counter],"ng_goodAdcPulseInt (mul=1, non-physical cut)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_Calcut[counter],"ng_goodAdcPulseInt (mul=1, non-physical cut, cal cut)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_gtrcut[counter],"ng_goodAdcPulseInt (mul=1, non-physical cut, gtr cut)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_xycut[counter],"ng_goodAdcPulseInt (mul=1, non-physical cut, xy cut)","l"); + legend2->AddEntry(ng_goodAdcPulseInt_allcut[counter],"ng_goodAdcPulseInt (mul=1, all cuts)","l"); + legend2->Draw(); + } + c2->Update(); + + + + // Create lines to show the shower calorimeter cuts. TLine(x1, y1, x2, y2) + TLine *cal_y_lower_line=new TLine(0,cal_y_cut_lower,shwr_prshwr_xaxis_max,cal_y_cut_lower); // y axis + TLine *cal_y_upper_line=new TLine(0,cal_y_cut_upper,shwr_prshwr_xaxis_max,cal_y_cut_upper); + TLine *cal_x_lower_line=new TLine(cal_x_cut_lower,0,cal_x_cut_lower,shwr_prshwr_yaxis_max); // x axis + TLine *cal_x_upper_line=new TLine(cal_x_cut_upper,0,cal_x_cut_upper,shwr_prshwr_yaxis_max); + cal_y_lower_line->SetLineStyle(9); + cal_y_lower_line->SetLineColor(kRed); + cal_y_lower_line->SetLineWidth(2); + cal_y_upper_line->SetLineStyle(9); + cal_y_upper_line->SetLineColor(kRed); + cal_y_upper_line->SetLineWidth(2); + cal_x_lower_line->SetLineStyle(9); + cal_x_lower_line->SetLineColor(kRed); + cal_x_lower_line->SetLineWidth(2); + cal_x_upper_line->SetLineStyle(9); + cal_x_upper_line->SetLineColor(kRed); + cal_x_upper_line->SetLineWidth(2); + + // make lines for the XY cuts + TLine *XatCerLowerLines[5]; // old code is counting from 1 + TLine *YatCerLowerLines[5]; + TLine *XatCerUpperLines[5]; + TLine *YatCerUpperLines[5]; + //// TLine(x1,y1,x2,y2) + for (int i=1;i<5;i++){//counting from 1 + XatCerLowerLines[i]= new TLine(-40,XatCerCutLower[i],40,XatCerCutLower[i]); + XatCerLowerLines[i]->SetLineStyle(9); + XatCerLowerLines[i]->SetLineColor(kRed); + XatCerLowerLines[i]->SetLineWidth(1); + + XatCerUpperLines[i]= new TLine(-40,XatCerCutUpper[i],40,XatCerCutUpper[i]); + XatCerUpperLines[i]->SetLineStyle(9); + XatCerUpperLines[i]->SetLineColor(kRed); + XatCerUpperLines[i]->SetLineWidth(1); + + YatCerLowerLines[i]= new TLine(YatCerCutLower[i],-40,YatCerCutLower[i],40); + YatCerLowerLines[i]->SetLineStyle(9); + YatCerLowerLines[i]->SetLineColor(kRed); + YatCerLowerLines[i]->SetLineWidth(1); + + YatCerUpperLines[i]= new TLine(YatCerCutUpper[i],-40,YatCerCutUpper[i],40); + YatCerUpperLines[i]->SetLineStyle(9); + YatCerUpperLines[i]->SetLineColor(kRed); + YatCerUpperLines[i]->SetLineWidth(1); + } + + + // graph the total energy on Y, shower energy on X + TCanvas *c3=new TCanvas("c3","c3",1000,700); + shwr_totalen -> Draw("colz"); + shwr_totalen->GetXaxis()->SetTitle("Shower energy"); + shwr_totalen->GetYaxis()->SetTitle("Total energy"); + cal_y_lower_line -> Draw(); + cal_y_upper_line -> Draw(); + cal_x_lower_line -> Draw(); + cal_x_upper_line -> Draw(); + c3->Update(); + + + +// graph the XY histos for each PMT without the shower cuts and without single pmt cuts, only non-physical cuts + TCanvas *c12=new TCanvas("c12","c12",1000,700); + c12-> Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c12->cd(counter); + ng_xyCer_nocut[counter]->Draw("colz"); + XatCerLowerLines[counter] -> Draw(); + XatCerUpperLines[counter] -> Draw(); + YatCerLowerLines[counter] -> Draw(); + YatCerUpperLines[counter] -> Draw(); + ng_xyCer_nocut[counter]->GetXaxis()->SetTitle("YatCer"); + ng_xyCer_nocut[counter]->GetYaxis()->SetTitle("XatCer"); + } + c12-> Update(); + + +// graph the xy plots without the shower cut and with single pmt cut + TCanvas *c17=new TCanvas("c17","c17",1000,700); + c17-> Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c17->cd(counter); + ng_xyCer_SinglePmt[counter]->Draw("colz"); + XatCerLowerLines[counter] -> Draw(); + XatCerUpperLines[counter] -> Draw(); + YatCerLowerLines[counter] -> Draw(); + YatCerUpperLines[counter] -> Draw(); + ng_xyCer_SinglePmt[counter]->GetXaxis()->SetTitle("YatCer"); + ng_xyCer_SinglePmt[counter]->GetYaxis()->SetTitle("XatCer"); + } + c17-> Update(); + + + // graoh the xy plots. with shower cut, with single pmt cut +TCanvas *c18=new TCanvas("c18","c18",1000,700); + c18-> Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c18->cd(counter); + ng_xyCer_SinglePmt_Calcut[counter]->Draw("colz"); + XatCerLowerLines[counter] -> Draw(); + XatCerUpperLines[counter] -> Draw(); + YatCerLowerLines[counter] -> Draw(); + YatCerUpperLines[counter] -> Draw(); + ng_xyCer_SinglePmt_Calcut[counter]->GetXaxis()->SetTitle("YatCer"); + ng_xyCer_SinglePmt_Calcut[counter]->GetYaxis()->SetTitle("XatCer"); + } + c18-> Update(); + + + + // graphing the 1D X histos +TCanvas *c5=new TCanvas("c5","c5",1000,700); + c5->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c5->cd(counter); + gPad->SetLogy(); + + XatCerHistoRAW[counter]->SetLineWidth(2); + XatCerHistoRAW[counter]->SetLineColor(1); + XatCerHistoRAW[counter]->Draw(); + + XatCerHisto_SinglePmt[counter]->SetLineWidth(2); + XatCerHisto_SinglePmt[counter]->SetLineColor(4); + XatCerHisto_SinglePmt[counter]->Draw("SAME"); + + XatCerHisto_SinglePmt_Calcut[counter]->SetLineWidth(2); + XatCerHisto_SinglePmt_Calcut[counter]->SetLineColor(2); + XatCerHisto_SinglePmt_Calcut[counter]->Draw("SAME"); + + + TLegend *legend3 = new TLegend(0.1,0.75,0.4,0.9); + + legend3->AddEntry(XatCerHistoRAW[counter],"XatCer(raw branch)","l"); + legend3->AddEntry(XatCerHisto_SinglePmt[counter],"XatCer (ngcer_mult=1, non-physical cut, single pmt)","l"); + legend3->AddEntry(XatCerHisto_SinglePmt_Calcut[counter],"XatCer (ngcer_mult=1, non-physical cut,single pmt, cal cut)","l"); + legend3->Draw(); + } + c5->Update(); + + + // Graphing the 1D Y histos +TCanvas *c6=new TCanvas("c6","c6",1000,700); + c6->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c6->cd(counter); + gPad->SetLogy(); + + YatCerHistoRAW[counter]->SetLineWidth(2); + YatCerHistoRAW[counter]->SetLineColor(1); + YatCerHistoRAW[counter]->Draw(); + + YatCerHisto_SinglePmt[counter]->SetLineWidth(2); + YatCerHisto_SinglePmt[counter]->SetLineColor(4); + YatCerHisto_SinglePmt[counter]->Draw("SAME"); + + YatCerHisto_SinglePmt_Calcut[counter]->SetLineWidth(2); + YatCerHisto_SinglePmt_Calcut[counter]->SetLineColor(2); + YatCerHisto_SinglePmt_Calcut[counter]->Draw("SAME"); + TLegend *legend4 = new TLegend(0.1,0.75,0.4,0.9); + + legend4->AddEntry(YatCerHistoRAW[counter],"YatCer(raw branch)","l"); + legend4->AddEntry(YatCerHisto_SinglePmt[counter],"YatCer (ngcer_mult=1, non-physical cut, single pmt)","l"); + legend4->AddEntry(YatCerHisto_SinglePmt_Calcut[counter],"YatCer (ngcer_mult=1, non-physical cut,single pmt, cal cut)","l"); + legend4->Draw(); + + } + c6->Update(); + + /* +// graph shower vs preshower energy +TCanvas *c7=new TCanvas("c7","c7",1000,700); + shwr_prshwr -> Draw("colz"); + c7-> Update(); + */ + + TCanvas *c8=new TCanvas("c8","c8",1000,700); + gPad->SetLogy(); + + TLegend *EnergyLegend = new TLegend(0.7,0.2,0.9,0.6); + + TotalCalEnergy -> SetLineColor(kGreen); + TotalCalEnergy -> SetLineWidth(2); + EnergyLegend ->AddEntry(TotalCalEnergy,"Total Cal Energy (non-physical cut)","l"); + TotalCalEnergy -> Draw(); + + ShowerEnergy -> SetLineColor(kBlue); + EnergyLegend -> AddEntry(ShowerEnergy, "Total Shower Energy (non-physical cut)", "l"); + ShowerEnergy -> Draw("SAME"); + + PreshowerEnergy -> SetLineColor(kRed); + PreshowerEnergy -> SetLineWidth(2); + EnergyLegend -> AddEntry(PreshowerEnergy, "Total PreShower Energy (non-physical cut)", "l"); + PreshowerEnergy -> Draw("SAME"); + + EnergyLegend-> Draw("SAME"); + c8->Update(); + + TCanvas *c13=new TCanvas("c13","c13",1000,700); + gPad->SetLogy(); + + TLegend *EnergyLegendRAW = new TLegend(0.7,0.2,0.9,0.6); + + TotalCalEnergyRAW -> SetLineColor(kGreen); + TotalCalEnergyRAW-> SetLineWidth(2); + EnergyLegendRAW->AddEntry(TotalCalEnergy,"Total Cal Energy (RAW)","l"); + TotalCalEnergyRAW-> Draw(); + + ShowerEnergyRAW -> SetLineColor(kBlue); + EnergyLegendRAW -> AddEntry(ShowerEnergy, "Total Shower Energy (RAW)", "l"); + ShowerEnergyRAW -> Draw("SAME"); + + PreshowerEnergyRAW -> SetLineColor(kRed); + PreshowerEnergyRAW -> SetLineWidth(2); + EnergyLegendRAW -> AddEntry(PreshowerEnergy, "Total PreShower Energy (RAW)", "l"); + PreshowerEnergyRAW -> Draw("SAME"); + + EnergyLegendRAW-> Draw("SAME"); + c13->Update(); + + + + + /* +// graph total energy vs preshower energy in the calorimeter +TCanvas *c14=new TCanvas("c14","c14",1000,700); + shwr_prshwr3 -> Draw("colz"); + c14-> Update(); + */ + + // graph the results on AdcPulseAmp from all the cuts and fit gaussian + TCanvas *c15=new TCanvas("c15","c15",1000,700); + c15->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c15->cd(counter); + gPad->SetLogy(); + ng_goodAdcPulseAmp_allcut[counter] -> Fit(Form("gausFitAmp%d",counter),"R"); // comment out if you don't want to fit the ngcer + ng_goodAdcPulseAmp_allcut[counter]->SetLineColor(4); + ng_goodAdcPulseAmp_allcut[counter]->SetLineWidth(2); + ng_goodAdcPulseAmp_allcut[counter]->Draw("SAME"); + } + c15->Update(); + + // graph the results on AdcPulseInt from the cuts + TCanvas *c16=new TCanvas("c16","c16",1000,700); + c16->Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c16->cd(counter); + gPad->SetLogy(); + ng_goodAdcPulseInt_allcut[counter] -> Fit(Form("gausFitInt%d",counter),"R"); // comment out if you don't want to fit the ngcer + + ng_goodAdcPulseInt_allcut[counter]->SetLineColor(4); + ng_goodAdcPulseInt_allcut[counter]->SetLineWidth(2); + ng_goodAdcPulseInt_allcut[counter]->Draw("SAME"); + } + c16->Update(); + + Double_t mean[5]; + Double_t sigma[5]; + Double_t npe[5]; // "number of photoelectrons" + Double_t spe[5]; // "integral per single photo electron" + Double_t calic_const[5]; + mean[1]=gausFitInt1-> GetParameter(1); + sigma[1]=gausFitInt1->GetParameter(2); + mean[2]=gausFitInt2-> GetParameter(1); + sigma[2]=gausFitInt2->GetParameter(2); + mean[3]=gausFitInt3-> GetParameter(1); + sigma[3]=gausFitInt3->GetParameter(2); + mean[4]=gausFitInt4-> GetParameter(1); + sigma[4]=gausFitInt4->GetParameter(2); + cout<<"***************************************************************************"<<endl; + cout<<"PulseInt Fit for Run "<<run_num<<endl; + for (int i=1;i<5;i++){ + npe[i] = (mean[i] * mean[i])/(sigma[i] * sigma[i]); + spe[i] = mean[i]/npe[i]; + cout<<"PMT"<<i<<": mean ="<<mean[i]<<" sigma ="<<sigma[i]<<endl; + cout<<"PMT"<<i<<":npe =(mean/sigma)^2"<< npe[i] << "spe = mean/npe="<<spe[i]<<endl; + cout<<"PMT"<<i<<":The calibration constant in the parameter file is 1/spe ="<<1/spe[i]<<endl; + } + + cout<<"***************************************************************************"<<endl; + + /* + //graph the effect of the cuts on the timing plot +TCanvas *c19=new TCanvas("c19","c19",1000,700); + c19-> Divide(2,2); + for(Int_t counter = 1; counter < npmt+1; counter++){ + c19->cd(counter); + gPad->SetLogy(); + ng_goodAdcTdcDiffTimeRAW[counter]->SetLineColor(kGreen); + ng_goodAdcTdcDiffTimeRAW[counter]->SetLineWidth(2); + ng_goodAdcTdcDiffTimeRAW[counter]->Draw(); + ng_goodAdcTdcDiffTime[counter]->SetLineColor(kMagenta); + ng_goodAdcTdcDiffTime[counter]->Draw("SAME"); + } + c19-> Update(); + */ + + + + +return 0; +} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/shms_method2_improvement.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/shms_method2_improvement.C new file mode 100644 index 0000000000000000000000000000000000000000..a0cac06ab507756e367cceb546999c9e2fdf93ff --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/cherenkov_calibration/shms_method2_improvement.C @@ -0,0 +1,192 @@ +#include <TTree.h> +#include <TMatrixD.h> +#include <TROOT.h> +#include <TMatrixDBase.h> +#include <TMath.h> +#include <TChain.h> +#include <TH1F.h> +#include <TH2.h> +#include <TF1.h> +#include <cstdlib> +#include "TStyle.h" +#include "TColor.h" +#include <TLine.h> + +using namespace std; + +void shms_method2_improvement() +{ + + gStyle->SetOptFit(1111); //setting stat bar options + gStyle->SetStatFormat("6.6g"); + gStyle->SetLegendFont(42); + gStyle->SetLegendTextSize(0.01); + + const int nbinsx = 240; + const int nbinsy = 40 ; + int npmt=2; + //Declare root file + char run_num[20]; + cout<<"Enter SHMS Run number:"<<endl; + cin>> run_num; + + TString filename=Form("/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles/shms_replay_production_all_%s_200000.root",run_num); + TFile *fileIN = new TFile(filename); + + + //Declare Tree +TTree *T = (TTree*)fileIN->Get("T"); + +// Acquire the number of entries +Long64_t nentries; +nentries = T->GetEntries(); + + Double_t ngcer_mult[3], ngcer_goodAdcPulseInt[3], ngcer_npe[3]; + Double_t ngcer_XatCer, ngcer_YatCer,cal_etracknorm,cal_eprtracknorm; + + +T->SetBranchAddress("P.ngcer.goodAdcPulseInt", &ngcer_goodAdcPulseInt); + +T->SetBranchAddress("P.ngcer.npe", &ngcer_npe); + T->SetBranchAddress("P.ngcer.goodAdcMult", &ngcer_mult); + T-> SetBranchAddress("P.ngcer.xAtCer",&ngcer_XatCer); + T-> SetBranchAddress("P.ngcer.yAtCer",&ngcer_YatCer); + T->SetBranchAddress("P.cal.etottracknorm", &cal_etracknorm); // shower + preshower energy (I'm not exactly sure how these are "normalized" but these are the variables Brad and Xiaochao wanted me to use) + T->SetBranchAddress("P.cal.eprtracknorm", &cal_eprtracknorm); // preshower energy + + + + std::vector< TCut > cuts = {"P.ngcer.goodAdcMult[0]==1 && P.cal.etottracknorm > 0.8 && P.cal.etottracknorm < 1.4 && (P.cal.etottracknorm-P.cal.eprtracknorm) > 0.25 && (P.cal.etottracknorm-P.cal.eprtracknorm) < 1.1"," P.ngcer.goodAdcMult[1]==1 && P.cal.etottracknorm > 0.8 && P.cal.etottracknorm < 1.4 && (P.cal.etottracknorm-P.cal.eprtracknorm) > 0.25 && (P.cal.etottracknorm-P.cal.eprtracknorm) < 1.1","P.ngcer.goodAdcMult[2]==1 && P.cal.etottracknorm > 0.8 && P.cal.etottracknorm < 1.4 && (P.cal.etottracknorm-P.cal.eprtracknorm) > 0.25 && (P.cal.etottracknorm-P.cal.eprtracknorm) < 1.1"," P.ngcer.goodAdcMult[3]==1 && P.cal.etottracknorm > 0.8 && P.cal.etottracknorm < 1.4 && (P.cal.etottracknorm-P.cal.eprtracknorm) > 0.25 && (P.cal.etottracknorm-P.cal.eprtracknorm) < 1.1"};//d2n cuts + + // std::vector< TCut > cuts = {"H.cer.goodAdcMult[0]==1 && H.cal.eprtracknorm > 0.1 && H.cal.eprtracknorm < 0.8"," H.cer.goodAdcMult[1]==1 && H.cal.eprtracknorm > 0.1 && H.cal.eprtracknorm < 0.8"}; + +// XatCer, YatCer cuts + Double_t XatCerCutLower[5]={-1000,0,0,-29,-29}; //Old code is counting from 1 + Double_t XatCerCutUpper[5]={-1000,5.5,3.8,-0.2,-1.5}; + Double_t YatCerCutLower[5]={-1000,0,-13.7,1.5,-16};// {FLAG, PMT1, PMT2} + Double_t YatCerCutUpper[5]={-1000,12,-2.2,16,0}; + + // make lines for the XY cuts + TLine *XatCerLowerLines[5]; // old code is counting from 1 + TLine *YatCerLowerLines[5]; + TLine *XatCerUpperLines[5]; + TLine *YatCerUpperLines[5]; + //// TLine(x1,y1,x2,y2) + for (int i=1;i<5;i++){//counting from 1 + XatCerLowerLines[i]= new TLine(-40,XatCerCutLower[i],40,XatCerCutLower[i]); + XatCerLowerLines[i]->SetLineStyle(9); + XatCerLowerLines[i]->SetLineColor(kRed); + XatCerLowerLines[i]->SetLineWidth(1); + + XatCerUpperLines[i]= new TLine(-40,XatCerCutUpper[i],40,XatCerCutUpper[i]); + XatCerUpperLines[i]->SetLineStyle(9); + XatCerUpperLines[i]->SetLineColor(kRed); + XatCerUpperLines[i]->SetLineWidth(1); + + YatCerLowerLines[i]= new TLine(YatCerCutLower[i],-60,YatCerCutLower[i],20); + YatCerLowerLines[i]->SetLineStyle(9); + YatCerLowerLines[i]->SetLineColor(kRed); + YatCerLowerLines[i]->SetLineWidth(1); + + YatCerUpperLines[i]= new TLine(YatCerCutUpper[i],-60,YatCerCutUpper[i],20); + YatCerUpperLines[i]->SetLineStyle(9); + YatCerUpperLines[i]->SetLineColor(kRed); + YatCerUpperLines[i]->SetLineWidth(1); + } + + TCanvas* c1 = new TCanvas("c1", "Mean NPE Distribution (With Multiplicity Cut) PMT 1", 1800, 600); + c1->Divide(3,1); + + c1->cd(1); + T->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanEventDistrMult1(%i,-40,40,%i,-40,40)",nbinsy,nbinsx),cuts.at(0),"colz"); //clean electron x/y event distrubtion + TH2F *cleanEventDistrMult1 = (TH2F*)gDirectory->Get("cleanEventDistrMult1"); + cleanEventDistrMult1->SetTitle("Clean Electron Event Distribution;Y Position;X Position"); + + c1->cd(2); + T->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanTotNpeDistrMult1(%i,-40,40,%i,-40,40)",nbinsy,nbinsx),cuts.at(0)*"P.ngcer.npe[0]","colz"); //clean electron x/y npe distribution + TH2F *cleanTotNpeDistrMult1 = (TH2F*)gDirectory->Get("cleanTotNpeDistrMult1"); + cleanTotNpeDistrMult1->SetTitle("Clean Electron Total NPE Distribution;Y Position;X Position"); + + c1->cd(3); + TH2F* cleanMeanNpeDistrMult1= (TH2F*)cleanTotNpeDistrMult1->Clone(); + cleanMeanNpeDistrMult1->Divide(cleanEventDistrMult1); // clean electron x/y mean npe per event distribution (cleanTotNpeDistr/cleanEventDistr) + cleanMeanNpeDistrMult1->Draw("colz"); + cleanMeanNpeDistrMult1->SetTitle("Clean Electron Mean NPE/Event Distribution;Y Position;X Position"); + XatCerLowerLines[1] -> Draw(); + XatCerUpperLines[1] -> Draw(); + YatCerLowerLines[1] -> Draw(); + YatCerUpperLines[1] -> Draw(); + + TCanvas* c2 = new TCanvas("c2", "Mean NPE Distribution (With Multiplicity Cut) PMT 2", 1800, 600); + c2->Divide(3,1); + + c2->cd(1); + T->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanEventDistrMult2(%i,-40,40,%i,-60,20)",nbinsy,nbinsx),cuts.at(1),"colz"); //clean electron x/y event distrubtion + TH2F *cleanEventDistrMult2 = (TH2F*)gDirectory->Get("cleanEventDistrMult2"); + cleanEventDistrMult2->SetTitle("Clean Electron Event Distribution;Y Position;X Position"); + + c2->cd(2); + T->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanTotNpeDistrMult2(%i,-40,40,%i,-60,20)",nbinsy,nbinsx),cuts.at(1)*"P.ngcer.npe[1]","colz"); //clean electron x/y npe distribution + TH2F *cleanTotNpeDistrMult2 = (TH2F*)gDirectory->Get("cleanTotNpeDistrMult2"); + cleanTotNpeDistrMult2->SetTitle("Clean Electron Total NPE Distribution;Y Position;X Position"); + + c2->cd(3); + TH2F* cleanMeanNpeDistrMult2= (TH2F*)cleanTotNpeDistrMult2->Clone(); + cleanMeanNpeDistrMult2->Divide(cleanEventDistrMult2); // clean electron x/y mean npe per event distribution (cleanTotNpeDistr/cleanEventDistr) + cleanMeanNpeDistrMult2->Draw("colz"); + cleanMeanNpeDistrMult2->SetTitle("Clean Electron Mean NPE/Event Distribution;Y Position;X Position"); + XatCerLowerLines[2] -> Draw(); + XatCerUpperLines[2] -> Draw(); + YatCerLowerLines[2] -> Draw(); + YatCerUpperLines[2] -> Draw(); + +TCanvas* c3 = new TCanvas("c3", "Mean NPE Distribution (With Multiplicity Cut) PMT 3", 1800, 600); + c3->Divide(3,1); + + c3->cd(1); + T->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanEventDistrMult3(%i,-40,40,%i,-60,20)",nbinsy,nbinsx),cuts.at(2),"colz"); //clean electron x/y event distrubtion + TH2F *cleanEventDistrMult3 = (TH2F*)gDirectory->Get("cleanEventDistrMult3"); + cleanEventDistrMult3->SetTitle("Clean Electron Event Distribution;Y Position;X Position"); + + c3->cd(2); + T->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanTotNpeDistrMult3(%i,-40,40,%i,-60,20)",nbinsy,nbinsx),cuts.at(2)*"P.ngcer.npe[2]","colz"); //clean electron x/y npe distribution + TH2F *cleanTotNpeDistrMult3 = (TH2F*)gDirectory->Get("cleanTotNpeDistrMult3"); + cleanTotNpeDistrMult3->SetTitle("Clean Electron Total NPE Distribution;Y Position;X Position"); + + c3->cd(3); + TH2F* cleanMeanNpeDistrMult3= (TH2F*)cleanTotNpeDistrMult3->Clone(); + cleanMeanNpeDistrMult3->Divide(cleanEventDistrMult3); // clean electron x/y mean npe per event distribution (cleanTotNpeDistr/cleanEventDistr) + cleanMeanNpeDistrMult3->Draw("colz"); + cleanMeanNpeDistrMult3->SetTitle("Clean Electron Mean NPE/Event Distribution;Y Position;X Position"); + XatCerLowerLines[3] -> Draw(); + XatCerUpperLines[3] -> Draw(); + YatCerLowerLines[3] -> Draw(); + YatCerUpperLines[3] -> Draw(); + + +TCanvas* c4 = new TCanvas("c4", "Mean NPE Distribution (With Multiplicity Cut) PMT 4", 1800, 600); + c4->Divide(3,1); + + c4->cd(1); + T->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanEventDistrMult4(%i,-40,40,%i,-60,20)",nbinsy,nbinsx),cuts.at(3),"colz"); //clean electron x/y event distrubtion + TH2F *cleanEventDistrMult4 = (TH2F*)gDirectory->Get("cleanEventDistrMult4"); + cleanEventDistrMult4->SetTitle("Clean Electron Event Distribution;Y Position;X Position"); + + c4->cd(2); + T->Draw(Form("P.ngcer.xAtCer:P.ngcer.yAtCer>>cleanTotNpeDistrMult4(%i,-40,40,%i,-60,20)",nbinsy,nbinsx),cuts.at(3)*"P.ngcer.npe[3]","colz"); //clean electron x/y npe distribution + TH2F *cleanTotNpeDistrMult4 = (TH2F*)gDirectory->Get("cleanTotNpeDistrMult4"); + cleanTotNpeDistrMult4->SetTitle("Clean Electron Total NPE Distribution;Y Position;X Position"); + + c4->cd(3); + TH2F* cleanMeanNpeDistrMult4= (TH2F*)cleanTotNpeDistrMult4->Clone(); + cleanMeanNpeDistrMult4->Divide(cleanEventDistrMult4); // clean electron x/y mean npe per event distribution (cleanTotNpeDistr/cleanEventDistr) + cleanMeanNpeDistrMult4->Draw("colz"); + cleanMeanNpeDistrMult4->SetTitle("Clean Electron Mean NPE/Event Distribution;Y Position;X Position"); + XatCerLowerLines[4] -> Draw(); + XatCerUpperLines[4] -> Draw(); + YatCerLowerLines[4] -> Draw(); + YatCerUpperLines[4] -> Draw(); + + return 0; +} + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/electron_pion_ratio.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/electron_pion_ratio.C new file mode 100644 index 0000000000000000000000000000000000000000..53cfe237f618161ccd729716aeeec7d071ba031b --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/electron_pion_ratio.C @@ -0,0 +1,223 @@ + #include <ROOT/RDataFrame.hxx> +#include <TCanvas.h> +#include <TH1D.h> +#include <string> + +const double kCalorimeterMinimumEPCut = .8; + +// Draft of a program to conduct electron-pion ratio estimation for SHMS runs by hand. +// https://logbooks.jlab.org/entry/3650663 +// https://hallcweb.jlab.org/DocDB/0010/001053/001/wisewordsoncheranalysis.pdf +// murchhanaroy@uky.edu +// August 2020 + + + + +// cdaq full replay dir. +const std::string kReplayDir = + "/home/cdaq/polhe3/production/hallc_replay/ROOTfiles"; + +int electron_pion_ratio(int run = 10986, int nevents = -1) { + + ROOT::RDataFrame d{"T", Form("%s/shms_replay_production_default_%i_%i.root", + kReplayDir.c_str(), run, nevents)}; + + +// Cuts to make sure we only look at good tracks, and define an extra useful + // variable for the calorimeter shower-only E/P + auto d_good_track = + d.Filter("-10 < P.gtr.dp && P.gtr.dp < 22") // delta cut + .Filter("fabs(P.gtr.y) < 4") // target y position + .Filter("fabs(P.gtr.th) < .06") // target x' (theta) + .Filter("P.cal.etottracknorm < 2") // remove nonsensical values + .Define("P_cal_eshowertracknorm", // shower E/P + "P.cal.etottracknorm - P.cal.eprtracknorm") + .Filter("P_cal_eshowertracknorm > .02"); // remove low energy + // electrons and positrons + // from dipole frame + + // Make a histogram for the #photo-electrons in the Cherenkov and the + // calorimeter energy deposition (both in 1D and 2D) + auto hngc = d_good_track.Histo1D( + {"hngc", "SHMS NGC #pe;SHMS NGC #pe;count", 100, 0, 25}, + "P.ngcer.npeSum"); + + auto hcal_all = d_good_track.Histo1D( + {"hcal_all", "SHMS Cal E/P;SHMS Cal E/P;count", 100, 0, 2}, + "P.cal.etottracknorm"); + + auto hcal_all_2d = d_good_track.Histo2D( + {"hcal_all_2d", + "SHMS preshower versus shower E/P;SHMS Shower E/P;SHMS Pre E/P", 50, 0, + 2, 50, 0, 2}, + "P_cal_eshowertracknorm", "P.cal.eprtracknorm"); + + // Now we want to select particles we now for sure are electrons. Therefor we + // apply a super-strict cut on the SHMS NGC of #pe > 5 + auto d_electron = d_good_track.Filter("P.ngcer.npeSum > 2"); + + // Histogram of what the calorimeter response looks like with this cut + auto hcal_electron = d_electron.Histo1D( + {"hcal_electron", "SHMS Cal E/P for electrons;SHMS Cal E/P;count", 100, 0, + 2}, + "P.cal.etottracknorm"); + + auto hcal_electron_2d = + d_electron.Histo2D({"hcal_electron_2d", + "SHMS preshower versus shower E/P for " + "electrons;SHMS Shower E/P;SHMS Pre E/P", + 50, 0, 2, 50, 0, 2}, + "P_cal_eshowertracknorm", "P.cal.eprtracknorm"); + + // For the pion rejection we need to do something similar. For this example, + // we assume everything that is not an electron is a pion (ignoring kaons and + // protons) + auto d_pion = d_good_track.Filter("P.ngcer.npeSum < 0.1"); + + // Histogram of what the calorimeter response looks like with this cut + auto hcal_pion = d_pion.Histo1D( + {"hcal_pion", "SHMS Cal E/P for pions;SHMS Cal E/P;count", 100, 0, 2}, + "P.cal.etottracknorm"); + + auto hcal_pion_2d = + d_pion.Histo2D({"hcal_pion_2d", + "SHMS preshower versus shower E/P for pions;SHMS " + "Shower E/P;SHMS Pre E/P", + 50, 0, 2, 50, 0, 2}, + "P_cal_eshowertracknorm", "P.cal.eprtracknorm"); + + // Calculate the efficiency for our calorimeter cut: count how many electrons + // we have and how many survive our calorimeter cut. The cut value is defined + // at the top of this file. + const std::string calorimeter_electron_cut = + Form("P.cal.etottracknorm > %f", kCalorimeterMinimumEPCut); + + auto d_electron_cal_cut = d_electron.Filter(calorimeter_electron_cut); + + auto n_electrons = d_electron.Count(); + auto n_electrons_cal_cut = d_electron_cal_cut.Count(); + + // To calculate the pion rejection factor, we need the total number of pions + // and the number of pions that survive our cut + auto d_pion_cal_cut = d_pion.Filter(calorimeter_electron_cut); + + auto n_pions = d_pion.Count(); + auto n_pions_cal_cut = d_pion_cal_cut.Count(); + + // Everything useful is defined. Let's now make plots and calculate efficiency + // and rejection! + + // Tell ROOT we want to plot the histogram titles + gStyle->SetOptTitle(1); + + // A canvas for us to draw our results on + TCanvas* c = new TCanvas("c", "Calorimeter PID Studies", 800, 800); + // We subdivide the canvas in a 2x2 grid of panes for our figures + c->Divide(2, // 2 columns + 2); // 2 rows + // We make a multi-page PDF file, so let's start by opening our file (notice + // the opening bracket) + c->Print( + Form("calorimeter_pid_shms_%i_%.2f.pdf[", run, kCalorimeterMinimumEPCut)); + + // PAGE 1 + // First we want to plot the Cherenkov and calorimeter spectra for all tracks + { + c->cd(1); // left top + hngc->Draw(); + c->cd(2); // right top + TPaveText t{0., 0.4, 1.0, 0.8, "NB NDC"}; + t.SetFillColor(kWhite); + t.AddText("Raw spectra (without any PID cuts)"); + t.Draw(); + c->cd(3); // left bottom + hcal_all->Draw(); + c->cd(4); // right bottom + hcal_all_2d->Draw("colz"); // colz option plots a color scale z-axis + // print this page + c->Print(Form("calorimeter_pid_shms_%i_%.2f.pdf", run, + kCalorimeterMinimumEPCut)); + } + + // PAGE 2 + // Electron detection efficiency + { + c->cd(1); // left top + hngc->Draw(); + // Add a line to show our Cherenkov cut of #pe > 5 + TLine l1{5, 0, 5, hngc->GetMaximum()}; + l1.SetLineStyle(2); // Dashed line + l1.Draw(); + c->cd(2); // right top + TPaveText t{0., 0.4, 1.0, 0.8, "NB NDC"}; + t.SetFillColor(kWhite); + t.AddText(Form("Total number of electrons: %i", (int)*n_electrons)); + t.AddText("(Cherenkov cut: #pe > 5)"); + t.AddText(Form("Number of electrons after calorimeter cut: %i", + (int)*n_electrons_cal_cut)); + t.AddText(Form("(Calorimeter cut: E/P > %.2f)", kCalorimeterMinimumEPCut)); + t.AddText(Form("Calorimeter Efficiency: %.2f%%", + *n_electrons_cal_cut * 100. / *n_electrons)); + t.Draw(); + c->cd(3); // left bottom + hcal_electron->Draw(); + // Add a line for the E/P cut we did + TLine l2{kCalorimeterMinimumEPCut, 0, kCalorimeterMinimumEPCut, + hcal_electron->GetMaximum()}; + l2.SetLineStyle(2); // Dashed line + l2.Draw(); + c->cd(4); // right bottom + hcal_electron_2d->Draw("colz"); // colz option plots a color scale z-axis + // Add a line for the calorimeter cuts we did + TLine l3{kCalorimeterMinimumEPCut, 0, 0, kCalorimeterMinimumEPCut}; + l3.SetLineStyle(2); // Dashed line + l3.Draw(); + c->Print(Form("calorimeter_pid_shms_%i_%.2f.pdf", run, + kCalorimeterMinimumEPCut)); + } + // PAGE 3 + // Pion rejection + { + c->cd(1); // left top + hngc->Draw(); + // Add a line to show our Cherenkov cut of #pe < .1 + TLine l1{.1, 0, .1, hngc->GetMaximum()}; + l1.SetLineStyle(2); // Dashed line + l1.Draw(); + c->cd(2); // right top + TPaveText t{0., 0.4, 1.0, 0.8, "NB NDC"}; + t.SetFillColor(kWhite); + t.AddText(Form("Total number of pions: %i", (int)*n_pions)); + t.AddText("(Cherenkov cut: #pe < .1)"); + t.AddText(Form("Number of pions after calorimeter cut: %i", + (int)*n_pions_cal_cut)); + t.AddText(Form("(Calorimeter cut: E/P > %.2f)", kCalorimeterMinimumEPCut)); + t.AddText( + Form("Pion rejection factor: %.2f", *n_pions * 1. / *n_pions_cal_cut)); + t.Draw(); + c->cd(3); // left bottom + hcal_pion->Draw(); + // Add a line for the E/P cut we did + TLine l2{kCalorimeterMinimumEPCut, 0, kCalorimeterMinimumEPCut, + hcal_pion->GetMaximum()}; + l2.SetLineStyle(2); // Dashed line + l2.Draw(); + c->cd(4); // right bottom + hcal_pion_2d->Draw("colz"); // colz option plots a color scale z-axis + // Add a line for the calorimeter cuts we did + TLine l3{kCalorimeterMinimumEPCut, 0, 0, kCalorimeterMinimumEPCut}; + l3.SetLineStyle(2); // Dashed line + l3.Draw(); + c->Print(Form("calorimeter_pid_shms_%i_%.2f.pdf", run, + kCalorimeterMinimumEPCut)); + } + + // Close our multi-page PDF file + c->Print( + Form("calorimeter_pid_shms_%i_%.2f.pdf]", run, kCalorimeterMinimumEPCut)); + + // That's all! + return 0; +} + diff --git a/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/electron_positron_ratio.C b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/electron_positron_ratio.C new file mode 100644 index 0000000000000000000000000000000000000000..b26c98b0dccc41191d7f2ab28ae570fc37c516fd --- /dev/null +++ b/POLHE3_SCRIPTS/Calibration_files-Murchhana_RefTime-Cherenkov/electron_positron_ratio.C @@ -0,0 +1,223 @@ + #include <ROOT/RDataFrame.hxx> +#include <TCanvas.h> +#include <TH1D.h> +#include <string> + +const double kCalorimeterMinimumEPCut = .8; + +// Draft of a program to conduct electron-pion ratio estimation for SHMS runs by hand. +// https://logbooks.jlab.org/entry/3650663 +// https://hallcweb.jlab.org/DocDB/0010/001053/001/wisewordsoncheranalysis.pdf +// murchhanaroy@uky.edu +// August 2020 + + + + +// cdaq full replay dir. +const std::string kReplayDir = + "/group/c-polhe3/Users/murchhana/hallc_replay/ROOTfiles"; + +int electron_pion_ratio(int run = 10986, int nevents = -1) { + + ROOT::RDataFrame d{"T", Form("%s/shms_replay_production_default_%i_%i.root", + kReplayDir.c_str(), run, nevents)}; + + +// Cuts to make sure we only look at good tracks, and define an extra useful + // variable for the calorimeter shower-only E/P + auto d_good_track = + d.Filter("-10 < P.gtr.dp && P.gtr.dp < 22") // delta cut + .Filter("fabs(P.gtr.y) < 4") // target y position + .Filter("fabs(P.gtr.th) < .06") // target x' (theta) + .Filter("P.cal.etottracknorm < 2") // remove nonsensical values + .Define("P_cal_eshowertracknorm", // shower E/P + "P.cal.etottracknorm - P.cal.eprtracknorm") + .Filter("P_cal_eshowertracknorm > .02"); // remove low energy + // electrons and positrons + // from dipole frame + + // Make a histogram for the #photo-electrons in the Cherenkov and the + // calorimeter energy deposition (both in 1D and 2D) + auto hngc = d_good_track.Histo1D( + {"hngc", "SHMS NGC #pe;SHMS NGC #pe;count", 100, 0, 25}, + "P.ngcer.npeSum"); + + auto hcal_all = d_good_track.Histo1D( + {"hcal_all", "SHMS Cal E/P;SHMS Cal E/P;count", 100, 0, 2}, + "P.cal.etottracknorm"); + + auto hcal_all_2d = d_good_track.Histo2D( + {"hcal_all_2d", + "SHMS preshower versus shower E/P;SHMS Shower E/P;SHMS Pre E/P", 50, 0, + 2, 50, 0, 2}, + "P_cal_eshowertracknorm", "P.cal.eprtracknorm"); + + // Now we want to select particles we now for sure are electrons. Therefor we + // apply a super-strict cut on the SHMS NGC of #pe > 5 + auto d_electron = d_good_track.Filter("P.ngcer.npeSum > 2"); + + // Histogram of what the calorimeter response looks like with this cut + auto hcal_electron = d_electron.Histo1D( + {"hcal_electron", "SHMS Cal E/P for electrons;SHMS Cal E/P;count", 100, 0, + 2}, + "P.cal.etottracknorm"); + + auto hcal_electron_2d = + d_electron.Histo2D({"hcal_electron_2d", + "SHMS preshower versus shower E/P for " + "electrons;SHMS Shower E/P;SHMS Pre E/P", + 50, 0, 2, 50, 0, 2}, + "P_cal_eshowertracknorm", "P.cal.eprtracknorm"); + + // For the pion rejection we need to do something similar. For this example, + // we assume everything that is not an electron is a pion (ignoring kaons and + // protons) + auto d_pion = d_good_track.Filter("P.ngcer.npeSum < 0.1"); + + // Histogram of what the calorimeter response looks like with this cut + auto hcal_pion = d_pion.Histo1D( + {"hcal_pion", "SHMS Cal E/P for pions;SHMS Cal E/P;count", 100, 0, 2}, + "P.cal.etottracknorm"); + + auto hcal_pion_2d = + d_pion.Histo2D({"hcal_pion_2d", + "SHMS preshower versus shower E/P for pions;SHMS " + "Shower E/P;SHMS Pre E/P", + 50, 0, 2, 50, 0, 2}, + "P_cal_eshowertracknorm", "P.cal.eprtracknorm"); + + // Calculate the efficiency for our calorimeter cut: count how many electrons + // we have and how many survive our calorimeter cut. The cut value is defined + // at the top of this file. + const std::string calorimeter_electron_cut = + Form("P.cal.etottracknorm > %f", kCalorimeterMinimumEPCut); + + auto d_electron_cal_cut = d_electron.Filter(calorimeter_electron_cut); + + auto n_electrons = d_electron.Count(); + auto n_electrons_cal_cut = d_electron_cal_cut.Count(); + + // To calculate the pion rejection factor, we need the total number of pions + // and the number of pions that survive our cut + auto d_pion_cal_cut = d_pion.Filter(calorimeter_electron_cut); + + auto n_pions = d_pion.Count(); + auto n_pions_cal_cut = d_pion_cal_cut.Count(); + + // Everything useful is defined. Let's now make plots and calculate efficiency + // and rejection! + + // Tell ROOT we want to plot the histogram titles + gStyle->SetOptTitle(1); + + // A canvas for us to draw our results on + TCanvas* c = new TCanvas("c", "Calorimeter PID Studies", 800, 800); + // We subdivide the canvas in a 2x2 grid of panes for our figures + c->Divide(2, // 2 columns + 2); // 2 rows + // We make a multi-page PDF file, so let's start by opening our file (notice + // the opening bracket) + c->Print( + Form("calorimeter_pid_shms_%i_%.2f.pdf[", run, kCalorimeterMinimumEPCut)); + + // PAGE 1 + // First we want to plot the Cherenkov and calorimeter spectra for all tracks + { + c->cd(1); // left top + hngc->Draw(); + c->cd(2); // right top + TPaveText t{0., 0.4, 1.0, 0.8, "NB NDC"}; + t.SetFillColor(kWhite); + t.AddText("Raw spectra (without any PID cuts)"); + t.Draw(); + c->cd(3); // left bottom + hcal_all->Draw(); + c->cd(4); // right bottom + hcal_all_2d->Draw("colz"); // colz option plots a color scale z-axis + // print this page + c->Print(Form("calorimeter_pid_shms_%i_%.2f.pdf", run, + kCalorimeterMinimumEPCut)); + } + + // PAGE 2 + // Electron detection efficiency + { + c->cd(1); // left top + hngc->Draw(); + // Add a line to show our Cherenkov cut of #pe > 5 + TLine l1{5, 0, 5, hngc->GetMaximum()}; + l1.SetLineStyle(2); // Dashed line + l1.Draw(); + c->cd(2); // right top + TPaveText t{0., 0.4, 1.0, 0.8, "NB NDC"}; + t.SetFillColor(kWhite); + t.AddText(Form("Total number of electrons: %i", (int)*n_electrons)); + t.AddText("(Cherenkov cut: #pe > 5)"); + t.AddText(Form("Number of electrons after calorimeter cut: %i", + (int)*n_electrons_cal_cut)); + t.AddText(Form("(Calorimeter cut: E/P > %.2f)", kCalorimeterMinimumEPCut)); + t.AddText(Form("Calorimeter Efficiency: %.2f%%", + *n_electrons_cal_cut * 100. / *n_electrons)); + t.Draw(); + c->cd(3); // left bottom + hcal_electron->Draw(); + // Add a line for the E/P cut we did + TLine l2{kCalorimeterMinimumEPCut, 0, kCalorimeterMinimumEPCut, + hcal_electron->GetMaximum()}; + l2.SetLineStyle(2); // Dashed line + l2.Draw(); + c->cd(4); // right bottom + hcal_electron_2d->Draw("colz"); // colz option plots a color scale z-axis + // Add a line for the calorimeter cuts we did + TLine l3{kCalorimeterMinimumEPCut, 0, 0, kCalorimeterMinimumEPCut}; + l3.SetLineStyle(2); // Dashed line + l3.Draw(); + c->Print(Form("calorimeter_pid_shms_%i_%.2f.pdf", run, + kCalorimeterMinimumEPCut)); + } + // PAGE 3 + // Pion rejection + { + c->cd(1); // left top + hngc->Draw(); + // Add a line to show our Cherenkov cut of #pe < .1 + TLine l1{.1, 0, .1, hngc->GetMaximum()}; + l1.SetLineStyle(2); // Dashed line + l1.Draw(); + c->cd(2); // right top + TPaveText t{0., 0.4, 1.0, 0.8, "NB NDC"}; + t.SetFillColor(kWhite); + t.AddText(Form("Total number of pions: %i", (int)*n_pions)); + t.AddText("(Cherenkov cut: #pe < .1)"); + t.AddText(Form("Number of pions after calorimeter cut: %i", + (int)*n_pions_cal_cut)); + t.AddText(Form("(Calorimeter cut: E/P > %.2f)", kCalorimeterMinimumEPCut)); + t.AddText( + Form("Pion rejection factor: %.2f", *n_pions * 1. / *n_pions_cal_cut)); + t.Draw(); + c->cd(3); // left bottom + hcal_pion->Draw(); + // Add a line for the E/P cut we did + TLine l2{kCalorimeterMinimumEPCut, 0, kCalorimeterMinimumEPCut, + hcal_pion->GetMaximum()}; + l2.SetLineStyle(2); // Dashed line + l2.Draw(); + c->cd(4); // right bottom + hcal_pion_2d->Draw("colz"); // colz option plots a color scale z-axis + // Add a line for the calorimeter cuts we did + TLine l3{kCalorimeterMinimumEPCut, 0, 0, kCalorimeterMinimumEPCut}; + l3.SetLineStyle(2); // Dashed line + l3.Draw(); + c->Print(Form("calorimeter_pid_shms_%i_%.2f.pdf", run, + kCalorimeterMinimumEPCut)); + } + + // Close our multi-page PDF file + c->Print( + Form("calorimeter_pid_shms_%i_%.2f.pdf]", run, kCalorimeterMinimumEPCut)); + + // That's all! + return 0; +} + diff --git a/POLHE3_SCRIPTS/README.txt b/POLHE3_SCRIPTS/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..a0e220f2e82660f74a4c13ab08c323dc96975121 --- /dev/null +++ b/POLHE3_SCRIPTS/README.txt @@ -0,0 +1,2 @@ +Detector calibration files and supporting notes for Pol-He3 run group. +