L1 Trigger Emulator Stage 2 Upgrade Instructions

This is a set of instructions on how to run the Stage-2 (Phase-I) upgrade version of the L1 Emulator to produce rates and efficiencies. For developer information, please see SWGuideL1TOfflineDev.

** Always use the most recent prompt GT when re-emulating data! You can find it here: https://twiki.cern.ch/twiki/bin/view/CMS/LatestOnlineGTs

Environment Setup with Integration Tags

The L1T integration branch has been rebased to CMSSW_13_1_0_pre4. Listed below are instructions for preparing a project area to run in CMSSW_13_1_0_pre4. For the list of sequential features and fixes included up to this tag and later see the table here.

cmsrel CMSSW_13_1_0_pre4
cd CMSSW_13_1_0_pre4/src
cmsenv
git cms-init
git remote add cms-l1t-offline git@github.com:cms-l1t-offline/cmssw.git
git fetch cms-l1t-offline l1t-integration-CMSSW_13_1_0_pre4
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v156
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TCalorimeter.git L1Trigger/L1TCalorimeter/data

git cms-checkdeps -A -a

scram b -j 8

L1T emulation relevant GlobalTags in CMSSW_12_6_0_pre1 are:

The full list of available GTs can be found in https://github.com/cms-sw/cmssw/blob/master/Configuration/AlCa/python/autoCond.py.

L1T Cookbook: current recipes

Workflows

* Re-emulating Run 3 data with new calibrations

cmsDriver.py l1Ntuple -s RAW2DIGI --python_filename=data.py -n 100 --no_output --era=Run3 --data --conditions=124X_dataRun3_Prompt_v4 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloParams_2022_v0_3 --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODRAWEMU --filein=/store/express/Run2022A/ExpressPhysics/FEVT/Express-v1/000/353/709/00000/4584e10d-10b5-4549-a857-29b5fe0c2674.root

  • Re-emulating Run-3 (MC) with Run3 era for deriving calibrations
cmsDriver.py l1Ntuple -s RAW2DIGI --python_filename=mc.py -n 303 --no_output --era=Run3 --mc --conditions=123X_mcRun3_2021_realistic_v11 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAWSimHcalTP --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleRAWEMUGEN_MC --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloParams_2022_v0_1 --filein=/store/mc/Run3Summer21DRPremix/SingleNeutrino_Pt-2To20-gun/GEN-SIM-DIGI-RAW/SNB_120X_mcRun3_2021_realistic_v6-v2/2540000/e7186f9d-8dfb-480f-bcba-ead981805f87.root

For samples produced using CMSSW < 12_4_X: Add to the config file the settings for HCAL PFA1p from here, remembering to remove the two lines at the end as they are only needed for data: https://twiki.cern.ch/twiki/bin/viewauth/CMS/HcalPileupMitigation#PFA1_Filter

  • Re-emulating Run-3 (MC) with Run3 era
cmsDriver.py l1Ntuple -s RAW2DIGI --python_filename=mc.py -n 240 --no_output --era=Run3 --mc --conditions=120X_mcRun3_2021_realistic_v9 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleRAWEMUGEN_MC --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloParams_2021_v0_1 --filein=/store/relval/CMSSW_12_0_1/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/120X_mcRun3_2021_realistic_v7-v2/10000/b67e121b-b29f-4eb0-8628-b3aa1cb76720.root

Add to the config file the following lines


import os                                                                                                                                                           
base = os.environ["CMSSW_BASE"]                                                                                                                                     
process.GlobalTag.toGet = cms.VPSet(                                                                                                                                
        cms.PSet(record = cms.string("GEMeMapRcd"),                                                                                                                 
                       tag = cms.string("GEMeMapDummy"),                                                                                                            
                       connect = cms.string("sqlite_file:" + base + "/src/L1Trigger/Configuration/test/GEMeMapDummy.db")                                            
                )                                                                                                                                                   
)                                                                                                                                                                   
process.muonGEMDigis.useDBEMap = True       

  • Re-emulating 2018 data with the new 2018 CaloParams and conditions

Please follow latest instructions above to setup CMSSW and use latest GT.

cmsDriver.py l1Ntuple -s RAW2DIGI --python_filename=data.py -n 10 --no_output --era=Run2_2018 --data --conditions=110X_dataRun2_v12 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODRAWEMU --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloParams_2018_v1_3 --filein=file:/eos/cms/store/data/Run2018D/SingleMuon/RAW-RECO/ZMu-PromptReco-v2/000/321/457/00000/60D23B7B-C7A5-E811-B14B-FA163EF4F4A1.root

  • Emulating 10_0_X MC with the 2018 CaloParams and conditions

Please follow the instruction above to setup CMSSW_10_0_3 with the l1t-integration branch, as this was the release used for 100X MC.

nb. AODRAWEMUGEN_MC will include everything in your L1Ntuples but requires 2 input datasets. Please modify this customisation depending on what you require in your L1Ntuples.

cmsDriver.py l1Ntuple -s RAW2DIGI --era=Run2_2018 --mc --python_filename=mc.py --no_output -n 202 --conditions=100X_upgrade2018_realistic_v11 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAWSimHcalTP --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODRAWEMUGEN_MC --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloParams_2018_v1_2 --custom_conditions=HcalChannelQuality_2018_v3.0_mc,HcalChannelQualityRcd,frontier://FrontierProd/CMS_CONDITIONS --filein=/store/mc/RunIISpring18DR/QCD_Pt-15to3000_TuneCP5_Flat_13TeV_pythia8/GEN-SIM-RAW/NZSPU0to70_100X_upgrade2018_realistic_v10-v1/100001/1A22F20B-8321-E811-AABF-1866DAEA6C40.root

  • Re-emulating 2017 data with the end-of-2017 CaloParams and conditions

Please follow latest instructions above to setup CMSSW and use latest GT.

cmsDriver.py l1Ntuple -s RAW2DIGI --python_filename=data.py -n 420 --no_output --era=Run2_2017 --data --conditions=101X_dataRun2_Prompt_v9 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODRAWEMU --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_2017_v1_8_4 --filein=/store/express/Run2017F/ExpressPhysics/FEVT/Express-v1/000/305/112/00000/0020C816-24B2-E711-BDA7-02163E01A26E.root

  • Emulating 9_4_X MC with the end-of-2017 CaloParams and conditions

Please follow instructions above to setup CMSSW_9_4_0_pre3.

cmsDriver.py l1Ntuple -s RAW2DIGI --python_filename=94X.py -n -1 --no_output --era=Run2_2017 --mc --conditions=94X_mc2017_realistic_v10 --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleRAW --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_2017_v1_8_4 --filein=/store/mc/RunIIWinter17DR/QCD_Pt-15to3000_TuneCP5_Flat_13TeV_pythia8/GEN-SIM-RAW/NZSPU0to70_94X_upgrade2018_realistic_v8-v1/40001/7ADDB962-FF01-E811-81A7-02163E017729.root

  • Re-emulating 2017 data with the 2017 CaloParams and conditions + ECAL ZS

Please follow latest instructions above to setup CMSSW and use latest GT.

cmsDriver.py l1Ntuple -s RAW2DIGI --python_filename=data.py -n 420 --no_output --era=Run2_2017 --data --conditions=101X_dataRun2_Prompt_v9 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODRAWEMU --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_2017_v1_8_4_ECALZS --filein=/store/express/Run2017F/ExpressPhysics/FEVT/Express-v1/000/305/112/00000/0020C816-24B2-E711-BDA7-02163E01A26E.root

Configuring the emulation of L1T

Workflows

There are multiple re-emulation workflows available which are specified through the customisation flag --customise=L1Trigger/Configuration/customiseReEmul.:

  • Re-emulation workflows from various stages of unpacked TPs for 2016
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW # for 2016 data: unpacked TPs
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAWsimEcalTP for 2016 data: unpacked TPs except EcalTP
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAWsimHcalTP for 2016 data: unpacked TPs except HcalTP (available in tags v76.1 and later)
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAWCalouGT for 2017/2016 data: unpacked uGMT Muons, emulated Calo and uGT (available in tags v96.4 and later)

  • WARNING: be careful when ReEmulating EcalTPs. MC RAW usually does not have unsupressed Ecal Digis.
  • Re-emulation workflows from various stages of from MC RAW from 2016 and later:
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAW # for 2016 MC: unpacked TPs except Csc TP
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAWsimEcalTP # for 2017 MC: unpacked TPs except Csc TP, and EcalTPs (emulated) (from v95.8)
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAWsimHcalTP # for 2017 MC: unpacked TPs except Csc TP, and HcalTPs (emulated) (from v95.8)
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAWsimCalTP # for 2017 MC: unpacked TPs except Csc TP, and Ecal+HcalTPs (emulated) (from v95.8)

  • Re-emulation workflows from various stages of unpacked TPs for 2015
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW2015 # for 2015 data: unpacked TPs except HcalTP
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW2015simCaloTP # for 2015 data: unpacked TPs except Eca/HcalTP
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAW2015 # for 2015 MC: unpacked TPs except Csc TP

  • Re-emulation workflows from simulated TPs
    • --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAWsimTP # for 2016/2015 data: emulate TPs first from digis

Calo parameters

One can also chose the setup of calo parameters through a configuration customisation of cmsDriver.py command which overwrites the default calo parameters setup. In the integration branch, no configuration files containing calo parameters should ever be overwritten. Whenever a new configuration is available, a new cfi file is provided, together with a new customisation option. **WARNING: IF USING THIS CUSTOMISATION FLAG, MAKE SURE YOU USE IT AT THE END OF THE cmsDriver.py COMMAND, OTHERWISE IT MIGHT NOT BE EFFECTIVE**

 --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloParams_2021_v0_2  

    • L1TSettingsToCaloStage2Params _2017_v1_2_inconsistent ## 2017 calorimeter Layer1 only calibrations binned in tower eta. These are to be used for derivation of corresponding Layer2 calibrations, and are inconsistent with the present Layer2 calibrations. Available from l1t-integration-v92.4.
    • L1TSettingsToCaloStage2Params _2017_v1_1 ## New 2017 calorimeter calibrations for both Laye1 and Layer2 . Available from CMSSW_9_0_0_pre2 (l1t-integration-v91.15)
    • L1TSettingsToCaloStage2Params _v3_3 ## same as v3_2 plus parameters introduced for HI run emulation in CaloLayer2 and uGT. Available from CMSSW_8_0_22
    • L1TSettingsToCaloStage2Params _v3_3_HI ## same as v3_3 but HI parameters set for HI run emulation in CaloLayer2 and uGT.
    • L1TSettingsToCaloStage2Params _v3_2 ## same as v3_1 but with TauIso working point 22. Intended for 2016 Sept MC generation
    • L1TSettingsToCaloStage2Params _v3_1 ## uses LUTS with new (Sept 2016) Calorimeter calibration and Spike Killer.
    • L1TSettingsToCaloStage2Params _v3_0_inconsistent ## uses LUTS for new L1T Calibrations and new temporary JEC. Default in tags l1t-integration-v76.0 to v79.2
    • L1TSettingsToCaloStage2Params _v2_2 ## uses Tau iso option-21 LUTs and eta compress LUT for JEC. Default in tags 1t-integration-v61.0 to v75.0 and again in tags l1t-integration-v80.0 to v85.1 (l1t-tsg-v9).
    • L1TSettingsToCaloStage2Params _v2_1 ## uses Tau iso option-5 LUTs. Default in tags 1t-integration-v37.4 and l1t-tsg-v5.1. Intended for 2016 MC generation.)
    • L1TSettingsToCaloStage2Params _v2_0 ## uses Tau iso option-21 LUTs. Default in tag l1t-integration-v37.3. Intended for start-up data taking.)

Making L1Ntuple

The official L1 Ntuple production code is located in the L1Trigger/L1TNtuples package. For official L1 Ntuples, look in /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/L1Menu*, for example:

Available L1Ntuples produced with emulator tag l1t-tsg-v3
  • Location: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/L1Menu2016/Stage2/l1-tsg-v3
  • L1Ntuples contain both L1 and RECO trees
  • Only runs and lumi sections listed in the golden JSON file are included
    • ZeroBias: runs 258440, 258448 (PU 12-16)
    • ZeroBiasX (X=1-4): run 259626 (PU 17-18)
    • ZeroBiasX (X=1-4): run 259721 (PU 21-24)
    • DoubleEG_ZEle skim: all 2015
    • SingleMuon_ZMu skim: all 2015
    • SingleMuon_ZTau skim: all 2015
    • SingleNeutrino MC =20, 30

Available L1Ntuples produced with emulator tag l1t-tsg-v2
  • Location: /eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/L1Menu2016/Stage2/l1-tsg-v2
  • L1Ntuples contain both L1 and RECO trees
  • Only runs and lumi sections listed in the golden JSON file are included
    • ZeroBias: runs 258440, 258448 (PU 12-16)
    • ZeroBiasX (X=1-4): run 259721 (PU 21-24)
    • DoubleEG_ZEle skim: all 2015
    • SingleMuon_ZMu skim: all 2015
    • SingleMuon_ZTau skim: all 2015

With cmsDriver.py customisations one can run the L1T emulation and L1TNtuple producer in a single job. Some example customisation options are:

* L1Ntuple with emulated L1T quantities, useful for rate calculations (input RAW):

--customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleEMU

* L1TNtuples with RAW L1T quantities (input RAW)

--customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleRAW

* L1TNtuples with RAW L1T and RECO quantities, useful for efficiency calculations (input RAW-RECO)

--customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODRAW 

For the list of all the L1Ntuple customization options see in L1Trigger/L1TNtuples/python/customiseL1Ntuple.py. Currentavailable options that can bee used as --customise=L1Trigger/L1TNtuples/customiseL1Ntuple. are:

 L1NtupleAOD
 L1NtupleAOD_MC
 L1NtupleRAW
 L1NtupleEMU
 L1NtupleGEN
 L1NtupleRAWEMU
 L1NtupleAODRAW
 L1NtupleAODRAWEMU
 L1NtupleAODEMU
 L1NtupleAODEMU_MC
 L1NtupleRAWEMUGEN_MC
 L1NtupleAODEMUGEN_MC

2016 examples to run the emulator and produce L1Ntuples. cmsDriver.py commands below use GlobalTag --conditions=auto:run2_data or --conditions=auto:run2_mc. Make sure you use correct GlobalTag (from the Frontier Conditions twiki) when you run.

  • Basic Stage2 L1Ntuple with EMUlated L1T content, running on 2016 data, useful for rate calculations:
cmsDriver.py l1Ntuple -s RAW2DIGI --era=Run2_2016  --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleEMU --customise=L1Trigger/Configuration/customiseUtils.L1TTurnOffUnpackStage2GtGmtAndCalo --conditions=auto:run2_data -n 100 --data --no_exec --no_output --filein=root://eoscms//eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/rekovic/unit-test/input//store/data/Run2016A/ZeroBias1/RAW/v1/000/271/336/00000/00963A5A-BF0A-E611-A657-02163E0141FB.root
cmsRun l1Ntuple_RAW2DIGI.py

  • Stage2 L1Ntuple with RECO and EMUlated L1T content:
cmsDriver.py l1NtupleRECO -s RAW2DIGI --era=Run2_2016  --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODEMU --customise=L1Trigger/Configuration/customiseUtils.L1TTurnOffUnpackStage2GtGmtAndCalo --conditions=auto:run2_data -n 200 --data --no_exec --no_output --filein=root://eoscms//eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/rekovic/unit-test/input//store/data/Run2016A/ZeroBias1/RAW/v1/000/271/336/00000/00963A5A-BF0A-E611-A657-02163E0141FB.root
cmsRun l1NtupleRECO_RAW2DIGI.py

  • Stage1 L1Ntuple with RECO conten and RAW Stage1 (Legacy) L1T content, No L1T emulation used:
cmsDriver.py l1NtupleRECO_Stg1 -s RAW2DIGI --era=Run2_25ns --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODRAW --conditions=auto:run2_data -n -100 --data --no_exec --no_output --filein=root://eoscms//eos/cms/store/group/dpg_trigger/comm_trigger/L1Trigger/rekovic/unit-test/input//store/data/Run2016A/ZeroBias1/RAW/v1/000/271/336/00000/00963A5A-BF0A-E611-A657-02163E0141FB.root

  • Stage2 L1Ntuple with EMU L1T content, with L1T emulation ran on MC GEN-SIM-RAW:
cmsDriver.py l1NtupleMC -s RAW2DIGI --era=Run2_2016 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleEMU --customise=L1Trigger/Configuration/customiseUtils.L1TTurnOffUnpackStage2GtGmtAndCalo --conditions=80X_mcRun2_asymptotic_v6 -n 1000 --mc --no_exec --no_output --filein=/store/mc/RunIIFall15DR76/SingleNeutrino/GEN-SIM-RAW/25nsPUfixed30NzshcalRaw_76X_mcRun2_asymptotic_v12-v1/70000/FA15FAAB-F0C1-E511-9C41-C45444922D6C.root 

  • Basic Stage2 L1Ntuple with EMUlated L1T content, running on 2015 data, useful for rate calculations (should also work with GT 80X_dataRun2_v18):
cmsDriver.py l1Ntuple -s RAW2DIGI --era=Run2_2016  --customise=L1Trigger/Configuration/customiseReEmul.L1TEventSetupForHF1x1TPs --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleEMU --customise=L1Trigger/Configuration/customiseUtils.L1TTurnOffUnpackStage2GtGmtAndCalo --conditions=auto:run1_data -n 100 --data --no_exec --no_output --filein=/store/data/Run2015D/ZeroBias1/RAW/v1/000/256/843/00000/FE8AD1BB-D05E-E511-B3A7-02163E01276B.root

  • In case of pA (HeavyIons), era should be set as --era=Run2_2016_pA. This sets the proper configuration of calorimeter emulator specific to HI run.

More details on producing L1TNtuples can be found on the SWGuideL1TNtuples twiki page.

L1 Trigger Global Tags in the CondDB

BE CAREFUL Aside the Run3 details, this section is deprecated (Run2 MC Tags update will come soon)
L1 uses and supports CondDB Tags to be used for datataking and MC productions. The following lists include the latest greatest Tags that are used by the recent Global Tags (GTs) for Run3

Data Run3

L1TCaloParamsO2ORcd L1TCaloParams_static_CMSSW_9_2_10_2017_v1_8_2_updateHFSF_v6MET
L1TCaloParamsRcd L1TCaloParams_Stage2v3_hlt
L1TGlobalPrescalesVetosFractRcd L1TGlobalPrescalesVetosFract_Stage2v1_hlt
L1TGlobalPrescalesVetosRcd L1TGlobalPrescalesVetos_Stage2v0_hlt
L1TMuonBarrelParamsRcd L1TMuonBarrelParams_Stage2v1_hlt
L1TMuonEndCapForestRcd L1TMuonEndCapForest_Stage2v1_hlt
L1TMuonEndCapParamsRcd L1TMuonEndCapParams_Stage2v3_hlt
L1TMuonGlobalParamsRcd L1TMuonGlobalParams_Stage2v0_hlt
L1TMuonOverlapParamsRcd L1TMuonOverlapParams_Stage2v0_hlt
L1TUtmTriggerMenuRcd L1TUtmTriggerMenu_Stage2v0_hlt
L1TriggerKeyListRcd L1TriggerKeyList_CRAFT09_hlt
L1TriggerKeyRcd L1TriggerKey_CRAFT09v3_hlt
These Tags are updated automatically by the O2O scripts ( gitlab link) to mirror the Runs taken at P5. There are 3 flavors of GTs used online and all three of them are using the tags above.
  • Prompt: for "prompt" Reconstruction
  • HLT: for HLT online triggering
  • Express: for DQM

MC Productions Run3

L1TCaloParamsO2ORcd L1TCaloParams_static_CMSSW_9_2_10_2017_v1_8_2_updateHFSF_v6MET
L1TCaloParamsRcd L1TCaloParams_static_2022_v0_2_mc
L1TGlobalPrescalesVetosFractRcd L1TGlobalPrescalesVetosFract_passThrough_mc
L1TGlobalPrescalesVetosRcd L1TGlobalPrescalesVetos_passThrough_mc
L1TMuonBarrelParamsRcd L1TMuonBarrelParams_Stage2v1_2018_mc
L1TMuonEndCapForestRcd L1TMuonEndCapForest_v8_Run3_2022_mc
L1TMuonEndCapParamsRcd L1TMuonEndCapParams_Run3_2022_mc
L1TMuonGlobalParamsRcd L1TMuonGlobalParams_Stage2v0_2021_mc
L1TMuonOverlapParamsRcd L1TMuonOverlapParams_static_2016_mc
L1TUtmTriggerMenuRcd L1Menu_Collisions2022_v1_2_0_xml
L1TriggerKeyListRcd L1TriggerKeyList_STARTUP_v3
L1TriggerKeyRcd L1TriggerKey_STARTUP_v3
These Tags above are used for MC Productions and their update is required occasionaly.
Before production deadlines, the AlCa group should be reached to communicate possible modifications needed for the upcoming MC Production and target GTs.

Run2 information

In order to run on 2017 data make sure you are using the correct GlobalTag from the " Frontier Conditions twiki" with cmsDriver command option --conditions=theGlobalTag. Check the twiki page at SWGuideFrontierConditions and pick the latest Prompt reconstruction global tag.

For example:

--conditions=92X_dataRun2_Prompt_v4

In order to run on 2015 data make sure you add to the examples below the customisations which configures the EventSetup for LUTs of HF TPs, which should ONLY be used in case of 2015 and earlier RAW data.

--customise=L1Trigger/Configuration/customiseReEmul.L1TEventSetupForHF1x1TPs

in order to run on MC you have to change the GlobalTag and --data to --mc flag options in the cmsDriver command:

--conditions=auto:run2_mc
--mc

Custom L1T Menu

Suppose your created your new L1T trigger (instructions here) or test some new already existing menu. You probably want to test its rates of your new trigger and of the new L1T menu which you defined in a file myNewL1TMenu.xml, for example. You can do this using L1TNtuples.. You first need to configure the L1T emulator to use your new menu instead of the CMSSW release default menu:

  • if not done already, checkout the package L1Trigger /L1TCommon: git cms-addpkg L1Trigger /L1TCommon
  • upload the XML file into the directory L1Trigger /L1TGlobal/data/Luminosity/startup/
  • edit the file L1Trigger /Configuration/python/customiseUtils.py by changing the string 'L1Menu_Collisions2016_v2c.xml' --> 'myNewMenu.xml'.
  • use the customisation flag with cmsDriver.py --customise=L1Trigger/Configuration/customiseUtils.L1TGlobalMenuXML

Re-emulate L1T from RAW information

L1REPACK step with cmsDriver command

Aside from cmsDriver.py steps listed in SWGuideCmsDriver, there exists another defined step L1REPACK: available to the cmsDriver.py, whose aim is to re-emulate the L1T. The workflow takes RAW as input, then emulate L1T, all or parts of it, or even emulate TriggerPrimitives (TPs), and finally packs the emulated objects back into RAW data format. This step is usually used for HLT studies and developments that depend on a L1T menu which is not available in the RAW data at hand. The L1REPACK: step is available in various configurations (listed for Stage2 in the following subsection), which all emulate the L1T. The configurations differ in the starting point for L1T emulation chain. Here is an example driver command with L1REPACK: step:

cmsDriver test -s L1REPACK:Full --filein myRAWFile.root ...

L1REPACK: step can be combined with other steps in a usual way:

cmsDriver test -s DIGI:pdigi,DIGI2RAW,L1REPACK:Full,HLT --filein myGEN-SIMFile.root ...

Configurations for emulation of L1T with L1REPACK

Here are the configurations that are currently available to the user for re-emulation of Stage2 L1T with L1REPACK: step:

(Note: With CMSSW_8_0_24 please use the PR #16796.)

L1REPACK:uGT 

  • Only uGT emulation, starting with unpacked inputs to uGT, which are CaloLayer2 and uGmt. INPUT = Stage2 real data or MC. (useful if only want to re-run the L1TMenu or prescales)
L1REPACK:Full  
  • Full emulation of L1T starting with unpacked TPs. INPUT = Stage2 real data (i.e. 2016/2017 data). This option is useful if a new L1T emulation is available (either emulation code or object calibrations for: Muon TrackFinders, CaloLayer1, CaloLayer2, uGMT).
L1REPACK:FullSimTP
  • Full emulation of L1T starting with unpacked DIGIs, first re-simulate TPs and then emulating L1T. Inputs to the L1T emulation are in most cases the re-simulated TPs. Those include simEcalTPs and simHcalTPs used by simCaloLayer1, and simDtTPs used by simTwinMux and simBmtf. The exceptions are the unpacked RpcTPs and CscTPs (fromEMTF) which are used for simOmtf and simEmtf. INPUT = Stage2 real data (eg, 2016 real data). One would use this if new detector calibrations are available, which in turn affect the TPs. In this case TPs need to be simulated from upacked detector DIGIs.
L1REPACK:Full2015Data 
  • Full emulation of L1T starting with unpacked TPs and simulated HCAL TPs. INPUT= Stage1/Legacy real data. Additional info: RAW content of 2015 and 2016 are different (i.e. different TrackFinders which need to be unpacked to access TPs).
L1REPACK:FullMC 
  • Full simulation of TPs (except for ECAL TPs which are taken unpacked as Unsupressed ECAL DIGISs are(were) not available in RAW) and emulation of L1T. INPUT = any MC with RAW.

Recipe to re-emulate L1T from RAW information in MC

Use CMSSW_12_0_2 or later

Used to run the L1 Stage2 Emulator in the HLT.

Use "L1REPACK:FullMC" step to re-emulate L1T in MC from stored RAW information. This step can be used to re-emulate L1T on Run3 MC. For more information about L1REPACK see above.

cmsDriver.py step0 --python_filename L1REPACK_FullMC_on_GEN-SIM-DIGI-RAW.py -s L1REPACK:FullMC,DIGI2RAW --mc -n 10 --conditions auto:run3_mc_GRun --era Run3 --filein /store/relval/CMSSW_12_0_1/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/120X_mcRun3_2021_realistic_v7-v2/10000/b67e121b-b29f-4eb0-8628-b3aa1cb76720.root --no_output --no_exec

To also fill the repacked RAW information in the L1TNtuples , add the customisation to

--customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleRAW

Use CMSSW_8_0_9 or later.

"L1REPACK:FullMC" is new step to re-emulate L1T in MC from stored RAW information. This step is intended for use in the 2016 MC production. Below is the example command that runs steps L1REPACK and RAW2DIGI, and uses customisation to fill the L1TNtuples. The global tag (80X_mcRun2_asymptotic_v14) used is the one used by the RelVal and is intended to be used for MC production.

cmsDriver.py  --conditions 80X_mcRun2_asymptotic_v14  -s L1REPACK:FullMC,RAW2DIGI --no_output -n 10 --era=Run2_2016 --filein root://eoscms.cern.ch//eos/cms/store/mc/RunIISpring16DR80/TTJets_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/RAWAODSIM/PUSpring16RAWAODSIM_80X_mcRun2_asymptotic_2016_v3-v2/30000/040AFBF1-8E0B-E611-9C22-001E67E95A58.root --processName reL1T --python_filename l1t_test.py --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleRAW

To also fill the RECO information in the L1TNtuples , change the customisation to

--customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODRAW

Works under CMSSW_9_2_0 and l1t-integration-v95.0
In L1TSettingsToCaloStage2Params _2017_vX_X, replace X_X by the version of caloParams you'd like to run.

cmsDriver.py -s RAW2DIGI --python_filename=l1NtupleMcMaker2017_RAW2DIGI.py -n 10 --no_output --no_exec --era=Run2_2017 --mc --conditions=92X_upgrade2017_TSG_For90XSamples_V1 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleRAWEMU --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_2017_vX_X --filein=/store/mc/PhaseISpring17DR/VBFHToTauTau_M125_13TeV_powheg_pythia8/GEN-SIM-RAW/FlatPU28to62HcalNZSRAW_HIG07_90X_upgrade2017_realistic_v20-v1/100000/004D4A52-A62C-E711-B518-848F69FD2853.root
cmsRun l1NtupleMcMaker2017_RAW2DIGI.py

Tunable Parameters

Tunable parameters are configured in the file L1Trigger/L1TCalorimeter/python/caloStage2Params_cfi.py. Below is a table describing the physical meanings behind some of the more important parameters.

Configurable parameters for jets:

jetLsb This is the LSB for Jet candidates. Do not change this unless you change the calibrations to match.
jetSeedThreshold This value is the amount (in GeV) which the central region must have to be considered a jet seed.
Configurable parameters for energy sums:

etSumLsb This is the LSB for EtSum candidates. Do not change this unless you change the calibrations to match.
etSumEtaMin Minimum tower/jet ieta. Vector of 4 values expected, in order : ETT, HTT, ETM, HTM
etSumEtaMax Maximum tower/jet ieta. Vector as for etSumMin
etSumEtThreshold Minimum tower/jet Et. Vector as for etSumMin
Configurable parameters for egamma:

egLsb This is the LSB for EGamma candidates. Do not change this unless you change the calibrations to match.
egSeedThreshold minimum ET of the seed trigger tower in the clustering
egNeighbourThreshold minimum ET of the clustered trigger towers
egCompressShapesLUTFile LUT used for input compression of other LUTs
egTrimmingLUTFile LUT used for the trimming of EGamma candidates
egShapeIdLUTFile LUT used for the shape identification of EGamma candidates
egIsoLUTFile LUT used for the isolation of EGamma candidates
egIsoAreaNrTowersEta parameter used to define the size of the isolation region in eta (see code for details)
egIsoAreaNrTowersPhi parameter used to define the size of the isolation region in phi (see code for details)
egIsoVetoNrTowersPhi parameter used to define the size of the EGamma footprint for isolation (see code for details)
egPUSParams parameter used to define PU estimator and isolation variables: #0 not used, #1 size in eta of the central region of the detector used to compute the PU estimator, #2 maximal extension in eta of the isolation region (see code for details)
Configurable parameters for taus:

tauSeedThreshold minimum ET of Tau candidates
Edit | Attach | Watch | Print version | History: r240 < r239 < r238 < r237 < r236 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r240 - 2023-05-24 - ElisaFontanesi
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback