Skip to content
Snippets Groups Projects

Add HS Vertex Reco/Selection Efficiency and Reso Plots to IDPVM

All threads resolved!

Attempts to add Figures 8-12 from ATL-PHYS-PUB-2019-015. The scheme for each is:

  • Selection efficiency: determine the "best" reco HS vertex using the sumpt2 of reco tracks and using the sum of truth HS track weights (InDetVertexTruthMatchUtils::bestHardScatterMatch?) and see if they match (calculate local PU density using the truth vertex for the sumpt2 best reco HS vertex)
  • Reconstruction efficiency: find the truth vertex for every reco vertex and check if it is present in our vector of truth HS vertices for the event - if so, we count this as a "pass"
  • HS resolutions: for each vertex in our vector of truth HS vertices (I think we only ever expect 1), calculate the "truth" resolution as the absolute difference between that truth vertex and its matched reco vertex longitudinally and transversely (this is what's in the note) as well as the "reco" resolution using the covariance matrix and error propagation (which I hope I did correctly...)

Additionally, I have also fixed a seg fault which shows up when trying to fill histograms in InDetPerfPlot_VertexTruthMatching.cxx when m_iDetailLevel >= 200 by adding iDetailLevel to the constructor of InDetRttPlots.

Tagging @npetters @goblirsc @vcairo @kostyuk @glee

Edited by Matthew Joseph Basso

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 6 commits

    • ea1cf2ff - Speedup local PU density calc
    • a20dc712 - C-style cast to Cpp-style cast
    • b6fcaba7 - Replace inInterable with std::find
    • 007ba17c - Use auto b/c idk what the iterator's type is
    • d988262a - Don't explicitly cast ints to floats, TProfile::Fill does this for us
    • ae0a591f - Protect against NULL in getTruthVertex

    Compare with previous version

  • This merge request affects 1 package:

    • InnerDetector/InDetValidation/InDetPhysValMonitoring

    Adding @goetz ,@sroe as watchers

  • :negative_squared_cross_mark: CI Result FAILURE (hash ae0a591f)

    Athena AthSimulation AnalysisBase AthGeneration
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    required tests :o: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 13859]

  • added 2 commits

    • d204534c - Revert truth strategy to All, fix bug with no truth HS events (use not instead)
    • 9ee11cac - Get truth event/vertex containers when PU switch is All or HardScatter

    Compare with previous version

  • This merge request affects 1 package:

    • InnerDetector/InDetValidation/InDetPhysValMonitoring

    Adding @goetz ,@sroe as watchers

  • Matthew Joseph Basso resolved all threads

    resolved all threads

  • I made one other tiny update to the truth event/vertex container retrieval in IDPVMTool: I now load the truth event (HS) container as well as the truth particle container when m_pileupSwitch is All or HardScatter (not just HardScatter). I hope this is OK.

    Also, InDetPerfPlot_VertexTruthMatching::getTruthVertex prints a warning, "TruthEventMatchingInfos DECORATOR yields empty vector -- returning nullptr!, for the last vertex of the container for every single event. I don't know if this is explainable.

    Finally, here are some plots from running the tool with m_pileupSwitch == All, you can see that the reco values for resos are quite flat in PU and generally smaller than the truth (|reco-truth|) resos, but they're of the same scale. They are also similar-ish to those in the PUB note. The vertex selection and reco efficiencies are nearly 1, but maybe this is an effect of stats. I assume for the reco efficiency, we just want to check that any reco vertex (not necessarily the best one via sumpt2 or the truth pkg, I assume to disentangle this from the selection efficiency) is matched to the truth HS vertex to call it a pass. But let me know if anything looks wrong.

  • :negative_squared_cross_mark: CI Result FAILURE (hash 9ee11cac)

    Athena AthSimulation AnalysisBase AthGeneration
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    required tests :o: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 13882]

  • Matthew Joseph Basso marked as a Work In Progress

    marked as a Work In Progress

  • added 3 commits

    • 5b5eed98 - Last vertex in container is NoVtx - skip it
    • ce85f5d7 - Intermediate commit in case I want to revert ;)
    • 48211f63 - Implement comments from 2020/05/16 vertexing meeting

    Compare with previous version

  • @npetters @kostyuk @glee I've attached updated plots (updated_plots.pdf). Now the reco efficiency is determined by whether the best reco HS vertex as determined by the truth pkg is within 0.1 mm of the truth HS vertex AND if there are no other reco vertices closer than the best one. Also, I now determine the truth resolutions by fitting a gaussian to |truth - reco| (I understand that there is a class, ResolutionHelper for producing these plots, but it was easier for me to implement a custom function from Graham for now). For the first bin of the longitudinal resolution plot, the fit does not converge properly (I think...) and so the result is set to 0 (I have confirmed that there are the same number of raw events in the y profile, however). I think this might be an issue of stats. The binning in the y direction (|truth - reco|) may have to be updated for these plots sometime in the future. Additionally, because I use SetBinContent on these resolution plots, I lose the ability to track raw counts per bin (I assume the sum of raw events in the y profile). Maybe there's a better way to handle this.

    Let me know if anything looks wrong and if the code changes look OK.

    Edited by Matthew Joseph Basso
    • Resolved by Matthew Joseph Basso

      Thanks @mbasso. Most of the changes look reasonable to me, but I would like somebody else who was present at the meeting to take a look as well. I have a couple of questions on the resolution though.

      1. If you fit the abs with a Gaussian, you will most likely only end up worsening the errors on the results, i.e. you are basically cutting out half of the degrees of freedom. Can you try without the abs and check the fit results to see how they change?
      2. I am not sure this is a good idea to really check if a fit failed. If you run a simple local test you will see that is very likely that you get status = 0 also when the fit is declared as failed. Also, the check is on (%1000) but you are not calling the "improve" option, i.e. you do not use "M" when you call the fit, so according to the equation (fitStatus = migradResult + 10 * minosResult + 100 * hesseResult + 1000 * improveResult) you will never get the last part. To understand what really makes your first bin empty, can you please plot the fit results as well as the 2D histograms?
      Edited by Valentina Cairo
  • added 6 commits

    • 233bdc8c - Remove ResolutionHelper (for now?)
    • 0b750656 - Remove abs on longitudinal reso (not much we can do for transverse?)
    • 5cac37c4 - Remove status() check on fit result
    • e4ff5f0b - Book 2D hists for trans/long reso as default
    • 3ef5b9e6 - Remove extra status check
    • a95da310 - Bin 2D long reso - -> + too

    Compare with previous version

  • Matthew Joseph Basso resolved all threads

    resolved all threads

  • Matthew Joseph Basso unmarked as a Work In Progress

    unmarked as a Work In Progress

  • This merge request affects 1 package:

    • InnerDetector/InDetValidation/InDetPhysValMonitoring

    Adding @goetz ,@sroe as watchers

  • :white_check_mark: CI Result SUCCESS (hash a95da310)

    Athena AthSimulation AnalysisBase AthGeneration
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    required tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 14375]

  • Do not see any problem, so approving.

    Pavol [as L2 MR shifter]

  • Matthew Joseph Basso resolved all threads

    resolved all threads

  • mentioned in commit 9919e87f

  • Please register or sign in to reply
    Loading