Merit/AnalysisNtuple Variables


The merit ntuple contains all the variables found in the Analysis Ntuple, with a few additional. They're split up into several groups below. Text in RED or GREEN contains queries or comments between the perpetrators; users should ignore these. (But you won't, I'll bet!) 

Text in BLUE contains notes to the user.

First, the variables generated in merit. (Note: Since this file is documentation for AnalysisNtuple, it is not guaranteed to be up-to-date for merit.)  The names here are likely to change... underscores removed, consistent prefixes added, maybe "IM" changed to "Event"...

Run  Run number
Event_ID  Event sequence number (as generated) in the run
MC_src_Id  Unique integer associated with each MC source  ("Id" here and "ID" above should be made consistent)
elapsed_time  elapsed time in seconds since t0 (for DC1: 18-July-2005)
FilterStatus_HI*  High order 17 bits of filter status word; these are the veto bits. If this word is non-zero, the event was vetoed by the OnboardFilter code.
FilterStatus_LO*  Low order 15 bits of filter status word; these give status of the OnboardFilter for this event.* 
IMgoodCalProb  Classification tree probability that Cal energy is well measured
FT1EventID  RunNo*(number of events in file) + EventNo
FT1Energy  Should be EvtEnergySumOpt; original issue uses Tkr1ConEne and TkrSumConEne
FT1Theta  Theta of event in detector frame (next few items in degrees, 666 if no tracks)
FT1Phi  Phi of event in detector frame
FT1Ra  Right Ascension of event
FT1Dec  Declination of event
FT1ZenithTheta  Earth zenith angle of event
FT1EarthAzimuth  Earth azimuth of event
FT1ConvPointX  X conversion point of event, whether single track or vertex, 999 if no tracks
FT1ConvPointY  ditto Y
FT1ConvPointZ  ditto Z
FT1ConvLayer  conversion layer of event, -1 if no tracks
IMvertexProb  Classification tree probability that the vertex gives a better measure of the direction than the best track alone
IMcoreProb  Classification tree probability that the event is in the core of the PSF
IMpsfErrPred  Classification tree prediction of the PSF for this event, normalized to the 68% point predicted from an analytic model. That is, "1" means that this event is likely to have the nominal PSF; a lower number means that the PSF is likely to be better than nominal.
IMgammaProb Classification tree prediction of the probability that this event is a gamma rather than a background event.

* See http://www-glast.slac.stanford.edu/software/core/tempstuff/filter.htm for definitions of the bits in these words.

Then the variables from the Analysis Ntuple, arranged by tool, and by sequential order within each tool. Unless otherwise noted, energy is in MeV, length is in mm, and angle is in radians. Also, unless otherwised noted, the null value, that is, the value in the ntuple when there is no calculated value for a given variable, is zero. (I'll fix these as I find them.)

MC Variables

McId  StdHepId of primary (-13 = mu+, 22 = gamma, etc.)
McCharge  charge of primary
McEnergy   Kinetic energy of the generated primary particle NEW definition!!
McEFrac  fraction of incident energy in highest-energy daughter
McLogEnergy  log10(McEnergy)
McX0  x coordinate of photon conversion or charged particle origin
McY0  ditto y
McZ0  ditto z
McXDir  x direction cosine of primary particle
McYDir  ditto y
McZDir  ditto z 
McXErr  x (found) - x (Mc) (Mc position taken at the z of the found vertex or first hit)
McYErr  ditto y
McZErr  z(actual vertex or first hit) - McZ0  NEW!!
McXDirErr  xdir (found) - xdir (Mc)
McYDirErr  ditto y
McZDirErr  ditto z
McDirErr  angle between found direction and Mc direction (radians)
McTkr1DirErr  angle between direction of best track and Mc direction (radians)
McTkr2DirErr  angle between direction of second track and Mc direction (radians)

Trigger Variables (Glt = Glast Trigger)

GltWord  trigger word from the event header (null value is -1)
GltTower  Id of tower that triggered; if more than one, choose the lowest (null value is 18)
GltXTower  x index of GltTower (null value = -1)
GltYTower  y index of GltTower (null value = -1)
GltLayer  first layer of trigger in GltTower (this is recon layer; 0 is at the top!)
GltTotal  number of possible triggers (a straight-through track in a single tower produces 13 potential triggers
GltNumTowers  number of towers which trigger (crossing track)
GltType  number of exposed sides for the triggered tower, i.e. 0 = central tower, 1 = side tower, 2 = edge edge tower. This number is 4 for the EM.
GltMoment  Please ignore for now
GltZDir            ditto

TKR Variables

TkrNumTracks  number of tracks found (Maximum is set by TkrRecon, currently 10)
TkrSumKalEne  sum of Kalman energies for the two best tracks
TkrSumConEne  sum of the energies for the two best tracks, as assigned by the patrec energy tool
TkrEnergy  energy in tracker, as determined from linear regression analysis of number of clusters
TkrEnergySum  energy in tracker, as determined by counting up clusters and associated radiation lengths. This is historical; it will probably go away, so don't use it!
TkrEnergyCorr  TkrEnergy corrected by TkrEdgeCorr
TkrEdgeCorr  tracker edge correction. This may go away; it's an intermediate quantity
TkrHDCount  number of unused clusters in top x-y layer of track
TkrTotalHits  number of clusters "near" the best track. This may go away; it's an intermediate quantity
TkrThinHits  number of clusters in the thin converter layers.     ditto!
TkrThickHits  number of clusters in the thick converter layers.     ditto!
TkrBlankHits  number of clusters in the no-converter layers.     ditto!
TkrRadLength  radiation lengths traversed by the best track. This is from half-way thru the initial converter to the lowest bi-plane in the tracker, whether or not the track actually gets to the end.
TkrTwrEdge  The average distance of the track from the "edge" of each tray, weighted by radiation lengths traversed.  (The edge is a plane halfway between the towers.
TkrTrackLength  distance between the start of the track and the grid, along the track axis.
Tkr1Chisq  Track 1 chisquared
Tkr1FirstChisq  Track 1 chisquared for first Tkr1FirstHits layers
Tkr1Hits  Track 1 number of clusters
Tkr1FirstHits  number of initial track-1 hits that determine the starting direction
Tkr1FirstLayer  first recon layer in track 1
Tkr1DifHits  difference between the number of x and y clusters associated with track 1
Tkr1Gaps   Track 1 total number of gaps
Tkr1FirstGaps  Track 1 number of gaps in first Tkr1FirstHits layers on track 1
Tkr1Qual  Track 1 quality: depends on the length and chisquared of the track. Maximum is currently 64, can be negative if chisqared gets large.u
Tkr1Type PatRec type for track 1: integer with digits abc (i.e. 231)
   a: 1 = blind, 2 = cal-seeded
   b: 1 = patrec minimun energy, 2 = Kalman energy, 3 = constrained energy
   c: number of leading hits upstream of first x-y pair 
Tkr1TwrEdge  Distance from tower edge of initial point (0 is halfway between the towers, increases towards center of tower)
Tkr1PrjTwrEdge  Distance from tower edge of track extrapolated to the layer upstream of the first layer (See Tkr1TwrEdge.)
Tkr1DieEdge  Distance from die (wafer) edge of initial point (0 is halfway between the dies, increases toward center of die)
Tkr1TwrGap  Length of track in nominal intertower gap, currently set to 18 mm. Can be a small as zero if track exits through bottom of tracker, and as large as the intertower gap, if track crosses to adjacent tower.
Tkr1KalEne   Kalman energy of track 1; this is the energy determined from the multiple scattering along the track (goes like 1/E). Since a track with no scattering is possible, this energy is artificially limited to 100 GeV.
Tkr1ConEne  energy from PatRec energy tool for track 1. This tool computes the total event energy and then partitions it between the first 2 tracks according the their Kalman energies and energy errors
Tkr1KalThetaMS  Multiple scattering angle (radians) referenced to first layer. The contributions from all the layers in the track are adjusted for the predicted energy in each layer, and weighted accordingly.
Tkr1XDir  Track 1 x direction cosine
Tkr1YDir  ditto y
Tkr1ZDir  ditto z
Tkr1Phi  Track 1 phi, radians (direction from which particle comes, not particle direction!) range: (0, 2pi)
Tkr1Theta  Track 1 theta, radians (direction ditto)
Tkr1X0  Track 1 x position at first hit
Tkr1Y0  ditto y
Tkr1Z0  ditto z
Tkr1ThetaErr  error on the measurement of theta
Tkr1PhiErr  error on the measurement of phi.
TkrErrAsym  Tkr1SXY/(Tkr1SXX + Tkr1SYY)
Tkr1CovDet  determinant of the error matrix, but normalized to remove the dependence on cos(theta)
Tkr1SXX  x-x element of the covariance matrix; square of error on x
Tkr1SXY  x-y element of the covariance matrix; covariance
Tkr1SYY  y-y element of the covariance matrix; square of the error on y
Tkr1ToTFirst  ToT of first hit on best track (all ToT's are adjusted for pathlength in the non-measuring direction in the strip) NEW!!
Tkr1ToTAve  Average ToT for the hits on the best track NEW!!
Tkr1ToTTrAve  Average ToT for the hits on the best track, excluding the largest and smallest NEW!!
Tkr1ToTAsym  Asymmetry between last two and first two ToT's for the best track NEW!!
Tkr1ChisqAsym  Asymmetry between last two and first two track-segment delta-chisquared's NEW!!
Tkr1SSDVeto  number of hit layers before start of track NEW!!
Tkr2Chisq  Track 2 chisquared
Tkr2FirstChisq  Track 2 chisquared for first Tkr2FirstHits layers
Tkr2Hits  Track 2 number of clusters
Tkr2FirstHits  number of initial track-2 initial hits that determine the starting direction.
Tkr2FirstLayer  first recon layer in track 2
Tkr2DifHits  difference between number of x and y clusters associated with track 2
Tkr2Gaps   Track 2 total number of gaps
Tkr2FirstGaps  Track 2 number of gaps in first Tkr2FirstHits layers
Tkr2Qual  Track 2 quality (See Tkr1Qual)
Tkr2Type  PatRec type for track 1: integer with digits abc (i.e. 231)
   a: 1 = blind, 2 = cal-seeded
   b: 1 = patrec minimun energy, 2 = Kalman energy, 3 = constrained energy
   c: number of leading hits upstream of first x-y pair 
Tkr2TwrEdge  Distance from tower edge of initial point (0 is halfway between the towers, increases towards center of tower)
Tkr2PrjTwrEdge  Distance from tower edge of track extrapolated to the layer upstream of the first layer (See Tkr1TwrEdge.)
Tkr2DieEdge  Distance from die (wafer) edge of initial point (0 is halfway between the dies, increases toward center of die) Not much used; may go away.
Tkr2KalEne  Kalman energy of track 2 (See Tkr1KalEne)
Tkr2ConEne  energy from PatRec energy tool for track 2. Note: this tool computes the total event energy and then partitions it between the first 2 tracks according the their Kalman energies and energy errors
Tkr2KalThetaMS  Multiple scattering angle (radians) referenced to first layer. The contributions from all the layers in the track are adjusted for the predicted energy in each layer, and weighted accordingly.
Tkr2XDir  Track 2 x direction cosine
Tkr2YDir  ditto y
Tkr2ZDir  ditto z
Tkr2Phi  Track 2 phi, radians (direction from which particle comes, not particle direction!) Range: (0, 2pi)
Tkr2X0  Track 2  x position at first hit
Tkr2Y0  ditto y
Tkr2Z0  ditto z

Vertexing Variables

VtxXDir  x direction cosine of the (1st) vertex
VtxYDir  ditto y
VtxZDir  ditto z
VtxPhi  azimuthal angle of vertex, radians (direction of source, not flight direction!) Range: (0,2pi)
VtxTheta  polar angle of vertex, radians (ditto direction)
VtxX0  x coordinate of vertex;  if the two tracks making up the vertex are nearly parallel, the coordinates of the vertex may become very large.
VtxY0  ditto y
VtxZ0  ditto z
VtxAngle  angle between the two tracks of the vertex (radians)
VtxDOCA  distance of closest approach between the two tracks  (Spelling may change to "Doca" at some point after the Collaboration Meeting)
VtxHeadSep  distance between the heads of the two tracks
VtxS1  distance of DOCA point from head of track 1
VtxS2  ditto track 2
VtxDocaWgt  empirical weight factor for VtxDoca, goes from zero to one. Docas large compared to expectation generate low weights. The width seems to be constant with E... shouldn't it decrease with E? (being checked)
VtxHSWgt  ditto VtxHeadSep.
VtxS1Wgt  ditto VtxS1
VtxT12Wgt  ditto VtxAngle
VtxT2QWgt  ditto quality factor for 2nd track. High quality yields high weight.
VtxTotalWgt  Logarithm of the product of VtxT12Wgt, VtxT2QWgt and VtxHSWgt. Is always negative (log of a number less than 1)

CAL Variables:

CalEnergySum  Sum of the raw energies in all the crystals
CalEnergyCorr  Cal Energy corrected globally for edge and leakage
CalEneSumCorr  Cal Energy corrected layer-by-layer for edges and leakage
CalEnergy_LL_Corr  Last-layer-corrected energy. Currently valid between 0 and 26 degrees, and between 1 and 50 Gev.  Returns a negative number when out of range Remove underscores at some agreed-upon time!
CalLeakCorr2  Approximation for leakage correction.
CalEdgeSumCorr  Effective layer-by-layer edge correction; multiplicative
CalTotSumCorr  Effective global correction; multiplicative
CalCsIRLn  Total radiation lengths in crystals, integrated along the trajectory of the first track
CalTotRLn  Total radiation lengths integrated along trajectory of first track
CalCntRLn  Radiation lengths integrated along trajectory of first track, up to energy centroid
CalDeadTotRat  Ratio of radiation lengths in dead material to CalTotRLn
CalDeadCntRat  Ratio of radiation lengths in dead material up to energy centroid, to CalCntRat
CalTPred  Model-predicted energy centroid in radiation lengths
CalDeltaT  Difference between measured and predicted energy centroids
CalTwrEdge  Distance of energy centroid from tower boundary ( >~30 mm is inside active CAL)
CalLATEdge  closest distance of track 1, projected to the top of the CAL, to the edge of the CAL layer, taking non-square shape into account. This is essentially the old merit skirt variable.
CalTENrm  Cosine of angle between event trajectory and normal to nearest side of the CAL module (evaluated at the energy centroid).  Used to characterize the effect of the calorimeter gaps on the energy deposit
CalTrackSep  Distance between impact points of two best tracks at CAL front face; zero if only one track
CalTrackDoca  Distance between the projected vertex (or track if only one track) and the energy centroid, evaluated at the z of the centroid.
CalTwrGap  length of track in intertower gaps
CalELayer0  energy deposited in layer 0
CalELayer1  ditto layer 1
CalELayer2  ditto layer 2
CalELayer3  ditto layer 3
CalELayer4  ditto layer 4
CalELayer5  ditto layer 5
CalELayer6  ditto layer 6
CalELayer7  ditto layer 7
CalLyr0Ratio  ratio of CalELayer0 to CalEnergySum
CalLyr7Ratio  ratio of CalELayer7 to CalEnergySum
CalBkHalfRatio  ratio of total energy in back half of CAL (layers 4-7) to CalEnergySum
CalXtalsTrunc  number of CAL Xtals with > %1 of CalEnergySum (see CalXtalRatio)
CalXtalRatio  Ratio of number of Xtals with energy > 1% of CalEnergySum to total number of struck Xtals in the event.
CalLongRms  rms of longitudinal position measurements
CalLRmsRatio  CalLongRms divided by the raw calorimeter energy
CalTransRms  rms of transverse position measurements
CalMIPDiff  difference between measured energy and that expected from a minimum-ionizing particle
CalMIPRatio  ratio of measured energy to that expected from a minimum-ionizing particle NEW!!
CalXEcentr  energy centroid in x (Spelling may change to CalXCentr or CalXCenter)
CalYEcentr  ditto y
CalZEcentr  ditto z
CalXDir  x direction cosine of CAL "track"
CalYDir  ditto y
CalZdir  ditto z
CalX0  x position of CAL "track"
CalY0  ditto y 
CalZ0  ditto z

ACD Variables: Default Doca/ActiveDistance is -2000 

AcdTotalEnergy  total energy deposited in ACD
AcdTileCount  number of tiles fired
AcdDoca  nearest distance of any track from the center of any tile
AcdActiveDist  nearest distance of any track to the edge of any tile
AcdGammaDoca  distance of Gamma to the center of the nearest tile
AcdActDistTop  smallest active distance of any track to top tiles
AcdActDistSideRow0  smallest active distance of any track to tiles in side row 0 (topmost)
AcdActDistSideRow1  ditto side row 1
AcdActDistSideRow2  ditto side row 2
AcdNoSideRow0   Hit Tile count for side row 0
AcdNoSideRow1  ditto side row 1
AcdNoSideRow2  ditto side row 2
AcdRibbonActDist smallest active distance to any ribbon (considered as a straight line of no thickness)

TKR Hit Variables 

(not normally written out, but the tool exists)

TkrNumHits  total number of TKR clusters
TkrMaxControllerHits   NOT FILLED
Tkr1stLayer  First layer containing a cluster (Spelling may change to TkrFirstLayer)
TkrNumLayersHit  total number of hit layers
TkrHitsInLyr00  number of clusters in (bi)layer 0 (recon layer; 0 is at the top!)
TkrHitsInLyr01  ditto layer 1
TkrHitsInLyr02  ditto layer 2
TkrHitsInLyr03  ditto layer 3
TkrHitsInLyr04  ditto layer 4
TkrHitsInLyr05  ditto layer 5
TkrHitsInLyr06  ditto layer 6
TkrHitsInLyr07  ditto layer 7
TkrHitsInLyr08  ditto layer 8
TkrHitsInLyr09  ditto layer 9
TkrHitsInLyr10  ditto layer 10
TkrHitsInLyr11  ditto layer 11
TkrHitsInLyr12  ditto layer 12
TkrHitsInLyr13  ditto layer 13
TkrHitsInLyr14  ditto layer 14
TkrHitsInLyr15  ditto layer 15
TkrHitsInLyr16  ditto layer 16
TkrHitsInLyr17  ditto layer 17(at the bottom, next to the CAL)

Overall Event Variables 

These are calculated from combinations of the variables from different tools. "Flattened" means correct to make the quantity roughly independent of energy (to logE) and angle

EvtEnergySumOpt  Event energy formed by adding the corrected tracker energy (TkrEnergyCorr) to the layer-by-layer corrected cal. energy CalEneSumCorr.
EvtEnergyTracker  Not calculated yet
EvtEnergyRaw  TkrEnergyCorr + CalEnergySum
EvtMcEnergySigma  difference between EvtEnerySumOpt and McEnergy, as a fraction of McEnergy
EvtCalEdgeAngle Obsolete; replaced by CalTwrGap 
EvtTkrEdgeAngle Obsolete; replaced by Tkr1TwrGap
EvtLogESum log10 of EvtEnergySumOpt, pegged between log10(20) and log10(50,000)
EvtTkr1EFrac  Tkr1ConE/EvtEnergySumOpt, roughly, fraction of energy carried by best track
EvtVtxKin  Bill opines that this variable is less useful than EvtVtxEAngle
EvtVtxEAngle  VtxAngle*EvtEnergySumOpt, (most of energy dependence removed)
EvtTkrComptonRatio  ratio of TkrTotalHits to twice the number of layers from the head of the best track to the bottom of the TKR
EvtTkrEComptonRatio EvtTkrComptonRatio, flattened
EvtPSFModel  PSF expected from simple model; depends only on energy  Formula in the process of being corrected!
EvtTkr1EChisq  Tkr1Chisq, flattened
EvtTkr1EFirstChisq  Tkr1FirstChisq, flattened
EvtTkr1EQual Tkr1Qual, flattened
EvtTkr1PSFMdRat  Ratio of errors from covariance matrix to EvtPSFModel
EvtTkr1ECovDet  Tkr1CovDet, flattened in energy
EvtTkr2EChisq  Tkr2Chisq, flattened
EvtTkr2EFirstChisq  Tkr2FirstChisq, flattened
EvtTkr2EQual  Tkr2Qual, flattened
EvtCalETLRatio  Ratio of CalTransRms to CalLongRms, flattened
EvtCalEXtalRatio CalXtalRatio, flattened
EvtCalEXtalTrunc CalXtalsTrunc, flattened (Spelling may change to EvtCalXtalsTrunc, to match original CalXtalsTrunc)
EvtCalETrackDoca CalTrackDoca, flattened
EvtCalETrackSep CalTrackSep, flattened
EvtVtxEEAngle EvtVtxEAngle, further flattened
EvtVtxEDoca VtxDOCA, flattened
EvtVtxEHeadSep VtxHeadSep, flattened

 



Last Modified: 30 September, 2003
Leon Rochester (lsrea@slac.stanford.edu)
Bill Atwood (atwood@scipp.ucsc)