kf / gbl comparison on tri-trig mc and data 2019...2 outline of kf / gbl checks • apart from...
TRANSCRIPT
-
KF / GBL comparison on tri-trig MC and Data 2019
- Analysis Workshop 2019 data -
06/04/2020
PF, RJ, TT
-
2
Outline of KF / GBL checks
• Apart from processing time I tried to make a general comparison between events reconstructed with KF and GBL Tracks
• Today: • Using 2016 MC trident+beam sample:
- Check on track parameter pulls using truth matching (similar to what Robert has already shown)
• Using 2019 MC trident+beam sample: - Present the current configuration of the Kalman Pat Recognition - Number of tracks reconstructed per event and extrapolation to ECAL
• First look at 2019 Data: - Used 10031 to get a feeling of current detector performance - Vertex resolution as function of VtxP and Vtx InvMass compared to MC simulation - KF “Unbiased Residuals” per layer
• Summary and to-do
-
3
Processing time - Tri-Trig ***with Beam***
• File tested: /nfs/slac/g/hps3/users/bravo/mc/mc2019/tritrig/readoutFromJLAb/tritrig_1.slcio
• With the current strategies, tracking takes: - ~98% in the SeedTracker (60% in the extension, 27% in the confirmation, 12% in the fitting) - Mostly due to very large cuts in rmsTime in SeedTracker (1000ns), but also setting it at (20ns) doesn’t help (98% => 93% see Backup) - ~0.7% in GBL Refitting stage
• Kalman track finding and fitting takes ~0.3% of the event time in this conditions
• All the rest of the event reconstruction time becomes negligible
• Not sustainable for high-stat MC or reReco passes.
• Total time: 25m for ~150 events on cent7a => 10s/event
jProfilerEvaluation version, remotely attached to cent7a, readout to LCIO step
Total Tracking time ~98% in tri-trig signal with beam background. Not sustainable in long run. A more detailed dump in the backup
https://www.ej-technologies.com/products/jprofiler/overview.html
-
4
Refit GBLTracks with KF
• Procedure • Refit GBLTracks from Matched tracks
=> GBLRefittedTracks • Checked that GBLTracks (original) and
GBLRefittedTracks (refitted) have same track parameters - negligible differences
• Store TSOS • After confirming that, proceeded to refit
using KF
GBLTracks_d0_hEntries 233543Mean 0.1107− Std Dev 0.5635
4− 3− 2− 1− 0 1 2 3 4 [mm]0d
210
310
410
Trac
ks
GBLTracks_d0_hEntries 233543Mean 0.1107− Std Dev 0.5635
GBLTracks_d0_h
GBLRefittedTracks_d0_h
Entries 233539Mean 0.1107− Std Dev 0.5635
GBLRefittedTracks_d0_h
Entries 233539Mean 0.1107− Std Dev 0.5635
GBLTracks_Z0_hEntries 233543Mean 0.07529− Std Dev 0.2595
5− 4− 3− 2− 1− 0 1 2 3 4 5z_0 [mm]
1
10
210
310
410Tra
cks GBLTracks_Z0_h
Entries 233543Mean 0.07529− Std Dev 0.2595
GBLTracks_Z0_h
GBLRefittedTracks_Z0_h
Entries 233539Mean 0.07529− Std Dev 0.2595
GBLRefittedTracks_Z0_h
Entries 233539Mean 0.07529− Std Dev 0.2595
• First check was to refit the pre-reconstructed GBL tracks using Kalman Filter routines
• In “official” reconstructed 2016 trident+beam MC samples TSOS are not stored - Necessary for refitting with KF (as it needs a seed for the first state)
-
5
Hit Content Check
Same hits are picked Can compare 1-to-1
-
6
Truth matching and pull checks
• Both KF tracks and GBL Tracks are matched to MCParticle (the matched particle is the one with highest # hits on track)
• Since KF is the GBL refit (using the same hits), they are matched to the same particle by definition
• Truth matching is done using TrackTruthMatching tool written by MattS
• MCParticle is then converted to HelicalTrackFit and then to LCIO::Event::Track to be persisted (see TrackToMCParticleRelationsDriver)
• Relations are kept, so can be exploited directly in hpstr in the future
• Momentum resolution only slightly worse wrt GBL, but at sub-percent level.
5− 4− 3− 2− 1− 0 1 2 3 4 5
)λtan(σ / truth)λ - tan(reco)λtan(
0.0050.01
0.0150.02
0.0250.03
0.0350.04
0.0450.05
Trac
ks InternalHPSGBL Tracksrefitted with KF
=1.135+/- 0.002σ=-0.018+/- 0.003 µ =1.135+/- 0.002σ=-0.017+/- 0.003 µ
Kalman
Helix + RefittedGBL
5− 4− 3− 2− 1− 0 1 2 3 4 5)λtan(σ / truth)λ - tan(reco)λtan(
0.60.81.01.21.4
Rat
io
50− 40− 30− 20− 10− 0 10 20 30 40 50
truth) / pT
truth - pTreco100 * (pT
0.05
0.1
0.15
0.2
0.25
0.3
Trac
ks InternalHPSGBL Tracksrefitted with KF
=6.6423σ=1.4699 µ=6.6407σ=1.3367 µ
Kalman
Helix + RefittedGBL
50− 40− 30− 20− 10− 0 10 20 30 40 50
truth) / pT
truth - pT
reco100 * (pT
0.60.81.01.21.4
Rat
io
https://github.com/JeffersonLab/hps-java/blob/master/analysis/src/main/java/org/hps/analysis/MC/TrackTruthMatching.javahttps://github.com/JeffersonLab/hps-java/blob/master/analysis/src/main/java/org/hps/analysis/MC/TrackToMCParticleRelationsDriver.java
-
7
Truth matching and pull checks
5− 4− 3− 2− 1− 0 1 2 3 4 5
d0σ / truth - d0recod0
0.0050.01
0.0150.02
0.0250.03
0.0350.04
0.0450.05
Trac
ks InternalHPSGBL Tracksrefitted with KF
=1.183+/- 0.003σ=-0.005+/- 0.003 µ =1.211+/- 0.003σ=-0.033+/- 0.003 µ
Kalman
Helix + RefittedGBL
5− 4− 3− 2− 1− 0 1 2 3 4 5
d0σ / truth - d0recod0
0.60.81.01.21.4
Rat
io
5− 4− 3− 2− 1− 0 1 2 3 4 5
z0σ / truth - z0recoz0
0.0050.01
0.0150.02
0.0250.03
0.0350.04
0.0450.05
Trac
ks InternalHPSGBL Tracksrefitted with KF
=1.132+/- 0.002σ=0.017+/- 0.003 µ =1.133+/- 0.002σ=0.016+/- 0.003 µ
Kalman
Helix + RefittedGBL
5− 4− 3− 2− 1− 0 1 2 3 4 5
z0σ / truth - z0recoz0
0.60.81.01.21.4
Rat
io
5− 4− 3− 2− 1− 0 1 2 3 4 5
Ωσ / truthΩ - recoΩ
0.0050.01
0.0150.02
0.0250.03
0.0350.04
0.0450.05
Trac
ks InternalHPSGBL Tracksrefitted with KF
=1.219+/- 0.003σ=0.020+/- 0.003 µ =1.219+/- 0.003σ=0.017+/- 0.003 µ
Kalman
Helix + RefittedGBL
5− 4− 3− 2− 1− 0 1 2 3 4 5
Ωσ / truthΩ - recoΩ
0.60.81.01.21.4
Rat
io
5− 4− 3− 2− 1− 0 1 2 3 4 5
φσ / truthφ - recoφ
0.0050.01
0.0150.02
0.0250.03
0.0350.04
0.0450.05
Trac
ks InternalHPSGBL Tracksrefitted with KF
=1.257+/- 0.003σ=-0.032+/- 0.003 µ =1.308+/- 0.004σ=0.058+/- 0.003 µ
Kalman
Helix + RefittedGBL
5− 4− 3− 2− 1− 0 1 2 3 4 5φσ / truthφ - recoφ
0.60.81.01.21.4
Rat
io
-
8
Extrapolation to Ecal for KF
• Minor changes to the Track States on surfaces to enable extrapolation to the ECAL in 2016 MC
• GBL Tracks refit with KF lead to same matching of ECAL clusters
• The extrapolation relies on previous RK method => Robert’s new extrapolation should be checked
ECalClusterX_m_trackX_top_all
Entries 609Mean 42.08− Std Dev 123.8
200− 150− 100− 50− 0 50 100 150 200(Cluster X - Track X) [mm] (at ECAL)
0
50
100
150
200
250
Entr
ies ECalClusterX_m_trackX_top_all
Entries 609Mean 42.08− Std Dev 123.8ECalClusterX_m_trackX_top_all
Entries 1250Mean 0.9702− Std Dev 53.26
ECalClusterX_m_trackX_top_all
Entries 1250Mean 0.9702− Std Dev 53.26ECalClusterX_m_trackX_top_all
Entries 1249Mean 1.091− Std Dev 53.04
ECalClusterX_m_trackX_top_all
Entries 1249Mean 1.091− Std Dev 53.04
KF Refit before TSOS fix
KS Refit after TSOS Fix
GBL Refit
2016 Trident+ Bkg MC
GBL Tracks refit with KF
KF tracks are expected to have similar performance of GBL tracks when running on the same hit content. A sensible improvement in estimating d0 was observed.
-
9
Kalman Pat Reco / GBL in 2019 MC
• Yesterday has been discussed that Kalman Pattern Reco has been enabled in the current MC reconstruction
• In the following slides, both SeedTracker and Kalman Pattern Reco are ran on exactly the same events at the same time so it’s possible to compare the relative performance 1-to-1
• However they follow different seed strategy, pattern recognition cuts and hit content
• The results will fold together the different track finding and fitting algorithms.
• An overview on how to setup KF in a reconstruction job is given in yesterday’s talk
-
10
Kalman Pat Recognition tunable parameters
• Set of parameters is tunable from steering file • Also list of seeding strategies configurable • Hard to make a 1-to-1 comparison with the seeding strategies
in SeedTracker
-
11
Number of tracks and extrapolation to ECAL in TriTrig+Beam 2019 MC
0 1 2 3 4 5 6 7 8 9 10tracksN
050001000015000200002500030000350004000045000
Events
InternalHPS
triTrig+beam KF
triTrig+beam GBL
0 1 2 3 4 5 6 7 8 9 10tracksN
0.51.01.52.02.53.03.54.0
Ratio
• Tracks here is the size of the Track container, i.e. the full GBLTracks and KF Tracks => all that pass reconstruction and no track/vtx/event selection is applied
• KF ECAL Extrapolation seems comparable to GBL
-
12
Basic checks on KF / GBL performance in MC 2019
• I started checking KF vs GBL performance in events where full reconstruction is performed: - Both KF and GBL tracks are formed following their own pattern recognition - They are fed to the ReconParticleDriver to form vertices (constrained/unconstrained [I only checked unconstrained so far])
• The data LCIO files can be found: - /nfs/slac/g/hps3/users/pbutti/2019_data_10031/ - /nfs/slac/g/hps3/users/pbutti/2019_tridents_from_LCIO_VtxFix
• The processed hipster ntuples for analysis can be found at the same location: - 2019_data_10031_KFHitOnTracks - 2019_tridents_from_LCIO_VtxFix_hpstr_ntuples
• Only MOUSE cuts are applied to those ntuples.
-
13
Checks on MC - Basic cleaning cuts
• Check over V0 vertices • I require:
- e P < 3.4 GeV - e-/e+ Chi2 < 25 - e-/e+ P > 0.6 GeV - 2D hits e-/e+ >= 8 - e-/e+ NShared < 5 [no effect: MOUSE cuts] - Vtx Chi2 < 20
no-cuts =8
-e Track n2d Hits >=8
+p Track nSh
-
14
Checks on MC - Basic cleaning cuts
• Check over V0 vertices • I require:
- e P < 3.4 GeV - e-/e+ Chi2 < 25 - e-/e+ P > 0.6 GeV - 2D hits e-/e+ >= 8 - e-/e+ NShared < 5 [no effect: MOUSE cuts] - Vtx Chi2 < 20
no-cuts =8
-e Track n2d Hits >=8
+p Track nSh
-
15
Hit Content
6 7 8 9 10 11 12 13 14 152DhitsN
0100020003000400050006000700080009000
Tracks
InternalHPS
triTrig+beam KF
triTrig+beam GBL
6 7 8 9 10 11 12 13 14 152DhitsN
0.60.81.01.21.41.61.82.0
Ratio
6 7 8 9 10 11 12 13 14 152DhitsN
01000200030004000500060007000
Tracks
InternalHPS
triTrig+beam KF
triTrig+beam GBL
6 7 8 9 10 11 12 13 14 152DhitsN
0.60.81.01.21.41.61.82.0
Ratio
0 1 2 3 4 5 6 7hitssharedN
00.10.20.30.40.50.60.70.80.91
Tracks
InternalHPS
triTrig+beam KF
triTrig+beam GBL
0 1 2 3 4 5 6 7hitssharedN
0.60.81.01.21.4
Ratio
0 1 2 3 4 5 6 7hitssharedN
00.10.20.30.40.50.60.70.80.91
Tracks
InternalHPS
triTrig+beam KF
triTrig+beam GBL
0 1 2 3 4 5 6 7hitssharedN
0.60.81.01.21.4
Ratio
e-
e-
e+
e+
https://www.ej-technologies.com/products/jprofiler/overview.html
-
16
Fixed momentum bug - Condition Database update
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 [GeV]-ep
00.010.020.030.040.050.060.070.08
Trac
ks
InternalHPS
triTrig+beam KF
triTrig+beam GBL
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 [GeV]-ep
0.60.81.01.21.4
Rat
io
vtxana_gbl_vtxSelection_ele_p_h
Entries 14954Mean 0.6206Std Dev 0.3758
0 0.5 1 1.5 2 2.5 [GeV]-ep
0
200
400
600
800
1000
Trac
ks
vtxana_gbl_vtxSelection_ele_p_h
Entries 14954Mean 0.6206Std Dev 0.3758
vtxana_kf_vtxSelection_ele_p_h
Entries 15930Mean 0.7823Std Dev 0.347
vtxana_kf_vtxSelection_ele_p_h
Entries 15930Mean 0.7823Std Dev 0.347
Wrong Database Conditions
Correct Database Conditions (+FEE cut) Beam Energy now fixed in database for 2019 MC/Data processing (thanks to Jeremy)
-
17
Electron/Positron momentum spectrum
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 [GeV]-ep
00.010.020.030.040.050.060.070.08
Trac
ks
InternalHPS
triTrig+beam KF
triTrig+beam GBL
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 [GeV]-ep
0.60.81.01.21.4
Rat
io
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 [GeV]+ep
00.010.020.030.040.050.060.070.08
Trac
ks
InternalHPS
triTrig+beam KF
triTrig+beam GBL
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 [GeV]+ep
0.60.81.01.21.4
Rat
io
• Quite good agreement between the electron and positron spectrum, after these cleaning cuts
• I placed a cut on the track efficiency plateau for KF tracks. Lower momenta discrepancy maybe due to different turn on curve in this sample? [to be checked]
• Plots normalised to unity
-
18
e+/e- Psum and Vtx quantities
1 1.5 2 2.5 3 3.5 4 4.5 5 [GeV]+e + p-ep
00.0020.0040.0060.008
0.010.0120.0140.0160.018
0.02
even
ts
InternalHPS
triTrig+beam KF
triTrig+beam GBL
1 1.5 2 2.5 3 3.5 4 4.5 5 [GeV]+e + p-ep
0.51.01.52.02.53.03.54.0
Rat
io
• This is just first glance at MC 2019. I didn’t have much more time to check other quantities in detail..
30− 25− 20− 15− 10− 5− 0 5 10vtx Z pos [mm]
00.020.040.060.08
0.10.120.14
Verti
ces
InternalHPS
hps 10031 KF
hps 10031 GBL
30− 25− 20− 15− 10− 5− 0 5 10vtx Z pos [mm]
0.60.81.01.21.4
Rat
io
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2vtx Mass [GeV]
00.010.020.030.040.050.060.070.08
Verti
ces
InternalHPS
hps 10031 KF
hps 10031 GBL
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2vtx Mass [GeV]
0.60.81.01.21.4
Rat
io
0 5 10 15 20 25 302χvtx
00.010.020.030.040.050.060.070.08
Verti
ces
InternalHPS
hps 10031 KF
hps 10031 GBL
0 5 10 15 20 25 302χvtx
0.60.81.01.21.4
Rat
io
-
19
Kalman Filter and GBL on Data
• When trying to setup KF on Data I encountered first problems.
• (1) 2019 Data is affected by Monster Events which aren’t cleaned yet by an appropriate filter • Each monster event leads to huge
amount of hits in SVT confusing KF Pattern reco
• SeedTracker has a cut on total number of hits per event at 200, which I now use in KF too
• (2) Several events have O(10^2) seed tracks while in average we find only few tracks per event - Added a check on duplicate seeds - Some loss of efficiency (1 track on 5k events) - ~10% faster
• Bottom line: - Data and MC follow a slightly different reconstruction procedure - Pattern reco is not tuned on 2019 data
Courtesy of C.Bravo
-
20
Bonus: Checks on 2019 Data Run 10031
• Checked Reco Time on Data • File tested: /nfs/slac/g/hps_data2/data/
physrun2019/hps_010031/hps_010031.evio.00054 • SeedTracker and
HelixFitting take ~33% • RawHitFitting takes 32% of
processing time, partly due to monster events rate.
• KF up to 15%, GBL Refitting 7%
• Writing data about 5% of the time
• 50 seconds for 400 events from evio->LCIO: 0.125s / event
jProfilerEvaluation version, remotely attached to cent7a, evil to LCIO step
Data processing will be slow with current processing strategy. Something can be
https://www.ej-technologies.com/products/jprofiler/overview.html
-
21
Basic checks on KF/GBL on data
0 1 2 3 4 5 6 7 8 9 10tracksN
024681012141618
610×
Events
InternalHPS
hps 10031 KF
hps 10031 GBL
0 1 2 3 4 5 6 7 8 9 10tracksN
0.51.01.52.02.53.03.54.0
Ratio
no-cuts =8
-e Track n2d Hits >=8
+p Track nSh
-
22
Hit Content in Data 2019 - 10031
6 7 8 9 10 11 12 13 14 152DhitsN
01000020000300004000050000600007000080000
Tracks
InternalHPS
hps 10031 KF
hps 10031 GBL
6 7 8 9 10 11 12 13 14 152DhitsN
0.60.81.01.21.41.61.82.0
Ratio
6 7 8 9 10 11 12 13 14 152DhitsN
010000200003000040000500006000070000
Tracks
InternalHPS
hps 10031 KF
hps 10031 GBL
6 7 8 9 10 11 12 13 14 152DhitsN
0.60.81.01.21.41.61.82.0
Ratio
0 1 2 3 4 5 6 7hitssharedN
00.10.20.30.40.50.60.70.80.91
Tracks
InternalHPS
hps 10031 KF
hps 10031 GBL
0 1 2 3 4 5 6 7hitssharedN
0.60.81.01.21.4
Ratio
0 1 2 3 4 5 6 7hitssharedN
00.10.20.30.40.50.60.70.80.91
Tracks
InternalHPS
hps 10031 KF
hps 10031 GBL
0 1 2 3 4 5 6 7hitssharedN
0.60.81.01.21.4
Ratio
e-
e-
e+
e+
-
23
Transverse impact parameter distribution
10− 8− 6− 4− 2− 0 2 4 6 8 10 [mm]0d
00.010.020.030.040.050.060.070.08
Trac
ks
InternalHPS
hps 10031 KF
hps 10031 GBL
10− 8− 6− 4− 2− 0 2 4 6 8 10 [mm]0d
0.60.81.01.21.4
Rat
io
10− 8− 6− 4− 2− 0 2 4 6 8 10 [mm]0d
00.010.020.030.040.050.060.070.08
Trac
ks
InternalHPS
hps 10031 KF
hps 10031 GBL
10− 8− 6− 4− 2− 0 2 4 6 8 10 [mm]0d
0.60.81.01.21.4
Rat
io
10− 8− 6− 4− 2− 0 2 4 6 8 10 [mm]0d
00.010.020.030.040.050.060.070.08
Trac
ks
InternalHPS
hps 10031 KF
hps 10031 GBL
10− 8− 6− 4− 2− 0 2 4 6 8 10 [mm]0d
0.60.81.01.21.4
Rat
io
10− 8− 6− 4− 2− 0 2 4 6 8 10 [mm]0d
00.010.020.030.040.050.060.070.08
Trac
ks
InternalHPS
hps 10031 KF
hps 10031 GBL
10− 8− 6− 4− 2− 0 2 4 6 8 10 [mm]0d
0.60.81.01.21.4
Rat
io
Added Innermost Hit requirement for e+ track in bottom plots [2D for KF, 3D for GBL]
e-
e-
e+
e+
-
24
Vertex Properties: Preselection + UncVChi2
-
25
Vertex Resolution - UncVChi2 top priority
-
26
Vertex Mean Drift - UncVChi2 top priority
-
27
Hit on Tracks unbiased residuals
0.2− 0.15− 0.1− 0.05− 0 0.05 0.1 0.15 0.2ly 0 res _bot [mm]
00.020.040.060.08
0.10.120.140.160.180.2
Trac
ks
InternalHPS
hps 10031 KF
triTrig+beam KF
0.2− 0.15− 0.1− 0.05− 0 0.05 0.1 0.15 0.2ly 0 res _bot [mm]
12345
Rat
io
0.2− 0.15− 0.1− 0.05− 0 0.05 0.1 0.15 0.2ly 0 res _top [mm]
00.020.040.060.08
0.10.120.140.160.180.2
Trac
ks
InternalHPS
hps 10031 KF
triTrig+beam KF
0.2− 0.15− 0.1− 0.05− 0 0.05 0.1 0.15 0.2ly 0 res _top [mm]
12345
Rat
io
0.2− 0.15− 0.1− 0.05− 0 0.05 0.1 0.15 0.2ly 1 res _top [mm]
00.020.040.060.08
0.10.120.140.160.180.2
Trac
ks
InternalHPS
hps 10031 KF
triTrig+beam KF
0.2− 0.15− 0.1− 0.05− 0 0.05 0.1 0.15 0.2ly 1 res _top [mm]
12345
Rat
io
0.2− 0.15− 0.1− 0.05− 0 0.05 0.1 0.15 0.2ly 3 res _top [mm]
00.020.040.060.08
0.10.120.140.160.180.2
Trac
ks
InternalHPS
hps 10031 KF
triTrig+beam KF
0.2− 0.15− 0.1− 0.05− 0 0.05 0.1 0.15 0.2ly 3 res _top [mm]
12345
Rat
io
Unbiased residuals from Inverse Kalman Filter. To be x-checked with GBL biased/unbiased residuals. Detector V2, no SVT survey
-
28
Summary
• Integrated Robert’s KF into hps-java reconstruction pipeline • Seems to perform very well on MC, both with and without beam,
however on data 2019 seems like is sub-optimal wrt GBL tracks (from this fast check).
• Work is probably still needed before we can bring this in for analysis, unfortunately
• 2019 Data vertexing performance are ~3x worse (in terms of resolution) wrt expected from MC simulation
• A shift of the mean of Vtx_z position is observed in 2019 data, similar to what was observed in 2016
• With the new siPixel clusters available, alignment is top priority. • Unbiased residuals from KF (still to be investigated) show large degree
of misalignment and bimodal distributions.
-
29
BACKUP
-
30
Open point for discussion - in random order
• (1) Proper solution for Monster Events - DATA - We need to fix the SVT Event Filter to remove/skip un-physical events. - The current Driver is tuned on 2015 - 2016 studies and need to be fixed for 2019. Current workaround limit of max 200 Clusters/event is arbitrary.
• (2) MCParticle container in the LCIO is huge (found about 3k MC Particles per event in the tri-trig + beam) - Need to apply cuts before they arrive in final LCIO files
• (3) Tracking Processing time - Current tracking strategy probably not sustainable in 2019 as takes too much processing time - KF pattern reco can be an alternative, once validated and when everyone’s happy
• (4) Raw Hit Fitting Time - DATA (and MC?) - RawSVTHitFittingTime takes 30% of evio->LCIO step in 2019 Data. Can be partially fixed by (1). - Alternatively a 2 step process? - First we perform a EVIO->FHO [FittedHitsOnly] - Hand the FHO for Reconstruction/Alignment/Analysis to people. This will cuts 30% of processing time when we’ll need to process all the data.
• (5) BeamSpot determination from Data - BeamSpot info as free parameter are dangerous if BS moves [2016 vex had to recompute it at analysis level]
• (6) Start an event skimming campaign - A non-negligible amount of events do not even have tracks in them leading to slow processing. - Trigger-wise or basic skimming should be done to ensure we don’t spend too much time running on useless data. Better earlier than later.
• (7) Keep track of processing commands - Data we process is often private made with private steering files. We should keep track of what we did in the case of a larger official production.
-
31
BACKUP
• (4) Raw Hit Fitting Time - RawSVTHitFittingTime takes 30% of evio->LCIO step in 2019 Data. Can be partially fixed by (1). - A possible compromise while we develop a faster fitting machinery is to reconstruct data in 2 steps: - First we perform a EVIO->FHO on the files we want/need [FittedHitsOnly LCIO files] and could start basically today. - Use the FHO for Reconstruction/Alignment/Analysis. This will cuts 30% of processing time when we’ll need to process all the data. - If eventually we get to change fitting we can restart the chain - Not directly LCIO as quite slow at the moment and LCIO ntuples content might will change soon.
• (5) BeamSpot determination from Data - BeamSpot info as free parameter are dangerous if BS moves [2016 vex had to recompute it at analysis level] - Propose to do a double processing: x-process and f-process - x-process to compute BS information (position/sigma) and store in DB, then f-process for proper correct event-by-event BS/Target constraint.
-
32
jProfiler on tri-trig without beam bkg
-
33
jProfiler on tri-trig without beam bkg
-
34
jProfiler on tri-trig with beam bkg
-
35
jProfiler on tri-trig with beam bkg - rmsTimeCut = 20
-
36
hps-java master issues when running on data
• Monster Events: - Order of ~% of the events have a huge amount of hits confusing the Track Finding stage
• These event are impossible to process (some lead to more than 10^3-10^4 trackCandidates)
• Current solution - Added protection in TrackerHitDriver for SiClusters > 200 [temporary] - Added configurable protection on size of SiClusters in KalmanPatDriver (Same solution of the SeedTracker)
-
37
Resonance Search Statistics Support
-
38
Processing time - Tri-Trig ***without Beam***
• A summary breakdown of the CPU time spent in MC processing is shown
• File tested: /nfs/slac/g/hps3/mc/mc_2019/readout/tritrig/singles/4pt5/tritrig_123.slcio
• With the current strategies, tracking takes: - ~22% in seeding and global fitting stage - ~22% in GBL Refitting stage
• Kalman track finding and fitting takes ~12% of the event time
• Some non-negligible amount of time is spent in the HpsReconParticleDriver (8%) and RawHit Fitting (6%)
jProfilerEvaluation version, remotely attached to cent7a, readout to LCIO step
Total Tracking time ~40% in tri-trig signal without beam background See Backup for a more detailed dump
https://www.ej-technologies.com/products/jprofiler/overview.html
-
39
Processing time - Tri-Trig ***with Beam*** KF Only
• Tested Kalman only reconstruction
• Kalman track finding and fitting takes ~30% of the event time in this conditions
• Writing LCIO output takes ~40%
• Something can be recovered from SvtRawHitFitting and HPSReconDrivers
• Only ideal => GBL refitter should run on KF Tracks.
• Total time: 1m40s for ~860 events on cent7a => 0.11s/event jProfiler
Evaluation version, remotely attached to cent7a, readout to LCIO step
Writing output data is slower than KF tracking, second slowest. Hit Fitting is a considerable time. Vtxing ~5%
https://www.ej-technologies.com/products/jprofiler/overview.html
-
40
Re-reco from LCIO steering files
• Some time can be saved if running from pre-reconstructed LCIO files, cleaning up proper containers
• I’ve made a steering file to run on MC from pre-reconstructed LCIO files: iss687_dev => PhysicsRun2019MCRecon_LCIO.lcsim
• Save 12% processing time from RawFitting
• If ran with KalmanOnly: ~0.09s / evt
https://github.com/JeffersonLab/hps-java/blob/iss687_dev/steering-files/src/main/resources/org/hps/steering/recon/PhysicsRun2019MCRecon_LCIO.lcsimhttps://github.com/JeffersonLab/hps-java/blob/iss687_dev/steering-files/src/main/resources/org/hps/steering/recon/PhysicsRun2019MCRecon_LCIO.lcsimhttps://github.com/JeffersonLab/hps-java/blob/iss687_dev/steering-files/src/main/resources/org/hps/steering/recon/PhysicsRun2019MCRecon_LCIO.lcsim
-
41
Some fast checks of tri-trig+beam MC 2019
• Cuts: - ElectronP < 4.5 GeV - Ele/Pos Chi2 < 25 - Ele/Pos n2DHits>=7 [by mistake, should have been >] - Ele/Pos nSharedHits
-
42
Some fast checks of tri-trig+beam MC 2019
vtxana_kf_vtxSelection_ele_chi2_h
Entries 15930Mean 7.761Std Dev 6.164
0 5 10 15 20 25 302χtrack
0
100
200
300
400
500
600
700
800
900
1000
Trac
ks
vtxana_kf_vtxSelection_ele_chi2_h
Entries 15930Mean 7.761Std Dev 6.164
vtxana_kf_vtxSelection_pos_chi2_h
Entries 15930Mean 8.852Std Dev 6.16
vtxana_kf_vtxSelection_pos_chi2_h
Entries 15930Mean 8.852Std Dev 6.16
vtxana_gbl_vtxSelection_ele_chi2_h
Entries 14954Mean 6.58Std Dev 6.209
vtxana_gbl_vtxSelection_ele_chi2_h
Entries 14954Mean 6.58Std Dev 6.209
vtxana_gbl_vtxSelection_pos_chi2_h
Entries 14954Mean 8.324Std Dev 6.01
vtxana_gbl_vtxSelection_pos_chi2_h
Entries 14954Mean 8.324Std Dev 6.01
vtxana_kf_vtxSelection_ele_chi2_h
vtxana_kf_vtxSelection_pos_chi2_h
vtxana_gbl_vtxSelection_ele_chi2_h
vtxana_gbl_vtxSelection_pos_chi2_h
vtxana_gbl_vtxSelection_pos_nHits_2d_h
Entries 14954Mean 10.1Std Dev 1.675
0 2 4 6 8 10 12 142DhitsN
0
2000
4000
6000
8000
10000
12000
Trac
ks
vtxana_gbl_vtxSelection_pos_nHits_2d_h
Entries 14954Mean 10.1Std Dev 1.675
vtxana_gbl_vtxSelection_pos_nHits_2d_h
vtxana_gbl_vtxSelection_ele_nHits_2d_h
Entries 14954Mean 8.941Std Dev 1.385
vtxana_gbl_vtxSelection_ele_nHits_2d_h
Entries 14954Mean 8.941Std Dev 1.385
vtxana_kf_vtxSelection_ele_nHits_2d_h
Entries 15930Mean 9.568Std Dev 1.551
vtxana_kf_vtxSelection_ele_nHits_2d_h
Entries 15930Mean 9.568Std Dev 1.551
vtxana_kf_vtxSelection_pos_nHits_2d_h
Entries 15930Mean 10.38Std Dev 1.717
vtxana_kf_vtxSelection_pos_nHits_2d_h
Entries 15930Mean 10.38Std Dev 1.717
vtxana_gbl_vtxSelection_pos_nHits_2d_h
vtxana_gbl_vtxSelection_ele_nHits_2d_h
vtxana_kf_vtxSelection_ele_nHits_2d_h
vtxana_kf_vtxSelection_pos_nHits_2d_h
Should have removed those
In red GBL Ele/Pos In blue KF Ele/Pos
In red GBL Ele/Pos In blue KF Ele/Pos
-
43
Some fast checks of tri-trig+beam MC 2019
vtxana_gbl_vtxSelection_vtx_InvM_h
Entries 14954
Mean 0.07256
Std Dev 0.03082
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2vtx Mass [GeV]
0
100
200
300
400
500
600
700
800
900
1000
Verti
ces
vtxana_gbl_vtxSelection_vtx_InvM_h
Entries 14954
Mean 0.07256
Std Dev 0.03082
vtxana_gbl_vtxSelection_vtx_InvM_h
vtxana_kf_vtxSelection_vtx_InvM_h
Entries 15930
Mean 0.07097
Std Dev 0.03045
vtxana_kf_vtxSelection_vtx_InvM_h
Entries 15930
Mean 0.07097
Std Dev 0.03045
VTX SeedTracker+GBL Tracks
VTX KF Tracks
vtxana_kf_vtxSelection_vtx_Z_svt_h
Entries 15930
Mean 7.213−
Std Dev 2.567
30− 20− 10− 0 10 20 30vtx Z pos [mm]
500
1000
1500
2000
2500
Verti
ces
vtxana_kf_vtxSelection_vtx_Z_svt_h
Entries 15930
Mean 7.213−
Std Dev 2.567
vtxana_gbl_vtxSelection_vtx_Z_svt_h
Entries 14954
Mean 6.714−
Std Dev 6.99
vtxana_gbl_vtxSelection_vtx_Z_svt_h
Entries 14954
Mean 6.714−
Std Dev 6.99
VTX KF Tracks
VTX SeedTracker+GBL Tracks
KFKF
ST+GBL
ST+GBL
-
44
Reconstruction configuration
• The tri-trig readout sample has been generated with: - Top Ly7 (old ly6) off - Axial Bottom Ly5 (old ly4) off
• Quite standard job configuration for Hit formation
• Track Finding uses few strategies: only one succeeds for bottom tracks
• To the nominal reco has been added also KF track finding and fitting interfaced with recon drivers
• TrackTruthMatching is provided for offline studies. - Tracks are matched to MCParticles which are used to form TruthTracks for performance checks.
h_topEntries 17328Mean 5.355Std Dev 3.217
0 2 4 6 8 10 12 140
200
400
600
800
1000
1200
1400
1600
1800
2000
2200 h_topEntries 17328Mean 5.355Std Dev 3.217
h_top
h_botEntries 18997Mean 5.273Std Dev 3.667
h_botEntries 18997Mean 5.273Std Dev 3.667
HPS Internal
h_toph_bot
only one that succeeds for bottom
For KF tracks, Vtxing finalStateParticles
For truth links in LCIO outfile
Nominal Helix+GBL
HitsOnTrack for KF Tracks
https://github.com/JeffersonLab/hps-java/blob/master/analysis/src/main/java/org/hps/analysis/MC/TrackTruthMatching.java
-
45
Reconstruction configuration - ReconParticleDriver
• Vertices are formed with both Helix+GBL and KF Tracks
• Vertices formed with KF Tracks have “_KF” in CollectionName
• Vertices are formed without requiring cluster/track matching
• Still working to check track-cluster matching in 2019 • Nominal settings for BS position (0,0,-7.5)
Size was taken from SVT wire scan to resemble data (simulation was done with sigma_x(y) = 0 mm)
• TrackClusterTimeOffset from checking ClusterTime distribution
• Tracks time distribution needs to be cross checked as double peak wasn’t expected
From MC sim configuration
Reco Ecal ClustersEntries 3428Mean 30.19Std Dev 12.95
60− 40− 20− 0 20 40 60time [ns]
100
200
300
400
500
600
700
800
900
1000 Reco Ecal ClustersEntries 3428Mean 30.19Std Dev 12.95
htime
KF TracksEntries 3837Mean 5.479− Std Dev 23.71
KF TracksEntries 3837Mean 5.479− Std Dev 23.71
GBL TracksEntries 4080Mean 7.707− Std Dev 21.29
GBL TracksEntries 4080Mean 7.707− Std Dev 21.29
Reco Ecal Clusters
KF Tracks
GBL Tracks
https://confluence.slac.stanford.edu/display/hpsg/2019+MC+Data
-
46
Ele / Pos momenta: “Tight: UnCVChi2