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.

Environment Setup with Integration Tags

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

cmsrel CMSSW_10_6_0
cd CMSSW_10_6_0/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_10_6_0
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v102.3
git cms-addpkg L1Trigger/L1TCommon
git cms-addpkg L1Trigger/L1TMuon
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data
git cms-addpkg L1Trigger/L1TCalorimeter
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TCalorimeter.git L1Trigger/L1TCalorimeter/data

scram b -j 8

L1T emulation relevant GlobalTags in CMSSW_10_6 are:

  • for data reprocessing '106X_dataRun2_v10'
  • for run2 mc '106X_mcRun2_asymptotic_v3'

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

cmsrel CMSSW_10_3_1
cd CMSSW_10_3_1/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_10_3_1
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v102.2
git cms-addpkg L1Trigger/L1TCommon
git cms-addpkg L1Trigger/L1TMuon
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data
git cms-addpkg L1Trigger/L1TCalorimeter
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TCalorimeter.git L1Trigger/L1TCalorimeter/data

scram b -j 8

L1T emulation relevant GlobalTags in CMSSW_10_3 are:

  • for data reprocessing '103X_dataRun2_Prompt_v3'
  • for run2 mc '102X_upgrade2018_realistic_v15'

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

cmsrel CMSSW_10_2_1
cd CMSSW_10_2_1/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_10_2_1
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v101.0
git cms-addpkg L1Trigger/L1TCommon
git cms-addpkg L1Trigger/L1TMuon
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data
git cms-addpkg L1Trigger/L1TCalorimeter
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TCalorimeter.git L1Trigger/L1TCalorimeter/data

scram b -j 8

L1T emulation relevant GlobalTags in CMSSW_10_2 are:

  • for data reprocessing '102X_dataRun2_Prompt_v4'
  • for run2 mc '102X_mcRun2_asymptotic_v3'

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

cmsrel CMSSW_10_1_5
cd CMSSW_10_1_5/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_10_1_5
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v98.10
git cms-addpkg L1Trigger/L1TCommon
git cms-addpkg L1Trigger/L1TMuon
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data
git cms-addpkg L1Trigger/L1TCalorimeter
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TCalorimeter.git L1Trigger/L1TCalorimeter/data

scram b -j 8

L1T emulation relevant GlobalTags in CMSSW_10_1_5 are:

  • for data '101X_dataRun2_Prompt_v9'
  • for run2 mc '101X_mcRun2_asymptotic_v5'

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

cmsrel CMSSW_10_1_2
cd CMSSW_10_1_2/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_10_1_2
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v98.1
git cms-addpkg L1Trigger/L1TCommon
git cms-addpkg L1Trigger/L1TMuon
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data
git cms-addpkg L1Trigger/L1TCalorimeter
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TCalorimeter.git L1Trigger/L1TCalorimeter/data

scram b -j 8

L1T emulation relevant GlobalTags in CMSSW_10_1_2 are:

  • for data '101X_dataRun2_Prompt_v9'
  • for run2 mc '101X_mcRun2_asymptotic_v5'

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

cmsrel CMSSW_10_0_0
cd CMSSW_10_0_0/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_10_0_0
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v97.27
git cms-addpkg L1Trigger/L1TCommon
# ###################################
# in case you need externals for development
# ###################################
# git cms-addpkg L1Trigger/L1TMuon
# git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data
# git cms-addpkg L1Trigger/L1TCalorimeter
# git clone https://github.com/cms-l1t-offline/L1Trigger-L1TCalorimeter.git L1Trigger/L1TCalorimeter/data

scram b -j 8

L1T emulation relevant GlobalTags in CMSSW_10_0_0 are:

  • for data '100X_dataRun2_v1'
  • for run2 mc '100X_mcRun2_asymptotic_v2'

Listed below are instructions for preparing a project area to run in CMSSW_10_0_3 and tag l1t-integration-v97.22. For the list of sequential features and fixes included up to this tag and later see the table here.

This setup should be used with 100X MC, as the 100X MC was made with CMSSW_10_0_3, and re-emulates with the 100X L1 calibrations so that all calo trigger objects are consistent with the trigger primitives with 2018 conditions

cmsrel CMSSW_10_0_3
cd CMSSW_10_0_3/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_10_0_0 l1t-integration-v97.22
git cms-merge-topic cms-l1t-offline:l1t-integration-v97.22
git cms-checkdeps -a
git remote add bundocka git@github.com:bundocka/cmssw.git
git pull bundocka 100XCalibs
rm -rf L1Trigger/L1TCalorimeter/data/
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TCalorimeter.git L1Trigger/L1TCalorimeter/data


scramv1 b -j 8

L1T emulation relevant GlobalTags in CMSSW_10_0_0 are:

  • for data '100X_dataRun2_v4'
  • for run2 mc '100X_upgrade2018_realistic_v11'

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

cmsrel CMSSW_10_0_0
cd CMSSW_10_0_0/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_10_0_0
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v97.27
git cms-addpkg L1Trigger/L1TCommon
# ###################################
# in case you need externals for development
# ###################################
# git cms-addpkg L1Trigger/L1TMuon
# git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data
# git cms-addpkg L1Trigger/L1TCalorimeter
# git clone https://github.com/cms-l1t-offline/L1Trigger-L1TCalorimeter.git L1Trigger/L1TCalorimeter/data

scram b -j 8

L1T emulation relevant GlobalTags in CMSSW_10_0_0 are:

  • for data '100X_dataRun2_v1'
  • for run2 mc '100X_mcRun2_asymptotic_v2'

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

cmsrel CMSSW_9_4_0_pre3
cd CMSSW_9_4_0_pre3/src
cmsenv
git cms-init
git remote add cms-l1t-offline git@github.com:cms-l1t-offline/cmssw.git
git fetch cms-l1t-offline
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v97.1
git cms-addpkg L1Trigger/L1TCommon
git cms-addpkg L1Trigger/L1TMuon
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data

scram b -j 8

L1T emulation relevant GlobalTags in CMSSW_9_4_0_pre3 are:

  • for data '94X_dataRun2_v2'
  • for mc '94X_mcRun2_asymptotic_v0'.

The L1T integration branch has been rebased to CMSSW_9_2_8.

Listed below are instructions for preparing a project area to run in CMSSW_9_2_8 and tag l1t-integration-v96.47. For the list of sequential features and fixes included up to this tag and later see the table here.

cmsrel CMSSW_9_2_8
cd CMSSW_9_2_8/src
cmsenv
git cms-init
git remote add cms-l1t-offline git@github.com:cms-l1t-offline/cmssw.git
git fetch cms-l1t-offline
git cms-merge-topic -u cms-l1t-offline:l1t-integration-v96.47
git cms-addpkg L1Trigger/L1TCommon
git cms-addpkg L1Trigger/L1TMuon
git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data

scram b -j 8

L1T Cookbook: current recipes

Workflows

  • 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 240 --no_output --era=Run2_2018 --data --conditions=103X_dataRun2_Prompt_v3 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleAODRAWEMU --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloParams_2018_v1_4 --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.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.

, or

 --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_2017_v1_1   ##  New 2017 calorimeter calibrations for both Laye1 and Layer2  . Available from !CMSSW_9_0_0_pre2 (l1t-integration-v91.15).

, or

 --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_v3_3   ## same as v3_2 plus parameters introduced for HI run emulation in CaloLayer2 and uGT. Available from !CMSSW_8_0_22.

, or

 --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_v3_3_HI   ## same as v3_3 but HI parameters set for HI run emulation in CaloLayer2 and uGT. 

, or

 --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_v3_2   ## same as v3_1 but with TauIso working point 22.  Intended for 2016 Sept MC generation.

, or

 --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_v3_1   ## uses LUTS with new (Sept 2016) Calorimeter calibration and Spike Killer.

, or

 --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_v3_0_inconsistent   ## uses LUTS for new L1T Calibrations and new temporary JEC. Default in tags l1t-integration-v76.0 to v79.2  

, or

 --customise=L1Trigger/Configuration/customiseSettings.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). 

, or

 --customise=L1Trigger/Configuration/customiseSettings.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.)

, or

 --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_v2_0   ## uses Tau iso option-21 LUTs.  Default in tag l1t-integration-v37.3. Intended for start-up data taking.)

, or

 --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloStage2Params_UserDefine   ## uses ./caloStage2Params_UserDefine_cfi.py
which picks up a user-defined cfi file.

Making L1Ntuple

The official L1 Ntuple production code is located in the L1Trigger/L1TNtuples package. 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

Global Tags (Data, MC)

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 monte carlo 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

Running the Emulator and Producing L1 Ntuples (examples with 2016 data)

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.

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 ...

Emulation of Stage2 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.

Running the Emulator in MC Production 2016

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

Running the Emulator in MC 90X

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

Official L1Ntuple samples

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

Recipe for Running the L1 Stage2 Emulator in the HLT

Under development

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 muons:
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

Environment Setup with TSG tags (OLD)

Listed below are instructions for preparing a project area to run l1t-tsg-v5.1. Compared to l1t-tsg-v4, this tag contains: 1) emulation of calo Layer1 (still incorrect calibration for high eta) turned ON, 2) Layer2 calibrations on top of Layer1 for Tau, EG, Sums. 3) fix for bug in Layer2 packer affecting EG and Sums, 4) Muon EMTF charge assignment. Still pending is a fix for observed problem in emulator EMTF muon rate, lower than observed. Default setup of calo parameters uses Tau isolation option-5 LUTs, however there is a customisation option to chose a different setup, with examples shown here.
cmsrel CMSSW_8_0_2
cd CMSSW_8_0_2/src
cmsenv
git cms-init
git remote add cms-l1t-offline git@github.com:cms-l1t-offline/cmssw.git
git fetch cms-l1t-offline
git cms-merge-topic cms-l1t-offline:l1t-tsg-v5.1
git cms-addpkg L1Trigger/L1TCommon
scram b -j 8

Listed below are instructions for preparing a project area to run l1t-tsg-v4. Compared to l1t-tsg-v3, this tag contains a bug fix in the EMTF emulator which significantly reduces the rate in the muon endcaps and contains updated muon quality assignment codes. The calo trigger emulation remains the same as in l1t-tsg-v3.
cmsrel CMSSW_8_0_2
cd CMSSW_8_0_2/src
cmsenv
git cms-init
git remote add cms-l1t-offline git@github.com:cms-l1t-offline/cmssw.git
git fetch cms-l1t-offline
git cms-merge-topic cms-l1t-offline:l1t-tsg-v4
git cms-addpkg L1Trigger/L1TCommon
scram b -j 8

Listed below are instructions for preparing a project area to run l1t-tsg-v3:
cmsrel CMSSW_8_0_0_pre6
cd CMSSW_8_0_0_pre6/src
cmsenv
git cms-init
git remote add cms-l1t-offline git@github.com:cms-l1t-offline/cmssw.git
git fetch cms-l1t-offline
git cms-merge-topic cms-l1t-offline:l1t-tsg-v3
git cms-addpkg L1Trigger/L1TCommon
scram b -j 8

Listed below are instructions for preparing a project area in CMSSW_8_0_0_pre6 using l1t-tsg-v2-patch1 tag:
cmsrel CMSSW_8_0_0_pre6
cd CMSSW_8_0_0_pre6/src
cmsenv
git cms-init
git remote add cms-l1t-offline git@github.com:cms-l1t-offline/cmssw.git
git fetch cms-l1t-offline
git cms-merge-topic cms-l1t-offline:l1t-tsg-v2-patch1
git cms-addpkg L1Trigger/L1TCommon
scram b -j 8

Listed below are instructions for preparing a project area in CMSSW_8_0_0_pre5:
cmsrel CMSSW_8_0_0_pre5
cd CMSSW_8_0_0_pre5/src
cmsenv
git cms-merge-topic cms-l1t-offline:l1t-dev-recipe-CMSSW_8_0_0_pre5
scram b -j 8

Listed below are instructions for preparing a project area in CMSSW_7_6_0:
cmsrel CMSSW_7_6_0
cd CMSSW_7_6_0/src
cmsenv
git cms-merge-topic cms-l1t-offline:l1t-dev-recipe-CMSSW_7_6_0
scram b -j 8


-- LeonardApanasevich - 28 Jan 2016

Edit | Attach | Watch | Print version | History: r150 < r149 < r148 < r147 < r146 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r150 - 2019-06-06 - VladimirRekovic
 
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback