TB03 FORTRAN DISPLAY AND ANALYSIS QUICK GUIDE - Version 2.0. July 7, 2003. Michael Shupe shupe@physics.arizona.edu CAVE CANUM: If things are not working, or you have suggestions for improvements, please send email to the above address. ***** RUNNING THE DISPLAY ***** On pcfcal01, from the directory /home/shupe/tb03, copy the following files to an area of your choice on pcfcal01. These are also available on lxplus.cern.ch in the public area ~shupe/w1/testbeam03. tb03_displays.out FCAL*.txt rgb.txt runXXXX.inp Then edit the runXXXX.inp to point to the data file you want to look at, and run the program as follows: tb03_displays.out ', ! Roll display about the vertical view axis 'Rol UpDn', ! Roll display about the horizontal view axis 'Rol Y Ax', ! Roll display about the world vertical axis 'Rol Z Ax', ! Roll display about the world Z axis 'Rol Axis', ! Pick and item to serve as a roll axis and roll 'JumpInto', ! Jump to the coordinate system of the picked item 'Distance', ! Rubberbands: Distances, closest approach, posns 'RubrZone', ! Rubberbands: Pick out a section to fill a zone 'Picking ', ! Give information on the picked item 'DetailVw', ! Jump to a more detailed display of the picked item 'ViewData', ! Get into the bank viewer * 'Hardcopy', ! Screen image -> hardcopy ps file (.ps or .pscolor) * 'DumpEvnt', ! Make a printout of data from this event (.dat file) 'FindEvnt', ! Exit and find a particular event (inquire on outside) * 'NextEvnt', ! Exit and get the next event * 'Proceed ', ! Continue running for 100 events (for summed displays) * 'End Run ', ! End the run For printable images and event dumps, make liberal use of 'Hardcopy', and 'DumpEvnt'. These produce .ps, .pscolor, or .dat files in your area, uniquely named with run and event, for printing latter. If you click on 'DISPLAYS', the following selection comes up. The first two are not complete (but useable), and the third doesn't exist yet. The others work. You can bump up and down this list with the 'NextDisp' and 'PrevDisp' buttons. 'TB03 Side View ', 'TB03 Top View ', 'TB03 Angle View ', 'FCal1 Front ', 'FCal2 Front ', 'FCal3 Front ', 'FCal123 Front ', 'FCal1 Tilt ', 'FCal2 Tilt ', 'FCal3 Tilt ', 'FCal123 Tilt ', 'FCal1 Front Sum ', 'FCal2 Front Sum ', 'FCal3 Front Sum ', 'FCal123 Frnt Sum', 'FCal1 Tilt Sum ', 'FCal2 Tilt Sum ', 'FCal3 Tilt Sum ', 'FCal123 Tilt Sum'/ Status: Various displays have been debugged, but the side views at the beginning have not been improved yet, because work has concentrated on the FCal displays and data decoding. ***** RUNNING THE PAW HISTOGRAM MONITORING ANALYSIS ***** On pcfcal01, from the directory /home/shupe/tb03, copy the following files to an area of your choice on pcfcal01. These are also available on lxplus.cern.ch in the public area ~shupe/w1/testbeam03 tb03_analyze.out FCAL*.txt run_XXXX.inp cuts_XXXX.inp quick.kumac more.kumac Then edit the runXXXX.inp to point to the data file you want to look at, and run the program as follows: nice tb03_analyze.out log_XXXX.txt & When the job completes, it will produce a file hists_XXXX.rz This can be viewed in a PAW session. The kumac files may be used to create hardcopy histogram files from the rz files The most major change since the previous version is that there are now two input files: run_XXXX.inp to control the processing, and cuts_XXXX.inp to provide run-dependent constants and cuts to the program. ----- The run file ----- Here is an example run_XXXX.inp file: FILE: run_e_200_4L_1781_6_quick.inp 100000000 / Number of events to analyze 0 / Debug printout level 0 / Event dumps per particle type at beginning of run 000010 / Hists: (lsd) PROD,QUICK,ALIGN,SPEC,PED,CALIB 0001 / EMeth: (lsd) ETOT,EWTS,EPLY,ESHP 101 / Algos: (lsd) REM,3X3,RPI '/raid/data/phys/1700-1799/' / Data area. In quotes -> '/raid/data/phys/' cuts_e_200_4L_1781.inp / Name of file containing cuts and corrections 6 / Number of data files to process ->12 run1781.dat run1782.dat run1783.dat run1784.dat run1785.dat run1786.dat run1787.dat run1788.dat run1789.dat run1791.dat run1792.dat run1793.dat Most of the options are obvious, but the digital switches need some explanation: "000010 / Hists: (lsd) PROD,QUICK,ALIGN,SPEC,PED,CALIB" enables the sets of histograms generated in tb03_hists.f. In this case, only the "QUICK" set has been selected, and this corresponds to the PAW file quick.kumac for hardcopy. "0001 / EMeth: (lsd) ETOT,EWTS,EPLY,ESHP" enables the cell energy reconstruction methods used for the FCal. These may be used in parallel, and "1111" will enable them all. The more.kumac file will process PAW files where all methods have been enabled. The methods operate as follows: ETOT - In each channel, for the seven samples 1 2 3* 4* 5* 6 7, take sample 1 to be the pedestal level for this cell in this event, subtract this level from all channels, sum the starred samples (including negative going, for noise averaging), and multiply by the cell gain constant (see routine GET_GAIN) EWTS - Determine the event timing of the samples by a quadratic put through the starred samples, then applying a weight to each of the starred samples prior to summing. The weights are are currently determined from a table based on theoretical pulse shapes (function provided by John Rutherfoord), though these will be adjusted for the observed testbeam shape in future versions. EPLY - The peak value of each pulse is found from a quadratic put through samples 3,4,5. At low cell energies, this procedure fails since noise dominates the signal. When the quadratic width of the pulse goes beyond the bounds .2 to .8 (in sample time units), ETOT is used for the cell energy. ESHAP - The peak value of each pulse is found from a lookup table based on the ratios of the samples prev/max and next/max, again calculated from the theoretical pulse shape. As with EPLY, this reverts to ETOT at low signal levels, as determined by consistency checks on the two ratios. "101 / Algos: (lsd) REM,3X3,RPI" enables the clustering algorithms used in event energy analysis. The current algorithms are as follows: REM - In each FCal, the maximum energy cell is found and all cells within a radius of radius 4. cm (adjustable in CUTS input file) are summed to form the cluster energy and energy-weighted-centroid. The new centroid is used to recollect energy within the same radius, and this procedure is iterated to a stable solution. 3X3 - Like REM, this algorithm emphasizes EM clusters, and sums energies in the nearest neighbors to the highest energy cell. No iterations are done. RPI - In each FCal, clusters are found using the same radius clustering as in the REM algorithm, but with different radii for each FCal: 10., 12., and 14. cm for FCal's 1, 2, and 3 respectively. These radii have not yet been tuned by energy containment studies. Like REM, these clusters are iterated to solution, and are independent in each FCal. Because of calorimeter noise, especially in FCal 3, there is no guarantee that these clusters are associated in depth. So for each enabled algorithm a "GLOBAL" clustering procedure is also done. At the moment it proceeds as follows (for any algorithm above): GLOBAL - Look at the cluster energies in FCal1 and FCal2, and choose the larger as the cluster initiator. EM showers will "always" use FCal1, and hadronic showers will, roughly 1/3 of the time, deposit greater energy in FCal2. Starting from the (x.y,z) position of the initiating cluster, the beam track direction is propogated to the other FCal layers. In those layers, with radii corresponding to the algorithm (4. cm for REM or 3X3, and RPI radii for the RPI algorithm) are used to sum cells, which are then added to the energy of the initiator to form the global cluster energy. Other cluster parameters are also recalculated at the same time. ----- The cuts file ----- The run file above has a corresponding cuts_XXXX.inp file to specify constants that need to be set for the reconstruction to work properly. The constants with *** are most critical for alignment, used in global clustering, and e/pi separation, at beam settings where BPC x-vs-xslope can be used for this. The beamspot numbering and table Y are obvious, but the BPC x-vs-xslope requires iterating the first run of a series to tune. If the "BPC X vs dX/dZ" diplot is tilted, the "BPC tilt angle" below must be moved up or down (~.0001) until the "BPC X vs dX/dZ Rot" diplot is horizontal. At this point, the "BPC dX/dZ Rot" plot should show a dip minimum between the electron and pion events, and the "BPC cut point" is set at this minimum. The other things that should be set are counter thresholds. In runs with random triggers, the pedestals are being subtracted automatically, and the threshold should be set to the ADC count difference between "interesting" pulseheights and pedestals (or just "counts" in histograms that have been pedestal subtracted). In the current analysis, the muon, veto, and tailcatcher pulseheights are being used, so their thresholds should be set. FILE: cuts_e_200_4L_1781.inp 1 / Version number for this file 5 / *** Beamspot, if not in Runhead (4=4H, 5=4L) -3.50 / *** Table Y position, cm. 0. / Fixed aluminum dead material, cm. 0. / Added alumimum dead material, cm. 0 / Poly material - 0 = none, 1 = tilted, 2 = straight 4 / N/6 clean BPC TDC sums cut. (BPC's 5/6 always) .3 / BPC DX and DY consistency cut, cm. Same N/6 .0000001 / *** SETUP - BPC tilt angle to flatten DXDZ vs X plot .00018 / *** SETUP - BPC cut point on DXDZ in above plot for e/pi .00005 / BPC additional margin on above for tight e/pi criteria 0 / 0 = No ped sub, 1 = Prerun peds, 2 = Random peds 230 / S1 counter pedestal (if no ped sub) 260 / S1 counter threshold 1000 / S1 counter MIP boundary 200 / S2 counter pedestal (if no ped sub) 270 / S2 counter threshold 320 / S2 counter MIP boundary 200 / S3 counter pedestal (if no ped sub) 270 / S3 counter threshold 320 / S3 counter MIP boundary 20 / Veto counter pedestal (if no ped sub) 40 / Veto counter ADC threshold If zero, use veto trig bit 50 / Veto counter multi MIP boundary 250 / TC1 counter pedestal (if no ped sub) 300 / TC1 counter threshold 300 / TC2 counter pedestal (if no ped sub) 350 / TC2 counter threshold 300 / TC3 counter pedestal (if no ped sub) 350 / TC3 counter threshold 300 / TC4 counter pedestal (if no ped sub) 400 / TC4 counter threshold 250 / TC5 counter pedestal (if no ped sub) 300 / TC5 counter threshold 250 / TC6 counter pedestal (if no ped sub) 300 / TC6 counter threshold 1.0 / TC gain constant: GeV/count 95 / Muon counter pedestal (if no ped sub) 15 / SETUP - Muon ADC threshold. If zero, use muon trig bit 35 / SETUP - Muon counter MIP value 1.6 / Shapefactor to correct PH when summing ETOT in samples 4. / Radius for EM clustering 10. / FCal1 radius for hadronic clustering 12. / FCal2 radius for hadronic clustering 14. / FCal3 radius for hadronic clustering .93 / Golden electron minimum EM fraction 0.0 / Golden electron minimum BPCDXDZ Rot .25 / Golden electron maximum BPCDXDZ Rot 0 ***** BUILDING THE DISPLAY OR HISTOGRAM ANALYSIS PACKAGES ***** For those interested in adding histograms to tb03_hists.f, or doing any other development, the software is very compact and complete within two subdirectories. For the analysis package, copy the contents of /home/shupe/tb03, or on lxplus ~shupe/w1/testbeam03, to your local directory. To build, or rebuild the analysis package: source tb03_analyze.lnk For the display package, create a subdirectory below your above directory and copy the contents of /home/shupe/tb03/graf to this directory. Then to build the executable, get into your original directory and: source tb03_displays.lnk User entry points ................... hist ID's >3000