|
| 1 | +import numpy as np |
| 2 | +from identification_isolation.isolation_parameters import IsolationParameters |
| 3 | +from identification_isolation.egamma_isolation import double_slope_relaxation_vs_pt |
| 4 | + |
| 5 | +from root_numpy import array2hist |
| 6 | +from rootpy.plotting import Hist |
| 7 | + |
| 8 | + |
| 9 | +parameters = IsolationParameters() |
| 10 | +## General |
| 11 | +parameters.name = 'isolation_egamma' |
| 12 | +parameters.version = 'automatic' |
| 13 | +parameters.signal_file = '/data_CMS/cms/sauvan/L1/2016/V3_new/IsolationValidation/2016C/ZElectron//v_5_2016-07-29/tagAndProbe_isolationValidation_2016C_ZElectron.root' |
| 14 | +parameters.signal_tree = 'ntTagAndProbe_IsolationValidation_Stage2_Rebuilt_tree' |
| 15 | +parameters.background_file = '/data_CMS/cms/sauvan/L1/2016/V3_inconsistent/IsolationNtuples/ZeroBias_2016C_1e34/v_3_2016-07-29/zeroBias_IsolationNtuple.root' |
| 16 | +parameters.background_tree = 'ntZeroBias_IsolationNtuple_tree' |
| 17 | +parameters.working_directory = '/home/llr/cms/sauvan/DATA/TMP/testbatch' |
| 18 | +## Variable names |
| 19 | +parameters.variables.ieta = 'abs(ieta)' |
| 20 | +parameters.variables.et = 'et_raw' |
| 21 | +parameters.variables.ntt = 'ntt' |
| 22 | +parameters.variables.rho = 'rho' |
| 23 | +parameters.variables.iso = 'iso' |
| 24 | +## Steps |
| 25 | +parameters.steps.train_workingpoints = True |
| 26 | +parameters.steps.fit_ntt_vs_rho = True |
| 27 | +parameters.steps.test_workingpoints = True |
| 28 | +parameters.steps.do_compression = True |
| 29 | +## eta-pt efficiency shape |
| 30 | +parameters.eta_pt_optimization.eta_optimization = 'none' |
| 31 | +efficiencies_low_array = np.array([0.80,0.80,0.80,0.80,0.80,0.75,0.80, 0.85]) |
| 32 | +efficiencies_high_array = np.array([0.92,0.95,0.95,0.95,0.95,0.95,0.95, 0.95]) |
| 33 | +eta_binning = [0.5, 3.5, 6.5, 9.5, 13.5, 18.5, 22.5, 25.5, 28.5] |
| 34 | +efficiencies_low = Hist(eta_binning) |
| 35 | +efficiencies_high = Hist(eta_binning) |
| 36 | +array2hist(efficiencies_low_array, efficiencies_low) |
| 37 | +array2hist(efficiencies_high_array, efficiencies_high) |
| 38 | +parameters.eta_pt_optimization.eta_pt_efficiency_shapes = \ |
| 39 | + double_slope_relaxation_vs_pt(efficiencies_low,\ |
| 40 | + efficiencies_high,\ |
| 41 | + threshold_low=56.,\ |
| 42 | + threshold_high=80.,\ |
| 43 | + eff_min=0.5,\ |
| 44 | + max_et=120.) |
| 45 | +## LUT Compression |
| 46 | +parameters.compression.eta = [0,5,6,9,10,12,13,14,17,18,19,20,23,24,25,26,32] |
| 47 | +parameters.compression.et = [0,18,20,22,28,32,37,42,52,63,73,81,87,91,111,151,256] |
| 48 | +parameters.compression.ntt = [0,6,11,16,21,26,31,36,41,46,51,56,61,66,71,76,81,86,91,96,101,106,111,116,121,126,131,136,141,146,151,156,256] |
0 commit comments