diff --git a/DEF-files/COIN/PRODUCTION/GTR/coin_gtr_histos.def b/DEF-files/COIN/PRODUCTION/GTR/coin_gtr_histos.def new file mode 100644 index 0000000000000000000000000000000000000000..05d7839426559467a12eaba1070d5a7e9603189c --- /dev/null +++ b/DEF-files/COIN/PRODUCTION/GTR/coin_gtr_histos.def @@ -0,0 +1,5 @@ +############################ +# TARGET +############################ +TH2F hgtrz_vs_pgtrz 'HMS z_{tar} vs SHMS z_{tar}; SHMS z_{tar} / 0.1 cm; HMS z_{tar} / 0.1 cm;' P.gtr.z H.gtr.z 300 -15 15 300 -15 15 coincut +TH2F hgtry_vs_pgtry 'HMS y_{tar} vs SHMS y_{tar}; SHMS y_{tar} / 0.1 cm; HMS y_{tar} / 0.1 cm;' P.gtr.y H.gtr.y 300 -15 15 300 -15 15 coincut diff --git a/DEF-files/COIN/PRODUCTION/KIN/coin_hElec_pProt_kin_histos.def b/DEF-files/COIN/PRODUCTION/KIN/coin_hElec_pProt_kin_histos.def new file mode 100644 index 0000000000000000000000000000000000000000..132ec766f3d252cac56292dd14b245f18124625d --- /dev/null +++ b/DEF-files/COIN/PRODUCTION/KIN/coin_hElec_pProt_kin_histos.def @@ -0,0 +1,44 @@ + +############################ +# MISSING MASS +############################ +TH1F pkin_mmiss 'SHMS M_{miss} (ccleantrack); M_{miss} (GeV); Count / 0.005 GeV' P.kin.secondary.Mmiss 800 -2 2 ccleantrack +TH1F pkin_mmiss_coincut 'SHMS M_{miss} (coincut); M_{miss} (GeV); Count / 0.005 GeV' P.kin.secondary.Mmiss 800 -2 2 coincut +TH1F pkin_mmiss_coincut_ep 'SHMS M_{miss} (coincut_ep); M_{miss} (GeV); Count / 0.005 GeV' P.kin.secondary.Mmiss 800 -2 2 coincut_ep +TH1F pkin_mmiss_tightcut 'SHMS M_{miss} (tight_coin); M_{miss} (GeV); Count / 0.005 GeV' P.kin.secondary.Mmiss 800 -2 2 tight_coin&&select_e_cut&&betacut_proton +TH1F pkin_mmiss_ran_coincut 'SHMS M_{miss} (ran_coincut); M_{miss} (GeV); Count / 0.005 GeV' P.kin.secondary.Mmiss 800 -2 2 ran_coincut&&select_e_cut&&betacut_proton + + +############################ +# MISSING MOMENTUM +############################ +TH1F pkin_pmiss 'SHMS p_{miss} Magnitude (ccleantrack); p_{miss} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss 800 -2 2 ccleantrack +TH1F pkin_pmiss_coincut 'SHMS p_{miss} Magnitude (coincut); p_{miss} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss 800 -2 2 coincut +TH1F pkin_pmiss_pid 'SHMS p_{miss} Magnitude (coincut_ep); p_{miss} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss 800 -2 2 coincut_ep +TH1F pkin_pmiss_x 'SHMS p_{miss,x} (coincut_ep); p_{miss,x} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_x 800 -2 2 coincut_ep +TH1F pkin_pmiss_y 'SHMS p_{miss,y} (coincut_ep); p_{miss,y} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_y 800 -2 2 coincut_ep +TH1F pkin_pmiss_z 'SHMS p_{miss,z} (coincut_ep); p_{miss,z} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_z 800 -2 2 coincut_ep +TH1F pkin_pmiss_par 'SHMS p_{miss,par} (coincut_ep); p_{miss,par} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_z 800 -2 2 coincut_ep +TH1F pkin_pmiss_perp 'SHMS p_{miss,perp} (coincut_ep); p_{miss,perp} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_perp 800 -2 2 coincut_ep +TH1F pkin_pmiss_oop 'SHMS p_{miss,oop} (coincut_ep); p_{miss,oop} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_y 800 -2 2 coincut_ep + +TH1F pkin_pmiss_nuc 'SHMS p_{miss,nuc} (ccleantrack); p_{miss} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_nuc 800 -2 2 ccleantrack +TH1F pkin_pmiss_nuc_coincut 'SHMS p_{miss,nuc} (coincut); p_{miss} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_nuc 800 -2 2 coincut +TH1F pkin_pmiss_nuc_pid 'SHMS p_{miss,nuc} (coincut_ep); p_{miss} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_nuc 800 -2 2 coincut_ep +TH1F pkin_pmiss_nuc_x 'SHMS p_{miss,nuc,x} (coincut_ep); p_{miss,x} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_nuc_x 800 -2 2 coincut_ep +TH1F pkin_pmiss_nuc_y 'SHMS p_{miss,nuc,y} (coincut_ep); p_{miss,y} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_nuc_y 800 -2 2 coincut_ep +TH1F pkin_pmiss_nuc_z 'SHMS p_{miss,nuc,z} (coincut_ep); p_{miss,z} (GeV); Count / 0.005 GeV;' P.kin.secondary.pmiss_nuc_z 800 -2 2 coincut_ep + +############################ +# MISSING ENERGY +############################ +TH1F pkin_Emiss 'SHMS E_{miss} (ccleantrack); E_{miss} (GeV); Count / 0.005 GeV;' P.kin.secondary.emiss 400 -1 1 ccleantrack +TH1F pkin_Emiss_coincut 'SHMS E_{miss} (coincut); E_{miss} (GeV); Count / 0.005 GeV;' P.kin.secondary.emiss 400 -1 1 coincut +TH1F pkin_Emiss_pid 'SHMS E_{miss} (coincut_ep); E_{miss} (GeV); Count / 0.005 GeV;' P.kin.secondary.emiss 400 -1 1 coincut_ep + + +############################ +# KINEMATICS +############################ +TH1F hkin_Q2 'HMS Q^{2}; Q^{2} (GeV); Count / 0.005 GeV;' H.kin.primary.Q2 2000 0 10 ccleantrack +TH1F hkin_W2 'HMS W^{2}; W^{2} (GeV); Count / 0.005 GeV;' H.kin.primary.W2 2000 0 10 ccleantrack diff --git a/DEF-files/COIN/PRODUCTION/KIN/coin_pElec_hProt_kin_histos.def b/DEF-files/COIN/PRODUCTION/KIN/coin_pElec_hProt_kin_histos.def new file mode 100644 index 0000000000000000000000000000000000000000..58f02214ffb85e4b8927f269400cebbec715bd32 --- /dev/null +++ b/DEF-files/COIN/PRODUCTION/KIN/coin_pElec_hProt_kin_histos.def @@ -0,0 +1,44 @@ + +############################ +# MISSING MASS +############################ +TH1F hkin_mmiss 'HMS M_{miss} (ccleantrack); M_{miss} (GeV); Count / 0.005 GeV' H.kin.secondary.Mmiss 800 -2 2 ccleantrack +TH1F hkin_mmiss_coincut 'HMS M_{miss} (coincut); M_{miss} (GeV); Count / 0.005 GeV' H.kin.secondary.Mmiss 800 -2 2 coincut +TH1F hkin_mmiss_coincut_ep 'HMS M_{miss} (coincut_ep); M_{miss} (GeV); Count / 0.005 GeV' H.kin.secondary.Mmiss 800 -2 2 coincut_ep +TH1F hkin_mmiss_tightcut 'HMS M_{miss} (tight_coin); M_{miss} (GeV); Count / 0.005 GeV' H.kin.secondary.Mmiss 800 -2 2 tight_coin&&select_e_cut&&betacut_proton +TH1F hkin_mmiss_ran_coincut 'HMS M_{miss} (ran_coincut); M_{miss} (GeV); Count / 0.005 GeV' H.kin.secondary.Mmiss 800 -2 2 ran_coincut&&select_e_cut&&betacut_proton + + +############################ +# MISSING MOMENTUM +############################ +TH1F hkin_pmiss 'HMS p_{miss} Magnitude (ccleantrack); p_{miss} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss 800 -2 2 ccleantrack +TH1F hkin_pmiss_coincut 'HMS p_{miss} Magnitude (coincut); p_{miss} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss 800 -2 2 coincut +TH1F hkin_pmiss_pid 'HMS p_{miss} Magnitude (coincut_ep); p_{miss} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss 800 -2 2 coincut_ep +TH1F hkin_pmiss_x 'HMS p_{miss,x} (coincut_ep); p_{miss,x} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_x 800 -2 2 coincut_ep +TH1F hkin_pmiss_y 'HMS p_{miss,y} (coincut_ep); p_{miss,y} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_y 800 -2 2 coincut_ep +TH1F hkin_pmiss_z 'HMS p_{miss,z} (coincut_ep); p_{miss,z} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_z 800 -2 2 coincut_ep +TH1F hkin_pmiss_par 'HMS p_{miss,par} (coincut_ep); p_{miss,par} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_z 800 -2 2 coincut_ep +TH1F hkin_pmiss_perp 'HMS p_{miss,perp} (coincut_ep); p_{miss,perp} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_perp 800 -2 2 coincut_ep +TH1F hkin_pmiss_oop 'HMS p_{miss,oop} (coincut_ep); p_{miss,oop} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_y 800 -2 2 coincut_ep + +TH1F hkin_pmiss_nuc 'HMS p_{miss,nuc} (ccleantrack); p_{miss} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_nuc 800 -2 2 ccleantrack +TH1F hkin_pmiss_nuc_coincut 'HMS p_{miss,nuc} (coincut); p_{miss} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_nuc 800 -2 2 coincut +TH1F hkin_pmiss_nuc_pid 'HMS p_{miss,nuc} (coincut_ep); p_{miss} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_nuc 800 -2 2 coincut_ep +TH1F hkin_pmiss_nuc_x 'HMS p_{miss,nuc,x} (coincut_ep); p_{miss,x} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_nuc_x 800 -2 2 coincut_ep +TH1F hkin_pmiss_nuc_y 'HMS p_{miss,nuc,y} (coincut_ep); p_{miss,y} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_nuc_y 800 -2 2 coincut_ep +TH1F hkin_pmiss_nuc_z 'HMS p_{miss,nuc,z} (coincut_ep); p_{miss,z} (GeV); Count / 0.005 GeV;' H.kin.secondary.pmiss_nuc_z 800 -2 2 coincut_ep + +############################ +# MISSING ENERGY +############################ +TH1F hkin_Emiss 'HMS E_{miss} (ccleantrack); E_{miss} (GeV); Count / 0.005 GeV;' H.kin.secondary.emiss 400 -1 1 ccleantrack +TH1F hkin_Emiss_coincut 'HMS E_{miss} (coincut); E_{miss} (GeV); Count / 0.005 GeV;' H.kin.secondary.emiss 400 -1 1 coincut +TH1F hkin_Emiss_pid 'HMS E_{miss} (coincut_ep); E_{miss} (GeV); Count / 0.005 GeV;' H.kin.secondary.emiss 400 -1 1 coincut_ep + + +############################ +# KINEMATICS +############################ +TH1F pkin_Q2 'SHMS Q^{2}; Q^{2} (GeV); Count / 0.005 GeV;' P.kin.primary.Q2 2000 0 10 ccleantrack +TH1F pkin_W2 'SHMS W^{2}; W^{2} (GeV); Count / 0.005 GeV;' P.kin.primary.W2 2000 0 10 ccleantrack diff --git a/DEF-files/COIN/PRODUCTION/TRIG/coin_trig_histos.def b/DEF-files/COIN/PRODUCTION/TRIG/coin_trig_histos.def new file mode 100644 index 0000000000000000000000000000000000000000..efeae805666e3c508cb0a6fc8051c7293b2d8016 --- /dev/null +++ b/DEF-files/COIN/PRODUCTION/TRIG/coin_trig_histos.def @@ -0,0 +1,37 @@ +############################ +# BETA VS COINTIME +############################ +TH2F hgtr_beta_vs_ptrig_cointime 'HMS Beta vs pTRIG1_ROC2-pTRIG4_ROC2; cointime / 1 ns; HMS Beta / 0.01;' T.coin.pTRIG1_ROC2_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC2_tdcTimeRaw*0.1 H.gtr.beta 1600 -800 800 400 -2 2 ccleantrack +TH2F hgtr_beta_vs_htrig_cointime 'HMS Beta vs pTRIG1_ROC1-pTRIG4_ROC1; cointime / 1 ns; HMS Beta / 0.01;' T.coin.pTRIG1_ROC1_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC1_tdcTimeRaw*0.1 H.gtr.beta 1600 -800 800 400 -2 2 ccleantrack +TH2F pgtr_beta_vs_ptrig_cointime 'SHMS Beta vs pTRIG1_ROC2-pTRIG4_ROC2; cointime / 1 ns; SHMS Beta / 0.01;' T.coin.pTRIG1_ROC2_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC2_tdcTimeRaw*0.1 P.gtr.beta 1600 -800 800 400 -2 2 ccleantrack +TH2F pgtr_beta_vs_htrig_cointime 'SHMS Beta vs pTRIG1_ROC1-pTRIG4_ROC1; cointime / 1 ns; SHMS Beta / 0.01;' T.coin.pTRIG1_ROC1_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC1_tdcTimeRaw*0.1 P.gtr.beta 1600 -800 800 400 -2 2 ccleantrack + + +############################ +# COINTIME +############################ +TH1F ptrig_cointime_ccleantrack 'SHMS cointime (ccleantrack); SHMS cointime (ns); Count / 1 ns;' T.coin.pTRIG1_ROC2_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC2_tdcTimeRaw*0.1 1600 -800 800 ccleantrack +TH1F ptrig_cointime_coincut 'SHMS cointime (coincut); SHMS cointime (ns); Count / 1 ns;' T.coin.pTRIG1_ROC2_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC2_tdcTimeRaw*0.1 1600 -800 800 coincut +TH1F ptrig_cointime_coincut_ep 'SHMS cointime (coincut_ep); SHMS cointime (ns); Count / 1 ns;' T.coin.pTRIG1_ROC2_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC2_tdcTimeRaw*0.1 1600 -800 800 coincut_ep +TH1F htrig_cointime_ccleantrack 'HMS cointime (ccleantrack); HMS cointime (ns); Count / 1 ns;' T.coin.pTRIG1_ROC1_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC1_tdcTimeRaw*0.1 1600 -800 800 ccleantrack +TH1F htrig_cointime_coincut 'HMS cointime (coincut); HMS cointime (ns); Count / 1 ns;' T.coin.pTRIG1_ROC1_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC1_tdcTimeRaw*0.1 1600 -800 800 coincut +TH1F htrig_cointime_coincut_ep 'HMS cointime (coincut_ep); HMS cointime (ns); Count / 1 ns;' T.coin.pTRIG1_ROC1_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC1_tdcTimeRaw*0.1 1600 -800 800 coincut_ep + + +############################ +# PATH CORR +############################ +TH1F h_pathcorr 'HMS pathcorr; HMS pathcorr (ns); Count / 1 ns;' T.coin.pTRIG4_ROC2_tdcTimeRaw*0.1 1600 -800 800 hcleantrack +TH1F p_pathcorr 'SHMS pathcorr; SHMS pathcorr (ns); Count / 1 ns;' T.coin.pTRIG1_ROC2_tdcTimeRaw*0.1 1600 -800 800 pcleantrack +TH1F c_pathcorr 'Cointime pathcorr; Cointime pathcorr (ns); Count / 1 ns;' T.coin.pTRIG1_ROC2_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC2_tdcTimeRaw*0.1 1600 -800 800 coincut + + +############################ +# TRIGGER TIME +############################ +TH1F h_htrig_tdc 'pTRIG4_ROC1' T.coin.hTRIG1_ROC1_tdcTimeRaw*0.1 1600 -800 800 +TH1F h_ptrig_tdc 'pTRIG4_ROC1' T.coin.pTRIG1_ROC1_tdcTimeRaw*0.1 1600 -800 800 +TH1F p_ptrig_tdc 'pTRIG1_ROC2' T.coin.pTRIG1_ROC2_tdcTimeRaw*0.1 1600 -800 800 +TH1F p_htrig_tdc 'pTRIG1_ROC2' T.coin.hTRIG1_ROC2_tdcTimeRaw*0.1 1600 -800 800&&shms_trigs +TH1F h_ctrig_tdc 'pTRIG1_ROC1-pTRIG4_ROC1' T.coin.pTRIG1_ROC1_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC1_tdcTimeRaw 1600 -800 800 +TH1F p_ctrig_tdc 'pTRIG1_ROC2-pTRIG4_ROC2' T.coin.pTRIG1_ROC2_tdcTimeRaw*0.1-T.coin.pTRIG4_ROC2_tdcTimeRaw 1600 -800 800 diff --git a/DEF-files/COIN/PRODUCTION/coin_production.def b/DEF-files/COIN/PRODUCTION/coin_hElec_pProt_production.def similarity index 64% rename from DEF-files/COIN/PRODUCTION/coin_production.def rename to DEF-files/COIN/PRODUCTION/coin_hElec_pProt_production.def index 91336abaace8627ee834ad32a1bbdb040c800b05..9f84861ed639be4069271a7ced686bf961c64121 100644 --- a/DEF-files/COIN/PRODUCTION/coin_production.def +++ b/DEF-files/COIN/PRODUCTION/coin_hElec_pProt_production.def @@ -30,4 +30,8 @@ ibcm2 iunser itov3out itov4out -end epics \ No newline at end of file +end epics + +#include "DEF-files/COIN/PRODUCTION/GTR/coin_gtr_histos.def" +#include "DEF-files/COIN/PRODUCTION/KIN/coin_hElec_pProt_kin_histos.def" +#include "DEF-files/COIN/PRODUCTION/TRIG/coin_trig_histos.def" diff --git a/DEF-files/COIN/PRODUCTION/coin_hElec_pProt_production_cuts.def b/DEF-files/COIN/PRODUCTION/coin_hElec_pProt_production_cuts.def new file mode 100644 index 0000000000000000000000000000000000000000..cdb1703fdb4d7eb2e2b02ae0c767d4f55aa390ca --- /dev/null +++ b/DEF-files/COIN/PRODUCTION/coin_hElec_pProt_production_cuts.def @@ -0,0 +1,50 @@ +#include "DEF-files/HMS/PRODUCTION/hstackana_production_cuts.def" +#include "DEF-files/SHMS/PRODUCTION/pstackana_production_cuts.def" + +Block: RawDecode + +Pedestal_event g.evtyp == 99 +SHMS_event g.evtyp == 1 +HMS_event g.evtyp == 2 +BOTH_SINGLES_event g.evtyp == 3 +COIN_ONLY_event g.evtyp == 4 +SHMS_COIN_event g.evtyp == 5 +HMS_COIN_event g.evtyp == 6 +COIN_ALL_event g.evtyp == 7 +ALL_events SHMS_event || HMS_event || BOTH_SINGLES_event || COIN_ONLY_event || COIN_ALL_event + +RawDecode_master ALL_events + +Block: Decode + +goodctime ALL_events #LOOSE CUT AROUND COINTIME PEAK (3 beam buckets) +tightctime ALL_events #TIGHT CUT AROUND COINTIME PEAK (1 beam buckets) +ranctime ALL_events #CUT AWAY FROM COINTIME PEAK (4 beam buckets) + +Decode_master ALL_events + +Block: CoarseTracking +CoarseTracking_master ALL_events + +Block: CoarseReconstruct +CoarseReconstruct_master ALL_events + +Block: Tracking +Tracking_master ALL_events + +Block: Reconstruct +Reconstruct_master ALL_events + +hcleantrack H.gtr.index > -1 +pcleantrack P.gtr.index > -1 +ccleantrack hcleantrack && pcleantrack + +coincut ccleantrack && goodctime +tight_coin ccleantrack && tightctime +ran_coincut ccleantrack && ranctime + +e_cut_cal H.cal.etottracknorm > 0.6 && H.cal.etottracknorm < 2.0 +e_cut_cer H.cer.npeSum > 0.5 +select_e_cut e_cut_cal && e_cut_cer +betacut_proton P.gtr.beta > 0.6 && P.gtr.beta < 0.8 +coincut_ep ccleantrack && select_e_cut && betacut_proton diff --git a/DEF-files/COIN/PRODUCTION/coin_production_cuts.def b/DEF-files/COIN/PRODUCTION/coin_production_cuts.def deleted file mode 100644 index 29498e9b6ba3aa6e9d3de6cc76888b42907ec87e..0000000000000000000000000000000000000000 --- a/DEF-files/COIN/PRODUCTION/coin_production_cuts.def +++ /dev/null @@ -1,29 +0,0 @@ -Block: RawDecode - -Pedestal_event g.evtyp == 99 -SHMS_event g.evtyp == 1 -HMS_event g.evtyp == 2 -BOTH_SINGLES_event g.evtyp == 3 -COIN_ONLY_event g.evtyp == 4 -SHMS_COIN_event g.evtyp == 5 -HMS_COIN_event g.evtyp == 6 -COIN_ALL_event g.evtyp == 7 -ALL_events SHMS_event || HMS_event || BOTH_SINGLES_event || COIN_ONLY_event || COIN_ALL_event - -RawDecode_master ALL_events - -Block: Decode - -Decode_master ALL_events - -Block: CoarseTracking -CoarseTracking_master ALL_events - -Block: CoarseReconstruct -CoarseReconstruct_master ALL_events - -Block: Tracking -Tracking_master ALL_events - -Block: Reconstruct -Reconstruct_master ALL_events \ No newline at end of file diff --git a/DEF-files/COIN/PRODUCTION/coin_production_pElec_hProt.def b/DEF-files/COIN/PRODUCTION/coin_production_pElec_hProt.def new file mode 100644 index 0000000000000000000000000000000000000000..695e459799173f832bf15c078861d928b546b03a --- /dev/null +++ b/DEF-files/COIN/PRODUCTION/coin_production_pElec_hProt.def @@ -0,0 +1,37 @@ +block T.coin.* + +block H.cer.* +block H.dc.* +block H.tr.* +block H.hod.* +block H.cal.* +block H.gtr.* +block H.kin.* +block H.rb.* +block H.react.* + +block P.ngcer.* +block P.dc.* +block P.tr.* +block P.hod.* +block P.hgcer.* +block P.aero.* +block P.cal.* +block P.gtr.* +block P.kin.* +block P.rb.* +block P.react.* + +begin epics +IBC3H00CRCUR4 +hac_bcm_average +ibcm1 +ibcm2 +iunser +itov3out +itov4out +end epics + +#include "DEF-files/COIN/PRODUCTION/GTR/coin_gtr_histos.def" +#include "DEF-files/COIN/PRODUCTION/KIN/coin_pElec_hProt_kin_histos.def" +#include "DEF-files/COIN/PRODUCTION/TRIG/coin_trig_histos.def" diff --git a/DEF-files/COIN/PRODUCTION/coin_production_pElec_hProt_cuts.def b/DEF-files/COIN/PRODUCTION/coin_production_pElec_hProt_cuts.def new file mode 100644 index 0000000000000000000000000000000000000000..099b70e3a00c966cbd563461ba091d2a7f892b74 --- /dev/null +++ b/DEF-files/COIN/PRODUCTION/coin_production_pElec_hProt_cuts.def @@ -0,0 +1,50 @@ +#include "DEF-files/HMS/PRODUCTION/hstackana_production_cuts.def" +#include "DEF-files/SHMS/PRODUCTION/pstackana_production_cuts.def" + +Block: RawDecode + +Pedestal_event g.evtyp == 99 +SHMS_event g.evtyp == 1 +HMS_event g.evtyp == 2 +BOTH_SINGLES_event g.evtyp == 3 +COIN_ONLY_event g.evtyp == 4 +SHMS_COIN_event g.evtyp == 5 +HMS_COIN_event g.evtyp == 6 +COIN_ALL_event g.evtyp == 7 +ALL_events SHMS_event || HMS_event || BOTH_SINGLES_event || COIN_ONLY_event || COIN_ALL_event + +RawDecode_master ALL_events + +Block: Decode + +goodctime ALL_events #LOOSE CUT AROUND COINTIME PEAK (3 beam buckets) +tightctime ALL_events #TIGHT CUT AROUND COINTIME PEAK (1 beam buckets) +ranctime ALL_events #CUT AWAY FROM COINTIME PEAK (4 beam buckets) + +Decode_master ALL_events + +Block: CoarseTracking +CoarseTracking_master ALL_events + +Block: CoarseReconstruct +CoarseReconstruct_master ALL_events + +Block: Tracking +Tracking_master ALL_events + +Block: Reconstruct +Reconstruct_master ALL_events + +hcleantrack H.gtr.index > -1 +pcleantrack P.gtr.index > -1 +ccleantrack hcleantrack && pcleantrack + +coincut ccleantrack && goodctime +tight_coin ccleantrack && tightctime +ran_coincut ccleantrack && ranctime + +e_cut_cal P.cal.etottracknorm > 0.6 && P.cal.etottracknorm < 2.0 +e_cut_cer P.hgcer.npeSum > 5.0 && P.ngcer.npeSum > 15.0 +select_e_cut e_cut_cal && e_cut_cer +betacut_proton H.gtr.beta > 0.6 && H.gtr.beta < 0.8 +coincut_ep ccleantrack && select_e_cut && betacut_proton diff --git a/SCRIPTS/COIN/PRODUCTION/replay_production_coin_hElec_pProt.C b/SCRIPTS/COIN/PRODUCTION/replay_production_coin_hElec_pProt.C new file mode 100644 index 0000000000000000000000000000000000000000..1351a7e36ef480c484a7aa0eadd237f889cef656 --- /dev/null +++ b/SCRIPTS/COIN/PRODUCTION/replay_production_coin_hElec_pProt.C @@ -0,0 +1,252 @@ +void replay_production_coin_hElec_pProt (Int_t RunNumber = 0, Int_t MaxEvent = 0) { + + // Get RunNumber and MaxEvent if not provided. + if(RunNumber == 0) { + cout << "Enter a Run Number (-1 to exit): "; + cin >> RunNumber; + if( RunNumber<=0 ) return; + } + if(MaxEvent == 0) { + cout << "\nNumber of Events to analyze: "; + cin >> MaxEvent; + if(MaxEvent == 0) { + cerr << "...Invalid entry\n"; + exit; + } + } + + // Create file name patterns. + const char* RunFileNamePattern = "coin_all_%05d.dat"; + vector<TString> pathList; + pathList.push_back("."); + pathList.push_back("./raw"); + pathList.push_back("./raw/../raw.copiedtotape"); + pathList.push_back("./cache"); + + //const char* RunFileNamePattern = "raw/coin_all_%05d.dat"; + const char* ROOTFileNamePattern = "ROOTfiles/coin_replay_production_%d_%d.root"; + + // Load global parameters + // Add variables to global list. + gHcParms->Define("gen_run_number", "Run Number", RunNumber); + gHcParms->AddString("g_ctp_database_filename", "DBASE/COIN/STD/standard.database"); + // Load varibles from files to global list. + gHcParms->Load(gHcParms->GetString("g_ctp_database_filename"), RunNumber); + // g_ctp_parm_filename and g_decode_map_filename should now be defined. + gHcParms->Load(gHcParms->GetString("g_ctp_kinematics_filename"), RunNumber); + gHcParms->Load(gHcParms->GetString("g_ctp_parm_filename")); + gHcParms->Load(gHcParms->GetString("g_ctp_calib_filename")); + // Load params for SHMS trigger configuration + gHcParms->Load("PARAM/TRIG/tcoin.param"); + // Load the Hall C detector map + gHcDetectorMap = new THcDetectorMap(); + gHcDetectorMap->Load("MAPS/COIN/DETEC/coin.map"); + gHcParms->Load("PARAM/SHMS/GEN/p_fadc_debug.param"); + gHcParms->Load("PARAM/HMS/GEN/h_fadc_debug.param"); + + //=:=:=:= + // SHMS + //=:=:=:= + + // Set up the equipment to be analyzed. + THcHallCSpectrometer* SHMS = new THcHallCSpectrometer("P", "SHMS"); + SHMS->SetEvtType(1); + SHMS->AddEvtType(4); + SHMS->AddEvtType(5); + SHMS->AddEvtType(6); + SHMS->AddEvtType(7); + gHaApps->Add(SHMS); + // Add Noble Gas Cherenkov to SHMS apparatus + THcCherenkov* pngcer = new THcCherenkov("ngcer", "Noble Gas Cherenkov"); + SHMS->AddDetector(pngcer); + // Add drift chambers to SHMS apparatus + THcDC* pdc = new THcDC("dc", "Drift Chambers"); + SHMS->AddDetector(pdc); + // Add hodoscope to SHMS apparatus + THcHodoscope* phod = new THcHodoscope("hod", "Hodoscope"); + SHMS->AddDetector(phod); + // Add Heavy Gas Cherenkov to SHMS apparatus + THcCherenkov* phgcer = new THcCherenkov("hgcer", "Heavy Gas Cherenkov"); + SHMS->AddDetector(phgcer); + // Add Aerogel Cherenkov to SHMS apparatus + THcAerogel* paero = new THcAerogel("aero", "Aerogel"); + SHMS->AddDetector(paero); + // Add calorimeter to SHMS apparatus + THcShower* pcal = new THcShower("cal", "Calorimeter"); + SHMS->AddDetector(pcal); + + // Include golden track information + THaGoldenTrack* pgtr = new THaGoldenTrack("P.gtr", "SHMS Golden Track", "P"); + gHaPhysics->Add(pgtr); + // Add Rastered Beam Apparatus + THaApparatus* pbeam = new THcRasteredBeam("P.rb", "SHMS Rastered Beamline"); + gHaApps->Add(pbeam); + THaReactionPoint* prp= new THaReactionPoint("P.react"," SHMS reaction point","P","P.rb"); + gHaPhysics->Add(prp); + THcExtTarCor* pext = new THcExtTarCor("P.extcor"," HMS extended target corrections","P","P.react"); + gHaPhysics->Add(pext); + // Add hodoscope efficiency + THcHodoEff* peff = new THcHodoEff("phodeff"," SHMS hodo efficiency","P.hod"); + gHaPhysics->Add(peff); + + // Add event handler for scaler events + THcScalerEvtHandler* pscaler = new THcScalerEvtHandler("P", "Hall C scaler event type 1"); + pscaler->AddEvtType(1); + pscaler->AddEvtType(4); + pscaler->AddEvtType(5); + pscaler->AddEvtType(6); + pscaler->AddEvtType(7); + pscaler->AddEvtType(129); + pscaler->SetDelayedType(129); + pscaler->SetUseFirstEvent(kTRUE); + gHaEvtHandlers->Add(pscaler); + + //=:=:= + // HMS + //=:=:= + + // Set up the equipment to be analyzed. + THcHallCSpectrometer* HMS = new THcHallCSpectrometer("H", "HMS"); + HMS->SetEvtType(2); + HMS->AddEvtType(4); + HMS->AddEvtType(5); + HMS->AddEvtType(6); + HMS->AddEvtType(7); + gHaApps->Add(HMS); + // Add drift chambers to HMS apparatus + THcDC* hdc = new THcDC("dc", "Drift Chambers"); + HMS->AddDetector(hdc); + // Add hodoscope to HMS apparatus + THcHodoscope* hhod = new THcHodoscope("hod", "Hodoscope"); + HMS->AddDetector(hhod); + // Add Cherenkov to HMS apparatus + THcCherenkov* hcer = new THcCherenkov("cer", "Heavy Gas Cherenkov"); + HMS->AddDetector(hcer); + // Add Aerogel Cherenkov to HMS apparatus + //THcAerogel* aero = new THcAerogel("aero", "Aerogel"); + //HMS->AddDetector(aero); + // Add calorimeter to HMS apparatus + THcShower* hcal = new THcShower("cal", "Calorimeter"); + HMS->AddDetector(hcal); + + // Include golden track information + THaGoldenTrack* hgtr = new THaGoldenTrack("H.gtr", "HMS Golden Track", "H"); + gHaPhysics->Add(hgtr); + // Add Rastered Beam Apparatus + THaApparatus* hbeam = new THcRasteredBeam("H.rb", "HMS Rastered Beamline"); + gHaApps->Add(hbeam); + THaReactionPoint* hrp= new THaReactionPoint("H.react"," HMS reaction point","H","H.rb"); + gHaPhysics->Add(hrp); + THcExtTarCor* hext = new THcExtTarCor("H.extcor"," HMS extended target corrections","H","H.react"); + gHaPhysics->Add(hext); + // Add hodoscope efficiency + THcHodoEff* heff = new THcHodoEff("hhodeff"," HMS hodo efficiency","H.hod"); + gHaPhysics->Add(heff); + // Add event handler for scaler events + THcScalerEvtHandler *hscaler = new THcScalerEvtHandler("H", "Hall C scaler event type 4"); + hscaler->AddEvtType(2); + hscaler->AddEvtType(4); + pscaler->AddEvtType(5); + pscaler->AddEvtType(6); + pscaler->AddEvtType(7); + hscaler->AddEvtType(129); + hscaler->SetDelayedType(129); + hscaler->SetUseFirstEvent(kTRUE); + gHaEvtHandlers->Add(hscaler); + + //=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= + // Kinematics Modules + //=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= + + // --------------------------------- + // electrons in SHMS, protons in HMS + // --------------------------------- + // Add Physics Module to calculate primary (scattered) beam kinematics + // THcPrimaryKine* pkin_primary = new THcPrimaryKine("P.kin.primary", "SHMS Single Arm Kinematics", "P", "P.rb"); + // gHaPhysics->Add(pkin_primary); + // Add Physics Module to calculate secondary (scattered) beam kinematics + // THcSecondaryKine* hkin_secondary = new THcSecondaryKine("H.kin.secondary", "HMS Single Arm Kinematics", "H", "P.kin.primary"); + // gHaPhysics->Add(hkin_secondary); + + // --------------------------------- + // electrons in HMS, protons in SHMS + // --------------------------------- + // Add Physics Module to calculate primary (scattered) beam kinematics + THcPrimaryKine* hkin_primary = new THcPrimaryKine("H.kin.primary", "HMS Single Arm Kinematics", "H", "H.rb"); + gHaPhysics->Add(hkin_primary); + // Add Physics Module to calculate secondary (scattered) beam kinematics + THcSecondaryKine* pkin_secondary = new THcSecondaryKine("P.kin.secondary", "SHMS Single Arm Kinematics", "P", "H.kin.primary"); + gHaPhysics->Add(pkin_secondary); + + //=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= + // Global Objects & Event Handlers + //=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= + + // Add trigger apparatus + THaApparatus* TRG = new THcTrigApp("T", "TRG"); + gHaApps->Add(TRG); + // Add trigger detector to trigger apparatus + THcTrigDet* coin = new THcTrigDet("coin", "Coincidence Trigger Information"); + // Suppress missing reference time warnings for these event types + coin->SetEvtType(1); + coin->AddEvtType(2); + TRG->AddDetector(coin); + // Add event handler for prestart event 125. + THcConfigEvtHandler* ev125 = new THcConfigEvtHandler("HC", "Config Event type 125"); + gHaEvtHandlers->Add(ev125); + // Add event handler for EPICS events + THaEpicsEvtHandler* hcepics = new THaEpicsEvtHandler("epics", "HC EPICS event type 180"); + gHaEvtHandlers->Add(hcepics); + + // Set up the analyzer - we use the standard one, + // but this could be an experiment-specific one as well. + // The Analyzer controls the reading of the data, executes + // tests/cuts, loops over Acpparatus's and PhysicsModules, + // and executes the output routines. + THcAnalyzer* analyzer = new THcAnalyzer; + + // A simple event class to be output to the resulting tree. + // Creating your own descendant of THaEvent is one way of + // defining and controlling the output. + THaEvent* event = new THaEvent; + + // Define the run(s) that we want to analyze. + // We just set up one, but this could be many. + THcRun* run = new THcRun( pathList, Form(RunFileNamePattern, RunNumber) ); + + // Set to read in Hall C run database parameters + run->SetRunParamClass("THcRunParameters"); + + // Eventually need to learn to skip over, or properly analyze + // the pedestal events + run->SetEventRange(1, MaxEvent); // Physics Event number, does not + // include scaler or control events. + run->SetNscan(1); + run->SetDataRequired(0x7); + run->Print(); + + // Define the analysis parameters + TString ROOTFileName = Form(ROOTFileNamePattern, RunNumber, MaxEvent); + analyzer->SetCountMode(2); // 0 = counter is # of physics triggers + // 1 = counter is # of all decode reads + // 2 = counter is event number + analyzer->SetEvent(event); + // Set EPICS event type + analyzer->SetEpicsEvtType(180); + // Define crate map + analyzer->SetCrateMapFileName("MAPS/db_cratemap.dat"); + // Define output ROOT file + analyzer->SetOutFile(ROOTFileName.Data()); + // Define DEF-file+ + analyzer->SetOdefFile("DEF-files/COIN/PRODUCTION/coin_hElec_pProt_production.def"); + // Define cuts file + analyzer->SetCutFile("DEF-files/COIN/PRODUCTION/coin_hElec_pProt_production_cuts.def"); // optional + // File to record accounting information for cuts + analyzer->SetSummaryFile(Form("REPORT_OUTPUT/COIN/PRODUCTION/summary_production_%d_%d.report", RunNumber, MaxEvent)); // optional + // Start the actual analysis. + analyzer->Process(run); + // Create report file from template + analyzer->PrintReport("TEMPLATES/COIN/PRODUCTION/coin_production.template", + Form("REPORT_OUTPUT/COIN/PRODUCTION/replay_coin_production_%d_%d.report", RunNumber, MaxEvent)); // optional + +} diff --git a/SCRIPTS/COIN/PRODUCTION/replay_production_coin.C b/SCRIPTS/COIN/PRODUCTION/replay_production_coin_pElec_hProt.C similarity index 93% rename from SCRIPTS/COIN/PRODUCTION/replay_production_coin.C rename to SCRIPTS/COIN/PRODUCTION/replay_production_coin_pElec_hProt.C index 81625e34cb7c62d70d2e762f4516051214edc384..11f8a8433f05b2455532e405e7a0c66be50f0173 100644 --- a/SCRIPTS/COIN/PRODUCTION/replay_production_coin.C +++ b/SCRIPTS/COIN/PRODUCTION/replay_production_coin_pElec_hProt.C @@ -1,4 +1,4 @@ -void replay_production_coin (Int_t RunNumber = 0, Int_t MaxEvent = 0) { +void replay_production_coin_pElec_hProt (Int_t RunNumber = 0, Int_t MaxEvent = 0) { // Get RunNumber and MaxEvent if not provided. if(RunNumber == 0) { @@ -85,14 +85,10 @@ void replay_production_coin (Int_t RunNumber = 0, Int_t MaxEvent = 0) { gHaPhysics->Add(prp); THcExtTarCor* pext = new THcExtTarCor("P.extcor"," HMS extended target corrections","P","P.react"); gHaPhysics->Add(pext); - // Add Physics Module to calculate primary (scattered) beam kinematics - THcPrimaryKine* pkin_primary = new THcPrimaryKine("P.kin.primary", "SHMS Single Arm Kinematics", "P", "P.rb"); - gHaPhysics->Add(pkin_primary); - THcHodoEff* peff = new THcHodoEff("phodeff"," SHMS hodo efficiency","P.hod"); + // Add hodoscope efficiency + THcHodoEff* peff = new THcHodoEff("phodeff"," SHMS hodo efficiency","P.hod"); gHaPhysics->Add(peff); - // Add Physics Module to calculate secondary (scattered) beam kinematics - // THcSecondaryKine* pkin_secondary = new THcSecondaryKine("P.kin.secondary", "SHMS Single Arm Kinematics", "P", "H.kin.primary"); - // gHaPhysics->Add(pkin_secondary); + // Add event handler for scaler events THcScalerEvtHandler* pscaler = new THcScalerEvtHandler("P", "Hall C scaler event type 1"); pscaler->AddEvtType(1); @@ -143,12 +139,7 @@ void replay_production_coin (Int_t RunNumber = 0, Int_t MaxEvent = 0) { gHaPhysics->Add(hrp); THcExtTarCor* hext = new THcExtTarCor("H.extcor"," HMS extended target corrections","H","H.react"); gHaPhysics->Add(hext); - // Add Physics Module to calculate primary (scattered) beam kinematics - // THcPrimaryKine* hkin_primary = new THcPrimaryKine("H.kin.primary", "HMS Single Arm Kinematics", "H", "H.rb"); - // gHaPhysics->Add(hkin_primary); - // Add Physics Module to calculate secondary (scattered) beam kinematics - THcSecondaryKine* hkin_secondary = new THcSecondaryKine("H.kin.secondary", "HMS Single Arm Kinematics", "H", "P.kin.primary"); - gHaPhysics->Add(hkin_secondary); + // Add hodoscope efficiency THcHodoEff* heff = new THcHodoEff("hhodeff"," HMS hodo efficiency","H.hod"); gHaPhysics->Add(heff); // Add event handler for scaler events @@ -163,6 +154,30 @@ void replay_production_coin (Int_t RunNumber = 0, Int_t MaxEvent = 0) { hscaler->SetUseFirstEvent(kTRUE); gHaEvtHandlers->Add(hscaler); + //=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= + // Kinematics Modules + //=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= + + // --------------------------------- + // electrons in SHMS, protons in HMS + // --------------------------------- + // Add Physics Module to calculate primary (scattered) beam kinematics + THcPrimaryKine* pkin_primary = new THcPrimaryKine("P.kin.primary", "SHMS Single Arm Kinematics", "P", "P.rb"); + gHaPhysics->Add(pkin_primary); + // Add Physics Module to calculate secondary (scattered) beam kinematics + THcSecondaryKine* hkin_secondary = new THcSecondaryKine("H.kin.secondary", "HMS Single Arm Kinematics", "H", "P.kin.primary"); + gHaPhysics->Add(hkin_secondary); + + // --------------------------------- + // electrons in HMS, protons in SHMS + // --------------------------------- + // Add Physics Module to calculate primary (scattered) beam kinematics + // THcPrimaryKine* hkin_primary = new THcPrimaryKine("H.kin.primary", "HMS Single Arm Kinematics", "H", "H.rb"); + // gHaPhysics->Add(hkin_primary); + // Add Physics Module to calculate secondary (scattered) beam kinematics + // THcSecondaryKine* pkin_secondary = new THcSecondaryKine("P.kin.secondary", "SHMS Single Arm Kinematics", "P", "H.kin.primary"); + // gHaPhysics->Add(pkin_secondary); + //=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= // Global Objects & Event Handlers //=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= @@ -223,9 +238,9 @@ void replay_production_coin (Int_t RunNumber = 0, Int_t MaxEvent = 0) { // Define output ROOT file analyzer->SetOutFile(ROOTFileName.Data()); // Define DEF-file+ - analyzer->SetOdefFile("DEF-files/COIN/PRODUCTION/coin_production.def"); + analyzer->SetOdefFile("DEF-files/COIN/PRODUCTION/coin_production_pElec_hProt.def"); // Define cuts file - analyzer->SetCutFile("DEF-files/COIN/PRODUCTION/coin_production_cuts.def"); // optional + analyzer->SetCutFile("DEF-files/COIN/PRODUCTION/coin_production_pElec_hProt_cuts.def"); // optional // File to record accounting information for cuts analyzer->SetSummaryFile(Form("REPORT_OUTPUT/COIN/PRODUCTION/summary_production_%d_%d.report", RunNumber, MaxEvent)); // optional // Start the actual analysis. diff --git a/onlineGUI/CONFIG/COIN/PRODUCTION/coin_production.cfg b/onlineGUI/CONFIG/COIN/PRODUCTION/coin_production.cfg new file mode 100644 index 0000000000000000000000000000000000000000..dc6672762ec01558cd608655dc84934d2db2ac3e --- /dev/null +++ b/onlineGUI/CONFIG/COIN/PRODUCTION/coin_production.cfg @@ -0,0 +1,67 @@ +protorootfile ../ROOTfiles/coin_replay_production_XXXXX_latest.root +guicolor orange +canvassize 1000 800 + +newpage 2 2 +title Beta vs Cointime +hgtr_beta_vs_ptrig_cointime +hgtr_beta_vs_htrig_cointime +pgtr_beta_vs_ptrig_cointime +pgtr_beta_vs_htrig_cointime + +newpage 3 3 +title Cointime +ptrig_cointime_ccleantrack +ptrig_cointime_coincut +ptrig_cointime_coincut_ep +htrig_cointime_ccleantrack +htrig_cointime_coincut +htrig_cointime_coincut_ep +h_pathcorr +p_pathcorr +c_pathcorr + +newpage 2 3 +title Trigger Times +h_htrig_tdc +h_ptrig_tdc +p_ptrig_tdc +p_htrig_tdc +h_ctrig_tdc +p_ctrig_tdc + +newpage 2 1 +title Target Variables +hgtrz_vs_pgtrz +hgtry_vs_pgtry + +newpage 3 2 +title Missing Mass +hkin_mmiss +hkin_mmiss_coincut +hkin_mmiss_coincut_ep +hkin_mmiss_tightcut +hkin_mmiss_ran_coincut + +newpage 3 3 +title Missing Momentum +hkin_pmiss +hkin_pmiss_coincut +hkin_pmiss_pid +hkin_pmiss_x +hkin_pmiss_y +hkin_pmiss_z +hkin_pmiss_par +hkin_pmiss_perp +hkin_pmiss_oop + +newpage 3 1 +title Missing Energy +hkin_Emiss +hkin_Emiss_coincut +hkin_Emiss_pid + +newpage 2 1 +title Kinematics +pkin_Q2 +pkin_W2