Analysis patterns — start workflow, run macros, inspect ROOT files, cross section calculation
1. CHECK → Verify remote server/tmux status (init())
2. PLAN → Create todo list from description
3. APPROVE → Ask user to confirm todo list
4. EXECUTE → Run tasks sequentially
5. REPORT → Summarize results + Discord notification
init() # Create/restore IDE layout
run("hostname && date") # Verify connection
run_output(5) # Check output
run("ls $WORKDIR/macro/*.C | wc -l") # Check macros exist
run_output(5)
If ROOT still running from previous job (run_busy() returns true):
run_kill())For "Run macro X":
For "Study X with Y files":
For "Compare X and Y":
I'll start the analysis: "<description>"
Todo list:
1. ☐ Check remote server/tmux status
2. ☐ [specific task based on description]
3. ☐ [specific task]
4. ☐ Fetch output
5. ☐ [optional: upload/log]
Is this todo list correct? May I proceed?
Do NOT proceed until user confirms.
User responses:
For each task:
in_progresscompleted| Description contains | Action |
|---|---|
| "X files" | Set file_count: X in params |
| "all files" | Set use_all: true |
| "simulation" | Set use_sim: true |
| "experimental" | Set use_exp: true |
| "6 GeV" | Set sixGeV_flag: true |
| "7 GeV" | Set sevenGeV_flag: true |
Analysis complete: "<description>"
Results:
- Events processed: X
- Selection efficiency: Y%
- Output: filename.pdf
Files:
- PDF: pic/filename.pdf
- ROOT: root/filename.root
Next steps?
- Upload QA to Discord
- Log to Notion
- Inspect ROOT file
One macro per step. Channel selection via JSON parameters.
Main pipeline (L1405/L1520):
studyVertexCut → templateFit → calcAcptRatio → applyAcptCorrection → calcXsec
Sub-pipeline (<CHANNEL> validation):
calc<CHANNEL>Acpt → calcXsec (<CHANNEL> mode)
See docs/analysis/pipeline.md for full I/O table.