##### Page tree
Go to start of banner

# RootTreeWriter

## General event variables:

One value per event

• runNumber (int)
Same for all events in one run
• eventNumber (int)
Starting at 0 and going to number of events -1
• eventTime (float)
BIF timestamp in unix time
• ahc_iEvt (int)
Starting at 1 and going to number of events (cross-check for eventNumber)
• ahc_nHits (int)
Number of hits per event
• ahc_nLayers (int)
Needs work: currently 100 for all events, meant to be the available number of layers from database
• ahc_energySum (float)
Summed up energy of all hits above threshold per event in MIP:
$//$
• ahc_energyDensity (float)
Energy of all hits in event divided by tile surface in MIP/mm2
$//$
Mean shower radius of an event in mm
$//$
Mean energy weighted shower radius using the layer-wise center of gravity in X and Y in mm
$//$
• ahc_cogX (float)
Center of gravity of event in X (perpendicular to beam axis) in mm with respect to the center of the detector
$//$
• ahc_cogY (float)
Center of gravity of event in Y (perpendicular to beam axis) in mm with respect to the center of the detector
$//$
• ahc_cogZ (float)
Center of gravity of event in Z (in beam direction) in mm with respect to the beginning of the first layer
$//$

## Layer-wise event variables:

Array of size of ahc_nLayers per event

• ahc_energyPerLayer (float)
Energy sum of all hits in one layer per event in MIP
• ahc_energyPerLayer_err (float)
Needs work: not yet saved in slcio files
• ahc_nHitsPerLayer (int)
Number of hits in one layer per event
• ahc_cogXPerLayer (float)
Center of gravity in X direction in mm in one layer per event
• ahc_cogYPerLayer (float)
Center of gravity in Y direction in mm in one layer per event
Mean shower radius of an event in mm per layer
Mean energy weighted shower radius of an event per layer in mm

## Hit variables:

Array of size of ahc_nHits per event

• ahc_hitEnergy (float)
Pedestal-subtracted and MIP-calibrated energy of the hit
• ahc_cellSize (int)
Side length of hit scintillator tile in mm
• ahc_hitPos (float)
3 arrays of size ahc_nHits, one each for X, Y and Z: ahc_hitPos[0] is the position in X direction, ahc_hitPos[1] is Y, ahc_hitPos[2] is Z
Hit position in mm in X, Y and Z with respect to the center of the detector (for X, Y) or the beginning of the first layer (for Z)
• ahc_hitI (int)
Number of hit scintillator tile in X direction (going from 1 to 24)
• ahc_hitJ (int)
Number of hit scintillator tile in Y direction (going from 1 to 24)
• ahc_hitK (int)
Number of hit scintillator tile in Z direction (corresponds to the layer number, going from 1 to ahc_nLayers)
• ahc_hitCellID (int)

Encoded IJK information of the hit
Radial distance from center of gravity of event in x and y in mm
$//$
• ahc_hitEnergyDensity (float)
Hit energy divided by surface of hit scintillator tile in MIP/mm2
$//$
• ahc_hitType (int)
Definition: GainBit*100 + memoryCell
Information on high gain (1) / low gain (0) and memory cell (0 to 15)
• ahc_hitTime (float)
reference-subtracted and ns-calibrated time of the hit

## 5-layer variables:

• Variables for first five layers
• Only counts hits outside a radius of 280mm except for the center of gravity calculation

• No labels