Skip to content

Exercise B: The Closure Test

aolivier23 edited this page Jun 8, 2021 · 34 revisions

Why do we need a closure test?

  • “You must not fool yourself, and you are the easiest person to fool" -Feynman
  • The closure test gives the collaboration confidence that your cross-section script is correctly working and doesn't have any lurking bugs giving bad results. This is done by showing that your differential cross-section results are equal to an external MINERvA cross-section script where both differential cross-sections are based on your signal definition. For this exercise, the closure test is performed by comparing the simulation (GENIE Minerva-v1 tune) differential cross-section produced by ExtractCrossSection (pretending it's your personal method) to the simulation (GENIE Minerva-v1 tune) differential cross-section produced by GENIEXSECEXTRACT (MINERvA's standardized method).

Interpreting Closure Tests

  • This is the step you show to the whole collaboration to show that your analysis closes. You could skip straight to this step and maybe even succeed if you're lucky. But you'd have a lot of debugging to do if you failed. Most analyses do fail step 2 the first time they try to run it.
  • Possible reasons and checks why your closure test would fail
  1. Signal definitions are not identical
  2. Unfolding is not closing
  3. Your "MC bkg" subtraction is not correct Normalization issues will come in a few varieties
  4. your fiducial volumes in the analysis and GXSEC aren't identical
  5. you used the wrong flux
  6. you used the wrong number of planes for the number of targets
  7. Wrong splines (would be a small effect I suspect)

Your Task

  • From the Event Rate step you should have produced an MC root file, with this root file you want to extract a cross-section using ExtractCrossSection , by running this command ExtractCrossSection 1 runEventLoopMC.root runEventLoopMC.root
  • You want to now use GENIEXSECEXTRACT to extract a cross-section to compare too. In the /test directory you run runXSecLooper MCTextFile.txt
  • Once you have two root files, one from runXSecLooper (GENIEXSECEXTRACT) and the other from ExtractCrossSection (Your cross-section script) you want to check that they produce the same result (to about 0.1%) the easiest way to do this visually is to make a ratio plot of the cross-sections. Typically, you'll use your own plotting scripts and make "pretty plots", but you can also do this quickly by using Root interactively.

Solution

  • to make ratio interactively
  • _file0->cd()
  • auto denominator = (PlotUtils::MnvH1D*)(gDirectory->Get("nameofhist1"))
  • _file1->cd()
  • auto numerator = (PlotUtils::MnvH1D*)(gDirectory->Get("nameofhist2"))
  • numerator->Divide(numerator, denominator)
  • numerator->Draw()