Difference between revisions of "Analysis Miscellaneous"

From GlueXWiki
Jump to: navigation, search
(How (Default Tag) RF bunch selection works for an event when RF hits (DRFTime) are present)
(Blanked the page)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Tricks for saving time and memory ==
 
* Change the binning and/or range of the built-in histograms after constructing the corresponding <span style="color:#0000FF">DAnalysisAction</span> object.
 
* Because there may be many <span style="color:#0000FF">DParticleCombo</span> objects for an event, perform as many cuts as possible prior to kinematic fitting. 
 
** This includes extremely-loose cuts (well beyond the range at which your final cut will be) on all of the physical quantities of interest (e.g. mass peaks).
 
* To branch an analysis, create a new (but identical) <span style="color:#0000FF">DReaction</span> object (with the same <span style="color:#0000FF">DReactionStep</span> pointers), then simply repeat or change any of the <span style="color:#0000FF">DAnalysisActions</span>.
 
** If the <span style="color:#0000FF">DReactionStep</span> objects are re-used, the framework will realize that the <span style="color:#0000FF">DParticleComboBlueprintStep</span> objects will be the same, and will simply reuse them. 
 
*** Note that the <span style="color:#0000FF">DParticleCombo</span> objects will not be identical since they will contain a pointer to a different <span style="color:#0000FF">DReaction</span>.
 
*** If the kinematic fit type is also the same, it will skip the kinematic fit of the new <span style="color:#0000FF">DParticleCombo</span> objects entirely and just copy the previous results since they will be identical.
 
  
== RF Beam Bunch Selection & Timing Details ==
 
 
=== Discussion / Summary ===
 
 
* During experimental running, the event start time is not measured.  We have the (excellent resolution) time of an RF beam bunch (<span style="color:#0000FF">DRFTime</span>), but we don't know which bunch caused the triggered event.  RF bunches from the accelerator arrive every 2.004 ns, so the time of the event-causing RF bunch is +/- N*2.004 ns from this number (N = some integer). 
 
 
* To select the event-causing RF bunch (<span style="color:#0000FF">DEventRFBunch</span>), the start-counter hit-times for all tracks with good tracking FOM (within +/- 5 sigma) are used.  The tracks "vote" on an RF bunch, and the bunch with the most votes gets selected. 
 
 
* The track and shower times are then compared to this DEventRFBunch time to calculate the PID FOMs. 
 
 
* However, some junk and accidental tracks will vote, occasionally throwing off the event start time, and causing good events to fail PID cuts.  Therefore, during an analysis, the RF bunch is re-selected separately for each particle combination, using only the tracks and showers in that particle combo (<span style="color:#0000FF">DEventRFBunch</span>, <span style="color:red">"Combo"</span>).  The track/shower times from the BCAL/TOF/FCAL/SC are propagated to the beamline and are averaged to select the correct RF bunch. 
 
 
* The charged track (<span style="color:#0000FF">DChargedTrackHypothesis</span>, <span style="color:red">"Combo"</span>) and neutral particle (<span style="color:#0000FF">DNeutralParticleHypothesis</span>, <span style="color:red">"Combo"</span>) PID FOMs are recomputed using this new RF time.  It is these objects that are ultimately saved to the <span style="color:#0000FF">DParticleCombo</span> <span style="color:red">"PreKinFit"</span> object.
 
 
* To select the possible <span style="color:#0000FF">DBeamPhoton</span>'s for the particle combinations, their times are compared to the <span style="color:#0000FF">DEventRFBunch</span> for each combo.  The cut used is adjustable through the <span style="color:#0000FF">DReaction</span>, but should be no smaller than +/- 1.002 ns.  All <span style="color:#0000FF">DBeamPhoton</span>'s within this time window originated from the same RF bunch, and thus each could have caused the event.  This multiplies the number of particle combinations.
 
 
=== RF- & Beam-Related Classes ===
 
 
For all of the objects below, the time & position are reported for when the beam (would have) reached the target center:
 
 
* '''Tagger Hits''':
 
# <span style="color:#0000FF">DTAGMHit</span>: Hit-level tagger microscope objects.
 
# <span style="color:#0000FF">DTAGHHit</span>: Hit-level tagger hodoscope (fixed-array) objects.
 
 
* '''Beam photons''':
 
# <span style="color:#0000FF">DBeamPhoton</span>: built from DTAGMHit and DTAGHHit objects, is smeared
 
# <span style="color:#0000FF">DBeamPhoton</span>, <span style="color:red">"TRUTH"</span>: True (unsmeared) photon energy/time data. 
 
# <span style="color:#0000FF">DBeamPhoton</span>, <span style="color:red">"MCGEN"</span>: The true photon that generated the event (as opposed to the EM background photons)
 
 
* '''RF time''':
 
# <span style="color:#0000FF">DRFTime</span>, <span style="color:red">"TRUTH"</span>: The true start time of the event (propagated to the target center) (same as <span style="color:#0000FF">DBeamPhoton</span>, <span style="color:red">"MCGEN"</span>)
 
# <span style="color:#0000FF">DRFTime</span>: For MC data, the simulated "measured" value is ~0. The actual time is +/- 2.004*N this value.
 
 
* '''RF Bunch''':
 
# <span style="color:#0000FF">DEventRFBunch</span>, <span style="color:red">"Thrown"</span>: The RF bunch that was selected
 
# <span style="color:#0000FF">DEventRFBunch</span>, <span style="color:red">"TRUTH"</span>: The reconstruction software's best guess for the RF bunch (time) that started the event. 
 
# <span style="color:#0000FF">DEventRFBunch</span>, <span style="color:red">"Combo"</span>: The reconstruction software's best guess for the RF bunch (time) that started the event for each particle combination.
 
 
=== How (Default Tag) RF bunch selection works for an event when RF hits (<span style="color:#0000FF">DRFTime</span>) are present ===
 
* In <span style="color:#0000FF">DEventRFBunch_factory</span>: Use (in order of preference) (need at least one of):
 
 
# Select good time-based tracks: <span style="color:#0000FF">DTrackTimeBased</span> with greatest Tracking FOM for track, Tracking FOM > +/- <span style="color:Red">5&sigma;</span>
 
# Of these, use tracks with matching SC hits, if any: Vote
 
# If none, use tracks with matching hits in any detector: BCAL/TOF/FCAL: Vote
 
# If none, set <span style="color:#0000FF">DEventRFBunch</span>::<span style="color:#008000">dTime</span> to <span style="color:Red">NaN</span>
 
 
* Voting:
 
# Propagate track/shower times to vertex
 
# Compare times to possible RF bunches, select the bunch with the most votes
 
# If there is a tie: let DBeamPhoton's vote to break tie
 
## If still a tie, and voting with tracks:
 
### Select the bunch with the most total track hits (highest total tracking NDF)
 
### If still a tie: Select the bunch with the lowest total chisq
 
## If still a tie, and voting with neutral showers:
 
### Select the bunch with the highest total shower energy
 
 
=== How (Combo Tag) RF bunch selection works for each combo ===
 
* In <span style="color:#0000FF">DEventRFBunch_factory_Combo</span>:
 
 
# For each charged track in the combo, calculate its start time (from BCAL/TOF/FCAL hits), and propagate it to the target center.
 
# For each photon shower in the combo, calculate its start time (use <span style="color:#0000FF">DVertex</span> position), and propagate it to the target center.
 
# Ignore massive neutral particles since their &beta; is defined by the start time.
 
# The above particles vote: the RF bunch time with the most votes wins. The RF bunch times are the DRFTime +/- multiples of 2.004 ns.
 

Latest revision as of 08:06, 3 November 2017