From f1230f65094909e25e46841b9ab95eb94e9af6f8 Mon Sep 17 00:00:00 2001 From: Zhenbin Wu Date: Mon, 11 Jul 2016 05:46:41 -0500 Subject: [PATCH 1/3] Add the latest L1Menu of July11th --- macros/menu/Lumi1E34.txt | 115 +++++++------- macros/menu/Lumi1p15E34.txt | 102 +++++++------ macros/menu/Lumi1p3E34.txt | 95 ++++++------ macros/menu/Lumi1p45E34.txt | 294 ++++++++++++++++++++++++++++++++++++ macros/menu/Lumi1p6E34.txt | 294 ++++++++++++++++++++++++++++++++++++ 5 files changed, 748 insertions(+), 152 deletions(-) create mode 100644 macros/menu/Lumi1p45E34.txt create mode 100644 macros/menu/Lumi1p6E34.txt diff --git a/macros/menu/Lumi1E34.txt b/macros/menu/Lumi1E34.txt index e4a7790..c11edda 100644 --- a/macros/menu/Lumi1E34.txt +++ b/macros/menu/Lumi1E34.txt @@ -1,4 +1,4 @@ -## Start with 100kHz for 1.2e34 +# Start with 100kHz for 1.2e34 ## Assume 20kHz for ETM, and ETM with HF rates ## Assume 1kHz for Zero bias (originally 10kHz) ## Assume bptx trigger rates are PU independant, get them from WBM @@ -21,33 +21,33 @@ #------------------------------ Config ------------------------------# #============================================================================# ## Run 259721: PU=22, nB=517, Lumi=1.5E33, Tau option 5 -## Using this run to tune 1.15E34 menu column, PU=30 -## Scale = 517 * 1E34/1.5E33 = 3446.67 +## Using this run to tune 7E33 menu column, PU=18.2 +## Scale = 517 * 7E33/1.5E33 = 2412.7 ## ZB 1.7kHZ if possbile, minimum 1kHz -# % nBunches = 3446.67 +# % nBunches = 2757.33 #============================================================================# #------------------------------- Menu -------------------------------# #============================================================================# # L1Seed Bit Prescale POG PAG -# L1_ZeroBias 0 20011 Tech +# L1_ZeroBias 0 15013 Tech ### SingleMu 1-30 -L1_SingleMuOpen 2 20000 Mu -L1_SingleMu3 3 10000 Mu HIGGS,EXO,SUSY -L1_SingleMu5 4 300 Mu HIGGS,EXO,SUSY -L1_SingleMu7 5 250 Mu HIGGS,EXO,BPH,SUSY +L1_SingleMuOpen 2 16000 Mu +L1_SingleMu3 3 8500 Mu HIGGS,EXO,SUSY +L1_SingleMu5 4 0 Mu HIGGS,EXO,SUSY +L1_SingleMu7 5 100 Mu HIGGS,EXO,BPH,SUSY L1_SingleMu12 6 0 Mu HIGGS,SUSY L1_SingleMu14 7 0 Mu L1_SingleMu16 8 0 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G -L1_SingleMu18 9 100 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G +L1_SingleMu18 9 1 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G L1_SingleMu20 10 1 Mu HIGGS,EXO L1_SingleMu22 11 1 Mu L1_SingleMu25 12 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G L1_SingleMu30 13 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G -L1_SingleMu10_LowQ 21 250 Mu # 450 Andrea, 200 Ben +L1_SingleMu10_LowQ 21 200 Mu # 300 Andrea, 125 Ben ### SingleMuer 31 - 60 L1_SingleMu14er 31 0 Mu HIGGS,EXO,SMP,SUSY,B2G -L1_SingleMu16er 32 100 Mu HIGGS,EXO,SMP +L1_SingleMu16er 32 1 Mu HIGGS,EXO,SMP L1_SingleMu18er 33 1 Mu L1_SingleMu20er 34 1 Mu HIGGS,EXO L1_SingleMu22er 35 1 Mu @@ -56,7 +56,7 @@ L1_SingleMu30er 37 1 Mu ### DoubleMu 61-80 L1_DoubleMuOpen 60 0 Mu BPH -L1_DoubleMu0 61 300 Mu BPH +L1_DoubleMu0 61 250 Mu BPH L1_DoubleMu_10_Open 62 0 Mu L1_DoubleMu_10_3p5 63 0 Mu TOP,HIGGS,EXO,SMP,SUSY,B2G L1_DoubleMu_11_4 64 1 Mu @@ -64,23 +64,24 @@ L1_DoubleMu_12_5 65 1 Mu TOP,HIGGS,EXO,SMP,SUSY, L1_DoubleMu_13_6 66 1 Mu L1_DoubleMu_15_5 67 1 Mu L1_DoubleMu_12_8 68 1 Mu -L1_DoubleMu0er1p6_dEta_Max1p8 69 100 Mu BPH -L1_DoubleMu0er1p6_dEta_Max1p8_OS 70 1 Mu BPH # 0 charge for OMTF, cause higher rate -L1_DoubleMu0er1p25_dEta_Max1p8_OS 71 1 Mu BPH # 0 charge for OMTF, cause higher rate -L1_DoubleMu_10_0_dEta_Max1p8 72 0 Mu BPH #1kHz pure rate, might go back if we have more rate +L1_DoubleMu0er1p6_dEta_Max1p8 69 70 Mu BPH +L1_DoubleMu0er1p6_dEta_Max1p8_OS 70 1 Mu BPH +L1_DoubleMu0er1p4_dEta_Max1p8_OS 71 1 Mu BPH # 0 charge for OMTF, cause higher rate +L1_DoubleMu_10_0_dEta_Max1p8 72 1 Mu BPH #1kHz pure rate, might go back if we have more rate ### TripleMu 81-90 L1_TripleMu0 81 1 Mu HIGGS,BPH L1_TripleMu_5_5_3 82 1 Mu HIGGS +L1_TripleMu_5_0_0 83 1 Mu HIGGS ### QuadMu 91-100 L1_QuadMu0 91 1 Mu BPH ### SingleEG 101-120 -L1_SingleEG5 101 50000 EG -L1_SingleEG10 102 8000 EG # 10000 Andrea, 8000 SUSY -L1_SingleEG15 103 1000 EG -L1_SingleEG18 104 3000 EG # 6400 Andrea, 3000 SUSY -L1_SingleEG24 105 2000 EG -L1_SingleEG26 106 300 EG +L1_SingleEG5 101 43000 EG +L1_SingleEG10 102 6800 EG # 7000 Andrea 5600 SUSY +L1_SingleEG15 103 900 EG +L1_SingleEG18 104 2500 EG # 4500 Andrea, 2000 SUSY +L1_SingleEG24 105 1500 EG +L1_SingleEG26 106 210 EG L1_SingleEG28 107 0 EG L1_SingleEG30 108 1 EG L1_SingleEG32 109 1 EG @@ -93,7 +94,7 @@ L1_SingleIsoEG18 121 0 EG L1_SingleIsoEG20 122 0 EG L1_SingleIsoEG22 123 0 EG L1_SingleIsoEG24 124 0 EG #Stage1 EG20, Eff29 -L1_SingleIsoEG26 125 0 EG +L1_SingleIsoEG26 125 1 EG L1_SingleIsoEG28 126 1 EG L1_SingleIsoEG30 127 1 EG L1_SingleIsoEG32 128 1 EG @@ -104,14 +105,14 @@ L1_SingleIsoEG16er 140 0 EG L1_SingleIsoEG18er 141 0 EG #Stage1 EG15, Eff25 L1_SingleIsoEG20er 142 0 EG L1_SingleIsoEG22er 143 0 EG HIGGS -L1_SingleIsoEG24er 144 0 EG +L1_SingleIsoEG24er 144 1 EG L1_SingleIsoEG26er 145 1 EG L1_SingleIsoEG28er 146 1 EG L1_SingleIsoEG30er 147 1 EG L1_SingleIsoEG32er 148 1 EG L1_SingleIsoEG34er 149 1 EG TOP,HIGGS,EXO,SMP,SUSY,B2G #Stage1 EG30, Eff39 ### DoubleEG 161 - 180 -L1_DoubleEG_15_10 161 0 EG #8kHz pure rate +L1_DoubleEG_15_10 161 0 EG #7kHz pure rate L1_DoubleEG_18_17 162 1 EG TOP,HIGGS,EXO,SMP,SUSY,B2G #map to Stage1 L1_DoubleEG_15_10 L1_DoubleEG_20_18 163 1 EG L1_DoubleEG_22_10 165 1 EG @@ -119,20 +120,21 @@ L1_DoubleEG_23_10 166 1 EG L1_DoubleEG_24_17 167 1 EG #map to Stage1 L1_DoubleEG_22_10 L1_DoubleEG_22_12 168 1 EG # from Simone's menu,800Hz pure rate L1_DoubleEG_22_15 169 1 EG # created by ZW +L1_DoubleEG_25_12 170 1 EG ### TripleEG 181-190 -L1_TripleEG_14_10_8 181 1 EG HIGGS +L1_TripleEG_14_10_8 181 1 EG HIGGS L1_TripleEG_18_17_8 182 1 EG HIGGS #map to Stage1 L1_TripleEG_15_10_8 ### QuadEG 191-200 ### SingleJet 201-220 -L1_SingleJet16 201 0 Jet +L1_SingleJet16 201 0 Jet L1_SingleJet20 202 0 Jet -L1_SingleJet35 203 3000 Jet -L1_SingleJet60 204 1000 Jet EXO,SMP # Prescale 840 from CMSHLT-725 -L1_SingleJet90 205 1200 Jet SMP -L1_SingleJet120 206 100 Jet EXO,SMP,SUSY,B2G +L1_SingleJet35 203 2200 Jet +L1_SingleJet60 204 700 Jet EXO,SMP # Prescale 840 from CMSHLT-725 +L1_SingleJet90 205 850 Jet SMP +L1_SingleJet120 206 42 Jet EXO,SMP,SUSY,B2G L1_SingleJet140 207 0 Jet EXO,SMP,SUSY,B2G -L1_SingleJet150 208 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet150 208 1 Jet EXO,SMP,SUSY,B2G L1_SingleJet160 209 1 Jet EXO,SMP,SUSY,B2G L1_SingleJet170 210 1 Jet EXO,SMP,SUSY,B2G L1_SingleJet180 211 1 Jet EXO,SMP,SUSY,B2G @@ -166,23 +168,24 @@ L1_SingleTau120er 263 1 Tau ### DoubleTau 281-290 L1_DoubleIsoTau26er 281 0 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau27er 282 0 Tau HIGGS,EXO,SUSY -L1_DoubleIsoTau28er 283 0 Tau HIGGS,EXO,SUSY -L1_DoubleIsoTau29er 284 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau28er 283 1 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau29er 284 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau30er 285 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau32er 286 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau33er 287 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau34er 288 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau35er 289 1 Tau HIGGS,EXO,SUSY -L1_DoubleTau50er 290 1 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau36er 290 1 Tau HIGGS,EXO,SUSY +L1_DoubleTau50er 291 1 Tau HIGGS,EXO,SUSY ### HTT 301-320 -L1_HTT120 301 35000 Sum EXO,SUSY,B2G # 50000 Andrea, 30000 SUSY -L1_HTT160 302 9500 Sum EXO,SUSY,B2G # 0 Andrea, 9000 SUSY +L1_HTT120 301 25000 Sum EXO,SUSY,B2G # 35000 Andrea, 21000 SUSY +L1_HTT160 302 7500 Sum EXO,SUSY,B2G # 0 Andrea, 6000 SUSY L1_HTT200 303 0 Sum EXO,SUSY,B2G -L1_HTT220 304 6500 Sum EXO,SUSY,B2G +L1_HTT220 304 5000 Sum EXO,SUSY,B2G L1_HTT240 305 0 Sum EXO,SUSY,B2G -L1_HTT255 306 0 Sum EXO,SUSY,B2G -L1_HTT270 307 0 Sum EXO,SUSY,B2G +L1_HTT255 306 1 Sum EXO,SUSY,B2G +L1_HTT270 307 1 Sum EXO,SUSY,B2G L1_HTT280 308 1 Sum EXO,SUSY,B2G L1_HTT300 309 1 Sum EXO,SUSY,B2G L1_HTT320 310 1 Sum EXO,SUSY,B2G @@ -203,14 +206,15 @@ L1_HTT320 310 1 Sum EXO,SUSY,B2G L1_ETM30 361 0 Sum L1_ETM40 362 0 Sum L1_ETM50 363 0 Sum -L1_ETM60 364 150 Sum +L1_ETM60 364 100 Sum L1_ETM70 365 0 Sum -L1_ETM75 366 0 Sum +L1_ETM75 366 1 Sum L1_ETM80 367 1 Sum L1_ETM85 368 1 Sum L1_ETM90 369 1 Sum -L1_ETM100 370 1 Sum -L1_ETM120 371 1 Sum +L1_ETM95 370 1 Sum +L1_ETM100 371 1 Sum +L1_ETM120 372 1 Sum ### Cross 401-500 ## MuEG 401-415 @@ -238,28 +242,27 @@ L1_DoubleMu7_EG14 431 1 MuEG HIGGS L1_DoubleMu7_EG7 432 1 MuEG HIGGS #Like Stage1 L1_DoubleMu7_EG7 L1_Mu6_DoubleEG17 433 1 MuEG HIGGS L1_Mu6_DoubleEG10 434 1 MuEG HIGGS -L1_Mu3_JetC16_dEta_Max0p4_dPhi_Max0p4 435 400 MuJet # CMSHLT_707, prescale to 0.15kHz -L1_Mu3_JetC60_dEta_Max0p4_dPhi_Max0p4 436 15 MuJet EXO # CMSHLT_707, prescale to 0.5kHz +L1_Mu3_JetC16_dEta_Max0p4_dPhi_Max0p4 435 300 MuJet # CMSHLT_707, prescale to 0.15kHz +L1_Mu3_JetC60_dEta_Max0p4_dPhi_Max0p4 436 12 MuJet EXO # CMSHLT_707, prescale to 0.5kHz L1_Mu6_HTT200 437 1 MuSum EXO L1_Mu8_HTT150 438 0 MuSum SUSY L1_EG27er_HTT200 439 1 EGSum HIGGS #322 pure rate, masked for now L1_EG25er_HTT125 440 0 EGSum HIGGS #3kHz pure rate L1_DoubleEG6_HTT255 441 1 EGSum SUSY -L1_QuadJetC36_Tau52 442 50 JetTau HIGGS +L1_QuadJetC36_Tau52 442 42 JetTau HIGGS L1_DoubleJetC60_ETM60 446 1 EGSum HIGGS L1_Mu0er_ETM40 447 0 MuSum HIGGS -L1_Mu0er_ETM55 448 1 MuSum HIGGS -L1_Mu10er_ETM30 449 0 MuSum HIGGS +L1_Mu0er_ETM55 448 1 MuSum HIGGS +L1_Mu10er_ETM30 449 0 MuSum HIGGS L1_Mu10er_ETM50 450 1 MuSum HIGGS -L1_Mu14er_ETM30 451 1 MuSum HIGGS +L1_Mu14er_ETM30 451 1 MuSum HIGGS L1_Mu3_JetC120_dEta_Max0p4_dPhi_Max0p4 461 1 MuJet BTV -L1_ETM60_Jet60_dPhi_Min0p4 462 0 JetSum L1_Mu3_JetC16 463 0 MuJet #BTV fallback L1_Mu3_JetC60 465 0 MuJet #BTV fallback L1_Mu3_JetC120 466 0 MuJet #BTV fallback -L1_Jet32_DoubleMu_10_0_dPhi_Jet_Mu0_Max0p4_dPhi_Mu_Mu_Min1p0 444 70 MuJet SUSY #161Hz pure rate -L1_Jet32_Mu0_EG10_dPhi_Jet_Mu_Max0p4_dPhi_Mu_EG_Min1p0 445 150 MuJet SUSY #Map to Stage1 L1_Jet32MuOpen_EG10_dPhiMu_EG1 +L1_Jet32_DoubleMu_10_0_dPhi_Jet_Mu0_Max0p4_dPhi_Mu_Mu_Min1p0 444 60 MuJet SUSY #161Hz pure rate +L1_Jet32_Mu0_EG10_dPhi_Jet_Mu_Max0p4_dPhi_Mu_EG_Min1p0 445 110 MuJet SUSY #Map to Stage1 L1_Jet32MuOpen_EG10_dPhiMu_EG1 L1_DoubleMu0_ETM40 467 0 MuSum SUSY L1_DoubleMu0_ETM55 468 1 MuSum SUSY @@ -267,7 +270,8 @@ L1_IsoEG22er_Tau20er_dEta_Min0p2 443 1 EGTau HIGGS L1_IsoEG22er_IsoTau26er_dEta_Min0p2 469 1 EGTau HIGGS L1_IsoEG18er_IsoTau25er_dEta_Min0p2 471 1 EGTau HIGGS L1_IsoEG20er_IsoTau25er_dEta_Min0p2 473 1 EGTau HIGGS -L1_ETM70_Jet60_dPhi_Min0p4 474 0 JetSum +L1_ETM75_Jet60_dPhi_Min0p4 474 1 JetSum +L1_Mu20_IsoEG6 476 1 JetSum #============================================================================# #---------------------------- Fixed Rate ----------------------------# #============================================================================# @@ -288,4 +292,3 @@ L1_ETM70_Jet60_dPhi_Min0p4 474 0 JetSum # # L1_SingleJet12_BptxAND 460 -1 Jet #Assume 1kHz for all bptx triggers # vim: ft=python:nolbr:cc=88 - diff --git a/macros/menu/Lumi1p15E34.txt b/macros/menu/Lumi1p15E34.txt index 6833c99..f6c9dbf 100644 --- a/macros/menu/Lumi1p15E34.txt +++ b/macros/menu/Lumi1p15E34.txt @@ -32,23 +32,23 @@ # L1Seed Bit Prescale POG PAG # L1_ZeroBias 0 20011 Tech ### SingleMu 1-30 -L1_SingleMuOpen 2 24000 Mu -L1_SingleMu3 3 12000 Mu HIGGS,EXO,SUSY -L1_SingleMu5 4 350 Mu HIGGS,EXO,SUSY -L1_SingleMu7 5 300 Mu HIGGS,EXO,BPH,SUSY +L1_SingleMuOpen 2 20000 Mu +L1_SingleMu3 3 10000 Mu HIGGS,EXO,SUSY +L1_SingleMu5 4 0 Mu HIGGS,EXO,SUSY +L1_SingleMu7 5 120 Mu HIGGS,EXO,BPH,SUSY L1_SingleMu12 6 0 Mu HIGGS,SUSY L1_SingleMu14 7 0 Mu L1_SingleMu16 8 0 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G -L1_SingleMu18 9 120 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G -L1_SingleMu20 10 0 Mu HIGGS,EXO +L1_SingleMu18 9 100 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G +L1_SingleMu20 10 1 Mu HIGGS,EXO L1_SingleMu22 11 1 Mu L1_SingleMu25 12 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G L1_SingleMu30 13 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G -L1_SingleMu10_LowQ 21 300 Mu # 450 Andrea, 200 Ben +L1_SingleMu10_LowQ 21 250 Mu # 450 Andrea, 200 Ben ### SingleMuer 31 - 60 L1_SingleMu14er 31 0 Mu HIGGS,EXO,SMP,SUSY,B2G -L1_SingleMu16er 32 120 Mu HIGGS,EXO,SMP -L1_SingleMu18er 33 0 Mu +L1_SingleMu16er 32 100 Mu HIGGS,EXO,SMP +L1_SingleMu18er 33 1 Mu L1_SingleMu20er 34 1 Mu HIGGS,EXO L1_SingleMu22er 35 1 Mu L1_SingleMu25er 36 1 Mu @@ -56,7 +56,7 @@ L1_SingleMu30er 37 1 Mu ### DoubleMu 61-80 L1_DoubleMuOpen 60 0 Mu BPH -L1_DoubleMu0 61 350 Mu BPH +L1_DoubleMu0 61 300 Mu BPH L1_DoubleMu_10_Open 62 0 Mu L1_DoubleMu_10_3p5 63 0 Mu TOP,HIGGS,EXO,SMP,SUSY,B2G L1_DoubleMu_11_4 64 1 Mu @@ -64,25 +64,26 @@ L1_DoubleMu_12_5 65 1 Mu TOP,HIGGS,EXO,SMP,SUSY, L1_DoubleMu_13_6 66 1 Mu L1_DoubleMu_15_5 67 1 Mu L1_DoubleMu_12_8 68 1 Mu -L1_DoubleMu0er1p6_dEta_Max1p8 69 130 Mu BPH -L1_DoubleMu0er1p6_dEta_Max1p8_OS 70 0 Mu BPH # 0 charge for OMTF, cause higher rate -L1_DoubleMu0er1p25_dEta_Max1p8_OS 71 1 Mu BPH # 0 charge for OMTF, cause higher rate +L1_DoubleMu0er1p6_dEta_Max1p8 69 100 Mu BPH +L1_DoubleMu0er1p6_dEta_Max1p8_OS 70 1 Mu BPH # 0 charge for OMTF, cause higher rate +L1_DoubleMu0er1p4_dEta_Max1p8_OS 71 1 Mu BPH # 0 charge for OMTF, cause higher rate L1_DoubleMu_10_0_dEta_Max1p8 72 0 Mu BPH #1kHz pure rate, might go back if we have more rate ### TripleMu 81-90 L1_TripleMu0 81 1 Mu HIGGS,BPH L1_TripleMu_5_5_3 82 1 Mu HIGGS +L1_TripleMu_5_0_0 83 1 Mu HIGGS ### QuadMu 91-100 L1_QuadMu0 91 1 Mu BPH ### SingleEG 101-120 -L1_SingleEG5 101 60000 EG -L1_SingleEG10 102 9000 EG # 10000 Andrea, 8000 SUSY -L1_SingleEG15 103 2000 EG -L1_SingleEG18 104 4000 EG # 6400 Andrea, 3000 SUSY -L1_SingleEG24 105 2500 EG -L1_SingleEG26 106 350 EG +L1_SingleEG5 101 50000 EG +L1_SingleEG10 102 8000 EG # 10000 Andrea, 8000 SUSY +L1_SingleEG15 103 1000 EG +L1_SingleEG18 104 3000 EG # 6400 Andrea, 3000 SUSY +L1_SingleEG24 105 2000 EG +L1_SingleEG26 106 300 EG L1_SingleEG28 107 0 EG -L1_SingleEG30 108 0 EG +L1_SingleEG30 108 1 EG L1_SingleEG32 109 1 EG L1_SingleEG34 110 1 EG EXO,SMP #Stage1 EG30, Eff39 L1_SingleEG36 111 1 EG EXO,SMP #Stage1 EG30, Eff39 @@ -94,7 +95,7 @@ L1_SingleIsoEG20 122 0 EG L1_SingleIsoEG22 123 0 EG L1_SingleIsoEG24 124 0 EG #Stage1 EG20, Eff29 L1_SingleIsoEG26 125 0 EG -L1_SingleIsoEG28 126 0 EG +L1_SingleIsoEG28 126 1 EG L1_SingleIsoEG30 127 1 EG L1_SingleIsoEG32 128 1 EG L1_SingleIsoEG34 129 1 EG @@ -105,7 +106,7 @@ L1_SingleIsoEG18er 141 0 EG L1_SingleIsoEG20er 142 0 EG L1_SingleIsoEG22er 143 0 EG HIGGS L1_SingleIsoEG24er 144 0 EG -L1_SingleIsoEG26er 145 0 EG +L1_SingleIsoEG26er 145 1 EG L1_SingleIsoEG28er 146 1 EG L1_SingleIsoEG30er 147 1 EG L1_SingleIsoEG32er 148 1 EG @@ -119,20 +120,21 @@ L1_DoubleEG_23_10 166 1 EG L1_DoubleEG_24_17 167 1 EG #map to Stage1 L1_DoubleEG_22_10 L1_DoubleEG_22_12 168 0 EG # from Simone's menu,800Hz pure rate L1_DoubleEG_22_15 169 0 EG # created by ZW +L1_DoubleEG_25_12 170 1 EG ### TripleEG 181-190 -L1_TripleEG_14_10_8 181 0 EG HIGGS +L1_TripleEG_14_10_8 181 1 EG HIGGS L1_TripleEG_18_17_8 182 1 EG HIGGS #map to Stage1 L1_TripleEG_15_10_8 ### QuadEG 191-200 ### SingleJet 201-220 L1_SingleJet16 201 0 Jet L1_SingleJet20 202 0 Jet -L1_SingleJet35 203 3500 Jet -L1_SingleJet60 204 1200 Jet EXO,SMP # Prescale 840 from CMSHLT-725 -L1_SingleJet90 205 1500 Jet SMP -L1_SingleJet120 206 150 Jet EXO,SMP,SUSY,B2G +L1_SingleJet35 203 3000 Jet +L1_SingleJet60 204 1000 Jet EXO,SMP # Prescale 840 from CMSHLT-725 +L1_SingleJet90 205 1200 Jet SMP +L1_SingleJet120 206 100 Jet EXO,SMP,SUSY,B2G L1_SingleJet140 207 0 Jet EXO,SMP,SUSY,B2G -L1_SingleJet150 208 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet150 208 1 Jet EXO,SMP,SUSY,B2G L1_SingleJet160 209 1 Jet EXO,SMP,SUSY,B2G L1_SingleJet170 210 1 Jet EXO,SMP,SUSY,B2G L1_SingleJet180 211 1 Jet EXO,SMP,SUSY,B2G @@ -147,10 +149,10 @@ L1_DoubleJetC112 226 1 Jet EXO,SUSY L1_DoubleJetC120 227 1 Jet EXO,SUSY L1_DoubleJet8_ForwardBackward 231 0 Jet # CMSHLT-719 L1_DoubleJet12_ForwardBackward 232 0 Jet # CMSHLT-719 -L1_DoubleJet16_ForwardBackward 233 0 Jet # CMSHLT-719 +L1_DoubleJet16_ForwardBackward 233 0 Jet # CMSHLT-719 ### TripleJet 241-250 -L1_TripleJet_84_68_48_VBF 241 0 Jet HIGGS +L1_TripleJet_84_68_48_VBF 241 1 Jet HIGGS L1_TripleJet_88_72_56_VBF 242 1 Jet HIGGS L1_TripleJet_92_76_64_VBF 243 1 Jet HIGGS ### QuadJet 251-260 @@ -173,17 +175,18 @@ L1_DoubleIsoTau32er 286 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau33er 287 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau34er 288 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau35er 289 1 Tau HIGGS,EXO,SUSY -L1_DoubleTau50er 290 1 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau36er 290 1 Tau HIGGS,EXO,SUSY +L1_DoubleTau50er 291 1 Tau HIGGS,EXO,SUSY ### HTT 301-320 -L1_HTT120 301 40000 Sum EXO,SUSY,B2G # 50000 Andrea, 30000 SUSY -L1_HTT160 302 10000 Sum EXO,SUSY,B2G # 0 Andrea, 9000 SUSY +L1_HTT120 301 35000 Sum EXO,SUSY,B2G # 50000 Andrea, 30000 SUSY +L1_HTT160 302 9500 Sum EXO,SUSY,B2G # 0 Andrea, 9000 SUSY L1_HTT200 303 0 Sum EXO,SUSY,B2G -L1_HTT220 304 7000 Sum EXO,SUSY,B2G +L1_HTT220 304 6500 Sum EXO,SUSY,B2G L1_HTT240 305 0 Sum EXO,SUSY,B2G L1_HTT255 306 0 Sum EXO,SUSY,B2G L1_HTT270 307 0 Sum EXO,SUSY,B2G -L1_HTT280 308 0 Sum EXO,SUSY,B2G +L1_HTT280 308 1 Sum EXO,SUSY,B2G L1_HTT300 309 1 Sum EXO,SUSY,B2G L1_HTT320 310 1 Sum EXO,SUSY,B2G @@ -203,14 +206,15 @@ L1_HTT320 310 1 Sum EXO,SUSY,B2G L1_ETM30 361 0 Sum L1_ETM40 362 0 Sum L1_ETM50 363 0 Sum -L1_ETM60 364 200 Sum +L1_ETM60 364 150 Sum L1_ETM70 365 0 Sum -L1_ETM75 366 0 Sum +L1_ETM75 366 100 Sum L1_ETM80 367 1 Sum L1_ETM85 368 1 Sum L1_ETM90 369 1 Sum -L1_ETM100 370 1 Sum -L1_ETM120 371 1 Sum +L1_ETM95 370 1 Sum +L1_ETM100 371 1 Sum +L1_ETM120 372 1 Sum ### Cross 401-500 ## MuEG 401-415 @@ -226,11 +230,11 @@ L1_Mu23_IsoEG10 409 1 MuEG HIGGS L1_Mu23_EG10 410 1 MuEG HIGGS L1_Mu20_EG10 411 1 MuEG HIGGS ## CrossTau 416-430 -L1_Mu16er_Tau20er 414 0 MuTau HIGGS -L1_Mu16er_Tau24er 415 0 MuTau HIGGS +L1_Mu16er_Tau20er 414 1 MuTau HIGGS +L1_Mu16er_Tau24er 415 1 MuTau HIGGS L1_Mu18er_Tau20er 416 1 MuTau HIGGS L1_Mu18er_Tau24er 417 1 MuTau HIGGS -L1_Mu18er_IsoTau26er 418 0 MuTau # Use same quarlity as SingleMuer +L1_Mu18er_IsoTau26er 418 1 MuTau # Use same quarlity as SingleMuer L1_Mu20er_IsoTau26er 419 1 MuTau # Use same quarlity as SingleMuer ## Rest @@ -238,14 +242,14 @@ L1_DoubleMu7_EG14 431 1 MuEG HIGGS L1_DoubleMu7_EG7 432 1 MuEG HIGGS #Like Stage1 L1_DoubleMu7_EG7 L1_Mu6_DoubleEG17 433 1 MuEG HIGGS L1_Mu6_DoubleEG10 434 1 MuEG HIGGS -L1_Mu3_JetC16_dEta_Max0p4_dPhi_Max0p4 435 420 MuJet # CMSHLT_707, prescale to 0.15kHz -L1_Mu3_JetC60_dEta_Max0p4_dPhi_Max0p4 436 18 MuJet EXO # CMSHLT_707, prescale to 0.5kHz +L1_Mu3_JetC16_dEta_Max0p4_dPhi_Max0p4 435 400 MuJet # CMSHLT_707, prescale to 0.15kHz +L1_Mu3_JetC60_dEta_Max0p4_dPhi_Max0p4 436 15 MuJet EXO # CMSHLT_707, prescale to 0.5kHz L1_Mu6_HTT200 437 1 MuSum EXO L1_Mu8_HTT150 438 0 MuSum SUSY L1_EG27er_HTT200 439 1 EGSum HIGGS #322 pure rate, masked for now L1_EG25er_HTT125 440 0 EGSum HIGGS #3kHz pure rate L1_DoubleEG6_HTT255 441 1 EGSum SUSY -L1_QuadJetC36_Tau52 442 54 JetTau HIGGS +L1_QuadJetC36_Tau52 442 50 JetTau HIGGS L1_DoubleJetC60_ETM60 446 0 EGSum HIGGS L1_Mu0er_ETM40 447 0 MuSum HIGGS L1_Mu0er_ETM55 448 1 MuSum HIGGS @@ -253,13 +257,12 @@ L1_Mu10er_ETM30 449 0 MuSum HIGGS L1_Mu10er_ETM50 450 1 MuSum HIGGS L1_Mu14er_ETM30 451 0 MuSum HIGGS L1_Mu3_JetC120_dEta_Max0p4_dPhi_Max0p4 461 1 MuJet BTV -L1_ETM60_Jet60_dPhi_Min0p4 462 0 JetSum L1_Mu3_JetC16 463 0 MuJet #BTV fallback L1_Mu3_JetC60 465 0 MuJet #BTV fallback L1_Mu3_JetC120 466 0 MuJet #BTV fallback -L1_Jet32_DoubleMu_10_0_dPhi_Jet_Mu0_Max0p4_dPhi_Mu_Mu_Min1p0 444 80 MuJet SUSY #161Hz pure rate -L1_Jet32_Mu0_EG10_dPhi_Jet_Mu_Max0p4_dPhi_Mu_EG_Min1p0 445 160 MuJet SUSY #Map to Stage1 L1_Jet32MuOpen_EG10_dPhiMu_EG1 +L1_Jet32_DoubleMu_10_0_dPhi_Jet_Mu0_Max0p4_dPhi_Mu_Mu_Min1p0 444 70 MuJet SUSY #161Hz pure rate +L1_Jet32_Mu0_EG10_dPhi_Jet_Mu_Max0p4_dPhi_Mu_EG_Min1p0 445 150 MuJet SUSY #Map to Stage1 L1_Jet32MuOpen_EG10_dPhiMu_EG1 L1_DoubleMu0_ETM40 467 0 MuSum SUSY L1_DoubleMu0_ETM55 468 1 MuSum SUSY @@ -267,7 +270,8 @@ L1_IsoEG22er_Tau20er_dEta_Min0p2 443 0 EGTau HIGGS L1_IsoEG22er_IsoTau26er_dEta_Min0p2 469 1 EGTau HIGGS L1_IsoEG18er_IsoTau25er_dEta_Min0p2 471 1 EGTau HIGGS L1_IsoEG20er_IsoTau25er_dEta_Min0p2 473 1 EGTau HIGGS -L1_ETM70_Jet60_dPhi_Min0p4 474 0 JetSum +L1_ETM75_Jet60_dPhi_Min0p4 474 0 JetSum +L1_Mu20_IsoEG6 476 1 JetSum #============================================================================# #---------------------------- Fixed Rate ----------------------------# #============================================================================# diff --git a/macros/menu/Lumi1p3E34.txt b/macros/menu/Lumi1p3E34.txt index bb9093e..376bd56 100644 --- a/macros/menu/Lumi1p3E34.txt +++ b/macros/menu/Lumi1p3E34.txt @@ -30,24 +30,24 @@ #------------------------------- Menu -------------------------------# #============================================================================# # L1Seed Bit Prescale POG PAG -# L1_ZeroBias 0 25409 Tech +# L1_ZeroBias 0 20011 Tech ### SingleMu 1-30 -L1_SingleMuOpen 2 28000 Mu -L1_SingleMu3 3 14000 Mu HIGGS,EXO,SUSY -L1_SingleMu5 4 450 Mu HIGGS,EXO,SUSY -L1_SingleMu7 5 400 Mu HIGGS,EXO,BPH,SUSY +L1_SingleMuOpen 2 24000 Mu +L1_SingleMu3 3 12000 Mu HIGGS,EXO,SUSY +L1_SingleMu5 4 0 Mu HIGGS,EXO,SUSY +L1_SingleMu7 5 150 Mu HIGGS,EXO,BPH,SUSY L1_SingleMu12 6 0 Mu HIGGS,SUSY L1_SingleMu14 7 0 Mu L1_SingleMu16 8 0 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G -L1_SingleMu18 9 150 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G +L1_SingleMu18 9 120 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G L1_SingleMu20 10 0 Mu HIGGS,EXO L1_SingleMu22 11 1 Mu L1_SingleMu25 12 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G L1_SingleMu30 13 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G -L1_SingleMu10_LowQ 21 450 Mu # 450 Andrea, 200 Ben +L1_SingleMu10_LowQ 21 300 Mu # 450 Andrea, 200 Ben ### SingleMuer 31 - 60 L1_SingleMu14er 31 0 Mu HIGGS,EXO,SMP,SUSY,B2G -L1_SingleMu16er 32 150 Mu HIGGS,EXO,SMP +L1_SingleMu16er 32 120 Mu HIGGS,EXO,SMP L1_SingleMu18er 33 0 Mu L1_SingleMu20er 34 1 Mu HIGGS,EXO L1_SingleMu22er 35 1 Mu @@ -56,35 +56,35 @@ L1_SingleMu30er 37 1 Mu ### DoubleMu 61-80 L1_DoubleMuOpen 60 0 Mu BPH -L1_DoubleMu0 61 450 Mu BPH +L1_DoubleMu0 61 350 Mu BPH L1_DoubleMu_10_Open 62 0 Mu L1_DoubleMu_10_3p5 63 0 Mu TOP,HIGGS,EXO,SMP,SUSY,B2G -L1_DoubleMu_11_4 64 0 Mu +L1_DoubleMu_11_4 64 1 Mu L1_DoubleMu_12_5 65 1 Mu TOP,HIGGS,EXO,SMP,SUSY,B2G L1_DoubleMu_13_6 66 1 Mu L1_DoubleMu_15_5 67 1 Mu L1_DoubleMu_12_8 68 1 Mu -L1_DoubleMu0er1p6_dEta_Max1p8 69 160 Mu BPH +L1_DoubleMu0er1p6_dEta_Max1p8 69 130 Mu BPH L1_DoubleMu0er1p6_dEta_Max1p8_OS 70 0 Mu BPH # 0 charge for OMTF, cause higher rate -L1_DoubleMu0er1p25_dEta_Max1p8_OS 71 1 Mu BPH # 0 charge for OMTF, cause higher rate -# L1_DoubleMu0er1p4_dEta_Max1p8_OS 71 1 Mu BPH # 0 charge for OMTF, cause higher rate +L1_DoubleMu0er1p4_dEta_Max1p8_OS 71 1 Mu BPH # 0 charge for OMTF, cause higher rate L1_DoubleMu_10_0_dEta_Max1p8 72 0 Mu BPH #1kHz pure rate, might go back if we have more rate ### TripleMu 81-90 L1_TripleMu0 81 1 Mu HIGGS,BPH L1_TripleMu_5_5_3 82 1 Mu HIGGS +L1_TripleMu_5_0_0 83 1 Mu HIGGS ### QuadMu 91-100 L1_QuadMu0 91 1 Mu BPH ### SingleEG 101-120 -L1_SingleEG5 101 70000 EG -L1_SingleEG10 102 10000 EG # 10000 Andrea, 8000 SUSY -L1_SingleEG15 103 2500 EG -L1_SingleEG18 104 5000 EG # 6400 Andrea, 3000 SUSY -L1_SingleEG24 105 3000 EG -L1_SingleEG26 106 400 EG +L1_SingleEG5 101 60000 EG +L1_SingleEG10 102 9000 EG # 10000 Andrea, 8000 SUSY +L1_SingleEG15 103 2000 EG +L1_SingleEG18 104 4000 EG # 6400 Andrea, 3000 SUSY +L1_SingleEG24 105 2500 EG +L1_SingleEG26 106 350 EG L1_SingleEG28 107 0 EG L1_SingleEG30 108 0 EG -L1_SingleEG32 109 0 EG +L1_SingleEG32 109 1 EG L1_SingleEG34 110 1 EG EXO,SMP #Stage1 EG30, Eff39 L1_SingleEG36 111 1 EG EXO,SMP #Stage1 EG30, Eff39 L1_SingleEG40 112 1 EG EXO #Stage1 EG35, Eff45 @@ -96,7 +96,7 @@ L1_SingleIsoEG22 123 0 EG L1_SingleIsoEG24 124 0 EG #Stage1 EG20, Eff29 L1_SingleIsoEG26 125 0 EG L1_SingleIsoEG28 126 0 EG -L1_SingleIsoEG30 127 0 EG +L1_SingleIsoEG30 127 1 EG L1_SingleIsoEG32 128 1 EG L1_SingleIsoEG34 129 1 EG L1_SingleIsoEG36 130 1 EG @@ -107,7 +107,7 @@ L1_SingleIsoEG20er 142 0 EG L1_SingleIsoEG22er 143 0 EG HIGGS L1_SingleIsoEG24er 144 0 EG L1_SingleIsoEG26er 145 0 EG -L1_SingleIsoEG28er 146 0 EG +L1_SingleIsoEG28er 146 1 EG L1_SingleIsoEG30er 147 1 EG L1_SingleIsoEG32er 148 1 EG L1_SingleIsoEG34er 149 1 EG TOP,HIGGS,EXO,SMP,SUSY,B2G #Stage1 EG30, Eff39 @@ -120,6 +120,7 @@ L1_DoubleEG_23_10 166 1 EG L1_DoubleEG_24_17 167 1 EG #map to Stage1 L1_DoubleEG_22_10 L1_DoubleEG_22_12 168 0 EG # from Simone's menu,800Hz pure rate L1_DoubleEG_22_15 169 0 EG # created by ZW +L1_DoubleEG_25_12 170 1 EG ### TripleEG 181-190 L1_TripleEG_14_10_8 181 0 EG HIGGS L1_TripleEG_18_17_8 182 1 EG HIGGS #map to Stage1 L1_TripleEG_15_10_8 @@ -128,13 +129,13 @@ L1_TripleEG_18_17_8 182 1 EG HIGGS ### SingleJet 201-220 L1_SingleJet16 201 0 Jet L1_SingleJet20 202 0 Jet -L1_SingleJet35 203 4000 Jet -L1_SingleJet60 204 1500 Jet EXO,SMP # Prescale 840 from CMSHLT-725 -L1_SingleJet90 205 2000 Jet SMP -L1_SingleJet120 206 180 Jet EXO,SMP,SUSY,B2G +L1_SingleJet35 203 3500 Jet +L1_SingleJet60 204 1200 Jet EXO,SMP # Prescale 840 from CMSHLT-725 +L1_SingleJet90 205 1500 Jet SMP +L1_SingleJet120 206 150 Jet EXO,SMP,SUSY,B2G L1_SingleJet140 207 0 Jet EXO,SMP,SUSY,B2G L1_SingleJet150 208 0 Jet EXO,SMP,SUSY,B2G -L1_SingleJet160 209 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet160 209 1 Jet EXO,SMP,SUSY,B2G L1_SingleJet170 210 1 Jet EXO,SMP,SUSY,B2G L1_SingleJet180 211 1 Jet EXO,SMP,SUSY,B2G L1_SingleJet200 212 1 Jet EXO,SMP,SUSY,B2G @@ -148,7 +149,7 @@ L1_DoubleJetC112 226 1 Jet EXO,SUSY L1_DoubleJetC120 227 1 Jet EXO,SUSY L1_DoubleJet8_ForwardBackward 231 0 Jet # CMSHLT-719 L1_DoubleJet12_ForwardBackward 232 0 Jet # CMSHLT-719 -L1_DoubleJet16_ForwardBackward 233 0 Jet # CMSHLT-719 +L1_DoubleJet16_ForwardBackward 233 0 Jet # CMSHLT-719 ### TripleJet 241-250 L1_TripleJet_84_68_48_VBF 241 0 Jet HIGGS @@ -169,18 +170,19 @@ L1_DoubleIsoTau26er 281 0 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau27er 282 0 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau28er 283 0 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau29er 284 0 Tau HIGGS,EXO,SUSY -L1_DoubleIsoTau30er 285 0 Tau HIGGS,EXO,SUSY -L1_DoubleIsoTau32er 286 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau30er 285 1 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau32er 286 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau33er 287 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau34er 288 1 Tau HIGGS,EXO,SUSY L1_DoubleIsoTau35er 289 1 Tau HIGGS,EXO,SUSY -L1_DoubleTau50er 290 1 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau36er 290 1 Tau HIGGS,EXO,SUSY +L1_DoubleTau50er 291 1 Tau HIGGS,EXO,SUSY ### HTT 301-320 -L1_HTT120 301 45000 Sum EXO,SUSY,B2G # 50000 Andrea, 30000 SUSY -L1_HTT160 302 10500 Sum EXO,SUSY,B2G # 0 Andrea, 9000 SUSY +L1_HTT120 301 40000 Sum EXO,SUSY,B2G # 50000 Andrea, 30000 SUSY +L1_HTT160 302 10000 Sum EXO,SUSY,B2G # 0 Andrea, 9000 SUSY L1_HTT200 303 0 Sum EXO,SUSY,B2G -L1_HTT220 304 7500 Sum EXO,SUSY,B2G +L1_HTT220 304 7000 Sum EXO,SUSY,B2G L1_HTT240 305 0 Sum EXO,SUSY,B2G L1_HTT255 306 0 Sum EXO,SUSY,B2G L1_HTT270 307 0 Sum EXO,SUSY,B2G @@ -204,14 +206,15 @@ L1_HTT320 310 1 Sum EXO,SUSY,B2G L1_ETM30 361 0 Sum L1_ETM40 362 0 Sum L1_ETM50 363 0 Sum -L1_ETM60 364 250 Sum +L1_ETM60 364 200 Sum L1_ETM70 365 0 Sum L1_ETM75 366 0 Sum L1_ETM80 367 1 Sum L1_ETM85 368 1 Sum L1_ETM90 369 1 Sum -L1_ETM100 370 1 Sum -L1_ETM120 371 1 Sum +L1_ETM95 370 1 Sum +L1_ETM100 371 1 Sum +L1_ETM120 372 1 Sum ### Cross 401-500 ## MuEG 401-415 @@ -239,14 +242,14 @@ L1_DoubleMu7_EG14 431 1 MuEG HIGGS L1_DoubleMu7_EG7 432 1 MuEG HIGGS #Like Stage1 L1_DoubleMu7_EG7 L1_Mu6_DoubleEG17 433 1 MuEG HIGGS L1_Mu6_DoubleEG10 434 1 MuEG HIGGS -L1_Mu3_JetC16_dEta_Max0p4_dPhi_Max0p4 435 430 MuJet # CMSHLT_707, prescale to 0.15kHz -L1_Mu3_JetC60_dEta_Max0p4_dPhi_Max0p4 436 20 MuJet EXO # CMSHLT_707, prescale to 0.5kHz +L1_Mu3_JetC16_dEta_Max0p4_dPhi_Max0p4 435 420 MuJet # CMSHLT_707, prescale to 0.15kHz +L1_Mu3_JetC60_dEta_Max0p4_dPhi_Max0p4 436 18 MuJet EXO # CMSHLT_707, prescale to 0.5kHz L1_Mu6_HTT200 437 1 MuSum EXO L1_Mu8_HTT150 438 0 MuSum SUSY L1_EG27er_HTT200 439 1 EGSum HIGGS #322 pure rate, masked for now L1_EG25er_HTT125 440 0 EGSum HIGGS #3kHz pure rate L1_DoubleEG6_HTT255 441 1 EGSum SUSY -L1_QuadJetC36_Tau52 442 60 JetTau HIGGS +L1_QuadJetC36_Tau52 442 54 JetTau HIGGS L1_DoubleJetC60_ETM60 446 0 EGSum HIGGS L1_Mu0er_ETM40 447 0 MuSum HIGGS L1_Mu0er_ETM55 448 0 MuSum HIGGS @@ -254,23 +257,21 @@ L1_Mu10er_ETM30 449 0 MuSum HIGGS L1_Mu10er_ETM50 450 1 MuSum HIGGS L1_Mu14er_ETM30 451 0 MuSum HIGGS L1_Mu3_JetC120_dEta_Max0p4_dPhi_Max0p4 461 1 MuJet BTV -L1_ETM60_Jet60_dPhi_Min0p4 462 0 JetSum L1_Mu3_JetC16 463 0 MuJet #BTV fallback L1_Mu3_JetC60 465 0 MuJet #BTV fallback L1_Mu3_JetC120 466 0 MuJet #BTV fallback -L1_Jet32_DoubleMu_10_0_dPhi_Jet_Mu0_Max0p4_dPhi_Mu_Mu_Min1p0 444 90 MuJet SUSY #161Hz pure rate -L1_Jet32_Mu0_EG10_dPhi_Jet_Mu_Max0p4_dPhi_Mu_EG_Min1p0 445 170 MuJet SUSY #Map to Stage1 L1_Jet32MuOpen_EG10_dPhiMu_EG1 +L1_Jet32_DoubleMu_10_0_dPhi_Jet_Mu0_Max0p4_dPhi_Mu_Mu_Min1p0 444 80 MuJet SUSY #161Hz pure rate +L1_Jet32_Mu0_EG10_dPhi_Jet_Mu_Max0p4_dPhi_Mu_EG_Min1p0 445 160 MuJet SUSY #Map to Stage1 L1_Jet32MuOpen_EG10_dPhiMu_EG1 L1_DoubleMu0_ETM40 467 0 MuSum SUSY L1_DoubleMu0_ETM55 468 1 MuSum SUSY L1_IsoEG22er_Tau20er_dEta_Min0p2 443 0 EGTau HIGGS L1_IsoEG22er_IsoTau26er_dEta_Min0p2 469 1 EGTau HIGGS -L1_IsoEG18er_IsoTau25er_dEta_Min0p2 471 0 EGTau HIGGS +L1_IsoEG18er_IsoTau25er_dEta_Min0p2 471 1 EGTau HIGGS L1_IsoEG20er_IsoTau25er_dEta_Min0p2 473 1 EGTau HIGGS -L1_ETM70_Jet60_dPhi_Min0p4 474 0 JetSum -# L1_ETM75_Jet60_dPhi_Min0p4 475 1 JetSum -L1_Mu20_IsoEG6 476 1 JetSum +L1_ETM75_Jet60_dPhi_Min0p4 474 0 JetSum +L1_Mu20_IsoEG6 476 1 JetSum #============================================================================# #---------------------------- Fixed Rate ----------------------------# #============================================================================# diff --git a/macros/menu/Lumi1p45E34.txt b/macros/menu/Lumi1p45E34.txt new file mode 100644 index 0000000..c6bae8b --- /dev/null +++ b/macros/menu/Lumi1p45E34.txt @@ -0,0 +1,294 @@ +## Start with 100kHz for 1.2e34 +## Assume 20kHz for ETM, and ETM with HF rates +## Assume 1kHz for Zero bias (originally 10kHz) +## Assume bptx trigger rates are PU independant, get them from WBM +## Assume 1kHz for bxpt seeds (originally 2kHz) +## Assume 5kHz for prescale rate (masked in this menu) +## Menu rate = 100 - 20 - 1 - 1 - 5 = 73kHz + +## EG map from https://indico.cern.ch/event/493290/contribution/2/attachments/1221650/1786361/Zhenbin_Stage2_L1Menu.pdf +## HT map from https://indico.cern.ch/event/502206/contribution/2/attachments/1233163/1809079/Zhenbin_Stage2_Calov0.pdf + +## Re-organize L1 bit up to 511 +## 1 -100 > Mu +## 101-200 > EG +## 201-300 > Jet & Tau +## 301-400 > Sums +## 401-500 > Cross +## 500-511 > bptx + +#============================================================================# +#------------------------------ Config ------------------------------# +#============================================================================# +## Run 259721: PU=22, nB=517, Lumi=1.5E33, Tau option 5 +## Using this run to tune 1.15E34 menu column, PU=30 +## Scale = 517 * 1E34/1.5E33 = 3446.67 +## ZB 1.7kHZ if possbile, minimum 1kHz +# % nBunches = 3446.67 + +#============================================================================# +#------------------------------- Menu -------------------------------# +#============================================================================# +# L1Seed Bit Prescale POG PAG +# L1_ZeroBias 0 25409 Tech +### SingleMu 1-30 +L1_SingleMuOpen 2 28000 Mu +L1_SingleMu3 3 14000 Mu HIGGS,EXO,SUSY +L1_SingleMu5 4 0 Mu HIGGS,EXO,SUSY +L1_SingleMu7 5 170 Mu HIGGS,EXO,BPH,SUSY +L1_SingleMu12 6 0 Mu HIGGS,SUSY +L1_SingleMu14 7 0 Mu +L1_SingleMu16 8 0 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G +L1_SingleMu18 9 150 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G +L1_SingleMu20 10 0 Mu HIGGS,EXO +L1_SingleMu22 11 1 Mu +L1_SingleMu25 12 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G +L1_SingleMu30 13 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G +L1_SingleMu10_LowQ 21 450 Mu # 450 Andrea, 200 Ben +### SingleMuer 31 - 60 +L1_SingleMu14er 31 0 Mu HIGGS,EXO,SMP,SUSY,B2G +L1_SingleMu16er 32 150 Mu HIGGS,EXO,SMP +L1_SingleMu18er 33 0 Mu +L1_SingleMu20er 34 1 Mu HIGGS,EXO +L1_SingleMu22er 35 1 Mu +L1_SingleMu25er 36 1 Mu +L1_SingleMu30er 37 1 Mu + +### DoubleMu 61-80 +L1_DoubleMuOpen 60 0 Mu BPH +L1_DoubleMu0 61 450 Mu BPH +L1_DoubleMu_10_Open 62 0 Mu +L1_DoubleMu_10_3p5 63 0 Mu TOP,HIGGS,EXO,SMP,SUSY,B2G +L1_DoubleMu_11_4 64 0 Mu +L1_DoubleMu_12_5 65 1 Mu TOP,HIGGS,EXO,SMP,SUSY,B2G +L1_DoubleMu_13_6 66 1 Mu +L1_DoubleMu_15_5 67 1 Mu +L1_DoubleMu_12_8 68 1 Mu +L1_DoubleMu0er1p6_dEta_Max1p8 69 160 Mu BPH +L1_DoubleMu0er1p6_dEta_Max1p8_OS 70 0 Mu BPH # 0 charge for OMTF, cause higher rate +L1_DoubleMu0er1p4_dEta_Max1p8_OS 71 1 Mu BPH # 0 charge for OMTF, cause higher rate +L1_DoubleMu_10_0_dEta_Max1p8 72 0 Mu BPH #1kHz pure rate, might go back if we have more rate +### TripleMu 81-90 +L1_TripleMu0 81 1 Mu HIGGS,BPH +L1_TripleMu_5_5_3 82 1 Mu HIGGS +L1_TripleMu_5_0_0 83 1 Mu HIGGS +### QuadMu 91-100 +L1_QuadMu0 91 1 Mu BPH + +### SingleEG 101-120 +L1_SingleEG5 101 70000 EG +L1_SingleEG10 102 10000 EG # 10000 Andrea, 8000 SUSY +L1_SingleEG15 103 2500 EG +L1_SingleEG18 104 5000 EG # 6400 Andrea, 3000 SUSY +L1_SingleEG24 105 3000 EG +L1_SingleEG26 106 400 EG +L1_SingleEG28 107 0 EG +L1_SingleEG30 108 0 EG +L1_SingleEG32 109 0 EG +L1_SingleEG34 110 1 EG EXO,SMP #Stage1 EG30, Eff39 +L1_SingleEG36 111 1 EG EXO,SMP #Stage1 EG30, Eff39 +L1_SingleEG40 112 1 EG EXO #Stage1 EG35, Eff45 +L1_SingleEG45 113 1 EG HIGGS,SMP #Stage1 EG40, Eff51 +### SingleIsoEG 121-140 +L1_SingleIsoEG18 121 0 EG +L1_SingleIsoEG20 122 0 EG +L1_SingleIsoEG22 123 0 EG +L1_SingleIsoEG24 124 0 EG #Stage1 EG20, Eff29 +L1_SingleIsoEG26 125 0 EG +L1_SingleIsoEG28 126 0 EG +L1_SingleIsoEG30 127 0 EG +L1_SingleIsoEG32 128 1 EG +L1_SingleIsoEG34 129 1 EG +L1_SingleIsoEG36 130 1 EG +### SingleIsoEGer 141-160 +L1_SingleIsoEG16er 140 0 EG #Stage1 EG15, Eff25 +L1_SingleIsoEG18er 141 0 EG #Stage1 EG15, Eff25 +L1_SingleIsoEG20er 142 0 EG +L1_SingleIsoEG22er 143 0 EG HIGGS +L1_SingleIsoEG24er 144 0 EG +L1_SingleIsoEG26er 145 0 EG +L1_SingleIsoEG28er 146 0 EG +L1_SingleIsoEG30er 147 1 EG +L1_SingleIsoEG32er 148 1 EG +L1_SingleIsoEG34er 149 1 EG TOP,HIGGS,EXO,SMP,SUSY,B2G #Stage1 EG30, Eff39 +### DoubleEG 161 - 180 +L1_DoubleEG_15_10 161 0 EG #8kHz pure rate +L1_DoubleEG_18_17 162 0 EG TOP,HIGGS,EXO,SMP,SUSY,B2G #map to Stage1 L1_DoubleEG_15_10 +L1_DoubleEG_20_18 163 0 EG +L1_DoubleEG_22_10 165 0 EG +L1_DoubleEG_23_10 166 1 EG #map to Stage1 L1_DoubleEG_22_10 +L1_DoubleEG_24_17 167 1 EG #map to Stage1 L1_DoubleEG_22_10 +L1_DoubleEG_22_12 168 0 EG # from Simone's menu,800Hz pure rate +L1_DoubleEG_22_15 169 0 EG # created by ZW +L1_DoubleEG_25_12 170 1 EG +### TripleEG 181-190 +L1_TripleEG_14_10_8 181 0 EG HIGGS +L1_TripleEG_18_17_8 182 1 EG HIGGS #map to Stage1 L1_TripleEG_15_10_8 +### QuadEG 191-200 + +### SingleJet 201-220 +L1_SingleJet16 201 0 Jet +L1_SingleJet20 202 0 Jet +L1_SingleJet35 203 4000 Jet +L1_SingleJet60 204 1500 Jet EXO,SMP # Prescale 840 from CMSHLT-725 +L1_SingleJet90 205 2000 Jet SMP +L1_SingleJet120 206 180 Jet EXO,SMP,SUSY,B2G +L1_SingleJet140 207 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet150 208 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet160 209 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet170 210 1 Jet EXO,SMP,SUSY,B2G +L1_SingleJet180 211 1 Jet EXO,SMP,SUSY,B2G +L1_SingleJet200 212 1 Jet EXO,SMP,SUSY,B2G +### DoubleJet 221-240 +L1_DoubleJetC40 221 0 Jet +L1_DoubleJetC50 222 0 Jet +L1_DoubleJetC60 223 0 Jet +L1_DoubleJetC80 224 0 Jet +L1_DoubleJetC100 225 1 Jet EXO,SUSY +L1_DoubleJetC112 226 1 Jet EXO,SUSY +L1_DoubleJetC120 227 1 Jet EXO,SUSY +L1_DoubleJet8_ForwardBackward 231 0 Jet # CMSHLT-719 +L1_DoubleJet12_ForwardBackward 232 0 Jet # CMSHLT-719 +L1_DoubleJet16_ForwardBackward 233 0 Jet # CMSHLT-719 + +### TripleJet 241-250 +L1_TripleJet_84_68_48_VBF 241 0 Jet HIGGS +L1_TripleJet_88_72_56_VBF 242 1 Jet HIGGS +L1_TripleJet_92_76_64_VBF 243 1 Jet HIGGS +### QuadJet 251-260 +L1_QuadJetC40 251 0 Jet EXO,SUSY,B2G +L1_QuadJetC50 252 1 Jet EXO,SUSY,B2G +L1_QuadJetC60 253 1 Jet EXO,SUSY,B2G +### SingleTau 261-270 +L1_SingleTau80er 261 0 Tau +L1_SingleTau100er 262 0 Tau +L1_SingleTau120er 263 1 Tau # No rate yet. +### SingleIsoTau 271-280 + +### DoubleTau 281-290 +L1_DoubleIsoTau26er 281 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau27er 282 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau28er 283 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau29er 284 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau30er 285 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau32er 286 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau33er 287 1 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau34er 288 1 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau35er 289 1 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau36er 290 1 Tau HIGGS,EXO,SUSY +L1_DoubleTau50er 291 1 Tau HIGGS,EXO,SUSY + +### HTT 301-320 +L1_HTT120 301 45000 Sum EXO,SUSY,B2G # 50000 Andrea, 30000 SUSY +L1_HTT160 302 10500 Sum EXO,SUSY,B2G # 0 Andrea, 9000 SUSY +L1_HTT200 303 0 Sum EXO,SUSY,B2G +L1_HTT220 304 7500 Sum EXO,SUSY,B2G +L1_HTT240 305 0 Sum EXO,SUSY,B2G +L1_HTT255 306 0 Sum EXO,SUSY,B2G +L1_HTT270 307 0 Sum EXO,SUSY,B2G +L1_HTT280 308 0 Sum EXO,SUSY,B2G +L1_HTT300 309 1 Sum EXO,SUSY,B2G +L1_HTT320 310 1 Sum EXO,SUSY,B2G + +#### HTM 321-340 +# L1_HTM50 321 1 Sum EXO +# L1_HTM70 322 1 Sum EXO +# L1_HTM80 323 1 Sum EXO +# L1_HTM100 324 1 Sum EXO +# L1_HTM120 325 1 Sum EXO +# L1_HTM130 326 1 Sum EXO +# L1_HTM140 327 1 Sum EXO +# L1_HTM150 328 1 Sum EXO +#### ETT +# L1_ETT40 341 1 Sum +# L1_ETT60 342 1 Sum +#### ETM +L1_ETM30 361 0 Sum +L1_ETM40 362 0 Sum +L1_ETM50 363 0 Sum +L1_ETM60 364 250 Sum +L1_ETM70 365 0 Sum +L1_ETM75 366 0 Sum +L1_ETM80 367 1 Sum +L1_ETM85 368 1 Sum +L1_ETM90 369 1 Sum +L1_ETM95 370 1 Sum +L1_ETM100 371 1 Sum +L1_ETM120 372 1 Sum + +### Cross 401-500 +## MuEG 401-415 +L1_Mu5_EG15 401 0 MuEG HIGGS +L1_Mu5_EG20 402 0 MuEG HIGGS +L1_Mu5_EG23 403 1 MuEG HIGGS # Map to Stage 1 +L1_Mu5_IsoEG18 404 0 MuEG HIGGS +L1_Mu5_IsoEG20 405 1 MuEG HIGGS +L1_Mu12_EG10 406 0 MuEG HIGGS +L1_Mu20_EG15 407 1 MuEG HIGGS # L1_MU20_EG15 in v5 XML, to be corrected +L1_Mu20_EG17 408 1 MuEG HIGGS +L1_Mu23_IsoEG10 409 1 MuEG HIGGS +L1_Mu23_EG10 410 1 MuEG HIGGS +L1_Mu20_EG10 411 1 MuEG HIGGS +## CrossTau 416-430 +L1_Mu16er_Tau20er 414 0 MuTau HIGGS +L1_Mu16er_Tau24er 415 0 MuTau HIGGS +L1_Mu18er_Tau20er 416 1 MuTau HIGGS +L1_Mu18er_Tau24er 417 1 MuTau HIGGS +L1_Mu18er_IsoTau26er 418 0 MuTau # Use same quarlity as SingleMuer +L1_Mu20er_IsoTau26er 419 1 MuTau # Use same quarlity as SingleMuer + +## Rest +L1_DoubleMu7_EG14 431 1 MuEG HIGGS #Like Stage1 L1_DoubleMu7_EG7 +L1_DoubleMu7_EG7 432 1 MuEG HIGGS #Like Stage1 L1_DoubleMu7_EG7 +L1_Mu6_DoubleEG17 433 1 MuEG HIGGS +L1_Mu6_DoubleEG10 434 1 MuEG HIGGS +L1_Mu3_JetC16_dEta_Max0p4_dPhi_Max0p4 435 430 MuJet # CMSHLT_707, prescale to 0.15kHz +L1_Mu3_JetC60_dEta_Max0p4_dPhi_Max0p4 436 20 MuJet EXO # CMSHLT_707, prescale to 0.5kHz +L1_Mu6_HTT200 437 1 MuSum EXO +L1_Mu8_HTT150 438 0 MuSum SUSY +L1_EG27er_HTT200 439 1 EGSum HIGGS #322 pure rate, masked for now +L1_EG25er_HTT125 440 0 EGSum HIGGS #3kHz pure rate +L1_DoubleEG6_HTT255 441 1 EGSum SUSY +L1_QuadJetC36_Tau52 442 60 JetTau HIGGS +L1_DoubleJetC60_ETM60 446 0 EGSum HIGGS +L1_Mu0er_ETM40 447 0 MuSum HIGGS +L1_Mu0er_ETM55 448 0 MuSum HIGGS +L1_Mu10er_ETM30 449 0 MuSum HIGGS +L1_Mu10er_ETM50 450 1 MuSum HIGGS +L1_Mu14er_ETM30 451 0 MuSum HIGGS +L1_Mu3_JetC120_dEta_Max0p4_dPhi_Max0p4 461 1 MuJet BTV +L1_Mu3_JetC16 463 0 MuJet #BTV fallback +L1_Mu3_JetC60 465 0 MuJet #BTV fallback +L1_Mu3_JetC120 466 0 MuJet #BTV fallback + +L1_Jet32_DoubleMu_10_0_dPhi_Jet_Mu0_Max0p4_dPhi_Mu_Mu_Min1p0 444 90 MuJet SUSY #161Hz pure rate +L1_Jet32_Mu0_EG10_dPhi_Jet_Mu_Max0p4_dPhi_Mu_EG_Min1p0 445 170 MuJet SUSY #Map to Stage1 L1_Jet32MuOpen_EG10_dPhiMu_EG1 +L1_DoubleMu0_ETM40 467 0 MuSum SUSY +L1_DoubleMu0_ETM55 468 1 MuSum SUSY + +L1_IsoEG22er_Tau20er_dEta_Min0p2 443 0 EGTau HIGGS +L1_IsoEG22er_IsoTau26er_dEta_Min0p2 469 1 EGTau HIGGS +L1_IsoEG18er_IsoTau25er_dEta_Min0p2 471 0 EGTau HIGGS +L1_IsoEG20er_IsoTau25er_dEta_Min0p2 473 1 EGTau HIGGS +L1_ETM75_Jet60_dPhi_Min0p4 474 0 JetSum +L1_Mu20_IsoEG6 476 1 JetSum +#============================================================================# +#---------------------------- Fixed Rate ----------------------------# +#============================================================================# +# # L1_AlwaysTrue +# # L1_BptxPlus +# # L1_BptxMinus +# # L1_BptxOR +# # L1_SingleMuOpen_NotBptxOR_3BX +# # L1_SingleJetC20_NotBptxOR_3BX +# # L1_SingleJetC32_NotBptxOR_3BX +# # L1_SingleJetC36_NotBptxOR_3BX +# # L1_SingleMuOpen_NotBptxOR 454 -1 Mu #Assume 1kHz for all bptx triggers +# # L1_SingleJetC32_NotBptxOR 455 -1 Jet #Assume 1kHz for all bptx triggers +# # L1_SingleJetC20_NotBptxOR 456 -1 Jet #Assume 1kHz for all bptx triggers +# # L1_SingleEG2_BptxAND 457 -1 Jet #Assume 1kHz for all bptx triggers +# # L1_ETT15_BptxAND 458 -1 Sum #Assume 1kHz for all bptx triggers +# # L1_SingleJet8_BptxAND 459 -1 Jet #Assume 1kHz for all bptx triggers +# # L1_SingleJet12_BptxAND 460 -1 Jet #Assume 1kHz for all bptx triggers + +# vim: ft=python:nolbr:cc=88 diff --git a/macros/menu/Lumi1p6E34.txt b/macros/menu/Lumi1p6E34.txt new file mode 100644 index 0000000..8ce2003 --- /dev/null +++ b/macros/menu/Lumi1p6E34.txt @@ -0,0 +1,294 @@ +## Start with 100kHz for 1.2e34 +## Assume 20kHz for ETM, and ETM with HF rates +## Assume 1kHz for Zero bias (originally 10kHz) +## Assume bptx trigger rates are PU independant, get them from WBM +## Assume 1kHz for bxpt seeds (originally 2kHz) +## Assume 5kHz for prescale rate (masked in this menu) +## Menu rate = 100 - 20 - 1 - 1 - 5 = 73kHz + +## EG map from https://indico.cern.ch/event/493290/contribution/2/attachments/1221650/1786361/Zhenbin_Stage2_L1Menu.pdf +## HT map from https://indico.cern.ch/event/502206/contribution/2/attachments/1233163/1809079/Zhenbin_Stage2_Calov0.pdf + +## Re-organize L1 bit up to 511 +## 1 -100 > Mu +## 101-200 > EG +## 201-300 > Jet & Tau +## 301-400 > Sums +## 401-500 > Cross +## 500-511 > bptx + +#============================================================================# +#------------------------------ Config ------------------------------# +#============================================================================# +## Run 259721: PU=22, nB=517, Lumi=1.5E33, Tau option 5 +## Using this run to tune 1.15E34 menu column, PU=30 +## Scale = 517 * 1E34/1.5E33 = 3446.67 +## ZB 1.7kHZ if possbile, minimum 1kHz +# % nBunches = 3446.67 + +#============================================================================# +#------------------------------- Menu -------------------------------# +#============================================================================# +# L1Seed Bit Prescale POG PAG +# L1_ZeroBias 0 25409 Tech +### SingleMu 1-30 +L1_SingleMuOpen 2 30000 Mu +L1_SingleMu3 3 16000 Mu HIGGS,EXO,SUSY +L1_SingleMu5 4 0 Mu HIGGS,EXO,SUSY +L1_SingleMu7 5 200 Mu HIGGS,EXO,BPH,SUSY +L1_SingleMu12 6 0 Mu HIGGS,SUSY +L1_SingleMu14 7 0 Mu +L1_SingleMu16 8 0 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G +L1_SingleMu18 9 200 Mu TOP,HIGGS,EXO,SMP,BPH,SUSY,B2G +L1_SingleMu20 10 0 Mu HIGGS,EXO +L1_SingleMu22 11 0 Mu +L1_SingleMu25 12 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G +L1_SingleMu30 13 1 Mu TOP,HIGGS,EXO,SMP,BPH,B2G +L1_SingleMu10_LowQ 21 600 Mu # 450 Andrea, 200 Ben +### SingleMuer 31 - 60 +L1_SingleMu14er 31 0 Mu HIGGS,EXO,SMP,SUSY,B2G +L1_SingleMu16er 32 200 Mu HIGGS,EXO,SMP +L1_SingleMu18er 33 0 Mu +L1_SingleMu20er 34 0 Mu HIGGS,EXO +L1_SingleMu22er 35 1 Mu +L1_SingleMu25er 36 1 Mu +L1_SingleMu30er 37 1 Mu + +### DoubleMu 61-80 +L1_DoubleMuOpen 60 0 Mu BPH +L1_DoubleMu0 61 600 Mu BPH +L1_DoubleMu_10_Open 62 0 Mu +L1_DoubleMu_10_3p5 63 0 Mu TOP,HIGGS,EXO,SMP,SUSY,B2G +L1_DoubleMu_11_4 64 0 Mu +L1_DoubleMu_12_5 65 1 Mu TOP,HIGGS,EXO,SMP,SUSY,B2G +L1_DoubleMu_13_6 66 1 Mu +L1_DoubleMu_15_5 67 1 Mu +L1_DoubleMu_12_8 68 1 Mu +L1_DoubleMu0er1p6_dEta_Max1p8 69 300 Mu BPH +L1_DoubleMu0er1p6_dEta_Max1p8_OS 70 0 Mu BPH # 0 charge for OMTF, cause higher rate +L1_DoubleMu0er1p4_dEta_Max1p8_OS 71 1 Mu BPH # 0 charge for OMTF, cause higher rate +L1_DoubleMu_10_0_dEta_Max1p8 72 0 Mu BPH #1kHz pure rate, might go back if we have more rate +### TripleMu 81-90 +L1_TripleMu0 81 0 Mu HIGGS,BPH +L1_TripleMu_5_5_3 82 1 Mu HIGGS +L1_TripleMu_5_0_0 83 1 Mu HIGGS +### QuadMu 91-100 +L1_QuadMu0 91 1 Mu BPH + +### SingleEG 101-120 +L1_SingleEG5 101 80000 EG +L1_SingleEG10 102 80000 EG # 10000 Andrea, 8000 SUSY +L1_SingleEG15 103 3000 EG +L1_SingleEG18 104 8000 EG # 6400 Andrea, 3000 SUSY +L1_SingleEG24 105 5000 EG +L1_SingleEG26 106 500 EG +L1_SingleEG28 107 0 EG +L1_SingleEG30 108 0 EG +L1_SingleEG32 109 0 EG +L1_SingleEG34 110 0 EG EXO,SMP #Stage1 EG30, Eff39 +L1_SingleEG36 111 1 EG EXO,SMP #Stage1 EG30, Eff39 +L1_SingleEG40 112 1 EG EXO #Stage1 EG35, Eff45 +L1_SingleEG45 113 1 EG HIGGS,SMP #Stage1 EG40, Eff51 +### SingleIsoEG 121-140 +L1_SingleIsoEG18 121 0 EG +L1_SingleIsoEG20 122 0 EG +L1_SingleIsoEG22 123 0 EG +L1_SingleIsoEG24 124 0 EG #Stage1 EG20, Eff29 +L1_SingleIsoEG26 125 0 EG +L1_SingleIsoEG28 126 0 EG +L1_SingleIsoEG30 127 0 EG +L1_SingleIsoEG32 128 0 EG +L1_SingleIsoEG34 129 1 EG +L1_SingleIsoEG36 130 1 EG +### SingleIsoEGer 141-160 +L1_SingleIsoEG16er 140 0 EG #Stage1 EG15, Eff25 +L1_SingleIsoEG18er 141 0 EG #Stage1 EG15, Eff25 +L1_SingleIsoEG20er 142 0 EG +L1_SingleIsoEG22er 143 0 EG HIGGS +L1_SingleIsoEG24er 144 0 EG +L1_SingleIsoEG26er 145 0 EG +L1_SingleIsoEG28er 146 0 EG +L1_SingleIsoEG30er 147 0 EG +L1_SingleIsoEG32er 148 1 EG +L1_SingleIsoEG34er 149 1 EG TOP,HIGGS,EXO,SMP,SUSY,B2G #Stage1 EG30, Eff39 +### DoubleEG 161 - 180 +L1_DoubleEG_15_10 161 0 EG #8kHz pure rate +L1_DoubleEG_18_17 162 0 EG TOP,HIGGS,EXO,SMP,SUSY,B2G #map to Stage1 L1_DoubleEG_15_10 +L1_DoubleEG_20_18 163 0 EG +L1_DoubleEG_22_10 165 0 EG +L1_DoubleEG_23_10 166 0 EG #map to Stage1 L1_DoubleEG_22_10 +L1_DoubleEG_24_17 167 1 EG #map to Stage1 L1_DoubleEG_22_10 +L1_DoubleEG_22_12 168 0 EG # from Simone's menu,800Hz pure rate +L1_DoubleEG_22_15 169 0 EG # created by ZW +L1_DoubleEG_25_12 170 1 EG +### TripleEG 181-190 +L1_TripleEG_14_10_8 181 0 EG HIGGS +L1_TripleEG_18_17_8 182 1 EG HIGGS #map to Stage1 L1_TripleEG_15_10_8 +### QuadEG 191-200 + +### SingleJet 201-220 +L1_SingleJet16 201 0 Jet +L1_SingleJet20 202 0 Jet +L1_SingleJet35 203 5000 Jet +L1_SingleJet60 204 2000 Jet EXO,SMP # Prescale 840 from CMSHLT-725 +L1_SingleJet90 205 3000 Jet SMP +L1_SingleJet120 206 300 Jet EXO,SMP,SUSY,B2G +L1_SingleJet140 207 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet150 208 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet160 209 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet170 210 0 Jet EXO,SMP,SUSY,B2G +L1_SingleJet180 211 1 Jet EXO,SMP,SUSY,B2G +L1_SingleJet200 212 1 Jet EXO,SMP,SUSY,B2G +### DoubleJet 221-240 +L1_DoubleJetC40 221 0 Jet +L1_DoubleJetC50 222 0 Jet +L1_DoubleJetC60 223 0 Jet +L1_DoubleJetC80 224 0 Jet +L1_DoubleJetC100 225 0 Jet EXO,SUSY +L1_DoubleJetC112 226 1 Jet EXO,SUSY +L1_DoubleJetC120 227 1 Jet EXO,SUSY +L1_DoubleJet8_ForwardBackward 231 0 Jet # CMSHLT-719 +L1_DoubleJet12_ForwardBackward 232 0 Jet # CMSHLT-719 +L1_DoubleJet16_ForwardBackward 233 0 Jet # CMSHLT-719 + +### TripleJet 241-250 +L1_TripleJet_84_68_48_VBF 241 0 Jet HIGGS +L1_TripleJet_88_72_56_VBF 242 0 Jet HIGGS +L1_TripleJet_92_76_64_VBF 243 1 Jet HIGGS +### QuadJet 251-260 +L1_QuadJetC40 251 0 Jet EXO,SUSY,B2G +L1_QuadJetC50 252 1 Jet EXO,SUSY,B2G +L1_QuadJetC60 253 1 Jet EXO,SUSY,B2G +### SingleTau 261-270 +L1_SingleTau80er 261 0 Tau +L1_SingleTau100er 262 0 Tau +L1_SingleTau120er 263 1 Tau # No rate yet. +### SingleIsoTau 271-280 + +### DoubleTau 281-290 +L1_DoubleIsoTau26er 281 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau27er 282 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau28er 283 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau29er 284 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau30er 285 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau32er 286 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau33er 287 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau34er 288 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau35er 289 0 Tau HIGGS,EXO,SUSY +L1_DoubleIsoTau36er 290 1 Tau HIGGS,EXO,SUSY +L1_DoubleTau50er 291 1 Tau HIGGS,EXO,SUSY + +### HTT 301-320 +L1_HTT120 301 60000 Sum EXO,SUSY,B2G # 50000 Andrea, 30000 SUSY +L1_HTT160 302 20000 Sum EXO,SUSY,B2G # 0 Andrea, 9000 SUSY +L1_HTT200 303 0 Sum EXO,SUSY,B2G +L1_HTT220 304 8000 Sum EXO,SUSY,B2G +L1_HTT240 305 0 Sum EXO,SUSY,B2G +L1_HTT255 306 0 Sum EXO,SUSY,B2G +L1_HTT270 307 0 Sum EXO,SUSY,B2G +L1_HTT280 308 0 Sum EXO,SUSY,B2G +L1_HTT300 309 1 Sum EXO,SUSY,B2G +L1_HTT320 310 1 Sum EXO,SUSY,B2G + +#### HTM 321-340 +# L1_HTM50 321 1 Sum EXO +# L1_HTM70 322 1 Sum EXO +# L1_HTM80 323 1 Sum EXO +# L1_HTM100 324 1 Sum EXO +# L1_HTM120 325 1 Sum EXO +# L1_HTM130 326 1 Sum EXO +# L1_HTM140 327 1 Sum EXO +# L1_HTM150 328 1 Sum EXO +#### ETT +# L1_ETT40 341 1 Sum +# L1_ETT60 342 1 Sum +#### ETM +L1_ETM30 361 0 Sum +L1_ETM40 362 0 Sum +L1_ETM50 363 0 Sum +L1_ETM60 364 250 Sum +L1_ETM70 365 0 Sum +L1_ETM75 366 0 Sum +L1_ETM80 367 0 Sum +L1_ETM85 368 0 Sum +L1_ETM90 369 1 Sum +L1_ETM95 370 1 Sum +L1_ETM100 371 1 Sum +L1_ETM120 372 1 Sum + +### Cross 401-500 +## MuEG 401-415 +L1_Mu5_EG15 401 0 MuEG HIGGS +L1_Mu5_EG20 402 0 MuEG HIGGS +L1_Mu5_EG23 403 1 MuEG HIGGS # Map to Stage 1 +L1_Mu5_IsoEG18 404 0 MuEG HIGGS +L1_Mu5_IsoEG20 405 1 MuEG HIGGS +L1_Mu12_EG10 406 0 MuEG HIGGS +L1_Mu20_EG15 407 1 MuEG HIGGS # L1_MU20_EG15 in v5 XML, to be corrected +L1_Mu20_EG17 408 1 MuEG HIGGS +L1_Mu23_IsoEG10 409 1 MuEG HIGGS +L1_Mu23_EG10 410 1 MuEG HIGGS +L1_Mu20_EG10 411 0 MuEG HIGGS +## CrossTau 416-430 +L1_Mu16er_Tau20er 414 0 MuTau HIGGS +L1_Mu16er_Tau24er 415 0 MuTau HIGGS +L1_Mu18er_Tau20er 416 1 MuTau HIGGS +L1_Mu18er_Tau24er 417 1 MuTau HIGGS +L1_Mu18er_IsoTau26er 418 0 MuTau # Use same quarlity as SingleMuer +L1_Mu20er_IsoTau26er 419 0 MuTau # Use same quarlity as SingleMuer + +## Rest +L1_DoubleMu7_EG14 431 1 MuEG HIGGS #Like Stage1 L1_DoubleMu7_EG7 +L1_DoubleMu7_EG7 432 1 MuEG HIGGS #Like Stage1 L1_DoubleMu7_EG7 +L1_Mu6_DoubleEG17 433 1 MuEG HIGGS +L1_Mu6_DoubleEG10 434 1 MuEG HIGGS +L1_Mu3_JetC16_dEta_Max0p4_dPhi_Max0p4 435 430 MuJet # CMSHLT_707, prescale to 0.15kHz +L1_Mu3_JetC60_dEta_Max0p4_dPhi_Max0p4 436 20 MuJet EXO # CMSHLT_707, prescale to 0.5kHz +L1_Mu6_HTT200 437 1 MuSum EXO +L1_Mu8_HTT150 438 0 MuSum SUSY +L1_EG27er_HTT200 439 1 EGSum HIGGS #322 pure rate, masked for now +L1_EG25er_HTT125 440 0 EGSum HIGGS #3kHz pure rate +L1_DoubleEG6_HTT255 441 1 EGSum SUSY +L1_QuadJetC36_Tau52 442 60 JetTau HIGGS +L1_DoubleJetC60_ETM60 446 0 EGSum HIGGS +L1_Mu0er_ETM40 447 0 MuSum HIGGS +L1_Mu0er_ETM55 448 0 MuSum HIGGS +L1_Mu10er_ETM30 449 0 MuSum HIGGS +L1_Mu10er_ETM50 450 0 MuSum HIGGS +L1_Mu14er_ETM30 451 0 MuSum HIGGS +L1_Mu3_JetC120_dEta_Max0p4_dPhi_Max0p4 461 1 MuJet BTV +L1_Mu3_JetC16 463 0 MuJet #BTV fallback +L1_Mu3_JetC60 465 0 MuJet #BTV fallback +L1_Mu3_JetC120 466 0 MuJet #BTV fallback + +L1_Jet32_DoubleMu_10_0_dPhi_Jet_Mu0_Max0p4_dPhi_Mu_Mu_Min1p0 444 100 MuJet SUSY #161Hz pure rate +L1_Jet32_Mu0_EG10_dPhi_Jet_Mu_Max0p4_dPhi_Mu_EG_Min1p0 445 190 MuJet SUSY #Map to Stage1 L1_Jet32MuOpen_EG10_dPhiMu_EG1 +L1_DoubleMu0_ETM40 467 0 MuSum SUSY +L1_DoubleMu0_ETM55 468 1 MuSum SUSY + +L1_IsoEG22er_Tau20er_dEta_Min0p2 443 0 EGTau HIGGS +L1_IsoEG22er_IsoTau26er_dEta_Min0p2 469 1 EGTau HIGGS +L1_IsoEG18er_IsoTau25er_dEta_Min0p2 471 0 EGTau HIGGS +L1_IsoEG20er_IsoTau25er_dEta_Min0p2 473 0 EGTau HIGGS +L1_ETM75_Jet60_dPhi_Min0p4 474 0 JetSum +L1_Mu20_IsoEG6 476 1 JetSum +#============================================================================# +#---------------------------- Fixed Rate ----------------------------# +#============================================================================# +# # L1_AlwaysTrue +# # L1_BptxPlus +# # L1_BptxMinus +# # L1_BptxOR +# # L1_SingleMuOpen_NotBptxOR_3BX +# # L1_SingleJetC20_NotBptxOR_3BX +# # L1_SingleJetC32_NotBptxOR_3BX +# # L1_SingleJetC36_NotBptxOR_3BX +# # L1_SingleMuOpen_NotBptxOR 454 -1 Mu #Assume 1kHz for all bptx triggers +# # L1_SingleJetC32_NotBptxOR 455 -1 Jet #Assume 1kHz for all bptx triggers +# # L1_SingleJetC20_NotBptxOR 456 -1 Jet #Assume 1kHz for all bptx triggers +# # L1_SingleEG2_BptxAND 457 -1 Jet #Assume 1kHz for all bptx triggers +# # L1_ETT15_BptxAND 458 -1 Sum #Assume 1kHz for all bptx triggers +# # L1_SingleJet8_BptxAND 459 -1 Jet #Assume 1kHz for all bptx triggers +# # L1_SingleJet12_BptxAND 460 -1 Jet #Assume 1kHz for all bptx triggers + +# vim: ft=python:nolbr:cc=88 From 008f5d971732e46c40ba48434fb53598ee026183 Mon Sep 17 00:00:00 2001 From: jingyu zhang Date: Thu, 14 Jul 2016 00:02:32 +0200 Subject: [PATCH 2/3] add some plots to BasicRatePlots --- macros/BasicRatePlots.C | 703 ++++++++++++++++++++++++++----------- macros/Makefile | 1 - macros/RunL1Menu2016.cc | 8 +- macros/getDistributions.C | 82 +++++ macros/getReWeightValue.py | 25 ++ 5 files changed, 606 insertions(+), 213 deletions(-) create mode 100644 macros/getDistributions.C create mode 100644 macros/getReWeightValue.py diff --git a/macros/BasicRatePlots.C b/macros/BasicRatePlots.C index 72ec8ee..c8f97c3 100644 --- a/macros/BasicRatePlots.C +++ b/macros/BasicRatePlots.C @@ -23,26 +23,32 @@ public : } ~BasicRatePlots() {} - void run(bool runOnData, std::string resultTag, float crossSec, int nBunches, int isCrossSec, int nEvents = 0); - + void run(bool runOnData, std::string resultTag, float crossSec, int nBunches, int isCrossSec, int nEvents = 0, bool isReweight = false); + private : float ScaleFactor(float nZeroBias, float nBunches); - //void SingleJetPt(Float_t& ptcut, Bool_t isCentral = false); - float SingleMuEta(float eta); - //void SingleEGPt(Float_t& ptcut, Bool_t isIsolated, Bool_t isER); + void SingleJetPt(Float_t& ptcut, Bool_t isCentral = false); + float SingleMuEta(float ptcut); + void SingleMuPt(Float_t& ptcut, Bool_t isER, float ErMu); + float SecondMuEta(float ptcut); + void SingleMuEtaRate(Float_t& etaCut, float ptCut, bool doIso); + void SingleEGPt(Float_t& ptcut, Bool_t isIsolated, Bool_t isER, float Er); float SingleEGEta(float ptCut, bool doIso); + float SingleEGIEta(float ptCut, bool doIso); + void SingleEGEtaRate(Float_t& etaCut, float ptCut, bool doIso); float SingleJetEta(float pt, Int_t accept_flag = 0); void setRateError(TH1F* histo); - //void ETMVal(Float_t& ETMcut); - //void HTTVal(Float_t& HTTcut); - //void HTMVal(Float_t& HTMcut); - //void ETTVal(Float_t& ETTcut); + void ETMVal(Float_t& ETMcut); + void HTTVal(Float_t& HTTcut); + void HTMVal(Float_t& HTMcut); + void ETTVal(Float_t& ETTcut); std::map hTH1F; std::map hTH2F; + std::map hCountTH1F; }; // ------------------------------------------------------------------ @@ -68,6 +74,7 @@ float BasicRatePlots::SingleMuEta(float ptCut ) { { Int_t bx = upgrade_ -> muonBx.at(imu); if(bx != 0) continue; + if((upgrade_->muonQual.at(imu)==4) or (upgrade_->muonQual.at(imu)==8)) continue; Float_t pt = upgrade_ -> muonEt.at(imu); if ( pt > maxPt) { @@ -76,14 +83,101 @@ float BasicRatePlots::SingleMuEta(float ptCut ) { } } - float eta = maxPt>ptCut ? upgrade_ -> muonEta.at(iMuMaxPt) : -10.; + float eta = maxPt>ptCut ? upgrade_ -> muonEta.at(iMuMaxPt) : -999.; + return eta; +} - //cout << "max mu pt = " << maxPt << " max eta = " << eta << endl; +float BasicRatePlots::SecondMuEta(float ptCut) { - return eta; + Float_t mu1ptmax = -10.; + Float_t mu2ptmax = -10.; + float eta1 = -10.; + float eta2 = -10.; + float aux = 0.; + + if(upgrade_->nMuons < 2) return -10.; + + for(UInt_t um=0; um < upgrade_ -> nMuons; um++) { + Int_t bx = upgrade_ -> muonBx.at(um); + if(bx != 0) continue; + if(upgrade_->muonQual.at(um)==4) continue; + + Float_t pt = upgrade_ -> muonEt.at(um); // the rank of the electron + if(pt >= mu1ptmax) { + mu2ptmax = mu1ptmax; + mu1ptmax = pt; + } + else if(pt >= mu2ptmax) { + mu2ptmax = pt; + } + } + + if(mu2ptmax < ptCut) return -10.; + + for(UInt_t um=0; um < upgrade_ -> nMuons; um++) { + if (upgrade_->muonEt.at(um)==mu1ptmax) { + eta1=upgrade_ -> muonEta.at(um); + aux = um; + break; + } + } + + //std::cout<<"aux: "< nMuons; um++) { + if (upgrade_->muonEt.at(um)==mu2ptmax && um != aux) { + eta2=upgrade_ -> muonEta.at(um); + break; + } + } + + //std::cout<<"pt1: "< nMuons; um++) { + Int_t bx = upgrade_ -> muonBx.at(um); + if(bx != 0) continue; + Float_t eta = upgrade_ -> muonEta.at(um); + if(fabs(eta) > ErMu && isER) continue; + if((upgrade_->muonQual.at(um)==4) or (upgrade_->muonQual.at(um)==8)) continue; + + Float_t pt = upgrade_ -> muonEt.at(um); // the rank of the electron + if(pt >= ptmax) ptmax = pt; + } + + cut = ptmax; + return; } +void BasicRatePlots::SingleMuEtaRate(Float_t& etaCut, float ptCut, bool doIso) { + + Float_t etamax = 10.; + for(UInt_t um=0; um < upgrade_ -> nMuons; um++) { + Int_t bx = upgrade_ -> muonBx.at(um); + if(bx != 0) continue; + //if(upgrade_->muonQual.at(um)==0) continue; + //if(doIso && !(upgrade_ -> egIso.at(um))) continue; + if((upgrade_->muonQual.at(um)==4) or (upgrade_->muonQual.at(um)==8)) continue; + Float_t pt = upgrade_ -> muonEt.at(um); + if(pt < ptCut) continue; + + Float_t eta = fabs(upgrade_ -> muonEta.at(um)); + if(eta <= etamax) etamax = eta; + } + + etaCut = etamax; + return; +} float BasicRatePlots::SingleEGEta(float ptCut, bool doIso) { @@ -106,48 +200,84 @@ float BasicRatePlots::SingleEGEta(float ptCut, bool doIso) { return iEGMaxPt>=0 && maxPt>ptCut ? upgrade_ -> egEta.at(iEGMaxPt) : -10.; } -//void BasicRatePlots::SingleEGPt(Float_t& cut, Bool_t isIsolated , Bool_t isER) { +float BasicRatePlots::SingleEGIEta(float ptCut, bool doIso) { - - ////if(nEGs < 1) return; + float maxPt = -10; + float iEGMaxPt = -999; + + for (UInt_t ue=0; ue < upgrade_ -> nEGs; ue++) { + Int_t bx = upgrade_ -> egBx.at(ue); + if (bx != 0) continue; + Bool_t iso = upgrade_ -> egIso.at(ue); + if (!iso && doIso) continue; + Float_t pt = upgrade_ -> egEt.at(ue); + if ( pt >= maxPt) + { + maxPt = pt; + iEGMaxPt = ue; + } + } - //Float_t ptmax = -10.; + return iEGMaxPt>=0 && maxPt>ptCut ? upgrade_ -> egIEta.at(iEGMaxPt) : -999.; +} - //for(UInt_t ue=0; ue < upgrade_ -> nEGs; ue++) { - //Int_t bx = upgrade_ -> egBx.at(ue); - //if(bx != 0) continue; - //if(isIsolated && !(upgrade_ -> egIso.at(ue))) continue; - //Float_t eta = upgrade_ -> egEta.at(ue); - //if(fabs(eta) > 2.1 && isER) continue; // eta = 5 - 16 +void BasicRatePlots::SingleEGPt(Float_t& cut, Bool_t isIsolated , Bool_t isER, float Er) { - //Float_t pt = upgrade_ -> egEt.at(ue); // the rank of the electron - //if(pt >= ptmax) ptmax = pt; - //} + Float_t ptmax = -10.; - //cut = ptmax; + for(UInt_t ue=0; ue < upgrade_ -> nEGs; ue++) { + Int_t bx = upgrade_ -> egBx.at(ue); + if(bx != 0) continue; + if(isIsolated && !(upgrade_ -> egIso.at(ue))) continue; + Float_t eta = upgrade_ -> egEta.at(ue); + if(fabs(eta) > Er && isER) continue; // eta = 5 - 16 - //return; -//} + Float_t pt = upgrade_ -> egEt.at(ue); // the rank of the electron + if(pt >= ptmax) ptmax = pt; + } + + cut = ptmax; + return; +} -//void BasicRatePlots::SingleJetPt(Float_t& cut, Bool_t isCentral) { +void BasicRatePlots::SingleEGEtaRate(Float_t& etaCut, float ptCut, bool doIso) { - //Float_t ptmax = -10.; - //Int_t Nj = upgrade_ -> nJets ; - //for(Int_t ue=0; ue < Nj; ue++) { - //Int_t bx = upgrade_ -> jetBx.at(ue); - //if(bx != 0) continue; - //Bool_t isFwdJet = fabs(upgrade_ -> jetEta.at(ue)) > 3. ? true : false; - //if(isCentral && isFwdJet) continue; - ////if(NOTauInJets && upgrade_->Taujet[ue]) continue; - ////if(isCentral && noHF && (upgrade_->jetEta.at(ue) < 5 || upgrade_->jetEta.at(ue) > 17)) continue; + Float_t etamax = 10.; + + for(UInt_t ue=0; ue nEGs; ue++) { + Int_t bx = upgrade_ -> egBx.at(ue); + if (bx !=0) continue; + if(doIso && !(upgrade_ -> egIso.at(ue))) continue; + Float_t pt = upgrade_ -> egEt.at(ue); + if(pt < ptCut) continue; + + Float_t eta = fabs(upgrade_ -> egEta.at(ue)); + if(eta <= etamax) etamax = eta; + } + + etaCut = etamax; + return; +} - //Float_t pt = upgrade_ -> jetEt.at(ue); - //if(pt >= ptmax) ptmax = pt; - //} +void BasicRatePlots::SingleJetPt(Float_t& cut, Bool_t isCentral) { - //cut = ptmax; - //return; -//} + Float_t ptmax = -10.; + Int_t Nj = upgrade_ -> nJets ; + for(Int_t ue=0; ue < Nj; ue++) { + Int_t bx = upgrade_ -> jetBx.at(ue); + if(bx != 0) continue; + Bool_t isFwdJet = fabs(upgrade_ -> jetEta.at(ue)) > 3. ? true : false; + if(isCentral && isFwdJet) continue; + //if(NOTauInJets && upgrade_->Taujet[ue]) continue; + //if(isCentral && noHF && (upgrade_->jetEta.at(ue) < 5 || upgrade_->jetEta.at(ue) > 17)) continue; + + Float_t pt = upgrade_ -> jetEt.at(ue); + if(pt >= ptmax) ptmax = pt; + } + + cut = ptmax; + return; +} float BasicRatePlots::SingleJetEta(float ptCut, Int_t accept_flag) { @@ -172,37 +302,46 @@ float BasicRatePlots::SingleJetEta(float ptCut, Int_t accept_flag) { return iJetMaxPt>=0 && maxPt>ptCut ? upgrade_ -> jetEta.at(iJetMaxPt) : -10.; } -//void BasicRatePlots::ETMVal(Float_t& ETMcut ) { - - //Float_t TheETM = -10; - //if(upgrade_ ->sumBx[2]==0) TheETM =upgrade_ ->sumEt[2]; - //ETMcut = TheETM; - //return; -//} +void BasicRatePlots::ETMVal(Float_t& ETMcut ) { + + Float_t TheETM = -10; + int idx = GetSumEtIdx(EtSumType::ETM); + assert(upgrade_->sumType.at(idx) == EtSumType::ETM); + //std::cout<<"ETM: "<sumBx.at(idx)==0) TheETM =upgrade_->sumEt.at(idx); + ETMcut = TheETM; + return; +} -//void BasicRatePlots::HTTVal(Float_t& HTTcut) { +void BasicRatePlots::HTTVal(Float_t& HTTcut) { - //Float_t TheHTT = -10; - //if(upgrade_ ->sumBx[1]==0) TheHTT =upgrade_ ->sumEt[1]; - //HTTcut = TheHTT; - //return; -//} + Float_t TheHTT = -10; + int idx= GetSumEtIdx(EtSumType::HTT); + assert(upgrade_->sumType.at(idx) == EtSumType::HTT); + if(upgrade_->sumBx.at(idx)==0) TheHTT =upgrade_->sumEt.at(idx); + HTTcut = TheHTT; + return; +} -//void BasicRatePlots::HTMVal(Float_t& HTMcut) { +void BasicRatePlots::HTMVal(Float_t& HTMcut) { - //Float_t TheHTM = -10; - //if (upgrade_ ->sumBx[3]==0) TheHTM = upgrade_ ->sumEt[3]; - //HTMcut = TheHTM; - //return; -//} + Float_t TheHTM = -10; + int idx= GetSumEtIdx(EtSumType::HTM); + assert(upgrade_->sumType.at(idx) == EtSumType::HTM); + if(upgrade_->sumBx.at(idx)==0) TheHTM =upgrade_->sumEt.at(idx); + HTMcut = TheHTM; + return; +} -//void BasicRatePlots::ETTVal(Float_t& ETTcut) { +void BasicRatePlots::ETTVal(Float_t& ETTcut) { - //Float_t TheETT = -10; - //if(upgrade_ ->sumBx[0]==0) TheETT = upgrade_ ->sumEt[0]; - //ETTcut = TheETT; - //return; -//} + Float_t TheETT = -10; + int idx= GetSumEtIdx(EtSumType::ETT); + assert(upgrade_->sumType.at(idx) == EtSumType::ETT); + if(upgrade_->sumBx.at(idx)==0) TheETT =upgrade_->sumEt.at(idx); + ETTcut = TheETT; + return; +} void BasicRatePlots::setRateError(TH1F* histo) { @@ -221,34 +360,64 @@ void BasicRatePlots::setRateError(TH1F* histo) { // -------------------------------------------------------------------- -void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, int nBunches, int isCrossSec, int nEvents) { +void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, int nBunches, int isCrossSec, int nEvents, bool isReweight) { system("mkdir -p results"); - std::string resultName = "results/results_" + resultTag + (isCrossSec ? "_XSEC" : "_RATE") + ".root"; + std::string resultName = "/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/results/results_" + resultTag + (isCrossSec ? "_XSEC" : "_RATE") + ".root"; TFile *outFile = new TFile((resultName).c_str(),"recreate"); outFile->cd(); + float triggerTowerBinsWithHF[65]={-5.,-4.5,-4.,-3.5,-3.,-2.65,-2.5,-2.322,-2.172,-2.043,-1.93,-1.83,-1.74,-1.653,-1.566,-1.479,-1.392,-1.305,-1.218,-1.131,-1.044,-0.957,-0.87,-0.783,-0.696,-0.609,-0.522,-0.435,-0.348,-0.261,-0.174,-0.087,0.,0.087,0.174,0.261,0.348,0.435,0.522,0.609,0.696,0.783,0.87,0.957,1.044,1.131,1.218,1.305,1.392,1.479,1.566,1.653,1.74,1.83,1.93,2.043,2.172,2.322,2.5,2.65,3.,3.5,4.,4.5,5.}; + float triggerTowerBins[57]={-3.,-2.65,-2.5,-2.322,-2.172,-2.043,-1.93,-1.83,-1.74,-1.653,-1.566,-1.479,-1.392,-1.305,-1.218,-1.131,-1.044,-0.957,-0.87,-0.783,-0.696,-0.609,-0.522,-0.435,-0.348,-0.261,-0.174,-0.087,0.,0.087,0.174,0.261,0.348,0.435,0.522,0.609,0.696,0.783,0.87,0.957,1.044,1.131,1.218,1.305,1.392,1.479,1.566,1.653,1.74,1.83,1.93,2.043,2.172,2.322,2.5,2.65,3.}; + float absTriggerTowerBins[29]={0.,0.087,0.174,0.261,0.348,0.435,0.522,0.609,0.696,0.783,0.87,0.957,1.044,1.131,1.218,1.305,1.392,1.479,1.566,1.653,1.74,1.83,1.93,2.043,2.172,2.322,2.5,2.65,3.}; + //Event Counter hTH1F["nEvts"] = new TH1F("nEvts","Number of Events Processed",1,-0.5,.5); //Single stuff hTH1F["nJetVsPt"] = new TH1F("nJetVsPt","SingleJet; E_{T} cut; rate [Hz]",256,-0.5,255.5); hTH1F["nJetCenVsPt"] = new TH1F("nJetCenVsPt","SingleJetCentral; E_{T} cut; rate [Hz]",256,-0.5,255.5); - hTH1F["nEGVsPt"] = new TH1F("nEGVsPt","SingleEG; E_{T} cut; rate [Hz]",65,-0.5,64.5); - hTH1F["nEGErVsPt"] = new TH1F("nEGErVsPt","SingleEGer; E_{T} cut; rate [Hz]",65,-0.5,64.5); - hTH1F["nTauVsPt"] = new TH1F("nTauVsPt","SingleTau; E_{T} cut; rate [Hz]",65,-0.5,64.5); - hTH1F["nTauErVsPt"] = new TH1F("nTauErVsPt","SingleTauer; E_{T} cut; rate [Hz]",65,-0.5,64.5); + hTH1F["nTauErVsPt"] = new TH1F("nTauErVsPt","SingleTauer; E_{T} cut; rate [Hz]",129,-0.5,128.5); hTH1F["nIsoTauVsPt"] = new TH1F("nIsoTauVsPt","SingleIsoTau; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH1F["nIsoTauErVsPt"] = new TH1F("nIsoTauErVsPt","SingleIsoTauEr; E_{T} cut; rate [Hz]",65,-0.5,64.5); + hTH1F["nEGVsPt"] = new TH1F("nEGVsPt", "SingleEG; E_{T} cut; rate [Hz]",65,-0.5,64.5); + hTH1F["nEGErVsPt"] = new TH1F("nEGErVsPt", "SingleEGEr; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH1F["nIsoEGVsPt"] = new TH1F("nIsoEGVsPt","SingleIsoEGer; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH1F["nMuVsPt"] = new TH1F("nMuVsPt","SingleMu; p_{T} cut; rate [Hz]",131,-0.5,130.5); hTH1F["nMuErVsPt"] = new TH1F("nMuErVsPt","SingleMu |#eta|<2.1; p_{T} cut; rate [Hz]",131,-0.5,130.5); hTH1F["nMuVsEta"] = new TH1F("nMuVsEta","nMuVsEta",24,-2.4,2.4); - hTH1F["nEGVsEta"] = new TH1F("nEGVsEta","nEGVsEta",50,-3.,3.); - hTH1F["nIsoEGVsEta"] = new TH1F("nIsoEGVsEta","nIsoEGVsEta",50,-3.,3.); - hTH1F["nJetVsEta"] = new TH1F("nJetVsEta","nJetVsEta",50,-5.,5.); + hTH1F["nEGVsEta"] = new TH1F("nEGVsEta","nEGVsEta",56,triggerTowerBins); + hTH1F["nIsoEGVsEta"] = new TH1F("nIsoEGVsEta","nIsoEGVsEta",56,triggerTowerBins); + + hCountTH1F["nMuCountVsEta"] = new TH1F("nMuCountVsEta","nMuVsEta",24,-2.4,2.4); + hCountTH1F["nEGCountVsEta"] = new TH1F("nEGCountVsEta","nEGVsEta",56,triggerTowerBins); + hCountTH1F["nIsoEGCountVsEta"] = new TH1F("nIsoEGCountVsEta","nIsoEGVsEta",56,triggerTowerBins); + + //--------Rate w.r.t. different eta--------// + float ER[5] = {1.5,1.8,2.1,2.5,3.}; + float ERMu[3] = {0.8,1.2,2.5}; + for(int i=0; i<5; i++){ + hTH1F["nEGEr"+std::to_string(ER[i])+"VsPt"] = new TH1F(("nEGEr"+std::to_string(ER[i])+"VsPt").c_str(),("SingleEGEr"+std::to_string(ER[i])+"; E_{T} cut; rate [Hz]").c_str(),65,-0.5,64.5); + hTH1F["nIsoEGEr"+std::to_string(ER[i])+"VsPt"] = new TH1F(("nIsoEGEr"+std::to_string(ER[i])+"VsPt").c_str(),("SingleIsoEGEr"+std::to_string(ER[i])+"; E_{T} cut; rate [Hz]").c_str(),65,-0.5,64.5); + } + for(int j=0; j<3; j++){ + hTH1F["nMuEr"+std::to_string(ERMu[j])+"VsPt"] = new TH1F(("nMuEr"+std::to_string(ERMu[j])+"VsPt").c_str(),("SingleMuonEr"+std::to_string(ERMu[j])+"; E_{T} cut; rate [Hz]").c_str(),131,-0.5,130.5); + } + + //--------Eta Rate w.r.t. different Pt--------// + float PT[6] = {10.,15.,20.,25.,30.,35.}; + float PTMu[4] = {14.,16.,18.,20.,}; + for(unsigned i=0; i<6; i++) { + hTH1F["nEGEr"+std::to_string(PT[i])+"VsEta"] = new TH1F(("nEGEr"+std::to_string(PT[i])+"VsEta").c_str(),("SingleEGEr"+std::to_string(PT[i])+"; #eta restriction cut; rate [Hz]").c_str(),28,absTriggerTowerBins); + hTH1F["nIsoEGEr"+std::to_string(PT[i])+"VsEta"] = new TH1F(("nIsoEGEr"+std::to_string(PT[i])+"VsEta").c_str(),("SingleIsoEGEr"+std::to_string(PT[i])+"; #eta restriction cut; rate [Hz]").c_str(),28,absTriggerTowerBins); + } + for(unsigned j=0; j<4; j++) { + hTH1F["nMuEr"+std::to_string(PTMu[j])+"VsEta"] = new TH1F(("nMuEr"+std::to_string(PTMu[j])+"VsEta").c_str(),("SingleMuEr"+std::to_string(PTMu[j])+"; #eta restriction cut; rate [Hz]").c_str(),28,-0.05,2.55); + } + + hTH1F["nJetVsEta"] = new TH1F("nJetVsEta","nJetVsEta",64,triggerTowerBinsWithHF); hTH1F["nJetVsEta_Central"] = new TH1F("nJetVsEta_Central","nJetVsEta_Central",50,-5.,5.); hTH1F["nJetVsEta_Fwd"] = new TH1F("nJetVsEta_Fwd","nJetVsEta_Fwd",50,-5.,5.); @@ -260,18 +429,29 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, hTH1F["nQuadJetVsPt"] = new TH1F("nQuadJetVsPt","QuadJet; E_{T} cut; rate [Hz]",256,-0.5,255.5); hTH1F["nQuadCenJetVsPt"] = new TH1F("nQuadCenJetVsPt","QuadCenJet; E_{T} cut; rate [Hz]",256,-0.5,255.5); hTH1F["nDiTauVsPt"] = new TH1F("nDiTauVsPt","DiTau; E_{T} cut; rate [Hz]",256,-0.5,255.5); + hTH1F["nDiIsoTauErVsPt"] = new TH1F("nDiIsoTauErVsPt","DiIsoTauEr; E_{T} cut; rate [Hz]",65,-0.5,64.5); + hTH1F["nDiEGVsPt"] = new TH1F("nDiEGVsPt","DiEG; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH1F["nDiIsoEGVsPt"] = new TH1F("nDiIsoEGVsPt","DiIsoEG; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH2F["nEGPtVsPt"] = new TH2F("nEGPtVsPt","DoubleEle; p_{T} cut EG_{1}; p_{T} cut EG_{2}",65,-0.5,64.5,65,-0.5,64.5); hTH2F["nIsoEGPtVsPt"] = new TH2F("nIsoEGPtVsPt","DoubleIsolEle; p_{T} cut EG_{1}; p_{T} cut EG_{2}",65,-0.5,64.5,65,-0.5,64.5); hTH2F["nMuPtVsPt"] = new TH2F("nMuPtVsPt","DoubleMu; p_{T} cut mu_{1}; p_{T} cut mu_{2}",41,-0.25,20.25,41,-0.25,20.25); hTH2F["nOniaMuPtVsPt"] = new TH2F("nOniaMuPtVsPt","DoubleMu_Er_HighQ_WdEta22 (Quarkonia); p_{T} cut mu_{1}; p_{T} cut mu_{2}",41,-0.25,20.25,41,-0.25,20.25); + + hTH1F["nDiMuVsPt"] = new TH1F("nDiMuVsPt","DoubleMu; p_{T} cut; rate [Hz]",131,-0.5,130.5); + hTH1F["nSecondMuVsEta"] = new TH1F("nSecondMuVsEta","nSecondMuVsEta",24,-2.4,2.4); //Sums hTH1F["nHTTVsHTT"] = new TH1F("nHTTVsHTT","HTT; HTT cut; rate [Hz]",512,-.5,511.5); hTH1F["nETTVsETT"] = new TH1F("nETTVsETT","ETT; ETT cut; rate [Hz]",512,-.5,511.5); hTH1F["nETMVsETM"] = new TH1F("nETMVsETM","ETM; ETM cut; rate [Hz]",512,-.5,511.5); + TH1F *egIEta = new TH1F("nEGVsIEta","nEGVsIEta",229,-114.5,114.5); + TH1F *isoEgIEta = new TH1F("nIsoEGVsIEta","nIsoEGVsIEta",229,-114.5,114.5); + + egIEta->Sumw2(); + isoEgIEta->Sumw2(); + if (isCrossSec) { std::map::iterator hTH1FIt = hTH1F.begin(); std::map::iterator hTH1FEnd = hTH1F.end(); @@ -282,46 +462,39 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, } } + //outFile->Close(); Double_t nZeroBias = 0.; int nLumi(0); - unsigned int currentLumi(-1); if (nEvents <= 0){ nEvents=fChain->GetEntriesFast(); } + std::cout << "Tree contains " << fChain->GetEntriesFast() << " events." << std::endl; std::cout << "Running on " << nEvents << " events." << std::endl; for (Long64_t event=0; event run << " lumi: " << event_ -> lumi << std::endl; else std::cout << "Processed " << event << " events." << std::endl; - } - if (event_!=NULL && event_ -> lumi != currentLumi){ - std::cout << "New Lumi section: " << event_->lumi << std::endl; - currentLumi=event_ -> lumi; - nLumi++; - } + //if (event_->nPV_True!=19 and event_->nPV_True!=18 and event_->nPV_True!=17 and event_->nPV_True!=19 and event_->nPV_True!=18) continue; + if (event_->nPV_True!=29 and event_->nPV_True!=28 and event_->nPV_True!=27) continue; hTH1F["nEvts"]->Fill(0.); // count number of events processed - - nZeroBias += 1.; - + float jetPt = 0.; SingleJetPt(jetPt); float jetCenPt = 0.; SingleJetPt(jetCenPt,true); - float jetEta = SingleJetEta(36.); - float jetEta_Central = SingleJetEta(36.,1); - float jetEta_Fwd = SingleJetEta(36.,2); + float jetEta = SingleJetEta(60.); + float jetEta_Central = SingleJetEta(60.,1); + float jetEta_Fwd = SingleJetEta(60.,2); float TauPt = 0.; float TauErPt = 0.; @@ -336,129 +509,213 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, float htt = 0.; HTTVal(htt); float ett = 0.; ETTVal(ett); float etm = 0.; ETMVal(etm); + float egPt = 0.; SingleEGPt(egPt,false,false, 3.); + float egErPt = 0.; SingleEGPt(egErPt,false,true, 2.1); + //---fixed this---// + float isoEgPt = 0.; SingleEGPt(isoEgPt,true,false, 3.); + + //--------Rate w.r.t. different eta--------// + float egErVPt[5] = {0., 0., 0., 0., 0.,}; + float isoEgErVPt[5] = {0., 0., 0., 0., 0.,}; + for(int i=0; i<5; i++){ + SingleEGPt(egErVPt[i],false,true, ER[i]); + SingleEGPt(isoEgErVPt[i],true,true, ER[i]); + } + + //--------Eta Rate w.r.t. different Pt--------// + float egErEta[6] = {0.,0.,0.,0.,0.,0.}; + float isoEgErEta[6] = {0.,0.,0.,0.,0.,0.}; + for(unsigned i=0; i<6; i++){ + SingleEGEtaRate(egErEta[i],PT[i],false); + } + for(unsigned i=0; i<6; i++){ + SingleEGEtaRate(isoEgErEta[i],PT[i],true); + } + + float egEta = SingleEGEta(20.,false); + float isoegEta = SingleEGEta(20.,true); - float egPt = 0.; SingleEGPt(egPt,false,false); - float egErPt = 0.; SingleEGPt(egErPt,false,true); - float isoEgPt = 0.; SingleEGPt(isoEgPt,true,true); - float egEta = SingleEGEta(16.,false); - float isoegEta = SingleEGEta(16.,true); + float egIeta = SingleEGIEta(20.,false); + float isoegIeta = SingleEGIEta(20.,true); - //cout << "Event number = " << nZeroBias << endl; - float muPt = -10.; SingleMuPt(muPt,false); - //cout << "muPt = " << muPt << endl; - float muErPt = -10.; SingleMuPt(muErPt,true); + float muPt = -10.; SingleMuPt(muPt,false,2.5); + float muErPt = -10.; SingleMuPt(muErPt,true,2.1); - //cout << "Event number = " << nZeroBias << endl; + //---Muon Eta Tricks---// + float muErVPt[3] = {-10., -10., -10.}; + for(int j=0; j<3; j++){ + SingleMuPt(muErVPt[j], true, ERMu[j]); + } + float muErVEta[4] = {0.,0.,0.,0.}; + for(unsigned j=0; j<4; j++){ + SingleMuEtaRate(muErVEta[j],PTMu[j],false); + } + float muEta = SingleMuEta(16.); - //cout << "muEta = " << muEta << endl; - - float doubleMuPt1 = -10.; - float doubleMuPt2 = -10.; - DoubleMuPt(doubleMuPt1,doubleMuPt2); - - float oniaMuPt1 = 0.; - float oniaMuPt2 = 0.; - Onia2015Pt(oniaMuPt1,oniaMuPt2,true, false, 22); + float secondMuEta = SecondMuEta(0.); + float doubleMuPt1 = -10.; + float doubleMuPt2 = -10.; + DoubleMuPt(doubleMuPt1,doubleMuPt2,true,false); + + float diMu1 = -10.; + float diMu2 = -10.; + DoubleMuPt(diMu1,diMu2,true,false); + float oniaMuPt1 = 0.; + float oniaMuPt2 = 0.; + Onia2015Pt(oniaMuPt1,oniaMuPt2,true, false, 22); - float dijetPt1 = -10.; - float dijetPt2 = -10.; - float diCenjetPt1 = -10.; - float diCenjetPt2 = -10.; - DoubleJetPt(dijetPt1,dijetPt2); - DoubleJetPt(diCenjetPt1,diCenjetPt2,true); - Float_t dummy = -1; - float ditauPt = -10.; DoubleTauJetEta2p17Pt(dummy,ditauPt); - dummy = -1.; - float quadjetPt = -10.; QuadJetPt(dummy,dummy,dummy,quadjetPt); - dummy = -1.; - float quadjetCPt = -10.; QuadJetPt(dummy,dummy,dummy,quadjetCPt,true); - dummy = -1.; + float dijetPt1 = -10.; + float dijetPt2 = -10.; + float diCenjetPt1 = -10.; + float diCenjetPt2 = -10.; + DoubleJetPt(dijetPt1,dijetPt2); + DoubleJetPt(diCenjetPt1,diCenjetPt2,true); + Float_t dummy = -1; + float diTauErPt = -10.; DoubleTauJetEta2p17Pt(dummy,diTauErPt); + float diIsoTauEr = -10.; DoubleTauJetEta2p17Pt(dummy,diIsoTauEr,true); + dummy = -1.; + float quadjetPt = -10.; QuadJetPt(dummy,dummy,dummy,quadjetPt); + dummy = -1.; + float quadjetCPt = -10.; QuadJetPt(dummy,dummy,dummy,quadjetCPt,true); + dummy = -1.; // - float diEG1 = -10.; - float diEG2 = -10.; - float diIsolEG1 = -10.; - float diIsolEG2 = -10.; - DoubleEGPt(diEG1,diEG2,false); - DoubleEGPt(diIsolEG1,diIsolEG2,true); - - if(muEta > -9.) hTH1F["nMuVsEta"]->Fill(muEta); - hTH1F["nEGVsEta"]->Fill(egEta); - hTH1F["nIsoEGVsEta"]->Fill(isoegEta); - hTH1F["nJetVsEta"]->Fill(jetEta); - hTH1F["nJetVsEta_Central"]->Fill(jetEta_Central); - hTH1F["nJetVsEta_Fwd"]->Fill(jetEta_Fwd); + float diEG1 = -10.; + float diEG2 = -10.; + float diIsolEG1 = -10.; + float diIsolEG2 = -10.; + DoubleEGPt(diEG1,diEG2,false); + DoubleEGPt(diIsolEG1,diIsolEG2,true); + + //outFile->Open(resultName.c_str(),"update"); + + // pile up value from 0 to 50, + float puWeight[51] = {1638.538183856806, 4.693674415610433, 1.5300909160502814, 0.7182406823718569, 0.4461270187978222, 0.39812703022422885, 0.4432122086751145, 0.5742601670647391, 0.7739373760577931, 1.0025956642167804, 1.3122680368593147, 1.605655051145846, 1.8929024225833195, 2.1284381102257535, 2.2556165182260717, 2.244482200364411, 2.154571520396462, 1.9528537819111809, 1.695897273333598, 1.4282923583611258, 1.1369113035284417, 0.8862206448254017, 0.6536240971561117, 0.46856364438557374, 0.33179561861669243, 0.22382832523838006, 0.14730363368878097, 0.09882046047249428, 0.060769117256921634, 0.04258674568273182, 0.024471799847250696, 0.017208722825574143, 0.009074708975294003, 0.006641952074695454, 0.0033690053530415084, 0.0020709022278971793, 0.0018436379632363492, 0.0009373317263744043, 0.0, 0.0007986637595886011, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0}; + + float weight = 1; + + if (isReweight){ + int PU = recoVtx_->nVtx; + weight = puWeight[PU]; + //weight = 1; + //std::cout<nPV_True)<Fill(muEta,weight); + hTH1F["nSecondMuVsEta"]->Fill(secondMuEta,weight); + hTH1F["nEGVsEta"]->Fill(egEta,weight); + hTH1F["nIsoEGVsEta"]->Fill(isoegEta,weight); + hCountTH1F["nMuCountVsEta"]->Fill(muEta,weight); + hCountTH1F["nEGCountVsEta"]->Fill(egEta,weight); + hCountTH1F["nIsoEGCountVsEta"]->Fill(isoegEta,weight); + + egIEta->Fill(egIeta,weight); + isoEgIEta->Fill(isoegIeta,weight); + + hTH1F["nJetVsEta"]->Fill(jetEta,weight); + hTH1F["nJetVsEta_Central"]->Fill(jetEta_Central,weight); + hTH1F["nJetVsEta_Fwd"]->Fill(jetEta_Fwd,weight); for(int ptCut=0; ptCut<256; ++ptCut) { - if(jetPt>=ptCut) hTH1F["nJetVsPt"]->Fill(ptCut); - if(jetCenPt>=ptCut) hTH1F["nJetCenVsPt"]->Fill(ptCut); - if(TauPt>=ptCut) hTH1F["nTauVsPt"]->Fill(ptCut); - if(TauErPt>=ptCut) hTH1F["nTauErVsPt"]->Fill(ptCut); - if(isoTauPt>=ptCut) hTH1F["nIsoTauVsPt"]->Fill(ptCut); - if(isoTauErPt>=ptCut) hTH1F["nIsoTauErVsPt"]->Fill(ptCut); + if(jetPt>=ptCut) hTH1F["nJetVsPt"]->Fill(ptCut,weight); + if(jetCenPt>=ptCut) hTH1F["nJetCenVsPt"]->Fill(ptCut,weight); + if(TauPt>=ptCut) hTH1F["nTauVsPt"]->Fill(ptCut,weight); + if(TauErPt>=ptCut) hTH1F["nTauErVsPt"]->Fill(ptCut,weight); + if(isoTauPt>=ptCut) hTH1F["nIsoTauVsPt"]->Fill(ptCut,weight); + if(isoTauErPt>=ptCut) hTH1F["nIsoTauErVsPt"]->Fill(ptCut,weight); if(dijetPt2>=ptCut){ - hTH1F["nDiJetVsPt"]->Fill(ptCut); + hTH1F["nDiJetVsPt"]->Fill(ptCut,weight); for(int ptCut_0=ptCut; ptCut_0<256; ++ptCut_0) { - if(dijetPt1>=ptCut_0) hTH2F["nAsymDiJetVsPt"]->Fill(ptCut_0,ptCut); + if(dijetPt1>=ptCut_0) hTH2F["nAsymDiJetVsPt"]->Fill(ptCut_0,ptCut,weight); } } if(diCenjetPt2>=ptCut){ - hTH1F["nDiCenJetVsPt"]->Fill(ptCut); + hTH1F["nDiCenJetVsPt"]->Fill(ptCut,weight); for(int ptCut_0=ptCut; ptCut_0<256; ++ptCut_0) { - if(diCenjetPt1>=ptCut_0) hTH2F["nAsymDiCenJetVsPt"]->Fill(ptCut_0,ptCut); + if(diCenjetPt1>=ptCut_0) hTH2F["nAsymDiCenJetVsPt"]->Fill(ptCut_0,ptCut,weight); } } - if(ditauPt>=ptCut) hTH1F["nDiTauVsPt"]->Fill(ptCut); - if(quadjetPt>=ptCut) hTH1F["nQuadJetVsPt"]->Fill(ptCut); - if(quadjetCPt>=ptCut) hTH1F["nQuadCenJetVsPt"]->Fill(ptCut); + if(diTauErPt>=ptCut) hTH1F["nDiTauVsPt"]->Fill(ptCut,weight); + if(diIsoTauEr>=ptCut) hTH1F["nDiIsoTauErVsPt"]->Fill(ptCut,weight); + if(quadjetPt>=ptCut) hTH1F["nQuadJetVsPt"]->Fill(ptCut,weight); + if(quadjetCPt>=ptCut) hTH1F["nQuadCenJetVsPt"]->Fill(ptCut,weight); }//loop on 256 - // + // for(int ptCut=0; ptCut<65; ++ptCut) { - if(egPt>=ptCut) hTH1F["nEGVsPt"]->Fill(ptCut); - if(egErPt>=ptCut) hTH1F["nEGErVsPt"]->Fill(ptCut); - if(isoEgPt>=ptCut) hTH1F["nIsoEGVsPt"]->Fill(ptCut); - - if(diEG2>=ptCut) hTH1F["nDiEGVsPt"]->Fill(ptCut); - if(diIsolEG2>=ptCut) hTH1F["nDiIsoEGVsPt"]->Fill(ptCut); - - - for(int ptCut2=0; ptCut2<=65; ++ptCut2) { - if(diEG1>=ptCut && diEG2>=ptCut2 && ptCut2 <= ptCut) hTH2F["nEGPtVsPt"]->Fill(ptCut,ptCut2); - if(diIsolEG1>=ptCut && diIsolEG2>=ptCut2 && ptCut2<= ptCut) hTH2F["nIsoEGPtVsPt"]->Fill(ptCut,ptCut2); - } - + if(egPt>=ptCut) hTH1F["nEGVsPt"]->Fill(ptCut,weight); + if(egErPt>=ptCut) hTH1F["nEGErVsPt"]->Fill(ptCut,weight); + if(isoEgPt>=ptCut) hTH1F["nIsoEGVsPt"]->Fill(ptCut,weight); + + for(int i=0; i<5; ++i){ + if(egErVPt[i]>=ptCut) hTH1F["nEGEr"+std::to_string(ER[i])+"VsPt"]->Fill(ptCut,weight); + if(isoEgErVPt[i]>=ptCut) hTH1F["nIsoEGEr"+std::to_string(ER[i])+"VsPt"]->Fill(ptCut,weight); + } + + if(diEG2>=ptCut) hTH1F["nDiEGVsPt"]->Fill(ptCut,weight); + if(diIsolEG2>=ptCut) hTH1F["nDiIsoEGVsPt"]->Fill(ptCut,weight); + + for(int ptCut2=0; ptCut2<=65; ++ptCut2) { + if(diEG1>=ptCut && diEG2>=ptCut2 && ptCut2 <= ptCut) hTH2F["nEGPtVsPt"]->Fill(ptCut,ptCut2,weight); + if(diIsolEG1>=ptCut && diIsolEG2>=ptCut2 && ptCut2<= ptCut) hTH2F["nIsoEGPtVsPt"]->Fill(ptCut,ptCut2,weight); + } }//loop on 65 - // - for(int ptCut=0; ptCut<131; ++ptCut) { - if (muPt>=ptCut) hTH1F["nMuVsPt"]->Fill(ptCut); - if (muErPt>=ptCut) hTH1F["nMuErVsPt"]->Fill(ptCut); - } - - - for(int iCut=0; iCut<41; ++iCut) { - for(int iCut2=0; iCut2<=iCut; ++iCut2) { - float ptCut = iCut*0.5; - float ptCut2 = iCut2*0.5; - if (doubleMuPt1>=ptCut && doubleMuPt2>=ptCut2) hTH2F["nMuPtVsPt"]->Fill(ptCut,ptCut2); - if (oniaMuPt1>=ptCut && oniaMuPt2>=ptCut2) hTH2F["nOniaMuPtVsPt"]->Fill(ptCut,ptCut2); - } - } - - for(int httCut=0; httCut<512; ++httCut) { - if(htt>httCut) hTH1F["nHTTVsHTT"]->Fill(httCut); - if(ett>httCut) hTH1F["nETTVsETT"]->Fill(httCut); - if(etm>httCut) hTH1F["nETMVsETM"]->Fill(httCut); + + //---fill Eta Rate Histogram---// + //for(int etaCut=0; etaCut<31; ++etaCut) { + for(unsigned j=1; j<29; j++) { + for(unsigned i=0; i<6; ++i) { + //for(unsigned j=1; j<29; j++){ + if (egErEta[i]<=absTriggerTowerBins[j]) hTH1F["nEGEr"+std::to_string(PT[i])+"VsEta"]->Fill(absTriggerTowerBins[j]-0.001,weight); + if (isoEgErEta[i]<=absTriggerTowerBins[j]) hTH1F["nIsoEGEr"+std::to_string(PT[i])+"VsEta"]->Fill(absTriggerTowerBins[j]-0.001,weight); + //} + } } - + for(int etaCut=0; etaCut<26; ++etaCut) { + for(unsigned j=0; j<4; ++j) { + if (muErVEta[j]<=0.1*etaCut) hTH1F["nMuEr"+std::to_string(PTMu[j])+"VsEta"]->Fill(0.1*etaCut,weight); + } + } + //std::cout<=ptCut) hTH1F["nMuVsPt"]->Fill(ptCut,weight); + if (muErPt>=ptCut) hTH1F["nMuErVsPt"]->Fill(ptCut,weight); + if (diMu2>=ptCut) hTH1F["nDiMuVsPt"]->Fill(ptCut,weight); + for(int j=0; j<3; j++) { + if (muErVPt[j]>=ptCut) hTH1F["nMuEr"+std::to_string(ERMu[j])+"VsPt"]->Fill(ptCut,weight); + } + } + for(int iCut=0; iCut<41; ++iCut) { + for(int iCut2=0; iCut2<=iCut; ++iCut2) { + float ptCut = iCut*0.5; + float ptCut2 = iCut2*0.5; + if (doubleMuPt1>=ptCut && doubleMuPt2>=ptCut2) hTH2F["nMuPtVsPt"]->Fill(ptCut,ptCut2,weight); + if (oniaMuPt1>=ptCut && oniaMuPt2>=ptCut2) hTH2F["nOniaMuPtVsPt"]->Fill(ptCut,ptCut2,weight); + } + } + for(int httCut=0; httCut<512; ++httCut) { + if(htt>httCut) hTH1F["nHTTVsHTT"]->Fill(httCut,weight); + if(ett>httCut) hTH1F["nETTVsETT"]->Fill(httCut,weight); + if(etm>httCut) hTH1F["nETMVsETM"]->Fill(httCut,weight); + } } // end event loop - + float scaleFactor(1.); if (runOnData){ std::cout << "# of lumis sections used for rate computation : " << nLumi << std::endl; @@ -468,14 +725,18 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, std::cout << "# of zero bias events (weighted) used for rate computation : " << nZeroBias << std::endl; scaleFactor = ScaleFactor(nZeroBias,nBunches); } + float scaleFactorTest(1.); + scaleFactorTest = ScaleFactor(nZeroBias,nBunches); std::cout << "Scale factor applied to histograms = " << scaleFactor << std::endl; + std::cout << "Scale factor derived from nBunches applied to histograms = " << scaleFactorTest << std::endl; std::map::iterator hTH1FIt = hTH1F.begin(); std::map::iterator hTH1FEnd = hTH1F.end(); - + for(; hTH1FIt!=hTH1FEnd; ++hTH1FIt) { TH1F* histo = hTH1FIt->second; - setRateError(histo); + //setRateError(histo); + histo->Sumw2(); histo->Scale(scaleFactor); } @@ -484,9 +745,31 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, for(; hTH2FIt!=hTH2FEnd; ++hTH2FIt) { TH2F* histo = hTH2FIt->second; + histo->Sumw2(); histo->Scale(scaleFactor); } - + + std::map::iterator hCountTH1FIt = hCountTH1F.begin(); + std::map::iterator hCountTH1FEnd = hCountTH1F.end(); + + for(; hCountTH1FIt!=hCountTH1FEnd; ++hCountTH1FIt) { + TH1F* histo = hCountTH1FIt->second; + //setRateError(histo); + histo->Sumw2(); + //histo->Scale(scaleFactor); + } + + for (int i=0; i<57; i++){ + float eg = hTH1F["nEGVsEta"]->GetBinContent(i)/hTH1F["nEGVsEta"]->GetXaxis()->GetBinWidth(i); + float isoeg = hTH1F["nIsoEGVsEta"]->GetBinContent(i)/hTH1F["nIsoEGVsEta"]->GetXaxis()->GetBinWidth(i); + hTH1F["nEGVsEta"]->SetBinContent(i,eg); + hTH1F["nIsoEGVsEta"]->SetBinContent(i,isoeg); + } + for (int i=0; i<65; i++){ + float jet = hTH1F["nJetVsEta"]->GetBinContent(i)/hTH1F["nJetVsEta"]->GetXaxis()->GetBinWidth(i); + hTH1F["nJetVsEta"]->SetBinContent(i,jet); + } + outFile->Write(); outFile->Close(); delete outFile; @@ -506,6 +789,7 @@ void goRatePlots(std::string fileType, int isCrossSec = false, int nEvents = 0) std::string filename; bool isData(true); + bool isReweight(false); if (fileType == "13TEV_40PU_2016_RE-EMUL") { @@ -513,19 +797,29 @@ void goRatePlots(std::string fileType, int isCrossSec = false, int nEvents = 0) nBunches = nBunches25ns; filename = "/afs/cern.ch/user/p/pellicci/data2/L1DPG/root/2016/v2/40PU_25ns_Stage2/40PU_25ns_Stage2_1.root"; } - else if (fileType == "13TEV_20PU_2016_RE-EMUL") + //*************************************************************************// + else if (fileType == "run80xMC_zerobias_l1tint_v63p1_muonFix_PU28") { isData = false; - nBunches = nBunches25ns; - filename = "/afs/cern.ch/user/p/pellicci/data2/L1DPG/root/2016/v2/20PU_25ns_Stage2/20PU_25ns_Stage2_1.root"; + nBunches = 2736; + isReweight = false; + filename = "/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/r80xMC_809_zerobias_l1tint_v62p3_muonFix.txt"; } - else if (fileType == "RUN256843_Stage1") + else if (fileType == "run274241_zerobias_l1tint_v61p1_test_v2") { - isData = true; - // filename = "/data/user/gennai/L1Ntuple/l1t_debug-stage-2_256843.root"; - filename = "ntuple/Run256843_stage1_Tune.list"; - //filename = "ntuples_256843_stage1B.list"; + isData = false; + filename = "/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/r274241_809_zerobias_l1tint_v61p1.txt"; + nBunches = 1752; + isReweight = false; } + else if (fileType == "run273725_stage2_l1tint_v58p1") + { + isData = false; + filename = "/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v58p1_MC2015/CMSSW_8_0_8/src/L1TriggerDPG/L1Menu/macros/r273725_808_zerobias_l1t-int-v58p1.txt"; + nBunches = 2736; + isReweight = false; + } + //**************************************************************************// else if (fileType == "RUN256843_Stage2_8X") { isData = true; @@ -536,15 +830,6 @@ void goRatePlots(std::string fileType, int isCrossSec = false, int nEvents = 0) filename = "ntuple/Run256843_stage2_8X.list"; //filename = "ntuples_256843_stage2_full.list"; } - else if (fileType == "RUN259721_Stage1v2") - { - isData = false; - nBunches = 517; - // filename = "/data/user/gennai/L1Ntuple/l1t_debug-stage-2_256843.root"; - // filename = "root://cmseos.fnal.gov//store/user/lpctrig/apana/Stage2/ZeroBias1/crab_ZeroBias1_Run2015D-v1/151230_012024/0000/l1t_stage2_2.root"; - filename = "ntuple/r259721_Stage1v2.list"; - //filename = "ntuples_256843_stage2_full.list"; - } else if (fileType == "RUN256843_Stage2_76") { isData = true; @@ -590,7 +875,5 @@ void goRatePlots(std::string fileType, int isCrossSec = false, int nEvents = 0) // dir->GetObject("L1UpgradeTree",tree); BasicRatePlots basicRatePlots(filename); - basicRatePlots.run(isData,fileType,xSec13TeV,nBunches,isCrossSec,nEvents); - + basicRatePlots.run(isData,fileType,xSec13TeV,nBunches,isCrossSec,nEvents,isReweight); } - diff --git a/macros/Makefile b/macros/Makefile index 33ecec7..956ff21 100644 --- a/macros/Makefile +++ b/macros/Makefile @@ -54,4 +54,3 @@ testMenu2016 : $(ODIR)/testMenu2016.o $(OBJS) clean: rm -f *exe *.o $(PROGRAM) $(OBJS) $(ODIR)/*.o - diff --git a/macros/RunL1Menu2016.cc b/macros/RunL1Menu2016.cc index ece5a92..8195f85 100644 --- a/macros/RunL1Menu2016.cc +++ b/macros/RunL1Menu2016.cc @@ -21,6 +21,7 @@ #include #include "BasicRatePlots.C" +#include "getDistributions.C" #include "L1Menu2016_minbias_cross_section.C" #include "TSystem.h" @@ -34,7 +35,10 @@ int main ( int argc, char *argv[] ) gSystem->Load("libFWCoreFWLite"); FWLiteEnabler::enable(); - //goRatePlots("RUN256843_Stage2",0,0); - RunL1(true, true, 5); + //RunL1(true, true, 5); + goRatePlots("run80xMC_zerobias_l1tint_v63p1_muonFix_PU28",0,12000000); + //goRatePlots("run274241_zerobias_l1tint_v61p1_test_v2",0,100000); + //goRatePlots("run20PUMC_stage2_l1tint_v58p1",0,10000000); + //goGetDistributions(1000000); return EXIT_SUCCESS; } // ---------- end of function main ---------- diff --git a/macros/getDistributions.C b/macros/getDistributions.C new file mode 100644 index 0000000..e0f56d4 --- /dev/null +++ b/macros/getDistributions.C @@ -0,0 +1,82 @@ +#include "L1Ntuple.h" +#include "L1AlgoFactory.h" +#include +#include +#include + +#include "TH1F.h" +#include "TH2F.h" + +class getDistributions : public L1AlgoFactory +{ +public : + + //constructor + getDistributions(std::string filename){ + if (filename.find(".root") != std::string::npos) { + std::cout << "Reading RootFile: " << filename << std::endl; + L1Ntuple::Open(filename); + }else{ + std::cout << "Reading Filelist: " << filename << std::endl; + if (! L1Ntuple::OpenWithList(filename)) exit(0); + } + } + ~getDistributions() {} + + void run(std::string outfile, int nEvents); + +private: + std::map hTH1F; +}; + +void getDistributions::run(std::string outfilename, int nEvents) +{ + + TFile *outFile = new TFile((outfilename).c_str(),"recreate"); + outFile->cd(); + + //L1Ntuple::OpenWithList(filename); + + hTH1F["nVtex"] = new TH1F("nVtex","Number of Vertex",51,0,50); + + if (nEvents <= 0){ + nEvents=fChain->GetEntriesFast(); + } + + std::cout << "Tree contains " << fChain->GetEntriesFast() << " events." << std::endl; + std::cout << "Running on " << nEvents << " events." << std::endl; + + for (Long64_t event=0; event run << " lumi: " << event_ -> lumi << std::endl; + else + std::cout << "Processed " << event << " events." << std::endl; + } + + hTH1F["nVtex"]->Fill(recoVtx_->nVtx); + + } + + outFile->Write(); +} + +void goGetDistributions(int nEvents) +{ + std::string filename; + filename="/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/r274199_809_zerobias_l1tint_v61p1.txt"; + + std::string outfilename; + outfilename="/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/myDataDistributions_274199.root"; + + getDistributions getDistributions(filename); + getDistributions.run(outfilename, nEvents); +} + + + + + diff --git a/macros/getReWeightValue.py b/macros/getReWeightValue.py new file mode 100644 index 0000000..a58dab0 --- /dev/null +++ b/macros/getReWeightValue.py @@ -0,0 +1,25 @@ +from ROOT import * + +dataFile=TFile.Open("myDataDistributions_274199.root") +mcFile=TFile.Open("myMCDistributions.root") + +dataHist=dataFile.Get("nVtex") +mcHist=mcFile.Get("nVtex") + +dataHist.SetBinContent(1,0) +dataHist.Scale(1./dataHist.Integral()) +mcHist.Scale(1./mcHist.Integral()) + +weights=[] + +for b in range(1,52): + if mcHist.GetBinContent(b)!=0: + weight=dataHist.GetBinContent(b)/mcHist.GetBinContent(b) + else: + weight=0 + weights.append(weight) + +#weights.append(0) + +print weights +print len(weights) From 43542e8cb61353d14084a50b98f559b01bb68ab4 Mon Sep 17 00:00:00 2001 From: jingyu zhang Date: Thu, 14 Jul 2016 00:37:30 +0200 Subject: [PATCH 3/3] Revert "Merge pull request #2 from cms-l1-dpg/jingyu" This reverts commit 51210052a998ec6d3d4201c8cbed9d7b9fe52257, reversing changes made to f1230f65094909e25e46841b9ab95eb94e9af6f8. --- macros/BasicRatePlots.C | 703 +++++++++++-------------------------- macros/Makefile | 1 + macros/RunL1Menu2016.cc | 8 +- macros/getDistributions.C | 82 ----- macros/getReWeightValue.py | 25 -- 5 files changed, 213 insertions(+), 606 deletions(-) delete mode 100644 macros/getDistributions.C delete mode 100644 macros/getReWeightValue.py diff --git a/macros/BasicRatePlots.C b/macros/BasicRatePlots.C index c8f97c3..72ec8ee 100644 --- a/macros/BasicRatePlots.C +++ b/macros/BasicRatePlots.C @@ -23,32 +23,26 @@ public : } ~BasicRatePlots() {} - void run(bool runOnData, std::string resultTag, float crossSec, int nBunches, int isCrossSec, int nEvents = 0, bool isReweight = false); - + void run(bool runOnData, std::string resultTag, float crossSec, int nBunches, int isCrossSec, int nEvents = 0); + private : float ScaleFactor(float nZeroBias, float nBunches); - void SingleJetPt(Float_t& ptcut, Bool_t isCentral = false); - float SingleMuEta(float ptcut); - void SingleMuPt(Float_t& ptcut, Bool_t isER, float ErMu); - float SecondMuEta(float ptcut); - void SingleMuEtaRate(Float_t& etaCut, float ptCut, bool doIso); - void SingleEGPt(Float_t& ptcut, Bool_t isIsolated, Bool_t isER, float Er); + //void SingleJetPt(Float_t& ptcut, Bool_t isCentral = false); + float SingleMuEta(float eta); + //void SingleEGPt(Float_t& ptcut, Bool_t isIsolated, Bool_t isER); float SingleEGEta(float ptCut, bool doIso); - float SingleEGIEta(float ptCut, bool doIso); - void SingleEGEtaRate(Float_t& etaCut, float ptCut, bool doIso); float SingleJetEta(float pt, Int_t accept_flag = 0); void setRateError(TH1F* histo); - void ETMVal(Float_t& ETMcut); - void HTTVal(Float_t& HTTcut); - void HTMVal(Float_t& HTMcut); - void ETTVal(Float_t& ETTcut); + //void ETMVal(Float_t& ETMcut); + //void HTTVal(Float_t& HTTcut); + //void HTMVal(Float_t& HTMcut); + //void ETTVal(Float_t& ETTcut); std::map hTH1F; std::map hTH2F; - std::map hCountTH1F; }; // ------------------------------------------------------------------ @@ -74,7 +68,6 @@ float BasicRatePlots::SingleMuEta(float ptCut ) { { Int_t bx = upgrade_ -> muonBx.at(imu); if(bx != 0) continue; - if((upgrade_->muonQual.at(imu)==4) or (upgrade_->muonQual.at(imu)==8)) continue; Float_t pt = upgrade_ -> muonEt.at(imu); if ( pt > maxPt) { @@ -83,101 +76,14 @@ float BasicRatePlots::SingleMuEta(float ptCut ) { } } - float eta = maxPt>ptCut ? upgrade_ -> muonEta.at(iMuMaxPt) : -999.; - return eta; -} - -float BasicRatePlots::SecondMuEta(float ptCut) { - - Float_t mu1ptmax = -10.; - Float_t mu2ptmax = -10.; - float eta1 = -10.; - float eta2 = -10.; - float aux = 0.; + float eta = maxPt>ptCut ? upgrade_ -> muonEta.at(iMuMaxPt) : -10.; - if(upgrade_->nMuons < 2) return -10.; + //cout << "max mu pt = " << maxPt << " max eta = " << eta << endl; - for(UInt_t um=0; um < upgrade_ -> nMuons; um++) { - Int_t bx = upgrade_ -> muonBx.at(um); - if(bx != 0) continue; - if(upgrade_->muonQual.at(um)==4) continue; - - Float_t pt = upgrade_ -> muonEt.at(um); // the rank of the electron - if(pt >= mu1ptmax) { - mu2ptmax = mu1ptmax; - mu1ptmax = pt; - } - else if(pt >= mu2ptmax) { - mu2ptmax = pt; - } - } - - if(mu2ptmax < ptCut) return -10.; - - for(UInt_t um=0; um < upgrade_ -> nMuons; um++) { - if (upgrade_->muonEt.at(um)==mu1ptmax) { - eta1=upgrade_ -> muonEta.at(um); - aux = um; - break; - } - } - - //std::cout<<"aux: "< nMuons; um++) { - if (upgrade_->muonEt.at(um)==mu2ptmax && um != aux) { - eta2=upgrade_ -> muonEta.at(um); - break; - } - } - - //std::cout<<"pt1: "< nMuons; um++) { - Int_t bx = upgrade_ -> muonBx.at(um); - if(bx != 0) continue; - Float_t eta = upgrade_ -> muonEta.at(um); - if(fabs(eta) > ErMu && isER) continue; - if((upgrade_->muonQual.at(um)==4) or (upgrade_->muonQual.at(um)==8)) continue; - - Float_t pt = upgrade_ -> muonEt.at(um); // the rank of the electron - if(pt >= ptmax) ptmax = pt; - } - - cut = ptmax; - return; + return eta; } -void BasicRatePlots::SingleMuEtaRate(Float_t& etaCut, float ptCut, bool doIso) { - - Float_t etamax = 10.; - for(UInt_t um=0; um < upgrade_ -> nMuons; um++) { - Int_t bx = upgrade_ -> muonBx.at(um); - if(bx != 0) continue; - //if(upgrade_->muonQual.at(um)==0) continue; - //if(doIso && !(upgrade_ -> egIso.at(um))) continue; - if((upgrade_->muonQual.at(um)==4) or (upgrade_->muonQual.at(um)==8)) continue; - Float_t pt = upgrade_ -> muonEt.at(um); - if(pt < ptCut) continue; - - Float_t eta = fabs(upgrade_ -> muonEta.at(um)); - if(eta <= etamax) etamax = eta; - } - - etaCut = etamax; - return; -} float BasicRatePlots::SingleEGEta(float ptCut, bool doIso) { @@ -200,84 +106,48 @@ float BasicRatePlots::SingleEGEta(float ptCut, bool doIso) { return iEGMaxPt>=0 && maxPt>ptCut ? upgrade_ -> egEta.at(iEGMaxPt) : -10.; } -float BasicRatePlots::SingleEGIEta(float ptCut, bool doIso) { - - float maxPt = -10; - float iEGMaxPt = -999; - - for (UInt_t ue=0; ue < upgrade_ -> nEGs; ue++) { - Int_t bx = upgrade_ -> egBx.at(ue); - if (bx != 0) continue; - Bool_t iso = upgrade_ -> egIso.at(ue); - if (!iso && doIso) continue; - Float_t pt = upgrade_ -> egEt.at(ue); - if ( pt >= maxPt) - { - maxPt = pt; - iEGMaxPt = ue; - } - } - - return iEGMaxPt>=0 && maxPt>ptCut ? upgrade_ -> egIEta.at(iEGMaxPt) : -999.; -} - -void BasicRatePlots::SingleEGPt(Float_t& cut, Bool_t isIsolated , Bool_t isER, float Er) { +//void BasicRatePlots::SingleEGPt(Float_t& cut, Bool_t isIsolated , Bool_t isER) { - Float_t ptmax = -10.; + + ////if(nEGs < 1) return; - for(UInt_t ue=0; ue < upgrade_ -> nEGs; ue++) { - Int_t bx = upgrade_ -> egBx.at(ue); - if(bx != 0) continue; - if(isIsolated && !(upgrade_ -> egIso.at(ue))) continue; - Float_t eta = upgrade_ -> egEta.at(ue); - if(fabs(eta) > Er && isER) continue; // eta = 5 - 16 + //Float_t ptmax = -10.; - Float_t pt = upgrade_ -> egEt.at(ue); // the rank of the electron - if(pt >= ptmax) ptmax = pt; - } + //for(UInt_t ue=0; ue < upgrade_ -> nEGs; ue++) { + //Int_t bx = upgrade_ -> egBx.at(ue); + //if(bx != 0) continue; + //if(isIsolated && !(upgrade_ -> egIso.at(ue))) continue; + //Float_t eta = upgrade_ -> egEta.at(ue); + //if(fabs(eta) > 2.1 && isER) continue; // eta = 5 - 16 - cut = ptmax; - return; -} + //Float_t pt = upgrade_ -> egEt.at(ue); // the rank of the electron + //if(pt >= ptmax) ptmax = pt; + //} -void BasicRatePlots::SingleEGEtaRate(Float_t& etaCut, float ptCut, bool doIso) { + //cut = ptmax; - Float_t etamax = 10.; - - for(UInt_t ue=0; ue nEGs; ue++) { - Int_t bx = upgrade_ -> egBx.at(ue); - if (bx !=0) continue; - if(doIso && !(upgrade_ -> egIso.at(ue))) continue; - Float_t pt = upgrade_ -> egEt.at(ue); - if(pt < ptCut) continue; - - Float_t eta = fabs(upgrade_ -> egEta.at(ue)); - if(eta <= etamax) etamax = eta; - } - - etaCut = etamax; - return; -} + //return; +//} -void BasicRatePlots::SingleJetPt(Float_t& cut, Bool_t isCentral) { +//void BasicRatePlots::SingleJetPt(Float_t& cut, Bool_t isCentral) { - Float_t ptmax = -10.; - Int_t Nj = upgrade_ -> nJets ; - for(Int_t ue=0; ue < Nj; ue++) { - Int_t bx = upgrade_ -> jetBx.at(ue); - if(bx != 0) continue; - Bool_t isFwdJet = fabs(upgrade_ -> jetEta.at(ue)) > 3. ? true : false; - if(isCentral && isFwdJet) continue; - //if(NOTauInJets && upgrade_->Taujet[ue]) continue; - //if(isCentral && noHF && (upgrade_->jetEta.at(ue) < 5 || upgrade_->jetEta.at(ue) > 17)) continue; + //Float_t ptmax = -10.; + //Int_t Nj = upgrade_ -> nJets ; + //for(Int_t ue=0; ue < Nj; ue++) { + //Int_t bx = upgrade_ -> jetBx.at(ue); + //if(bx != 0) continue; + //Bool_t isFwdJet = fabs(upgrade_ -> jetEta.at(ue)) > 3. ? true : false; + //if(isCentral && isFwdJet) continue; + ////if(NOTauInJets && upgrade_->Taujet[ue]) continue; + ////if(isCentral && noHF && (upgrade_->jetEta.at(ue) < 5 || upgrade_->jetEta.at(ue) > 17)) continue; - Float_t pt = upgrade_ -> jetEt.at(ue); - if(pt >= ptmax) ptmax = pt; - } + //Float_t pt = upgrade_ -> jetEt.at(ue); + //if(pt >= ptmax) ptmax = pt; + //} - cut = ptmax; - return; -} + //cut = ptmax; + //return; +//} float BasicRatePlots::SingleJetEta(float ptCut, Int_t accept_flag) { @@ -302,46 +172,37 @@ float BasicRatePlots::SingleJetEta(float ptCut, Int_t accept_flag) { return iJetMaxPt>=0 && maxPt>ptCut ? upgrade_ -> jetEta.at(iJetMaxPt) : -10.; } -void BasicRatePlots::ETMVal(Float_t& ETMcut ) { - - Float_t TheETM = -10; - int idx = GetSumEtIdx(EtSumType::ETM); - assert(upgrade_->sumType.at(idx) == EtSumType::ETM); - //std::cout<<"ETM: "<sumBx.at(idx)==0) TheETM =upgrade_->sumEt.at(idx); - ETMcut = TheETM; - return; -} +//void BasicRatePlots::ETMVal(Float_t& ETMcut ) { -void BasicRatePlots::HTTVal(Float_t& HTTcut) { + //Float_t TheETM = -10; + //if(upgrade_ ->sumBx[2]==0) TheETM =upgrade_ ->sumEt[2]; + //ETMcut = TheETM; + //return; +//} - Float_t TheHTT = -10; - int idx= GetSumEtIdx(EtSumType::HTT); - assert(upgrade_->sumType.at(idx) == EtSumType::HTT); - if(upgrade_->sumBx.at(idx)==0) TheHTT =upgrade_->sumEt.at(idx); - HTTcut = TheHTT; - return; -} +//void BasicRatePlots::HTTVal(Float_t& HTTcut) { -void BasicRatePlots::HTMVal(Float_t& HTMcut) { + //Float_t TheHTT = -10; + //if(upgrade_ ->sumBx[1]==0) TheHTT =upgrade_ ->sumEt[1]; + //HTTcut = TheHTT; + //return; +//} - Float_t TheHTM = -10; - int idx= GetSumEtIdx(EtSumType::HTM); - assert(upgrade_->sumType.at(idx) == EtSumType::HTM); - if(upgrade_->sumBx.at(idx)==0) TheHTM =upgrade_->sumEt.at(idx); - HTMcut = TheHTM; - return; -} +//void BasicRatePlots::HTMVal(Float_t& HTMcut) { -void BasicRatePlots::ETTVal(Float_t& ETTcut) { + //Float_t TheHTM = -10; + //if (upgrade_ ->sumBx[3]==0) TheHTM = upgrade_ ->sumEt[3]; + //HTMcut = TheHTM; + //return; +//} - Float_t TheETT = -10; - int idx= GetSumEtIdx(EtSumType::ETT); - assert(upgrade_->sumType.at(idx) == EtSumType::ETT); - if(upgrade_->sumBx.at(idx)==0) TheETT =upgrade_->sumEt.at(idx); - ETTcut = TheETT; - return; -} +//void BasicRatePlots::ETTVal(Float_t& ETTcut) { + + //Float_t TheETT = -10; + //if(upgrade_ ->sumBx[0]==0) TheETT = upgrade_ ->sumEt[0]; + //ETTcut = TheETT; + //return; +//} void BasicRatePlots::setRateError(TH1F* histo) { @@ -360,64 +221,34 @@ void BasicRatePlots::setRateError(TH1F* histo) { // -------------------------------------------------------------------- -void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, int nBunches, int isCrossSec, int nEvents, bool isReweight) { +void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, int nBunches, int isCrossSec, int nEvents) { system("mkdir -p results"); - std::string resultName = "/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/results/results_" + resultTag + (isCrossSec ? "_XSEC" : "_RATE") + ".root"; + std::string resultName = "results/results_" + resultTag + (isCrossSec ? "_XSEC" : "_RATE") + ".root"; TFile *outFile = new TFile((resultName).c_str(),"recreate"); outFile->cd(); - float triggerTowerBinsWithHF[65]={-5.,-4.5,-4.,-3.5,-3.,-2.65,-2.5,-2.322,-2.172,-2.043,-1.93,-1.83,-1.74,-1.653,-1.566,-1.479,-1.392,-1.305,-1.218,-1.131,-1.044,-0.957,-0.87,-0.783,-0.696,-0.609,-0.522,-0.435,-0.348,-0.261,-0.174,-0.087,0.,0.087,0.174,0.261,0.348,0.435,0.522,0.609,0.696,0.783,0.87,0.957,1.044,1.131,1.218,1.305,1.392,1.479,1.566,1.653,1.74,1.83,1.93,2.043,2.172,2.322,2.5,2.65,3.,3.5,4.,4.5,5.}; - float triggerTowerBins[57]={-3.,-2.65,-2.5,-2.322,-2.172,-2.043,-1.93,-1.83,-1.74,-1.653,-1.566,-1.479,-1.392,-1.305,-1.218,-1.131,-1.044,-0.957,-0.87,-0.783,-0.696,-0.609,-0.522,-0.435,-0.348,-0.261,-0.174,-0.087,0.,0.087,0.174,0.261,0.348,0.435,0.522,0.609,0.696,0.783,0.87,0.957,1.044,1.131,1.218,1.305,1.392,1.479,1.566,1.653,1.74,1.83,1.93,2.043,2.172,2.322,2.5,2.65,3.}; - float absTriggerTowerBins[29]={0.,0.087,0.174,0.261,0.348,0.435,0.522,0.609,0.696,0.783,0.87,0.957,1.044,1.131,1.218,1.305,1.392,1.479,1.566,1.653,1.74,1.83,1.93,2.043,2.172,2.322,2.5,2.65,3.}; - //Event Counter hTH1F["nEvts"] = new TH1F("nEvts","Number of Events Processed",1,-0.5,.5); //Single stuff hTH1F["nJetVsPt"] = new TH1F("nJetVsPt","SingleJet; E_{T} cut; rate [Hz]",256,-0.5,255.5); hTH1F["nJetCenVsPt"] = new TH1F("nJetCenVsPt","SingleJetCentral; E_{T} cut; rate [Hz]",256,-0.5,255.5); + hTH1F["nEGVsPt"] = new TH1F("nEGVsPt","SingleEG; E_{T} cut; rate [Hz]",65,-0.5,64.5); + hTH1F["nEGErVsPt"] = new TH1F("nEGErVsPt","SingleEGer; E_{T} cut; rate [Hz]",65,-0.5,64.5); + hTH1F["nTauVsPt"] = new TH1F("nTauVsPt","SingleTau; E_{T} cut; rate [Hz]",65,-0.5,64.5); - hTH1F["nTauErVsPt"] = new TH1F("nTauErVsPt","SingleTauer; E_{T} cut; rate [Hz]",129,-0.5,128.5); + hTH1F["nTauErVsPt"] = new TH1F("nTauErVsPt","SingleTauer; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH1F["nIsoTauVsPt"] = new TH1F("nIsoTauVsPt","SingleIsoTau; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH1F["nIsoTauErVsPt"] = new TH1F("nIsoTauErVsPt","SingleIsoTauEr; E_{T} cut; rate [Hz]",65,-0.5,64.5); - hTH1F["nEGVsPt"] = new TH1F("nEGVsPt", "SingleEG; E_{T} cut; rate [Hz]",65,-0.5,64.5); - hTH1F["nEGErVsPt"] = new TH1F("nEGErVsPt", "SingleEGEr; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH1F["nIsoEGVsPt"] = new TH1F("nIsoEGVsPt","SingleIsoEGer; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH1F["nMuVsPt"] = new TH1F("nMuVsPt","SingleMu; p_{T} cut; rate [Hz]",131,-0.5,130.5); hTH1F["nMuErVsPt"] = new TH1F("nMuErVsPt","SingleMu |#eta|<2.1; p_{T} cut; rate [Hz]",131,-0.5,130.5); hTH1F["nMuVsEta"] = new TH1F("nMuVsEta","nMuVsEta",24,-2.4,2.4); - hTH1F["nEGVsEta"] = new TH1F("nEGVsEta","nEGVsEta",56,triggerTowerBins); - hTH1F["nIsoEGVsEta"] = new TH1F("nIsoEGVsEta","nIsoEGVsEta",56,triggerTowerBins); - - hCountTH1F["nMuCountVsEta"] = new TH1F("nMuCountVsEta","nMuVsEta",24,-2.4,2.4); - hCountTH1F["nEGCountVsEta"] = new TH1F("nEGCountVsEta","nEGVsEta",56,triggerTowerBins); - hCountTH1F["nIsoEGCountVsEta"] = new TH1F("nIsoEGCountVsEta","nIsoEGVsEta",56,triggerTowerBins); - - //--------Rate w.r.t. different eta--------// - float ER[5] = {1.5,1.8,2.1,2.5,3.}; - float ERMu[3] = {0.8,1.2,2.5}; - for(int i=0; i<5; i++){ - hTH1F["nEGEr"+std::to_string(ER[i])+"VsPt"] = new TH1F(("nEGEr"+std::to_string(ER[i])+"VsPt").c_str(),("SingleEGEr"+std::to_string(ER[i])+"; E_{T} cut; rate [Hz]").c_str(),65,-0.5,64.5); - hTH1F["nIsoEGEr"+std::to_string(ER[i])+"VsPt"] = new TH1F(("nIsoEGEr"+std::to_string(ER[i])+"VsPt").c_str(),("SingleIsoEGEr"+std::to_string(ER[i])+"; E_{T} cut; rate [Hz]").c_str(),65,-0.5,64.5); - } - for(int j=0; j<3; j++){ - hTH1F["nMuEr"+std::to_string(ERMu[j])+"VsPt"] = new TH1F(("nMuEr"+std::to_string(ERMu[j])+"VsPt").c_str(),("SingleMuonEr"+std::to_string(ERMu[j])+"; E_{T} cut; rate [Hz]").c_str(),131,-0.5,130.5); - } - - //--------Eta Rate w.r.t. different Pt--------// - float PT[6] = {10.,15.,20.,25.,30.,35.}; - float PTMu[4] = {14.,16.,18.,20.,}; - for(unsigned i=0; i<6; i++) { - hTH1F["nEGEr"+std::to_string(PT[i])+"VsEta"] = new TH1F(("nEGEr"+std::to_string(PT[i])+"VsEta").c_str(),("SingleEGEr"+std::to_string(PT[i])+"; #eta restriction cut; rate [Hz]").c_str(),28,absTriggerTowerBins); - hTH1F["nIsoEGEr"+std::to_string(PT[i])+"VsEta"] = new TH1F(("nIsoEGEr"+std::to_string(PT[i])+"VsEta").c_str(),("SingleIsoEGEr"+std::to_string(PT[i])+"; #eta restriction cut; rate [Hz]").c_str(),28,absTriggerTowerBins); - } - for(unsigned j=0; j<4; j++) { - hTH1F["nMuEr"+std::to_string(PTMu[j])+"VsEta"] = new TH1F(("nMuEr"+std::to_string(PTMu[j])+"VsEta").c_str(),("SingleMuEr"+std::to_string(PTMu[j])+"; #eta restriction cut; rate [Hz]").c_str(),28,-0.05,2.55); - } - - hTH1F["nJetVsEta"] = new TH1F("nJetVsEta","nJetVsEta",64,triggerTowerBinsWithHF); + hTH1F["nEGVsEta"] = new TH1F("nEGVsEta","nEGVsEta",50,-3.,3.); + hTH1F["nIsoEGVsEta"] = new TH1F("nIsoEGVsEta","nIsoEGVsEta",50,-3.,3.); + hTH1F["nJetVsEta"] = new TH1F("nJetVsEta","nJetVsEta",50,-5.,5.); hTH1F["nJetVsEta_Central"] = new TH1F("nJetVsEta_Central","nJetVsEta_Central",50,-5.,5.); hTH1F["nJetVsEta_Fwd"] = new TH1F("nJetVsEta_Fwd","nJetVsEta_Fwd",50,-5.,5.); @@ -429,29 +260,18 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, hTH1F["nQuadJetVsPt"] = new TH1F("nQuadJetVsPt","QuadJet; E_{T} cut; rate [Hz]",256,-0.5,255.5); hTH1F["nQuadCenJetVsPt"] = new TH1F("nQuadCenJetVsPt","QuadCenJet; E_{T} cut; rate [Hz]",256,-0.5,255.5); hTH1F["nDiTauVsPt"] = new TH1F("nDiTauVsPt","DiTau; E_{T} cut; rate [Hz]",256,-0.5,255.5); - hTH1F["nDiIsoTauErVsPt"] = new TH1F("nDiIsoTauErVsPt","DiIsoTauEr; E_{T} cut; rate [Hz]",65,-0.5,64.5); - hTH1F["nDiEGVsPt"] = new TH1F("nDiEGVsPt","DiEG; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH1F["nDiIsoEGVsPt"] = new TH1F("nDiIsoEGVsPt","DiIsoEG; E_{T} cut; rate [Hz]",65,-0.5,64.5); hTH2F["nEGPtVsPt"] = new TH2F("nEGPtVsPt","DoubleEle; p_{T} cut EG_{1}; p_{T} cut EG_{2}",65,-0.5,64.5,65,-0.5,64.5); hTH2F["nIsoEGPtVsPt"] = new TH2F("nIsoEGPtVsPt","DoubleIsolEle; p_{T} cut EG_{1}; p_{T} cut EG_{2}",65,-0.5,64.5,65,-0.5,64.5); hTH2F["nMuPtVsPt"] = new TH2F("nMuPtVsPt","DoubleMu; p_{T} cut mu_{1}; p_{T} cut mu_{2}",41,-0.25,20.25,41,-0.25,20.25); hTH2F["nOniaMuPtVsPt"] = new TH2F("nOniaMuPtVsPt","DoubleMu_Er_HighQ_WdEta22 (Quarkonia); p_{T} cut mu_{1}; p_{T} cut mu_{2}",41,-0.25,20.25,41,-0.25,20.25); - - hTH1F["nDiMuVsPt"] = new TH1F("nDiMuVsPt","DoubleMu; p_{T} cut; rate [Hz]",131,-0.5,130.5); - hTH1F["nSecondMuVsEta"] = new TH1F("nSecondMuVsEta","nSecondMuVsEta",24,-2.4,2.4); //Sums hTH1F["nHTTVsHTT"] = new TH1F("nHTTVsHTT","HTT; HTT cut; rate [Hz]",512,-.5,511.5); hTH1F["nETTVsETT"] = new TH1F("nETTVsETT","ETT; ETT cut; rate [Hz]",512,-.5,511.5); hTH1F["nETMVsETM"] = new TH1F("nETMVsETM","ETM; ETM cut; rate [Hz]",512,-.5,511.5); - TH1F *egIEta = new TH1F("nEGVsIEta","nEGVsIEta",229,-114.5,114.5); - TH1F *isoEgIEta = new TH1F("nIsoEGVsIEta","nIsoEGVsIEta",229,-114.5,114.5); - - egIEta->Sumw2(); - isoEgIEta->Sumw2(); - if (isCrossSec) { std::map::iterator hTH1FIt = hTH1F.begin(); std::map::iterator hTH1FEnd = hTH1F.end(); @@ -462,39 +282,46 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, } } - //outFile->Close(); Double_t nZeroBias = 0.; int nLumi(0); + unsigned int currentLumi(-1); if (nEvents <= 0){ nEvents=fChain->GetEntriesFast(); } - std::cout << "Tree contains " << fChain->GetEntriesFast() << " events." << std::endl; std::cout << "Running on " << nEvents << " events." << std::endl; for (Long64_t event=0; event run << " lumi: " << event_ -> lumi << std::endl; else std::cout << "Processed " << event << " events." << std::endl; + } - //if (event_->nPV_True!=19 and event_->nPV_True!=18 and event_->nPV_True!=17 and event_->nPV_True!=19 and event_->nPV_True!=18) continue; - if (event_->nPV_True!=29 and event_->nPV_True!=28 and event_->nPV_True!=27) continue; + if (event_!=NULL && event_ -> lumi != currentLumi){ + std::cout << "New Lumi section: " << event_->lumi << std::endl; + currentLumi=event_ -> lumi; + nLumi++; + } hTH1F["nEvts"]->Fill(0.); // count number of events processed - + + nZeroBias += 1.; + float jetPt = 0.; SingleJetPt(jetPt); float jetCenPt = 0.; SingleJetPt(jetCenPt,true); - float jetEta = SingleJetEta(60.); - float jetEta_Central = SingleJetEta(60.,1); - float jetEta_Fwd = SingleJetEta(60.,2); + float jetEta = SingleJetEta(36.); + float jetEta_Central = SingleJetEta(36.,1); + float jetEta_Fwd = SingleJetEta(36.,2); float TauPt = 0.; float TauErPt = 0.; @@ -509,213 +336,129 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, float htt = 0.; HTTVal(htt); float ett = 0.; ETTVal(ett); float etm = 0.; ETMVal(etm); - float egPt = 0.; SingleEGPt(egPt,false,false, 3.); - float egErPt = 0.; SingleEGPt(egErPt,false,true, 2.1); - //---fixed this---// - float isoEgPt = 0.; SingleEGPt(isoEgPt,true,false, 3.); - - //--------Rate w.r.t. different eta--------// - float egErVPt[5] = {0., 0., 0., 0., 0.,}; - float isoEgErVPt[5] = {0., 0., 0., 0., 0.,}; - for(int i=0; i<5; i++){ - SingleEGPt(egErVPt[i],false,true, ER[i]); - SingleEGPt(isoEgErVPt[i],true,true, ER[i]); - } - - //--------Eta Rate w.r.t. different Pt--------// - float egErEta[6] = {0.,0.,0.,0.,0.,0.}; - float isoEgErEta[6] = {0.,0.,0.,0.,0.,0.}; - for(unsigned i=0; i<6; i++){ - SingleEGEtaRate(egErEta[i],PT[i],false); - } - for(unsigned i=0; i<6; i++){ - SingleEGEtaRate(isoEgErEta[i],PT[i],true); - } - - float egEta = SingleEGEta(20.,false); - float isoegEta = SingleEGEta(20.,true); - float egIeta = SingleEGIEta(20.,false); - float isoegIeta = SingleEGIEta(20.,true); + float egPt = 0.; SingleEGPt(egPt,false,false); + float egErPt = 0.; SingleEGPt(egErPt,false,true); + float isoEgPt = 0.; SingleEGPt(isoEgPt,true,true); + float egEta = SingleEGEta(16.,false); + float isoegEta = SingleEGEta(16.,true); - float muPt = -10.; SingleMuPt(muPt,false,2.5); - float muErPt = -10.; SingleMuPt(muErPt,true,2.1); + //cout << "Event number = " << nZeroBias << endl; + float muPt = -10.; SingleMuPt(muPt,false); + //cout << "muPt = " << muPt << endl; + float muErPt = -10.; SingleMuPt(muErPt,true); - //---Muon Eta Tricks---// - float muErVPt[3] = {-10., -10., -10.}; - for(int j=0; j<3; j++){ - SingleMuPt(muErVPt[j], true, ERMu[j]); - } - float muErVEta[4] = {0.,0.,0.,0.}; - for(unsigned j=0; j<4; j++){ - SingleMuEtaRate(muErVEta[j],PTMu[j],false); - } - + //cout << "Event number = " << nZeroBias << endl; float muEta = SingleMuEta(16.); - float secondMuEta = SecondMuEta(0.); - float doubleMuPt1 = -10.; - float doubleMuPt2 = -10.; - DoubleMuPt(doubleMuPt1,doubleMuPt2,true,false); - - float diMu1 = -10.; - float diMu2 = -10.; - DoubleMuPt(diMu1,diMu2,true,false); + //cout << "muEta = " << muEta << endl; + + float doubleMuPt1 = -10.; + float doubleMuPt2 = -10.; + DoubleMuPt(doubleMuPt1,doubleMuPt2); + + float oniaMuPt1 = 0.; + float oniaMuPt2 = 0.; + Onia2015Pt(oniaMuPt1,oniaMuPt2,true, false, 22); - float oniaMuPt1 = 0.; - float oniaMuPt2 = 0.; - Onia2015Pt(oniaMuPt1,oniaMuPt2,true, false, 22); - float dijetPt1 = -10.; - float dijetPt2 = -10.; - float diCenjetPt1 = -10.; - float diCenjetPt2 = -10.; - DoubleJetPt(dijetPt1,dijetPt2); - DoubleJetPt(diCenjetPt1,diCenjetPt2,true); - Float_t dummy = -1; - float diTauErPt = -10.; DoubleTauJetEta2p17Pt(dummy,diTauErPt); - float diIsoTauEr = -10.; DoubleTauJetEta2p17Pt(dummy,diIsoTauEr,true); - dummy = -1.; - float quadjetPt = -10.; QuadJetPt(dummy,dummy,dummy,quadjetPt); - dummy = -1.; - float quadjetCPt = -10.; QuadJetPt(dummy,dummy,dummy,quadjetCPt,true); - dummy = -1.; + float dijetPt1 = -10.; + float dijetPt2 = -10.; + float diCenjetPt1 = -10.; + float diCenjetPt2 = -10.; + DoubleJetPt(dijetPt1,dijetPt2); + DoubleJetPt(diCenjetPt1,diCenjetPt2,true); + Float_t dummy = -1; + float ditauPt = -10.; DoubleTauJetEta2p17Pt(dummy,ditauPt); + dummy = -1.; + float quadjetPt = -10.; QuadJetPt(dummy,dummy,dummy,quadjetPt); + dummy = -1.; + float quadjetCPt = -10.; QuadJetPt(dummy,dummy,dummy,quadjetCPt,true); + dummy = -1.; // - float diEG1 = -10.; - float diEG2 = -10.; - float diIsolEG1 = -10.; - float diIsolEG2 = -10.; - DoubleEGPt(diEG1,diEG2,false); - DoubleEGPt(diIsolEG1,diIsolEG2,true); - - //outFile->Open(resultName.c_str(),"update"); - - // pile up value from 0 to 50, - float puWeight[51] = {1638.538183856806, 4.693674415610433, 1.5300909160502814, 0.7182406823718569, 0.4461270187978222, 0.39812703022422885, 0.4432122086751145, 0.5742601670647391, 0.7739373760577931, 1.0025956642167804, 1.3122680368593147, 1.605655051145846, 1.8929024225833195, 2.1284381102257535, 2.2556165182260717, 2.244482200364411, 2.154571520396462, 1.9528537819111809, 1.695897273333598, 1.4282923583611258, 1.1369113035284417, 0.8862206448254017, 0.6536240971561117, 0.46856364438557374, 0.33179561861669243, 0.22382832523838006, 0.14730363368878097, 0.09882046047249428, 0.060769117256921634, 0.04258674568273182, 0.024471799847250696, 0.017208722825574143, 0.009074708975294003, 0.006641952074695454, 0.0033690053530415084, 0.0020709022278971793, 0.0018436379632363492, 0.0009373317263744043, 0.0, 0.0007986637595886011, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0}; - - float weight = 1; - - if (isReweight){ - int PU = recoVtx_->nVtx; - weight = puWeight[PU]; - //weight = 1; - //std::cout<nPV_True)<Fill(muEta,weight); - hTH1F["nSecondMuVsEta"]->Fill(secondMuEta,weight); - hTH1F["nEGVsEta"]->Fill(egEta,weight); - hTH1F["nIsoEGVsEta"]->Fill(isoegEta,weight); - hCountTH1F["nMuCountVsEta"]->Fill(muEta,weight); - hCountTH1F["nEGCountVsEta"]->Fill(egEta,weight); - hCountTH1F["nIsoEGCountVsEta"]->Fill(isoegEta,weight); - - egIEta->Fill(egIeta,weight); - isoEgIEta->Fill(isoegIeta,weight); - - hTH1F["nJetVsEta"]->Fill(jetEta,weight); - hTH1F["nJetVsEta_Central"]->Fill(jetEta_Central,weight); - hTH1F["nJetVsEta_Fwd"]->Fill(jetEta_Fwd,weight); + float diEG1 = -10.; + float diEG2 = -10.; + float diIsolEG1 = -10.; + float diIsolEG2 = -10.; + DoubleEGPt(diEG1,diEG2,false); + DoubleEGPt(diIsolEG1,diIsolEG2,true); + + if(muEta > -9.) hTH1F["nMuVsEta"]->Fill(muEta); + hTH1F["nEGVsEta"]->Fill(egEta); + hTH1F["nIsoEGVsEta"]->Fill(isoegEta); + hTH1F["nJetVsEta"]->Fill(jetEta); + hTH1F["nJetVsEta_Central"]->Fill(jetEta_Central); + hTH1F["nJetVsEta_Fwd"]->Fill(jetEta_Fwd); for(int ptCut=0; ptCut<256; ++ptCut) { - if(jetPt>=ptCut) hTH1F["nJetVsPt"]->Fill(ptCut,weight); - if(jetCenPt>=ptCut) hTH1F["nJetCenVsPt"]->Fill(ptCut,weight); - if(TauPt>=ptCut) hTH1F["nTauVsPt"]->Fill(ptCut,weight); - if(TauErPt>=ptCut) hTH1F["nTauErVsPt"]->Fill(ptCut,weight); - if(isoTauPt>=ptCut) hTH1F["nIsoTauVsPt"]->Fill(ptCut,weight); - if(isoTauErPt>=ptCut) hTH1F["nIsoTauErVsPt"]->Fill(ptCut,weight); + if(jetPt>=ptCut) hTH1F["nJetVsPt"]->Fill(ptCut); + if(jetCenPt>=ptCut) hTH1F["nJetCenVsPt"]->Fill(ptCut); + if(TauPt>=ptCut) hTH1F["nTauVsPt"]->Fill(ptCut); + if(TauErPt>=ptCut) hTH1F["nTauErVsPt"]->Fill(ptCut); + if(isoTauPt>=ptCut) hTH1F["nIsoTauVsPt"]->Fill(ptCut); + if(isoTauErPt>=ptCut) hTH1F["nIsoTauErVsPt"]->Fill(ptCut); if(dijetPt2>=ptCut){ - hTH1F["nDiJetVsPt"]->Fill(ptCut,weight); + hTH1F["nDiJetVsPt"]->Fill(ptCut); for(int ptCut_0=ptCut; ptCut_0<256; ++ptCut_0) { - if(dijetPt1>=ptCut_0) hTH2F["nAsymDiJetVsPt"]->Fill(ptCut_0,ptCut,weight); + if(dijetPt1>=ptCut_0) hTH2F["nAsymDiJetVsPt"]->Fill(ptCut_0,ptCut); } } if(diCenjetPt2>=ptCut){ - hTH1F["nDiCenJetVsPt"]->Fill(ptCut,weight); + hTH1F["nDiCenJetVsPt"]->Fill(ptCut); for(int ptCut_0=ptCut; ptCut_0<256; ++ptCut_0) { - if(diCenjetPt1>=ptCut_0) hTH2F["nAsymDiCenJetVsPt"]->Fill(ptCut_0,ptCut,weight); + if(diCenjetPt1>=ptCut_0) hTH2F["nAsymDiCenJetVsPt"]->Fill(ptCut_0,ptCut); } } - if(diTauErPt>=ptCut) hTH1F["nDiTauVsPt"]->Fill(ptCut,weight); - if(diIsoTauEr>=ptCut) hTH1F["nDiIsoTauErVsPt"]->Fill(ptCut,weight); - if(quadjetPt>=ptCut) hTH1F["nQuadJetVsPt"]->Fill(ptCut,weight); - if(quadjetCPt>=ptCut) hTH1F["nQuadCenJetVsPt"]->Fill(ptCut,weight); + if(ditauPt>=ptCut) hTH1F["nDiTauVsPt"]->Fill(ptCut); + if(quadjetPt>=ptCut) hTH1F["nQuadJetVsPt"]->Fill(ptCut); + if(quadjetCPt>=ptCut) hTH1F["nQuadCenJetVsPt"]->Fill(ptCut); }//loop on 256 - // + // for(int ptCut=0; ptCut<65; ++ptCut) { - if(egPt>=ptCut) hTH1F["nEGVsPt"]->Fill(ptCut,weight); - if(egErPt>=ptCut) hTH1F["nEGErVsPt"]->Fill(ptCut,weight); - if(isoEgPt>=ptCut) hTH1F["nIsoEGVsPt"]->Fill(ptCut,weight); - - for(int i=0; i<5; ++i){ - if(egErVPt[i]>=ptCut) hTH1F["nEGEr"+std::to_string(ER[i])+"VsPt"]->Fill(ptCut,weight); - if(isoEgErVPt[i]>=ptCut) hTH1F["nIsoEGEr"+std::to_string(ER[i])+"VsPt"]->Fill(ptCut,weight); - } - - if(diEG2>=ptCut) hTH1F["nDiEGVsPt"]->Fill(ptCut,weight); - if(diIsolEG2>=ptCut) hTH1F["nDiIsoEGVsPt"]->Fill(ptCut,weight); - - for(int ptCut2=0; ptCut2<=65; ++ptCut2) { - if(diEG1>=ptCut && diEG2>=ptCut2 && ptCut2 <= ptCut) hTH2F["nEGPtVsPt"]->Fill(ptCut,ptCut2,weight); - if(diIsolEG1>=ptCut && diIsolEG2>=ptCut2 && ptCut2<= ptCut) hTH2F["nIsoEGPtVsPt"]->Fill(ptCut,ptCut2,weight); - } + if(egPt>=ptCut) hTH1F["nEGVsPt"]->Fill(ptCut); + if(egErPt>=ptCut) hTH1F["nEGErVsPt"]->Fill(ptCut); + if(isoEgPt>=ptCut) hTH1F["nIsoEGVsPt"]->Fill(ptCut); + + if(diEG2>=ptCut) hTH1F["nDiEGVsPt"]->Fill(ptCut); + if(diIsolEG2>=ptCut) hTH1F["nDiIsoEGVsPt"]->Fill(ptCut); + + + for(int ptCut2=0; ptCut2<=65; ++ptCut2) { + if(diEG1>=ptCut && diEG2>=ptCut2 && ptCut2 <= ptCut) hTH2F["nEGPtVsPt"]->Fill(ptCut,ptCut2); + if(diIsolEG1>=ptCut && diIsolEG2>=ptCut2 && ptCut2<= ptCut) hTH2F["nIsoEGPtVsPt"]->Fill(ptCut,ptCut2); + } + }//loop on 65 - - //---fill Eta Rate Histogram---// - //for(int etaCut=0; etaCut<31; ++etaCut) { - for(unsigned j=1; j<29; j++) { - for(unsigned i=0; i<6; ++i) { - //for(unsigned j=1; j<29; j++){ - if (egErEta[i]<=absTriggerTowerBins[j]) hTH1F["nEGEr"+std::to_string(PT[i])+"VsEta"]->Fill(absTriggerTowerBins[j]-0.001,weight); - if (isoEgErEta[i]<=absTriggerTowerBins[j]) hTH1F["nIsoEGEr"+std::to_string(PT[i])+"VsEta"]->Fill(absTriggerTowerBins[j]-0.001,weight); - //} - } - } - for(int etaCut=0; etaCut<26; ++etaCut) { - for(unsigned j=0; j<4; ++j) { - if (muErVEta[j]<=0.1*etaCut) hTH1F["nMuEr"+std::to_string(PTMu[j])+"VsEta"]->Fill(0.1*etaCut,weight); - } - } - //std::cout<=ptCut) hTH1F["nMuVsPt"]->Fill(ptCut,weight); - if (muErPt>=ptCut) hTH1F["nMuErVsPt"]->Fill(ptCut,weight); - if (diMu2>=ptCut) hTH1F["nDiMuVsPt"]->Fill(ptCut,weight); - - for(int j=0; j<3; j++) { - if (muErVPt[j]>=ptCut) hTH1F["nMuEr"+std::to_string(ERMu[j])+"VsPt"]->Fill(ptCut,weight); - } - } - for(int iCut=0; iCut<41; ++iCut) { - for(int iCut2=0; iCut2<=iCut; ++iCut2) { - float ptCut = iCut*0.5; - float ptCut2 = iCut2*0.5; - if (doubleMuPt1>=ptCut && doubleMuPt2>=ptCut2) hTH2F["nMuPtVsPt"]->Fill(ptCut,ptCut2,weight); - if (oniaMuPt1>=ptCut && oniaMuPt2>=ptCut2) hTH2F["nOniaMuPtVsPt"]->Fill(ptCut,ptCut2,weight); - } - } + // + for(int ptCut=0; ptCut<131; ++ptCut) { + if (muPt>=ptCut) hTH1F["nMuVsPt"]->Fill(ptCut); + if (muErPt>=ptCut) hTH1F["nMuErVsPt"]->Fill(ptCut); + } + + + for(int iCut=0; iCut<41; ++iCut) { + for(int iCut2=0; iCut2<=iCut; ++iCut2) { + float ptCut = iCut*0.5; + float ptCut2 = iCut2*0.5; + if (doubleMuPt1>=ptCut && doubleMuPt2>=ptCut2) hTH2F["nMuPtVsPt"]->Fill(ptCut,ptCut2); + if (oniaMuPt1>=ptCut && oniaMuPt2>=ptCut2) hTH2F["nOniaMuPtVsPt"]->Fill(ptCut,ptCut2); + } + } + for(int httCut=0; httCut<512; ++httCut) { - if(htt>httCut) hTH1F["nHTTVsHTT"]->Fill(httCut,weight); - if(ett>httCut) hTH1F["nETTVsETT"]->Fill(httCut,weight); - if(etm>httCut) hTH1F["nETMVsETM"]->Fill(httCut,weight); + if(htt>httCut) hTH1F["nHTTVsHTT"]->Fill(httCut); + if(ett>httCut) hTH1F["nETTVsETT"]->Fill(httCut); + if(etm>httCut) hTH1F["nETMVsETM"]->Fill(httCut); } + + } // end event loop - + float scaleFactor(1.); if (runOnData){ std::cout << "# of lumis sections used for rate computation : " << nLumi << std::endl; @@ -725,18 +468,14 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, std::cout << "# of zero bias events (weighted) used for rate computation : " << nZeroBias << std::endl; scaleFactor = ScaleFactor(nZeroBias,nBunches); } - float scaleFactorTest(1.); - scaleFactorTest = ScaleFactor(nZeroBias,nBunches); std::cout << "Scale factor applied to histograms = " << scaleFactor << std::endl; - std::cout << "Scale factor derived from nBunches applied to histograms = " << scaleFactorTest << std::endl; std::map::iterator hTH1FIt = hTH1F.begin(); std::map::iterator hTH1FEnd = hTH1F.end(); - + for(; hTH1FIt!=hTH1FEnd; ++hTH1FIt) { TH1F* histo = hTH1FIt->second; - //setRateError(histo); - histo->Sumw2(); + setRateError(histo); histo->Scale(scaleFactor); } @@ -745,31 +484,9 @@ void BasicRatePlots::run(bool runOnData, std::string resultTag, float crossSec, for(; hTH2FIt!=hTH2FEnd; ++hTH2FIt) { TH2F* histo = hTH2FIt->second; - histo->Sumw2(); histo->Scale(scaleFactor); } - - std::map::iterator hCountTH1FIt = hCountTH1F.begin(); - std::map::iterator hCountTH1FEnd = hCountTH1F.end(); - - for(; hCountTH1FIt!=hCountTH1FEnd; ++hCountTH1FIt) { - TH1F* histo = hCountTH1FIt->second; - //setRateError(histo); - histo->Sumw2(); - //histo->Scale(scaleFactor); - } - - for (int i=0; i<57; i++){ - float eg = hTH1F["nEGVsEta"]->GetBinContent(i)/hTH1F["nEGVsEta"]->GetXaxis()->GetBinWidth(i); - float isoeg = hTH1F["nIsoEGVsEta"]->GetBinContent(i)/hTH1F["nIsoEGVsEta"]->GetXaxis()->GetBinWidth(i); - hTH1F["nEGVsEta"]->SetBinContent(i,eg); - hTH1F["nIsoEGVsEta"]->SetBinContent(i,isoeg); - } - for (int i=0; i<65; i++){ - float jet = hTH1F["nJetVsEta"]->GetBinContent(i)/hTH1F["nJetVsEta"]->GetXaxis()->GetBinWidth(i); - hTH1F["nJetVsEta"]->SetBinContent(i,jet); - } - + outFile->Write(); outFile->Close(); delete outFile; @@ -789,7 +506,6 @@ void goRatePlots(std::string fileType, int isCrossSec = false, int nEvents = 0) std::string filename; bool isData(true); - bool isReweight(false); if (fileType == "13TEV_40PU_2016_RE-EMUL") { @@ -797,29 +513,19 @@ void goRatePlots(std::string fileType, int isCrossSec = false, int nEvents = 0) nBunches = nBunches25ns; filename = "/afs/cern.ch/user/p/pellicci/data2/L1DPG/root/2016/v2/40PU_25ns_Stage2/40PU_25ns_Stage2_1.root"; } - //*************************************************************************// - else if (fileType == "run80xMC_zerobias_l1tint_v63p1_muonFix_PU28") + else if (fileType == "13TEV_20PU_2016_RE-EMUL") { isData = false; - nBunches = 2736; - isReweight = false; - filename = "/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/r80xMC_809_zerobias_l1tint_v62p3_muonFix.txt"; + nBunches = nBunches25ns; + filename = "/afs/cern.ch/user/p/pellicci/data2/L1DPG/root/2016/v2/20PU_25ns_Stage2/20PU_25ns_Stage2_1.root"; } - else if (fileType == "run274241_zerobias_l1tint_v61p1_test_v2") + else if (fileType == "RUN256843_Stage1") { - isData = false; - filename = "/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/r274241_809_zerobias_l1tint_v61p1.txt"; - nBunches = 1752; - isReweight = false; + isData = true; + // filename = "/data/user/gennai/L1Ntuple/l1t_debug-stage-2_256843.root"; + filename = "ntuple/Run256843_stage1_Tune.list"; + //filename = "ntuples_256843_stage1B.list"; } - else if (fileType == "run273725_stage2_l1tint_v58p1") - { - isData = false; - filename = "/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v58p1_MC2015/CMSSW_8_0_8/src/L1TriggerDPG/L1Menu/macros/r273725_808_zerobias_l1t-int-v58p1.txt"; - nBunches = 2736; - isReweight = false; - } - //**************************************************************************// else if (fileType == "RUN256843_Stage2_8X") { isData = true; @@ -830,6 +536,15 @@ void goRatePlots(std::string fileType, int isCrossSec = false, int nEvents = 0) filename = "ntuple/Run256843_stage2_8X.list"; //filename = "ntuples_256843_stage2_full.list"; } + else if (fileType == "RUN259721_Stage1v2") + { + isData = false; + nBunches = 517; + // filename = "/data/user/gennai/L1Ntuple/l1t_debug-stage-2_256843.root"; + // filename = "root://cmseos.fnal.gov//store/user/lpctrig/apana/Stage2/ZeroBias1/crab_ZeroBias1_Run2015D-v1/151230_012024/0000/l1t_stage2_2.root"; + filename = "ntuple/r259721_Stage1v2.list"; + //filename = "ntuples_256843_stage2_full.list"; + } else if (fileType == "RUN256843_Stage2_76") { isData = true; @@ -875,5 +590,7 @@ void goRatePlots(std::string fileType, int isCrossSec = false, int nEvents = 0) // dir->GetObject("L1UpgradeTree",tree); BasicRatePlots basicRatePlots(filename); - basicRatePlots.run(isData,fileType,xSec13TeV,nBunches,isCrossSec,nEvents,isReweight); + basicRatePlots.run(isData,fileType,xSec13TeV,nBunches,isCrossSec,nEvents); + } + diff --git a/macros/Makefile b/macros/Makefile index 956ff21..33ecec7 100644 --- a/macros/Makefile +++ b/macros/Makefile @@ -54,3 +54,4 @@ testMenu2016 : $(ODIR)/testMenu2016.o $(OBJS) clean: rm -f *exe *.o $(PROGRAM) $(OBJS) $(ODIR)/*.o + diff --git a/macros/RunL1Menu2016.cc b/macros/RunL1Menu2016.cc index 8195f85..ece5a92 100644 --- a/macros/RunL1Menu2016.cc +++ b/macros/RunL1Menu2016.cc @@ -21,7 +21,6 @@ #include #include "BasicRatePlots.C" -#include "getDistributions.C" #include "L1Menu2016_minbias_cross_section.C" #include "TSystem.h" @@ -35,10 +34,7 @@ int main ( int argc, char *argv[] ) gSystem->Load("libFWCoreFWLite"); FWLiteEnabler::enable(); - //RunL1(true, true, 5); - goRatePlots("run80xMC_zerobias_l1tint_v63p1_muonFix_PU28",0,12000000); - //goRatePlots("run274241_zerobias_l1tint_v61p1_test_v2",0,100000); - //goRatePlots("run20PUMC_stage2_l1tint_v58p1",0,10000000); - //goGetDistributions(1000000); + //goRatePlots("RUN256843_Stage2",0,0); + RunL1(true, true, 5); return EXIT_SUCCESS; } // ---------- end of function main ---------- diff --git a/macros/getDistributions.C b/macros/getDistributions.C deleted file mode 100644 index e0f56d4..0000000 --- a/macros/getDistributions.C +++ /dev/null @@ -1,82 +0,0 @@ -#include "L1Ntuple.h" -#include "L1AlgoFactory.h" -#include -#include -#include - -#include "TH1F.h" -#include "TH2F.h" - -class getDistributions : public L1AlgoFactory -{ -public : - - //constructor - getDistributions(std::string filename){ - if (filename.find(".root") != std::string::npos) { - std::cout << "Reading RootFile: " << filename << std::endl; - L1Ntuple::Open(filename); - }else{ - std::cout << "Reading Filelist: " << filename << std::endl; - if (! L1Ntuple::OpenWithList(filename)) exit(0); - } - } - ~getDistributions() {} - - void run(std::string outfile, int nEvents); - -private: - std::map hTH1F; -}; - -void getDistributions::run(std::string outfilename, int nEvents) -{ - - TFile *outFile = new TFile((outfilename).c_str(),"recreate"); - outFile->cd(); - - //L1Ntuple::OpenWithList(filename); - - hTH1F["nVtex"] = new TH1F("nVtex","Number of Vertex",51,0,50); - - if (nEvents <= 0){ - nEvents=fChain->GetEntriesFast(); - } - - std::cout << "Tree contains " << fChain->GetEntriesFast() << " events." << std::endl; - std::cout << "Running on " << nEvents << " events." << std::endl; - - for (Long64_t event=0; event run << " lumi: " << event_ -> lumi << std::endl; - else - std::cout << "Processed " << event << " events." << std::endl; - } - - hTH1F["nVtex"]->Fill(recoVtx_->nVtx); - - } - - outFile->Write(); -} - -void goGetDistributions(int nEvents) -{ - std::string filename; - filename="/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/r274199_809_zerobias_l1tint_v61p1.txt"; - - std::string outfilename; - outfilename="/afs/cern.ch/user/z/zhangj/test/L1Menu/80x_stage2/v62p3_MC2016/CMSSW_8_0_9/src/L1TriggerDPG/L1Menu/macros/myDataDistributions_274199.root"; - - getDistributions getDistributions(filename); - getDistributions.run(outfilename, nEvents); -} - - - - - diff --git a/macros/getReWeightValue.py b/macros/getReWeightValue.py deleted file mode 100644 index a58dab0..0000000 --- a/macros/getReWeightValue.py +++ /dev/null @@ -1,25 +0,0 @@ -from ROOT import * - -dataFile=TFile.Open("myDataDistributions_274199.root") -mcFile=TFile.Open("myMCDistributions.root") - -dataHist=dataFile.Get("nVtex") -mcHist=mcFile.Get("nVtex") - -dataHist.SetBinContent(1,0) -dataHist.Scale(1./dataHist.Integral()) -mcHist.Scale(1./mcHist.Integral()) - -weights=[] - -for b in range(1,52): - if mcHist.GetBinContent(b)!=0: - weight=dataHist.GetBinContent(b)/mcHist.GetBinContent(b) - else: - weight=0 - weights.append(weight) - -#weights.append(0) - -print weights -print len(weights)