diff --git a/DataFormats/L1TParticleFlow/interface/gt_datatypes.h b/DataFormats/L1TParticleFlow/interface/gt_datatypes.h index 366532962e25d..5d6ea94fedf14 100644 --- a/DataFormats/L1TParticleFlow/interface/gt_datatypes.h +++ b/DataFormats/L1TParticleFlow/interface/gt_datatypes.h @@ -156,8 +156,8 @@ namespace l1gt { } static const int BITWIDTH = 64; - inline ap_uint pack() const { - ap_uint ret; + inline ap_uint pack_ap() const { + ap_uint ret(0); unsigned int start = 0; pack_into_bits(ret, start, valid); pack_into_bits(ret, start, vector_pt); @@ -166,12 +166,19 @@ namespace l1gt { return ret; } + inline uint64_t pack() const { + ap_uint x = pack_ap(); + return (uint64_t)x; + } + inline static Sum unpack_ap(const ap_uint &src) { Sum ret; ret.initFromBits(src); return ret; } + inline static Sum unpack(const uint64_t &src) { return unpack_ap(src); } + inline void initFromBits(const ap_uint &src) { unsigned int start = 0; unpack_from_bits(src, start, valid); @@ -194,7 +201,7 @@ namespace l1gt { static const int BITWIDTH = 128; inline ap_uint pack_ap() const { - ap_uint ret; + ap_uint ret(0); unsigned int start = 0; pack_into_bits(ret, start, valid); pack_into_bits(ret, start, v3.pack()); @@ -333,7 +340,7 @@ namespace l1gt { } inline static Photon unpack(const std::array &src, int parity) { - ap_uint bits; + ap_uint bits(0); if (parity == 0) { bits(63, 0) = src[0]; bits(95, 64) = src[1]; diff --git a/L1Trigger/Configuration/python/L1Trigger_EventContent_cff.py b/L1Trigger/Configuration/python/L1Trigger_EventContent_cff.py index 6399f341f7984..80ad9390f2292 100644 --- a/L1Trigger/Configuration/python/L1Trigger_EventContent_cff.py +++ b/L1Trigger/Configuration/python/L1Trigger_EventContent_cff.py @@ -197,10 +197,10 @@ def _appendPhase2Digis(obj): 'keep *_l1tPFClustersFromHGC3DClusters_*_*', 'keep *_l1tPFTracksFromL1TracksBarrel_*_*', 'keep *_l1tPFTracksFromL1TracksHGCal_*_*', - 'keep *_l1tSCPFL1PuppiCorrectedEmulator_*_*', - 'keep *_l1tSCPFL1PuppiCorrectedEmulatorMHT_*_*', - 'keep *_l1tSCPFL1PuppiExtendedCorrectedEmulator_*_*', - 'keep *_l1tSCPFL1PuppiExtendedCorrectedEmulatorMHT_*_*', + 'keep *_l1tSC4PFL1PuppiCorrectedEmulator_*_*', + 'keep *_l1tSC4PFL1PuppiCorrectedEmulatorMHT_*_*', + 'keep *_l1tSC4PFL1PuppiExtendedCorrectedEmulator_*_*', + 'keep *_l1tSC4PFL1PuppiExtendedCorrectedEmulatorMHT_*_*', 'keep *_l1tPhase1JetProducer9x9_*_*', 'keep *_l1tPhase1JetCalibrator9x9_*_*', 'keep *_l1tPhase1JetSumsProducer9x9_*_*', diff --git a/L1Trigger/Phase2L1GT/python/l1tGTProducer_cff.py b/L1Trigger/Phase2L1GT/python/l1tGTProducer_cff.py index 141fe62b8f5e5..26242b1495839 100644 --- a/L1Trigger/Phase2L1GT/python/l1tGTProducer_cff.py +++ b/L1Trigger/Phase2L1GT/python/l1tGTProducer_cff.py @@ -10,10 +10,10 @@ GMTSaPromptMuons = cms.InputTag("l1tSAMuonsGmt", "promptSAMuons"), GMTSaDisplacedMuons = cms.InputTag("l1tSAMuonsGmt", "displacedSAMuons"), GMTTkMuons = cms.InputTag("l1tTkMuonsGmtLowPtFix", "l1tTkMuonsGmtLowPtFix"), - CL2Jets = cms.InputTag("l1tSCPFL1PuppiCorrectedEmulator"), + CL2Jets = cms.InputTag("l1tSC4PFL1PuppiCorrectedEmulator"), CL2Electrons = cms.InputTag("l1tLayer2EG", "L1CtTkElectron"), CL2Photons = cms.InputTag("l1tLayer2EG", "L1CtTkEm"), CL2Taus = cms.InputTag("l1tNNTauProducerPuppi", "L1PFTausNN"), CL2EtSum = cms.InputTag("l1tMETPFProducer"), - CL2HtSum = cms.InputTag("l1tSCPFL1PuppiCorrectedEmulatorMHT") + CL2HtSum = cms.InputTag("l1tSC4PFL1PuppiCorrectedEmulatorMHT") ) diff --git a/L1Trigger/Phase2L1ParticleFlow/plugins/L1CTJetFileWriter.cc b/L1Trigger/Phase2L1ParticleFlow/plugins/L1CTJetFileWriter.cc index 82957e57178e1..38e1d75601524 100644 --- a/L1Trigger/Phase2L1ParticleFlow/plugins/L1CTJetFileWriter.cc +++ b/L1Trigger/Phase2L1ParticleFlow/plugins/L1CTJetFileWriter.cc @@ -1,4 +1,5 @@ #include +#include // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" @@ -16,6 +17,7 @@ #include "L1Trigger/DemonstratorTools/interface/utilities.h" #include "DataFormats/L1TParticleFlow/interface/PFJet.h" #include "DataFormats/L1TParticleFlow/interface/gt_datatypes.h" +#include "DataFormats/L1Trigger/interface/EtSum.h" // // class declaration @@ -29,7 +31,8 @@ class L1CTJetFileWriter : public edm::one::EDAnalyzer private: // ----------constants, enums and typedefs --------- - unsigned nJets_; + std::vector collections_; + size_t nFramesPerBX_; size_t ctl2BoardTMUX_; size_t gapLengthOutput_; @@ -39,45 +42,84 @@ class L1CTJetFileWriter : public edm::one::EDAnalyzer // ----------member functions ---------------------- void analyze(const edm::Event&, const edm::EventSetup&) override; void endJob() override; - std::vector> encodeJets(const std::vector jets); + std::vector> encodeJets(const std::vector jets, unsigned nJets); + std::vector> encodeSums(const std::vector sums, unsigned nSums); - edm::EDGetTokenT> jetsToken_; l1t::demo::BoardDataWriter fileWriterOutputToGT_; + std::vector>, edm::EDGetTokenT>>> tokens_; + std::vector> tokensToWrite_; + std::vector nJets_; + std::vector nSums_; }; L1CTJetFileWriter::L1CTJetFileWriter(const edm::ParameterSet& iConfig) - : nJets_(iConfig.getParameter("nJets")), + : collections_(iConfig.getParameter>("collections")), nFramesPerBX_(iConfig.getParameter("nFramesPerBX")), ctl2BoardTMUX_(iConfig.getParameter("TMUX")), - gapLengthOutput_(ctl2BoardTMUX_ * nFramesPerBX_ - 2 * nJets_), + gapLengthOutput_(iConfig.getParameter("gapLengthOutput")), maxLinesPerFile_(iConfig.getParameter("maxLinesPerFile")), channelSpecsOutputToGT_{{{"jets", 0}, {{ctl2BoardTMUX_, gapLengthOutput_}, {0}}}}, - jetsToken_(consumes>(iConfig.getParameter("jets"))), fileWriterOutputToGT_(l1t::demo::parseFileFormat(iConfig.getParameter("format")), iConfig.getParameter("outputFilename"), iConfig.getParameter("outputFileExtension"), nFramesPerBX_, ctl2BoardTMUX_, maxLinesPerFile_, - channelSpecsOutputToGT_) {} + channelSpecsOutputToGT_) { + for (const auto& pset : collections_) { + edm::EDGetTokenT> jetToken; + edm::EDGetTokenT> mhtToken; + unsigned nJets = pset.getParameter("nJets"); + unsigned nSums = pset.getParameter("nSums"); + nJets_.push_back(nJets); + nSums_.push_back(nSums); + bool writeJetToken(false), writeMhtToken(false); + if (nJets > 0) { + jetToken = consumes>(pset.getParameter("jets")); + writeJetToken = true; + } + if (nSums > 0) { + mhtToken = consumes>(pset.getParameter("mht")); + writeMhtToken = true; + } + tokens_.emplace_back(jetToken, mhtToken); + tokensToWrite_.emplace_back(writeJetToken, writeMhtToken); + } +} void L1CTJetFileWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { using namespace edm; - // 1) Encode jet information onto vectors containing link data - // TODO remove the sort here and sort the input collection where it's created - const edm::View& jets = iEvent.get(jetsToken_); - std::vector sortedJets; - sortedJets.reserve(jets.size()); - std::copy(jets.begin(), jets.end(), std::back_inserter(sortedJets)); - - std::stable_sort( - sortedJets.begin(), sortedJets.end(), [](l1t::PFJet i, l1t::PFJet j) { return (i.hwPt() > j.hwPt()); }); - const auto outputJets(encodeJets(sortedJets)); + // 1) Pack collections in the order they're specified. jets then sums within collection + std::vector> link_words; + for (unsigned iCollection = 0; iCollection < collections_.size(); iCollection++) { + if (tokensToWrite_.at(iCollection).first) { + const auto& jetToken = tokens_.at(iCollection).first; + // 2) Encode jet information onto vectors containing link data + const edm::View& jets = iEvent.get(jetToken); + std::vector sortedJets; + sortedJets.reserve(jets.size()); + std::copy(jets.begin(), jets.end(), std::back_inserter(sortedJets)); + + std::stable_sort( + sortedJets.begin(), sortedJets.end(), [](l1t::PFJet i, l1t::PFJet j) { return (i.hwPt() > j.hwPt()); }); + const auto outputJets(encodeJets(sortedJets, nJets_.at(iCollection))); + link_words.insert(link_words.end(), outputJets.begin(), outputJets.end()); + } - // 2) Pack jet information into 'event data' object, and pass that to file writer + if (tokensToWrite_.at(iCollection).second) { + // 3) Encode sums onto vectors containing link data + const auto& mhtToken = tokens_.at(iCollection).second; + const edm::View& mht = iEvent.get(mhtToken); + std::vector orderedSums; + std::copy(mht.begin(), mht.end(), std::back_inserter(orderedSums)); + const auto outputSums(encodeSums(orderedSums, nSums_.at(iCollection))); + link_words.insert(link_words.end(), outputSums.begin(), outputSums.end()); + } + } + // 4) Pack jet information into 'event data' object, and pass that to file writer l1t::demo::EventData eventDataJets; - eventDataJets.add({"jets", 0}, outputJets); + eventDataJets.add({"jets", 0}, link_words); fileWriterOutputToGT_.addEvent(eventDataJets); } @@ -87,31 +129,51 @@ void L1CTJetFileWriter::endJob() { fileWriterOutputToGT_.flush(); } -std::vector> L1CTJetFileWriter::encodeJets(const std::vector jets) { - std::vector> jet_words; - for (unsigned i = 0; i < nJets_; i++) { - l1t::PFJet j; - if (i < jets.size()) { - j = jets.at(i); - } else { // pad up to nJets_ with null jets - l1t::PFJet j(0, 0, 0, 0, 0, 0); - } - jet_words.push_back(j.encodedJet()[0]); - jet_words.push_back(j.encodedJet()[1]); +std::vector> L1CTJetFileWriter::encodeJets(const std::vector jets, const unsigned nJets) { + // Encode up to nJets jets, padded with 0s + std::vector> jet_words(2 * nJets, 0); // allocate 2 words per jet + for (unsigned i = 0; i < std::min(nJets, (uint)jets.size()); i++) { + const l1t::PFJet& j = jets.at(i); + jet_words[2 * i] = j.encodedJet()[0]; + jet_words[2 * i + 1] = j.encodedJet()[1]; } return jet_words; } +std::vector> L1CTJetFileWriter::encodeSums(const std::vector sums, unsigned nSums) { + // Need two l1t::EtSum for each GT Sum + std::vector> sum_words; + for (unsigned i = 0; i < nSums; i++) { + if (2 * i < sums.size()) { + l1gt::Sum gtSum; + gtSum.valid = 1; // if the sums are sent at all, they are valid + gtSum.vector_pt.V = sums.at(2 * i + 1).hwPt(); + gtSum.vector_phi.V = sums.at(2 * i + 1).hwPhi(); + gtSum.scalar_pt.V = sums.at(2 * i).hwPt(); + sum_words.push_back(gtSum.pack_ap()); + } else { + sum_words.push_back(0); + } + } + return sum_words; +} + // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ void L1CTJetFileWriter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { - //The following says we do not know what parameters are allowed so do no validation - // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; - desc.add("jets"); + { + edm::ParameterSetDescription vpsd1; + vpsd1.addOptional("jets"); + vpsd1.addOptional("mht"); + vpsd1.add("nJets", 0); + vpsd1.add("nSums", 0); + desc.addVPSet("collections", vpsd1); + } desc.add("outputFilename"); desc.add("outputFileExtension", "txt"); desc.add("nJets", 12); desc.add("nFramesPerBX", 9); + desc.add("gapLengthOutput", 4); desc.add("TMUX", 6); desc.add("maxLinesPerFile", 1024); desc.add("format", "EMPv2"); diff --git a/L1Trigger/Phase2L1ParticleFlow/plugins/L1MHtPFProducer.cc b/L1Trigger/Phase2L1ParticleFlow/plugins/L1MHtPFProducer.cc index c788261e396a7..fbcc76db7dabf 100644 --- a/L1Trigger/Phase2L1ParticleFlow/plugins/L1MHtPFProducer.cc +++ b/L1Trigger/Phase2L1ParticleFlow/plugins/L1MHtPFProducer.cc @@ -43,16 +43,16 @@ void L1MhtPfProducer::produce(edm::StreamID, edm::Event& iEvent, const edm::Even // Get the jets from the event l1t::PFJetCollection edmJets = iEvent.get(jetsToken); + std::vector hwJets = convertEDMToHW(edmJets); // convert to the emulator format // Apply pT and eta selections - l1t::PFJetCollection edmJetsFiltered; - std::copy_if(edmJets.begin(), edmJets.end(), std::back_inserter(edmJetsFiltered), [&](auto jet) { - return jet.pt() > minJetPt && std::abs(jet.eta()) < maxJetEta; + std::vector hwJetsFiltered; + std::copy_if(hwJets.begin(), hwJets.end(), std::back_inserter(hwJetsFiltered), [&](auto jet) { + return jet.hwPt > l1ct::Scales::makePtFromFloat(minJetPt) && + std::abs(jet.hwEta) < l1ct::Scales::makeGlbEta(maxJetEta); }); - // Run the emulation - std::vector hwJets = convertEDMToHW(edmJetsFiltered); // convert to the emulator format - l1ct::Sum hwSums = htmht(hwJets); // call the emulator - std::vector edmSums = convertHWToEDM(hwSums); // convert back to edm format + l1ct::Sum hwSums = htmht(hwJetsFiltered); // call the emulator + std::vector edmSums = convertHWToEDM(hwSums); // convert back to edm format // Put the sums in the event std::unique_ptr> mhtCollection(new std::vector(0)); diff --git a/L1Trigger/Phase2L1ParticleFlow/python/L1BJetProducer_cff.py b/L1Trigger/Phase2L1ParticleFlow/python/L1BJetProducer_cff.py index 731d661cfd6c1..75904f145c4c2 100644 --- a/L1Trigger/Phase2L1ParticleFlow/python/L1BJetProducer_cff.py +++ b/L1Trigger/Phase2L1ParticleFlow/python/L1BJetProducer_cff.py @@ -4,7 +4,7 @@ from L1Trigger.Phase2L1ParticleFlow.L1BJetProducer_cfi import L1BJetProducer l1tBJetProducerPuppi = L1BJetProducer.clone( - jets = ("l1tSCPFL1PuppiExtended", ""), + jets = ("l1tSC4PFL1PuppiExtended", ""), maxJets = 6, minPt = 10, vtx = ("l1tVertexFinderEmulator","L1VerticesEmulation") @@ -12,7 +12,7 @@ l1tBJetProducerPuppiCorrectedEmulator = l1tBJetProducerPuppi.clone( - jets = ("l1tSCPFL1PuppiExtendedCorrectedEmulator", "") + jets = ("l1tSC4PFL1PuppiExtendedCorrectedEmulator", "") ) L1TBJetsTask = cms.Task( diff --git a/L1Trigger/Phase2L1ParticleFlow/python/l1pfJetMet_cff.py b/L1Trigger/Phase2L1ParticleFlow/python/l1pfJetMet_cff.py index 1ca27e1cf018f..423941d5bb4ae 100644 --- a/L1Trigger/Phase2L1ParticleFlow/python/l1pfJetMet_cff.py +++ b/L1Trigger/Phase2L1ParticleFlow/python/l1pfJetMet_cff.py @@ -3,13 +3,20 @@ from L1Trigger.Phase2L1ParticleFlow.l1SeedConePFJetProducer_cfi import l1SeedConePFJetProducer from L1Trigger.Phase2L1ParticleFlow.l1SeedConePFJetEmulatorProducer_cfi import l1SeedConePFJetEmulatorProducer from L1Trigger.Phase2L1ParticleFlow.l1tDeregionizerProducer_cfi import l1tDeregionizerProducer as l1tLayer2Deregionizer, l1tDeregionizerProducerExtended as l1tLayer2DeregionizerExtended -l1tSCPFL1PF = l1SeedConePFJetProducer.clone(L1PFObjects = 'l1tLayer1:PF') -l1tSCPFL1Puppi = l1SeedConePFJetProducer.clone() -l1tSCPFL1PuppiEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2Deregionizer:Puppi') -l1tSCPFL1PuppiCorrectedEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2Deregionizer:Puppi', - doCorrections = True, - correctorFile = "L1Trigger/Phase2L1ParticleFlow/data/jecs/jecs_20220308.root", - correctorDir = "L1PuppiSC4EmuJets") +l1tSC4PFL1PF = l1SeedConePFJetProducer.clone(L1PFObjects = 'l1tLayer1:PF') +l1tSC4PFL1Puppi = l1SeedConePFJetProducer.clone() +l1tSC4PFL1PuppiEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2Deregionizer:Puppi') +l1tSC8PFL1PuppiEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2Deregionizer:Puppi', + coneSize = cms.double(0.8)) +l1tSC4PFL1PuppiCorrectedEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2Deregionizer:Puppi', + doCorrections = cms.bool(True), + correctorFile = cms.string("L1Trigger/Phase2L1ParticleFlow/data/jecs/jecs_20220308.root"), + correctorDir = cms.string('L1PuppiSC4EmuJets')) +l1tSC8PFL1PuppiCorrectedEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2Deregionizer:Puppi', + coneSize = cms.double(0.8), + doCorrections = cms.bool(True), + correctorFile = cms.string("L1Trigger/Phase2L1ParticleFlow/data/jecs/jecs_20220308.root"), + correctorDir = cms.string('L1PuppiSC4EmuJets')) _correctedJets = cms.EDProducer("L1TCorrectedPFJetProducer", jets = cms.InputTag("_tag_"), @@ -26,28 +33,25 @@ phase2_hgcalV11.toModify(_correctedJets, correctorFile = "L1Trigger/Phase2L1ParticleFlow/data/jecs/jecs_20220308.root") from L1Trigger.Phase2L1ParticleFlow.l1tMHTPFProducer_cfi import l1tMHTPFProducer -l1tSCPFL1PuppiCorrectedEmulatorMHT = l1tMHTPFProducer.clone(jets = 'l1tSCPFL1PuppiCorrectedEmulator') +l1tSC4PFL1PuppiCorrectedEmulatorMHT = l1tMHTPFProducer.clone(jets = 'l1tSC4PFL1PuppiCorrectedEmulator') -L1TPFJetsTask = cms.Task( - l1tLayer2Deregionizer, l1tSCPFL1PF, l1tSCPFL1Puppi, l1tSCPFL1PuppiEmulator, l1tSCPFL1PuppiCorrectedEmulator, l1tSCPFL1PuppiCorrectedEmulatorMHT -) - -l1tSCPFL1PuppiExtended = l1SeedConePFJetProducer.clone(L1PFObjects = 'l1tLayer1Extended:Puppi') -l1tSCPFL1PuppiExtendedEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2DeregionizerExtended:Puppi') -l1tSCPFL1PuppiExtendedCorrectedEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2DeregionizerExtended:Puppi', - doCorrections = True, - correctorFile = "L1Trigger/Phase2L1ParticleFlow/data/jecs/jecs_20220308.root", - correctorDir = "L1PuppiSC4EmuJets") +l1tSC4PFL1PuppiExtended = l1SeedConePFJetProducer.clone(L1PFObjects = 'l1tLayer1Extended:Puppi') +l1tSC4PFL1PuppiExtendedEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2DeregionizerExtended:Puppi') +l1tSC4PFL1PuppiExtendedCorrectedEmulator = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = 'l1tLayer2DeregionizerExtended:Puppi', + doCorrections = cms.bool(True), + correctorFile = cms.string("L1Trigger/Phase2L1ParticleFlow/data/jecs/jecs_20220308.root"), + correctorDir = cms.string('L1PuppiSC4EmuJets')) L1TPFJetsTask = cms.Task( - l1tLayer2Deregionizer, l1tSCPFL1PF, l1tSCPFL1Puppi, l1tSCPFL1PuppiEmulator, l1tSCPFL1PuppiCorrectedEmulator, l1tSCPFL1PuppiCorrectedEmulatorMHT + l1tLayer2Deregionizer, l1tSC4PFL1PF, l1tSC4PFL1Puppi, l1tSC4PFL1PuppiEmulator, l1tSC4PFL1PuppiCorrectedEmulator, l1tSC4PFL1PuppiCorrectedEmulatorMHT, + l1tSC8PFL1PuppiEmulator, l1tSC8PFL1PuppiCorrectedEmulator ) L1TPFJetsExtendedTask = cms.Task( - l1tLayer2DeregionizerExtended, l1tSCPFL1PuppiExtended, l1tSCPFL1PuppiExtendedEmulator, l1tSCPFL1PuppiExtendedCorrectedEmulator + l1tLayer2DeregionizerExtended, l1tSC4PFL1PuppiExtended, l1tSC4PFL1PuppiExtendedEmulator, l1tSC4PFL1PuppiExtendedCorrectedEmulator ) L1TPFJetsEmulationTask = cms.Task( - l1tLayer2Deregionizer, l1tSCPFL1PuppiEmulator, l1tSCPFL1PuppiCorrectedEmulator, l1tSCPFL1PuppiCorrectedEmulatorMHT + l1tLayer2Deregionizer, l1tSC4PFL1PuppiEmulator, l1tSC4PFL1PuppiCorrectedEmulator, l1tSC4PFL1PuppiCorrectedEmulatorMHT, + l1tSC8PFL1PuppiEmulator, l1tSC8PFL1PuppiCorrectedEmulator ) - diff --git a/L1Trigger/Phase2L1ParticleFlow/python/l1tJetFileWriter_cfi.py b/L1Trigger/Phase2L1ParticleFlow/python/l1tJetFileWriter_cfi.py index a53db5cb667fe..e450e0c57e317 100644 --- a/L1Trigger/Phase2L1ParticleFlow/python/l1tJetFileWriter_cfi.py +++ b/L1Trigger/Phase2L1ParticleFlow/python/l1tJetFileWriter_cfi.py @@ -1,9 +1,12 @@ import FWCore.ParameterSet.Config as cms l1tSeededConeJetFileWriter = cms.EDAnalyzer('L1CTJetFileWriter', - jets = cms.InputTag("l1tSCPFL1PuppiEmulatorCorrected"), - nJets = cms.uint32(12), + collections = cms.VPSet(cms.PSet(jets = cms.InputTag("l1tSC4PFL1PuppiCorrectedEmulator"), + nJets = cms.uint32(12), + mht = cms.InputTag("l1tSC4PFL1PuppiCorrectedEmulatorMHT"), + nSums = cms.uint32(1))), nFramesPerBX = cms.uint32(9), # 360 MHz clock or 25 Gb/s link + gapLengthOutput = cms.uint32(4), TMUX = cms.uint32(6), maxLinesPerFile = cms.uint32(1024), outputFilename = cms.string("L1CTSCJetsPatterns"), diff --git a/L1Trigger/Phase2L1ParticleFlow/python/l1tMHTPFProducer_cfi.py b/L1Trigger/Phase2L1ParticleFlow/python/l1tMHTPFProducer_cfi.py index 31e3f57591c9e..e51ca85feafb4 100644 --- a/L1Trigger/Phase2L1ParticleFlow/python/l1tMHTPFProducer_cfi.py +++ b/L1Trigger/Phase2L1ParticleFlow/python/l1tMHTPFProducer_cfi.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms l1tMHTPFProducer = cms.EDProducer("L1MhtPfProducer", - jets = cms.InputTag("l1tSCPFL1PuppiEmulator"), + jets = cms.InputTag("l1tSC4PFL1PuppiEmulator"), minJetPt = cms.double(30.0), maxJetEta = cms.double(2.4) ) diff --git a/L1Trigger/Phase2L1ParticleFlow/test/make_l1ct_binaryFiles_cfg.py b/L1Trigger/Phase2L1ParticleFlow/test/make_l1ct_binaryFiles_cfg.py index 98fe13e76b47d..4b12b019246b1 100644 --- a/L1Trigger/Phase2L1ParticleFlow/test/make_l1ct_binaryFiles_cfg.py +++ b/L1Trigger/Phase2L1ParticleFlow/test/make_l1ct_binaryFiles_cfg.py @@ -37,7 +37,8 @@ "drop l1tPFClusters_*_*_*", "drop l1tPFTracks_*_*_*", "drop l1tPFCandidates_*_*_*", - "drop l1tTkPrimaryVertexs_*_*_*") + "drop l1tTkPrimaryVertexs_*_*_*"), + skipEvents = cms.untracked.uint32(0), ) process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff') @@ -51,6 +52,7 @@ process.load('L1Trigger.Phase2L1ParticleFlow.l1ctLayer1_cff') process.load('L1Trigger.Phase2L1ParticleFlow.l1ctLayer2EG_cff') +process.load('L1Trigger.Phase2L1ParticleFlow.l1pfJetMet_cff') process.load('L1Trigger.L1TTrackMatch.l1tGTTInputProducer_cfi') process.load('L1Trigger.L1TTrackMatch.l1tTrackSelectionProducer_cfi') process.l1tTrackSelectionProducer.processSimulatedTracks = False # these would need stubs, and are not used anyway @@ -58,15 +60,15 @@ from L1Trigger.Phase2L1GMT.gmt_cfi import l1tStandaloneMuons process.l1tSAMuonsGmt = l1tStandaloneMuons.clone() -from L1Trigger.Phase2L1ParticleFlow.l1SeedConePFJetEmulatorProducer_cfi import l1SeedConePFJetEmulatorProducer -from L1Trigger.Phase2L1ParticleFlow.l1tDeregionizerProducer_cfi import l1tDeregionizerProducer from L1Trigger.Phase2L1ParticleFlow.l1tJetFileWriter_cfi import l1tSeededConeJetFileWriter -process.l1tLayer2Deregionizer = l1tDeregionizerProducer.clone() -process.l1tLayer2SeedConeJetsCorrected = l1SeedConePFJetEmulatorProducer.clone(L1PFObjects = cms.InputTag('l1tLayer2Deregionizer', 'Puppi'), - doCorrections = cms.bool(True), - correctorFile = cms.string("L1Trigger/Phase2L1ParticleFlow/data/jecs/jecs_20220308.root"), - correctorDir = cms.string('L1PuppiSC4EmuJets')) -process.l1tLayer2SeedConeJetWriter = l1tSeededConeJetFileWriter.clone(jets = "l1tLayer2SeedConeJetsCorrected") +l1ctLayer2SCJetsProducts = cms.VPSet([cms.PSet(jets = cms.InputTag("l1tSC4PFL1PuppiCorrectedEmulator"), + nJets = cms.uint32(12), + mht = cms.InputTag("l1tSC4PFL1PuppiCorrectedEmulatorMHT"), + nSums = cms.uint32(2)), + cms.PSet(jets = cms.InputTag("l1tSC8PFL1PuppiCorrectedEmulator"), + nJets = cms.uint32(12)) + ]) +process.l1tLayer2SeedConeJetWriter = l1tSeededConeJetFileWriter.clone(collections = l1ctLayer2SCJetsProducts) process.l1tLayer1BarrelTDR = process.l1tLayer1Barrel.clone() process.l1tLayer1BarrelTDR.regionizerAlgo = cms.string("TDR") @@ -130,7 +132,9 @@ process.l1tLayer1HF + process.l1tLayer1 + process.l1tLayer2Deregionizer + - process.l1tLayer2SeedConeJetsCorrected + + process.l1tSC4PFL1PuppiCorrectedEmulator + + process.l1tSC4PFL1PuppiCorrectedEmulatorMHT + + process.l1tSC8PFL1PuppiCorrectedEmulator + # process.l1tLayer2SeedConeJetWriter + process.l1tLayer2EG ) @@ -149,7 +153,7 @@ ##################################################################################################################### ## Layer 2 seeded-cone jets if not args.patternFilesOFF: - process.runPF.insert(process.runPF.index(process.l1tLayer2SeedConeJetsCorrected)+1, process.l1tLayer2SeedConeJetWriter) + process.runPF.insert(process.runPF.index(process.l1tSC8PFL1PuppiCorrectedEmulator)+1, process.l1tLayer2SeedConeJetWriter) process.l1tLayer2SeedConeJetWriter.maxLinesPerFile = _eventsPerFile*54 if not args.dumpFilesOFF: