Difference between revisions of "Mattione GlueX Analysis Factories"

From GlueXWiki
Jump to: navigation, search
(Analysis Utilities)
(Analysis Utilities)
Line 47: Line 47:
 
* '''DMCThrownMatching''': Matches reconstructed particles to generated particles.   
 
* '''DMCThrownMatching''': Matches reconstructed particles to generated particles.   
 
** For neutrals, compares the thrown and reconstructed shower momenta and uses the shower covariance matrix to calculate a match FOM. This FOM is NOT cut, so extremely poor matches are included in the results.  
 
** For neutrals, compares the thrown and reconstructed shower momenta and uses the shower covariance matrix to calculate a match FOM. This FOM is NOT cut, so extremely poor matches are included in the results.  
** For tracks, compares the hits on the track to the thrown hits. First, the % of the track hits on each thrown track is computed (in the DTrackTimeBased factory), and the highest total is set in DTrackTimeBased (as well as the corresponding DMCThrown::myid). In the DMCThrownMatching factory, for each DTrackTimeBased, the number of matched hits is weighted (multiplied) by the track hit-fraction (#-hits-on-track-matched-to-MC / #-hits-on-track). Matches are then recorded in order from highest weighted-#-hits to least, such that each DMCThrown is only matched once (other matches are ignored).  Hit fractions less than DMCThrownMatching::dMinTrackMatchHitFraction (default 0.5, set-able on command-line via -PMCMATCH:MIN_TRACK_MATCH) are ignored.  
+
** For tracks, compares the hits on the track to the thrown hits. First, the % of the track hits on each thrown track is computed (in the <span style="color:#0000FF">DTrackTimeBased</span> factory), and the highest total is set in <span style="color:#0000FF">DTrackTimeBased</span> (as well as the corresponding <span style="color:#0000FF">DMCThrown</span>::myid). In the <span style="color:#0000FF">DMCThrownMatching</span> factory, for each <span style="color:#0000FF">DTrackTimeBased</span>, the number of matched hits is weighted (multiplied) by the track hit-fraction (#-hits-on-track-matched-to-MC / #-hits-on-track). Matches are then recorded in order from highest weighted-#-hits to least, such that each <span style="color:#0000FF">DMCThrown</span> is only matched once (other matches are ignored).  Hit fractions less than <span style="color:#0000FF">DMCThrownMatching</span>::dMinTrackMatchHitFraction (default 0.5, set-able on command-line via -PMCMATCH:MIN_TRACK_MATCH) are ignored.  
 
** Also matches thrown and reconstructed BCAL, FCAL, and TOF hits, although currently only the TOF hits have been vetted.   
 
** Also matches thrown and reconstructed BCAL, FCAL, and TOF hits, although currently only the TOF hits have been vetted.   
 
* '''DAnalysisUtilities''': Collection of utility functions used to facilitate physics analyses.  These include methods for calculating invariant mass, missing mass, DOCA, etc.
 
* '''DAnalysisUtilities''': Collection of utility functions used to facilitate physics analyses.  These include methods for calculating invariant mass, missing mass, DOCA, etc.

Revision as of 11:02, 21 January 2015

Reaction Analysis Factories

  • NOTE: Most of these are located in sim-recon/src/libraries/ANALYSIS/

Pre-Selection

  • DNeutralShower_factory_PreSelect: Pre-selects which DNeutralShower objects should be included in analyses. Is pass-through (for now).
  • DChargedTrack_factory_PreSelect: Pre-selects which DChargedTrack objects should be included in analyses. Applies default cuts on tracking FOM (0.0027) and requires that each track have a matching detector hit.

User Input

  • DReaction_factory: Creates DReaction objects to be analyzed. Needs to be created in each analysis plugin.

Objects for PreKinFit DParticleCombo

  • DParticleComboBlueprint_factory: Creates a DParticleComboBlueprint object for each possible track combination, excluding any possible multiplicity from multiple beam photons. These DParticleComboBlueprint objects store pointers to which DChargedTrack and DNeutralShower objects will be used for each particle in the reaction. The beam photon multiplicity is handled in DParticleCombo_factory_PreKinFit.
  • DTrackTimeBased_factory_Combo: If none of the existing DTrackTimeBased objects for a given reconstructed track have the needed PID for a particle in a DReaction, this creates new DTrackTimeBased objects for them (e.g. e-). This uses the reconstructed momentum from the DTrackTimeBased object with the closest mass.
  • DDetectorMatches_factory_Combo: Stores the matching between each new DTrackTimeBased object (from the "Combo" factory) and the existing shower/hit objects. No need matching is done, it just uses the matching results from the source object. Also stores the matching results from the default factory.
  • DEventRFBunch_factory_Combo: Determines the RF bunch that corresponds to each DParticleComboBlueprint. These are created separately for each DParticleCombo because extra ghost and/or accidental tracks in the event that are not in the DParticleCombo are excluded from the determination, improving the RF bunch selection.
  • DChargedTrackHypothesis_factory_Combo: Creates DChargedTrackHypothesis objects for the DTrackTimeBased objects created by DTrackTimeBased_factory_Combo. Also, creates new DChargedTrackHypothesis objects using the "Combo"-tagged version of DEventRFBunch to compute new PID FOMs.
  • DNeutralParticleHypothesis_factory_Combo: Creates new DNeutralParticleHypothesis objects using the "Combo"-tagged version of DEventRFBunch to compute new PID FOMs.

Pre-Kinematic Fit

  • DParticleCombo_factory_PreKinFit: Creates a DParticleCombo object for each DParticleComboBlueprint, setting the data with the "Combo"-tagged versions of the DChargedTrackHypothesis, DNeutralParticleHypothesis, and DEventRFBunch objects, as well as the measured DBeamPhoton objects. Additional DParticleCombo objects are created if more than one valid DBeamPhoton object is available.
  • DAnalysisResults_PreKinFit: Loops over the DAnalysisAction objects stored in each DReaction, executing them on the corresponding DParticleCombo objects until the kinematic fit results are needed for an action (DAnalysisAction::Get_UseKinFitResultsFlag() == true). This allows DAnalysisAction objects to reject background combinations prior to kinematic fitting to save time and memory. This creates and fills histograms of the number of events and DParticleCombo objects that survive each cut. This also creates and fills several reaction-independent histograms, such as thrown and reconstructed particle kinematics, and track multiplicity.

Objects for Post-Kinematic Fit (Default Tag) DParticleCombo

  • NOTE: if no kinematic fit is requested/performed, then these objects aren't created.
  • DKinFitResults_factory: For each DParticleCombo that survived all of the cuts executed in DAnalysisResults_PreKinFit, perform the kinematic fit specified by the DReaction objects (if desired). See the "DKinFitResults_factory" section of GlueX Kinematic Fitting for more details.
  • DChargedTrackHypothesis_factory_KinFit: Create DChargedTrackHypothesis objects containing the kinematically fit track parameters. New, unique objects are created for each charged particle in each kinematically fit DParticleCombo.
  • DNeutralParticleHypothesis_factory_KinFit: Create DNeutralParticleHypothesis objects containing the kinematically fit track parameters. New, unique objects are created for each neutral particle in each kinematically fit DParticleCombo.
  • DBeamPhoton_factory_KinFit: Create DBeamPhoton objects containing the kinematically fit track parameters. New, unique objects are created for each beam photon in each kinematically fit DParticleCombo.

Post-Kinematic Fit

  • NOTE: these objects are created regardless of whether a kinematic fit is requested.
  • DParticleCombo_factory: Creates a new DParticleCombo object in each DParticleCombo that survived all of the cuts executed in DAnalysisResults_PreKinFit, but with the kinematically fit track parameters (the measured parameters are still available). The combos that fail kinematic fitting are copied from the "PreKinFit" factory and are saved in the output as well.
  • DAnalysisResults_factory: Loops over the DAnalysisAction objects stored in each DReaction, skipping those that were executed by DAnalysisResults_PreKinFit, and executing the remaining ones on the corresponding DParticleCombo objects created by DParticleCombo_factory. This creates and fills histograms of the number of events and DParticleCombo objects that survive each cut.

Thrown Factories

  • DReaction_factory_Thrown: Creates a DReaction object representing the thrown reaction. Final state particles listed in DMCThrown are ignored if they have decayed from pions, kaons, or other "typical" final state particles (e.g. muons, electrons, pions, and neutrinos are ignored if they decay from a kaon, etc.). Also, particles not defined in sim-recon/src/libraries/include/particleType.h are ignored.
  • DParticleCombo_factory_Thrown: Creates a DParticleCombo object representing the thrown reaction. The DMCThrown objects are used for the particle data, except pure DKinematicData objects are used for the beam particle and target objects (from DMCReaction). Final state particles listed in DMCThrown are ignored if they have decayed from pions, kaons, or other "typical" final state particles (e.g. muons, electrons, pions, and neutrinos are ignored if they decay from a kaon, etc.). Also, particles not defined in sim-recon/src/libraries/include/particleType.h are ignored.
  • DEventRFBunch_factory_Thrown: Creates a DEventRFBunch object for the simulated event.

Analysis Utilities

  • DParticleID: (Located in the PID library) Collection of functions used to match charged tracks to hits in the BCAL, FCAL, SC, and TOF, and to calculate the PID FOM from the TOF and DC dE/dx information.
  • DMCThrownMatching: Matches reconstructed particles to generated particles.
    • For neutrals, compares the thrown and reconstructed shower momenta and uses the shower covariance matrix to calculate a match FOM. This FOM is NOT cut, so extremely poor matches are included in the results.
    • For tracks, compares the hits on the track to the thrown hits. First, the % of the track hits on each thrown track is computed (in the DTrackTimeBased factory), and the highest total is set in DTrackTimeBased (as well as the corresponding DMCThrown::myid). In the DMCThrownMatching factory, for each DTrackTimeBased, the number of matched hits is weighted (multiplied) by the track hit-fraction (#-hits-on-track-matched-to-MC / #-hits-on-track). Matches are then recorded in order from highest weighted-#-hits to least, such that each DMCThrown is only matched once (other matches are ignored). Hit fractions less than DMCThrownMatching::dMinTrackMatchHitFraction (default 0.5, set-able on command-line via -PMCMATCH:MIN_TRACK_MATCH) are ignored.
    • Also matches thrown and reconstructed BCAL, FCAL, and TOF hits, although currently only the TOF hits have been vetted.
  • DAnalysisUtilities: Collection of utility functions used to facilitate physics analyses. These include methods for calculating invariant mass, missing mass, DOCA, etc.
  • DKinFitter_GlueX: See GlueX Kinematic Fitting

Factories Tree (PostScript)

  • This tree was generated using the b1pi_hists plugin on April 3, 2013.

File:Mattione AnalysisFactories b1piFactoryTree.ps