# Analyzer output definition file used by THaOutput class. # See http://hallaweb.jlab.org/root/THaOutput.html # R. Michaels, June 2003 # Comments start with '# ' (careful, need a space after #) # # There are at present 3 places where output is defined # in the C++ analyzer, and this is one of them. # The other two are THaRun (run-dependent info) and # THaEvent (event-dependent info), which provide quantities # like run number and event number that you always need. # In this place, the "outdef" file, one can define # global variables, formulas, and histograms, as well # as cuts on histograms. The results of the formulas appear # in the tree with the formula-name given. # # Syntax of file -- by example: # # variable L.vdc.u2.nclust # variable R.s1.lt # formula targetX 1.464*BB.bpm4b.x-0.464*BB.bpm4a.x # TH1F rv1n 'R-arm vdc hits on V1' R.vdc.v1.nhit 100 0 10 # TH1F rv1w 'R-arm vdc wiremap on V1' R.vdc.v1.wire 100 0 500 # TH1F tgtx 'Target X position' targetX 100 -2 2 # TH2F t12 'Time stamps on roc1 vs roc2' D.timeroc1 D.timeroc2 # 100 0 1000 100 0 1000 # TH1F Rv1n 'R-arm VDC nhit (cut)' R.vdc.v1.nhit 100 0 10 R.vdc.v1.nhit>3 # (note, the cut R.vdc.v1.nhit appears optionally at the end, also # this variable cannot be a variable-sized array) # # # The lines are of the form # keyword rest-of-line # # where the keywords are as follows : # (the keywords are case-insensitive, the rest of the line is not) # # VARIABLE -- indicates that a global variable is to # be added to the tree. # The next string is the name of the variable. # You can see a list of variables by typing # gHaVars->Print() at the analyzer's root shell prompt. # A variable can also be an array, e.g. R.s1.lt # Then the values in the tree will be R.s1.lt.data[0], # R.s1.lt.data[1], etc, up to the array size which # is Ndata.R.s1.lt # # BLOCK -- An entire block of variables are written to the # output. E.g. "L.*" writes all Left HRS variables. # # FORMULA -- indicates a THaFormula to add to the output. # The next word will be the "name" of the formula result # in the tree. The 3rd string is the formula to evaluate. # Note, it cannot have spaces in it. # Formulas can be vectors if the arrays are fixed size. # # CUT -- Like a formula, but the data are 0 (false) or 1 (true) # # TH1F, TH2F, TH1D, TH2D -- defines histograms (1D or 2D). # The next word is the name of the object. # The following string (must be in single quotes) is # the title of the histogram. Next, the variables # or formulas names that are put into the histogram # are listed together with bin info: nbin, xlo, xhi and if 2D # the same bin info for y. Optional cuts can be specified # at the end of the line. See examples below. # # ------------------------------------ # List of the variable blocks to be written out block L.tr.* block L.s1.* block L.s2.* block L.prl1.* block L.prl2.* block L.cer.* block adchel.L.* block adchel2.L.* block ReactPt_L.* block ExTgtCor_L.* block DL.* block rb.* block urb.* block L.gold.* # Here are variables and formulas that appear in the tree. # Beam position and Raster FORMULA urbax 1000.*urb.BPMA.x FORMULA urbay 1000.*urb.BPMA.y FORMULA urbbx 1000.*urb.BPMB.x FORMULA urbby 1000.*urb.BPMB.y FORMULA urbx 1000.*urb.x FORMULA urby 1000.*urb.y FORMULA rawcurx 1000.*rb.Raster.rawcur.x FORMULA rawcury 1000.*rb.Raster.rawcur.y FORMULA urby 1000.*urb.y FORMULA urby 1000.*urb.y TH1F bpma_x 'BPMA x [mm]' urbax 4000 -7. 7. TH1F bpma_y 'BPMA y [mm]' urbay 4000 -7. 7. TH1F bpmb_x 'BPMB x [mm]' urbbx 4000 -7. 7. TH1F bpmb_y 'BPMB y [mm]' urbby 4000 -7. 7. TH1F beam_x 'x at target [mm]' urbx 4000 -7. 8. TH1F beam_y 'y at target [mm]' urby 4000 -7. 8. TH2F bpma_xy 'BPMA y vs x' urbax urbay 200 -7. 7. 200 -7. 7. TH2F bpmb_xy 'BPMB y vs y' urbbx urbby 200 -7. 7. 200 -7. 7. TH2F beam_xy 'beam at target y vs x' urbx urby 200 -7. 8. 200 -7. 8. # Added by Bob M. Fri Mar 23, 2007 TH2F rastxy 'Raster X vs Y (current)' rb.Raster.rawcur.y rb.Raster.rawcur.x 200 100 7000 200 100 7000 TH1F bpmaraw1 'BPMA Antenna 1' urb.BPMA.rawcur.1 2000 0 16500 TH1F bpmaraw2 'BPMA Antenna 2' urb.BPMA.rawcur.2 2000 0 16500 TH1F bpmaraw3 'BPMA Antenna 3' urb.BPMA.rawcur.3 2000 0 16500 TH1F bpmaraw4 'BPMA Antenna 4' urb.BPMA.rawcur.4 2000 0 16500 TH1F bpmbraw1 'BPMB Antenna 1' urb.BPMB.rawcur.1 2000 0 16500 TH1F bpmbraw2 'BPMB Antenna 2' urb.BPMB.rawcur.2 2000 0 16500 TH1F bpmbraw3 'BPMB Antenna 3' urb.BPMB.rawcur.3 2000 0 16500 TH1F bpmbraw4 'BPMB Antenna 4' urb.BPMB.rawcur.4 2000 0 16500 # TH1F rastraw1 'Raster Current 1' rb.Raster.rawcur.x 2000 0 16500 TH1F rastraw2 'Raster Current 2' rb.Raster.rawcur.y 2000 0 16500 TH1F adchel 'Helicity (ADC)' adchel.L.helicity 10 -2 2 TH1F g0hel 'Helicity (G0/TIR)' g0hel.L.helicity 10 -2 2 TH1F heldiff 'Helicity Diff (G0 - ADC)' (g0hel.L.helicity-adchel.L.helicity) 10 -2 2 # Target and Sieve formula L_sv_x ExTgtCor_L.x+ExTgtCor_L.th*1.16539 formula L_sv_y ExTgtCor_L.y+ExTgtCor_L.ph*1.16539 TH2F sieve 'Sieve Slit' L_sv_x L_sv_y 200 -0.1 0.1 200 -0.1 0.1 TH1F dp 'Deviation from Central Momentum' L.tr.tg_dp 200 -0.1 0.1 TH1F tgth 'Target Theta' L.tr.tg_th 200 -0.2 0.2 TH1F tgph 'Target Phi' L.tr.tg_ph 200 -0.2 0.2 TH1F tgy 'Target Y' L.tr.tg_y 200 -0.2 0.2 TH1F zreact3 'React Z' ReactPt_L.z 200 -0.4 0.4 DL.evtype==3 TH1F zreact5 'React Z' ReactPt_L.z 200 -0.4 0.4 DL.evtype==5 # ------------------------------------------------------------------ # LEFT ARM DETECTORS # ------------------------------------------------------------------ # Trigger TH1F HEvType 'Trigger type' DL.evtype 15 1 10 # LEFT ARM S1 and S2 ADC and TDC : TH1F Ls1lt 'Left arm S1 L-PMT TDCs' L.s1.lt 750 1001 2000 L.s1.lt>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls1rt 'Left arm S1 R-PMT TDCs' L.s1.rt 750 1001 2000 L.s1.rt>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls2lt 'Left arm S2 L-PMT TDCs' L.s2.lt 750 1000 2000 L.s2.lt>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls2rt 'Left arm S2 R-PMT TDCs' L.s2.rt 750 1000 2000 L.s2.rt>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls1la 'Left arm S1 L-PMT ADCs' L.s1.la 1000 1 4000 L.s1.la>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls1ra 'Left arm S1 R-PMT ADCs' L.s1.ra 1000 1 4000 L.s1.ra>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls2la 'Left arm S2 L-PMT ADCs' L.s2.la 1000 1 1000 L.s2.la>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls2ra 'Left arm S2 R-PMT ADCs' L.s2.ra 1000 1 1000 L.s2.ra>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls1la_p 'Left arm S1 L-PMT ADCs (PedSub)' L.s1.la_p 200 -200 3999 L.s1.la_p>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls1ra_p 'Left arm S1 R-PMT ADCs (PedSub)' L.s1.ra_p 200 -200 3999 L.s1.ra_p>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls2la_p 'Left arm S2 L-PMT ADCs (PedSub)' L.s2.la_p 200 -200 999 L.s2.la_p>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 TH1F Ls2ra_p 'Left arm S2 R-PMT ADCs (PedSub)' L.s2.ra_p 200 -200 999 L.s2.ra_p>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8)&&DL.edtpl==0 # ------------------------------------------------------------------ # LEFT ARM VDC wires and timing : #CUT leftOnly 1 TH1F Lvu1t 'L-arm VDC u1 time' L.vdc.u1.rawtime 200 401 2400 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly TH1F Lvu2t 'L-arm VDC u2 time' L.vdc.u2.rawtime 200 401 2400 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly TH1F Lvv1t 'L-arm VDC v1 time' L.vdc.v1.rawtime 200 401 2400 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly TH1F Lvv2t 'L-arm VDC v2 time' L.vdc.v2.rawtime 200 401 2400 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly TH1F Lvu1w 'L-arm VDC u1 wires' L.vdc.u1.wire 400 1 400 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly TH1F Lvu2w 'L-arm VDC u2 wires' L.vdc.u2.wire 400 1 400 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly TH1F Lvv1w 'L-arm VDC v1 wires' L.vdc.v1.wire 400 1 400 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly TH1F Lvv2w 'L-arm VDC v2 wires' L.vdc.v2.wire 400 1 400 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly #TH1F Lv1nhit 'L-arm VDC v1 hits' L.vdc.v1.nhit 20 1 20 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly #TH1F Lv2nhit 'L-arm VDC v2 hits' L.vdc.v2.nhit 20 1 20 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly #TH1F Lu1nhit 'L-arm VDC u1 hits' L.vdc.u1.nhit 20 1 20 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly #TH1F Lu2nhit 'L-arm VDC u2 hits' L.vdc.u2.nhit 20 1 20 (DL.evtype==3||DL.evtype==4||DL.evtype==8) #leftOnly # ------------------------------------------------------------------ # LEFT ARM GAS CHERENKOV ADC and TDC : TH1F Lcera 'L-arm Cerenkov ADCs' L.cer.a 250 1 4000 L.cer.a>10&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH1F Lcert 'L-arm Cerenkov TDCs' L.cer.t 250 0 2500 L.cer.t>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH1F Lcera_p 'L-arm Cerenkov ADCs (PedSub)' L.cer.a_p 250 -10 3999 L.cer.a_p>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH1F Lcer_sum 'L-arm Cerenkov sum (corrected)' L.cer.asum_c 200 1 3500 L.cer.asum_c>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH2F Lcer_x 'L-arm Cerenkov sum (corrected) vs. X' L.cer.trx L.cer.asum_c 60 -1.2 1.2 200 200 3500 L.cer.asum_c>0&&L.tr.n>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH2F Lcer_y 'L-arm Cerenkov sum (corrected) vs. Y' L.cer.try L.cer.asum_c 60 -0.12 0.12 200 200 3500 L.cer.asum_c>0&&L.tr.n>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) # ------------------------------------------------------------------ # LEFT ARM Pion Rejector 1/2 (Preshower/Shower): TH1F Lpsa 'PionRejector1 ADCs' L.prl1.a 1100 1 4100 L.prl1.a>0.&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH1F Lpsa_p 'PionRejector1 ADCs (PedSub)' L.prl1.a_p 500 -10 3100 L.prl1.a_p>0.&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH1F Lpsa_c 'PionRejector1 ADCs (Corrected)' L.prl1.a_c 200 -100 4000 L.prl1.a_c>0.&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH1F Lpssum 'PionRejector1 sum' L.prl1.asum_c 200 1 1000 TH1F Lsha 'PionRejector2 ADCs' L.prl2.a 1100 1 4100 L.prl2.a>0.&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH1F Lsha_p 'PionRejector2 ADCs (PedSub)' L.prl2.a_p 500 -10 3100 L.prl2.a_p>0.&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH1F Lsha_c 'PionRejector2 ADCs (Corrected)' L.prl2.a_c 200 -100 4000 L.prl2.a_c>0.&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) TH1F Lshsum 'PionRejector2 sum' L.prl2.asum_c 200 1 1000 TH2F Lpr1_2 'Pion Rejector_1 sum vs. PR_2 sum' L.prl2.asum_c L.prl1.asum_c 200 1 10000 200 1 10000 TH2F Lpr1sumx 'Pion Rejector_1 sum vs. x' L.prl1.x L.prl1.asum_c 200 -1.2 1.2 200 1 10000 TH2F Lpr1sumy 'Pion Rejector_1 sum vs. y' L.prl1.y L.prl1.asum_c 200 -1.2 1.2 200 1 10000 TH2F Lpr2sumx 'Pion Rejector_2 sum vs. x' L.prl2.x L.prl2.asum_c 200 -1.2 1.2 200 1 10000 TH2F Lpr2sumy 'Pion Rejector_2 sum vs. y' L.prl2.y L.prl2.asum_c 200 -1.2 1.2 200 1 10000 TH2F Lshe_pse 'L-arm Pion Rej.2 energy vs. Pion Rej.1 energy' L.prl2.e L.prl1.e 200 1 4000 200 1 2400 L.prl2.asum_c>0&&L.prl1.asum_c>0&&(DL.evtype==3||DL.evtype==4||DL.evtype==8) formula prl_E_P (L.prl1.e+L.prl2.e)/(1000*ExTgtCor_L.p) TH1F prlep 'Pion Rejector Total Energy Divided by Momentum' prl_E_P 500 0.0 1.5 L.tr.n==1&&L.prl1.e>0.&&L.prl2.e>0. # ----------------------- # Trigger Flag # ----------------------- # FORMULA InclusiveEvt ((DL.evtypebits&(1<<3))==(1<<3))||((DL.evtypebits&(1<<4))==(1<<4)) FORMULA InclusiveEvt 1 # ----------------------- # Particle Flag # ----------------------- # Good Electron cut # add more you have better idea formula prl_E_P (L.prl1.e+L.prl2.e)/(1000.*ExTgtCor_L.p) FORMULA GoodLTrack abs(ExTgtCor_L.dp)<0.05&&L.tr.n>=1&&abs(ReactPt_L.z)<0.25 FORMULA GoodElectron L.cer.asum_c>300 # ----------------------- # Event Flag # ----------------------- FORMULA InclCut GoodLTrack&&InclusiveEvt&&GoodElectron # ----------------------- # Inclusive Events # ----------------------- TH1F InclScatAngle 'Left HRS Scattering angle' ScaAngle 100 10 20 InclCut TH1F InclQ3m 'Magnitude of 3-momentum transfer' PriKineL.q3m 100 0 1 InclCut TH1F InclNu 'Energy Transfer' PriKineL.nu 100 0.0 0.5 InclCut TH1F InclQ2 'Q^2 (GeV)' PriKineL.Q2 100 0. 0.7 InclCut TH1F InclInvMass 'W (GeV)' InvMass 100 0.5 1.5 InclCut TH1F InclX 'Bjorken x' PriKineL.x_bj 100 0 3 InclCut TH2F InclXW 'Inclusive Phase Space : W vs x' PriKineL.x_bj InvMass 50 0 3 50 0.5 1.5 InclCut TH2F InclXQ2 'Inclusive Phase Space : Q2 vs x' PriKineL.x_bj PriKineL.Q2 50 0 3 50 0 0.7 InclCut TH2F InclXNu 'Inclusive Phase Space : Nu vs x' PriKineL.x_bj PriKineL.nu 50 0 3 50 0.0 0.5 InclCut # ---------------------------------------------------------------------------------- begin epics HALLA:p HALLA:dpp IPM1H04A.XPOS IPM1H04A.YPOS IPM1H04B.XPOS IPM1H04B.YPOS hac_bcm_average end epics