Data Analysis - Drift Chamber Calibration
Drift Chambers
Overview
Calibrating DC (XEM)
Tracking Algorithms
There are three tracking algorithms available in hcana. They are the scintillator method, the chi-squared minimization method, and the pruning method. All tracking algorithms mentioned eventually use chi-squared minimization to choose the best track, but the latter two offer selection methods to reduce the number of tracks formed with physics input.
- The scintillator method uses the hit information from the scintillator paddles with user specified cut criteria to better select the good tracks.
- The pruning method uses acceptance and physics cuts to prune back the unwanted or incorrect tracks to make selecting the correct track more likely.
In the X>1 analysis, we are moving to the pruning method because it is better equipped to form and select proper tracks when the data rate is high. As data rate increases, hits within the drift chamber increase. These can be good electron tracks and good pion tracks, but they aren't necessarily the ones that correspond to a hit in the hodoscope, which initiated the trigger. The next three sections is an overview of the tracking parameters in hcana used for each method. "A track is never rejected at this point in the code. Therefore the track selection does not effect the track efficiency."[1]
Chi-Squared Minimization
- This is the simplest method, and only selects the track with the lowest chi-squared. One can check this is the method employed by noting the P.gtr.index track is always 0. This is because the tracking algorithms sort the tracks by lowest chi-squared. Refer to the tracking monitoring section for more information on monitoring track formation.
- Tracking Parameters
-
- There are no parameters for this method, but p(h)sel_using_scin and p(h)sel_using_prune must be set to zero.
Scintillator Method
- This is mainly a chi-squared minimization technique, but it also checks if the track aligns with other parts of the trigger. Select as best track the track closest to a S2Y hit. If there are no S2Y hits, select the track closest to a S2X hit.
Also reject tracks if they fail dEdx, beta, or calorimeter energy cuts.
- Tracking Parameters
-
- p(h)sel_using_scin - Set to 1 if using, otherwise set to zero. There does not appear to be a default, so these parameters must be set in PARAM files if using this method.
- p(h)sel_dedx1min(max) - dEdx must be within the specified range.
- p(h)sel_betamin(max) - beta criteria must be passed by particle track.
- p(h)sel_etmin(max) - Track energy as obtained from the calorimeter? Not sure if Edep in Calorimeter or based on track momentum and particle ID.
Pruning Method
- This method chips away at incorrectly formed tracks based on acceptance, number of hits, and physics quantities. For a full list of pruning parameters, refer to Mark Jones's Pruning Document.
- Note at top of BestTrackUsingPrune() found in THcHallCSpectromer class.
Select as best track the track with the lowest Chisq after pruning tracks that don't meet various criteria such as xptar, yptar, ytar delta, beta, degrees of freedom (of track fit), difference between measured beta and beta from p, chisq of beta fit, focal plane time and number of PMT hit.
- Tracking Parameters
-
- p(h)sel_using_prune - Set to 1 if using pruning, otherwise set to zero.
- p(h)prune_xp
- p(h)prune_yp
- p(h)prune_ytar
- p(h)prune_delta
- p(h)prune_DipoleExit
- p(h)prune_beta
- p(h)prune_df
- p(h)prune_npmt
- p(h)prune_chibeta
- No selection
- No selection
- p(h)prune_fptime
- Choose best Chi-sq.
Efficiency
Update to Tracking Algorithm
This section is based on the mkj-dc branch hcana. Mark will be documenting the changes and adding them to develop in the near future. The slides Mark presented to the Commissioning Analysis Meeting are linked here:
HCANA DC Update 20 July 2021
- New parameters used to run new algorithm
- p(h)UseNewLinkStubs - Flag used to tell hcana to use new linkstubs method. Set to 0 for old linkstubs method, set to 1 for new linkstubs method.
- p(h)UseFindSpacePoints - Flag used to tell hcana to use new spacepoint finding algorithm. Set to 0 for old findspacepoint method, set to 1 for new findspacepoint method.
- p(h)TrackLargeResidCut - Remove one hit from a track that has a residual greater than the value set (in cm). Default value is -1, which means there is no chi squared cut in place. (i.e. no hit in track removed)
- p(h)min_drifttime and p(h)max_drifttime - Cut out poorly determined drifttime for better track formation. Default values of -50 and 200 are lose, but probably okay.
- p(h)SpacePointCriterion - Previously unset by hallc_replay, but was a parameter in hcana. Refer to Mark's slides to the commissioning analysis meeting for use.
- Existing parameters that (may) need modified
- p(h)dc_tdc_min_win and p(h)dc_tdc_max_win - Already set properly
- xt_track_criterion, yt_track_criterion, xpt_track_criterion
- pmax_pr_hits = 35, 35
- pmin_hit = 5,5 ! I would not use 4
- pmin_combos - does not matter for new space point method
- pSmallAngleApprox = 1
- pstub_max_xpdiff=.2
Comments from Mark:
- SpacePointCriterion = 0.5 should work well for us.
- New cluster finding and new tree variables to judge what SpacePointCriterion should be.
- Outstanding issue in P.dc.1x1.time plot with and without p(h)min_driftime and p(h)max_drifttime cuts. Events are disappearing between the cuts, and Mark doesn't know why either.
- xt_track_criterion, yt_track_criterion and xpt_track_criterion should be changed
- With the p(h)UseNewLinkStubs=1, if there is not any stub link found with the given criterion then it makes matches between all combination of the stubs. So there is no loss of tracks. The reason for making the track criterion tighter is to reduce the number of possible tracks ,since the NewFindSpacePoints find more space points than the old FindSpacePoints. One point is that since we do not fit the ypt with fitting the "stub" ( the hits the chamber spacepoint) the difference in yt between stubs is not gaussian ( it basically is correlated with the yp). In the plot in the talk the yp difference is fairly narrow because the VCS covered a narrow region in the focal plane near the focus where yp was relatively small.
- Mark made a script that we can modify to view how well the tracking is working. This will entry will be updated with information on doing this in the near future.
- Mark wrote a new code to align the DC. The position offset of the central wire is changed, and the xpos/ypos are left at the xcenter and ycenter values. Also it has the sigma of 0.014 for HMS and 0.015 for SHMS, which Mark found for the VCS residuals. This will affect your chisq calculation, though it is more of a scale factor for chisq.
It is important to use the track pruning : (p)hsel_using_prune = 1
A short description of the pruing method.
https://hallcweb.jlab.org/doc-private/ShowDocument?docid=1062
I have attached some scripts that I used to look at the tracking. It mainly focuses on the elastic, but it will give you an idea about the variables. make_hist_shms_dc.C is mainly for looking at residuals and the stub information. There is a section of code where it uses the UXxpos, UXypos, VXxpos, VXypos to calculate dist2= pow(ux_posx-vx_posx,2) + pow(ux_posy-vx_posy,2) which is the space point criterion cut.
make_hist_fit_ntuple.C was code I used to make a ntuple for doing the DC alignment fit, looked into refitting the best track with different LR and writing out the DC hit, cluster , stub and track info. Anyway it will give you an idea about the variables. The code writes out the variables. I did not have time to write a code to plot things per event.