Difference between revisions of "GlueX Analysis Software"

From GlueXWiki
Jump to: navigation, search
(ANALYSIS/PID Libraries: Major Issues)
(Summary)
 
(41 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Documentation Notice ==
+
== Warning ==
* 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.
+
This page is for analysis within the halld_recon framework, not within [[DSelector]]s.
  
 
== 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 their plugin, a user specifies the reaction(s) they want 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>).
* These results can then be saved to a ROOT TTree (<span style="color:#0000FF">DEventWriterROOT</span>), or can be used to make a REST skim (<span style="color:#0000FF">DEventWriterREST</span>).
+
* These results can then be saved to a ROOT TTree (<span style="color:#0000FF">DEventWriterROOT</span>), or can be used to make a physical REST skim (<span style="color:#0000FF">DEventWriterREST</span>).
* Through this process, the program creates all possible track combinations for the desired reaction (<span style="color:#0000FF">DParticleCombo</span>, tag <span style="color:#0000FF">"PreKinFit"</span>), kinematic fits the event to the reaction (<span style="color:#0000FF">DKinFitResults</span>), and updates the tracks with the new kinfit information (<span style="color:#0000FF">DParticleCombo</span>, no tag).
+
* Through this process, the program creates all possible particle combinations for the desired reaction (<span style="color:#0000FF">DParticleCombo</span>, kinematic fits the event to the reaction (if requested) (<span style="color:#0000FF">DKinFitResults</span>), and creates a new (<span style="color:#0000FF">DParticleCombo</span>) with the new kinfit information.
 
* The <span style="color:#0000FF">DAnalysisAction</span> objects encapsulate the setup and execution of an action (e.g. cut, histogram) into a single object.  
 
* The <span style="color:#0000FF">DAnalysisAction</span> 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.  
 
** 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>.
  
== Quick Start ==
+
== Super Quick Start ==
 +
* See [https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=3407 talk] about using the <span style="color:#0000FF">ReactionFilter</span> plugin to define channels on the command line and produce ROOT Trees automatically.
  
* Use the [https://halldsvn.jlab.org/repos/trunk/scripts/analysis/MakeReactionPlugin.pl MakeReactionPlugin.pl] perl script to create a new plugin for your analysis.
+
== Manual Quick Start ==
 +
* Do not use any of this for DSelector work.
 +
* Use the <span style="color:#0000FF">MakeReactionPlugin.pl</span> perl script (it is installed to $PATH) to create a new plugin for your analysis.  
 
** Execute the script with no arguments for usage instructions.  A minimum of one argument is required (the plugin name).   
 
** Execute the script with no arguments for usage instructions.  A minimum of one argument is required (the plugin name).   
** It is recommended that you run the script with unique names as the arguments. That way this plugin can be executed with other analysis plugins simultaneously.  
+
** It is recommended that you run either script with unique names as the arguments. That way this plugin can be executed with other analysis plugins simultaneously.  
  
* Use the [https://halldsvn.jlab.org/repos/trunk/scripts/analysis/MakeAnalysisAction.pl MakeAnalysisAction.pl] perl script to create any desired custom <span style="color:#0000FF">DAnalysisAction</span> objects for your analysis.  
+
* Use the <span style="color:#0000FF">MakeAnalysisAction.pl</span> perl script (it is installed to $PATH) to create any desired custom <span style="color:#0000FF">DAnalysisAction</span> objects for your analysis.  
 
** See existing analysis actions in sim-recon/src/libraries/ANALYSIS/DHistogramActions.h and sim-recon/src/libraries/ANALYSIS/DCutActions.h for examples.
 
** See existing analysis actions in sim-recon/src/libraries/ANALYSIS/DHistogramActions.h and sim-recon/src/libraries/ANALYSIS/DCutActions.h for examples.
  
Line 27: Line 30:
  
 
* Compile and run hd_root with your plugin (preferably on REST data).
 
* Compile and run hd_root with your plugin (preferably on REST data).
 
== Example Plugins ==
 
* Links to example analysis plugins can be found on the [[Physics_Analysis | Physics Analysis]] page.
 
  
 
== Known Issues ==
 
== Known Issues ==
  
=== Reconstruction Libraries: Minor Issues ===
+
=== Missing Features ===
* DTOFPoint::tErr is not set.
+
* Other beam particles than &gamma; (e.g. KLong) is not yet supported.  
* For DBCALShower and DFCALShower: only the diagonal elements of the covariance matrices are reported; the full covariance matrix is needed.
+
* Missing beam particles is not yet supported.  
* For DFCALShower: the position uncertainty in z is often way too large, causing a spike in its pull distribution when kinematic fitting.  
+
* Colliding beam particles is not yet supported.  
* Sometimes the neutral shower variances are 0 and NaN.
+
* Two missing final state particles is not yet supported.
 +
* Spacetime kinematic fit constraints are not yet supported.
  
=== ANALYSIS/PID Libraries: Major Issues ===
+
=== ANALYSIS/PID Libraries: Minor Software Issues ===
* 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 ===
+
 
* PID/Detector-Matching:
 
* PID/Detector-Matching:
 
** Several variables in DDetectorMatches are not yet calculated, are set to 0.0 (e.g. BCAL dx, correlations, variances, etc.)
 
** Several variables in DDetectorMatches are not yet calculated, are set to 0.0 (e.g. BCAL dx, correlations, variances, etc.)
** For PID FOM calculation, hard-coded values/functions are used for the uncertainties, rather than the covariance matrices.  
+
** For PID Timing FOM calculation, hard-coded values/functions are used for the uncertainties, rather than the covariance matrices.  
** PID Confidence levels for the BCAL and FCAL(?) systems are too high. 
+
** For PID dE/dx FOM calculation, the variance is hard-coded from a MC study.
* The target center is hard-coded as the position of the DBeamPhoton in DEventSourceHDDM.cc, and in the DMCReaction contents in both event sources.
+
* Pulls of neutral shower parameters in b1pi are too wide (~1.3)
+
* 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:
+
** Reconstructed (non-kinfit) locations/times of each vertex are bad.
+
  
 
== More Information ==
 
== More Information ==
 
=== Presentations ===
 
=== Presentations ===
* [[GlueX_Analysis_Workshop_2013 | July 2013 GlueX Analysis Workshop]] ([http://prezi.com/efmxykgvixxc/?utm_campaign=share&utm_medium=copy&rc=ex0share Full Prezi] (Kept up to date), [http://argus.phys.uregina.ca/cgi-bin/private/DocDB/ShowDocument?docid=2271 Full PDF])
+
Note: Start with the most recent presentations first.  They are a bit black-boxy, but as you go back in time, the black box is gradually opened and more and more details are shown.  If there are any contradictions between two talks, the most recent talk is the one that is currently correct.
 +
* [https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=3407 ReactionFilter + Library Overhaul, October 2017]
 +
* [[GlueX_Physics_Workshop_2016 | 2016 GlueX Physics Workshop]]
 +
* [https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=2847 Example analysis &gamma;p&rarr;&omega;(p), October 2015]
 +
* [https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=2761 Analysis software updates since the 2013 Workshop (Through June 2015)]
 +
* [https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=2321 &gamma;p&rarr;&pi;<sup>+</sup>&pi;<sup>+</sup>&pi;<sup>-</sup>(n) and the Analysis Workshop (October 2013 GlueX Collaboration Meeting (Slides & Audio))]
 +
* [[GlueX_Analysis_Workshop_2013 | July 2013 GlueX Analysis Workshop]] ([http://prezi.com/efmxykgvixxc/?utm_campaign=share&utm_medium=copy&rc=ex0share Full Prezi], [https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=2271 Full PDF])
 
** Prezi/PDF/Audio/Screen_Video for individual talks can be found on the workshop page.
 
** Prezi/PDF/Audio/Screen_Video for individual talks can be found on the workshop page.
 
** Note: to navigate the Prezi: use the arrow keys to transition between the frames, or use your mouse (click on a frame outline to zoom to it, pan, etc.)
 
** Note: to navigate the Prezi: use the arrow keys to transition between the frames, or use your mouse (click on a frame outline to zoom to it, pan, etc.)
* [http://argus.phys.uregina.ca/cgi-bin/private/DocDB/ShowDocument?docid=2321 &gamma;p&rarr;&pi;<sup>+</sup>&pi;<sup>+</sup>&pi;<sup>-</sup>(n) and the Analysis Workshop (October 2013 GlueX Collaboration Meeting (Slides & Audio))]
+
* [https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=2174 Introduction: Presentation at February 2013 GlueX Collaboration Meeting (Slides & Audio)]
* [http://argus.phys.uregina.ca/cgi-bin/private/DocDB/ShowDocument?docid=2174 Introduction: Presentation at February 2013 GlueX Collaboration Meeting (Slides & Audio)]
+
  
 
=== Classes ===
 
=== Classes ===
Line 74: Line 65:
 
* [[Analysis_Actions | Analysis Actions]]
 
* [[Analysis_Actions | Analysis Actions]]
 
* [[Mattione_GlueX_Analysis_Factories | ANALYSIS Library Factories]]
 
* [[Mattione_GlueX_Analysis_Factories | ANALYSIS Library Factories]]
 +
 
=== Other ===
 
=== Other ===
 +
* [[Data_Skimming | Data Skimming]]
 +
* [[Analysis_FAQ | Frequently Asked Questions]]
 +
* [[RF_Beam_Bunch_Selection | RF Beam Bunch Selection]]
 
* [[Mattione_GlueX_Kinematic_Fitting | Kinematic Fitting]]
 
* [[Mattione_GlueX_Kinematic_Fitting | Kinematic Fitting]]
* [[Analysis_JEventProcessor | Plugin JEventProcessor]]
 
 
* [[Analysis_TTreeFormat| Analysis TTree]]
 
* [[Analysis_TTreeFormat| Analysis TTree]]
* [[Analysis_Examples | More Analysis Examples]]
 
* [[Analysis_Miscellaneous | Miscellaneous]]
 

Latest revision as of 14:20, 16 November 2023

Warning

This page is for analysis within the halld_recon framework, not within DSelectors.

Summary

  • In their plugin, a user specifies the reaction(s) they want to study (DReaction), along with the histograms and cuts to perform (if any) (DAnalysisAction), then just asks JANA for the results (DAnalysisResults).
  • These results can then be saved to a ROOT TTree (DEventWriterROOT), or can be used to make a physical REST skim (DEventWriterREST).
  • Through this process, the program creates all possible particle combinations for the desired reaction (DParticleCombo, kinematic fits the event to the reaction (if requested) (DKinFitResults), and creates a new (DParticleCombo) with the new kinfit information.
  • 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.

Super Quick Start

  • See talk about using the ReactionFilter plugin to define channels on the command line and produce ROOT Trees automatically.

Manual Quick Start

  • Do not use any of this for DSelector work.
  • Use the MakeReactionPlugin.pl perl script (it is installed to $PATH) to create a new plugin for your analysis.
    • Execute the script with no arguments for usage instructions. A minimum of one argument is required (the plugin name).
    • It is recommended that you run either script with unique names as the arguments. That way this plugin can be executed with other analysis plugins simultaneously.
  • Use the MakeAnalysisAction.pl perl script (it is installed to $PATH) to create any desired custom DAnalysisAction objects for your analysis.
    • 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 (e.g. grab results, save output to ROOT, etc.).
  • Compile and run hd_root with your plugin (preferably on REST data).

Known Issues

Missing Features

  • Other beam particles than γ (e.g. KLong) is not yet supported.
  • Missing beam particles is not yet supported.
  • Colliding beam particles is not yet supported.
  • Two missing final state particles is not yet supported.
  • Spacetime kinematic fit constraints are not yet supported.

ANALYSIS/PID Libraries: Minor Software Issues

  • PID/Detector-Matching:
    • Several variables in DDetectorMatches are not yet calculated, are set to 0.0 (e.g. BCAL dx, correlations, variances, etc.)
    • For PID Timing FOM calculation, hard-coded values/functions are used for the uncertainties, rather than the covariance matrices.
    • For PID dE/dx FOM calculation, the variance is hard-coded from a MC study.

More Information

Presentations

Note: Start with the most recent presentations first. They are a bit black-boxy, but as you go back in time, the black box is gradually opened and more and more details are shown. If there are any contradictions between two talks, the most recent talk is the one that is currently correct.

Classes

Other