Analysis Actions

From GlueXWiki
Revision as of 15:19, 17 February 2013 by Pmatt (Talk | contribs) (Reaction-Independent Actions)

Jump to: navigation, search

Summary

  • It is often desirable to place cuts and make histograms of the data in JANA prior to making a ROOT TTree.
    • For example: data monitoring, cuts to reduce the # of kinematic fits, cuts on the pid or kinematic fit confidence levels, comparison of mass distributions before/after the kinematic fit, skim cuts, etc.
  • DAnalysisAction objects enable users to easily integrate these tasks into an analysis: they encapsulate the setup and execution of a given action.
  • These actions can be executed directly, but if they are added to the DReaction they will be executed sequentially by the DAnalysisResults_factory.
    • Actions will be executed on a given DParticleCombo object until it fails a cut, after which the remaining actions won't be executed on that object.
  • Many common actions have been pre-defined in DHistogramActions.* and DCutActions.*, located in sim-recon/src/libraries/ANALYSIS/
  • Additional, custom actions can be created in any plugin.

Reaction-Independent Actions

  • Reaction-independent actions can be executed independently from the rest of the analysis framework. They do not depend on DReaction or DParticleCombo in any way.
  • However, they can be added to DReaction objects and executed in sequence with the other DAnalysisAction objects.
    • This can be used to histogram reaction-independent quantities for events that satisfy cuts on your DReaction.
    • E.g.: Histogram the track multiplicity for events that satisfy a kinematic fit confidence level cut.

Pre-defined Actions

  • DHistogramAction_TrackMultiplicity: Histogram how many protons, pions, kaons, neutrals, etc. are reconstructed in each event.
    • Note: For particle ID, it uses the matching to the thrown tracks if available (from DMCThrownMatching), and the PID FOM if not available.
    • Note: You can histogram for different particle types by modifying the public dFinalStatePIDs variable before calling the function-call operator.
  • DHistogramAction_ThrownParticleKinematics: Histogram the kinematics of the thrown particles, including momentum, θ, φ, vertex position, and vertex time.
    • Note: You can histogram for different particle types by modifying the public dFinalStatePIDs variable before calling the function-call operator.
  • DHistogramAction_DetectedParticleKinematics: Histogram the kinematics of the detected particles, including momentum, θ, φ, vertex position, vertex time, β, Δβ, and tracking FOM.
    • Note: For particle ID, it uses the matching to the thrown tracks if available (from DMCThrownMatching), and the PID FOM if not available.
    • Note: You can histogram for different particle types by modifying the public dFinalStatePIDs variable before calling the function-call operator.
  • DHistogramAction_GenReconTrackComparison: Histogram the difference between the reconstructed and thrown track kinematics, including momentum, θ, φ, vertex position, and vertex time.
    • Note: You can histogram for different particle types by modifying the public dFinalStatePIDs variable before calling the function-call operator.
  • DHistogramAction_TOFHitStudy: Histogram the difference between the reconstructed and thrown TOF point information, including hit position, energy, and time.
    • Note: This action does not work on REST data, as the generated TOF hits are no longer available.

Setup and Execution

  • There are (or should be) three different constructors for reaction-independent objects:
    • (void): Default constructor
    • (string locActionUniqueString):
    • (const DReaction* locReaction, string locActionUniqueString = ""):
  //Define the actions (e.g., in plugin proccessor header file):
  DHistogramAction_TrackMultiplicity dHist_TrackMultiplicity;
  DHistogramAction_ThrownParticleKinematics dHist_ThrownParticleKinematics;
  DHistogramAction_DetectedParticleKinematics dHist_DetectedParticleKinematics;
  DHistogramAction_GenReconTrackComparison dHist_GenReconTrackComparison;
 
  //Execute the actions (e.g., in plugin processor evnt() method):
    //The histograms are created upon first-execution
  dHist_TrackMultiplicity(locEventLoop);
  dHist_ThrownParticleKinematics(locEventLoop);
  dHist_DetectedParticleKinematics(locEventLoop);
  dHist_GenReconTrackComparison(locEventLoop);