The REC:: Bank Family¶
Every reconstructed CLAS12 event is a collection of REC::* banks. They fall into three
groups:
- Event-level metadata — one row per event, global to the trigger.
- The particle list — one row per reconstructed particle.
- Detector-level banks — one row per detector response, linked back to a particle
via
pindex. See Cross-bank linking viapindex.
The column listings below come from the CLAS12 reconstruction schema definitions. The
descriptions match the per-column documentation in the CLAS12 cook pipeline. At
runtime you can always introspect a schema with dict.getSchema("REC::Particle").show()
to confirm the layout in the file you're reading.
REC::Event — event-level metadata¶
One row per event, so always read row 0.
| Field | Type | Description |
|---|---|---|
category |
long | Trigger category |
topology |
long | Event topology encoding |
beamCharge |
float | Gated beam charge at this event (nC) |
liveTime |
double | Detector live-time fraction |
startTime |
float | Event start time, RF-corrected (ns) |
RFTime |
float | Raw RF time (ns) |
helicity |
byte | Beam helicity ±1 (HWP-corrected), else undefined |
helicityRaw |
byte | Beam helicity ±1 before HWP correction |
procTime |
float | UNIX processing time (s) |
Typical uses: cut on liveTime, split by helicity for asymmetry measurements, use
startTime as the time origin for TOF calculations.
auto list = reader.getBanks({"REC::Event"});
auto& evt = list[0];
const int helicity_col = evt.getSchema().getEntryOrder("helicity");
while (reader.next(list)) {
if (evt.getRows() == 0) continue;
int h = evt.getInt(helicity_col, 0);
if (h == 1) /* … */;
}
REC::Particle — the particle list¶
One row per reconstructed particle. This is the bank every analysis touches.
| Field | Type | Description |
|---|---|---|
pid |
int | Assigned PDG particle ID (11, 211, 2212, 22, …) |
px,py,pz |
float | Momentum components (GeV) |
vx,vy,vz |
float | Vertex position (cm) |
vt |
float | RF- and z-corrected vertex time (ns) |
charge |
byte | Particle charge (−1, 0, +1) |
beta |
float | β = v/c measured by TOF (negative if not measured) |
chi2pid |
float | χ² of the assigned PID (timing- and Cherenkov-based) |
status |
short | Detector-combination code (see below) |
status — which detectors saw the particle¶
The status field encodes the detector combination that produced the particle. The
magnitude tells you the primary detector system:
abs(status) range |
Detector system | Notes |
|---|---|---|
[1000, 2000) |
Forward Tagger | Low-angle photons and electrons |
[2000, 4000) |
Forward Detector | DC + FTOF + EC/PCAL + HTCC/LTCC |
[4000, …) |
Central Detector | CVT + CTOF + CND |
Combinations (e.g., a FD particle with a FT match) raise the value — consult the CLAS12 analysis note for your pass if the exact decoding matters. For most cuts, the range-based test is enough:
const int status_col = parts.getSchema().getEntryOrder("status");
int s = std::abs(parts.getInt(status_col, row));
bool in_fd = s >= 2000 && s < 4000;
pid vs. chi2pid¶
pid is a discrete label; chi2pid is the underlying PID confidence. A common
high-purity cut is:
int pid = parts.getInt(pid_col, row);
float chi2pid = parts.getFloat(chi2pid_col, row);
if (std::abs(pid) == 211 && std::abs(chi2pid) < 3.0f) { /* good π */ }
Detector-level banks — one row per response¶
Every detector bank has the same preamble: a pindex column pointing to a row in
REC::Particle, plus detector, sector, and (usually) layer, plus detector-specific
measurements. One particle can produce multiple rows in a detector bank (e.g., one track
can light up PCAL, EC inner, and EC outer — three rows in REC::Calorimeter, all with
the same pindex).
REC::Calorimeter¶
Responses in the electromagnetic calorimeter (PCAL, ECin, ECout). Key columns:
| Field | Description |
|---|---|
pindex |
Row in REC::Particle this hit belongs to |
detector, sector, layer |
PCAL / ECin / ECout, sector 1–6, layer within that |
energy |
Deposited energy (GeV) |
time |
Hit time (ns) |
path |
Vertex-to-hit path length (cm) |
x, y, z |
Hit position (cm) |
lu, lv, lw |
U/V/W distances — for fiducial cuts |
du, dv, dw |
Shower widths on U/V/W sides |
m2u, m2v, m2w |
2nd moments of the shower |
Typical use: sum energy across all PCAL+EC rows linked to the electron to build its
total calorimeter energy (see pindex linking).
REC::Scintillator¶
Responses in the FTOF (Forward) and CTOF (Central) scintillators.
| Field | Description |
|---|---|
pindex |
Link to REC::Particle |
detector, sector, layer, component |
FTOF/CTOF + sector + paddle info |
energy |
Deposited energy (GeV) |
time |
Hit time (ns) — the TOF measurement |
path |
Vertex-to-hit path length (cm) |
Typical use: the source of the beta column in REC::Particle, and used for more
refined hadron PID than chi2pid.
REC::Cherenkov¶
Responses in HTCC / LTCC / RICH.
| Field | Description |
|---|---|
pindex |
Link to REC::Particle |
detector, sector |
HTCC / LTCC / RICH ID + sector 1–6 |
nphe |
Number of photo-electrons detected |
dtheta, dphi |
Angular deviation of the matched track from the ring |
Typical use: nphe > 2 is the standard electron-ID threshold against pion contamination.
REC::Track¶
The reconstructed track-level summary. Tracking produces one row per track; that track
may or may not match a particle in REC::Particle.
| Field | Description |
|---|---|
pindex |
Link to REC::Particle (−1 if no match) |
detector, sector |
Tracker ID (DC for forward, CVT for central) |
q |
Charge from track curvature |
chi2, NDF |
Track-fit χ² and degrees of freedom |
REC::Traj¶
Sampled trajectory points along each track — positions and direction cosines at every detector plane the track crossed. Use it for fiducial cuts that need the track's entry position into a specific detector, not just the hit position.
| Field | Description |
|---|---|
pindex |
Link to REC::Particle |
detector, layer |
Which plane this sample is from |
x, y, z |
Trajectory position at that plane (cm) |
cx, cy, cz |
Direction cosines at that plane |
path |
Path length from the vertex to this sample (cm) |
edge |
Distance to the nearest detector-active-area edge (cm) |
edge is the standard input to fiducial cuts — e.g., edge > 10 cm rejects particles
near the detector boundaries where acceptance is poorly known.
Pass-specific bank variants¶
CLAS12 reconstruction writes three parallel families of banks into the same file:
REC::*— time-based reconstruction (the default output).RECHB::*— hit-based reconstruction (intermediate output, sometimes used for cross-checks or calibration).RECFT::*— Forward-Tagger reconstruction.
The column layouts are mostly shared but differ slightly. Pick the family that matches
the bank names in the file you're reading — reader.readDictionary(dict) followed by
dict.getSchemaList() will print every schema present.
Next¶
- Link detector responses back to particles → Cross-bank linking via
pindex - Filter on PID, charge, status → Recipes — Row filtering
- Introspect a file's schemas at runtime → Recipes — Listing Available Banks