# CAF Tree Structure and Variable Listing¶

The StandardRecord structure that makes up CAFs is documented on the usual NOvA doxygen pages

There is also a version available covering StandardRecord only, and with less clutter, which you may prefer. As html or pdf

The text below is extremely out of date, and is retained just in case there's a useful nugget buried in there somewhere. The doxygen-based sources above stays up-to-date automatically. If you have some contribution that would improve the StandardRecord documentation, please feel free to commit a fix in doxygen format directly to svn.

**Table of contents**- CAF Tree Structure and Variable Listing

## Header Branch (rec.hdr)¶

The header branch is called "hdr." It contains information helpful in identifying the slice and event.

Type | Variable Name | Short description |
---|---|---|

unsigned int | run | run number |

unsigned int | subrun | subrun number |

unsigned int | evt | ART event number, indexes trigger windows. |

unsigned short | subevt | slice number within spill |

bool | ismc | data or MC? True if MC |

Det_t | det | Detector: 1 = ND, 2 = FD, 3 = NDOS |

bool | blind | if true, record has been edited to enforce blindness |

unsigned short | dibfirst | first diblock in detector for this run (1-14); correct if maskstatus = 1; otherwise probably okay but not definitely |

unsigned short | diblast | last diblock in detector for this run (1-14); correct if maskstatus = 1; otherwise probably okay but not definitely |

unsigned short | dibmask | diblock mask (bitfield, lowest bit = diblock 1) |

unsigned short | maskstatus | 0 = no mask found in DB; 1 = mask used ok; 2 = masking turned off |

unsigned short | year | year of spill |

unsigned short | month | month of spill |

unsigned short | day | day of spill within month |

unsigned short | doy | day of spill within year |

unsigned short | hour | hour of spill |

unsigned short | minute | minute of spill |

unsigned short | second | second of spill |

float | unixtime | unix time of spill |

float | subevtstarttime | time of beginning of slice within spill [ns] |

float | subevtendtime | Slice end time [ns] |

float | subevtmeantime | Slice mean time [ns] |

unsigned int | nbadchan | Number of bad channels by subrun |

unsigned int | ntotchan | Total number of channels in the region of the detector used for analysis by subrun |

## Spill Branch (rec.spill)¶

The spill branch is called "spill," it contains information about the beam dump, including spill-by-spill POT.

Type | Variable Name | Short description |
---|---|---|

bool | isgoodspill | Was the pot for a spill good? (only applicable to data, default true) |

unsigned long int | spilltimesec | Spill time in seconds [s] |

unsigned long int | spilltimensec | Spill time in naonoseconds [ns] |

unsigned long int | gpsspilltimesec | Spill time from GPS [s] |

unsigned long int | gpsspilltimensec | Spill time from GPS [ns] |

signed long long int | deltaspilltimensec | Delta time [ns] |

float | spillpot | POT in spill including factor of 1e12 so that a user does not have to apply this correction |

float | hornI | Horn current |

float | posx | x position on target |

float | posy | y position on target |

float | widthx | Spill width in x dimension |

float | widthy | Spill width in y dimension |

## Slice Branch (rec.slc)¶

The slice branch is called "slc." This branch stores variables resulting from the slicer module. Slicer is designed to cluster hits in time.

Type | Variable Name | Short description |
---|---|---|

unsigned int | nhit | number of hits |

unsigned int | ncalhit | number of hits with calibration |

unsigned int | nmiphit | number of minimum ionizing hits |

unsigned int | ncontplanes | number of continuous planes |

unsigned int | firstplane | first plane |

unsigned int | lastplane | last plane |

unsigned int | firstcell | first cell |

unsigned int | lastcell | last cell |

unsigned int | ncellsfromedge | minimum number of cells to edge of detector |

unsigned int | nnonnoise | number of non noise slices in event from which this slice came |

float | calE | sum of uncalibrated ADC |

float | starttime | start time [ns] |

float | endtime | end time [ns] |

float | meantime | mean time [ns] |

TVector3 | boxmin | Minimum coordinates box containing all the hits [cm] |

TVector3 | boxmax | Maximum coordinates box containing all the hits [cm] |

## Track Branch (rec.trk)¶

The track branch, named "trk," contains multiple vectors of SRTrack objects. There is a vector of tracks for each tracker run in batch reconstruction. SRTrack objects are sorted by descending track length; i.e. the longest track comes first and the shortest track comes last.

Type | Variable Name | Short description |
---|---|---|

std::vector<SRTrack> | kalman | 3D Tracks produced by KalmanTrack |

std::vector<SRTrack> | kalman2d | 2D Tracks produced by KalmanTrack |

std::vector<SRTrack> | discrete | 3D tracks produced by DiscreteTrack |

std::vector<SRTrack> | discrete2d | 2D tracks produced by DiscreteTrack |

std::vector<SRTrack> | cosmic | Tracks produced by CosmicTrack |

size_t | nkalman | Number of 3D tracks produced by KalmanTrack (size of vector) |

size_t | nkalman2d | Number of 2D tracks produced by KalmanTrack (size of vector) |

size_t | ndiscrete | Number of 3D tracks produced by DiscreteTrack (size of vector) |

size_t | ndiscrete2d | Number of 2D tracks produced by DiscreteTrack (size of vector) |

size_t | ncosmic | Number of tracks produced by CosmicTrack (size of vector) |

### SRTrack Objects¶

Each SRTrack object has the following fields:

Type | Variable Name | Short description |
---|---|---|

unsigned short | nhit | number of hits |

TVector3 | start | Shower start point in detector coordinates. [cm] |

TVector3 | dir | Shower direction at start point [unit vector recommended] |

View_t | view | Prong view caf::kX = 0, caf::kY = 1 or caf::kXorY = 2 |

float | len | track length [cm] |

float | lenE | energy based on track length and MIP assumption [GeV] |

float | calE | energy based on summed calibrated deposited charge [GeV] |

TVector3 | stop | Track end point in detector coordinates. [cm] |

## Shower Branch (rec.shw)¶

RecoJMShower is the only run in batch reconstruction, the output is stored as a vector of SRJMShower objects called "shw.jm." Showers are sorted by descending calorimetric energy. SRJMShower objects have the following fields:

Type | Variable Name | Short description |
---|---|---|

unsigned short | nhit | number of hits |

TVector3 | start | Shower start point in detector coordinates. [cm] |

TVector3 | dir | Shower direction at start point [unit vector recommended] |

View_t | view | Prong view caf::kX = 0, caf::kY = 1 or caf::kXorY = 2 |

float | len | Shower length [cm] |

float | width | Shower width [cm] |

float | calE | energy based on summed calibrated deposited charge [GeV] |

float | shwE | reconstructed shower energy [GeV] |

float | vtxE | calorometric energy of [GeV] |

## Vertex Branch (rec.vtx)¶

The vertex branch, "vtx," contains vertex positions and times. The branch contains information from ElasticArms and jmshower::NueSel.

Type | Variable Name | Short description |
---|---|---|

std::vector<SRElastic> | elastic | Vector of vertices found by Elastic Arms |

size_t | nelastic | Number of vertices in elastic vector (elastic.size()) |

SRVertex | elecid | Vertex used in JM EID |

Each vertex has position and time information.

Type | Variable Name | Short description |
---|---|---|

float | time | Time [ns] |

TVector3 | vtx | Vertex position in detector coordinates. [cm] |

## Energy Estimator Branch (rec.energy)¶

The energy estimator branch, "energy," currently contains output from two different modules.

Type | Variable Name | Short description |
---|---|---|

SRNumuEnergy | numusimp | Numu energy estimator |

SRJMEnergy | elecid | Energy estimate from jmshower::NueSel |

### NumuEnergy (rec.energy.numusimp)¶

The Numu energy estimator, "numusimp," contains the following variables:

Type | Variable Name | Short description |
---|---|---|

float | E | Neutrino energy [GeV] |

float | calccE | Calorimetric charged current neutrino energy [GeV] |

float | trkccE | Track length all CC (i.e., QE/non-QE altogether) neutrino energy [GeV] |

float | trkqeE | Track length quasielastic neutrino energy [GeV] |

float | trknonqeE | Track length non-quasielastic neutrino energy [GeV] |

float | angleE | Quasielastic angle formula neutrino energy [GeV] |

float | angleerror | 1-sigma error from using quasielastic angle formula for neutrino energy |

float | hadcalE | Hadronic calorimetric energy [GeV] |

float | ndtrklenact | Near detector -- muon track length in active region [cm] |

float | ndtrklencat | Near detector -- muon track length in muon catcher [cm] |

float | ndtrkcalactE | Near detector -- muon calorimetric energy in active region [GeV] |

float | ndtrkcaltranE | Near detector -- muon calorimetric energy in transition plane [GeV] |

float | ndtrkcalcatE | Near detector -- muon calorimetric energy in muon catcher [GeV] |

float | ndhadcalactE | Near detector -- hadronic calorimetric energy in active region [GeV] |

float | ndhadcaltranE | Near detector -- hadronic calorimetric energy in transition plane [GeV] |

float | ndhadcalcatE | Near detector -- hadronic calorimetric energy in muon catcher [GeV] |

### jmshower::NueSel Energy (rec.energy.elecid)¶

Type | Variable Name | Short description |
---|---|---|

float | E | Neutrino energy [GeV] |

float | depE | Total energy deposited [GeV] |

float | shwE | Energy of primary shower [GeV] |

## Selectors (PID) Branch (rec.sel)¶

The selectors branch is called "sel." It contains output from several modules, each represented by a different object.

Type | Variable Name | Short description |
---|---|---|

SRRemid | remid | Output from RecoMuonID (ReMId) package |

SRBpfId | bpfid | Event level output from BPFPidMaker package |

SRQepid | qepid | Output from QuasiElasticPID (QePId) package |

SRJMEid | elecid | Output from jmshower::NueSel, aka jmid |

SRLem | lem | Output from Library Event Matching (LEM) |

SRNuePresel | nuepre | Official nue preselection information |

SRRvp | rvp | Output from RecoVariablePID (RVP) |

SRCosRej | cosrej | Cosmic Rejection Variables |

SRContain | contain | Variables useful for Containment |

### ReMId (rec.sel.remid)¶

ReMId produces output for each 3D track reconstructed by KalmanTrack. The output of each of these is stored in a vector of SRMuId objects called "sel.remid.muid." These objects are sorted by track length, so they are in the same order as the SRTrack objects in "trk.kalman." The information for the track with the highest PID is duplicated and stored in the ReMId branch along side that vector, as seen below. The index of the track with the highest PID is stored.

Type | Variable Name | Short description |
---|---|---|

int | pdg | PDG code of identified track, pion or muon |

float | pid | PID value output by kNN |

float | scatllh | Log-likelihood value from scattering angle |

float | dedxllh | Log-likelihood value from dE/dx |

float | len | Track length of identified track |

size_t | nmuid | Number of SRMuid in vector |

size_t | bestidx | Index of best track and muid object in kalman and muid vectors |

size_t | bestidx3d | Index of best 3d track and muid object in kalman and muid vectors |

std::vector<SRMuId> | muid | Vector of SRMuid objects, one for each track, sorted by track length, same as kalman |

Each SRMuId object has the following information:

Type | Variable Name | Short description |
---|---|---|

int | pdg | PDG code of identified track, pion or muon |

float | pid | PID value output by kNN |

float | scatllh | Log-likelihood value from scattering angle |

float | dedxllh | Log-likelihood value from dE/dx |

float | len | Track length of identified track |

### BPF numu CC PID (rec.sel.bpfid)¶

The BPF PID-Maker module makes a muon PID object for each track (described further in the BPF track section below . This branch allows access to the information from the highest scoring muon track, and is to be taken as an event-level numuCC PID.

Type | Variable Name | Short description |
---|---|---|

int | bestVtxIdx | Index for the vertex that the most muon-like track belongs to. |

int | bestPngIdx | Index for the prong that the most muon-like track belongs to. |

int | bestTrkIdx | Track index for the most muon-like track. |

int | pdg | PDG code for the particle assumption used to make this track. |

float | pid | Muon PID score for the highest scoring muon track. |

float | chi2T | Total Chi^2 from the track fit (input variable to the muon PID) for the best muon track. |

float | dEdXLL | dE/dx log-likelihood from the track fit (input variable to the muon PID) for the best muon track. |

float | hitRatio | Hit ratio (hits in track)/(hits in prong) (input variable to the muon PID) for the best muon track. |

float | len | Track length (input variable to the muon PID) for the best muon track. |

SRVector3 | momentum | reconstructed momentum from the best muon track |

float | momentum.x | X component of the momentum (part of the momentum SRVector3) |

float | momentum.y | Y component of the momentum (part of the momentum SRVector3) |

float | momentum.z | Z component of the momentum (part of the momentum SRVector3) |

float | energy | reconstructed total energy for the best muon track |

### QePID (rec.sel.qepid)¶

QePID is an event selector for quasi-elastic muon neutrino events. It is based on a kNN algorithm that uses the topological information in the slice as well as the ReMID muon ID.

int | pdg | PDG code of slice |

int | mode | Neutrino mode of slice |

int | ntrk | Number of tracks used by qepid |

float | pid | PID value of output kNN |

float | offE | Ratio of energy not assoicated with tracks to energy on tracks |

float | ediff | Difference in energy between QE angle energy formula and weighted fit, normalized to fit energy |

float | ediffz | Difference in energy between QE angle energy formula and weighted fit, normalized to error in QE angle energy formula |

float | dedx | Ratio of average dE/dx in non-muon track to muon identified track |

### jmshower::NueSel EID, aka JMID (rec.sel.elecid)¶

The NueSel EID uses an ANN to tag electrons based on log likelihood variables, referred to as ll below. No one can decide what to call this thing, some call it EID, others call it JMID.

Type | Variable Name | Short description |
---|---|---|

float | ann | ann output |

int | ismuon | Boolean to distinguish muons from electrons. |

Below are the training variables for the EID. These variables all use the leading (most energetic) shower in each slice. The first 12 variables are calculated by computing the log likelihood that the leading shower (in both transverse and longitudinal directions) is an electron, and then subtracting the loglikelihood that the shower is another particle.

Type | Variable Name | Short description |
---|---|---|

float | eglll | Electron - gamma ll for longitudinal shower |

float | egllt | Electron - gamma ll for ltransverse shower |

float | emulll | Electron - muon ll for longitudinal shower |

float | emullt | Electron - muon ll for ltransverse shower |

float | epi0lll | Electron - Pi0 ll for longitudinal shower |

float | epi0llt | Electron - Pi0 ll for ltransverse shower |

float | eplll | Electron - proton ll for longitudinal shower |

float | epllt | Electron - proton ll for ltransverse shower |

float | enlll | Electron - neutron ll for longitudinal shower |

float | enllt | Electron - neutron ll for ltransverse shower |

float | epilll | Electron - pion ll for longitudinal shower |

float | epillt | Electron - pion ll for ltransverse shower |

float | vtxgev | Energy of slice in vertex region |

float | pi0mass | best pi0 mass hypothesis coming from combinations of JMShowers |

float | shE | fraction of energy of leading shower out of total energy of slice |

Type | Variable Name | Short description |
---|---|---|

float | gap | gap from vertex to start of shower |

float | elll | electron ll for longitudinal shower |

float | ellt | electron ll for transverse shower |

float | mulll | muon ll for longitudinal shower |

float | mullt | muon ll for transverse shower |

### Library Event Matching (LEM) (rec.sel.lem)¶

Nue PID. Uses a large library of MC events, finds the best matches to the trial event. The final PID value is extracted from various properties of the matched library events.

Type | Variable Name | Short description |
---|---|---|

float | pid | The default PID value - normally use this one |

Many variables are some kind of average over the matches. There are simple means (no suffix), means exponentially weighted by the match potential ("exp"), and a procedure by which one fits a linear trend and evaluates it at the potential of the best match ("fit").

Type | Variable Name | Short description |
---|---|---|

float | pidfit | Fraction of matches that are signal, "fit" |

float | pidexp | Fraction of matches that are signal, "exp" |

float | pidexpfit | Fraction of matches that are signal, "expfit" |

float | meany | Mean hadronic y of matches |

float | meanyfit | Hadronic y of matches, "fit" |

float | meanyexp | Hadronic y of matches, "exp" |

float | meanysig | Mean hadronic y of matches that are signal |

float | meanysigexp | Hadronic y of matches that are signal, "exp" |

float | meanqfrac | Mean fraction of charge matched |

float | meanqfracfit | Fraction of charge matched, "fit" |

float | meanqfracexp | Fraction of charge matched, "exp" |

float | meanqfracsig | Fraction matched in signal matches |

float | meanqfracsigexp | Fraction matched in signal matches "exp" |

float | meanqfracbkg | Mean fraction matched in background matches |

float | meanqfracbkgexp | Fraction matched in background matches, "exp" |

float | energydiff | Potential diff between sig and bkg matches |

float | energydiffexp | Pot. diff between sig and bkg matches, "exp" |

float | enrichfrac | Fraction of matches that are "enriched" |

float | enrichfracexp | Fraction of matches that are "enriched", "exp" |

float | fannid | ANN output, "fann" package |

float | fannidenrich | ANN output, including enrichfracexp |

float | chisig | chi-square of a fit assuming best match is signal |

float | chibkg | chisq of a fit assuming best match is background |

float | chisigexp | chisq of a fit assuming best match is signal, "exp" |

float | chibkgexp | chisq of a fit assuming best match is bkg, "exp" |

float | avginvE | Fraction of signal matches, 1/E weighting |

float | avgexpE | Fraction of signal matches, "exp" weighting |

float | avgsigE | Fraction of signal matches, sigmoid weighting |

float | tmvabdtg | TMVA boosted decision tree, gradient boost |

float | tmvabdt | TMVA boosted decision tree, adaptive boost |

float | tmvabdtd | TMVA boosted decision tree, decorrelation |

float | tmvabdtmf | TMVA boosted decision tree, Fisher discriminant |

float | tmvamlp | TMVA ANN ("multi layer perceptron") |

float | dectree | Decision tree PID |

### Nue Preselection (rec.sel.nuepre)¶

Most of the information in this branch is duplicated from other places in the record tree, but it is collected here for convenience.

Type | Variable Name | Short description |
---|---|---|

float | calE | Energy (sum of calibrated hit GeV in slice) |

int | ncell | Number of cell hits in slice |

float | lengthdiscrete2d | Longest track (discrete) |

float | lengthdiscretemerge | Longest track (discretetrack merge) |

float | lengthkalman | Longest track (kalman) |

float | fracmip | Fraction of MIP hits |

TVector3 | vtx | Elastic vertex |

TVector3 | mean | Mean of slice |

int | cellstoedge | Number of cells to side of detector |

int | planestofront | Number of planes to front of detector |

int | planestoback | Number of planes to back end of detector |

bool | passfid | Bool saying if event passed Nue Fiducial (current guess) |

bool | passpre | Bool saying if event passed Nue Presel (current guess) |

### Rvp (rec.sel.rvp)¶

Type | Variable Name | Short description |
---|---|---|

float | pid | The output value from the BDT |

int | ncell | Number of cells in slice |

float | recoE | Sum energy of all cells in slice |

float | longtr | Longest merged discrete track |

float | longtrfrac | Fraction of cells in longest track out of total cells in slice |

float | mipfrac | Fraction of mip hits out of total number of hits in slice |

float | miphits | Number of mip hits in slice |

float | epl20frac | Fraction of energy in first 20 planes out of total slice energy |

float | efrac2plwin | Largest fraction of energy in a 2 plane window out of total slice |

float | efrac6plwin | Largest fraction of energy in a 6 plane window out of total slice |

float | efrac2sigrd | Fraction of slice energy within 2sigma of mean energy weighted slice position |

int | prongs3D | Number of 3D FuzzyK prongs in slice |

float | prongEbal3D | The energy balance between the two most energetic 3D prongs in slice |

### CosRej (rec.sel.cosrej)¶

CosRej calculates variables useful to cosmic rejection.

float | mindist | minimum projected distance of any Kalman track to edge |

int | mincell | minimum projected cells of any Kalman track to edge |

float | anglekal | cosine of angle of primary Kalman track to beam |

float | anglecos | cosine of angle of cosmic track to beam |

int | nkal3d | number of 3D tracks with above 0 ReMId value |

float | costhetatrue | cosine of angle between beam and true muon track closest to cosmic track |

float | kalthetatrue | cosine of angle between beam and true muon track closest to primary Kalman track |

int | pdgbest | PDG code of true particle contributing most to the primary Kalman track |

float | kaldist | perpendicular distance from best Kalman track end to wall |

float | numucontpid | Cosmic PID (output of BDT) for contained numu sample |

float | numuuncontpid | Cosmic PID (output of BDT) for uncontained numu sample |

float | scatt | sum of all angular deviation (Fernanda's) |

float | fscattmax | maximum scattering angle (Fernanda's) |

float | fscattsum | sum of scattering angles (Fernanda's) |

float | fscattext | scattering variable (Fernanda's) |

float | fscattsig | sigma of scattering variable distribution (Fernanda's) |

float | eratio | ratio of best Kalman track GeV to slice GeV |

float | hadE | GeV sum of hits not on primary Kalman track |

float | kfitspeed | speed (ns/cm) from Hough fit of hit timings for primary Kalman track (Chris) |

float | cfitspeed | speed (ns/cm) from Hough fit of hit timings for cosmic track (Chris) |

float | kdirscore | chisq score diff between +c and -c assumptions for primary Kalman track (Chris) |

float | cdirscore | chisq score diff between +c and -c assumptions for cosmic track (Chris) |

float | kscorediff | chisq score diff between best assumption (+c or -c) and free fit from Hough fit for primary Kalman track (Chris) |

float | cscorediff | chisq score diff between best assumption (+c or -c) and free fit from Hough fit for cosmic track (Chris) |

### Contain (rec.sel.contain)¶

The Containment branch stores variables useful to containment.

bool | numucontain | Standard first analysis numu containment. Currently ND uses FD cut. |

bool | nuecontain | Standard first analysis nue containment. Based on docdb 11911 |

float | missE | Attempt at lepton truth containment. Sum of energies of primary particles that left detector. Usage suggestion: sel.contain.missE/mc.nu.E>0.01 |

int | nplanestofront | Number of planes from the front of the detector of -Z most activity. Correct for variable configurations. |

int | nplanestoback | Number of planes from the back of the detector of +Z most activity. Correct for variable configurations. |

float | cosfwddist | COSmic track ForWarDs projected DISTance from track end point to detector edge (LiveGeometry) |

int | cosfwdcell | COSmic track ForWarDs projected number of CELLs from track end point to detector edge (LiveGeometry) |

float | cosfwdair | COSmic track ForWarDs projected distance in AIR from track end point to detector edge (entering ND muon catcher only)(LiveGeometry) |

float | cosfwdsteel | COSmic track ForWarDs projected distance in STEEL from end point to detector edge (in ND muon catcher only) (LiveGeometry) |

float | cosbakdist | COSmic track BAcKwards projected DISTance from track start point to detector edge (LiveGeometry) |

int | cosbakcell | COSmic track BAcKwards projected number of CELLs from track start point to detector edge (LiveGeometry) |

float | cosbakair | COSmic track BAcKwards projected distance in AIR from track start point to detector edge (entering ND muon catcher only)(LiveGeometry) |

float | cosbaksteel | COSmic track BAcKwards projected distance in STEEL from start point to detector edge (in ND muon catcher only) (LiveGeometry) |

float | kalfwddist | primary KALman track ForWarDs projected DISTance from track end point to detector edge (LiveGeometry) |

int | kalfwdcell | primary KALman track ForWarDs projected number of CELLs from track end point to detector edge (LiveGeometry) |

float | kalfwdair | primary KALman track ForWarDs projected distance in AIR from track end point to detector edge (entering ND muon catcher only)(LiveGeometry) |

float | kalfwdsteel | primary KALman track ForWarDs projected distance in STEEL from end point to detector edge (in ND muon catcher only) (LiveGeometry) |

float | kalbakdist | primary KALman track BAcKwards projected DISTance from track start point to detector edge (LiveGeometry) |

int | kalbakcell | primary KALman track BAcKwards projected number of CELLs from track start point to detector edge (LiveGeometry) |

float | kalbakair | primary KALman track BAcKwards projected distance in AIR from track start point to detector edge (entering ND muon catcher only)(LiveGeometry) |

float | kalbaksteel | primary KALman track BAcKwards projected distance in STEEL from start point to detector edge (in ND muon catcher only) (LiveGeometry) |

float | cosyposattrans | Y position at the transition from detector to muon catcher (ND only). Calculated from start position and direction; doesn't check if track actually went that far. If track start point is in detector and end point is in muon catcher, then use this to see if it went through the air gap. |

float | cosxposattrans | X position at the transition point, as above. |

float | xmin2 | BBC variable; X position of (2)nd most -X hit. Alternative to slc.boxmin.fX, in case there is a noise hit throwing it off. |

float | ymin2 | BBC variable; Y position of 2nd most -Y hit. |

float | zmin2 | BBC variable; Z position of 2nd most -Z hit. |

float | xmax2 | BBC variable; X position of 2nd most +X hit. |

float | ymax2 | BBC variable; Y position of 2nd most +Y hit. |

float | zmax2 | BBC variable; Z position of 2nd most +Z hit. |

float | xmint | BBC variable; X position of most -X hit above 100 PE (t)hreshold. Different way of trying to avoid noise. |

float | ymint | BBC variable; Y position of most -Y hit above 100 PE. |

float | zmint | BBC variable; Z position of most -Z hit above 100 PE. |

float | xmaxt | BBC variable; X position of most +X hit above 100 PE. |

float | ymaxt | BBC variable; Y position of most +Y hit above 100 PE. |

float | zmaxt | BBC variable; Z position of most +Z hit above 100 PE. |

## Truth Branch (rec.mc)¶

### Slice/Truth Matching¶

Storing truth information in CAF poses an immediate problem, mainly in the near detector where there can be many neutrino interactions within one ART event, aka beam spill. The hits within an ART event are grouped in time-- or "sliced"-- by the Slicer module as an early step in reconstruction. These slices become the basis for CAF; each slice gets translated into a separate record in the CAF tree. Neutrino interactions are not always sliced perfectly, however. Sometimes a single interaction can be split into multiple slices, other times a slice can contain hits left by multiple interactions.

Truth matching is currently determined by total deposited energy contributed to the slice each neutrino interaction. For each slice, a "favorite" neutrino may be chosen as the one with the energy in that slice. To be favorite, that slice must also have the highest energy for that neutrino among the other neutrinos that left hits in the slice. This matching scheme is visualized in the uploaded image. (See bottom of page.)

### Truth information¶

There are 4 vectors in the truth branch, two for neutrinos and two for cosmics that use the scheme described above.

Type | Variable Name | Short description |
---|---|---|

std::vector<SRNeutrino> | nu | Best matched neutrino in a vector, 0 or 1 entries |

std::vector<SRCosmic> | cosmic | Best matched cosmic in a vector, 0 or 1 entries |

std::vector<SRNeutrino> | allnus | vector holding all neutrinos that deposited energy in the slice |

std::vector<SRCosmic> | allcosmics | vector holding all cosmics that deposited energy in the slice |

These contain vectors of SRCosmic objects and SRNeutrino objects. Both of these inherit the following members from SRTruth:

Type | Variable Name | Short description |
---|---|---|

short | pdg | pdg code |

float | E | True energy [GeV] |

float | visE | Sum of FLS hits produced from this neutrino [GeV] |

float | visEinslc | Sum of FLS hits produced from this neutrino in this subevent [GeV] |

float | eff | Slicer efficiency for this truth interaction. |

float | pur | Slicer purity for this truth interaction |

unsigned int | nhitslc | Number of hits recorded in this slice by this truth interaction |

unsigned int | nhittot | Total number of hits recorded for this truth interaction |

float | time | interaction time. |

TLorentzVector | p | True momentum [GeV] |

TVector3 | vtx | Vertex postion in detector coordinates [cm] |

The SRNeutrino adds the following additional fields:

Type | Variable Name | Short description |
---|---|---|

short | pdgorig | Unoscillated (unswapped) pdg code |

short | hitnuc | Struck nucleus |

float | woscdumb | Simplest possible oscillation weight |

int | mode | interaction mode from enum int_type[QE, RES, COH, ...] |

bool | iscc | true if charged-current interaction, false if not. |

int | inttype | Interaction type enum int_type::[...] |

float | q2 | Squared momentum transfer [GeV^2] |

float | x | Bjorken x = (k-k')^2 / (2*p.q), [Dimensionless] |

float | y | Bjorken y = (p.q) / (k.p), fractional energy loss of incoming particle [Dimensionless] |

float | W2 | Invariant mass of final state squared. [GeV^2] |

std::vector<SRTrueParticle> | prim | Primary daughters, lepton comes first in vector. |

SRBeam | beam | Information about neutrino production |

The SRBeam object has these fields:

Type | Variable Name | Short description |
---|---|---|

TVector3 | tv | "target vertex". Exit point of parent particle at the target |

TVector3 | tp | "target momentum". Parent momentum exiting the target |

int | tptype | "target particle type". Parent particle ID exiting the target (PDG code) |

float | nimpwt | "neutrino importance weight". Weight of neutrino parent |

int | ndecay | "neutrino decay". Decay mode that produced neutrino |

TVector3 | v | "vertex". Position of hadron/muon decay |

TVector3 | pdp | "parent decay momentum". Parent momentum at decay point |

float | ppdxdz | "parent particle momentum dx/dx". Parent dx/dz direction at production |

float | ppdydz | "parent particle momentum dy/dz". Parent dy/dz direction at production |

float | pppz | "parent particle p_z". Parent Z momentum at production |

float | ppenergy | "parent particle energy". Parent energy at production |

int | ppmedium | "parent particle medium". Tracking medium number where parent was produced |

int | ptype | "parent type". Parent PDG code |

TVector3 | ppv | "parent particle vertex". Parent production vertex |

The SRCosmic has these fields:

Type | Variable Name | Short description |
---|---|---|

float | azimuth | Azimuth angle (w.r.t y-axis) |

float | zenith | Zenith angle (w.r.t y-axis) |

TVector3 | start | Cosmic start point in detector coordinates. [cm] |

TVector3 | stop | Cosmic end point in detector coordinates. [cm] |

## BreakPointFitter (BPF) Information:¶

### BPF Numu CC Event PID (sr->sel.bpfid):¶

(see the variables listed in the Selection Branch listed above .)

### BPF Tracks: (sr->vtx.elastic.fuzzyk.png.bpf)¶

Honestly... ...the best place to look for this information is in the doxygen pages here .)