# 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 R.* # Here are variables and formulas that appear in the tree. # Beam position and Raster FORMULA urbax 1000.*Rurb.BPMA.x FORMULA urbay 1000.*Rurb.BPMA.y FORMULA urbbx 1000.*Rurb.BPMB.x FORMULA urbby 1000.*Rurb.BPMB.y FORMULA urbx 1000.*Rurb.x FORMULA urby 1000.*Rurb.y FORMULA rawcurx 1000.*Rrb.Raster.rawcur.x FORMULA rawcury 1000.*Rrb.Raster.rawcur.y FORMULA urby 1000.*Rurb.y FORMULA urby 1000.*Rurb.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)' Rrb.Raster.rawcur.y Rrb.Raster.rawcur.x 200 100 7000 200 100 7000 TH1F bpmaraw1 'BPMA Antenna 1' Rurb.BPMA.rawcur.1 2000 0 16500 TH1F bpmaraw2 'BPMA Antenna 2' Rurb.BPMA.rawcur.2 2000 0 16500 TH1F bpmaraw3 'BPMA Antenna 3' Rurb.BPMA.rawcur.3 2000 0 16500 TH1F bpmaraw4 'BPMA Antenna 4' Rurb.BPMA.rawcur.4 2000 0 16500 TH1F bpmbraw1 'BPMB Antenna 1' Rurb.BPMB.rawcur.1 2000 0 16500 TH1F bpmbraw2 'BPMB Antenna 2' Rurb.BPMB.rawcur.2 2000 0 16500 TH1F bpmbraw3 'BPMB Antenna 3' Rurb.BPMB.rawcur.3 2000 0 16500 TH1F bpmbraw4 'BPMB Antenna 4' Rurb.BPMB.rawcur.4 2000 0 16500 # TH1F rastraw1 'Raster Current 1' Rrb.Raster.rawcur.x 2000 0 16500 TH1F rastraw2 'Raster Current 2' Rrb.Raster.rawcur.y 2000 0 16500 # Target and Sieve #formula R_sv_x ExTgtCor_R.x+ExTgtCor_R.th*1.16539 #formula R_sv_y ExTgtCor_R.y+ExTgtCor_R.ph*1.16539 TH2F sieve 'Sieve Slit' R_sv_x R_sv_y 200 -0.1 0.1 200 -0.1 0.1 TH1F dp 'Deviation from Central Momentum' R.tr.tg_dp 200 -0.1 0.1 TH1F tgth 'Target Theta' R.tr.tg_th 200 -0.2 0.2 TH1F tgph 'Target Phi' R.tr.tg_ph 200 -0.2 0.2 TH1F tgy 'Target Y' R.tr.tg_y 200 -0.2 0.2 TH1F zreact 'React Z' ReactPt_R.z 200 -0.4 0.4 # ------------------------------------------------------------------ # RIGHT ARM DETECTORS # ------------------------------------------------------------------ # TH1F EvType 'Trigger type' D.evtype 15 0 10 #TH1F hel 'Helicity States' Beam.HL.helicity 10 -2 2 # RIGHT ARM S1 and S2 ADC and TDC : TH1F Rs1lt 'Right arm S1 L-PMT TDCs' R.s1.lt 750 101 4000 R.s1.lt>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs1rt 'Right arm S1 R-PMT TDCs' R.s1.rt 750 101 4000 R.s1.rt>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs2lt 'Right arm S2 L-PMT TDCs' R.s2.lt 750 0 4000 R.s2.lt>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs2rt 'Right arm S2 R-PMT TDCs' R.s2.rt 750 0 4000 R.s2.rt>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs1la 'Right arm S1 L-PMT ADCs' R.s1.la 1000 1 4000 R.s1.la>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs1ra 'Right arm S1 R-PMT ADCs' R.s1.ra 1000 1 4000 R.s1.ra>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs2la 'Right arm S2 L-PMT ADCs' R.s2.la 1000 1 4000 R.s2.la>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs2ra 'Right arm S2 R-PMT ADCs' R.s2.ra 1000 1 4000 R.s2.ra>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs1la_p 'Right arm S1 L-PMT ADCs (PedSub)' R.s1.la_p 200 0 3999 R.s1.la_p>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs1ra_p 'Right arm S1 R-PMT ADCs (PedSub)' R.s1.ra_p 200 0 3999 R.s1.ra_p>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs2la_p 'Right arm S2 L-PMT ADCs (PedSub)' R.s2.la_p 200 0 3999 R.s2.la_p>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 TH1F Rs2ra_p 'Right arm S2 R-PMT ADCs (PedSub)' R.s2.ra_p 200 0 3999 R.s2.ra_p>0&&(D.evtype==1||D.evtype==2||D.evtype==8)&&D.edtpr==0 # ------------------------------------------------------------------ # RIGHT ARM VDC wires and timing : #CUT rightOnly 1 TH1F Rvu1t 'R-arm VDC u1 time' R.vdc.u1.rawtime 200 401 2400 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly TH1F Rvu2t 'R-arm VDC u2 time' R.vdc.u2.rawtime 200 401 2400 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly TH1F Rvv1t 'R-arm VDC v1 time' R.vdc.v1.rawtime 200 401 2400 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly TH1F Rvv2t 'R-arm VDC v2 time' R.vdc.v2.rawtime 200 401 2400 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly TH1F Rvu1w 'R-arm VDC u1 wires' R.vdc.u1.wire 400 1 400 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly TH1F Rvu2w 'R-arm VDC u2 wires' R.vdc.u2.wire 400 1 400 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly TH1F Rvv1w 'R-arm VDC v1 wires' R.vdc.v1.wire 400 1 400 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly TH1F Rvv2w 'R-arm VDC v2 wires' R.vdc.v2.wire 400 1 400 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly #TH1F Rv1nhit 'R-arm VDC v1 hits' R.vdc.v1.nhit 20 1 20 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly #TH1F Rv2nhit 'R-arm VDC v2 hits' R.vdc.v2.nhit 20 1 20 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly #TH1F Ru1nhit 'R-arm VDC u1 hits' R.vdc.u1.nhit 20 1 20 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly #TH1F Ru2nhit 'R-arm VDC u2 hits' R.vdc.u2.nhit 20 1 20 (D.evtype==1||D.evtype==2||D.evtype==8) #rightOnly # ------------------------------------------------------------------ # RIGHT ARM GAS CHERENKOV ADC and TDC : TH1F Rcera 'R-arm Cerenkov ADCs' R.cer.a 250 1 4000 R.cer.a>10&&(D.evtype==1||D.evtype==2||D.evtype==8) TH1F Rcert 'R-arm Cerenkov TDCs' R.cer.t 250 0 3000 R.cer.t>0&&(D.evtype==1||D.evtype==2||D.evtype==8) TH1F Rcera_p 'R-arm Cerenkov ADCs (PedSub)' R.cer.a_p 250 -10 4999 R.cer.a_p>0&&(D.evtype==1||D.evtype==2||D.evtype==8) TH1F Rcer_sum 'R-arm Cerenkov sum (corrected)' R.cer.asum_c 200 1 4500 R.cer.asum_c>0&&(D.evtype==1||D.evtype==2||D.evtype==8) TH2F Rcer_x 'R-arm Cerenkov sum (corrected) vs. X' R.cer.trx R.cer.asum_c 60 -1.2 1.2 200 200 4500 R.cer.asum_c>0&&R.tr.n>0&&(D.evtype==1||D.evtype==2||D.evtype==8) TH2F Rcer_y 'R-arm Cerenkov sum (corrected) vs. Y' R.cer.try R.cer.asum_c 60 -0.12 0.12 200 200 4500 R.cer.asum_c>0&&R.tr.n>0&&(D.evtype==1||D.evtype==2||D.evtype==8) # ------------------------------------------------------------------ # RIGHT ARM Preshower/Shower: TH1F Rpsa 'Preshower ADCs' R.ps.a 1100 1 4100 R.ps.a>0.&&(D.evtype==1||D.evtype==2||D.evtype==8) TH1F Rpsa_p 'Preshower ADCs (PedSub)' R.ps.a_p 500 -10 3100 R.ps.a_p>0.&&(D.evtype==1||D.evtype==2||D.evtype==8) TH1F Rpsa_c 'Preshower ADCs (Corrected)' R.ps.a_c 200 -10 4000 R.ps.a_c>0.&&(D.evtype==1||D.evtype==2||D.evtype==8) TH1F Rpssum 'Preshower sum' R.ps.asum_c 200 1 1000 TH1F Rsha 'Shower ADCs' R.sh.a 1100 1 4100 R.sh.a>0.&&(D.evtype==1||D.evtype==2||D.evtype==8) TH1F Rsha_p 'Shower ADCs (PedSub)' R.sh.a_p 500 -10 3100 R.sh.a_p>0.&&(D.evtype==1||D.evtype==2||D.evtype==8) TH1F Rsha_c 'Shower ADCs (Corrected)' R.sh.a_c 200 -10 4000 R.sh.a_c>0.&&(D.evtype==1||D.evtype==2||D.evtype==8) TH1F Rshsum 'Shower sum' R.sh.asum_c 200 1 1000 TH2F Rps_sh 'Preshower sum vs. Shower sum' R.sh.asum_c R.ps.asum_c 200 1 10000 200 1 10000 TH2F Rpssumx 'Preshower sum vs. x' R.ps.x R.ps.asum_c 200 -1.2 1.2 200 1 10000 TH2F Rpssumy 'Preshower sum vs. y' R.ps.y R.ps.asum_c 200 -1.2 1.2 200 1 10000 TH2F Rshsumx 'Shower sum vs. x' R.sh.x R.sh.asum_c 200 -1.2 1.2 200 1 10000 TH2F Rshsumy 'Shower sum vs. y' R.sh.y R.sh.asum_c 200 -1.2 1.2 200 1 10000 TH2F Rshe_pse 'R-arm Pion Rej.2 energy vs. Pion Rej.1 energy' R.sh.e R.ps.e 200 1 4000 200 1 2400 R.sh.asum_c>0&&R.ps.asum_c>0&&(D.evtype==1||D.evtype==2||D.evtype==8) formula totsh_E_P (R.ps.e+R.sh.e)/(1000*ExTgtCor_R.p) TH1F totshep 'Pion Rejector Total Energy Divided by Momentum' totsh_E_P 500 0.0 1.5 R.tr.n==1&&R.ps.e>0.&&R.sh.e>0. ######################################## # Physics Part ######################################## #---------------------------- # Right Arm Target #---------------------------- #formula R.sv.x R.gold.x+0.8*R.gold.th #formula R.sv.y R.gold.y+0.8*R.gold.ph TH1F Rytg 'R-arm ytg' R.gold.y 250 -0.1 0.1 TH1F Rthtg 'R-arm thtg' R.gold.th 250 -0.1 0.1 TH1F Rphtg 'R-arm phtg' R.gold.ph 250 -0.05 0.05 TH1F Rdp 'R-arm dp' R.gold.dp 250 -0.07 0.07 #TH1F Rysieve 'R-arm ysieve' R.sv.x 250 -0.3 0.3 #TH1F Rxsieve 'R-arm xsieve' R.sv.y 250 -0.3 0.3 #---------------------------- # Right Arm Target Spin signal #---------------------------- #TH1F RSpinValid '1=Spin signal valid; 0=otherwise' he3R.IsSpinValid 6 -.5 1.5 #TH1F RSpin 'Target Spin (check with TO)' he3R.Spin 9 -1.5 1.5