Other analysis/cheatsheets

Table Of Contents

Previous topic

NuWa Recipes

Next topic

Hands-on Exercises

This Page

Daya Bay Links

Content Skeleton

Cheat Sheets

Loading the NuWa software

On the computer clusters you must load the software each time you log on. You can load the NuWa software using the nuwaenv command,

shell> nuwaenv -r trunk -O

The nuwaenv command can incorporate both shared releases and personal projects. For more information on using and configuring nuwaenv see: https://wiki.bnl.gov/dayabay/index.php?title=Environment_Management_with_nuwaenv.

In the end, nuwaenv is a way of automating the sourcing of the following shell commands. The examples given are for the pdsf cluster.

# bash shell
shell> cd /common/dayabay/releases/NuWa/trunk-opt/NuWa-trunk/
shell> source setup.sh
shell> cd dybgaudi/DybRelease/cmt/
shell> source setup.sh
# c-shell
shell> cd /common/dayabay/releases/NuWa/trunk-opt/NuWa-trunk/
shell> source setup.csh
shell> cd dybgaudi/DybRelease/cmt/
shell> source setup.csh

Installing the NuWa software

For the brave, you can attempt to install NuWa on your own computer. Try the following:

shell> mkdir nuwa
shell> cd nuwa
shell> svn export http:/ /dayabay.ihep.ac.cn/svn/dybsvn/installation/trunk/dybinst/dybinst
shell> ./dybinst trunk all

If you are very lucky, it will work. Otherwise, send questions to theta13-offline@dayabay.lbl.gov. Your chance of success will be much greater if your try to install NuWa on a computer running Scientific Linux or OS X.

Making your own Project

If you want add or modify a part of NuWa, you should create your own Project. This will allow you to create your own packages to add or replace those in NuWa. The first step is to create a subdirectory for your packages in some directory /path/to/myProjects:

shell> mkdir -p /path/to/myProjects/myNuWa/cmt

Create two files under myNuWa/cmt with the following content:

shell> more project.cmt
project myNuWa

use dybgaudi

build_strategy with_installarea
structure_strategy without_version_directory
setup_strategy root
shell> more version.cmt
v0

Now you can create new packages under the directory myNuWa/, and use them in addition to an existing NuWa installation. See section Write a C++ analysis Algorithm for more details.

You can also replace an existing NuWa package with you own modified version in myNuWa/. See section Modify Part of NuWa for more details.

Standard Data Files

A set of standard Daya Bay data files are available on the computer clusters. The following table provides the location of these files on each cluster:

Type Location
  Onsite Farm
daq. (.data) /dyb/spade/rawdata
daq. ??
  PDSF
daq. (.data) (In HPSS Archive)
daq. /eliza16/dayabay/nuwaData/exp,sim/dataTag/daq
calib. /eliza16/dayabay/nuwaData/exp,sim/dataTag/calib
recon. /eliza16/dayabay/nuwaData/exp,sim/dataTag/recon
coinc. /eliza16/dayabay/nuwaData/exp,sim/dataTag/coinc
spall. /eliza16/dayabay/nuwaData/exp,sim/dataTag/spall
  IHEP
daq. (.data)  
daq.  
recon.  
coinc.  
spall.  
  BNL
daq. (.data)  
daq.  
recon.  
coinc.  
spall.  

Using the Catalog

A Catalog tool is provided to locate the raw data files. Be sure to load NuWa before running this example (see section Loading the NuWa software). Here is a simple example to locate the raw data files for a run:

shell> python
Python 2.7 (r27:82500, Jan  6 2011, 05:00:16)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import DybPython.Catalog
>>> DybPython.Catalog.runs[8000]
['/eliza16/dayabay/data/exp/dayabay/2011/TestDAQ/NoTag/0430/daq.NoTag.0008000.Physics.EH1-Merged.SFO-1._0001.data']
>>> DybPython.Catalog.runs[8001]
['/eliza16/dayabay/data/exp/dayabay/2011/TestDAQ/NoTag/0430/daq.NoTag.0008001.Physics.EH1-Merged.SFO-1._0001.data']
>>> DybPython.Catalog.runs[8002]
['/eliza16/dayabay/data/exp/dayabay/2011/TestDAQ/NoTag/0430/daq.NoTag.0008002.Pedestal.EH1-WPI.SFO-1._0001.data', '/eliza16/dayabay/data/exp/dayabay/2011/TestDAQ/NoTag/0430/daq.NoTag.0008002.Pedestal.EH1-WPO.SFO-1._0001.data']

For more information, refer to the Catalog description wiki:https://wiki.bnl.gov/dayabay/index.php?title=Accessing_Data_in_a_Warehouse.

Data File Contents

The table below lists the known data paths and provides a short description of their contents.

Path Name Description
  Real and Simulated Data  
/Event/Readout ReadoutHeader Raw data produced by the experiment
/Event/CalibReadout CalibReadoutHeader Calibrated times and charges of PMT and RPC hits
/Event/Rec AdSimple Toy AD energy and position reconstruction
  AdQmlf AD Maximum-likelihood light model reconstruction
/Event/Tags   Standard tags for event identification
/Event/Tags/Coinc ADCoinc Tagged set of AD time- coincident events
/Event/Tags/Muon MuonAny Single muon trigger from any detector
  Muon/FirstMuonTrigger First trigger from a prompt set of muon triggers
  Retrigger Possible retriggering due to muon event
/Event/Data CalibStats Extra statistics calculated from calibrated data
/Event/Data/Coinc ADCoinc Summary data for sets of AD time-coincident events
/Event/Data/Muon Spallation Summary data for muon events and subsequent AD events
/Event/UserTags   User-defined event tags
/Event/UserData   User-defined data variables
  Simulated Data Only  
/Event/Gen GenHeader True initial position and momenta of simulated particles
/Event/Sim SimHeader Simulated track, interactions, and PMT/RPC hits (Geant)
/Event/Elec ElecHeader Simulated signals in the electronics system
/Event/Trig TrigHeader Simulated signals in the trigger system
/Event/SimReadout SimHeader Simulated raw data

Common NuWa Commands

This section provides a list of common nuwa.py commands. You must load the NuWa software before you can run these commands (see section Loading the NuWa software).

# Wrap raw DAQ files in ROOT tree:
shell> nuwa.py -n -1 -m"ProcessTools.LoadReadout"
          -o daq.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
          daq.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.data
# Generate Calibration Data
shell> nuwa.py -n -1 -m"Quickstart.Calibrate" -m"Tagger.CalibStats"
          -o calib.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
          daq.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
# Generate Reconstruction-only data files
shell> nuwa.py -n -1 -A"0.2s" -m"Quickstart.Calibrate" -m"Tagger.CalibStats"
          -m"Quickstart.Reconstruct"
          -m"SmartFilter.Clear" -m"SmartFilter.KeepRecon"
          -o recon.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
          daq.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
# Generate Spallation-only data files
shell> nuwa.py -n -1 -A"0.2s" -m"Quickstart.Calibrate" -m"Tagger.CalibStats"
          -m"Quickstart.Reconstruct"
          -m"Tagger.MuonTagger.MuonTag" -m"Tagger.MuonTagger.SpallData"
          -m"SimpleFilter.Keep /Event/Data/Muon/Spallation"
          -o spall.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
          daq.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
# Generate ADCoincidence-only data files
shell> nuwa.py -n -1 -m"Quickstart.Calibrate" -m"Tagger.CalibStats"
          -m"Quickstart.Reconstruct"
          -m"Tagger.CoincTagger.ADCoincTag" -m"Tagger.CoincTagger.ADCoincData"
          -m"SimpleFilter.Keep /Event/Data/Coinc/AD1CoincData /Event/Data/Coinc/AD2CoincData"
          -o coinc.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
          daq.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
# Generate ODM figures
shell> nuwa.py -n -1 --output-stats="{'file1':'odmHistograms.root'}"
          -m"AdBasicFigs.MakeFigs"
          -m"Quickstart.Calibrate" -m"Tagger.CalibStats"
          -m"AdBasicFigs.MakeCalibFigs"
          -m"MuonBasicFigs.MakeCalibFigs"
          -m"Quickstart.Reconstruct"
          -m"AdBasicFigs.MakeReconFigs"
          daq.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root

Conventions and Context

The following sections summarizes the conventions for sites, detectors, and other items used in the analysis software.

Sites

The site ID identifies the site location within the experiment.

Site C++/Python Name Number Description
Unknown kUnknown 0x00 Undefined Site
Daya Bay kDayaBay 0x01 Daya Bay Near Hall (EH-1)
Ling Ao kLingAo 0x02 Ling Ao Near Hall (EH-2)
Far kFar 0x04 Far Hall (EH-3)
Mid kMid 0x08 Mid Hall (Doesn’t exist)
Aberdeen kAberdeen 0x10 Aberdeen tunnel
SAB kSAB 0x20 Surface Assembly Building
PMT Bench Test kPMTBenchTest 0x40 PMT Bench Test at Dong Guan
All kAll (Logical OR of all sites) All sites

To access the site labels from Python, you can use the commands,

from GaudiPython import gbl
gbl.DayaBay.Detector # Access any class in library, then ENUMs are available
Site = gbl.Site
print Site.kDayaBay

For C++, the site labels can be accessed,

#include "Conventions/Site.h"
std::cout << Site::kDayaBay << std::endl;

The Site convention is defined in dybgaudi:DataModel/Conventions/Conventions/Site.h.

Detectors

The detector ID identifies the detector location within the site.

Detector C++/Python Name Number Description
Unknown kUnknown 0 Undefined Detector
AD stand 1 kAD1 1 Anti-neutrino detector on stand #1
AD stand 2 kAD2 2 Anti-neutrino detector on stand #2
AD stand 3 kAD3 3 Anti-neutrino detector on stand #3
AD stand 4 kAD4 4 Anti-neutrino detector on stand #4
Inner water pool kIWS 5 Inner water pool
Outer water pool kOWS 6 Outer water pool
RPC kRPC 7 Complete RPC assembly
All kAll 8 All detectors

To access the detector labels from Python, you can use the commands,

from GaudiPython import gbl
gbl.DayaBay.Detector # Access any class in library, then ENUMs are available
DetectorId = gbl.DetectorId
print DetectorId.kAD1

For C++, the detector labels can be accessed,

#include "Conventions/DetectorId.h"
std::cout << DetectorId::kAD1 << std::endl;

The Detector convention is defined in dybgaudi:DataModel/Conventions/Conventions/DetectorId.h.

Raw DAQ Data

Conversion from .data

The raw DAQ file can be wrapped in a ROOT tree. This allows you to histogram the raw data directly from ROOT, as shown in section Histogramming Raw DAQ data. The following command will wrap the data. In addition, ROOT will compress the raw data by almost half the original size. The file still contains the raw binary data; no event data conversion is performed.

shell> nuwa.py -n -1 -m"ProcessTools.LoadReadout"
          -o daq.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.root
          daq.NoTag.0005773.Physics.SAB-AD2.SFO-1._0001.data

Raw data in ROOT

The following table summarizes the raw data that is accessible directly from ROOT. All ROOT variables must be preceded by daqPmtCrate()..

Item ROOT Variable Description
site detector().site() Site ID number
detector detector().detectorId() Detector ID number
trigger type triggerType() All active triggers, logically OR’d
trigger time triggerTime().GetSeconds() Complete trigger time [seconds]
TDC time tdcs(board,*connector*,*adcGain*).values() Channel TDC values
ADC charge adcs(board,*connector*,*adcGain*).values() Channel ADC values
  gains(board,*connector*).values() Channel ADC Gain (1: Fine ADC, 2: Coarse ADC)
  preAdcRaws(board,*connector*,*adcGain*).values() Channel pre-ADC raw values
  peaks(board,*connector*,*adcGain*).values() Clock cycle (in 25ns) of ADC peak relative to TDC hit

Readout data in NuWa

Here is a cheat-sheet for processing raw data in Python. These lines can be used in the execute() function of a Python algorithm.

evt = self.evtSvc()

# Access the Readout Header.  This is a container for the readout data
readoutHdr = evt["/Event/Readout/ReadoutHeader"]
if readoutHdr == None:
    self.error("Failed to get current readout header")
    return FAILURE

# Access the Readout.  This is the data from one trigger.
readout = readoutHdr.daqCrate().asPmtCrate()
if readout == None:
    self.info("No readout this cycle")
    return SUCCESS

# Get the detector ID for this trigger
detector = readout.detector()
detector.detName()

# Trigger Type: This is an integer of the type for this trigger
readout.triggerType()
# Event Number: A count of the trigger, according to the DAQ
readout.eventNumber()

# Trigger Time: Absolute time of trigger for this raw data
triggerTime = readout.triggerTime()

# Loop over each channel data in this trigger
for channel in readout.channelReadouts():
    channelId = channel.channelId()

    # The channel ID contains the detector ID, electronics board number,
    # and the connector number on the board.
    channelId.detName()
    channelId.board()
    channelId.connector()

    # Loop over hits for this channel
    for hitIdx in range( channel.hitCount() ):
        # TDC data for this channel
        #
        # The TDC is an integer count of the time between the time
        # the PMT pulse arrived at the channel, and the time the
        # trigger reads out the data.  Therefore, a larger TDC =
        # earlier time.  One TDC count ~= 1.5625 nanoseconds.
        #
        tdc = channel.tdc( hitIdx )

        # ADC data for this channel
        #
        # The ADC is an integer count of the charge of the PMT
        # pulse.  It is 12 bits (0 to 4095).  There are two ADCs
        # for every PMT channel (High gain and Low gain).  Only
        # the high gain ADC is recorded by default.  If the high
        # gain ADC is saturated (near 4095), then the low gain ADC
        # is recorded instead.
        #
        # For the Mini Dry Run data, one PMT photoelectron makes
        # about 20 high gain ADC counts and about 1 low gain ADC
        # count.  There is an offset (Pedestal) for each ADC of
        # ~70 ADC counts (ie. no signal = ~70 ADC, 1 photoelectron
        # = ~90 ADC, 2 p.e. = ~110 ADC, etc.)
        #
        # The ADC peal cycle is a record of the clock cycle which had
        # the 'peak' ADC.
        #
        # ADC Gain: Here is a description of ADC gain for these values
        #  Unknown = 0
        #  High = 1
        #  Low = 2
        #
        adc = channel.adc( hitIdx )
        preAdc = channel.preAdcAvg( hitIdx )
        peakCycle = channel.peakCycle( hitIdx )
        isHighGain = channel.isHighGainAdc( hitIdx )

Calibrated Data

Calibrated data in ROOT

The following table summarizes the calibrated data visible directly in ROOT. Array items have their length given in the brackets (i.e. name[length]). ROOT will automatically draw all entries in the array given the array name. See the ROOT User’s Guide for more details on working with Trees, http://root.cern.ch/download/doc/12Trees.pdf.

Item ROOT Variable Description
site site Site ID number
detector detector Detector ID number
event number eventNumber Unique ID number for each triggered event in a run
trigger type triggerType All active triggers, logically OR’d
trigger time triggerTimeSec Trigger time: seconds from Jan. 1970 (unixtime)
  triggerTimeNanoSec Trigger time: nanoseconds from last second
AD PMT hits nHitsAD Number of AD PMT hits
  timeAD[nHitsAD] Calibrated time [ns] of PMT hit relative to trigger time
  chargeAD[nHitsAD] Calibrated charge [photoelectrons] of PMT hit
  hitCountAD[nHitsAD] Index of this hit for this PMT (0, 1, 2, ...)
  ring[nHitsAD] PMT ring in AD (counts 1 to 8 from AD bottom)
  column[nHitsAD] PMT column in AD (counts 1 to 24 counterclockwise)
Calib. PMT hits nHitsAD_calib Number of AD calibration PMT (2-inch) hits
  timeAD_calib[nHitsAD_calib] Calibrated time [ns] of PMT hit relative to trigger time
  chargeAD_calib[nHitsAD_calib] Calibrated charge [photoelectrons] of PMT hit
  hitCountAD_calib[nHitsAD_calib] Index of this hit for this PMT (0, 1, 2, ...)
  topOrBottom[nHitsAD_calib] PMT vertical position (1: AD top, 2: AD bottom)
  acuColumn[nHitsAD_calib] PMT radial position (ACU axis: A=1, B=2, C=3)
Water Pool PMT hits nHitsPool Number of Water Pool PMT hits
  timePool[nHitsPool] Calibrated time [ns] of PMT hit relative to trigger time
  chargePool[nHitsPool] Calibrated charge [photoelectrons] of PMT hit
  hitCountPool[nHitsPool] Index of this hit for this PMT (0, 1, 2, ...)
  wallNumber[nHitsPool] PMT wall number
  wallSpot[nHitsPool] PMT spot number in wall
  inwardFacing[nHitsPool] PMT direction (0: outward, 1: inward)

Calibrated data in NuWa

Here is a cheat-sheet for processing calibrated data in Python. These lines can be used in the execute() function of a Python algorithm.

evt = self.evtSvc()

# Access the Calib Readout Header.
# This is a container for calibrated data
calibHdr = evt["/Event/CalibReadout/CalibReadoutHeader"]
if calibHdr == None:
    self.error("Failed to get current calib readout header")
    return FAILURE

# Access the Readout.  This is the calibrated data from one trigger.
calibReadout = calibHdr.calibReadout()
if calibReadout == None:
    self.error("Failed to get calibrated readout from header")
    return FAILURE

# Get the detector ID for this trigger
detector = calibReadout.detector()
detector.detName()

# Trigger Type: This is an integer of the type for this trigger
calibReadout.triggerType()
# Trigger Number: A count of the trigger, according to the DAQ
calibReadout.triggerNumber()

# Trigger Time: Absolute time of trigger for this calibrated data
triggerTime = calibReadout.triggerTime()

# Loop over each channel data in this trigger
for channel in calibReadout.channelReadout():
    sensorId = channel.pmtSensorId()
    if detector.isAD():
       pmtId = AdPmtSensor( sensorId.fullPackedData() )
       pmtId.detName()
       pmtId.ring()
       pmtId.column()
    elif detector.isWaterShield():
       pmtId = PoolPmtSensor( sensorId.fullPackedData() )
       pmtId.detName()
       pmtId.wallNumber()
       pmtId.wallSpot()
       pmtId.inwardFacing()

    # Calibrated hit data for this channel
    for hitIdx in range( channel.size() ):
        # Hit time is in units of ns, and is relative to trigger time
        hitTime = channel.time( hitIdx )
        # Hit charge is in units of photoelectrons
        hitCharge = channel.charge( hitIdx )

Calibrated Statistics Data

Calibrated statistics data in ROOT

The following table summarizes the calibrated statistics data for each event visible directly in ROOT. Array items have their length given in the brackets (i.e. name[length]). ROOT will automatically draw all entries in the array given the array name. See the ROOT User’s Guide for more details on working with Trees, http://root.cern.ch/download/doc/12Trees.pdf.

ROOT Variable Description
dtLastAD1_ms Time since previous AD1 trigger [ms]
dtLastAD2_ms Time since previous AD2 trigger [ms]
dtLastIWS_ms Time since previous Inner water pool trigger [ms]
dtLastOWS_ms Time since previous Outer water pool trigger [ms]
dtLast_ADMuon_ms Time since previous AD event with greater than 20 MeV [ms]
dtLast_ADShower_ms Time since previous AD event with greater than 1 GeV [ms]
ELast_ADShower_pe Energy of last AD event with greater than 1 GeV [pe]
nHit Total number of hit 8-inch PMTS
nPEMedian Median charge (number of photoelectrons) on PMTs
nPERMS RMS of charge (number of photoelectrons) on PMTs
nPESum Total sum of charge (number of photoelectrons) on all PMTs
nPulseMedian Median number of hits on PMTs
nPulseRMS Median number of hits on PMTs
nPulseSum Total Sum of number of hits on all PMTs
tEarliest Earliest hit time on all PMTs [ns]
tLatest Latest hit time on all PMTS [ns]
tMean Mean hit time on all PMTS [ns]
tMedian Median hit time on all PMTS [ns]
tRMS RMS of hit time on all PMTS [ns]
charge_sum_flasher_max The maxima total charge collected for one PMT in one readout [PE] (sum over all possible hits)
time_PSD For hits in each AD, for time window between -1650 and -1250 ns, \frac{Nhit_{-1650,-1450}}{Nhit_{-1650,-1250}}.
time_PSD1 For hits in each AD, for time window between -1650 and -1250 ns, \frac{Nhit_{-1650,-1500}}{Nhit_{-1650,-1250}}.
time_PSD_local_RMS The RMS of the time of the first hit (also must be within -1650 and -1250) for 5x5 (or 4x5 for PMTs at the top or bottom) PMTs around flaserh PMT [ns]
Q1 The total charge (within -1650 and -1250) of nearby \pm 3 columns PMTs (total 7 columns)
Q2 The total charge (within -1650 and -1250) of 4\to9 and -4\to-9 columns PMTs (total 12 columns)
Q3 The total charge (within -1650 and -1250) of PMTs for the rest of columns (other than those in Q1 and Q2)
flasher_flag “1-time_PSD + 1- time_PSD1 + Q3/Q2*2 + nPEMax/nPESum + time_PSD_local_RMS/100” A combination to select flaserh. Flashers: flasher_flag>2.4
EarlyCharge The charge sum in time window t<-1650ns
LateCharge The charge sum in time window t>-1250ns
NominalCharge The charge sum in time window -1650ns<t<-1250ns, See Doc6926
MaxQ The largest charge fraction of PMTs
maxqRing The ring number of the MaxQ PMT
maxqCol The column number of the MaxQ PMT
QuadrantQ1 Total charge of PMTs with column number in [maxqCol-2, maxqCol+3]). For the value in this range expression, if columnNumber<=0, then columnNumber=columnNumber+24; if columnNumber>24, then columnNumber=columnNumber-24.
QuadrantQ2 Total charge of PMTs with column number in [(maxqCol+6)-2,(maxqCol+6)+3])
QuadrantQ3 Total Charge of PMTs with column number in [(maxq+12)-2, (maxqCol+12)+3])
QuadrantQ4 Total Charge of PMTs with column number in [(maxq+18)-2, (maxqCol+18)+3])
Quadrant The ratio of QuadrantQ3/(QuadrantQ2 + QuadrantQ4)
MainPeakRMS According to the location of MaxQ PMT, divide 24 columns into two clusters. MainPeak cluster: [maxqCol-5, maxqCol+6]. SecondPeak cluster: [(maxqCol+12)-5, (maxqCol+12)+6]. For each cluster: use ring/column number as x and y values, define a 2-D peak RMS = sqrt(RMSx*RMSx + RMSy*RMSy).
SecondPeakRMS See description in MainPeakRMS.
PeakRMS The sum of MainPeakRMS and SecondPeakRMS
RingKurtosis Kurtosis of charge weighted distance in the Ring dimension for the MainPeak cluster, see Doc6956
ColumnKurtosis Kurtosis of charge weighted distance in the Column dimension for the MainPeak cluster
Kurtosis Sum of RingKurtosis and ColumnKurtosis
MiddleTimeRMS RMS of PMT first hit time in the time window (-1650ns, -1250ns). This time window should match the window used in NominalCharge definition.
integralRunTime_ms ‘DAQ Running time’ from the start of the file up to the current trigger
integralLiveTime_buffer_full_ms ‘DAQ Livetime’ from the start of the file up to the current trigger. The ‘DAQ Livetime’ is the ‘DAQ runtime’ with a per-detector minor correction for electronics ‘blocked trigger’ periods.
integralLiveTime_blocked_trigger_ms ‘DAQ Livetime’, using an alternate correction for ‘blocked trigger’ periods
blocked_trigger A count of the ‘blocked triggers’ immediately preceding the current trigger. When the electronics/trigger system cannot cope with the current data rates, it will automatically stop issuing new triggers (automatic deadtime). The first trigger issued after the system has recovered includes a count of triggers that should have been issued during the trigger deadtime. When this number is >0, then you know that there are some triggers that were missed immediately preceding this trigger.
buffer_full_flag This flag is true if the electronics memory buffers filled immediately preceding this trigger. If ‘blocked_trigger’ is not also > 0, then this memory problem did not result in trigger deadtime.

Calibrated statistics data in NuWa

Here is a cheat-sheet for processing calibrated statistics data in Python. These lines can be used in the execute() function of a Python algorithm.

evt = self.evtSvc()

# Access the Calibrated Statistics Data Header.
# This is a container for calibrated statistics data
calibStats = evt["/Event/Data/CalibStats"]
if calibStats == None:
    self.debug("No calibrated statistics!")
    return FAILURE

# Access the Calibrated statistics data
nPESum = calibStats.get('nPESum').value()

Reconstructed Data

Reconstructed data in ROOT

The following table summarizes the reconstructed data visible directly in ROOT. Reconstruction can optionally estimate an energy, a position, and/or a track direction. The status variables should be checked to determine whether reconstruction has successfully set any of these quantities.

Item ROOT Variable Description
site site Site ID number
detector detector Detector ID number
trigger type triggerType All active triggers, logically added
trigger time triggerTimeSec Trigger time count in seconds from Jan. 1970 (unixtime)
  triggerTimeNanoSec Trigger time count of nanoseconds from last second
energy energyStatus Status of energy reconstruction (0: unknown, 1: good, >1: failures)
  energy reconstructed energy [MeV]
  energyQuality Measure of fit quality (\chi^2, likelihood, etc.)
position positionStatus Status of position reconstruction (0: unknown, 1: good, >1: failures)
  x reconstructed x position [mm] in AD, Water Pool, or RPC coordinates
  y reconstructed y position [mm] in AD, Water Pool, or RPC coordinates
  z reconstructed z position [mm] in AD, Water Pool, or RPC coordinates
  positionQuality Measure of fit quality (\chi^2, likelihood, etc.)
direction directionStatus Status of track reconstruction (0: unknown, 1: good, >1: failures)
  dx reconstructed dx track direction in AD, Water Pool, or RPC coordinates
  dy reconstructed dy track direction in AD, Water Pool, or RPC coordinates
  dz reconstructed dz track direction in AD, Water Pool, or RPC coordinates
  directionQuality Measure of fit quality (\chi^2, likelihood, etc.)
error matrix errorMatrixDim Dimension of error matrix (0 if not set)
  errorMatrix Array of error matrix elements

Reconstructed data in NuWa

Here is a cheat-sheet for processing reconstructed data in Python. These lines can be used in the execute() function of a Python algorithm.

evt = self.evtSvc()

# Access the Recon Header.  This is a container for the reconstructed data
reconHdr = evt["/Event/Rec/AdSimple"]
if reconHdr == None:
    self.error("Failed to get current recon header")
    return FAILURE

result = reconHdr.recTrigger()

# Get the detector ID for this trigger
detector = result.detector()
detector.detName()

# Trigger Type: This is an integer of the type for this trigger
result.triggerType()
# Trigger Number: A count of the trigger, according to the DAQ
result.triggerNumber()

# Trigger Time: Absolute time of trigger for this raw data
triggerTime = result.triggerTime()

# Energy information
result.energyStatus()
result.energy()
result.energyQuality()

# Position information
result.positionStatus()
result.position().x()
result.position().y()
result.position().z()
result.positionQuality()

# Direction information, for tracks
result.directionStatus()
result.direction().x()
result.direction().y()
result.direction().z()
result.directionQuality()

# Covariance Matrix, if one is generated
result.errorMatrix()

Spallation Data

Spallation data in ROOT

The following table summarizes the spallation data visible directly in ROOT. Array items have their length given in the brackets (i.e. name[length]). ROOT will automatically draw all entries in the array given the array name. See the ROOT User’s Guide for more details on working with Trees, http://root.cern.ch/download/doc/12Trees.pdf.

ROOT Variable Description
tMu_s Timestamp of this muon event (seconds part)
tMu_ns Timestamp of this muon event (nanoseconds part)
dtLastMu_ms Time since previous muon event [ms]
dtNextMu_ms Time to next muon event [ms]
hitAD1 Did AD1 have a prompt trigger for this muon?
hitAD2 Did AD2 have a prompt trigger for this muon?
hitAD3 Did AD3 have a prompt trigger for this muon?
hitAD4 Did AD4 have a prompt trigger for this muon?
hitIWS Did the Inner water pool have a prompt trigger for this muon?
hitOWS Did the Outer water pool have a prompt trigger for this muon?
hitRPC Did the RPC have a prompt trigger for this muon?
triggerNumber_AD1 Trigger number of prompt AD1 muon trigger (if exists)
triggerNumber_AD2 Trigger number of prompt AD2 muon trigger (if exists)
triggerNumber_AD3 Trigger number of prompt AD3 muon trigger (if exists)
triggerNumber_AD4 Trigger number of prompt AD4 muon trigger (if exists)
triggerNumber_IWS Trigger number of prompt IWS muon trigger (if exists)
triggerNumber_OWS Trigger number of prompt OWS muon trigger (if exists)
triggerNumber_RPC Trigger number of prompt RPC muon trigger (if exists)
triggerType_AD1 Trigger type of prompt AD1 muon trigger (if exists)
triggerType_AD2 Trigger type of prompt AD2 muon trigger (if exists)
triggerType_AD3 Trigger type of prompt AD3 muon trigger (if exists)
triggerType_AD4 Trigger type of prompt AD4 muon trigger (if exists)
triggerType_IWS Trigger type of prompt IWS muon trigger (if exists)
triggerType_OWS Trigger type of prompt IWS muon trigger (if exists)
triggerType_RPC Trigger type of prompt IWS muon trigger (if exists)
dtAD1_ms Time since first prompt muon trigger [ms]
dtAD2_ms Time since first prompt muon trigger [ms]
dtAD3_ms Time since first prompt muon trigger [ms]
dtAD4_ms Time since first prompt muon trigger [ms]
dtIWS_ms Time since first prompt muon trigger [ms]
dtOWS_ms Time since first prompt muon trigger [ms]
dtRPC_ms Time since first prompt muon trigger [ms]
calib_nPESum_AD1 CalibStats charge sum from prompt muon trigger
calib_nPESum_AD2 CalibStats charge sum from prompt muon trigger
calib_nPESum_AD3 CalibStats charge sum from prompt muon trigger
calib_nPESum_AD4 CalibStats charge sum from prompt muon trigger
calib_nPESum_IWS CalibStats charge sum from prompt muon trigger
calib_nPESum_OWS CalibStats charge sum from prompt muon trigger
nRetriggers Total number of possible retriggers
detectorId_rt[nRetriggers] Possible retrigger detector ID
dtRetrigger_ms[nRetriggers] Time of retrigger relative to first prompt muon trigger
triggerNumber_rt[nRetriggers] Trigger number of retrigger
triggerType_rt[nRetriggers] Trigger type of retrigger
calib_nPESum_rt[nRetriggers] Total charge sum of retrigger
nSpall Number of AD triggers between this muon and next muon
detectorId_sp[nSpall] Detector ID of AD trigger
triggerNumber_sp[nSpall] Trigger number of AD trigger
triggerType_sp[nSpall] Trigger type of AD trigger
dtSpall_ms[nSpall] Time between AD trigger and first prompt muon trigger [ms]
energyStatus_sp[nSpall] AD energy reconstruction status
energy_sp[nSpall] AD reconstructed energy [MeV]
positionStatus_sp[nSpall] AD position reconstruction status
x_sp[nSpall] AD reconstructed X position [mm]
y_sp[nSpall] AD reconstructed Y position [mm]
z_sp[nSpall] AD reconstructed Z position [mm]

Spallation data in NuWa

Here is a cheat-sheet for processing spallation data in Python. These lines can be used in the execute() function of a Python algorithm.

evt = self.evtSvc()

# Access the Spallation Data Header.
# This is a container for muon spallation data
spallData = evt["/Event/Data/Muon/Spallation"]
if spallData == None:
    self.debug("No spallation data this cycle")
    return SUCCESS

# Access the spallation data
nSpall = spall.get('nSpall').value()

Coincidence Data

Coincidence data in ROOT

The following table summarizes the coincidence data visible directly in ROOT. Array items have their length given in the brackets (i.e. name[length]). ROOT will automatically draw all entries in the array given the array name. See the ROOT User’s Guide for more details on working with Trees, http://root.cern.ch/download/doc/12Trees.pdf.

ROOT Variable Description
multiplicity Number of AD events within coincidence window
triggerNumber[multiplicity] Trigger number of event
triggerType[multiplicity] Trigger type of event
t_s[multiplicity] Timestamp of event (seconds part)
t_ns[multiplicity] Timestamp of event (nanoseconds part)
dt_ns[multiplicity] Time relative to first event in multiplet
energyStatus[multiplicity] Status of AD energy reconstruction
e[multiplicity] Reconstructed energy [MeV]
positionStatus[multiplicity] Status of AD position reconstruction
x[multiplicity] AD Reconstructed X position [mm]
y[multiplicity] AD Reconstructed Y position [mm]
z[multiplicity] AD Reconstructed Z position [mm]
I[mult*(mult-1)/2] Prompt helper array for ROOT histogramming
J[mult*(mult-1)/2] Delayed helper array for ROOT histogramming
dtLastAD1_ms[multiplicity] Time since last muon in AD1 [ms]
dtLastAD2_ms[multiplicity] Time since last muon in AD2 [ms]
dtLastIWS_ms[multiplicity] Time since last muon in Inner water pool [ms]
dtLastOWS_ms[multiplicity] Time since last muon in Outer water pool [ms]
dtLast_ADMuon_ms Time since previous AD event above 3200 pe (20 MeV) [ms]
dtLast_ADShower_ms Time since previous AD event above 160000 pe (1 GeV) [ms]
ELast_ADShower_pe Energy of last AD event with greater than 160000 pe [pe]
calib_nHit[multiplicity] CalibStats data
calib_nPEMedian[multiplicity] CalibStats data
calib_nPERMS[multiplicity] CalibStats data
calib_nPESum[multiplicity] CalibStats data
calib_nPulseMedian[multiplicity] CalibStats data
calib_nPulseRMS[multiplicity] CalibStats data
calib_nPulseSum[multiplicity] CalibStats data
calib_tEarliest[multiplicity] CalibStats data
calib_tLatest[multiplicity] CalibStats data
calib_tMean[multiplicity] CalibStats data
calib_tMedian[multiplicity] CalibStats data
calib_tRMS[multiplicity] CalibStats data
gen_count[multiplicity] Monte-Carlo truth generator data
gen_e[multiplicity] Monte-Carlo truth generator data
gen_execNumber[multiplicity] Monte-Carlo truth generator data
gen_lastDaughterPid[multiplicity] Monte-Carlo truth generator data
gen_pid[multiplicity] Monte-Carlo truth generator data
gen_px[multiplicity] Monte-Carlo truth generator data
gen_py[multiplicity] Monte-Carlo truth generator data
gen_pz[multiplicity] Monte-Carlo truth generator data
gen_type[multiplicity] Monte-Carlo truth generator data

Coincidence data in NuWa

Here is a cheat-sheet for processing coincidence data in Python. These lines can be used in the execute() function of a Python algorithm.

evt = self.evtSvc()

# Access the Coincidence Data Header.
# This is a container for AD coincidence data
coincHdr = evt["/Event/Data/Coinc/AD1Coinc"]
if coincHdr == None:
    self.debug("No coincidence header this cycle")
    return SUCCESS

# Access the Coincidence Data
dt_ms = coinc.get('dt_ms').value()

NuWa Services

(Add documentation for common services here.)

Computer Clusters

(Add details for each computer cluster here.)

Miscellaneous

Time Axes in ROOT

The following lines will display a time axis in a human-readable format using Beijing local time.

root [3] htemp->GetXaxis()->SetTimeDisplay(1);
root [4] htemp->GetXaxis()->SetTimeFormat("#splitline{%H:%M:%S}{%d\/%m\/%Y}");
root [5] htemp->GetXaxis()->SetNdivisions(505);
root [6] htemp->GetXaxis()->SetTimeOffset(8*60*60);
root [7] htemp->Draw("colz");