Pion-LT analysis instructions
From HallCWiki
Revision as of 16:39, 31 August 2021 by Sjdkay (talk | contribs) (→Debugging: Some minor additional comments)
If you have any questions or comments, please email - sjdkay@jlab.org, heinricn@jlab.org, jmurphy@jlab.org or junaid@jlab.org
- 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.
TLDR - Quick Start
- ssh cdaql1
- go_analysis
- Do a 50k replay for each arm as soon as you get 50k events
- ./run_coin_hms.sh
- Execute the HMS 50k replay on the latest run
- ./run_coin_shms.sh
- Execute the SHMS 50k replay on the latest run
- Execute the main analysis script after the run is over
- ./run_pionLT.sh
- Execute the main analysis script
- Follow the prompts, provide the required arguments
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
- go_analysis
- 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.
- Go to the last block in the file, leave a blank line and then copy and paste the block below itself, you must leave a blank line in between each kinematic setting
- An example of how this should look after you've pasted in the new block can be seen below -
- Edit the run number range of the two blocks, use 99999 if the run is ongoing
- Remember to edit the run number range of the previous block too
- 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).
- Leave the helicity frequency as is
- The HMS and SHMS RF offsets are to centre the RF timing distributions
- The SHMS offset should be chosen such that pions are centred at 2
- The eHadCoinTime_Offset should be chosen such that the coincidence time for pions is centred at 0
- Don't worry about setting this precisely immediately, it can be corrected for in subsequent analysis trivially
- You can also add a comment line (start the comment line with a hash - #) before the run numbers to explain what the block is for
- 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/Analysis/50k subdirectory. A copy of the scaler report is in REPORT_OUTPUT/Analysis/50k.
- 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.
- The script is - run_pionLT.sh located in /home/cdaq/hallc-online/hallc_replay_lt (you should be in this folder already)
- This script requires three arguments -
- Run number - This must be a positive integer, specify the run you want to analyse
- Run type - You must enter one of - Prod - Lumi - HeePSing -HeePCoin - Optics , the argument is case sensitive
- Target - You must enter one of - LH2 - LD2 - Dummy10cm - Carbon0p5 - Optics1 - Optics2 - CarbonHole , again, the argument is case sensitive
- The script will prompt you to re-enter the arguments if anything is not correct, hit ctrl+c at any time to exit the script
- Specify the run type and target as dictated by the run plan
- Depending upon the run type specified, the script will call the relevant analysis script, details on the individual scripts are provided in a separate section
- run_pionLT.sh will print to screen the path of the script it is trying to execute
- Generally, all of the scripts called will execute a replay, and then some subsequent analysis scripts
- Once they complete, the script will fill the run list with relevant info, follow the onscreen prompts
PionLT Production Script
Plots
We need some examples in here of what "good" pion events look like in various plots.
For example, in a messy RF vs MM plot (without cuts), which events do we care about. Ditto with CT vs MM and so on.
Debugging
- For information on how to adjust the cuts, see here
- Physics plots looking odd are likely due to timing cuts not being set correctly
- If there are warnings or prompts that files aren't being found, read them and check if they're true
- For example if it complains /This/Is/My/Path/To/File.txt doesn't exist, just do - ll /This/Is/My/Path/To/File.txt
Luminosity Script
Plots
Debugging
HeeP Singles Script
Plots
Debugging
HeeP Coin Script
Plots
Debugging
Optics Script
Plots
Debugging
Debugging - General
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
You should not -
- Panic
- 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