Pion-LT analysis instructions

From HallCWiki
Jump to navigationJump to search
  • 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
    • 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 -

Standard Kinematics CopyBlock.jpeg

  • 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 -

Standard Kinematics Good V2.jpeg

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

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.

Plots Info

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.

Debugging

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 -

Hcana debugging.png Hcana debugging 2.png Hcana debugging 3.png

  • 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 any of the event selection cuts are off, you can find instructions on how to edit them here
  • 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 -
    UTIL_PION/scripts_Yield/PionYield.C
    • 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 sjdkay@jlab.org, heinricn@jlab.org, jmurphy@jlab.org andjunaid@jlab.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 -

  • 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

If you have any questions or comments, please email - sjdkay@jlab.org, heinricn@jlab.org, jmurphy@jlab.org or junaid@jlab.org