cms-l1t-offline / cmssw

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

Phase 2 Correlator Updates from v54 and v55 Introduced Data Format Incompatibility #1076

Closed aloeliger closed 1 year ago

aloeliger commented 1 year ago

What

Data format changes introduced in the correlator update from #1063 have introduced a data format change in 25d3037 that are causing fundamental incompatibilities of phase-2 emulator running with files without the data format change.

It seems that PFJet had a change of it's member consituents_ from std::vector<edm::Ptr<l1t::L1Candidate>> to std::vector<edm::Ptr<l1t::PFCandidate>> here:

https://github.com/cms-l1t-offline/cmssw/commit/25d3037e25a9177615044e783b4bd82454aef378#diff-b728d605f568ab3466237040728947ab6e564a9e94d237d40803fc1cd8fe411dR14

With corresponding class update here:

https://github.com/cms-l1t-offline/cmssw/commit/25d3037e25a9177615044e783b4bd82454aef378#diff-4d4ae6f8b7a6d506e3825ff17c82261dd5782e0aee816dbc2e0ab954914acbe9R36-R37

This has led to issues when trying to run on CMSSW_12_5_2 files:

cmsDriver.py step1 --conditions 125X_mcRun4_realistic_v2 -n 2 --era Phase2C17I13M9 --eventcontent FEVTDEBUGHLT -s RAW2DIGI,L1TrackTrigger,L1 --data
tier GEN-SIM-DIGI-RAW-MINIAOD --fileout file:test.root --customise "SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000,Configuration/DataProcessing/Utils.addMon
itoring,L1Trigger/Configuration/customisePhase2.addHcalTriggerPrimitives,L1Trigger/Configuration/customisePhase2FEVTDEBUGHLT.customisePhase2FEVTDEBUGHLT,L1Trigger/Configurat
ion/customisePhase2TTNoMC.customisePhase2TTNoMC" --geometry Extended2026D88 --nThreads 8 --filein "/store/mc/Phase2Fall22DRMiniAOD/TT_TuneCP5_14TeV-powheg-pythia8/GEN-SIM-DI
GI-RAW-MINIAOD/PU200_125X_mcRun4_realistic_v2_ext1-v1/30000/000c5e5f-78f7-44ee-95fe-7b2f2c2e2312.root" --mc

...

----- Begin Fatal Exception 02-Mar-2023 06:31:58 CST-----------------------
An exception of category 'FileReadError' occurred while
   [0] Processing  Event run: 1 lumi: 830 event: 132642 stream: 6
   [1] Running path 'FEVTDEBUGHLToutput_step'
   [2] Prefetching for module PoolOutputModule/'FEVTDEBUGHLToutput'
   [3] While reading from source std::vector<l1t::PFJet> l1tSCPFL1PuppiCorrectedEmulator '' HLT
   [4] Reading branch l1tPFJets_l1tSCPFL1PuppiCorrectedEmulator__HLT.
   Additional Info:
      [a] Fatal Root Error: @SUB=TStreamerInfo::BuildOld
Cannot convert l1t::PFJet::constituents_ from type: vector<edm::Ptr<l1t::L1Candidate> > to type: vector<edm::Ptr<l1t::PFCandidate> >, skip element

@gpetruc you are listed as the person on the commit and the PR, could you please let me know if you encountered this problem? If not, could you let us know how you got around it, and how you tested these changes? If you haven't encountered issues, could you let us know if you can run your changes on 12_5_2 files? Or earlier files?

@mcepeda and @artlbv you asked to be tagged on this.

Recipe to Recreate

cmsrel CMSSW_12_5_2_patch1
cd CMSSW_12_5_2_patch1/src/
cmsenv
git cms-init
git cms-merge-topic -u cms-l1t-offline:l1t-phase2-v55
scram b -j 8

git cms-addpkg L1Trigger/TrackTrigger
git cms-addpkg SimTracker/TrackTriggerAssociation
scram b -j 8

cmsDriver.py step1 --conditions 125X_mcRun4_realistic_v2 -n 2 --era Phase2C17I13M9 --eventcontent FEVTDEBUGHLT -s RAW2DIGI,L1TrackTrigger,L1 --data
tier GEN-SIM-DIGI-RAW-MINIAOD --fileout file:test.root --customise "SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000,Configuration/DataProcessing/Utils.addMon
itoring,L1Trigger/Configuration/customisePhase2.addHcalTriggerPrimitives,L1Trigger/Configuration/customisePhase2FEVTDEBUGHLT.customisePhase2FEVTDEBUGHLT,L1Trigger/Configurat
ion/customisePhase2TTNoMC.customisePhase2TTNoMC" --geometry Extended2026D88 --nThreads 8 --filein "/store/mc/Phase2Fall22DRMiniAOD/TT_TuneCP5_14TeV-powheg-pythia8/GEN-SIM-DI
GI-RAW-MINIAOD/PU200_125X_mcRun4_realistic_v2_ext1-v1/30000/000c5e5f-78f7-44ee-95fe-7b2f2c2e2312.root" --mc
aloeliger commented 1 year ago

@EmyrClement you were also mentioned in the PR and by Maria.

gpetruc commented 1 year ago

Hi,

You should just drop on input the old objects, i.e. process.source.inputCommands = cms.untracked.vstring("keep *", "drop l1tPFJets_*_*_*", ...) (or even "drop l1tPFCandidates_*_*_*"), since in any case you are going to re-reconstruct them with the newer code.

aloeliger commented 1 year ago

Thanks for the quick reply @gpetruc. You're right, I can get this:

cmsDriver.py step1 --conditions 125X_mcRun4_realistic_v2 -n 2 --era Phase2C17I13M9 --eventcontent FEVTDEBUGHLT -s RAW2DIGI,L1TrackTrigger,L1 --datatier GEN-SIM-DIGI-RAW-MINIAOD --fileout file:test.root --customise "SLHCUpgradeSimulations/Configuration/aging.customise_aging_1000,Configuration/DataProcessing/Utils.addMonitoring,L1Trigger/Configuration/customisePhase2.addHcalTriggerPrimitives,L1Trigger/Configuration/customisePhase2FEVTDEBUGHLT.customisePhase2FEVTDEBUGHLT,L1Trigger/Configuration/customisePhase2TTNoMC.customisePhase2TTNoMC" --geometry Extended2026D88 --nThreads 8 --filein "/store/mc/Phase2Fall22DRMiniAOD/TT_TuneCP5_14TeV-powheg-pythia8/GEN-SIM-DIGI-RAW-MINIAOD/PU200_125X_mcRun4_realistic_v2_ext1-v1/30000/000c5e5f-78f7-44ee-95fe-7b2f2c2e2312.root" --mc --customise_commands="process.source.inputCommands = cms.untracked.vstring(\"keep *\", \"drop l1tPFJets_*_*_*\")"

to work:

Begin processing the 1st record. Run 1, Event 132641, LumiSection 830 on str[12/1868]
03-Mar-2023 06:21:07.633 CST
Begin processing the 2nd record. Run 1, Event 132642, LumiSection 830 on stream 2 at 
03-Mar-2023 06:21:07.634 CST
#--------------------------------------------------------------------------
#                         FastJet release 3.4.0
#                 M. Cacciari, G.P. Salam and G. Soyez                  
#     A software package for jet finding and analysis at colliders      
#                           http://fastjet.fr                           
#                                                                             
# Please cite EPJC72(2012)1896 [arXiv:1111.6097] if you use this package
# for scientific work and optionally PLB641(2006)57 [hep-ph/0512210].   
#                                                                       
# FastJet is provided without warranty under the GNU GPL v2 or higher.  
# It uses T. Chan's closest pair algorithm, S. Fortune's Voronoi code
# and 3rd party plugin jet algorithms. See COPYING file for details.
#--------------------------------------------------------------------------
03-Mar-2023 06:21:17 CST  Closed file root://cmsxrootd.fnal.gov//store/mc/Phase2Fall2
2DRMiniAOD/TT_TuneCP5_14TeV-powheg-pythia8/GEN-SIM-DIGI-RAW-MINIAOD/PU200_125X_mcRun4
_realistic_v2_ext1-v1/30000/000c5e5f-78f7-44ee-95fe-7b2f2c2e2312.root?source=glow
TimeReport> Time report complete in 273.353 seconds

@mcepeda I will update the twiki with this cmsDriver command, which should probably be what is necessary to run on 12_5_2 samples

mcepeda commented 1 year ago

Thanks a lot for the prompt action