cms-L1TK / cmssw

Fork of CMSSW where improvements to L1 tracking code are developed.
http://cms-sw.github.io/
Apache License 2.0
4 stars 5 forks source link

Addressing Issue#210 #219

Closed Jingyan95 closed 1 year ago

Jingyan95 commented 1 year ago

PR description:

This PR addresses issue #210 reported by Chris.

tomalin commented 1 year ago

What is the motivation for adding the chi2/dof to the TTree, given that L1TrackNtuplePlot.cc could calculate the dof from the existing info in the TTree?

Jingyan95 commented 1 year ago

What is the motivation for adding the chi2/dof to the TTree, given that L1TrackNtuplePlot.cc could calculate the dof from the existing info in the TTree?

As far as I can tell, the plotter does not possess information about 4 vs 5 parameter fit. So it makes more sense to me to get the this calculation done when this information is available (when running the tuple-maker)

tomalin commented 1 year ago

What is the motivation for adding the chi2/dof to the TTree, given that L1TrackNtuplePlot.cc could calculate the dof from the existing info in the TTree?

As far as I can tell, the plotter does not possess information about 4 vs 5 parameter fit. So it makes more sense to me to get the this calculation done when this information is available (when running the tuple-maker)

OK

Jingyan95 commented 1 year ago

This all looks fine to me. There's a couple of things I am worried about, is Bend chi2 per d.o.f as well? If so can we rename it here to be _dof in keeping with the other chi2. Also the output format for the track word is _dof but the format given here https://twiki.cern.ch/twiki/bin/viewauth/CMS/HybridDataFormat is not labelled like this (also the binning in that twiki is outdated)

I think bendchi2 is per dof. I am not sure about tracker word and the twiki though, maybe @tomalin can comment.

tomalin commented 1 year ago

https://twiki.cern.ch/twiki/bin/viewauth/CMS/HybridDataFormat

The latex document that https://twiki.cern.ch/twiki/bin/viewauth/CMS/HybridDataFormat#Final_output_to_L1_trigger refers to says that all chi2 variables output by L1 track are normalized to dof.

Chriisbrown commented 1 year ago

https://twiki.cern.ch/twiki/bin/viewauth/CMS/HybridDataFormat

The latex document that https://twiki.cern.ch/twiki/bin/viewauth/CMS/HybridDataFormat#Final_output_to_L1_trigger refers to says that all chi2 variables output by L1 track are normalized to dof.

Can the twiki be updated to match this latex document, also for the binning of the chi2, in line with the track word dataformat: https://github.com/cms-L1TK/cmssw/blob/L1TK-dev-12_6_0_pre5/DataFormats/L1TrackTrigger/interface/TTTrack_TrackWord.h . I also notice that the labelling is inconsistent in that track word data format, sometimes chi2 sometimes chi2/dof

skinnari commented 1 year ago

I will merge and close this PR. Have taken note of Chris' request about updating twiki.