TrkAna: Difference between revisions

From Mu2eWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(57 intermediate revisions by 4 users not shown)
Line 1: Line 1:
='''TrkAna is now obsolete!''' =
As of 2024-10-14, TrkAna has now been replaced by [[EventNtuple]]. This page is just being kept for archival purposes.
== Overview ==
== Overview ==
TrkAna is a track-based ROOT TTree that can be used to help with analysis. Each entry in the TTree corresponds to a single fitted track and contains reconstructed information from the tracker, calorimeter and CRV. There is also the option to write out Monte Carlo truth information and additional information for other track types that might be important to an analysis.
'''Updated: 2024-06-21'''
 
TrkAna is an event-based ROOT TTree that can be used for analysis. Each entry in the TTree corresponds to a single Mu2e event and contains reconstructed information from the tracker, calorimeter and CRV. There is also the option to write out Monte Carlo truth information and hit-level information.


== How to Get Help ==
== How to Get Help ==
'''Updated: 2024-06-21'''


Feel free to send any questions to the #trkana Slack channel, or the 'Is It Me Or A Bug?' hypernews forum.
Feel free to send any questions to the [https://mu2e.slack.com/archives/C023EVADW2X #trkana] or #is_it_me_or_a_bug Slack channels


There is also a [https://mu2ewiki.fnal.gov/wiki/TrkAna_Tutorial_Session tutorial] that is a few years old and will be updated soon.
There is a tutorial hosted in the [https://github.com/Mu2e/TrkAna/blob/main/tutorial/README.md GitHub respository].


== How to Build ==
== For Analyzers ==
TrkAna is built within the [[Muse]] environment.
=== How to Analyze a TrkAna Tree ===
'''Updated: 2024-06-21'''


Once you log in:
See the tutorials on GitHub here: https://github.com/Mu2e/TrkAna/blob/main/tutorial/README.md for exercises that analyze TrkAna trees with both ROOT and python
<pre>
setup mu2e
setup muse
</pre>


In your working directory, the only required package is Offline so either clone the Offline repository, or link an already existing Offline build to your Muse environment:
=== How To Create a TrkAna Tree ===
<pre>
'''Updated: 2024-06-21'''
git clone git@github.com:Mu2e/Offline.git
</pre>
or,
<pre>
muse link Offline vXX_YY_ZZ
</pre>


Then you can clone the TrkAna repository into your Muse environemt:
You can use the TrkAna Musing like so:
<pre>
<pre>
git clone git@github.com:Mu2e/TrkAna.git
mu2einit
muse setup TrkAna
mu2e -c TrkAna/fcl/TrkAnaReco.fcl -s mcs.art --TFileName trkana.root
</pre>
</pre>


And finally you can set up and build everything:
where mcs.art contains the result of the Mu2e reconstruction.
<pre>
muse setup
muse build -j4 --mu2eCompactPrint
</pre>


== How To Run ==
In the trkana.root file, you will find the TrkAna TTree in <pre>TrkAna/trkana</pre>.
=== Reco Datasets ===
There is an example fcl configuration in the TrkAna repository that runs on reco files (see e.g. [https://mu2ewiki.fnal.gov/wiki/MDC2018#Reco_Datasets MDC2018 reco datasets]).


<code>mu2e -c TrkAna/fcl/TrkAnaReco.fcl -s mcs.art --TFileName trkana.root</code>
TrkAna is designed to have some flexibility. There are fcl parameters that can be changed and there are a few examples available here: https://github.com/Mu2e/TrkAna/tree/main/fcl and are given in the table below in [[#TrkAna Fcl Examples]]. Also, you can always ask for help on the #trkana channel on Slack


This runs two instances of the TrackAnalysisReco module. One for negative tracks (TrkAnaNeg) and one for positive tracks (TrkAnaPos). Each tree has the same structure as shown below.
== For Developers ==
'''Updated: 2024-06-17'''


=== Ensemble Datasets ===
If you will be contributing to the development of TrkAna, then you should fork TrkAna on GitHub into your GitHub account, and then set up your development area like so:
If you are running on the [https://mu2ewiki.fnal.gov/wiki/MDC2018#Ensemble_Datasets MDC2018 ensemble datasets], then you can use the fcl files:
* <code>TrkAna/fcl/TrkAnaRecoEnsemble-Data.fcl</code>, and
* <code>TrkAna/fcl/TrkAnaRecoEnsemble-MC.fcl</code>.


== How To Use ==
Once you log in:
=== with ROOT ===
<pre>
You can use the trkana tree like you would any other ROOT TTree: with the ROOT command line for data exploration, with ROOT macros to make plots etc.
mu2einit
cd /your/working/directory
muse backing HEAD
git clone git@github.com:<Your GitHub Username>/TrkAna.git


=== with Python ===
cd TrkAna
The best way to open ROOT files in Python is to use the [https://uproot.readthedocs.io/en/latest/ uproot] package. It does not require a working installation of ROOT, so it allows to read a ROOT file on basically any platform that supports Python (e.g. [https://colab.research.google.com/ Colaboratory]). It also provides a more ''pythonic'' bridge between ROOT and Numpy/pandas.
git remote -f add mu2e https://github.com/Mu2e/TrkAna # add the main Mu2e/TrkAna repository as a remote
git fetch mu2e main # grab the current HEAD of Mu2e/TrkAna
git checkout --no-track -b <name-of-your-dev-branch> mu2e/main # create a branch from the HEAD of Mu2e/TrkAna


In order to open a ROOT TTree with uproot it's sufficient to write:
muse setup
 
muse build -j4 --mu2eCompactPrint
<pre>
import uproot
 
file = uproot.open("trkana.root")
trkananeg = file["TrkAnaNeg"]["trkana"] # opens the 'trkana' tree in the 'TrkAnaNeg' folder
</pre>
</pre>


Now, if we want to store, for example, the reconstructed momentum in a Numpy array we can do:
Then you can make your developments (git commit, git push etc.) and then put in a pull request on GitHub.
 
<code>
deent_mom = trkananeg["deent.mom"].array()
</code>
 
Instead of using Numpy arrays it is possible to convert a ROOT TTree in a pandas dataframe with:
 
<code>
df = trkananeg.pandas.df(flatten=False)
</code>


The <code>flatten=False</code> is required to manage branches with vectors or arrays of variable size (e.g. <code>crvinfo</code>).
== Version History / TrkAna Musings ==
Once your data is stored in a pandas dataframe or in a numpy array you can plot it with the many plotting libraries available ([https://matplotlib.org matplotlib], [https://plot.ly/python/ plot.ly], etc.). This example shows how to plot an histogram with matplotlib:


<pre>
'''Updated: 2024-08-09'''
import uproot
import matplotlib.pyplot as plt


file = uproot.open("trkana.root")
This is the list of TrkAna Musings. The top row corresponds to the "current" version.
trkananeg = file["TrkAnaNeg"]["trkana"]
df = trkananeg.pandas.df(flatten=False)


fig, ax = plt.subplots(1,1)
{| class="wikitable"
n, bins, patches = ax.hist(df["deent.mom"],
|-
                          bins=60,  
! scope="col"| TrkAna Musing
                          range=(95,110),  
! scope="col"| TrkAna tag
                          label="Reco. momentum")
! scope="col"| muse backings
</pre>
! scope="col"| muse stub
 
! scope="col"| notes
A class that allows you to query the dataframe and plot manipulated variables can be found at https://github.com/soleti/mu2e_plotter.
|-
| v05_05_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v05_05_00 v05_05_00]
| SimJob MDC2020ah --> Production v00_24_00, mu2e_trig_config v3_04_00 --> Offline v10_32_00
| al9-prof-e28-p057
|
|-
| v05_04_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v05_04_00 v05_04_00]
| SimJob MDC2020ag --> Production v00_23_00, mu2e_trig_config v3_03_00 --> Offline v10_31_00
| al9-e28-prof-p057
|
|-
| v05_03_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v05_03_00 v05_03_00]
| SimJob MDC2020af --> Production v00_22_00, mu2e_trig_config v3_02_00 --> Offline v10_30_00
| al9-e28-prof-p057
|
|-
| (not built)
| [https://github.com/Mu2e/TrkAna/releases/tag/v05_02_00 v05_02_00]
| N/A
| N/A
| use with datasets that are from MDC2020ae and later
|-
| (not built)
| [https://github.com/Mu2e/TrkAna/releases/tag/v05_01_00 v05_01_00]
| N/A
| N/A
| use with datasets earlier than MDC2020ae
|-
| v05_00_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v05_00_00 v05_00_00]
| SimJob MDC2020ac --> Production v00_19_00, mu2e_trig_config v1_1_0 --> Offline v10_28_00
| sl7-prof-e28-p055
| new major version
|-
| (not built)
| [https://github.com/Mu2e/TrkAna/releases/tag/v04_04_00 v04_04_00]
| N/A
| N/A
| final tag before v05 release
|-
|-
| (not built)
| [https://github.com/Mu2e/TrkAna/releases/tag/v04_03_00 v04_03_00]
| N/A
| N/A
| for TutorialBacking test
|-
| v04_02_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v04_02_00 v04_02_00]
| SimJob MDC2020ab --> Offline v10_26_00
| sl7-prof-e28-p051
|
|-
| v04_01_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v04_01_00 v04_01_00]
| SimJob MDC2020z1 --> Offline v10_23_02
| sl7-prof-e28-p049
| CRV branch filling moved from Offline to TrkAna
|-
| v04_00_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v04_00_00 v04_00_00]
| SimJob MDC2020z --> Offline v10_23_01
| sl7-prof-e28-p049
| breaking changes: demfit[] branch, new genealogy branches
|-
| (not built)
| [https://github.com/Mu2e/TrkAna/releases/tag/v03_00_01 v03_00_01]
| N/A
| N/A
| tag before major breaking change, just code tidying so no associated musing
|-
| v03_00_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v03_00_00 v03_00_00]
| SimJob MDC2020y --> Offline v10_22_01
| sl7-prof-e20-p040
| breaking changes: branch names now three characters; uses KinKal fits
|-
| v02_03_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v02_03_00 v02_03_00]
| SimJob MDC2020w --> Offline v10_21_00
| sl7-prof-e20-p039
|
|-
| v02_02_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v02_02_00 v02_02_00]
| SimJob MDC2020v --> Offline v10_20_00
| sl7-prof-e20-p035
|
|-
| v02_01_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v02_01_00 v02_01_00]
| SimJob MDC2020u --> Production v00_10_00 --> Offline v10_18_00
| sl7-prof-e20-p033
|
|-
| v02_00_01
| [https://github.com/Mu2e/TrkAna/releases/tag/v02_00_01 v02_00_01]
| SimJob MDC2020t --> Production v00_09_11 --> Offline v10_17_00
| sl7-prof-e20-p026
|
|-
| (not built)
| [https://github.com/Mu2e/TrkAna/releases/tag/v02_00_00 v02_00_00]
| N/A
| N/A
| failed build due to incompatible KinKal version
|-
| v01_01_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v01_01_00 v01_01_00]
| SimJob MDC2020r --> Production v00_09_02 --> Offline v10_15_01
| sl7-prof-e20-p023
| adds TrkAnaUtils
|-
| (not built)
| [https://github.com/Mu2e/TrkAna/releases/tag/v01_00_01 v01_00_01]
| N/A
| N/A
| resolves MDC2020r incompatibility
|-
| v01_00_00a
| [https://github.com/Mu2e/TrkAna/releases/tag/v01_00_00 v01_00_00]
| Production v00_07_00 --> Offline v10_11_00
| sl7-prof-e20-p021
| updated for muse 1-path/2-path change
|-
|-
| v01_00_00
| [https://github.com/Mu2e/TrkAna/releases/tag/v01_00_00 v01_00_00]
| Production v00_06_00 --> Offline v10_10_01
| sl7-prof-e20-p018
| uses deprecated "muse link"
|-
|}


== Tree Structure ==
== Tree Structure ==
Here is a very rough description of the tree branches and where to find leaf definitions in the repository:
The TrkAna tree structure is documented in google sheet (spreadsheet).  There are separate sheets for different major version numbers.
Links to the existing sheets are below.  These are viewable by anyone; if you would like to comment or edit these sheets please
send a message to the [https://mu2e.slack.com/archives/C023EVADW2X #TrkAna slack channel].
Note that the sheets have multiple tabs, at the bottom of the page. The main tab lists the branches, while the other tabs list
the detailed content (leafs) of the individual branches, by name.
* [https://docs.google.com/spreadsheets/d/1IMZVgj74vxGTWqAFRtFEEcYChujJyc38VcopZh52jhc/edit?usp=sharing Version 4 Branch Documentation]
* [https://docs.google.com/spreadsheets/d/1icrXCdfNoLMXfOaT3QWZTF95M2ADaqyvkTQCFu20L3A/edit?usp=sharing Version 3 Branch Documentation]


; evtinfo : information about the event (TrkAna/inc/EventInfo.hh)
== Hit Level Information ==
; hcnt : count of various hit types (TrkAna/inc/HitCount.hh)
By setting the <code>diagLevel</code> to 2 when running TrkAna, you will fill hit level information branches.
; tcnt : count of various track types (TrkAna/inc/TrkCount.hh)
If you are processing Monte Carlo information, hit level Monte Carlo truth branches will also be added.
; de : global fit information for '''d'''ownstream '''e'''lectron track (TrkAna/inc/TrkInfo.hh)
Adding these increases the size of the output file by an order of magnitude.
; deent : local fit information for '''d'''ownstream '''e'''lectron track at tracker '''ent'''rance (TrkAna/inc/TrkInfo.hh)
; demid : local fit information for '''d'''ownstream '''e'''lectron track at '''mid'''dle of tracker (TrkAna/inc/TrkInfo.hh)
; dexit : local fit information for '''d'''ownstream '''e'''lectron track at tracker e'''xit''' (TrkAna/inc/TrkInfo.hh)
; detch : calorimeter cluster information for cluster used in '''d'''ownstream '''e'''lectron track fit (tch = '''T'''rk'''C'''alo'''H'''it, TrkAna/inc/TrkCaloHitInfo.hh)
; dequal : the output values of the TrkQual and TrkPID ANNs
; uetch : calorimeter cluster information for cluster used in '''u'''pstream '''e'''lectron track fit (tch = '''T'''rk'''C'''alo'''H'''it, TrkAna/inc/TrkCaloHitInfo.hh)
; ue : global fit information for '''u'''pstream '''e'''lectron track (TrkAna/inc/TrkInfo.hh)
; dm : global fit information for '''d'''ownstream '''m'''uon track (TrkAna/inc/TrkInfo.hh)
; trigbits : unsigned int of the triggers
; crvinfo : information about CRV coincidences (Offline/CRVAnalysis/inc/CrvHitInfoReco.hh)
; bestcrv  : element in crvinfo array that is the best
; demc : MC information about particle that created downstream track (TrkAna/inc/TrkInfo.hh)
; demcgen : MC information about particle that started the simulation (TrkAna/inc/GenInfo.hh)
; demcpri : MC information about particle that would have ultimately created the GenParticle (TrkAna/inc/GenInfo.hh)
; demcent : MC information about step of particle that created downstream track as it enters the tracker (TrkAna/inc/TrkInfo.hh)
; demcmid : MC information about step of particle that created downstream track as it passes the middle of the tracker (TrkAna/inc/TrkInfo.hh)
; demcxit : MC information about step of particle that created downstream track as it leaves the tracker (TrkAna/inc/TrkInfo.hh)
; crvinfomc : MC information about CRV coincidences (Offline/CRVAnalysis/inc/CrvHitInfoMC.hh)
; detchmc : MC information about calorimeter cluster used in the downstream electron fit (TrkAna/inc/CaloClusterInfoMC.hh)
; uetchmc : MC information about calorimeter cluster used in the upstream electron fit (TrkAna/inc/CaloClusterInfoMC.hh)
; detshmc : MC information about the straw hits used in the downstream electron fit (need diagLevel > 0, TrkAna/inc/TrkStrawHitInfo.hh)
; detrkqual : the input variables and output value of the track quality artificial neural network (TrkAna/inc/TrkQualInfo.hh)
; evtwt : the values of all EventWeight objects that were in the art even (e.g. proton bunch intensity = PBIWeight)
 
By setting the <code>diagLevel</code> to 2, you can get hit level informationTrkAna
; detsh : reconstructed '''s'''traw '''h'''it information for downstream electron track fit (TrkDiag/inc/TrkStrawHitInfo.hh)
; detsm : information about '''s'''traw '''m'''aterials that the downstream electron track fit goes through (TrkAna/inc/TrkStrawMatInfo.hh)


== Future Developments ==
== Future Developments ==
We're always looking for input from developers and analyzers to keep TrkAna up-to-date! Get in touch on the #trkana Slack channel, or with Andy Edmonds directly with any thoughts / comments you have
We're always looking for input from developers and analyzers to keep TrkAna up-to-date! Get in touch on the #trkana Slack channel, or with Andy Edmonds directly with any thoughts / comments you have
== TrkAna Fcl Examples ==
{| class="wikitable"
|-
! scope="col"| fcl file
! scope="col"| module label
! scope="col"| candidate
! scope="col"| supplements
! scope="col"| notes
|-
! scope="row" rowspan="2"| TrkAnaReco.fcl
| TrkAnaNeg
| downstream e-minus
| upstream e-minus, downstream mu-minus
|
|-
| TrkAnaPos
| downstream e-plus
| upstream e-plus, downstream mu-plus
|
|-
! scope="row" rowspan="2"| CrvExpert.fcl
| TrkAnaNeg
| downstream e-minus
| upstream e-minus, downstream mu-minus
| rowspan="2" | adds <code>crvinfo</code>, <code>crvinfomc</code>, <code>crvsummary</code>, <code>crvsummarymc</code>, and <code>crvinfomcplane</code> branches
|-
| TrkAnaPos
| downstream e-plus
| upstream e-plus, downstream mu-plus
|
|-
! scope="row" rowspan="2"| TrkAnaReco_Upstream.fcl
| TrkAnaNeg
| upstream e-minus
| downstream e-minus, upstream mu-minus
|
|-
| TrkAnaPos
| upstream e-plus
| downstream e-plus, upstream mu-plus
|
|-
! scope="row" rowspan="1"| TrkAnaReco_ceSimReco.fcl
| TrkAnaNeg
| downstream e-minus
| none
| for use with reco files generated with ceSimReco.fcl
|-
! scope="row" colspan="5"| fcl files below are flagged for updating / removal
|-
! scope="row" rowspan="2"| TrkAnaRecoEnsemble-MC.fcl
| TrkAnaNeg
| downstream e-minus
| upstream e-minus, downstream mu-minus
| rowspan="2" | for use with MDC2018 Ensemble datasets
|-
| TrkAnaPos
| downstream e-plus
| upstream e-plus, downstream mu-plus
|-
! scope="row" rowspan="2"| TrkAnaRecoEnsemble-Data.fcl
| TrkAnaNeg
| downstream e-minus
| upstream e-minus, downstream mu-minus
| rowspan="2" | for use with MDC2018 Ensemble datasets, no MC information
|-
| TrkAnaPos
| downstream e-plus
| upstream e-plus, downstream mu-plus
|-
! scope="row" rowspan="2"| TrkAnaReco_wTrkQualFilter.fcl
| TrkAnaNeg
| downstream e-minus
| upstream e-minus, downstream mu-minus
| rowspan="2" | an art filter module is run before creating the TrkAna tree
|-
| TrkAnaPos
| downstream e-plus
| upstream e-plus, downstream mu-plus
|-
! scope="row" rowspan="2"| TrkAnaReco_MultipleTrkQual.fcl
| TrkAnaNeg
| downstream e-minus
| upstream e-minus, downstream mu-minus
| rowspan="2" | an additional TrkQual algorithm is used for each track
|-
| TrkAnaPos
| downstream e-plus
| upstream e-plus, downstream mu-plus
|}

Latest revision as of 16:35, 14 October 2024

TrkAna is now obsolete!

As of 2024-10-14, TrkAna has now been replaced by EventNtuple. This page is just being kept for archival purposes.

Overview

Updated: 2024-06-21

TrkAna is an event-based ROOT TTree that can be used for analysis. Each entry in the TTree corresponds to a single Mu2e event and contains reconstructed information from the tracker, calorimeter and CRV. There is also the option to write out Monte Carlo truth information and hit-level information.

How to Get Help

Updated: 2024-06-21

Feel free to send any questions to the #trkana or #is_it_me_or_a_bug Slack channels

There is a tutorial hosted in the GitHub respository.

For Analyzers

How to Analyze a TrkAna Tree

Updated: 2024-06-21

See the tutorials on GitHub here: https://github.com/Mu2e/TrkAna/blob/main/tutorial/README.md for exercises that analyze TrkAna trees with both ROOT and python

How To Create a TrkAna Tree

Updated: 2024-06-21

You can use the TrkAna Musing like so:

mu2einit
muse setup TrkAna
mu2e -c TrkAna/fcl/TrkAnaReco.fcl -s mcs.art --TFileName trkana.root

where mcs.art contains the result of the Mu2e reconstruction.

In the trkana.root file, you will find the TrkAna TTree in

TrkAna/trkana

.

TrkAna is designed to have some flexibility. There are fcl parameters that can be changed and there are a few examples available here: https://github.com/Mu2e/TrkAna/tree/main/fcl and are given in the table below in #TrkAna Fcl Examples. Also, you can always ask for help on the #trkana channel on Slack

For Developers

Updated: 2024-06-17

If you will be contributing to the development of TrkAna, then you should fork TrkAna on GitHub into your GitHub account, and then set up your development area like so:

Once you log in:

mu2einit
cd /your/working/directory
muse backing HEAD
git clone git@github.com:<Your GitHub Username>/TrkAna.git

cd TrkAna
git remote -f add mu2e https://github.com/Mu2e/TrkAna # add the main Mu2e/TrkAna repository as a remote
git fetch mu2e main # grab the current HEAD of Mu2e/TrkAna
git checkout --no-track -b <name-of-your-dev-branch> mu2e/main # create a branch from the HEAD of Mu2e/TrkAna

muse setup
muse build -j4 --mu2eCompactPrint

Then you can make your developments (git commit, git push etc.) and then put in a pull request on GitHub.

Version History / TrkAna Musings

Updated: 2024-08-09

This is the list of TrkAna Musings. The top row corresponds to the "current" version.

TrkAna Musing TrkAna tag muse backings muse stub notes
v05_05_00 v05_05_00 SimJob MDC2020ah --> Production v00_24_00, mu2e_trig_config v3_04_00 --> Offline v10_32_00 al9-prof-e28-p057
v05_04_00 v05_04_00 SimJob MDC2020ag --> Production v00_23_00, mu2e_trig_config v3_03_00 --> Offline v10_31_00 al9-e28-prof-p057
v05_03_00 v05_03_00 SimJob MDC2020af --> Production v00_22_00, mu2e_trig_config v3_02_00 --> Offline v10_30_00 al9-e28-prof-p057
(not built) v05_02_00 N/A N/A use with datasets that are from MDC2020ae and later
(not built) v05_01_00 N/A N/A use with datasets earlier than MDC2020ae
v05_00_00 v05_00_00 SimJob MDC2020ac --> Production v00_19_00, mu2e_trig_config v1_1_0 --> Offline v10_28_00 sl7-prof-e28-p055 new major version
(not built) v04_04_00 N/A N/A final tag before v05 release
(not built) v04_03_00 N/A N/A for TutorialBacking test
v04_02_00 v04_02_00 SimJob MDC2020ab --> Offline v10_26_00 sl7-prof-e28-p051
v04_01_00 v04_01_00 SimJob MDC2020z1 --> Offline v10_23_02 sl7-prof-e28-p049 CRV branch filling moved from Offline to TrkAna
v04_00_00 v04_00_00 SimJob MDC2020z --> Offline v10_23_01 sl7-prof-e28-p049 breaking changes: demfit[] branch, new genealogy branches
(not built) v03_00_01 N/A N/A tag before major breaking change, just code tidying so no associated musing
v03_00_00 v03_00_00 SimJob MDC2020y --> Offline v10_22_01 sl7-prof-e20-p040 breaking changes: branch names now three characters; uses KinKal fits
v02_03_00 v02_03_00 SimJob MDC2020w --> Offline v10_21_00 sl7-prof-e20-p039
v02_02_00 v02_02_00 SimJob MDC2020v --> Offline v10_20_00 sl7-prof-e20-p035
v02_01_00 v02_01_00 SimJob MDC2020u --> Production v00_10_00 --> Offline v10_18_00 sl7-prof-e20-p033
v02_00_01 v02_00_01 SimJob MDC2020t --> Production v00_09_11 --> Offline v10_17_00 sl7-prof-e20-p026
(not built) v02_00_00 N/A N/A failed build due to incompatible KinKal version
v01_01_00 v01_01_00 SimJob MDC2020r --> Production v00_09_02 --> Offline v10_15_01 sl7-prof-e20-p023 adds TrkAnaUtils
(not built) v01_00_01 N/A N/A resolves MDC2020r incompatibility
v01_00_00a v01_00_00 Production v00_07_00 --> Offline v10_11_00 sl7-prof-e20-p021 updated for muse 1-path/2-path change
v01_00_00 v01_00_00 Production v00_06_00 --> Offline v10_10_01 sl7-prof-e20-p018 uses deprecated "muse link"

Tree Structure

The TrkAna tree structure is documented in google sheet (spreadsheet). There are separate sheets for different major version numbers. Links to the existing sheets are below. These are viewable by anyone; if you would like to comment or edit these sheets please send a message to the #TrkAna slack channel. Note that the sheets have multiple tabs, at the bottom of the page. The main tab lists the branches, while the other tabs list the detailed content (leafs) of the individual branches, by name.

Hit Level Information

By setting the diagLevel to 2 when running TrkAna, you will fill hit level information branches. If you are processing Monte Carlo information, hit level Monte Carlo truth branches will also be added. Adding these increases the size of the output file by an order of magnitude.

Future Developments

We're always looking for input from developers and analyzers to keep TrkAna up-to-date! Get in touch on the #trkana Slack channel, or with Andy Edmonds directly with any thoughts / comments you have

TrkAna Fcl Examples

fcl file module label candidate supplements notes
TrkAnaReco.fcl TrkAnaNeg downstream e-minus upstream e-minus, downstream mu-minus
TrkAnaPos downstream e-plus upstream e-plus, downstream mu-plus
CrvExpert.fcl TrkAnaNeg downstream e-minus upstream e-minus, downstream mu-minus adds crvinfo, crvinfomc, crvsummary, crvsummarymc, and crvinfomcplane branches
TrkAnaPos downstream e-plus upstream e-plus, downstream mu-plus
TrkAnaReco_Upstream.fcl TrkAnaNeg upstream e-minus downstream e-minus, upstream mu-minus
TrkAnaPos upstream e-plus downstream e-plus, upstream mu-plus
TrkAnaReco_ceSimReco.fcl TrkAnaNeg downstream e-minus none for use with reco files generated with ceSimReco.fcl
fcl files below are flagged for updating / removal
TrkAnaRecoEnsemble-MC.fcl TrkAnaNeg downstream e-minus upstream e-minus, downstream mu-minus for use with MDC2018 Ensemble datasets
TrkAnaPos downstream e-plus upstream e-plus, downstream mu-plus
TrkAnaRecoEnsemble-Data.fcl TrkAnaNeg downstream e-minus upstream e-minus, downstream mu-minus for use with MDC2018 Ensemble datasets, no MC information
TrkAnaPos downstream e-plus upstream e-plus, downstream mu-plus
TrkAnaReco_wTrkQualFilter.fcl TrkAnaNeg downstream e-minus upstream e-minus, downstream mu-minus an art filter module is run before creating the TrkAna tree
TrkAnaPos downstream e-plus upstream e-plus, downstream mu-plus
TrkAnaReco_MultipleTrkQual.fcl TrkAnaNeg downstream e-minus upstream e-minus, downstream mu-minus an additional TrkQual algorithm is used for each track
TrkAnaPos downstream e-plus upstream e-plus, downstream mu-plus