Exercise E: Reco Level Comparisons and Model Weighting - MinervaExpt/MINERvA-101-Cross-Section GitHub Wiki
You should be coming here from the Exercise A split point.
After running an event selection and creating histograms, there are some reasons why you may not always want to fully extract a cross section before making Data/MC Model comparisons. There are some advantages to making comparisons directly at the reco level which may prove more useful, depending on what you're interested in:
- Avoids model dependence of unfolding
- Allows looking at distributions with difficult unfolding or significantly off-diagonal migration matrices
- Often provides access to finer binning using MINERvA's high statistics
- Constrain Systematics
Of course, there are also some associated downsides with reco level comparisons as well:
- No direct comparisons to the model
- Alternate models need to be re-weighted to, or properly pushed back through detector effects (forward folding)
This exercise follows the same principles described in Exercise D, and also begins with the same task described in step 2 of Exercise D (adding truth categories to the event loop), except for the reco-level categories as opposed to breaking apart the cross section. The difference is the focus on the additional task of seeing how truth categories they shift with additional model re-weighting over the details of plotting.
Your task
-
Your first objective is to add truth categories by interaction type to the signal events selected in
runEventLoop. Using the background histograms as an example, add a Categorized<> to runEventLoop that breaks the selected events down byGetInteractionType(), with categories for "QE", "RES", "DIS", and "2p2h". The enumeration of these interaction types is from GENIE and is consistent across experiments, but there is a solution branchExercise-E-Solutionfrom which you could find the mapping. -
Compile your changes and re-run the event loop with the new changes. Your root file should now have additional histograms which are each filled with events of the corresponding interaction type. At this point, before doing any re-weighting, plot your results with each signal category getting its own curve not stacked on each other. The script necessary will be provided in "The Solution" if you are stuck. Your result should appear akin to the following:
pTmuRecoComparisonNotStacked.png
- Now, it's time to add some weights. You can add any weights you wish, which will change the populations in both the selected event histograms and the interaction type histograms. We recommend that you make sure it applies to one of the signal categories and makes a shape change, though messing with backgrounds could be interesting/nothing stops you from doing whatever you like.
- Note that you do not have to keep your binning (or even the variable) the same! This binning was optimized for unfolding in pT, but it is possible that features from your new model are only visible if you change the binning/variable.
- There is no complete solution for this part of the Exercise, as you can choose any re-weighting you wish. But, assuming your weights have an effect, re-making the plot from Step 2 should result in a different distribution than before.
The Solution
The code necessary is available in the Exercise-E-Solution. It has all of the code needed to form the categorical breakdown of the signal categories at the reconstruction level, as well as the plotting script recoSignalCurves.py.