CMSTrackingPOG / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
0 stars 1 forks source link

Possible bug after refitting of shortened tracks leading to disappearing hits #2

Open borzari opened 1 year ago

borzari commented 1 year ago

An inconsistency on the number of hits/layers with measurement after refitting was observed during the studies of the track shortening procedure to access the tracking pT resolution with shortened tracks. It might be associated to the fitter, but it needs to be investigated. The summary of the bug is written in bold text below and the rest is auxiliary information.

The track shortening procedure consists of filtering events with "good muons", creating a collection of good muon tracks, shortening those tracks by creating new track candidates with only a few hits of the long track (corresponding to the number of layers of measurement set by the user) and refitting the new track candidates with the KFFittingSmootherWithOutliersRejectionAndRK fitter.

*The procedure is performed to obtain short tracks with 3 to 8 layers of measurement in the end. For a few of the events (2 in 15292; checking a RelVal MC sample), some of the hits of the short track seem to disappear when comparing the layers/substructure of the short and long tracks. The example shown here is for one event where the short tracks with 3 to 7 layers with measurement are created correctly, but the short track with 8 layers with measurement has the hit associated to the 4th layer missing, even though it is added to the track candidate used to create the short track. This can be seen at the lines with in the print out and the size of ownHits (explained below).**

To reproduce the bug, this repository can be used. Clone the repository, checkout to branch cmssw_13_1_0_bugsCheck and follow the information in the README.

The information below is ordered as:

isFirstValidHitInLayerAux = 1 -- thisSubStruct = 1 -- thisLayer = 1 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 1
isFirstValidHitInLayerAux = 1 -- thisSubStruct = 1 -- thisLayer = 2 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 2
isFirstValidHitInLayerAux = 1 -- thisSubStruct = 1 -- thisLayer = 3 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 3
isFirstValidHitInLayerAux = 1 -- thisSubStruct = 1 -- thisLayer = 4 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 4
isFirstValidHitInLayerAux = 1 -- thisSubStruct = 3 -- thisLayer = 1 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 5
isFirstValidHitInLayerAux = 0 -- thisSubStruct = 3 -- thisLayer = 1 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 6
isFirstValidHitInLayerAux = 1 -- thisSubStruct = 3 -- thisLayer = 2 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 7
isFirstValidHitInLayerAux = 0 -- thisSubStruct = 3 -- thisLayer = 2 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 8
isFirstValidHitInLayerAux = 1 -- thisSubStruct = 3 -- thisLayer = 3 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 9
isFirstValidHitInLayerAux = 1 -- thisSubStruct = 4 -- thisLayer = 1 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
ownHits.size(): 10
isFirstValidHitInLayerAux = 1 -- thisSubStruct = 5 -- thisLayer = 1 -- isNotValidVec[int(isNotValidVec.size()) - 2] = 0 -- isNotValidVec[int(isNotValidVec.size()) - 1] = 0
run: 1 lumi: 174 event: 17393
Tracker layers of short track: 7
Number of layers remaining: 8
pT resolution: 1.00315
pT of short track: 25.5926
eta of short track: 1.21391
phi of short track: 3.12039
chi2/ndof: 0.770975
Short track: 1 0 0 0 0 0 -- 1 *
Short track: 2 0 0 0 0 0 -- 2 *
Short track: 3 0 0 0 0 0 -- 3 *
Short track: 3 0 1 0 0 0 -- 4 *
Short track: 3 0 1 0 0 0 -- 4
Short track: 3 0 2 0 0 0 -- 5
Short track: 3 0 2 0 0 0 -- 5
Short track: 3 0 3 0 0 0 -- 6
Short track: 3 0 3 1 0 0 -- 7
Track: 1 0 0 0 0 0 -- 1 *
Track: 2 0 0 0 0 0 -- 2 *
Track: 3 0 0 0 0 0 -- 3 *
Track: 4 0 0 0 0 0 -- 4 *
Track: 4 0 1 0 0 0 -- 5 *
Track: 4 0 1 0 0 0 -- 5
Track: 4 0 2 0 0 0 -- 6
Track: 4 0 2 0 0 0 -- 6
Track: 4 0 3 0 0 0 -- 7
Track: 4 0 3 1 0 0 -- 8
Track: 4 0 3 1 1 0 -- 9
Track: 4 0 3 1 1 0 -- 9
Track: 4 0 3 1 2 0 -- 10
Track: 4 0 3 1 2 0 -- 10
Track: 4 0 3 1 2 1 -- 11
Track: 4 0 3 1 2 2 -- 12
Track: 4 0 3 1 2 3 -- 13
===================================
slava77 commented 1 year ago

there is quite a bit of text here, including the printout. It may be useful to highlight where the actual problem is.

borzari commented 1 year ago

there is quite a bit of text here, including the printout. It may be useful to highlight where the actual problem is.

I tried adding some highlights there, but don't think it would be good to remove text. Some information about the track shortening procedure itself might be useful