Polarized Helium-3 Experiments

From HallCWiki
Revision as of 16:48, 2 October 2019 by Mrehfuss (Talk | contribs) (ROOT Tree Variables)

Jump to: navigation, search

Pol He-3 Analysis Resources

E12-06-121 (d2n) and E12-06-110 (A1n) Dissertations

E06-014 Dissertations

Related E06-014 Publications

A1n/d2n Analysis Logbooks

When a user clicks on one of the three logbooks under that link, they will be
prompted for a "Login name:", "Full name:" and "Email:".  For the login name
they must put their JLab user name.  After hitting save, they will be
prompted to login.  Use the JLab user name and password here.
  • Contact Brad S. or Steve W. if you have problems.

Hall C analyzer documentation (Pol 3He Specific)

  • Please feel welcome to use the Hall C Slack Channel if you have questions/issues.
    • Anyone should be able to join if they use their @jlab.org email address
    • If that doesn't work, try this Invitation link.

General Analysis / Farm Notes

  • Then move on to the Tuesday 'Hall C' sessions starting with the git howto:
    • Effective Git use (*) -- Steve Wood
    • Folks really do need to understand how to work with git. They should follow up on the tutorials/howtos Steve mentions in his talk before moving on.

Survey Group Information

  • All Survey & Alignment Group results **should** be here
 https://www.jlab.org/accel/survalign/documents/dthallc.htm
  • However, that page is not always kept current. I've put copies of PolHe3 data (2019--2020) transmittals I have here as well:
 https://hallcweb.jlab.org/doc-private/ShowDocument?docid=1114

Special Runs

Calibrations

Students / PostDocs write the section then an Expert validates the procedure

I expect to break each detector/calibration out into its own wiki page as they mature, but for now I think it is best to work on this single (big) page until we have settled on a "good" template.

Basic Template for each Detector/Calibration Procedure

For each detector subsystem we would like to capture/document the following information:

  • A list of all (or at least the most useful) ROOT tree variables associated with this detector
  • Description of the calibration algorithm (That is, how is it supposed to work -- what is the logic behind it?)
  • Files involved in the calibration
    • THc* or THa* modules that are needed/used
    • Database files that will be modified
    • Scripts that will be used
    • Dependencies of this calibration
      • Reference time cuts should be verified
      • FADC 'hit selection' timing cuts should be verified
      • Calorimeter calibration relies on good optics calibration for momentum determination
      • If tight timing cuts are used, then the hodoscopes may need to be calibrated first, etc
      • ... etc
  • Provide a step-by-step "Howto" that shows
    • What commands/scripts need to be run, in what order.
    • How do you verify that various cuts (ref times, trigger types, etc) are correct before you run the script(s)?
    • What do you look for to verify that the code has run correctly after you run the script(s)?
  • Common Pitfalls / Things to watch for
    • I have found it useful in the past to provide a list of common symptoms and solutions that people may run into.

Drift Chambers

  • Expert: Deb, Bill Henry
  • Student:

Hodoscopes

  • Expert: Carlos Yero, Deb Biswas, Bill Henry
  • Student: Mingyu
  • The hodoscope calibration scripts are in hallc_replay/CALIBRATION/hms_hodo_calib and hallc_replay/CALIBRATION/shms_hodo_calib
  • Carlos Yero wrote a pretty thorough guide to the calibration procedure on DocDB as well as some nice slides from the 2018 analysis workshop
  • Here are the steps for the HMS. The procedure is the same for the SHMS.
  1. Set the flag htofusinginvadc = 0 to NOT use the hodo parameters from the previous hodoscope calibration procedure. This flag is found on hallc_replay/PARAM/HMS/HODO/ directory.
  2. Replay a run with 1–2 million events.
  3. In the directory hallc_replay/CALIBRATION/hms_hodo_calib/, run the following code:
    • root -l timeWalkHistos.C(<run_num>)
    • This script takes as input the ROOTfile replayed and creates another ROOTfile with histogram objects that are used to perform the time-walk correction.
  4. To do the time-walk corrections, run the following code:
    • root -l timeWalkCalib.C(<run_num>)
    • This script takes as input the ROOTfile containing the histogram objects produced by the previous script. A parameter file containing the time-walk parameters will be produced at
      • hallc_replay/PARAM/HMS/HODO/hhodo_TWcalib_runNUM.param
    • Rename this file hhodo_TWcalib.param
  5. Replay the raw data file, once again (1 - 2 M events), with the updated time-walk parameters.
  6. In the hodoscopoe calibration directory, run the following code:
    • root -l fitHodoCalib.C
    • The first part of this script performs a linear fit on the time-walk corrected time vs. hodoscope track to determine the propagation velocity and the cable time difference across each paddle.
    • The second part of this code solves a matrix equation for the lambda parameters mentioned in Carlos's guide.
    • A parameter file containing the time-walk parameters will be produced at
      • hallc_replay/PARAM/HMS/HODO/hhodo_Vpcalib_runNUM.param
    • Rename this file hhodo_Vpcalib.param
  7. Replay the raw data one last time, and check the hodoscope beta distribution.
    • You may have to apply a calorimeter cut (for example, H.cal.etottracknorm>0.7) to get a clean sample. A good calibration should have beta centered at 1.

Calorimeter

  • Expert: Simona
  • Student: Melanie
  • Simona's slides on calorimeter analysis/calibration: [1]
  • The calorimeter calibration scripts are in hallc_replay/CALIBRATION/hms_cal_calib and hallc_replay/CALIBRATION/shms_cal_calib
  • Slides from the 2017 and 2018 analysis workshops are here [2], [3]

How to perform calibration

  1. Replay a run with HCANA and include the following branches
    • HMS
      • H.cal.1pr.goodNegAdcPulseInt
      • H.cal.1pr.goodPosAdcPulseInt
      • H.cal.2ta.goodNegAdcPulseInt
      • H.cal.2ta.goodPosAdcPulseInt
      • H.cal.3ta.goodNegAdcPulseInt
      • H.cal.3ta.goodPosAdcPulseInt
      • H.cal.4ta.goodNegAdcPulseInt
      • H.cal.4ta.goodPosAdcPulseInt
      • H.cal.nclust
      • H.dc.ntrack
      • H.dc.x_fp
      • H.dc.y_fp
      • H.dc.xp_fp
      • H.dc.yp_fp
      • H.gtr.p
      • H.gtr.dp
      • H.cer.npeSum
      • H.hod.beta
    • SHMS
      • P.cal.pr.goodNegAdcPulseInt
      • P.cal.pr.goodPosAdcPulseInt
      • P.cal.fly.goodAdcPulseInt
      • P.dc.x_fp
      • P.dc.y_fp
      • P.dc.xp_fp
      • P.dc.yp_fp
      • P.dc.ntrack
      • P.gtr.p
      • P.gtr.dp
      • P.hgcer.npeSum
      • P.ngcer.npeSum
      • P.hod.beta
      • P.cal.nclust
      • P.cal.ntracks
      • P.cal.fly.nclust
      • P.cal.fly.ntracks
  1. Create a ROOTfiles directory in the calibration directory (hms_cal_calib or shms_cal_calib)
  2. Modify the input file to select cuts (beta, delta, cherenkov)
  3. Run the calibration script from HCANA .x cal_calib.cpp+("prefix_root_file")

Gas Cerenkovs

  • Expert: Simona
  • Student: Melanie

ROOT Tree Variables

SHMS Heavy Gas Cherenkov (HGC or "hgcer") and Noble Gas Cherenkov (NGC or "ngcer")

  • P.h(n)gcer.npeSum
  • P.h(n)gcer.totNumAdcHits
  • P.h(n)gcer.totNumGoodAdcHits
  • P.h(n)gcer.totNumTracksFired
  • P.h(n)gcer.totNumTracksMatched
  • P.h(n)gcer.xAtCer
  • P.h(n)gcer.yAtCer


  • T.shms.pH(N)GCER_adcMultiplicity
  • T.shms.pH(N)GCER_adcPed
  • T.shms.pH(N)GCER_adcPedRaw
  • T.shms.pH(N)GCER_adcPulseAmp
  • T.shms.pH(N)GCER_adcPulseAmpRaw
  • T.shms.pH(N)GCER_adcPulseInt
  • T.shms.pH(N)GCER_adcPulseIntRaw
  • T.shms.pH(N)GCER_adcPulseTime
  • T.shms.pH(N)GCER_adcPulseTimeRaw


  • T.shms.pH(N)GCER_tdcMultiplicity
  • T.shms.pH(N)GCER_tdcTime
  • T.shms.pH(N)GCER_tdcTimeRaw


  • Ndata.P.h(n)gcer.adcCounter
  • P.h(n)gcer.adcCounter
  • Ndata.P.h(n)gcer.adcErrorFlag
  • P.h(n)gcer.adcErrorFlag
  • Ndata.P.h(n)gcer.adcPed
  • P.h(n)gcer.adcPed
  • Ndata.P.h(n)gcer.adcPedRaw
  • P.h(n)gcer.adcPedRaw
  • Ndata.P.h(n)gcer.adcPulseAmp
  • P.h(n)gcer.adcPulseAmp
  • Ndata.P.h(n)gcer.adcPulseAmpRaw
  • P.h(n)gcer.adcPulseAmpRaw
  • Ndata.P.h(n)gcer.adcPulseInt
  • P.h(n)gcer.adcPulseInt
  • Ndata.P.h(n)gcer.adcPulseIntRaw
  • P.h(n)gcer.adcPulseIntRaw
  • Ndata.P.h(n)gcer.adcPulseTime
  • P.h(n)gcer.adcPulseTime
  • Ndata.P.h(n)gcer.adcPulseTimeRaw
  • P.h(n)gcer.adcPulseTimeRaw
  • Ndata.P.h(n)gcer.goodAdcHitUsed
  • P.h(n)gcer.goodAdcHitUsed
  • Ndata.P.h(n)gcer.goodAdcMult
  • P.h(n)gcer.goodAdcMult
  • Ndata.P.h(n)gcer.goodAdcPed
  • P.h(n)gcer.goodAdcPed
  • Ndata.P.h(n)gcer.goodAdcPulseAmp
  • P.h(n)gcer.goodAdcPulseAmp
  • Ndata.P.h(n)gcer.goodAdcPulseInt
  • P.h(n)gcer.goodAdcPulseAmp
  • Ndata.P.h(n)gcer.goodAdcPulseIntRaw
  • P.h(n)gcer.goodAdcPulseInt
  • Ndata.P.h(n)gcer.goodAdcPulseTime
  • P.h(n)gcer.goodAdcPulseTime
  • Ndata.P.h(n)gcer.goodAdcTdcDiffTime
  • P.h(n)gcer.goodAdcTdcDiffTime


  • Ndata.P.h(n)gcer.npe
  • P.h(n)gcer.npe
  • Ndata.P.h(n)gcer.numAdcHits
  • P.h(n)gcer.numAdcHits
  • Ndata.P.h(n)gcer.numGoodAdcHits
  • P.h(n)gcer.numGoodAdcHits
  • Ndata.P.h(n)gcer.numTracksFired
  • P.h(n)gcer.numGoodAdcHits
  • Ndata.P.h(n)gcer.numTracksMatched
  • P.h(n)gcer.numTracksMatched

Calibration Algorithm

  • There are two methods used to calibrate the gas Cherenkovs:
    • The first - most straightforward - method is to identify the single photo-electron (SPE) peak from the ADC readout (and the oscilloscope). The pulse amplitudes of the PMTs are read out using FADCs and integrated to produce the pulse integrals. These histograms are then fitted along the range of the SPE signal to find the mean, which gives the number of picocoulombs for 1 photo-electron. This is the "adc_to_npe" calibration coefficient, which is then manually added to the parameter files located in hallc_replay/PARAM/HMS/CER/hcer_calib.param for the HMS and hallc_replay/PARAM/SHMS/HGCER/phgcer_calib.param for the SHMS HGC
      • Identifying SPE signals requires only very little light, so beam isn't needed. These calibrations are done using cosmics
      • See Simona Malace's elog entry on an HMS cherenkov calibration
    • Clear SPE spectra hasn't been attainable with the SHMS NGC, so a second method is used to calibrate it. This is done for each PMT at a time by selecting electrons whose Cherenkov light was reflected on one PMT only. A calorimeter cut, timing cut, graphical X and Y cuts at the mirror planes, and cuts to ensure that very low pulse integrals are seen on all other PMTs (except for the one under calibration) are all needed. Once these are applied, the pulse integral histograms are fitted to get the number of photoelectrons (npe = μ²/σ²) and then the expected integral per single photo-electron (spe = μ/npe), which is the "adc_to_npe" calibration coefficient manually added to the parameter file located in hallc_replay/PARAM/SHMS/NGCER/pngcer_calib.param
      • See Simona Malace's elog entry on an SHMS NGC cherenkov calibration for a more thorough explanation
      • See also Burcu Duran's notes on this type of calibration, a student who's done extensive PID studies with the NGC for the J/Psi experiment: SHMS NGCER Calib.pdf
  • Once these calibration constants are found and implemented, replaying the run should result in the npe distribution with the single photo-electron peak centered around 1 (H.cer.npe[0] {H.cer.goodAdcMult[0]==1} for example, in the first elog post above, where indices [0] and [1] correspond to one of the two PMTs in the HMS cherenkov)

Needed Files

  • The calibration scripts for the gas cherenkovs are located in: hallc_replay/hms_cer_calib for the HMS gas cherenkov and hallc_replay/shms_hgcer_calib for the SHMS heavy gas cherenkov.
  • You will need to have replayed either the HMS or SHMS run, depending on which calibration you're doing, so that the appropriate root file has been generated.
    • If the -all option was used, then the file will be in the form of: (s)hms_replay_production_all_XXXX_-1.root where XXXX is the run number
    • If a certain number of events was chosen, then the file will be in the form of: (s)hms_replay_production_XXXX__XXXX.root with the run number and number of events

How to Run the Calibration

  • First, always remember to load the Pol He3 software to properly set your environment: source /group/c-polhe3/software/setup.sh
  • For the HMS gas cherenkov calibration, go to /hallc_replay/CALIBRATION/hms_cer_calib and type root -l "run_cal.C(RunNum,NumEvents)" where -1 is an option for NumEvents if a full replay was done
    • You will be prompted to enter 1 if it was a coincidence run. For our experiments, it won't be. Enter 0.
    • Enter showall when prompted to "enter options for calibration."
    • The ADC-to-NPE conversion value will be outputted to the terminal for PMT 1 and PMT 2, and can be seen as the mean displayed in the Pulse Integral histograms.
    • You'll be asked if you want to update the calibration constants with the better estimate. If you type "y," then a new parameters file called hcer_calib_XXXX.param for that specific run number will be generated and stored in hallc_replay/PARAM/HMS/CER

Common Issues

Aerogel (Not in use for this run)

Optics

  • Expert: Mark Jones
  • Post-Doc: Jixie

EDTM

BPM / Raster

  • Expert: Mark Jones
  • Student: Mingyu

BCM

  • Expert: Dave Mack
  • Student: Melanie

Acceptance

  • Expert: Mark Jones
  • Student: Murchanna

...

hcana Analyzer Variable Names

This is a rough list of the hcana variable names. This is a subset only, and may not include the variables you need/want.

  • I just ran my old script on a recent'ish hcana code base (Spring 2020) to extract the following dictionary.

The output should be close to waht you get online by running the following command:

  • FIXME: add command/instructions for online printout

NOTE: This is just a general reference. Look at the replay.C file (or equivalent) to understand what the object names are for your detector class. There are classes and variables here that will NOT be in a typical ROOT file.

THcAerogel (THcAerogel.cxx)

    RVarDef vars[] = {
      {"posGain", "Positive PMT gains", "fPosGain"},
      {"negGain", "Negative PMT gains", "fNegGain"},

      {"numPosAdcHits",        "Number of Positive ADC Hits Per PMT",      "fNumPosAdcHits"},        // Aerogel occupancy
      {"totNumPosAdcHits",     "Total Number of Positive ADC Hits",        "fTotNumPosAdcHits"},     // Aerogel multiplicity
      {"numNegAdcHits",        "Number of Negative ADC Hits Per PMT",      "fNumNegAdcHits"},        // Aerogel occupancy
      {"totNumNegAdcHits",     "Total Number of Negative ADC Hits",        "fTotNumNegAdcHits"},     // Aerogel multiplicity
      {"totnumAdcHits",       "Total Number of ADC Hits Per PMT",          "fTotNumAdcHits"},        // Aerogel multiplicity

      {"posAdcPedRaw",       "Positive Raw ADC pedestals",        "frPosAdcPedRaw.THcSignalHit.GetData()"},
      {"posAdcPulseIntRaw",  "Positive Raw ADC pulse integrals",  "frPosAdcPulseIntRaw.THcSignalHit.GetData()"},
      {"posAdcPulseAmpRaw",  "Positive Raw ADC pulse amplitudes", "frPosAdcPulseAmpRaw.THcSignalHit.GetData()"},
      {"posAdcPulseTimeRaw", "Positive Raw ADC pulse times",      "frPosAdcPulseTimeRaw.THcSignalHit.GetData()"},
      {"posAdcPed",          "Positive ADC pedestals",            "frPosAdcPed.THcSignalHit.GetData()"},
      {"posAdcPulseInt",     "Positive ADC pulse integrals",      "frPosAdcPulseInt.THcSignalHit.GetData()"},
      {"posAdcPulseAmp",     "Positive ADC pulse amplitudes",     "frPosAdcPulseAmp.THcSignalHit.GetData()"},
      {"posAdcPulseTime",    "Positive ADC pulse times",          "frPosAdcPulseTime.THcSignalHit.GetData()"},

      {"negAdcPedRaw",       "Negative Raw ADC pedestals",        "frNegAdcPedRaw.THcSignalHit.GetData()"},
      {"negAdcPulseIntRaw",  "Negative Raw ADC pulse integrals",  "frNegAdcPulseIntRaw.THcSignalHit.GetData()"},
      {"negAdcPulseAmpRaw",  "Negative Raw ADC pulse amplitudes", "frNegAdcPulseAmpRaw.THcSignalHit.GetData()"},
      {"negAdcPulseTimeRaw", "Negative Raw ADC pulse times",      "frNegAdcPulseTimeRaw.THcSignalHit.GetData()"},
      {"negAdcPed",          "Negative ADC pedestals",            "frNegAdcPed.THcSignalHit.GetData()"},
      {"negAdcPulseInt",     "Negative ADC pulse integrals",      "frNegAdcPulseInt.THcSignalHit.GetData()"},
      {"negAdcPulseAmp",     "Negative ADC pulse amplitudes",     "frNegAdcPulseAmp.THcSignalHit.GetData()"},
      {"negAdcPulseTime",    "Negative ADC pulse times",          "frNegAdcPulseTime.THcSignalHit.GetData()"},
      { 0 }
    };
    RVarDef vars[] = {
      {"apos",            "Positive Raw ADC Amplitudes",            "fA_Pos"},
      {"aneg",            "Negative Raw ADC Amplitudes",            "fA_Neg"},
      {"apos_p",          "Positive Ped-subtracted ADC Amplitudes", "fA_Pos_p"},
      {"aneg_p",          "Negative Ped-subtracted ADC Amplitudes", "fA_Neg_p"},
      {"tpos",            "Positive Raw TDC",                       "fT_Pos"},
      {"tneg",            "Negative Raw TDC",                       "fT_Neg"},
      {"ntdc_pos_hits",   "Number of Positive Tube Hits",           "fNTDCPosHits"},
      {"ntdc_neg_hits",   "Number of Negative Tube Hits",           "fNTDCNegHits"},
      {"posadchits",      "Positive ADC hits",                      "fPosADCHits.THcSignalHit.GetPaddleNumber()"},
      {"negadchits",      "Negative ADC hits",                      "fNegADCHits.THcSignalHit.GetPaddleNumber()"},
      {"postdchits",      "Positive TDC hits",                      "fPosTDCHits.THcSignalHit.GetPaddleNumber()"},
      {"negtdchits",      "Negative TDC hits",                      "fNegTDCHits.THcSignalHit.GetPaddleNumber()"},
      {"nGoodHits",       "Total number of good hits",              "fNGoodHits"},
      {"posNpeSixGev",    "Number of Positive PEs",                 "fPosNpeSixGev"},
      {"negNpeSixGev",    "Number of Negative PEs",                 "fNegNpeSixGev"},
      {"posNpeSumSixGev", "Total Number of Positive PEs",           "fPosNpeSumSixGev"},
      {"negNpeSumSixGev", "Total Number of Negative PEs",           "fNegNpeSumSixGev"},
      {"npeSumSixGev",    "Total Number of PEs",                    "fNpeSumSixGev"},
      { 0 }
    };
  RVarDef vars[] = {
    {"posAdcCounter",   "Positive ADC counter numbers",   "frPosAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"},
    {"negAdcCounter",   "Negative ADC counter numbers",   "frNegAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"},
    {"posAdcErrorFlag", "Error Flag for When FPGA Fails", "fPosAdcErrorFlag.THcSignalHit.GetData()"},
    {"negAdcErrorFlag", "Error Flag for When FPGA Fails", "fNegAdcErrorFlag.THcSignalHit.GetData()"},

    {"numGoodPosAdcHits",    "Number of Good Positive ADC Hits Per PMT", "fNumGoodPosAdcHits"},    // Aerogel occupancy
    {"numGoodNegAdcHits",    "Number of Good Negative ADC Hits Per PMT", "fNumGoodNegAdcHits"},    // Aerogel occupancy
    {"totNumGoodPosAdcHits", "Total Number of Good Positive ADC Hits",   "fTotNumGoodPosAdcHits"}, // Aerogel multiplicity
    {"totNumGoodNegAdcHits", "Total Number of Good Negative ADC Hits",   "fTotNumGoodNegAdcHits"}, // Aerogel multiplicity

    {"totnumGoodAdcHits",   "TotalNumber of Good ADC Hits Per PMT",      "fTotNumGoodAdcHits"},    // Aerogel multiplicity
    {"numTracksMatched",    "Number of Tracks Matched Per Region",       "fNumTracksMatched"},
    {"numTracksFired",      "Number of Tracks that Fired Per Region",    "fNumTracksFired"},
    {"totNumTracksMatched", "Total Number of Tracks Matched Per Region", "fTotNumTracksMatched"},
    {"totNumTracksFired",   "Total Number of Tracks that Fired",         "fTotNumTracksFired"},

    {"xAtAero",       "Track X at Aero diffusion box",    "fXAtAero"},
    {"yAtAero",       "Track Y at Aero diffusion box",    "fYAtAero"},

    {"posNpe",    "Number of Positive PEs",       "fPosNpe"},
    {"negNpe",    "Number of Negative PEs",       "fNegNpe"},
    {"posNpeSum", "Total Number of Positive PEs", "fPosNpeSum"},
    {"negNpeSum", "Total Number of Negative PEs", "fNegNpeSum"},
    {"npeSum",    "Total Number of PEs",          "fNpeSum"},

    {"goodPosAdcPed",         "Good Negative ADC pedestals",           "fGoodPosAdcPed"},
    {"goodPosAdcMult",         "Good Positive ADC mult",           "fGoodPosAdcMult"},
    {"goodPosAdcPulseInt",    "Good Negative ADC pulse integrals",     "fGoodPosAdcPulseInt"},
    {"goodPosAdcPulseIntRaw", "Good Negative ADC raw pulse integrals", "fGoodPosAdcPulseIntRaw"},
    {"goodPosAdcPulseAmp",    "Good Negative ADC pulse amplitudes",    "fGoodPosAdcPulseAmp"},
    {"goodPosAdcPulseTime",   "Good Negative ADC pulse times",         "fGoodPosAdcPulseTime"},
    {"goodPosAdcTdcDiffTime",   "Good Positive hodo Start - ADC pulse times",         "fGoodPosAdcTdcDiffTime"},

    {"goodNegAdcPed",         "Good Negative ADC pedestals",           "fGoodNegAdcPed"},
    {"goodNegAdcMult",         "Good Negative ADC Mult",           "fGoodNegAdcMult"},
    {"goodNegAdcPulseInt",    "Good Negative ADC pulse integrals",     "fGoodNegAdcPulseInt"},
    {"goodNegAdcPulseIntRaw", "Good Negative ADC raw pulse integrals", "fGoodNegAdcPulseIntRaw"},
    {"goodNegAdcPulseAmp",    "Good Negative ADC pulse amplitudes",    "fGoodNegAdcPulseAmp"},
    {"goodNegAdcPulseTime",   "Good Negative ADC pulse times",         "fGoodNegAdcPulseTime"},
    {"goodNegAdcTdcDiffTime",   "Good Negative hodo Start - ADC pulse times",         "fGoodNegAdcTdcDiffTime"},
    { 0 }
  };


THcBCMCurrent (THcBCMCurrent.cxx)

  RVarDef vars[] = {
    {"CurrentFlag",      "BCM current flag for good event", "fBCMflag"},
    {"bcm1.AvgCurrent",  "BCM1  average beam current",      "fBCM1avg"},
    {"bcm2.AvgCurrent",  "BCM2  average beam current",      "fBCM2avg"},
    {"bcm4a.AvgCurrent", "BCM4a average beam current",      "fBCM4aavg"},
    {"bcm4b.AvgCurrent", "BCM4b average beam current",      "fBCM4bavg"},
    {"bcm4c.AvgCurrent", "BCM4c average beam current",      "fBCM4cavg"},
    { 0 }
  };


THcCherenkov (THcCherenkov.cxx)

    RVarDef vars[] = {
      {"numAdcHits",      "Number of ADC Hits Per PMT", "fNumAdcHits"},        // Cherenkov occupancy
      {"totNumAdcHits",   "Total Number of ADC Hits",   "fTotNumAdcHits"},     // Cherenkov multiplicity
      {"adcPedRaw",       "Raw ADC pedestals",          "frAdcPedRaw.THcSignalHit.GetData()"},
      {"adcPulseIntRaw",  "Raw ADC pulse integrals",    "frAdcPulseIntRaw.THcSignalHit.GetData()"},
      {"adcPulseAmpRaw",  "Raw ADC pulse amplitudes",   "frAdcPulseAmpRaw.THcSignalHit.GetData()"},
      {"adcPulseTimeRaw", "Raw ADC pulse times",        "frAdcPulseTimeRaw.THcSignalHit.GetData()"},
      {"adcPed",          "ADC pedestals",              "frAdcPed.THcSignalHit.GetData()"},
      {"adcPulseInt",     "ADC pulse integrals",        "frAdcPulseInt.THcSignalHit.GetData()"},
      {"adcPulseAmp",     "ADC pulse amplitudes",       "frAdcPulseAmp.THcSignalHit.GetData()"},
      {"adcPulseTime",    "ADC pulse times",            "frAdcPulseTime.THcSignalHit.GetData()"},
      { 0 }
    };
  RVarDef vars[] = {
    {"adcCounter",   "ADC counter numbers",            "frAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"},
    {"adcErrorFlag", "Error Flag for When FPGA Fails", "fAdcErrorFlag.THcSignalHit.GetData()"},

    {"numGoodAdcHits",    "Number of Good ADC Hits Per PMT", "fNumGoodAdcHits"},    // Cherenkov occupancy
    {"totNumGoodAdcHits", "Total Number of Good ADC Hits",   "fTotNumGoodAdcHits"}, // Cherenkov multiplicity

    {"numTracksMatched",    "Number of Tracks Matched Per Region",       "fNumTracksMatched"},
    {"numTracksFired",      "Number of Tracks that Fired Per Region",    "fNumTracksFired"},
    {"totNumTracksMatched", "Total Number of Tracks Matched Per Region", "fTotNumTracksMatched"},
    {"totNumTracksFired",   "Total Number of Tracks that Fired",         "fTotNumTracksFired"},

    {"xAtCer",       "Track X at Cherenkov mirror",    "fXAtCer"},
    {"yAtCer",       "Track Y at Cherenkov mirror",    "fYAtCer"},

    {"npe",          "Number of PEs",                  "fNpe"},
    {"npeSum",       "Total Number of PEs",            "fNpeSum"},

    {"goodAdcPed",          "Good ADC pedestals",           "fGoodAdcPed"},
    {"goodAdcMult",          "Good ADC Multiplicity",           "fGoodAdcMult"},
    {"goodAdcHitUsed",          "Good ADC Hit Used",           "fGoodAdcHitUsed"},
    {"goodAdcPulseInt",     "Good ADC pulse integrals",     "fGoodAdcPulseInt"},
    {"goodAdcPulseIntRaw",  "Good ADC raw pulse integrals", "fGoodAdcPulseIntRaw"},
    {"goodAdcPulseAmp",     "Good ADC pulse amplitudes",    "fGoodAdcPulseAmp"},
    {"goodAdcPulseTime",    "Good ADC pulse times",         "fGoodAdcPulseTime"},
     {"goodAdcTdcDiffTime",    "Good Hodo Start - ADC pulse times",         "fGoodAdcTdcDiffTime"},
   { 0 }
  };


THcDC (THcDC.cxx)

  RVarDef vars[] = {
    { "stubtest", "stub test",  "fStubTest" },
    { "nhit", "Number of DC hits",  "fNhits" },
    { "tnhit", "Number of good DC hits",  "fNthits" },
    { "trawhit", "Number of true raw DC hits", "fN_True_RawHits" },
    { "ntrack", "Number of Tracks", "fNDCTracks" },
    { "nsp", "Number of Space Points", "fNSp" },
    { "track_nsp", "Number of spacepoints in track", "fDCTracks.THcDCTrack.GetNSpacePoints()"},
    { "x", "X at focal plane", "fDCTracks.THcDCTrack.GetX()"},
    { "y", "Y at focal plane", "fDCTracks.THcDCTrack.GetY()"},
    { "xp", "XP at focal plane", "fDCTracks.THcDCTrack.GetXP()"},
    { "yp", "YP at focal plane", "fDCTracks.THcDCTrack.GetYP()"},
    { "x_fp", "X at focal plane (golden track)", "fX_fp_best"},
    { "y_fp", "Y at focal plane( golden track)", "fY_fp_best"},
    { "xp_fp", "XP at focal plane (golden track)", "fXp_fp_best"},
    { "yp_fp", "YP at focal plane(golden track) ", "fYp_fp_best"},
    { "chisq", "chisq/dof (golden track) ", "fChisq_best"},
    { "sp1_id", " (golden track) ", "fSp1_ID_best"},
    { "sp2_id", " (golden track) ", "fSp2_ID_best"},
    { "InsideDipoleExit", " ","fInSideDipoleExit_best"},
    { "gtrack_nsp", " Number of space points in golden track ", "fNsp_best"},
    { "residual", "Residuals", "fResiduals"},
    { "residualExclPlane", "Residuals", "fResidualsExclPlane"},
    { "wireHitDid","Wire did have  matched track hit", "fWire_hit_did"},
    { "wireHitShould", "Wire should have matched track hit", "fWire_hit_should"},
    { 0 }
  };


THcDriftChamber (THcDriftChamber.cxx)

  RVarDef vars[] = {
    { "maxhits",     "Maximum hits allowed",    "fMaxHits" },
    { "spacepoints", "Space points of DC",      "fNSpacePoints" },
    { "nhit", "Number of DC hits",  "fNhits" },
    { "trawhit", "Number of True Raw hits", "fN_True_RawHits" },
    { "stub_x", "", "fSpacePoints.THcSpacePoint.GetStubX()" },
    { "stub_xp", "", "fSpacePoints.THcSpacePoint.GetStubXP()" },
    { "stub_y", "", "fSpacePoints.THcSpacePoint.GetStubY()" },
    { "stub_yp", "", "fSpacePoints.THcSpacePoint.GetStubYP()" },
    { "ncombos", "", "fSpacePoints.THcSpacePoint.GetCombos()" },
    { 0 }
  };


THcDriftChamberPlane (THcDriftChamberPlane.cxx)

  RVarDef vars[] = {
    {"raw.wirenum", "List of TDC wire number of all hits in DC",
     "fRawHits.THcDCHit.GetWireNum()"},
    {"wirenum", "List of TDC wire number (select first hit in TDc window",
     "fHits.THcDCHit.GetWireNum()"},
    {"rawnorefcorrtdc", "Raw TDC Values",
     "fHits.THcDCHit.GetRawNoRefCorrTime()"},
    {"rawtdc", "Raw TDC with reference time subtracted Values",
     "fHits.THcDCHit.GetRawTime()"},
    {"time","Drift times",
     "fHits.THcDCHit.GetTime()"},
    {"dist","Drift distancess",
     "fHits.THcDCHit.GetDist()"},
    {"nhit", "Number of hits", "GetNHits()"},
    { 0 }
  };


THcHallCSpectrometer (THcHallCSpectrometer.cxx)

  RVarDef vars[] = {
    { "tr.betachisq", "Chi2 of beta", "fTracks.THaTrack.GetBetaChi2()"},
    { "tr.PruneSelect", "Prune Select ID", "fPruneSelect"},
    { "present", "Trigger Type includes this spectrometer", "fPresent"},
    { 0 }
  };


THcHodoscope (THcHodoscope.cxx)

  RVarDef vars[] = {
    // Move these into THcHallCSpectrometer using track fTracks
    {"beta",       "Beta including track info",                "fBeta"},
    {"betanotrack",       "Beta from scintillator hits",                "fBetaNoTrk"},
    {"betachisqnotrack",  "Chi square of beta from scintillator hits",  "fBetaNoTrkChiSq"},
    {"fpHitsTime",        "Time at focal plane from all hits",            "fFPTimeAll"},
    {"starttime",         "Hodoscope Start Time",                         "fStartTime"},
    {"goodstarttime",     "Hodoscope Good Start Time (logical flag)",                    "fGoodStartTime"},
    {"goodscinhit",       "Hit in fid area",                              "fGoodScinHits"},
    {"TimeHist_Sigma",       "",                              "fTimeHist_Sigma"},
    {"TimeHist_Peak",       "",                              "fTimeHist_Peak"},
    {"TimeHist_Hits",       "",                              "fTimeHist_Hits"},
     { 0 }
  };


THcPrimaryKine (THcPrimaryKine.cxx)

  RVarDef vars[] = {
    { "Q2",      "4-momentum transfer squared (GeV^2)",     "fQ2" },
    { "omega",   "Energy transfer (GeV)",                   "fOmega" },
    { "W2",      "Invariant mass (GeV^2) for Mp      ",     "fW2" }, 
    { "W",      "Sqrt(Invariant mass)  for Mp      ",     "fW" }, 
    { "x_bj",    "Bjorken x",                               "fXbj" },
    { "scat_ang_rad",   "Scattering angle (rad)",                  "fScatAngle" },
    { "scat_ang_deg",   "Scattering angle (deg)",                  "fScatAngle_deg" },
    { "epsilon", "Virtual photon polarization factor",      "fEpsilon" },
    { "q3m",     "Magnitude of 3-momentum transfer",        "fQ3mag" },
    { "th_q",    "Theta of 3-momentum vector (rad)",        "fThetaQ" },
    { "ph_q",    "Phi of 3-momentum vector (rad)",          "fPhiQ" },
    { "nu",      "Energy transfer (GeV)",                   "fOmega" },
    { "q_x",     "x-cmp of Photon vector in the lab",       "fQ.X()" },
    { "q_y",     "y-cmp of Photon vector in the lab",       "fQ.Y()" },
    { "q_z",     "z-cmp of Photon vector in the lab",       "fQ.Z()" },
    { 0 }
  };


THcRaster (THcRaster.cxx)

  RVarDef vars[] = {
    {"frxaRawAdc",  "Raster XA raw ADC",    "FRXA_rawadc"},
    {"fryaRawAdc",  "Raster YA raw ADC",    "FRYA_rawadc"},
    {"frxbRawAdc",  "Raster XB raw ADC",    "FRXB_rawadc"},
    {"frybRawAdc",  "Raster YB raw ADC",    "FRYB_rawadc"},
    {"frxa_adc",  "Raster XA ADC",    "fXA_ADC"},
    {"frya_adc",  "Raster YA ADC",    "fYA_ADC"},
    {"frxb_adc",  "Raster XB ADC",    "fXB_ADC"},
    {"fryb_adc",  "Raster YB ADC",    "fYB_ADC"},
    {"fr_xa",  "Raster XA position",    "fXA_pos"},
    {"fr_ya",  "Raster YA position",    "fYA_pos"},
    {"fr_xb",  "Raster XB position",    "fXB_pos"},
    {"fr_yb",  "Raster YB position",    "fYB_pos"},
    {"fr_xbpm_tar",  "X BPM at target (+X is beam right)",    "fXbpm_tar"},
    {"fr_ybpm_tar",  "Y BPM at target (+Y is up)",    "fYbpm_tar"},
    {"fr_xbpmA",  "X BPM at BPMA (+X is beam right)",    "fXbpm_A"},
    {"fr_ybpmA",  "Y BPM at BPMA (+Y is up)",    "fYbpm_A"},
    {"fr_xbpmB",  "X BPM at BPMB (+X is beam right)",    "fXbpm_B"},
    {"fr_ybpmB",  "Y BPM at BPMB (+Y is up)",    "fYbpm_B"},
    {"fr_xbpmC",  "X BPM at BPMC (+X is beam right)",    "fXbpm_C"},
    {"fr_ybpmC",  "Y BPM at BPMC (+Y is up)",    "fYbpm_C"},
    {"ebeam_epics",  "Beam energy of epics variable HALLC:p",    "fEbeamEpics"},
    { 0 }
  };


THcScintillatorPlane (THcScintillatorPlane.cxx)

    RVarDef vars[] = {
      {"posAdcErrorFlag", "Error Flag for When FPGA Fails", "frPosAdcErrorFlag.THcSignalHit.GetData()"},
      {"negAdcErrorFlag", "Error Flag for When FPGA Fails", "frNegAdcErrorFlag.THcSignalHit.GetData()"},

      {"posTdcTimeRaw",      "List of positive raw TDC values.",           "frPosTdcTimeRaw.THcSignalHit.GetData()"},
      {"posAdcPedRaw",       "List of positive raw ADC pedestals",         "frPosAdcPedRaw.THcSignalHit.GetData()"},
      {"posAdcPulseIntRaw",  "List of positive raw ADC pulse integrals.",  "frPosAdcPulseIntRaw.THcSignalHit.GetData()"},
      {"posAdcPulseAmpRaw",  "List of positive raw ADC pulse amplitudes.", "frPosAdcPulseAmpRaw.THcSignalHit.GetData()"},
      {"posAdcPulseTimeRaw", "List of positive raw ADC pulse times.",      "frPosAdcPulseTimeRaw.THcSignalHit.GetData()"},

      {"posTdcTime",         "List of positive TDC values.",               "frPosTdcTime.THcSignalHit.GetData()"},
      {"posAdcPed",          "List of positive ADC pedestals",             "frPosAdcPed.THcSignalHit.GetData()"},
      {"posAdcPulseInt",     "List of positive ADC pulse integrals.",      "frPosAdcPulseInt.THcSignalHit.GetData()"},
      {"posAdcPulseAmp",     "List of positive ADC pulse amplitudes.",     "frPosAdcPulseAmp.THcSignalHit.GetData()"},
      {"posAdcPulseTime",    "List of positive ADC pulse times.",          "frPosAdcPulseTime.THcSignalHit.GetData()"},

      {"negTdcTimeRaw",      "List of negative raw TDC values.",           "frNegTdcTimeRaw.THcSignalHit.GetData()"},
      {"negAdcPedRaw",       "List of negative raw ADC pedestals",         "frNegAdcPedRaw.THcSignalHit.GetData()"},
      {"negAdcPulseIntRaw",  "List of negative raw ADC pulse integrals.",  "frNegAdcPulseIntRaw.THcSignalHit.GetData()"},
      {"negAdcPulseAmpRaw",  "List of negative raw ADC pulse amplitudes.", "frNegAdcPulseAmpRaw.THcSignalHit.GetData()"},
      {"negAdcPulseTimeRaw", "List of negative raw ADC pulse times.",      "frNegAdcPulseTimeRaw.THcSignalHit.GetData()"},

      {"negTdcTime",         "List of negative TDC values.",               "frNegTdcTime.THcSignalHit.GetData()"},
      {"negAdcPed",          "List of negative ADC pedestals",             "frNegAdcPed.THcSignalHit.GetData()"},
      {"negAdcPulseInt",     "List of negative ADC pulse integrals.",      "frNegAdcPulseInt.THcSignalHit.GetData()"},
      {"negAdcPulseAmp",     "List of negative ADC pulse amplitudes.",     "frNegAdcPulseAmp.THcSignalHit.GetData()"},
      {"negAdcPulseTime",    "List of negative ADC pulse times.",          "frNegAdcPulseTime.THcSignalHit.GetData()"},

      {"totNumPosAdcHits", "Total Number of Positive ADC Hits",   "fTotNumPosAdcHits"}, // Hodo+ raw ADC multiplicity Int_t
      {"totNumNegAdcHits", "Total Number of Negative ADC Hits",   "fTotNumNegAdcHits"}, // Hodo- raw ADC multiplicity  ""
      {"totNumAdcHits",   "Total Number of PMTs Hit (as measured by ADCs)",      "fTotNumAdcHits"},    // Hodo raw ADC multiplicity  ""

      {"totNumPosTdcHits", "Total Number of Positive TDC Hits",   "fTotNumPosTdcHits"}, // Hodo+ raw TDC multiplicity  ""
      {"totNumNegTdcHits", "Total Number of Negative TDC Hits",   "fTotNumNegTdcHits"}, // Hodo- raw TDC multiplicity  ""
      {"totNumTdcHits",   "Total Number of PMTs Hits (as measured by TDCs)",      "fTotNumTdcHits"},    // Hodo raw TDC multiplicity  ""
      { 0 }
    };
  RVarDef vars[] = {
    {"nhits", "Number of paddle hits (passed TDC && ADC Min and Max cuts for either end)",           "GetNScinHits() "},

    {"posTdcCounter", "List of positive TDC counter numbers.", "frPosTdcTimeRaw.THcSignalHit.GetPaddleNumber()"},   //Hodo+ raw TDC occupancy
    {"posAdcCounter", "List of positive ADC counter numbers.", "frPosAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"}, //Hodo+ raw ADC occupancy
    {"negTdcCounter", "List of negative TDC counter numbers.", "frNegTdcTimeRaw.THcSignalHit.GetPaddleNumber()"},     //Hodo- raw TDC occupancy
    {"negAdcCounter", "List of negative ADC counter numbers.", "frNegAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"},  //Hodo- raw ADC occupancy

    {"fptime", "Time at focal plane",     "GetFpTime()"},

    {"numGoodPosAdcHits",    "Number of Good Positive ADC Hits Per PMT", "fNumGoodPosAdcHits"},    // Hodo+ good ADC occupancy - vector<Int_t>
    {"numGoodNegAdcHits",    "Number of Good Negative ADC Hits Per PMT", "fNumGoodNegAdcHits"},   // Hodo- good ADC occupancy - vector <Int_t>

    {"numGoodPosTdcHits",    "Number of Good Positive TDC Hits Per PMT", "fNumGoodPosTdcHits"},    // Hodo+ good TDC occupancy - vector<Int_t>
    {"numGoodNegTdcHits",    "Number of Good Negative TDC Hits Per PMT", "fNumGoodNegTdcHits"},   // Hodo- good TDC occupancy - vector <Int_t>


    {"totNumGoodPosAdcHits", "Total Number of Good Positive ADC Hits",   "fTotNumGoodPosAdcHits"}, // Hodo+ good ADC multiplicity - Int_t
    {"totNumGoodNegAdcHits", "Total Number of Good Negative ADC Hits",   "fTotNumGoodNegAdcHits"}, // Hodo- good ADC multiplicity - Int_t
    {"totNumGoodAdcHits",   "TotalNumber of Good ADC Hits Per PMT",      "fTotNumGoodAdcHits"},    // Hodo good ADC multiplicity - Int_t

    {"totNumGoodPosTdcHits", "Total Number of Good Positive TDC Hits",   "fTotNumGoodPosTdcHits"}, // Hodo+ good TDC multiplicity - Int_t
    {"totNumGoodNegTdcHits", "Total Number of Good Negative TDC Hits",   "fTotNumGoodNegTdcHits"}, // Hodo- good TDC multiplicity - Int_t
    {"totNumGoodTdcHits",   "TotalNumber of Good TDC Hits Per PMT",      "fTotNumGoodTdcHits"},    // Hodo good TDC multiplicity - Int_t



    // {"GoodPaddle",         "List of Paddle Numbers (passed TDC && ADC Min and Max cuts for either end)",               "fHodoHits.THcHodoHit.GetPaddleNumber()"},

    {"GoodPosAdcPed",  "List of Positive ADC pedestals (passed TDC && ADC Min and Max cuts for either end)",           "fGoodPosAdcPed"}, //vector<Double_t>
    {"GoodNegAdcPed",  "List of Negative ADC pedestals (passed TDC && ADC Min and Max cuts for either end)",           "fGoodNegAdcPed"}, //vector<Double_t>
    {"GoodPosAdcMult",  "List of Positive ADC Mult (passed TDC && ADC Min and Max cuts for either end)",           "fGoodPosAdcMult"}, //vector<Double_t>
    {"GoodNegAdcMult",  "List of Negative ADC Mult (passed TDC && ADC Min and Max cuts for either end)",           "fGoodNegAdcMult"}, //vector<Double_t>
    {"GoodPosAdcHitUsed",  "List of Positive ADC Hit Used (passed TDC && ADC Min and Max cuts for either end)",           "fGoodPosAdcHitUsed"}, //vector<Double_t>
    {"GoodNegAdcHitUsed",  "List of Negative ADC Hit Used (passed TDC && ADC Min and Max cuts for either end)",           "fGoodNegAdcHitUsed"}, //vector<Double_t>

    {"GoodNegTdcTimeUnCorr",  "List of negative TDC values (passed TDC && ADC Min and Max cuts for either end)",        "fGoodNegTdcTimeUnCorr"},  //Units ns
    {"GoodNegTdcTimeCorr",    "List of negative corrected TDC values (corrected for PMT offset and ADC)",           "fGoodNegTdcTimeCorr"},
    {"GoodNegTdcTimeTOFCorr", "List of negative corrected TDC values (corrected for TOF)",                       "fGoodNegTdcTimeTOFCorr"},
    {"GoodNegTdcTimeWalkCorr", "List of negative corrected TDC values (corrected for Time-Walk)",                       "fGoodNegTdcTimeWalkCorr"},
    {"GoodNegAdcPulseInt",    "List of negative ADC values (passed TDC && ADC Min and Max cuts for either end)",    "fGoodNegAdcPulseInt"},
    {"GoodPosTdcTimeUnCorr",  "List of positive TDC values (passed TDC && ADC Min and Max cuts for either end)",        "fGoodPosTdcTimeUnCorr"},
    {"GoodPosTdcTimeCorr",    "List of positive corrected TDC values (corrected for PMT offset and ADC)",           "fGoodPosTdcTimeCorr"},
    {"GoodPosTdcTimeTOFCorr", "List of positive corrected TDC values (corrected for TOF)",                       "fGoodPosTdcTimeTOFCorr"},
    {"GoodPosTdcTimeWalkCorr", "List of positive corrected TDC values (corrected for Time-Walk)",                       "fGoodPosTdcTimeWalkCorr"},
    {"GoodPosAdcPulseInt",    "List of positive ADC values (passed TDC && ADC Min and Max cuts for either end)",    "fGoodPosAdcPulseInt"},
    {"GoodPosAdcPulseAmp",    "List of positive ADC peak amp (passed TDC && ADC Min and Max cuts for either end)",  "fGoodPosAdcPulseAmp"},
    {"GoodNegAdcPulseAmp",    "List of Negative ADC peak amp (passed TDC && ADC Min and Max cuts for either end)",  "fGoodNegAdcPulseAmp"},
    {"GoodPosAdcPulseTime",   "List of positive ADC time (passed TDC && ADC Min and Max cuts for either end)", "fGoodPosAdcPulseTime"},
    {"GoodNegAdcPulseTime",   "List of Negative ADC time (passed TDC && ADC Min and Max cuts for either end)", "fGoodNegAdcPulseTime"},
    {"GoodPosAdcTdcDiffTime",   "List of positive TDC - ADC time (passed TDC && ADC Min and Max cuts for either end)", "fGoodPosAdcTdcDiffTime"},
    {"GoodNegAdcTdcDiffTime",   "List of Negative TDC - ADC time (passed TDC && ADC Min and Max cuts for either end)", "fGoodNegAdcTdcDiffTime"},
    {"DiffDisTrack",   "Difference between track and scintillator position (cm)", "fHitDistance"},
    {"DiffDisTrackCorr",   "TW Corrected Dist Difference between track and scintillator position (cm)", "fGoodDiffDistTrack"},
    {"TrackXPos",   "Track X position at plane (cm)", "fTrackXPosition"},
    {"TrackYPos",   "Track Y position at plane (cm)", "fTrackYPosition"},
    {"NumClus",   "Number of clusters", "fNumberClusters"},
    {"Clus.Pos",   "Position of each paddle clusters", "fCluster.THcScintPlaneCluster.GetClusterPosition()"},
    {"Clus.Size",   "Size of each paddle clusters", "fCluster.THcScintPlaneCluster.GetClusterSize()"},
    {"Clus.Flag",   "Flag of each paddle clusters", "fCluster.THcScintPlaneCluster.GetClusterFlag()"},
    {"Clus.UsedFlag",   "USed Flag of each paddle clusters", "fCluster.THcScintPlaneCluster.GetClusterUsedFlag()"},
   //{"ngoodhits", "Number of paddle hits (passed tof tolerance and used to determine the focal plane time )",           "GetNGoodHits() "},
    { 0 }
  };


THcSecondaryKine (THcSecondaryKine.cxx)

  RVarDef vars[] = {
    { "th_xq",    "Polar angle of detected particle with q (rad)",
                  "fTheta_xq" },
    { "ph_xq",    "Azimuth of detected particle with scattering plane (rad)",
                  "fPhi_xq" },
    { "th_bq",    "Polar angle of recoil system with q (rad)", "fTheta_bq" },
    { "ph_bq",    "Azimuth of recoil system with scattering plane (rad)",
                  "fPhi_bq" },
    { "xangle",   "Angle of detected particle with scattered electron (rad)",
                  "fXangle" },
    { "pmiss",    "Missing momentum magnitude (GeV), nuclear physics "
                  "definition (-pB)", "fPmiss" },
    { "pmiss_x",  "x-component of p_miss wrt q (GeV)", "fPmiss_x" },
    { "pmiss_y",  "y-component of p_miss wrt q (GeV)", "fPmiss_y" },
    { "pmiss_z",  "z-component of p_miss, along q (GeV)", "fPmiss_z" },
    { "emiss_nuc",    "Missing energy (GeV), nuclear physics definition "
                  "omega-Tx-Tb", "fEmiss_nuc" },
    { "emiss",    "Missing energy (GeV), ENGINE definition "
                  "omega-Mt-Ex", "fEmiss" },
    { "Mrecoil",  "Invariant mass of recoil system (GeV)", "fMrecoil" },
    { "Erecoil",  "Total energy of recoil system (GeV)", "fErecoil" },
    { "Prec_x",   "x-component of recoil system in lab (GeV/c)", "fB.X()" },
    { "Prec_y",   "y-component of recoil system in lab (GeV/c)", "fB.Y()" },
    { "Prec_z",   "z-component of recoil system in lab (GeV/c)", "fB.Z()" },
    { "tx",       "Kinetic energy of detected particle (GeV)", "fTX" },
    { "tb",       "Kinetic energy of recoil system (GeV)", "fTB" },
    { "px_cm",    "Magnitude of X momentum in CM system (GeV)", "fPX_cm" },
    { "thx_cm",   "Polar angle of X in CM system wrt q (rad)", "fTheta_x_cm" },
    { "phx_cm",   "Azimuth of X in CM system wrt q (rad)", "fPhi_x_cm" },
    { "thb_cm",   "Polar angle of recoil systm in CM wrt q (rad)",
                  "fTheta_b_cm" },
    { "phb_cm",   "Azimuth of recoil system in CM wrt q (rad)", "fPhi_b_cm" },
    { "tx_cm",    "Kinetic energy of X in CM (GeV)", "fTX_cm" },
    { "tb_cm",    "Kinetic energy of B in CM (GeV)", "fTB_cm" },
    { "t_tot_cm", "Total CM kinetic energy", "fTtot_cm" },
    { "MandelS",  "Mandelstam s for secondary vertex (GeV^2)", "fMandelS" },
    { "MandelT",  "Mandelstam t for secondary vertex (GeV^2)", "fMandelT" },
    { "MandelU",  "Mandelstam u for secondary vertex (GeV^2)", "fMandelU" },
    { 0 }
  };


THcShowerArray (THcShowerArray.cxx)

    RVarDef vars[] = {
      {"adcPedRaw",       "List of raw ADC pedestals",         "frAdcPedRaw.THcSignalHit.GetData()"},
      {"adcPulseIntRaw",  "List of raw ADC pulse integrals.",  "frAdcPulseIntRaw.THcSignalHit.GetData()"},
      {"adcPulseAmpRaw",  "List of raw ADC pulse amplitudes.", "frAdcPulseAmpRaw.THcSignalHit.GetData()"},
      {"adcPulseTimeRaw", "List of raw ADC pulse times.",      "frAdcPulseTimeRaw.THcSignalHit.GetData()"},

      {"adcPed",          "List of ADC pedestals",             "frAdcPed.THcSignalHit.GetData()"},
      {"adcPulseInt",     "List of ADC pulse integrals.",      "frAdcPulseInt.THcSignalHit.GetData()"},
      {"adcPulseAmp",     "List of ADC pulse amplitudes.",     "frAdcPulseAmp.THcSignalHit.GetData()"},
      {"adcPulseTime",    "List of ADC pulse times.",          "frAdcPulseTime.THcSignalHit.GetData()"},
      { 0 }
    };
  RVarDef vars[] = {
    //{"adchits", "List of ADC hits", "fADCHits.THcSignalHit.GetPaddleNumber()"}, // appears an empty histogram in the root file

    {"adcErrorFlag",       "Error Flag When FPGA Fails",      "frAdcErrorFlag.THcSignalHit.GetData()"},

    {"adcCounter",      "List of ADC counter numbers.",      "frAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"},  //raw occupancy
    {"numGoodAdcHits", "Number of Good ADC Hits per PMT", "fNumGoodAdcHits" },                                   //good occupancy

    {"totNumAdcHits", "Total Number of ADC Hits", "fTotNumAdcHits" },                                            // raw multiplicity
    {"totNumGoodAdcHits", "Total Number of Good ADC Hits", "fTotNumGoodAdcHits" },                               // good multiplicity


    {"goodAdcPulseIntRaw", "Good Raw ADC Pulse Integrals", "fGoodAdcPulseIntRaw"},    //this is defined as pulseIntRaw, NOT ADC Amplitude in FillADC_DynamicPedestal() method
    {"goodAdcPed", "Good ADC Pedestals", "fGoodAdcPed"},
    {"goodAdcMult", "Good ADC Multiplicity", "fGoodAdcMult"},
    {"goodAdcPulseInt", "Good ADC Pulse Integrals", "fGoodAdcPulseInt"},     //this is defined as pulseInt, which is the pedestal subtracted pulse integrals, and is defined if threshold is passed
    {"goodAdcPulseAmp", "Good ADC Pulse Amplitudes", "fGoodAdcPulseAmp"},
    {"goodAdcPulseTime", "Good ADC Pulse Times", "fGoodAdcPulseTime"},     //this is defined as pulseInt, which is the pedestal subtracted pulse integrals, and is defined if threshold is passed
    {"goodAdcTdcDiffTime", "Good Hodo Starttime - ADC Pulse Times", "fGoodAdcTdcDiffTime"},     


    {"e", "Energy Depositions per block", "fE"},       //defined as fE = fA_p*fGain = pulseInt * Gain
    {"earray", "Energy Deposition in Shower Array", "fEarray"},   //defined as a Double_t and represents a sum of the total deposited energy in the shower counter

    {"nclust", "Number of clusters", "fNclust" },       //what is the difference between nclust defined here and that in THcShower.cxx ?
    {"block_clusterID", "Cluster ID number", "fBlock_ClusterID"}, // im NOT very clear about this. it is histogrammed at wither -1 or 0.
    {"ntracks", "Number of shower tracks", "fNtracks" }, //number of cluster-to-track associations
    { 0 }
  };


THcShower (THcShower.cxx)

  RVarDef vars[] = {
    { "nhits", "Number of hits",                                 "fNhits" },
    { "nclust", "Number of layer clusters",                            "fNclust" },
    { "nclusttrack", "Number of layer cluster which matched best track","fNclustTrack" },
    { "xclusttrack", "X pos of layer cluster which matched best track","fXclustTrack" },
    { "xtrack", "X pos of track which matched layer cluster", "fXTrack" },
    { "yclusttrack", "Y pos of layer cluster which matched best track","fYclustTrack" },
    { "ytrack", "Y pos of track which matched layer cluster", "fYTrack" },
    { "etot", "Total energy",                                    "fEtot" },
    { "etotnorm", "Total energy divided by Central Momentum",    "fEtotNorm" },
    { "etrack", "Track energy",                                  "fEtrack" },
    { "etracknorm", "Total energy divided by track momentum",    "fEtrackNorm" },
    { "eprtrack", "Track Preshower energy",                      "fEPRtrack" },
    { "eprtracknorm", "Preshower energy divided by track momentum", "fEPRtrackNorm" },
    { "etottracknorm", "Total energy divided by track momentum", "fETotTrackNorm" },
    { "ntracks", "Number of shower tracks",                      "fNtracks" },
    { 0 }
  };


THcShowerPlane (THcShowerPlane.cxx)

    RVarDef vars[] = {
      {"posAdcPedRaw",       "List of positive raw ADC pedestals",         "frPosAdcPedRaw.THcSignalHit.GetData()"},
      {"posAdcPulseIntRaw",  "List of positive raw ADC pulse integrals.",  "frPosAdcPulseIntRaw.THcSignalHit.GetData()"},
      {"posAdcPulseAmpRaw",  "List of positive raw ADC pulse amplitudes.", "frPosAdcPulseAmpRaw.THcSignalHit.GetData()"},
      {"posAdcPulseTimeRaw", "List of positive raw ADC pulse times.",      "frPosAdcPulseTimeRaw.THcSignalHit.GetData()"},

      {"posAdcPed",          "List of positive ADC pedestals",             "frPosAdcPed.THcSignalHit.GetData()"},
      {"posAdcPulseInt",     "List of positive ADC pulse integrals.",      "frPosAdcPulseInt.THcSignalHit.GetData()"},
      {"posAdcPulseAmp",     "List of positive ADC pulse amplitudes.",     "frPosAdcPulseAmp.THcSignalHit.GetData()"},
      {"posAdcPulseTime",    "List of positive ADC pulse times.",          "frPosAdcPulseTime.THcSignalHit.GetData()"},

      {"negAdcPedRaw",       "List of negative raw ADC pedestals",         "frNegAdcPedRaw.THcSignalHit.GetData()"},
      {"negAdcPulseIntRaw",  "List of negative raw ADC pulse integrals.",  "frNegAdcPulseIntRaw.THcSignalHit.GetData()"},
      {"negAdcPulseAmpRaw",  "List of negative raw ADC pulse amplitudes.", "frNegAdcPulseAmpRaw.THcSignalHit.GetData()"},
      {"negAdcPulseTimeRaw", "List of negative raw ADC pulse times.",      "frNegAdcPulseTimeRaw.THcSignalHit.GetData()"},

      {"negAdcPed",          "List of negative ADC pedestals",             "frNegAdcPed.THcSignalHit.GetData()"},
      {"negAdcPulseInt",     "List of negative ADC pulse integrals.",      "frNegAdcPulseInt.THcSignalHit.GetData()"},
      {"negAdcPulseAmp",     "List of negative ADC pulse amplitudes.",     "frNegAdcPulseAmp.THcSignalHit.GetData()"},
      {"negAdcPulseTime",    "List of negative ADC pulse times.",          "frNegAdcPulseTime.THcSignalHit.GetData()"},
      { 0 }
    };
  RVarDef vars[] = {
    {"posAdcErrorFlag",    "List of positive raw ADC Error Flags",  "frPosAdcErrorFlag.THcSignalHit.GetData()"},
    {"negAdcErrorFlag",    "List of negative raw ADC Error Flags ", "frNegAdcErrorFlag.THcSignalHit.GetData()"},

    {"posAdcCounter",      "List of positive ADC counter numbers.", "frPosAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"}, //PreSh+ raw occupancy
    {"negAdcCounter",      "List of negative ADC counter numbers.", "frNegAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"}, //PreSh- raw occupancy

    {"totNumPosAdcHits", "Total Number of Positive ADC Hits",   "fTotNumPosAdcHits"}, // PreSh+ raw multiplicity
    {"totNumNegAdcHits", "Total Number of Negative ADC Hits",   "fTotNumNegAdcHits"}, // PreSh+ raw multiplicity
    {"totnumAdcHits",    "Total Number of ADC Hits Per PMT",    "fTotNumAdcHits"},    // PreSh raw multiplicity

    {"numGoodPosAdcHits",  "Number of Good Positive ADC Hits Per PMT", "fNumGoodPosAdcHits"},    // PreSh occupancy
    {"numGoodNegAdcHits",  "Number of Good Negative ADC Hits Per PMT", "fNumGoodNegAdcHits"},    // PreSh occupancy
    {"totNumGoodPosAdcHits", "Total Number of Good Positive ADC Hits",   "fTotNumGoodPosAdcHits"}, // PreSh multiplicity
    {"totNumGoodNegAdcHits", "Total Number of Good Negative ADC Hits",   "fTotNumGoodNegAdcHits"}, // PreSh multiplicity
    {"totnumGoodAdcHits",  "TotalNumber of Good ADC Hits Per PMT",      "fTotNumGoodAdcHits"},    // PreSh multiplicity

    {"goodPosAdcPulseIntRaw", "Good Positive Raw ADC Pulse Integrals",                   "fGoodPosAdcPulseIntRaw"},
    {"goodNegAdcPulseIntRaw", "Good Negative Raw ADC Pulse Integrals",                   "fGoodNegAdcPulseIntRaw"},

    {"goodPosAdcPed",      "Good Positive ADC pedestals",           "fGoodPosAdcPed"},
    {"goodPosAdcPulseInt", "Good Positive ADC integrals",           "fGoodPosAdcPulseInt"},
    {"goodPosAdcPulseAmp", "Good Positive ADC amplitudes",          "fGoodPosAdcPulseAmp"},
    {"goodPosAdcPulseTime","Good Positive ADC times",               "fGoodPosAdcPulseTime"},
    {"goodPosAdcTdcDiffTime","Good Positive Hodo Start time-ADC times",               "fGoodPosAdcTdcDiffTime"},

    {"goodNegAdcPed",      "Good Negative ADC pedestals",           "fGoodNegAdcPed"},
    {"goodNegAdcPulseInt", "Good Negative ADC integrals",           "fGoodNegAdcPulseInt"},
    {"goodNegAdcPulseAmp", "Good Negative ADC amplitudes",          "fGoodNegAdcPulseAmp"},
    {"goodNegAdcPulseTime","Good Negative ADC times",               "fGoodNegAdcPulseTime"},
    {"goodNegAdcTdcDiffTime","Good Negative Hodo Start time-ADC times",               "fGoodNegAdcTdcDiffTime"},
    {"goodPosAdcMult",          "Good Positive ADC Multiplicity",           "fGoodPosAdcMult"},
    {"goodNegAdcMult",          "Good Negative ADC Multiplicity",           "fGoodNegAdcMult"},
    {"epos",       "Energy Depositions from Positive Side PMTs",    "fEpos"},
    {"eneg",       "Energy Depositions from Negative Side PMTs",    "fEneg"},
    {"emean",      "Mean Energy Depositions",                       "fEmean"},
    {"eplane",     "Energy Deposition per plane",                   "fEplane"},
    {"eplane_pos", "Energy Deposition per plane from pos. PMTs",    "fEplane_pos"},
    {"eplane_neg", "Energy Deposition per plane from neg. PMTs",    "fEplane_neg"},
    { 0 }
  };

Pol He-3 Farm / Disk Resources

General info

  • unix group 'c-polhe3' -- general access control
    • If you can't access the Farm, or the disk space below, then email brads or saw to be added to the group!
  • Farm/Auger project: c-polhe3 -- run farm jobs using this Project

Disk Resources

  • /group/c-polhe3 directory (100GB quota)
  • /work/hallc/c-polhe3 directory (1 TB quota)
  • /volatile/hallc/c-polhe3 directory (2 TB quota, 1 TB guarantee)

Tape Stubs

  • /mss/hallc/c-polhe3/raw tape volume for raw CODA data -- this is where you will find the raw data files
  • /mss/hallc/c-polhe3/analysis tape volume for analysis output -- this is where you can store personal/analysis output

Calibrations

I expect to break each detector/calibration out into its own wiki page as they mature, but for now I think it is best to work on this single (big) page until we have settled on a "good" template.

Basic Template for each Detector/Calibration Procedure

For each detector subsystem we would like to capture/document the following information:

  • A list of all (or at least the most useful) ROOT tree variables associated with this detector
  • Description of the calibration algorithm (That is, how is it supposed to work -- what is the logic behind it?)
  • Files involved in the calibration
    • THc* or THa* modules that are needed/used
    • Database files that will be modified
    • Scripts that will be used
    • Dependencies of this calibration
      • Reference time cuts should be verified
      • FADC 'hit selection' timing cuts should be verified
      • Calorimeter calibration relies on good optics calibration for momentum determination
      • If tight timing cuts are used, then the hodoscopes may need to be calibrated first, etc
      • ... etc
  • Provide a step-by-step "Howto" that shows
    • What commands/scripts need to be run, in what order.
    • How do you verify that various cuts (ref times, trigger types, etc) are correct before you run the script(s)?
    • What do you look for to verify that the code has run correctly after you run the script(s)?
  • Common Pitfalls / Things to watch for
    • I have found it useful in the past to provide a list of common symptoms and solutions that people may run into.

Drift Chambers

Hodoscopes

  • The hodoscope calibration scripts are in hallc_replay/CALIBRATION/hms_hodo_calib and hallc_replay/CALIBRATION/shms_hodo_calib
  • Carlos Yero wrote a pretty thorough guide to the calibration procedure on DocDB as well as some nice slides from the 2018 analysis workshop
  • Here are the steps for the HMS. The procedure is the same for the SHMS.
  1. Set the flag htofusinginvadc = 0 to NOT use the hodo parameters from the previous hodoscope calibration procedure. This flag is found on hallc_replay/PARAM/HMS/HODO/ directory.
  2. Replay a run with 1–2 million events.
  3. In the directory hallc_replay/CALIBRATION/hms_hodo_calib/, run the following code:
    • root -l timeWalkHistos.C(<run_num>)
    • This script takes as input the ROOTfile replayed and creates another ROOTfile with histogram objects that are used to perform the time-walk correction.
  4. To do the time-walk corrections, run the following code:
    • root -l timeWalkCalib.C(<run_num>)
    • This script takes as input the ROOTfile containing the histogram objects produced by the previous script. A parameter file containing the time-walk parameters will be produced at
      • hallc_replay/PARAM/HMS/HODO/hhodo_TWcalib_runNUM.param
    • Rename this file hhodo_TWcalib.param
  5. Replay the raw data file, once again (1 - 2 M events), with the updated time-walk parameters.
  6. In the hodoscopoe calibration directory, run the following code:
    • root -l fitHodoCalib.C
    • The first part of this script performs a linear fit on the time-walk corrected time vs. hodoscope track to determine the propagation velocity and the cable time difference across each paddle.
    • The second part of this code solves a matrix equation for the lambda parameters mentioned in Carlos's guide.
    • A parameter file containing the time-walk parameters will be produced at
      • hallc_replay/PARAM/HMS/HODO/hhodo_Vpcalib_runNUM.param
    • Rename this file hhodo_Vpcalib.param
  7. Replay the raw data one last time, and check the hodoscope beta distribution.
    • You may have to apply a calorimeter cut (for example, H.cal.etottracknorm>0.7) to get a clean sample. A good calibration should have beta centered at 1.

Calorimeter

Gas Cerenkovs

ROOT Tree Variables

SHMS Heavy Gas Cherenkov (HGC or "hgcer") and Noble Gas Cherenkov (NGC or "ngcer")

  • P.h(n)gcer.npeSum
  • P.h(n)gcer.totNumAdcHits
  • P.h(n)gver.totNumGoodAdcHits
  • P.h(n)gcer.totNumTracksFired
  • P.h(n)gcer.totNumTracksMatched
  • P.h(n)gcer.xAtCer
  • P.h(n)gcer.yAtCer


  • T.shms.pH(N)GCER_MOD_adcMultiplicity
  • T.shms.pH(N)GCER_MOD_adcPed
  • T.shms.pH(N)GCER_MOD_adcPedRaw
  • T.shms.pH(N)GCER_MOD_adcPulseAmp
  • T.shms.pH(N)GCER_MOD_adcPulseAmpRaw
  • T.shms.pH(N)GCER_MOD_adcPulseInt
  • T.shms.pH(N)GCER_MOD_adcPulseIntRaw
  • T.shms.pH(N)GCER_MOD_adcPulseTime
  • T.shms.pH(N)GCER_MOD_adcPulseTimeRaw


  • T.shms.pH(N)GCER_adcMultiplicity
  • T.shms.pH(N)GCER_adcPed
  • T.shms.pH(N)GCER_adcPedRaw
  • T.shms.pH(N)GCER_adcPulseAmp
  • T.shms.pH(N)GCER_adcPulseAmpRaw
  • T.shms.pH(N)GCER_adcPulseInt
  • T.shms.pH(N)GCER_adcPulseIntRaw
  • T.shms.pH(N)GCER_adcPulseTime
  • T.shms.pH(N)GCER_adcPulseTimeRaw


  • T.shms.pH(N)GCER_tdcMultiplicity
  • T.shms.pH(N)GCER_tdcTime
  • T.shms.pH(N)GCER_tdcTimeRaw

Aerogel (?)

Optics

EDTM

BPM

BCM

...