Skip to content

Commit 19288ea

Browse files
authored
doc: add notes about helicity-latched charge (#85)
1 parent 2411022 commit 19288ea

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ if(qa.Pass(runnum, evnum)) {
370370
// accumulate FC charge (it will only accumulate once per QA bin you analyzed)
371371
qa.AccumulateCharge();
372372
373+
// if you want helicity-latched charge (from HEL::scaler), there is a similar method
374+
qa.AccumulateChargeHL();
375+
373376
/* continue your analysis here */
374377
}
375378
```
@@ -378,6 +381,11 @@ if(qa.Pass(runnum, evnum)) {
378381
```cpp
379382
// the total FC charge, filtered by the QA
380383
auto total_charge = qa.GetAccumulatedCharge();
384+
385+
// or the helicity-latched charge
386+
auto total_charge_for_positive_helicity = qa.GetAccumulatedChargeHL(1);
387+
auto total_charge_for_negative_helicity = qa.GetAccumulatedChargeHL(-1);
388+
auto total_charge_for_undefined_helicity = qa.GetAccumulatedChargeHL(0);
381389
```
382390
383391
> [!CAUTION]
@@ -507,6 +515,14 @@ bin that you include in your analysis. To help, you can either:
507515
* at the end of your event loop, the total accumulated charge you analyzed is
508516
given by `QADB::GetAccumulatedCharge()`
509517
518+
> [!NOTE]
519+
> Helicity-latched charge is accessed using similar methods:
520+
> - `QADB::AccumulateChargeHL()`, for each event
521+
> - `QADB::GetAccumulatedChargeHL(int state)` at the end, where `state` is the helicity: `1` or `-1` (or `0` for undefined helicity).
522+
>
523+
> Helicity-latched charge is not available for all datasets' QADBs; if you need it for a certain dataset where
524+
> it is not available, request it from the QADB maintainers.
525+
510526
> [!CAUTION]
511527
> For Pass 1 QA results for Run Groups A, B, K, and M, we find some
512528
> evidence that the charge from bin to bin may slightly overlap,

0 commit comments

Comments
 (0)