From 87d03e107ef419a2d662ef8df5649f01fa69efc5 Mon Sep 17 00:00:00 2001 From: Kelci Mohrman Date: Sat, 21 Aug 2021 08:56:51 -0400 Subject: [PATCH 1/3] Do not use taus for jet cleaning --- analysis/topEFT/topeft.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/analysis/topEFT/topeft.py b/analysis/topEFT/topeft.py index eae580600..49fc614ea 100644 --- a/analysis/topEFT/topeft.py +++ b/analysis/topEFT/topeft.py @@ -162,11 +162,10 @@ def process(self, events): #################### Jets #################### # Jet cleaning, before any jet selection - vetos_tocleanjets= ak.with_name( ak.concatenate([tau, l_fo], axis=1), "PtEtaPhiMCandidate") + #vetos_tocleanjets= ak.with_name( ak.concatenate([tau, l_fo], axis=1), "PtEtaPhiMCandidate") + vetos_tocleanjets= ak.with_name( l_fo, "PtEtaPhiMCandidate") tmp = ak.cartesian([ak.local_index(jets.pt), vetos_tocleanjets.jetIdx], nested=True) cleanedJets = jets[~ak.any(tmp.slot0 == tmp.slot1, axis=-1)] # this line should go before *any selection*, otherwise lep.jetIdx is not aligned with the jet index - cleanedJets["isClean"] = isClean(cleanedJets, tau, drmin=0.3) - cleanedJets=cleanedJets[cleanedJets.isClean] # Selecting jets and cleaning them jetptname = "pt_nom" if hasattr(cleanedJets, "pt_nom") else "pt" From 743ee72a810a2972671fa2d5573f6f451fbfcd95 Mon Sep 17 00:00:00 2001 From: Kelci Mohrman Date: Mon, 23 Aug 2021 17:21:30 -0400 Subject: [PATCH 2/3] Update ref yields since changed processor to not clean jets with taus --- analysis/topEFT/test/ref_yields.json | 214 +++++++++++++-------------- 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/analysis/topEFT/test/ref_yields.json b/analysis/topEFT/test/ref_yields.json index 1f9d68ec8..936a3a58e 100644 --- a/analysis/topEFT/test/ref_yields.json +++ b/analysis/topEFT/test/ref_yields.json @@ -1,230 +1,230 @@ { "tHq": { "2lss_m": [ - 0.3196092083983611, - 5.20037076517107e-16 + 0.3710045127199857, + 5.602917948519765e-16 ], "2lss_p": [ - 0.647589155473856, - 7.402432401796888e-16 + 0.7659643245751446, + 8.050612767087307e-16 ], "3l_m_offZ_1b": [ - 0.07990530715093166, - 2.600234277403966e-16 + 0.08475666304649371, + 2.678006281246484e-16 ], "3l_m_offZ_2b": [ - 0.06294857373567417, - 2.3079033293519833e-16 + 0.06408327944898211, + 2.3286114613629284e-16 ], "3l_onZ_1b": [ - 0.08358632901841373, - 2.659452834415599e-16 + 0.08365197453204609, + 2.660496945847794e-16 ], "3l_onZ_2b": [ - 0.045912406857189524, - 1.9710139433395982e-16 + 0.04939426722263978, + 2.0443861961084437e-16 ], "3l_p_offZ_1b": [ - 0.16531383447223408, - 3.7400660002347705e-16 + 0.16498384803130708, + 3.7363313231691884e-16 ], "3l_p_offZ_2b": [ - 0.1173026047338422, - 3.150492821121879e-16 + 0.12019470089461053, + 3.189094047676955e-16 ], "4l": [ - 0.004833320658223908, - 6.395101926201802e-17 + 0.004825743451963783, + 6.390087153107455e-17 ] }, "tllq": { "2lss_m": [ - 1.365059771218424, - 1.074732792672839e-15 + 1.6112241161951864, + 1.1676230054835288e-15 ], "2lss_p": [ - 2.349867237855154, - 1.410088366472844e-15 + 2.7691823963081883, + 1.5307365336130503e-15 ], "3l_m_offZ_1b": [ - 1.138267135911849, - 9.814016073974678e-16 + 1.1724336754542135, + 9.96021718561334e-16 ], "3l_m_offZ_2b": [ - 0.5032431272939573, - 6.525496975022451e-16 + 0.5190007646192056, + 6.626873268286695e-16 ], "3l_onZ_1b": [ - 23.99370450081029, - 4.5058146152321315e-15 + 24.62822218402632, + 4.56500437293825e-15 ], "3l_onZ_2b": [ - 10.314863913153326, - 2.954312402686656e-15 + 10.653232061978684, + 3.0023779381038518e-15 ], "3l_p_offZ_1b": [ - 2.064126231719995, - 1.3215779772366513e-15 + 2.124964339470186, + 1.3409126551653039e-15 ], "3l_p_offZ_2b": [ - 0.8904681629726994, - 8.680282604713394e-16 + 0.919728885114215, + 8.8217466159382645e-16 ], "4l": [ - 0.00020282813346459745, - 1.3100526906932971e-17 + 0.0002042926421139649, + 1.3147737632979394e-17 ] }, "ttH": { "2lss_m": [ - 20.225238868140412, - 4.136866405584941e-15 + 22.924280126012807, + 4.404255646409949e-15 ], "2lss_p": [ - 20.20968989330552, - 4.135275907699145e-15 + 22.682258989752658, + 4.380945181537526e-15 ], "3l_m_offZ_1b": [ - 4.689672304505968, - 1.9920301849266483e-15 + 4.7939904930792405, + 2.014063925039117e-15 ], "3l_m_offZ_2b": [ - 4.49317083122701, - 1.949849681454704e-15 + 4.6401365257240395, + 1.9814816092813833e-15 ], "3l_onZ_1b": [ - 2.1654658947817134, - 1.3536311519703314e-15 + 2.1963308764276093, + 1.3632438587852393e-15 ], "3l_onZ_2b": [ - 2.190851424690058, - 1.361542272334255e-15 + 2.2691758290640927, + 1.3856665743828579e-15 ], "3l_p_offZ_1b": [ - 4.795436089418284, - 2.0143675660232024e-15 + 4.886954299414966, + 2.0334982607388794e-15 ], "3l_p_offZ_2b": [ - 4.63487884536277, - 1.9803586951511603e-15 + 4.845531074909525, + 2.024861663347073e-15 ], "4l": [ - 0.6502941146320784, - 7.417876153098967e-16 + 0.677443836018389, + 7.571140649863634e-16 ] }, "ttll": { "2lss_m": [ - 18.77663685120453, - 3.9859658163964174e-15 + 21.212873717459818, + 4.236667875111815e-15 ], "2lss_p": [ - 19.178699216334667, - 4.028415334362798e-15 + 21.635650855740618, + 4.278678439147616e-15 ], "3l_m_offZ_1b": [ - 7.914045330599544, - 2.587759628544099e-15 + 8.001820774952948, + 2.6020706033772772e-15 ], "3l_m_offZ_2b": [ - 7.9720222240193825, - 2.5972210661547352e-15 + 8.224980020130387, + 2.6381050924047485e-15 ], "3l_onZ_1b": [ - 65.33601326987204, - 7.43534255570387e-15 + 66.01234729743713, + 7.473727420729892e-15 ], "3l_onZ_2b": [ - 57.60086889854808, - 6.981346342956344e-15 + 59.558489574208146, + 7.098989014242096e-15 ], "3l_p_offZ_1b": [ - 8.339858407971539, - 2.656464430080631e-15 + 8.417872172015484, + 2.668860227659428e-15 ], "3l_p_offZ_2b": [ - 7.550278795784639, - 2.5275872769475242e-15 + 7.825455018021143, + 2.573235096411229e-15 ], "4l": [ - 6.832216612612325, - 2.404393138510864e-15 + 7.034189129122071, + 2.4396733769462286e-15 ] }, "ttlnu": { "2lss_m": [ - 30.468318301236426, - 5.077488032130733e-15 + 33.35532960002723, + 5.312602039565196e-15 ], "2lss_p": [ - 57.428371272322416, - 6.970884967522177e-15 + 62.4479636473945, + 7.269152950978432e-15 ], "3l_m_offZ_1b": [ - 4.282131152865202, - 1.903507747484127e-15 + 4.3206571202080655, + 1.9120514219487027e-15 ], "3l_m_offZ_2b": [ - 4.665903672343491, - 1.986975676282123e-15 + 4.801734253875616, + 2.0156899332797995e-15 ], "3l_onZ_1b": [ - 1.9846305384316014, - 1.2958791468683638e-15 + 2.0154820649443304, + 1.3059126697856719e-15 ], "3l_onZ_2b": [ - 2.0432154893718595, - 1.3148667783669615e-15 + 2.102364862008147, + 1.3337631401440415e-15 ], "3l_p_offZ_1b": [ - 8.156591909084298, - 2.627114693990162e-15 + 8.27024518021703, + 2.6453543747248586e-15 ], "3l_p_offZ_2b": [ - 8.602137624402078, - 2.697912495992509e-15 + 8.851035628734682, + 2.736665459952783e-15 ], "4l": [ - 0.0003728916718207882, + 0.00037289167182078827, 1.776298742638461e-17 ] }, "tttt": { "2lss_m": [ - 3.232527669555145, - 1.6538487598304794e-15 + 3.3068316450382755, + 1.6727487303932971e-15 ], "2lss_p": [ - 3.1800779313426406, - 1.6403765338100097e-15 + 3.2532582381430877, + 1.6591434448945214e-15 ], "3l_m_offZ_1b": [ - 0.14181173643563127, - 3.4640228956339897e-16 + 0.13588077291212303, + 3.3908116818536277e-16 ], "3l_m_offZ_2b": [ - 0.7471505880642471, - 7.951127868086832e-16 + 0.7569571026714839, + 8.003137908339128e-16 ], "3l_onZ_1b": [ - 0.0363384967399618, - 1.7535095887952162e-16 + 0.03427772739204262, + 1.7030628546882795e-16 ], "3l_onZ_2b": [ - 0.21847731998938, - 4.2995979417429074e-16 + 0.2214526219098188, + 4.328775667204836e-16 ], "3l_p_offZ_1b": [ - 0.1334925467918931, - 3.3608813115138804e-16 + 0.12694311607564904, + 3.2773984486199505e-16 ], "3l_p_offZ_2b": [ - 0.7580201580068776, - 8.008755659649418e-16 + 0.7691630065512409, + 8.06740501222412e-16 ], "4l": [ - 0.07542641089462447, - 2.5263085258943905e-16 + 0.07600550484840561, + 2.5359879782117105e-16 ] } } \ No newline at end of file From 6e2963256368858a28bd20ba7a7219f3605992a4 Mon Sep 17 00:00:00 2001 From: Kelci Mohrman Date: Mon, 23 Aug 2021 18:30:10 -0400 Subject: [PATCH 3/3] Add script for remaking ci ref yields file, and update ci ref yields file --- analysis/topEFT/remake_ci_ref_yields.sh | 20 ++++++++++++ .../test/UL17_private_ttH_for_CI_yields.json | 32 +++++++++---------- 2 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 analysis/topEFT/remake_ci_ref_yields.sh diff --git a/analysis/topEFT/remake_ci_ref_yields.sh b/analysis/topEFT/remake_ci_ref_yields.sh new file mode 100644 index 000000000..4a13a9382 --- /dev/null +++ b/analysis/topEFT/remake_ci_ref_yields.sh @@ -0,0 +1,20 @@ +# This script reproduces the reference yields file that the CI compares agains +# Run this script when you want to update the reference file + +# Get the file the CI uses, and move it to the directory the JSON expects +printf "\nDownloading root file...\n" +wget http://www.crc.nd.edu/~ywan2/root_files/NAOD-00000_18449.root +mv NAOD-00000_18449.root ../../NAOD-00000_18449.root + +# Run the processor +printf "\nRunning the processor...\n" +time python run.py ../../topcoffea/json/test_samples/UL17_private_ttH_for_CI.json -o new_ref_histos + +# Make the JSON file of the yields +printf "\nMaking the yields JSON file...\n" +python get_yield_json.py -f histos/new_ref_histos.pkl.gz -n new_ref_yields + +# Replace the reference yields with the new reference yields +printf "\nReplacing ref yields JSON with new file...\n" +mv new_ref_yields.json test/UL17_private_ttH_for_CI_yields.json +printf "\n\nDone.\n\n" diff --git a/analysis/topEFT/test/UL17_private_ttH_for_CI_yields.json b/analysis/topEFT/test/UL17_private_ttH_for_CI_yields.json index 20f2adaba..b696f2258 100644 --- a/analysis/topEFT/test/UL17_private_ttH_for_CI_yields.json +++ b/analysis/topEFT/test/UL17_private_ttH_for_CI_yields.json @@ -1,36 +1,36 @@ { "ttH": { "2lss_m": [ - 20.677004545468762, - 4.1828132785350285e-15 + 23.391304725093818, + 4.4488922733299325e-15 ], "2lss_p": [ - 19.870077477553295, - 4.1003832114823895e-15 + 22.5133505229178, + 4.364602861060397e-15 ], "3l_m_offZ_1b": [ - 3.964872301886027, - 1.8316364125419964e-15 + 4.012271854861266, + 1.842552376950432e-15 ], "3l_m_offZ_2b": [ - 4.53462424039309, - 1.95882356067898e-15 + 4.729040186898001, + 2.0003738507488667e-15 ], "3l_onZ_1b": [ - 1.766004732614043, - 1.222420425560399e-15 + 1.8100936561046415, + 1.2375854350353434e-15 ], "3l_onZ_2b": [ - 1.9007979982164087, - 1.2682143103404668e-15 + 1.9006819584409087, + 1.2681755988229705e-15 ], "3l_p_offZ_1b": [ - 4.72934896615817, - 2.000439156165079e-15 + 4.674642862184853, + 1.98883559834224e-15 ], "3l_p_offZ_2b": [ - 5.609943207055785, - 2.1787324345487895e-15 + 5.784638780146453, + 2.2123956139062505e-15 ], "4l": [ 0.7206380524728832,