Level 3 Muon Data

Warning: Use anything you find here at your own risk.

The bulk of this document was written by Martin Wegner. He doesn't work on L3 muons anymore, so please send any complaints etc to me.

Please also read the following documents:

How to obtain the L3 trigger information

Basically there are two ways to obtain the L3 information from a DST or TMB:
Either you run TrigAnalyze (see documentation here) and use the root-tuple that it produces. In this case the table of the root tuple contents is probably what you're looking for.

Or you write your own framework-executable. In this case you may find the following following chapter interesting.
(Note: To compare reco and L3 information, in almost all cases you will have to make a framework executable. While including MC information in the trigsim ntuple is fairly straightforward, including reco information is not and there are no plans to change this.)

Physics and Debug Info

The Level 3 Trigger provides two kinds of information in the raw data: A physics and a debug chunk. Generally speaking the debug chunk contains more detailled information, while the physics chunk confines itself to the most important values. When running online, the physics chunk is always written out, whereas the debug chunk is written out only for mark-and-pass events.

Getting L3 information from DST-chunks

In general

Let's assume, you're somewhat familiar with the idea of d0om (if you still think, that's the famous ego-shooter of the 90s, then you might want to read some good documentation first), you know what a "chunk" is and how to access it.

In our case the chunks you need are the classes L3Chunk for the physics and L3DebugChunk for the debug info, both belonging to the package l3fchunk

The idea of both, the debug and the physics chunk, is generally that they contain a std::map which assignes a keyword to an instance of the class that contains the data for a certain tool. To make things easy, the keyword is the toolname which you can find in your toollist (or the trigger list), e.g. "MUO_LOCAL".

In the case of L3DebugChunk the mentioned class is derived from L3DebugInfo (package l3utilites), in the case of L3Chunk it's derived from L3PhysicsResults (package l3fresults). In order to get these maps from the chunk you can use the methods L3DebugChunk::getDebugInfo() or L3Chunk::getPhysToolMap() resp.

In detail

So once you know the name of your favourite tool (e.g. "MUO_LOCAL"), you should be able to easily get hold of the corresponding debug or physics info. The only think you still need is some information about the specific DebugInfo and PhysicsInfo classes:

How to practically realize the access to the variables is probably explained best by examples:
(The relevant methods and classes are highlighted. For a complete list of all accessors please have a look at the source code of the respective classes

Getting L3 information from the root tuple

A few hints for TrigSimAnalyze

If you only want L3 information make your life a bit easier and run both trigsim and trigsim_analyze with the 'l3only' option.

To select offline/online chunks (if the default option is not what you want) change trigsim_analyze/rcp/runTrigSimAnalyze_l3only.rcp:

    RCP l3fana =<l3fanalyze L3Analyze_auto_online>
to
    RCP l3fana =<l3fanalyze L3Analyze_auto_offline>
(or vice versa).
When running trigsim_analyze with d0tools (i.e. runTrigAnalyze), you must then use the -localfwkrcp option, so that trigsim_analyze picks up your local rcp.

Naming conventions

Summary of the ROOT Tuple content

The following table lists all relevant leaves of the trigism_analyze root-tuple.
The green entries are index variables containing the size of the following arrays. (E.g the leaves "MDTbar" through "MDTtype" have NMDT entries each.)

ROOT-branch MUOUNPACK_DEFAULT

parameter in toollist: L3TMuoUnpack MUOUNPACK_DEFAULT
(i.e. if it isn't in the toolist file you are using it won't be in the root file).
<
TypeNameDescription
Int_tNMDTnumber of MDT (mini drift tubes) hits
Float_tMDTbar barrel number (muon index: see note at the end of the page), 0 for all MDT
Float_tMDTddist drift distance
Float_tMDTdtimedrift time
Float_tMDTetamuon index eta
Float_tMDThitxglobal x position of MDT hit
Float_t MDThity global y position of MDT hit, calculated as above
Float_t  MDThitz global z position of MDT hit, calculated as above
Float_t MDTlayer muon index layer (0,1,2)
Float_t MDToct muon index octant (0->7)
Float_t MDTphi muon index phi, always 0 for MDT
Float_t MDTplane muon index plane (0,1,2,3)
Float_t MDTreg muon index region, 1 (north) or 2 (south) for MDT
Float_t MDTtube muon index tube, 0 to 7
Float_t   MDTtype muon index type, 0 for MDT
Int_tNMSCnumber of scintillator hits (forward and central)
Float_t MSCbar muon index barrel, 0,1,2,3,4
Float_tMSCddist Drift distance. There is no drift distance in a scintillator, so this variable is set to 0.
Float_t  MSCdtime drift time
Float_t MSCeta muon index Eta of the scintillator hit
Float_tMSChitx x-position of the scintillator hit
Float_t MSChity y-position of the scintillator hit
Float_tMSChitz z-position of the scintillator hit
Float_t MSClayer muon index Layer (0..3) of the scintillator hit
Float_t MSCoct muon index Octant (0..7) of the scintillator hit
Float_t MSCphi muon index Phi of the scintillator hit
Float_tMSCplane muon index Plane (0..3) of the scintillator hit
Float_tMSCreg muon index Region (0..2) of the scintillator hit
Float_t MSCtube muon index Tube number of the scintillator hit
Float_t MSCtype...
Int_tNPDTnumber of PDT (proportional drift tubes) hits
Float_t PDTbar muon index::barrel number (in z direction)
Float_t PDTddist drift distance
Float_t PDTdtime drift time
Float_t PDTeta muon index::eta
Float_t PDThitx global x of PDT hit
Float_t PDThity global y of PDT hit
Float_t PDThitz global z of PDT hits
Float_t PDTlayer muon index layer
Float_t PDToct muon index octant
Float_t PDTphi muon index phi
Float_t PDTplane muon index plane (0,1,2,3)
Float_t PDTreg muon index region: is always 0 as PDTs are only in central region
Float_t PDTtube muon index tube, is always 0 for PDT (needs some hardware comment here, ask T. Diehl ?)
Float_t PDTtype muon index type (is 0 for drift tube)

ROOT-branch MUO_LOCAL

TypeNameDescription
Int_tNMDTHITnumber of MDT hits (same as in unpacker)
Float_tMDTHIT_hitxGlobal x position of MDT hit.
Float_tMDTHIT_hityGlobal y position of MDT hit.
Float_tMDTHIT_hitzGlobal z position of MDT hit.
Int_tNMSCHITnumber of scintillator hits (same as in unpacker)
Float_tMSCHIT_hitxGlobal x of scintillator hit.
Float_tMSCHIT_hityGlobal y of scintillator hit.
Float_tMSCHIT_hitz Global z of scintillator hit.
Int_tNPDTHITnumber of PDT hits (same as in unpacker)
Float_tPDTHIT_hitx Global x position of PDT hit.
Float_tPDTHIT_hity Global y position of PDT hit.
Float_tPDTHIT_hitz Global z position of PDT hit.
Int_tNSEGnumber of segments (all segments, not just the ones used to make tracks)
Float_tSEGangleddrift angle
Float_tSEGchi2chi2 of segment fit
Float_tSEGeranglederror on drift angle
Float_tSEGerphi error on detector phi
Float_tSEGerxError of x position of segment
Float_tSEGeryError of y position of segment
Float_tSEGerzError of z position of segment
Float_tSEGphidetector phi of segment
Float_tSEGxGlobal x position of segment
Float_tSEGyas above
Float_tSEGzas above
Int_tNTRKnumber of tracks
Float_tTRKaxialresnot filled, set to 999
Float_tTRKbanglebending angle in the toroid. (Not filled, set to 999)
Float_tTRKchargeCharge of track: +1, -1 obviously.
Float_tTRKchi2chi2 of fit from A segment to BC segment.(-1 for A stubs or if fit fails.)
Float_tTRKdriftresnot filled, set to 999
Float_tTRKelossEnergy loss in calorimeter (from Run I by eta, phi, not pt, muon is assumed to behave as a MIP)
Float_tTRKitnbernumber of iterations of track fit (used to derive sensible maximum number of iterations)
Float_tTRKms1multiple scattering angle (Not filled, set to 999)
Float_tTRKms2as above
Float_t TRKnhits_anumber of (wire+scint) hits in A-Layer (0->8 for PDT only, more for PDT and MDT combined)
Float_tTRKnhits_bcnumber of (wire+scint.) hits in BC-Layer (Hits in B- and C-layer are not counted separately)
Float_tTRKnschits_aNumber of scintillator hits of a track in the A-layer.
Float_tTRKnschits_bcNumber of scintillator hits of a track in the BC-layer.
Float_tTRKnwhits_aNumber of wire hits of a track on the A-layer
Float_tTRKnwhits_bcNumber of wire hits of a track on the BC-layer
Float_tTRKoctantOctant of the track
Float_tTRKptapt at the A layer (not corrected)
Float_tTRKptrktrack momentum corrected for energy loss in the calorimeter
Float_tTRKpttracktransverse momentum of the track
Float_tTRKpxax-component of the track momentum in the A-layer (i.e. before the toroid)
Float_tTRKpxbx-component of the track momentum in the BC-layer
Float_tTRKpyay-component of the track momentum in the A-layer
Float_tTRKpyby-component of the track momentum in the BC-layer
Float_tTRKpzaz-component of the track momentum in the A-layer
Float_tTRKpzbz-component of the track momentum in the BC-layer
Float_tTRKquality 
Float_tTRKregion -1 = South, 0 = Central, 1 = North
Float_tTRKtrk_etaeta at A-layer
Float_tTRKtrk_phiphi at A-layer
Float_tTRKxax-coordinate of track at intersection with A-layer (= A-layer segment position)
Float_tTRKxbx-coordinate of track at intersection with BC-layer (= BC-layer segment position)
Float_tTRKyay-coordinate of track at intersection with A-layer
Float_tTRKyby-coordinate of track at intersection with BC-layer
Float_tTRKzaz-coordinate of track at intersection with A-layer
Float_tTRKzbz-coordinate of track at intersection with BC-layer

ROOT branch Muon_p

The first group variables are contents of the base class L3PhysData. They are meant to describe any physics object and can be found in all physics results root branches.

TypeNameDescription
Int_tnNumber of entries
Float_tETTransverse energy (or momentum)
Float_tEta (Detector) eta
Float_tkineT  
Float_tkineX  
Float_tkineY  
Float_tkineZ  
Float_tvtxX x-coordinate of the vertex
Float_tvtxY y-coordinate of the vertex
Float_tvtxZ z-coordinate of the vertex

The second group of variables is specific to the muon physics results.

TypeNameDescription
Int_tNMUONNumber of entries
Float_tMUONregionRegion of the muon track (-1=South, 0=Central, 1=North)
Float_tMUONoctantOctant of the muon track
Float_tMUONeta Eta of the local muon track
Float_tMUONphi Phi of the local muon track
Float_tMUONxA x-coordinate of the segment in the A-layer
Float_tMUONyA y-coordinate of the segment in the A-layer
Float_tMUONzA z-coordinate of the segment in the A-layer
Float_tMUONxB x-coordinate of the segment in the BC-layer
Float_tMUONyB y-coordinate of the segment in the BC-layer
Float_tMUONzB z-coordinate of the segment in the BC-layer
Float_tMUONqualitySee note below
Float_tMUONetrack Energy of the muon track in the calorimeter (not yet used)
Float_tMUONhfrac Hadronic fraction of the muon track in the calorimeter (not yet used)
Float_tMUONimpactXY Impact parameter of the central track
Float_tMUONsignifImpactXYSignificance of the impact parameter
Float_tMUONcmEta Eta of the matching central track
Float_tMUONcmPhi Phi of the matching central track
Float_tMUONcmZ Z-position of the matching central track
Float_tMUONcmPt Transverse momentum of the matching central track
Float_tMUONchisq Chi^2 of the central match
L3MuoCalMatchDebugInfoExaminer: Any volunteers to write some documentation ?

L3MuoCentralMatchDebugInfoExaminer: Due to its stupidly long variable names it crashes the analyze program (hence the new naming scheme). If you are running a p15 version with the old naming scheme and you aren't interested in it's results, take it out of the tool list. If you need it, p15.07 should work, otherwise go in the examiner (l3fanalyze/L3MuoCentralMatchDebugInfoExaminer.cpp) and rename the variables ('NCentralmatch' ?!) to something a bit shorter and recompile.

More random notes on the content

Momenta

Martijn Mulders on which pt is actually used by the muon filters to cut on:
The pt that is actually used in the L3Muon filter is defined in l3filters/src/L3FMuon.cpp (and don't ask me why they need an abs here) !
    float pT_local = 
    abs((*iter)->getMomentA().perp()/(*iter)->getMomentA().mag(),*(*iter)->getMomentum());
    
getMomentA() returns the momentum vector in the A-layer which is not corrected for energy-loss in the calorimeter.
getMomentA().mag() returns the magintude of the uncorrected momentum.
getMomentA().perp() returns the uncorrected transverse momentum.
getMomentum() returns the magnitude of the corrected momentum.

to reproduce the equivalent number from the l3fanalyze ntuple use: TRKpxb, TRKpyb and TRKpzb

Muon Quality:

The current definitions of muon quality are a disaster. The definitions in the debug info and the physics results are different, even though they shouldn't be. Most of the time debug_quality = physics_quality+1. Given below are the physics quality definitions. They are defined in l3fMuonTools/L3TMuon.cpp. They will eventually be moved to l3fmuo_local where they belong.
0 = none
1 = astub
2 = loose
3 = tight
Note: In p15 there is no medium muon.

Muon Index

The software index is characterized by nine parameters:

region: 0 = central, 1 = north, 2 = south
type: 0 = wire chamber, 1 = scintillator
layer: 0 = A-layer, 1 = B-layer, 2 = C-layer
octant: 0-7, 0 starts at x-axis towards y-axis
barrel: (central only) A: 1, 2, 3; B/C: 0, 1, 2, 3, 4;
B/C octants 5, 6: 0, 1, 3, 4
(These numbers are also encoded in the PDTs:
PDT = ijk, where i = layer, j = barrel, k = octant)
plane: scintillators: 0, Wires: increasing away from the origin
Wire A-layer: 0, 1, 2, 3; Central A-layer, Octants 5 \ 6: 0, 1, 2
Wire B/C-layer: 0, 1, 2
eta: Central: increases in z, Forward: increases in r
phi: Wire: 0, Scint: 0-9, increases in global phi.
Note that the labeling in phi is not symmetric around the beam.
tube: Scintillator with 2 PMT: 0-1, MDT: 0-7

Daniela Bauer
Last modified: Sat Jan 31 16:51:31 CST 2004