Pion-LT analysis instructions
- We would like the detector check replay to be done on first 50,000 events of every run, and compare plots with the standard ones in the binder. In addition, we want physics replay to be done on every run in its entirety. π+ plots such as missing mass, t, W , Q^2 and φ should be checked for anomalies. Replay instructions are below.
- Do not start the full analysis until after the run ends!
- Keep the file standard.kinematics up to date with the spectrometer settings for every configuration, so that the physics replay generates meaningful quantities. Use the beam energy determined from the arc measurement in the file, and the spectrometer angles from the TV.
- Shift leaders are asked to keep a running total of the number of e − π coincidence events falling within the missing mass and fiducial volume cuts set in the physics replay kumac, so that we can better estimate when to move to the next setting.
Detailed Online Analysis Instructions
- The analysis instructions below assume that you are logged in as cdaq on cdaql1 and are in the folder /home/cdaq/hallc-online/hallc_replay_lt
- If are not logged into cdaql1 as cdaq, then from any HCDESK machine, open a terminal and do the following -
- ssh cdaql1
- This will setup the analysis environment and take you to /home/cdaq/hallc-online/hallc_replay_lt, do not type go_analysis as a means to return to that folder
Each new kinematic setting
- Every time you move to a new kinematic setting you must also adjust some things to get the analysis working
- You must edit the file standard.kinematics in the DBASE/COIN subdirectory to add the current kinematic information.
- Note, do not edit standard_pion.kinematics!
- First, add a comment to indicate the kinematic setting.
- Then enter the range of runs the kinematics are valid to (enter 9999 as upper range if ongoing).
- Warning - If you use 9999 at any point make sure you change it once you move onto a new range!
- Next, enter the beam energy determined from the arc measurement, the target mass in amu (available at the top of the file), and the spectrometer angles from the TV.
- The HMS angle (htheta) should be entered as negative and the SHMS angle (ptheta) should be entered as positive
- Next are the central momenta of the HMS and SHMS, followed by the mass of the particle each arm should detect (the leading letter indicates which arm: p = SHMS, h = HMS).
- An example of what this looks like when done correctly can be seen below -
After 50,000 events have been taken
- We run two scripts to check the detectors.
- Type ./run_coin_shms.sh to automatically replay the most recent run and launch the online replay GUI.
- Type ./run_coin_hms.sh to repeat the process for HMS detectors.
- For reference, all histos are saved in the HISTOGRAMS subdirectory. A copy of the scaler report is in REPORT_OUTPUT.
- Compare with the histograms in the golden run binder, make an elog entry if you notice any major differences
- You should also make a log entry if you notice any consistent trends on the plots over your shift
After the run is over
- Once the run ends you need to execute an analysis script.
- There are four different scripts, you need to use the script corresponding to the type of run you are doing.
- The scripts are located in hallc_replay_lt/UTIL_PION, you can run them from any location -
- You must provide a run number as an argument, e.g. - ./PionYield.sh 0118999 runs the script on run 0118999.
- You may provide a number of events as a second argument. Leave the second argument blank or enter -1 to analyse all events
- During production running, please analyse all events
- All four scripts run a hcana replay and then execute a physics analysis script on the replay once it ends
- Note, if a replay of the file has already been done the script will not replay the file again. If you wish to replay the file again, comment out the if statement in the script that checks for this
- When this completes, a GUI will launch with physics distributions. See the plots info section below for what you should expect
- When running PionYield.sh, please note down the number of neutron events (in the text box of the last set of plots) on the run sheet, e.g. in the image below, write down 409 on the run sheet -
- Exit root by typing .q
- An Emacs window will launch giving scaler and efficiency info. Check to make sure this all looks reasonable.
- Once the Emacs window closes, a prompt will appear asking if you would like to update the run list as well, enter yes.
- When prompted, enter the production type (prod, heep, lumi, etc.) then the target type.
- A list of the information that will be entered into the run list will appear. Enter the accepted PreTrig 1,3,5 info on the run sheet. If the information looks correct, enter yes.
- A prompt asking for comments will appear, please enter the number of neutron events and any other comments about the run here.
- The Emacs window containing the run list is located should automatically update, if it does not, simply hit Ctrl-x Ctrl-v then ENTER.
Where to find info from analysed runs
- Scaler information, and higher level kinematics (including the number of neutrons), are saved in the UTIL_PION/OUTPUT/ directory.
- The pion yield plots and report files are saved under UTIL_PION/OUTPUT as pdfs and text files, respectively. Look at the pdf to get the Pi+Neutron statistics.
The replay script outputs some plots to the screen, here's some brief notes on what you should expect to see -
- HeepSinglesYield.sh - Plots of the HMS and SHMS W distributions, here we expect these to be peaked at ~0.938. If you see an extra bump in the distribution at ~1.2 this is likely just due to the delta cut being too open. You'll also get some other plots of φ for the q vector and of W vs x'fp.
- HeepCoinYield.sh - A plot of the missing mass, this should be ZERO. You should also see that the missing momenta (all components) and energy are ZERO.
- Luminosity.sh - You should see some event selection histograms, what's important here are the numbers that are also printed to screen detailing the numbers of events. Don't worry about these too much.
- PionYield.sh - Here you will see some event selection histograms, some timing histograms and finally a summary of the kinematics. The Q2 and W diamond should match up to your current experimental setting. The value of epsilon should also match up. You should also see a missing mass plot with a peak at the neutron mass (~0.940). This should have a nice Gaussian fit to it, you'll also get a textbox with the number of pion events found. Make a note of this number on the run sheet.
If any of the plots look odd/not as described, you should -
- Double check that standard.kinematics has been updated and is CORRECT, verify that when you start the replay the values you THINK it is reading appear in the hcana initiation info dump. See the images below -
- Watch out for silly typos, e.g. gbeam rather than gpbeam.
- Note that standard.kinematics affects things you think it really shouldn't! If things look wrong this is absolutely the first thing you should check.
- Make sure you have the correct particles going into each spectrometer
- Check the event selection histograms carefully, particularly the timing ones for the PionYield. If these are clearly off this will screw up the kinematics later.
- If the timing windows are clearly selecting the wrong things you can do one of two things -
- Have a go at correcting it yourself, the relevant file to edit is -
- In the main process loop, check the values used in the timing cuts. If you edit these please COMMENT the old versions in the file and leave a note saying who changed it and when too.
- If you don't feel confident in editing the script, make an elog entry noting that the timing windows look off and the plots look weird. Please tag firstname.lastname@example.org, email@example.com and firstname.lastname@example.org
- If the fit to the neutron peak in the pion yield script looks bad, you can try adjusting the fit parameters and seeing if you get any improvement. Same conditions on commenting as above apply.
You should not -
- Start editing scripts and deleting things without knowing what you are adjusting
- Delete ANYTHING in the scripts without also leaving a comment explaining what you have deleted or changed
If you have any questions or comments, please email - email@example.com, firstname.lastname@example.org or email@example.com