Skip to content
Snippets Groups Projects

Add a section documenting how to do an S-curve Analysis to run.md

2 unresolved threads
+ 40
1
@@ -87,4 +87,43 @@ Apart from the lines automatically added at the end of the run, you might need t
- if the data taking went wrong, type "no" in the "GOOD run?" field, otherwise type yes;
- unless you copied the run data to the shared `eos` folder, type "no" in the "DATA in EOS?" field;
- paste a link to your elog in the "elog" field;
- if you have run results, e.g. plots, paste a link to them in the "Results" field.
\ No newline at end of file
- if you have run results, e.g. plots, paste a link to them in the "Results" field.
# Specific Scans
## S-Curve Scan and Trimming
1. In the xDAQ interface (http://pcuclacvp13:20500/), go to "gem calibration Calibration" and select S-Curve Scan.
2. If you're doing trimming, set trimming source to "Same for all VFAT". You will take 5 total scans over the trimming values {-63,-31,0,31,63}, which you must manually input for each scan at the bottom of the webpage. If not doing trimming, set trimming source to "From Config DB"
3. Apply settings in xDAQ and reconfigure. Start the local readout as outlined in the "Data taking" section. Then, hit "Run" in the xDAQ S-curves webpage.
4. In the terminal with the local readout, you should see Rx begin incrementing after the run is started. When this number stops incrementing (should take 4ish minutes), the run is done.
5. Once the run is done, stop the local readout with ctrl+C.
6. Change to another window and cd to `/home/gempro/me0-stack-ng/cmsgemos-analysis` for analysis.
7. Combine the output files (where ${ID} is the 3-digit run id printed after you stop the local readout):
```bash
cat /mnt/data/integration/me0stack/online/00000${ID}/*.zst > /mnt/data/integration/me0stack/compressed/00000${ID}-be:fe:00:00:05:c7.raw.zst
```
8. Set the environment variabe with the name of your output in the following format:
Please register or sign in to reply
```bash
RUN=yyyymmdd_hhmm
```
If doing trimming (where ## is your trim value), instead do:
```bash
RUN=yyyymmdd_hhmm/trim_##
```
9. Read the raw data:
```bash
../cmsgemos/_build/_install/bin/gem-raw-to-histogram /tmp/scurve_${RUN} /mnt/data/integration/me0stack/compressed/00000${ID}-be:fe:00:00:05:c7.raw.zst -a scurve -t amc
```
10. Analyze the data:
```bash
gemos analyze scurves /tmp/scurve_${RUN} ../data/scurve_${RUN} -m /home/gempro/me0_stack/cmsgemos-analysis/vfat_me0stack.txt -c /home/gempro/all_vfats.csv -u fC -p full
```
11. View the plots located in `/home/gempro/me0-stack-ng/data/scurve_${RUN}/plots`. If doing trimming, repeat steps 1-10 for all trimming values, then proceed to steps 12-14.
12. Use the script [COMING SOON!] to do trimming analysis.
13. Use the script [ALSO COMING SOON!] to generate a new configuration with channel trimmings.
14. Load the new config onto the backend:
``` bash
scp /home/gempro/me0-stack-ng/config/history/vfat/${NEW_CONFIG}/fed1478-slot2/config-oh* gempro@ctp7-me0:/mnt/persistent/gempro/etc/cmsgemos/vfat/
```
Loading