Difference between revisions of "Analysis DReaction"

From GlueXWiki
Jump to: navigation, search
(Comboing Cuts)
(Comboing Cuts)
Line 93: Line 93:
 
!width="100"| Command-line parameter
 
!width="100"| Command-line parameter
 
!width="100"| Default
 
!width="100"| Default
!width="100"| Comment
+
!width="500"| Comment
 
|-
 
|-
 
! Set_MinIndividualChargedPIDFOM(<span style="color:#0000FF">double</span>)
 
! Set_MinIndividualChargedPIDFOM(<span style="color:#0000FF">double</span>)

Revision as of 01:14, 17 February 2013

Summary

  • Note: The objects (not the factory) are located in: src/libraries/ANALYSIS/
  • DReactionStep: Contains the particle types for an interaction or decay step in a reaction.
    • The particle types are from the Particle_t enum defined in sim-recon/src/libraries/include/particleType.h
  • DReaction: Contains the DReactionStep objects for a reaction, along with (optional) analysis actions/instructions.
  • DReaction_factory: Users should create the DReaction objects they want to study in this factory, and place it in their plugin.

Setting up DReactionStep Example: b1pi

jerror_t DReaction_factory::init(void)
{
  DReactionStep* locReactionStep;
 
  DReaction* locReaction = new DReaction("b1pi"); //unique name
 
/**************************************************** b1pi Steps ****************************************************/
 
  //g, p -> X(2000), (p)
  locReactionStep = new DReactionStep();
  locReactionStep->Set_InitialParticleID(Gamma);
  locReactionStep->Set_TargetParticleID(Proton);
  locReactionStep->Add_FinalParticleID(Unknown); //x(2000)
  locReactionStep->Add_FinalParticleID(Proton, true); //proton missing
  locReaction->Add_ReactionStep(locReactionStep);
 
  //x(2000) -> b1(1235)+, pi-
  locReactionStep = new DReactionStep();
  locReactionStep->Set_InitialParticleID(Unknown); //x(2000)
  locReactionStep->Add_FinalParticleID(b1_1235_Plus);
  locReactionStep->Add_FinalParticleID(PiMinus);
  locReaction->Add_ReactionStep(locReactionStep);
 
  //b1(1235)+ -> omega, pi+
  locReactionStep = new DReactionStep();
  locReactionStep->Set_InitialParticleID(b1_1235_Plus);
  locReactionStep->Add_FinalParticleID(omega);
  locReactionStep->Add_FinalParticleID(PiPlus);
  locReaction->Add_ReactionStep(locReactionStep);
 
  //omega -> pi+, pi-, pi0
  locReactionStep = new DReactionStep();
  locReactionStep->Set_InitialParticleID(omega);
  locReactionStep->Add_FinalParticleID(PiPlus);
  locReactionStep->Add_FinalParticleID(PiMinus);
  locReactionStep->Add_FinalParticleID(Pi0);
  locReaction->Add_ReactionStep(locReactionStep);
 
  //pi0 -> gamma, gamma
  locReactionStep = new DReactionStep();
  locReactionStep->Set_InitialParticleID(Pi0);
  locReactionStep->Add_FinalParticleID(Gamma);
  locReactionStep->Add_FinalParticleID(Gamma);
  locReaction->Add_ReactionStep(locReactionStep);

DReactionStep Notes

  • The DReactionStep objects must be added to the DReaction in the correct order: the decay step for a particle must always be after its production step (it can be anywhere after it, but it must be after it).
    • However, you can study (for example) π0 decays without a π0 production step if you don't care how they're produced. E.g.:
//pi0 -> gamma, gamma
DReaction* locReaction = new DReaction("pi0"); //unique name
DReactionStep* locReactionStep = new DReactionStep();
locReactionStep->Set_InitialParticleID(Pi0);
locReactionStep->Add_FinalParticleID(Gamma);
locReactionStep->Add_FinalParticleID(Gamma);
locReaction->Add_ReactionStep(locReactionStep);
  • To define one of the particles as missing, when adding the particle add the optional "true" flag:
locReactionStep->Add_FinalParticleID(Proton, true); //missing proton
  • IMPORTANT NOTE FOR ANALYZERS: If a PID you need to use for your analysis is not defined by Particle_t, you can use "Unknown" instead (e.g. a rare resonance) (if you don't need its mass or charge). However, only one PID per DReaction can have the Particle_t of "Unknown" (e.g. the resonance you are studying), because the framework will not distinguish between the two. If you need more than one PID that is not included in Particle_t, then add all of the PIDs you need but one to particleType.h (along with their charges, masses, names, etc.) and check in the update (because other people may need those particles too!).

DReaction Control Variables

Kinematic Fit Type

  • Defined by the DKinFitType enum in sim-recon/src/libraries/Analysis/DKinFitResults.h
    • Values: d_NoFit, d_P4Fit, d_VertexFit, d_SpacetimeFit, d_P4AndVertexFit, d_P4AndSpacetimeFit
      • P4 fits include mass constraints

Comboing Cuts

  • There are several different cuts the user can place to cut out potential particle combinations that are "obviously" invalid before they are created.
  • These are useful for reducing memory usage spikes and cpu-time, especially in events with many (10+) garbage tracks/showers (in some cases the # of DParticleCombos can exceed 20000)
  • These cuts are disabled by default.
  • The values of these cuts are overridden if specified on the command line.

//method name, command-line name, comment, default (enabled/disabled, value)

DReaction set/enable method Command-line parameter Default Comment
Set_MinIndividualChargedPIDFOM(double) COMBO:MININDIVIDUALCHARGEDPIDFOM disabled
Set_MinCombinedChargedPIDFOM(double) COMBO:MINCOMBINEDCHARGEDPIDFOM disabled
Set_MinIndividualTrackingFOM(double) COMBO:MININDIVIDUALTRACKINGFOM disabled
Set_MinCombinedTrackingFOM(double) COMBO:MINCOMBINEDTRACKINGFOM disabled
Set_MaxPhotonRFDeltaT(double) COMBO:PHOTONRFDELTAT disabled For selecting the beam photon during high-luminosity running
Set_MinProtonMomentum(double) COMBO:MINPROTONMOMENTUM enabled, 0.3 GeV/c Value used during track reconstruction


Example: b1pi

// continuation of DReaction_factory::init()
/**************************************************** b1pi Control Variables ****************************************************/
 
  // Type of kinematic fit to perform:
  locReaction->Set_KinFitType(d_P4AndVertexFit); //enum defined in DKinFitResults.h
 
  // Comboing cuts: used to cut out potential particle combinations that are "obviously" invalid
    // e.g. contains garbage tracks, PIDs way off
  // These cut values are overriden if specified on the command line
  locReaction->Set_MinCombinedChargedPIDFOM(0.001);
  locReaction->Set_MinCombinedTrackingFOM(0.001);

DReaction Notes

  • The user should create a DReaction object in their plugin for each analysis they want to perform (can analyze more than one at once). For example, by creating additional DReaction objects you can:
    • Analyze different reactions in the same plugin.
    • Treat different particles as missing in the same reaction (or have no particles missing).
    • Perform different kinematic fits to the same reaction (e.g. compare results from p4-only and vertex-p4 fits)
    • Perform different DAnalysisActions to compare the results from having different cuts.
  • IMPORTANT NOTE FOR DEVELOPERS: Grabbing the DReaction objects from JANA is tricky, because a user may have several factories per plugin, or may be running several plugins at once. See DParticleComboBlueprint_factory::evnt() for an example on how to correctly grab all DReaction objects from JANA.