cms-nanoAOD / cmssw

CMS NanoAOD software integration repository
http://cms-sw.github.io/
Apache License 2.0
3 stars 10 forks source link

Add filterbits for high pT electron and muon triggers #455

Closed IzaakWN closed 4 years ago

IzaakWN commented 4 years ago

PR description:

Add high pT electron and muon triggers, targeting those that are recommended [1-5]:

2016:
  HLT_Mu50 (hltL3fL1sMu22Or25L1f0L2f10QL3Filtered50Q)
  HLT_TkMu50 (hltL3fL1sMu25f0TkFiltered50Q)
  HLT_Ele45_CaloIdVT_GsfTrkIdT_PFJet200_PFJet50 (hltEle45CaloIdVTGsfTrkIdTGsfDphiFilter)
  HLT_Ele50_CaloIdVT_GsfTrkIdT_PFJet165 (hltEle50CaloIdVTGsfTrkIdTGsfDphiFilter)
  HLT_Ele115_CaloIdVT_GsfTrkIdT (hltEle115CaloIdVTGsfTrkIdTGsfDphiFilter)
  HLT_Photon175 (hltEG175HEFilter)

2017:
  HLT_Mu50 (hltL3fL1sMu22Or25L1f0L2f10QL3Filtered50Q)
  HLT_OldMu100 (hltL3fL1sMu22Or25L1f0L2f10QL3Filtered100Q)
  HLT_TkMu100 (hltL3fL1sMu25f0TkFiltered100Q)
  HLT_Ele50_CaloIdVT_GsfTrkIdT_PFJet165 (hltEle50CaloIdVTGsfTrkIdTGsfDphiFilter)
  HLT_Ele115_CaloIdVT_GsfTrkIdT (hltEle115CaloIdVTGsfTrkIdTGsfDphiFilter)
  HLT_Photon175 (hltEG175HEFilter)
  HLT_Photon200 (hltEG200HEFilter)

2018:
  HLT_Mu50 (hltL3fL1sMu22Or25L1f0L2f10QL3Filtered50Q)
  HLT_OldMu100 (hltL3fL1sMu22Or25L1f0L2f10QL3Filtered100Q)
  HLT_TkMu100 (hltL3fL1sMu25f0TkFiltered100Q)
  HLT_Ele50_CaloIdVT_GsfTrkIdT_PFJet165 (hltEle50CaloIdVTGsfTrkIdTCentralPFJet165EleCleaned)
  HLT_Ele115_CaloIdVT_GsfTrkIdT (hltEle115CaloIdVTGsfTrkIdTGsfDphiFilter)
  HLT_Photon200 (hltEG200HEFilter)

Ele50*PFJet* can be exclusively selected with bits 2048+4096. To be more exclusive for Mu50 and Mu100, HLT_Photon175 and Photon200, the pT trigger thresholds are included in the filter bit patterns:

Electron:
   2048*filter('*Ele*CaloIdVTGsfTrkIdTGsf*Filter')
   4096*path('HLT_Ele*PFJet*')
   8192*max(filter('hltEG175HEFilter'),filter('hltEG200HEFilter'))

Muon:
  1024*max(filter('hltL3fL1sMu*L3Filtered50*'),filter('hltL3fL1sMu*TkFiltered50*'))
  2048*max(filter('hltL3fL1sMu*L3Filtered100*'),filter('hltL3fL1sMu*TkFiltered100*'))

The selection of the muon trigger objects had to change to include the corresponding filters [5]:

type(83) && ((pt > 5 && coll('hltIterL3MuonCandidates')) || (pt > 45 && coll('hltHighPtTkMuonCands')) || (pt > 95 && coll('hltOldL3MuonCandidates')))

The documentation is updated:

2016:
  "..., 2048 = 1e (CaloIdVT_GsfTrkIdT), 4096 = 1e (PFJet), 8192 = 1e (Photon175)"
  "..., 1024 = 1mu (Mu50)"

2017/2018:
  "..., 2048 = 1e (CaloIdVT_GsfTrkIdT), 4096 = 1e (PFJet), 8192 = 1e (Photon175_OR_Photon200)"
  "..., 1024 = 1mu (Mu50), 2048 = 1mu (Mu100)"

One thing that should still be added is the emu and double muon/electron trigger objects for 2016.

[1] https://twiki.cern.ch/twiki/bin/view/CMS/MuonHLT2016#Recommended_trigger_paths_for_20 [2] https://twiki.cern.ch/twiki/bin/view/CMS/MuonHLT2017#Recommendations_for_2017_data_an [3] https://twiki.cern.ch/twiki/bin/view/CMS/MuonHLT2018#Recommended_trigger_paths_for_20 [4] https://twiki.cern.ch/twiki/bin/view/CMS/EgHLTRunIISummary#Short_Summary_Recommended_Trigge [5] https://github.com/IzaakWN/cmssw/commit/67d5a4c7db373f2ebd59149cdebbb29cd9e8cd32#diff-0fbc78c42b3703f21323e95fb1320981R63

PR validation:

Validated locally with 2016/2017/2018 data and MC that the bits are added in the expected way for the respective triggers. Checked as well that the changes in selection for the muon trigger object did not change the number of objects for the other filterbits.

peruzzim commented 4 years ago

I've merged #453 that was opened before, could you please adapt these changes on top of that? (please rebase, do not fix the confict while merging, because that makes it difficult to backport these changes to other CMSSW branches)

IzaakWN commented 4 years ago

Okay, I'll rebase my repo, but keep this PR if that's okay.

Do you prefer to keep the electron trigger object consolidated for all years?

Also, for the muon objects, should I copy the other bits (16 = 2mu, 32 = 1mu-1e, 64 = 1mu-1tau, 128 = 3mu, 256 = 2mu-1e, 512 = 1mu-2e) to 2016? Not an expert, and I have not checked whether these patterns cover the equivalent 2016 triggers, but it does not affect the other bits. Otherwise, do you know where is there a comprehensive list for these 2016 triggers?

peruzzim commented 4 years ago

Yes, it would be better to keep the electron object consolidated as introduced by #453. For muons, unfortunately I don't have expertise to really answer that question. I would leave things as they are for the moment, and follow up with experts at a later moment.

gpetruc-bot commented 4 years ago

Automatic test started, see https://gitlab.cern.ch/cms-nanoAOD/nanoAOD-integration/pipelines/1256882/builds

gpetruc-bot commented 4 years ago

Automatic test started, see https://gitlab.cern.ch/cms-nanoAOD/nanoAOD-integration/pipelines/1257170/builds