Skip to content
Snippets Groups Projects

Adding varying chi2 flag and using chi2 for new eta regions

Files
2
@@ -525,7 +525,26 @@ def FPGATrackSimLogicalHitsProcessAlgCfg(inputFlags):
return result
def getChi2Cut(region):
#list of chi2 cuts for time being. Last four are stand ins since those new regions don't work for now!
chi2cut_l = [12, 16, 60, 16, 60, 60, 14, 20, 16, 19, 19, 15, 18, 12, 15, 15, 20, 20, 20, 20]
binSize = 0.2
side = (region >> 5) & 0x1
etaBin = (region >> 6) & 0x1F
etaRange = [round(binSize * etaBin, 1), round(binSize * (etaBin + 1), 1)] if side else [round(-binSize * (etaBin + 1), 1), round(-binSize * etaBin, 1)]
abs_etaRange = tuple(abs(val) for val in etaRange)
eta_to_chi2 = {
(0.0, 0.2): chi2cut_l[0], (0.2, 0.4): chi2cut_l[1], (0.4, 0.6): chi2cut_l[2],
(0.6, 0.8): chi2cut_l[3], (0.8, 1.0): chi2cut_l[4], (1.0, 1.2): chi2cut_l[5],
(1.2, 1.4): chi2cut_l[6], (1.4, 1.6): chi2cut_l[7], (1.6, 1.8): chi2cut_l[8],
(1.8, 2.0): chi2cut_l[9], (2.0, 2.2): chi2cut_l[10], (2.2, 2.4): chi2cut_l[11],
(2.4, 2.6): chi2cut_l[12], (2.6, 2.8): chi2cut_l[13], (2.8, 3.0): chi2cut_l[14],
(3.0, 3.2): chi2cut_l[15], (3.2, 3.4): chi2cut_l[16], (3.4, 3.6): chi2cut_l[17],
(3.6, 3.8): chi2cut_l[18], (3.8, 4.0): chi2cut_l[19]
}
return eta_to_chi2.get(abs_etaRange, 9) #Set default chi2 if the region is not found
if __name__ == "__main__":
@@ -556,6 +575,9 @@ if __name__ == "__main__":
# flags.Exec.DebugStage="exec" # useful option to debug the execution of the job - we want it commented out for production
flags.fillFromArgs()
if flags.Trigger.FPGATrackSim.Hough.useVaryingChi2Cut:
flags.Trigger.FPGATrackSim.Hough.chi2cut = getChi2Cut(flags.Trigger.FPGATrackSim.region)
assert not flags.Trigger.FPGATrackSim.pipeline.startswith('F-5'),"ERROR You are trying to run an F-5* pipeline! This is not yet supported!"
Loading