Difference between revisions of "Analysis DParticleCombo"

From GlueXWiki
Jump to: navigation, search
(Summary)
(Comparing Particles Between Combos (and/or Reactions))
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Summary ==
 
== Summary ==
 
* Located in sim-recon/src/libraries/ANALYSIS/
 
* Located in sim-recon/src/libraries/ANALYSIS/
* '''DParticleComboStep''': Contains the particles for an interaction or decay step in a reaction.
+
* '''DParticleComboStep''': Contains a possible combination of particles for an interaction or decay step in a reaction.
** <span style="color:#0000FF">DParticleComboStep</span> nearly mirrors <span style="color:#0000FF">DReactionStep</span>, containing particles instead of particle types.   
+
** <span style="color:#0000FF">DParticleComboStep</span> nearly mirrors <span style="color:#0000FF">DReactionStep</span>, containing particles instead of PIDs, but in the same order.   
* '''DParticleCombo''': Contains the <span style="color:#0000FF">DParticleComboStep</span> objects for a reaction, along with a pointers to the corresponding <span style="color:#0000FF">DReaction</span> and (optional) <span style="color:#0000FF">DKinFitResults</span>.  
+
* '''DParticleCombo''': Contains a possible combination of <span style="color:#0000FF">DParticleComboStep</span> objects for a reaction, along with a pointer to the corresponding <span style="color:#0000FF">DKinFitResults</span>.  
** <span style="color:#0000FF">DParticleCombo</span> nearly mirrors <span style="color:#0000FF">DReaction</span>, containing <span style="color:#0000FF">DParticleComboStep</span> objects instead of <span style="color:#0000FF">DReactionStep</span> objects.  
+
** <span style="color:#0000FF">DParticleCombo</span> nearly mirrors <span style="color:#0000FF">DReaction</span>, containing <span style="color:#0000FF">DParticleComboStep</span> objects instead of <span style="color:#0000FF">DReactionStep</span> objects, but in the same order.
  
=== Particles ===
+
== Creation ==
* Particle data is contained in either <span style="color:#0000FF">DChargedTrackHypothesis</span>, <span style="color:#0000FF">DNeutralParticleHypothesis</span>, <span style="color:#0000FF">DBeamPhoton</span>, or <span style="color:#0000FF">DKinematicData</span> (for reconstructed missing or decaying particles) objects.
+
* Any detected +/-/neutral particle can be any of the desired +/-/neutral particles in the <span style="color:#0000FF">DReaction</span>: find all possible combinations.
 +
** This is regardless of PID: Only loose PID cuts are applied by default.
 +
** Note: If a <span style="color:#0000FF">DChargedTrack</span> has hypotheses with different charges, tested as both + and -.
 +
*** This can happen if the track reconstruction flips the sign of one of the hypotheses, but not the others.
 +
* There can be (very, very) many <span style="color:#0000FF">DParticleCombo</span> objects for a single event: user should apply cuts to remove the (combinatoric) background combinations.
 +
 
 +
== Particles ==
 +
 
 +
* Particle data is contained in either <span style="color:#0000FF">DChargedTrackHypothesis</span>, <span style="color:#0000FF">DNeutralParticleHypothesis</span>, <span style="color:#0000FF">DBeamPhoton</span>, <span style="color:#0000FF">DMCThrown</span>, or <span style="color:#0000FF">DKinematicData</span> (for reconstructed missing or decaying particles) objects.
 
** However, all of these objects are stored in <span style="color:#0000FF">DParticleComboStep</span> as pointers to <span style="color:#0000FF">DKinematicData</span>.  If you want the <span style="color:#0000FF">DBeamPhoton</span>, etc. objects, you need to cast them back that type.   
 
** However, all of these objects are stored in <span style="color:#0000FF">DParticleComboStep</span> as pointers to <span style="color:#0000FF">DKinematicData</span>.  If you want the <span style="color:#0000FF">DBeamPhoton</span>, etc. objects, you need to cast them back that type.   
* The order of the particles and steps are the same as specified by the <span style="color:#0000FF">DReaction</span> and <span style="color:#0000FF">DReactionStep</span> objects.
+
 
 
* Both the measured data and the kinematic fit data are accessible from these classes.
 
* Both the measured data and the kinematic fit data are accessible from these classes.
** In <span style="color:#0000FF">DParticleCombo</span> objects grabbed from the "PreKinFit" tag factory, the measured data is stored in the both the "default" and the "measured" members (e.g. dFinalParticles and dFinalParticles_Measured).
+
** The measured data can be accessed by calling the <span style="color:#008000">Get_InitialParticle_Measured</span> and <span style="color:#008000">Get_FinalParticle_Measured</span>(<span style="color:#0000FF">size_t</span>) functions on a particle combination.
** In <span style="color:#0000FF">DParticleCombo</span> objects grabbed from the default (no tag) factory, the kinematic data is stored in the "default" members (e.g. dFinalParticles) and the measured data is stored in the "measured" members (e.g. dFinalParticles_Measured).  
+
** The the <span style="color:#008000">Get_InitialParticle</span> and <span style="color:#008000">Get_FinalParticle</span>(<span style="color:#0000FF">size_t</span>) functions return the Measured/Kinfit data.
* The source objects (<span style="color:#0000FF">DChargedTrack</span> and <span style="color:#0000FF">DNeutralShower</span>) and PIDs are accessible through the <span style="color:#0000FF">DParticleComboBlueprintStep</span>.
+
* Particles that are missing or are decaying may have NULL pointers stored for the objects.
+
** The source and measured pointers will be NULL, and the "default" pointers will be NULL unless they are constrained by the kinematic fit (e.g. resonances are not constrained, but a &Lambda; or a missing recoil proton will be).
+
  
=== Source Code ===
+
* The source objects (<span style="color:#0000FF">DChargedTrack</span> and <span style="color:#0000FF">DNeutralShower</span>) are accessible by calling <span style="color:#0000FF">DParticleComboStep</span>::<span style="color:#008000">Get_FinalParticle_SourceObject</span>(<span style="color:#0000FF">size_t</span>).
* C++ code of class members (methods aren't shown):  
+
** These objects are returned as type <span style="color:#0000FF">const JObject</span>*, and may be cast to either <span style="color:#0000FF">DChargedTrack</span> or <span style="color:#0000FF">DNeutralShower</span> as appropriate. 
<syntaxhighlight>
+
class DParticleComboStep
+
{
+
  private:
+
    // BLUEPRINT:
+
    const DParticleComboBlueprintStep* dParticleComboBlueprintStep; //contains PIDs, source objects
+
  
    // INITIAL PARTICLES:
+
* Particles that are missing or are decaying may have NULL pointers stored for the objects.
    const DKinematicData* dInitialParticle; //if is null: decaying or beam particle not yet set!
+
** The source and measured pointers will be NULL, and the "default" pointers will be NULL unless they are constrained by the kinematic fit (e.g. resonances are not constrained, but a &Lambda; or a missing recoil proton will be).
    const DKinematicData* dInitialParticle_Measured; //if is null: decaying or beam particle not yet set!
+
    const DKinematicData* dTargetParticle; //NULL for no target
+
 
+
    // FINAL PARTICLES:
+
    deque<const DKinematicData*> dFinalParticles; //if particle is null: missing or decaying! //these are DChargedTrackHypothesis or DNeutralParticleHypothesis objects if detected
+
    deque<const DKinematicData*> dFinalParticles_Measured; //if particle is null: missing or decaying! //these are DChargedTrackHypothesis or DNeutralParticleHypothesis objects if detected
+
};
+
</syntaxhighlight>
+
  
<syntaxhighlight>
+
== Comparing Particles Between Combos (and/or Reactions) ==
class DParticleCombo : public JObject
+
* To know whether a particle in one <span style="color:#0000FF">DParticleCombo</span> is the same physical track/shower as a particle in another <span style="color:#0000FF">DParticleCombo</span>, you cannot directly compare the particle-object pointers. This is because the specific instances of these particles are likely unique to their combinations.
{
+
* Instead, you need to compare source objects (see above section).
  private:
+
    const DReaction* dReaction;
+
    const DKinFitResults* dKinFitResults;
+
    deque<const DParticleComboStep*> dParticleComboSteps;
+
};
+
</syntaxhighlight>
+

Latest revision as of 06:48, 3 November 2017

Summary

  • Located in sim-recon/src/libraries/ANALYSIS/
  • DParticleComboStep: Contains a possible combination of particles for an interaction or decay step in a reaction.
    • DParticleComboStep nearly mirrors DReactionStep, containing particles instead of PIDs, but in the same order.
  • DParticleCombo: Contains a possible combination of DParticleComboStep objects for a reaction, along with a pointer to the corresponding DKinFitResults.
    • DParticleCombo nearly mirrors DReaction, containing DParticleComboStep objects instead of DReactionStep objects, but in the same order.

Creation

  • Any detected +/-/neutral particle can be any of the desired +/-/neutral particles in the DReaction: find all possible combinations.
    • This is regardless of PID: Only loose PID cuts are applied by default.
    • Note: If a DChargedTrack has hypotheses with different charges, tested as both + and -.
      • This can happen if the track reconstruction flips the sign of one of the hypotheses, but not the others.
  • There can be (very, very) many DParticleCombo objects for a single event: user should apply cuts to remove the (combinatoric) background combinations.

Particles

  • Particle data is contained in either DChargedTrackHypothesis, DNeutralParticleHypothesis, DBeamPhoton, DMCThrown, or DKinematicData (for reconstructed missing or decaying particles) objects.
    • However, all of these objects are stored in DParticleComboStep as pointers to DKinematicData. If you want the DBeamPhoton, etc. objects, you need to cast them back that type.
  • Both the measured data and the kinematic fit data are accessible from these classes.
    • The measured data can be accessed by calling the Get_InitialParticle_Measured and Get_FinalParticle_Measured(size_t) functions on a particle combination.
    • The the Get_InitialParticle and Get_FinalParticle(size_t) functions return the Measured/Kinfit data.
  • The source objects (DChargedTrack and DNeutralShower) are accessible by calling DParticleComboStep::Get_FinalParticle_SourceObject(size_t).
    • These objects are returned as type const JObject*, and may be cast to either DChargedTrack or DNeutralShower as appropriate.
  • Particles that are missing or are decaying may have NULL pointers stored for the objects.
    • The source and measured pointers will be NULL, and the "default" pointers will be NULL unless they are constrained by the kinematic fit (e.g. resonances are not constrained, but a Λ or a missing recoil proton will be).

Comparing Particles Between Combos (and/or Reactions)

  • To know whether a particle in one DParticleCombo is the same physical track/shower as a particle in another DParticleCombo, you cannot directly compare the particle-object pointers. This is because the specific instances of these particles are likely unique to their combinations.
  • Instead, you need to compare source objects (see above section).