Difference between revisions of "GlueX Analysis Software"

From GlueXWiki
Jump to: navigation, search
(ANALYSIS/PID Libraries: Minor Issues)
(Summary)
Line 1: Line 1:
 +
== Documentation Notice ==
 +
* This documentation is updated as code is checked into the svn trunk, so it may contain information that is untrue for the latest tagged release.
 +
 
== Summary ==
 
== Summary ==
 
* In his/her plugin, a user specifies the reaction(s) he/she wants to study (<span style="color:#0000FF">DReaction</span>), along with the histograms and cuts to perform (if any) (<span style="color:#0000FF">DAnalysisAction</span>), then just asks JANA for the results (<span style="color:#0000FF">DAnalysisResults</span>).
 
* In his/her plugin, a user specifies the reaction(s) he/she wants to study (<span style="color:#0000FF">DReaction</span>), along with the histograms and cuts to perform (if any) (<span style="color:#0000FF">DAnalysisAction</span>), then just asks JANA for the results (<span style="color:#0000FF">DAnalysisResults</span>).
Line 5: Line 8:
 
** Many common actions are predefined in DANA (see libraries/ANALYSIS/DHistogramActions.h and libraries/ANALYSIS/DCutActions.h), but the user can write custom ones for their analysis in their plugin.  
 
** Many common actions are predefined in DANA (see libraries/ANALYSIS/DHistogramActions.h and libraries/ANALYSIS/DCutActions.h), but the user can write custom ones for their analysis in their plugin.  
 
* The <span style="color:#0000FF">DAnalysisResults</span> objects indicate which <span style="color:#0000FF">DParticleCombo</span> objects have passed/failed the <span style="color:#0000FF">DAnalysisAction</span> cuts for each <span style="color:#0000FF">DReaction</span>.
 
* The <span style="color:#0000FF">DAnalysisResults</span> objects indicate which <span style="color:#0000FF">DParticleCombo</span> objects have passed/failed the <span style="color:#0000FF">DAnalysisAction</span> cuts for each <span style="color:#0000FF">DReaction</span>.
* This documentation is updated along with the trunk, so it may contain (minor) details that are untrue for the latest tagged release (e.g. minor interface improvements).
 
  
 
== Quick Start ==
 
== Quick Start ==

Revision as of 20:24, 29 June 2013

Documentation Notice

  • This documentation is updated as code is checked into the svn trunk, so it may contain information that is untrue for the latest tagged release.

Summary

  • In his/her plugin, a user specifies the reaction(s) he/she wants to study (DReaction), along with the histograms and cuts to perform (if any) (DAnalysisAction), then just asks JANA for the results (DAnalysisResults).
  • Through this process, the program creates all possible track combinations for the desired reaction (DParticleCombo, tag "PreKinFit"), kinematic fits the event to the reaction (DKinFitResults), and updates the tracks with the new kinfit information (DParticleCombo, no tag).
  • The DAnalysisAction objects encapsulate the setup and execution of an action (e.g. cut, histogram) into a single object.
    • Many common actions are predefined in DANA (see libraries/ANALYSIS/DHistogramActions.h and libraries/ANALYSIS/DCutActions.h), but the user can write custom ones for their analysis in their plugin.
  • The DAnalysisResults objects indicate which DParticleCombo objects have passed/failed the DAnalysisAction cuts for each DReaction.

Quick Start

  • NOTE: For an example of the below steps, see one of the example plugins below (e.g. b1pi).
  • Create a new plugin containing a DEventProcessor, DReaction_factory, and DFactoryGenerator (for the DReaction_factory).
    • It is recommended that you create these objects with unique names (and a unique tag for the DReaction_factory) so that this plugin can be executed with other analysis plugins simultaneously.
  • Create desired custom DAnalysisAction objects for your analysis (if any).
    • See existing analysis actions in sim-recon/src/libraries/ANALYSIS/DHistogramActions.h and sim-recon/src/libraries/ANALYSIS/DCutActions.h for examples.
  • In DReaction_factory::init(void), create a DReaction object (with a unique name!) for each analysis you want to perform, specify the kinematic fit type for it, specify the DAnalysisActions for each, and add them to _data.
    • The DAnalysisAction objects are executed sequentially for each possible particle combination (DParticleCombo) matching the given DReaction, until it fails a cut.
    • If more than one DAnalysisAction object of a given type is used in a DReaction, all of their constructors must be called with a unique identifier string (including the default "").
    • More details on analysis actions in sim-recon/src/libraries/ANALYSIS/: DAnalysisAction.*, DHistogramActions.*, DCutActions.*
  • Setup the DEventProcessor.
    • In DEventProcessor, make sure to grab the DAnalysisResults objects from the JEventLoop in the evnt() method, and to add the DFactoryGenerator to the application in the InitPlugin() method.
  • Compile and run hd_root with your plugin (preferably on REST data).

Example Plugins

  • b1pi: sim-recon/src/programs/Analysis/plugins/b1pi_hists/
  • monitoring_hists: sim-recon/src/programs/Analysis/plugins/monitoring_hists/
  • misc: trunk/home/pmatt/plugins/

Known Issues

Reconstruction Libraries: Minor Issues

  • No uncertainties are reported for the DTOFPoint object. It needs a full covariance matrix.
  • For DBCALShower and DFCALShower: only the diagonal elements of the covariance matrices are reported; the full covariance matrix is needed.
  • Sometimes the neutral shower variances are 0 and NaN.

ANALYSIS/PID Libraries: Major Issues

  • Kinematic fitting with vertex constraints that contain only one detected particle do not converge very often.
    • e.g. The Λ production vertex in γ, p → K+, Λ; Λ → p, π-
      • Normally can include the beam photon in the vertex fit, but not if the uncertainties are all zero (MC).
    • Technically the kinematic fitter works, but the analysis framework currently does not give an accurate enough initial guess for the vertex position. You can fit this case manually if your input guess is accurate enough.
  • Kinematic fits with spacetime constraints don't work yet.
  • Neutron reconstruction is not yet supported.
  • Missing beam particle is not yet supported.

ANALYSIS/PID Libraries: Minor Issues

  • For PID, hard-coded values are used for the uncertainties, rather than the covariance matrices.
  • The target center is hard-coded as the position of the DBeamPhoton in DEventSourceHDDM.cc
  • Pulls of neutral shower parameters in b1pi are too wide (~1.5)
  • Spikes near zero in the pull distributions (and at high confidence) are due to too-large tracking uncertainties. These have no easily-discernible p/theta/phi dependence, so perhaps it is due to kinks in the tracks.
  • Covariance matrix of decaying particles is not set after kinematic fitting.
  • The DParticleComboStep::dSpacetimeVertex member is set to the target center & t=0 if it is not kinematically fit (and this is reflected in the ROOT output as well).
  • Generated / Detected object matching is not ideal:
    • A FOM is used to determine the best match, but there is no minimum FOM: if the true track was not reconstructed, you may match the thrown track to a reconstructed ghost track.
    • The FOM calculation is rough but adequate: it could be improved.
    • The matching between true and reconstructed BCAL & FCAL showers has not been tested.
  • ROOT TTree Output:
    • "KINEMATICS: END" variables: currently only the time is saved, the p4 & position are NaN.
    • "Measured" Locations/Times of each vertex are bad.
    • Add kinematic fit 4-momentum of reconstructed decaying and missing particles
    • Possibly add Kinematic fit results (chisq & ndf) from other DReaction's (highest confidence level result only (multiple particle combinations)).
    • Add: Target center & length.
  • Resonances decayed in genr8 are not saved to the genr8 output, so they don't appear in JANA.

More Information