Skip to content

Instantly share code, notes, and snippets.

@arnobaer
Created May 4, 2021 07:29
Show Gist options
  • Save arnobaer/5729fe19372117914cd21a0c50f1a803 to your computer and use it in GitHub Desktop.
Save arnobaer/5729fe19372117914cd21a0c50f1a803 to your computer and use it in GitHub Desktop.
Future L1Menu mockup
import l1menu
MU = l1menu.muon.pt(0)
MU_SNGL = MU.iso(12,13,14,15)
ETA_2p0 = (-2.0, 2.0)
MASS_MIN_1 = 1.0
MASS_MIN_7 = 7.0
MASS_MASS_7to18 = (7.0, 18.0)
m = l1menu.Menu(
name="L1Menu_Sample",
version="1.0.0",
comment="Example menu for testing purpose."
)
m.add_seed(
name="L1_DoubleMu0_Mass_Min1",
expression=l1menu.m0(MU, MU, mass=MASS_MIN_1),
comment="L1 Menu (2018 v1): Added by L1 Menu Team (L1T-DPG)"
)
m.add_seed(
name="L1_DoubleMu_15_7_Mass_Min1",
expression=l1menu.m0(MU.pt(15), MU.pt(7), mass=MASS_MIN_1)
)
m.add_seed(
name="L1_DoubleMu4p5er2p0_SQ_OS_Mass_Min7",
expression=l1menu.m0(
MU_SNGL.pt(4.5).eta(ETA_2p0),
MU_SNGL.pt(4.5).eta(ETA_2p0),
chgcor='OS',
mass=MASS_MIN_7
),
comment="L1 Menu (2018 v2): Seeds for DoubleMuonLowMass PDs: https://its.cern.ch/jira/browse/CMSLITDPG-625 https://its.cern.ch/jira/browse/CMSLITDPG-507 https://its.cern.ch/jira/browse/CMSLITDPG-78"
)
m.add_seed(
name="L1_DoubleMu4p5er2p0_SQ_OS_Mass_Min7",
expression=l1menu.m0(
MU_SNGL.pt(4.5).eta(ETA_2p0),
MU_SNGL.pt(4.5).eta(ETA_2p0),
chgcor='OS',
mass=MASS_MASS_7to18
),
comment="L1 Menu (2018 v1): Seeds for DoubleMuonLowMass PDs: https://its.cern.ch/jira/browse/CMSLITDPG-507 https://its.cern.ch/jira/browse/CMSLITDPG-78"
)
m.implement(format='phase1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment