cms-l1t-offline / cmssw

CMS Offline Software
cms-sw.github.io/cmssw
Apache License 2.0
17 stars 26 forks source link

Backward-incompatibility of GEM unpacker in 11_2 running on 11_0_X MC (problem for L1T re-emulation on Run3 MC) #871

Open rekovic opened 3 years ago

rekovic commented 3 years ago

There is a backwards incompatibility of GEM unpacker in CMSSW_11_2_0 when running on 11_0_X Run3 MC discovered. This is a road-block when re-emulating the L1T on MC, which is done by a sequence starting from unpacked detector digis.

The gem unpacker reports an error (and judging from the code it skips the event).

...
Begin processing the 1st record. Run 1, Event 216003, LumiSection 217 on stream 0 at 15-Jan-2021 13:04:53.270 CET
%MSG-w GEMRawToDigiModule:  GEMRawToDigiModule:muonGEMDigis  15-Jan-2021 13:04:58 CET Run: 1 Event: 216003
FED trailer: fail check? 1 fail match? 0
%MSG
Begin processing the 2nd record. Run 1, Event 216001, LumiSection 217 on stream 0 at 15-Jan-2021 13:05:11.413 CET
%MSG-w GEMRawToDigiModule:  GEMRawToDigiModule:muonGEMDigis  15-Jan-2021 13:05:11 CET Run: 1 Event: 216001
FED trailer: fail check? 1 fail match? 0
%MSG

The recipe to reproduce the problem is as follows

  1. setup the local release and merge the latest L1T software:
    
    cmsrel CMSSW_11_2_0
    cd CMSSW_11_2_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_11_2_0
    git cms-merge-topic -u cms-l1t-offline:l1t-integration-v105.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

git cms-checkdeps -A -a

scram b -j 8


2. Run the unpackers, L1T emulation from RAW designed for MC, and try the fill the L1T Ntuples:

cmsDriver.py l1Ntuple -s RAW2DIGI --python_filename=mc_L1TReEmulMCFromRAW_L1NtupleEMU.py -n 2 --no_output --era=Run3 --mc --conditions=112X_mcRun3_2021_realistic_v13 --customise=L1Trigger/Configuration/customiseReEmul.L1TReEmulMCFromRAW --customise=L1Trigger/L1TNtuples/customiseL1Ntuple.L1NtupleEMU --customise=L1Trigger/Configuration/customiseSettings.L1TSettingsToCaloParams_2018_v1_4 --filein=/store/mc/Run3Winter20DRPremixMiniAOD/TT_TuneCP5_14TeV-powheg-pythia8/GEN-SIM-RAW/110X_mcRun3_2021_realistic_v6-v2/20000/CFCAE998-5A17-FB48-A36F-A31EA28D2A72.root



The bottom line is, we need the fix for GEM unpacker in 11_2_X. 
rekovic commented 3 years ago

Hn https://hypernews.cern.ch/HyperNews/CMS/get/gems/3933.html

rekovic commented 3 years ago

Temporary hack provided in cms-l1t-offline:l1t-integration-CMSSW_11_2_0 branch and the tag l1t-integration-v105.1

https://github.com/cms-l1t-offline/cmssw/commit/47b5836bd4072102e811cc6843dc96b0cd458a17

Instructions are updated on the Twiki and the primer example Re-emulating Run-3 (MC) with Run3 era is provided: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideL1TStage2Instructions#L1T_Cookbook_current_recipes