Difference between revisions of "Instructions for analysis shifts"

From HallCWiki
Jump to navigationJump to search
 
(7 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
• Connect to cdaql1: ssh cdaql1 and go to /home/cdaq/vcs2019/hallc_replay_vcs
 
• Connect to cdaql1: ssh cdaql1 and go to /home/cdaq/vcs2019/hallc_replay_vcs
  
Warning: from this directory, please don't make any modifications on the master branch. If you want to do tests or modify things, go to github and fork to your personnal directory.  
+
Warning: from this directory, please don't make any modifications on the source code. If you want to do tests or modify things, go to github and fork to your personnal directory. The source code is available from: https://github.com/JeffersonLab/hallc_replay_vcs Before starting to run it after getting your fork, run: "getstarted.sh"
 
 
The source code is available from: https://github.com/JeffersonLab/hallc_replay_vcs
 
 
 
Before starting to run it, modify the getstarted.sh exectutable and put the path to your directory instead of "TOCHANGE", then:
 
 
 
> getstarted.sh
 
 
 
It will change the path that are hardcoded to your personnal directory. Then, go to "Ana" and type "make". If the code doesn't start, check if all the path are set correctly.
 
  
 
=== Kinematic setting ===
 
=== Kinematic setting ===
  
- Each time the spectrometer move to a new kinematic setting, edit the file: DBASE/COIN/standard.kinematics
+
- For each new run, the file: DBASE/COIN/standard.kinematics is updated. Check regularly if it is the case: electron momentum needs attention.
  
- On the last setting, enter the last run number of last setting instead of "9999"
+
- If needed to manually enter a new run, type new values for: beam energy (in principle it won't change), target mass (amu), HMS and SHMS central momentum and angle, particle mass detected in each arm (in principle, it won't change: proton in HMS, electron in SHMS). Note that the names of arm variable start with letter "h" for HMS and "p" for SHMS.
  
- Using the same format than the last setting, enter the first run number of the new setting, followed by the generic "9999" as last run number for this new setting
+
=== Analysis monitoring ===
  
- Enter new values (if relevant) for: beam energy (in principle it won't change), target mass (amu), HMS and SHMS central momentum and angle, particle mass detected in each arm (in principle, it won't change: proton in HMS, electron in SHMS). Note that the names of arm variable start with letter "h" for HMS and "p" for SHMS.
+
This step should be done by the TO. Any regular TO tasks have the highest priority over analysis replay and if target needs attention, the TO should just take care of the target and not do the analysis replays.  
  
=== HMS and SHMS replay ===
+
- After ~100,000 events run the "partial" analysis replay:
 
 
- Run standard HMS and SHMS coincidence replay after 50000 events and once after the run is done. Run:
 
 
 
> ./run_coin_hms.sh
 
 
 
> ./run_coin_shms.sh
 
 
 
It replays the most recent run and monitoring plots will automaticaly open.
 
 
 
- Check all the figures and compare them to the reference. If anything seems wrong, try to fix it, ask an expert if needed and make a log entry.
 
 
 
=== Analyzer coincidence and physics replay script ===
 
 
 
- After 200,000 events and once when the run is finished, run the analysis replay. It can be done more often during the run, but at least 2 times.
 
 
 
For a partial run replay, do:
 
  
 
> ./run_partial_replay.csh (run number) (# events) (process = elastic, vcs...) (target = LH2 or dummy)
 
> ./run_partial_replay.csh (run number) (# events) (process = elastic, vcs...) (target = LH2 or dummy)
  
After the run, do:
+
After the partial replay is finished, you should check the run table to make sure the singles yields in the HMS and SHMS are consistent with the previous runs. The appropriate command for this is:
  
> ./run_partial_replay.csh (run number) (process = elastic, vcs...) (target = LH2 or dummy)
+
> ./make_vcs_table
  
Don't forget later to run the full replay at least once! It can take a long time to convert the data. It will also allow to build a permanent database.
+
After the run is finished, the full replay will start automatically. Do not run the partial replay after that as it will overwrite the database entries made by the full replay.
  
- Running these scripts command will convert data to coincidence root files, build a database, run analysis monitoring plots and provide a reduced root file for this run.
+
If a more in-depth analysis needed or if you need to change a cut in analysis (see below the time delay), you can start the analysis program directly.
  
- If needed for a second monitoring or after changing analysis cuts, run only the analyzer, without replaying the full run. It takes only a few minutes for a complete run.
+
* Changing a cut: edit Ana/ANA_CUTS.input (write a note if you need to change another cut than the coincidence time delay).
 +
* Changing histogram limits or binning: edit Ana/ANA_HIST.input
 +
* Please don't change any source code in this directory.
  
Change cuts in: Ana/ANA_CUTS.input if needed.
+
To run the analyzer only:
 
 
Keep track of the cuts you set. Please don't change any source code in this directory. If you want to make modification, go the the github: jeffersonlab/hallc_replay_vcs and fork to your github directory. Then, you can make modification from your directory for testing cuts or monitoring other variables.
 
  
 
> ./run_ana_only.csh (run number) (# events) (process = elastic, vcs...) (target = LH2 or dummy)
 
> ./run_ana_only.csh (run number) (# events) (process = elastic, vcs...) (target = LH2 or dummy)
  
You can also run directly the analysis script by going to the Ana directory. To run it, do:
+
The source code is in the Ana directory. Read instructions on Ana/README.txt if you would like to run directly the code.
 
 
> ./HallCana "vcs" "ana" "LH2" "runnumber" -f "input file .root"    (look at the README.txt for details)
 
 
 
options for process are:
 
 
 
vcs, pi0, pi+, K+, elastic = call these options if the electron is in SHMS
 
 
 
vcsLT, pi0LT, pi+LT, K+LT, elasticLT = call these options if the electron is in HMS
 
  
 
=== Things to check ===
 
=== Things to check ===
  
All the monitoring information will be open automatically at the end of the replay. Check additionnal information if needed.
+
At the end of the job, databases will be built. Coincidence analysis information to check will be visible on the terminal. Follow the steps:
 
 
==== 1) Timing cuts ====
 
 
 
- This file is open automatically. If not, open: Ana/files/timing_(run).dat
 
 
 
→ the first line is information about the selected coincidence time peak in order:
 
peak position, charges – bkg, events in time peak, bkg (low), bkg (up), peak max
 
 
 
- check if the peak position is < 0.2. If not, this means the coincidence time is not set properly. Change it in Ana/ANA_CUTS.input and run again the analyzer
 
 
 
- check that the number of events in the peak is larget than the numbers for "bkg (low, up)"
 
 
 
- enter the value of "event – bkg" in the run database
 
  
- Look if there is a secondary or third peak: line 2 and 3 correspond to potential physics peaks. If the value of charges - background is significant, compare values of charges in peak and average background (up, low). If the number of charges in this peak is significantly higher, enter it in the run database and enter the peak position
+
* Database printout:
  
- If no peak is found, try to figure out why:
+
- First things to check is if the luminosity has been measured the same from HMS and SHMS.
  
Possibilities: look at the figures with coincidence time minus the time delay to be set, look at the absolute coincidence time, check the quality of the fit and of the peak finder (monitoring figures, see below), change cuts and replay the analyzer... It may also be that there are not enough events in this run: check the luminosity, the running time. Look if there is any obvious reason for the number of events to be low. First check histograms, and make a log entry and/or write it is database and/or the run sheet if anything is wrong and/or write it in the database and the run sheet. Call the expert if needed to avoid loosing good data.
+
- Then check timing information: is the delay set properly? Is the main timing peak found when fitting much larger in term of number of events than accidentals? Is the number of events in peak subtracted from the accidentals significant? 
  
==== 2) Luminosity ====
+
- Missing mass distribution (kinematic dependent): 3 lines correspond to possible 3 found peaks in the squared missing mass. The first line should show a peak at M(pi°)^2. If not something is wrong and write a note about it for this run, check at the monitoring plots if there is a peak. If no peak found in this missing mass squared distribution it may be a major issue such as being offset. -> CONTACT RC
  
- This file is open automatically. If not, open: Ana/files/lumi_(run).dat
+
For most of the kinematics: peak at 0 mass need more statistics and background studies to be visible, it might have been found by the fitter code.
The one line contains: run number, luminosity (HMS), luminosity (SHMS), actual running time (HMS), actual running time (SHMS), current (HMS), current (SHMS)
 
  
- check if the luminosity are the same in HMS and SHMS, and write them in the run database. If there are different, try to figure out why and call expert if needed.
+
* Monitoring figures:
 
 
==== 3) Missing mass peaks position ====
 
 
 
- This file is open automatically. If not, open: Ana/files/missmass2_(run).dat
 
 
 
3 lines correspond to possible 3 found peaks in the squared missing mass, with entries: M², integral
 
 
 
- record the position of the 2 main peaks: VCS M² ~ 0 GeV² and π° M² ~ 0.02 GeV² and the integrals int(VCS) / int (π°)
 
 
 
- if the ratio doesn't make sense and is far from ~ 1/10, check the quality of the fit and/or try to understand. If something is wrong, write it in the database and/or run sheet.
 
 
 
- if less than one peak is found, or the 2 peaks (VCS and π°) are merged into one, it may be a problem with the calibration, resolution... Try to understand why. If the problem is very bad, write in database and run sheet.
 
 
 
==== 4) Monitoring plots, to compare with reference plots ====
 
  
 
All the figures to look at will pop-up in a condensed replay "ana_monitor_(run).pdf. If additionnal check need to be done, open the extra pdf files as indicated.
 
All the figures to look at will pop-up in a condensed replay "ana_monitor_(run).pdf. If additionnal check need to be done, open the extra pdf files as indicated.
 +
Extra monitoring: Ana/Results/cointime_(run).pdf, Ana/Results/kinematics_(run).pdf, Ana/Results/kinematics2D_(run).pdf, Ana/Results/positions_(run).pdf, Ana/Results/exclusivity_(run).pdf
  
 +
1) Look at the coincidence time distribution for ROC2: if no peak is found there is a problem. If no peak is found near 0 and/or no peak for the red curve, change the time shift in ANA_CUTS.input and replay the analyzer.
  
• Timing
+
2) Kinematic distributions
 
 
Extra monitoring: Ana/Results/cointime_(run).pdf
 
 
 
→ Look at the coincidence time distribution for ROC2: if no peak is found there is a problem. If no peak is found near 0 and/or no peak for the red curve, change the time shift in ANA_CUTS.input and replay the analyzer.
 
 
 
→ Check the quality of the peak finder and the fitting
 
 
 
→ Compare β and missing mass distributions to reference
 
 
 
 
 
Kinematic distributions
 
 
 
Extra monitoring: Ana/Results/kinematics_(run).pdf and Ana/Results/kinematics2D_(run).pdf
 
 
 
→ Compare the figures with reference plots for each kinematic setting.
 
 
 
→ Check also  Ana/Results/positions_(run).pdf if something strange. If the HMS and SHMS positions don't match expectation from run plan, figure out why and/or call an expert.
 
 
 
• Exclusivity distributions
 
 
 
Extra monitoring: Ana/Results/exclusivity_(run).pdf (multipage)
 
 
 
→ Compare selected data exclusivity distributions to the reference
 
 
 
→ Check if there are 2 missing mass peaks on the missing mass and squared missing mass distributions corresponding to 0 mass and π° mass, compare to the reference
 
 
 
 
 
• Analysis root data
 
 
 
Check if a root file has been created and contains data:
 
 
 
> root -l Ana/files/HallCdata_(run).root
 
 
 
> (root) > HallCTree->GetEntries();
 
 
 
> (root) > HallCTree->Show(0);
 
  
The number of entry depends on the number of events processed, but should be significant if cuts are properly set. The event 0 display contains reasonnable values (check other events in case). Write  it down as run comment on the  
+
3) Exclusivity distributions: check missing mass fit. One or two peaks have to be found, the main one being at M(pi)^2. If not, check why and if it cannot be understood quickly call the RC.
checklist if there is a problem.
 

Latest revision as of 22:42, 25 July 2019

Instructions for analysis shifts / VCS E12-15-001 experiment

• Connect to cdaql1: ssh cdaql1 and go to /home/cdaq/vcs2019/hallc_replay_vcs

Warning: from this directory, please don't make any modifications on the source code. If you want to do tests or modify things, go to github and fork to your personnal directory. The source code is available from: https://github.com/JeffersonLab/hallc_replay_vcs Before starting to run it after getting your fork, run: "getstarted.sh"

Kinematic setting

- For each new run, the file: DBASE/COIN/standard.kinematics is updated. Check regularly if it is the case: electron momentum needs attention.

- If needed to manually enter a new run, type new values for: beam energy (in principle it won't change), target mass (amu), HMS and SHMS central momentum and angle, particle mass detected in each arm (in principle, it won't change: proton in HMS, electron in SHMS). Note that the names of arm variable start with letter "h" for HMS and "p" for SHMS.

Analysis monitoring

This step should be done by the TO. Any regular TO tasks have the highest priority over analysis replay and if target needs attention, the TO should just take care of the target and not do the analysis replays.

- After ~100,000 events run the "partial" analysis replay:

> ./run_partial_replay.csh (run number) (# events) (process = elastic, vcs...) (target = LH2 or dummy)

After the partial replay is finished, you should check the run table to make sure the singles yields in the HMS and SHMS are consistent with the previous runs. The appropriate command for this is:

> ./make_vcs_table

After the run is finished, the full replay will start automatically. Do not run the partial replay after that as it will overwrite the database entries made by the full replay.

If a more in-depth analysis needed or if you need to change a cut in analysis (see below the time delay), you can start the analysis program directly.

  • Changing a cut: edit Ana/ANA_CUTS.input (write a note if you need to change another cut than the coincidence time delay).
  • Changing histogram limits or binning: edit Ana/ANA_HIST.input
  • Please don't change any source code in this directory.

To run the analyzer only:

> ./run_ana_only.csh (run number) (# events) (process = elastic, vcs...) (target = LH2 or dummy)

The source code is in the Ana directory. Read instructions on Ana/README.txt if you would like to run directly the code.

Things to check

At the end of the job, databases will be built. Coincidence analysis information to check will be visible on the terminal. Follow the steps:

  • Database printout:

- First things to check is if the luminosity has been measured the same from HMS and SHMS.

- Then check timing information: is the delay set properly? Is the main timing peak found when fitting much larger in term of number of events than accidentals? Is the number of events in peak subtracted from the accidentals significant?

- Missing mass distribution (kinematic dependent): 3 lines correspond to possible 3 found peaks in the squared missing mass. The first line should show a peak at M(pi°)^2. If not something is wrong and write a note about it for this run, check at the monitoring plots if there is a peak. If no peak found in this missing mass squared distribution it may be a major issue such as being offset. -> CONTACT RC

For most of the kinematics: peak at 0 mass need more statistics and background studies to be visible, it might have been found by the fitter code.

  • Monitoring figures:

All the figures to look at will pop-up in a condensed replay "ana_monitor_(run).pdf. If additionnal check need to be done, open the extra pdf files as indicated. Extra monitoring: Ana/Results/cointime_(run).pdf, Ana/Results/kinematics_(run).pdf, Ana/Results/kinematics2D_(run).pdf, Ana/Results/positions_(run).pdf, Ana/Results/exclusivity_(run).pdf

1) Look at the coincidence time distribution for ROC2: if no peak is found there is a problem. If no peak is found near 0 and/or no peak for the red curve, change the time shift in ANA_CUTS.input and replay the analyzer.

2) Kinematic distributions

3) Exclusivity distributions: check missing mass fit. One or two peaks have to be found, the main one being at M(pi)^2. If not, check why and if it cannot be understood quickly call the RC.