Analysis Actions
From GlueXWiki
Contents
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
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:
- DHistogramAction_DetectedParticleKinematics:
- DHistogramAction_GenReconTrackComparison:
- DHistogramAction_TOFHitStudy:
Sample setup and execution
//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);