Skip to content
Snippets Groups Projects
Commit c2075896 authored by Amitav Mitra's avatar Amitav Mitra
Browse files

working JERC jet veto map, but number of vetoed events seems abnormally high....

working JERC jet veto map, but number of vetoed events seems abnormally high. Need to double check what correctionlib returns
parent 3a089608
Branches Run3_dev
No related tags found
No related merge requests found
......@@ -50,6 +50,10 @@ class JERC_JetVeto {
// First check whether we the jet passes the nominal "loose selection"
bool jet_passes = (jets[ijet].pt > 15) && (jets[ijet].jetId == 6) && ((jets[ijet].chEmEF + jets[ijet].neEmEF) < 0.9);
if (jet_passes) { // Consult jet veto map
// First impose checks on valid eta and phi. The eta/phi variables have a certain allowed range in correctionlib and will fail if passed a value outside that range.
if (abs(jets[ijet].eta) > 5.191) {continue;}
if (abs(jets[ijet].phi) > 3.1415926536) {continue;}
float veto;
std::map<std::string, correction::Variable::Type> map {
{"type", "jetvetomap"}, // name of the type of veto map. The recommended map for analyses is 'jetvetomap'. Other possible values: jetvetomap, jetvetomap_all, jetvetomap_hbp2m1, jetvetomap_hem1516, jetvetomap_hot
......
......@@ -197,8 +197,6 @@ def AutoJME(a, jetCollection, year, dataEra='', calibrate=True):
else:
a.CalibrateVars({},evalargs,'',variationsFlag=(not a.isData))
# JET VETO MAPS NOT WORKING YET
'''
# Now apply veto maps to Data and MC (Run 3 ONLY)
if (y > 2018):
print('\nStep 3: Applying JERC jet veto maps (Run 3 only)...')
......@@ -209,7 +207,7 @@ def AutoJME(a, jetCollection, year, dataEra='', calibrate=True):
CompileCpp(f'JERC_JetVeto jet_vetoer = JERC_JetVeto("{fname_vetomap}","{key_vetomap}");')
a.Define('jetmap_vetoed_events',f'jet_vetoer.eval(Jets)') # Pass in the TIMBER-created struct for the AK4 jets ("Jet"+"s")
a.Cut('JERC_jet_veto','jetmap_vetoed_events == 1')
'''
print('\n----------------------------------------------------------------------------------------')
print('------------------------------Finished AutoJME -----------------------------------------')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment