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
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): dHist_TrackMultiplicity(locEventLoop); dHist_ThrownParticleKinematics(locEventLoop); dHist_DetectedParticleKinematics(locEventLoop); dHist_GenReconTrackComparison(locEventLoop);