11.2 Preliminary analysis
Once a run is ended, there are several macros to run. For these macros, you should log in to one of the spuds; the sources are in /home/daq/blast/pro2003/analysis/macros and /home/daq/blast/pro2003/analysis/utils .
- spudn:xxx> cd ~/pro2003/analysis/CRUNCH/v3
- spudn:xxx> lrn mmm (mmm is the run number)
- spudn:xxx> root charge.C mmm
- spudn:xxx> root flrn.C mmm
lrn takes the raw data, finds and fits tracks, and writes out a standard ntuple to lr-mmm.root . charge.C integrates the charge (inhibited and total) for the run from the scaler events, sorted by beam and target helicity, and writes the result to charge-mmm.chg . flrn.C filters the lrn ntuple and writes to flr-mmm.root , selecting only events with good track information in both sectors (for an ep trigger), so the analysis will be faster. If you need to look at raw data, ntuple.C creates ntp-mmmm.root, where the ntp ntuple contains pulse heights and timing from each phototube. The charge results and the ntuples are put in $ANALDIR, currently /net/data/4/Analysis/pro2003 .
When a run has been deemed good, and crunched, note this in the /home/daq/blast/pro2003/analysis/RUNLIST text file. Eventually, runs will be crunched automatically based on information in the electronic logbook, but for now, keep records in the RUNLIST file also.
A simple script which plots elastic events normalized to beam charge can be run to compare rates across runs:
- spudn> .rate xxx (where xxx is the number of runs to look back over)
The script looks in the charge-mmm.chg files to find the elastic events and beam charge. The vertical limits for the plot are set in /home/daq/blast/.rate.plot .
Several Root macros use the lrn/flrn ntuple to form experimental observables. For example, /home/daq/blast/pro2003/analysis/macros/show_ep_asym.C forms beam and target asymmetries and the super ratio for each sector, and also forms false asymmetries. Cuts can be applied using a "-c arg" switch when running a macro, where "arg" is an entry in cuts.C . For example,
- spudn:xxx> root compare.C 300-306 -c padc -c coplaw
will run the macro which compares runs 300-306 to a simulation, cut on ADC values which indicate an electron on the right and proton on the left (or vice versa), and also cut on coplanarity.
You can also look at the data "by hand":
- spudn:xxx> root $ANALDIR/lr-1085.root (loads up the lr ntuple for run 1085)
- root [1] lr->Draw("ttl:atr","ntl==0&&ntr==14&&nwl>17");
will display a 2D plot of mean time for TOF left 0 versus pulse height for TOF right 14, for events with number of hits in WC left greater than 17. A list of names of ntuple elements (and their meanings) can be found in the macro that created the ntuple.