Skip to content

Instantly share code, notes, and snippets.

@artlbv
Created August 22, 2023 13:25
Show Gist options
  • Save artlbv/cd2fa01e823ce8dac3e966d1b46d5f0d to your computer and use it in GitHub Desktop.
Save artlbv/cd2fa01e823ce8dac3e966d1b46d5f0d to your computer and use it in GitHub Desktop.
Difference for L1P2GT package between Phase2Snapshot3_13x and CMSSW 133pre3
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/interface/L1GTScales.h b/L1Trigger/Phase2L1GT/interface/L1GTScales.h
index 899a03d55d5..f70b0dc3149 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/interface/L1GTScales.h
+++ b/L1Trigger/Phase2L1GT/interface/L1GTScales.h
@@ -28,7 +28,7 @@ namespace l1t {
L1GTScales(const edm::ParameterSet &);
- static void fillDescriptions(edm::ParameterSetDescription &);
+ static void fillPSetDescription(edm::ParameterSetDescription &);
int to_hw_pT(double value) const { return std::round(value / pT_lsb_); };
int to_hw_phi(double value) const { return std::round(value / phi_lsb_); };
@@ -57,6 +57,7 @@ namespace l1t {
double to_eta(int value) const { return value * eta_lsb_; };
double to_z0(int value) const { return value * z0_lsb_; };
double to_sca_sum(int value) const { return value * sca_sum_lsb_; };
+ int to_chg(int value) const { return value == pos_chg_ ? +1 : value == neg_chg_ ? -1 : 0; }
double pT_lsb() const { return pT_lsb_; }
double phi_lsb() const { return phi_lsb_; }
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc b/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc
index e363d2f7f38..98991980cd1 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTAlgoBlockProducer.cc
@@ -1,6 +1,8 @@
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
+#include "FWCore/Framework/interface/GetterOfProducts.h"
+#include "FWCore/Framework/interface/TypeMatch.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "DataFormats/Common/interface/View.h"
@@ -327,12 +329,13 @@ private:
void produce(edm::Event&, const edm::EventSetup&) override;
+ edm::GetterOfProducts<P2GTCandidateVectorRef> getterOfPassedReferences_;
std::map<std::string, AlgoDefinition> algoDefinitions_;
};
void L1GTAlgoBlockProducer::fillDescriptions(edm::ConfigurationDescriptions& description) {
edm::ParameterSetDescription algoDesc;
- algoDesc.addOptional<std::string>("name");
+ algoDesc.add<std::string>("name", "");
algoDesc.add<std::string>("expression");
edm::ParameterSetDescription desc;
@@ -341,13 +344,16 @@ void L1GTAlgoBlockProducer::fillDescriptions(edm::ConfigurationDescriptions& des
description.addWithDefaultLabel(desc);
}
-L1GTAlgoBlockProducer::L1GTAlgoBlockProducer(const edm::ParameterSet& config) {
+L1GTAlgoBlockProducer::L1GTAlgoBlockProducer(const edm::ParameterSet& config)
+ : getterOfPassedReferences_(edm::TypeMatch(), this) {
edm::ConsumesCollector iC(consumesCollector());
for (const auto& algoConfig : config.getParameterSetVector("algorithms")) {
const std::string logicalExpression = algoConfig.getParameter<std::string>("expression");
- const std::string name =
- algoConfig.exists("name") ? algoConfig.getParameter<std::string>("name") : logicalExpression;
+ std::string name = algoConfig.getParameter<std::string>("name");
+ if (name.empty()) {
+ name = logicalExpression;
+ }
pathStatusExpression::ShuntingYardAlgorithm shuntingYardAlgorithm;
pathStatusExpression::Grammar<std::string::const_iterator> grammar(&shuntingYardAlgorithm);
@@ -384,7 +390,7 @@ L1GTAlgoBlockProducer::L1GTAlgoBlockProducer(const edm::ParameterSet& config) {
algoDefinitions_.emplace(std::move(name), std::move(definition));
}
- consumesMany<P2GTCandidateVectorRef>();
+ callWhenNewProductsRegistered(getterOfPassedReferences_);
produces<P2GTAlgoBlockCollection>();
}
@@ -439,7 +445,7 @@ void L1GTAlgoBlockProducer::beginRun(const edm::Run& iRun, const edm::EventSetup
void L1GTAlgoBlockProducer::produce(edm::Event& event, const edm::EventSetup& eventSetup) {
std::vector<edm::Handle<P2GTCandidateVectorRef>> handles;
- event.getManyByType<P2GTCandidateVectorRef>(handles);
+ getterOfPassedReferences_.fillHandles(event, handles);
std::unique_ptr<P2GTAlgoBlockCollection> algoCollection = std::make_unique<P2GTAlgoBlockCollection>();
algoCollection->reserve(algoDefinitions_.size());
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTBoardWriter.cc b/L1Trigger/Phase2L1GT/plugins/L1GTBoardWriter.cc
index 849e9022a8e..9c5d1402fed 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTBoardWriter.cc
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTBoardWriter.cc
@@ -45,16 +45,15 @@ private:
L1GTBoardWriter::L1GTBoardWriter(const edm::ParameterSet& config)
: channels_(config.getParameter<std::vector<unsigned int>>("channels")),
- algoBitMask_(config.exists("algoBitMask") ? config.getParameter<std::vector<unsigned long long>>("algoBitMask")
- : std::vector<unsigned long long>()),
+ algoBitMask_(config.getParameter<std::vector<unsigned long long>>("algoBitMask")),
algoBlocksToken_(consumes<P2GTAlgoBlockCollection>(config.getParameter<edm::InputTag>("algoBlocksTag"))),
boardDataWriter_(
- config.exists("patternFormat") ? l1t::demo::parseFileFormat(config.getParameter<std::string>("patternFormat"))
- : l1t::demo::FileFormat::EMP,
+ l1t::demo::parseFileFormat(config.getParameter<std::string>("patternFormat")),
config.getParameter<std::string>("outputFilename"),
+ config.getParameter<std::string>("outputFileExtension"),
9,
1,
- config.exists("maxLines") ? config.getParameter<unsigned int>("maxLines") : 1024,
+ config.getParameter<unsigned int>("maxLines"),
[](const std::vector<unsigned int>& channels) {
l1t::demo::BoardDataWriter::ChannelMap_t channelMap;
for (unsigned int channel : channels) {
@@ -76,7 +75,7 @@ void L1GTBoardWriter::analyze(const edm::Event& event, const edm::EventSetup& iS
ap_uint<64> mask = algoMaskIt != algoBitMask_.end() ? *algoMaskIt++ : ~static_cast<unsigned long long>(0);
for (std::size_t idx = 0; idx < 64 && algoBlockIt != algoBlocks.end(); idx++) {
- bits[word].set(idx, algoBlockIt->decisionBeforeBxMaskAndPrescale() & mask.bit(idx));
+ bits[word].set(idx, algoBlockIt->decisionBeforeBxMaskAndPrescale() && mask.bit(idx));
algoBlockIt++;
}
}
@@ -92,11 +91,12 @@ void L1GTBoardWriter::endJob() { boardDataWriter_.flush(); }
void L1GTBoardWriter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<std::string>("outputFilename");
+ desc.add<std::string>("outputFileExtension", "txt");
desc.add<edm::InputTag>("algoBlocksTag");
desc.add<std::vector<unsigned int>>("channels");
- desc.addOptional<std::vector<unsigned long long>>("algoBitMask");
- desc.addOptional<unsigned int>("maxLines", 1024);
- desc.addOptional<std::string>("patternFormat");
+ desc.add<std::vector<unsigned long long>>("algoBitMask", {});
+ desc.add<unsigned int>("maxLines", 1024);
+ desc.add<std::string>("patternFormat", "EMPv2");
descriptions.addDefault(desc);
}
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTDeltaCut.h b/L1Trigger/Phase2L1GT/plugins/L1GTDeltaCut.h
index 95a5cbabe3e..71a585113ca 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTDeltaCut.h
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTDeltaCut.h
@@ -32,35 +32,35 @@ namespace l1t {
coshEtaLUT2_(lutConfig.getParameterSet("cosh_eta_lut2")),
cosPhiLUT_(lutConfig.getParameterSet("cos_phi_lut")),
minDEta_(getOptionalParam<int, double>(
- "minDEta", config, std::bind(&L1GTScales::to_hw_phi, scales, std::placeholders::_1))),
+ "minDEta", config, [&scales](double value) { return scales.to_hw_eta(value); })),
maxDEta_(getOptionalParam<int, double>(
- "maxDEta", config, std::bind(&L1GTScales::to_hw_phi, scales, std::placeholders::_1))),
+ "maxDEta", config, [&scales](double value) { return scales.to_hw_eta(value); })),
minDPhi_(getOptionalParam<int, double>(
- "minDPhi", config, std::bind(&L1GTScales::to_hw_phi, scales, std::placeholders::_1))),
+ "minDPhi", config, [&scales](double value) { return scales.to_hw_phi(value); })),
maxDPhi_(getOptionalParam<int, double>(
- "maxDPhi", config, std::bind(&L1GTScales::to_hw_phi, scales, std::placeholders::_1))),
+ "maxDPhi", config, [&scales](double value) { return scales.to_hw_phi(value); })),
minDz_(getOptionalParam<int, double>(
- "minDz", config, std::bind(&L1GTScales::to_hw_z0, scales, std::placeholders::_1))),
+ "minDz", config, [&scales](double value) { return scales.to_hw_z0(value); })),
maxDz_(getOptionalParam<int, double>(
- "maxDz", config, std::bind(&L1GTScales::to_hw_z0, scales, std::placeholders::_1))),
+ "maxDz", config, [&scales](double value) { return scales.to_hw_z0(value); })),
minDRSquared_(getOptionalParam<int, double>(
- "minDR", config, std::bind(&L1GTScales::to_hw_dRSquared, scales, std::placeholders::_1))),
+ "minDR", config, [&scales](double value) { return scales.to_hw_dRSquared(value); })),
maxDRSquared_(getOptionalParam<int, double>(
- "maxDR", config, std::bind(&L1GTScales::to_hw_dRSquared, scales, std::placeholders::_1))),
+ "maxDR", config, [&scales](double value) { return scales.to_hw_dRSquared(value); })),
minInvMassSqrDiv2_(getOptionalParam<double, double>(
- "minInvMass", config, std::bind(&L1GTScales::to_hw_InvMassSqrDiv2, scales, std::placeholders::_1))),
+ "minInvMass", config, [&scales](double value) { return scales.to_hw_InvMassSqrDiv2(value); })),
maxInvMassSqrDiv2_(getOptionalParam<double, double>(
- "maxInvMass", config, std::bind(&L1GTScales::to_hw_InvMassSqrDiv2, scales, std::placeholders::_1))),
+ "maxInvMass", config, [&scales](double value) { return scales.to_hw_InvMassSqrDiv2(value); })),
minTransMassSqrDiv2_(getOptionalParam<double, double>(
- "minTransMass", config, std::bind(&L1GTScales::to_hw_TransMassSqrDiv2, scales, std::placeholders::_1))),
+ "minTransMass", config, [&scales](double value) { return scales.to_hw_TransMassSqrDiv2(value); })),
maxTransMassSqrDiv2_(getOptionalParam<double, double>(
- "maxTransMass", config, std::bind(&L1GTScales::to_hw_TransMassSqrDiv2, scales, std::placeholders::_1))),
+ "maxTransMass", config, [&scales](double value) { return scales.to_hw_TransMassSqrDiv2(value); })),
minPTSquared_(getOptionalParam<double, double>(
- "minCombPt", config, std::bind(&L1GTScales::to_hw_PtSquared, scales, std::placeholders::_1))),
+ "minCombPt", config, [&scales](double value) { return scales.to_hw_PtSquared(value); })),
maxPTSquared_(getOptionalParam<double, double>(
- "maxCombPt", config, std::bind(&L1GTScales::to_hw_PtSquared, scales, std::placeholders::_1))),
- os_(config.exists("os") ? config.getParameter<bool>("os") : false),
- ss_(config.exists("ss") ? config.getParameter<bool>("ss") : false),
+ "maxCombPt", config, [&scales](double value) { return scales.to_hw_PtSquared(value); })),
+ os_(config.getParameter<bool>("os")),
+ ss_(config.getParameter<bool>("ss")),
enable_sanity_checks_(enable_sanity_checks),
inv_mass_checks_(inv_mass_checks) {}
@@ -106,13 +106,13 @@ namespace l1t {
res &= os_ ? obj1.hwCharge() != obj2.hwCharge() : true;
res &= ss_ ? obj1.hwCharge() == obj2.hwCharge() : true;
- int32_t lutCoshDEta;
+ int32_t lutCoshDEta = 0;
if (dEta) {
lutCoshDEta = dEta < DETA_LUT_SPLIT ? coshEtaLUT_[dEta.value()] : coshEtaLUT2_[dEta.value() - DETA_LUT_SPLIT];
}
// Optimization: (cos(x + pi) = -cos(x), x in [0, pi))
- int32_t lutCosDPhi;
+ int32_t lutCosDPhi = 0;
if (dPhi) {
lutCosDPhi = dPhi >= HW_PI ? -cosPhiLUT_[dPhi.value()] : cosPhiLUT_[dPhi.value()];
}
@@ -212,7 +212,7 @@ namespace l1t {
desc.add<edm::ParameterSetDescription>("cos_phi_lut", cosLUTDesc);
}
- static void fillDescriptions(edm::ParameterSetDescription& desc) {
+ static void fillPSetDescription(edm::ParameterSetDescription& desc) {
desc.addOptional<double>("minDEta");
desc.addOptional<double>("maxDEta");
desc.addOptional<double>("minDPhi");
@@ -227,8 +227,8 @@ namespace l1t {
desc.addOptional<double>("maxTransMass");
desc.addOptional<double>("minCombPt");
desc.addOptional<double>("maxCombPt");
- desc.addOptional<bool>("os", false);
- desc.addOptional<bool>("ss", false);
+ desc.add<bool>("os", false);
+ desc.add<bool>("ss", false);
}
private:
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTDoubleObjectCond.cc b/L1Trigger/Phase2L1GT/plugins/L1GTDoubleObjectCond.cc
index 230a077429d..249f9917781 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTDoubleObjectCond.cc
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTDoubleObjectCond.cc
@@ -78,21 +78,21 @@ void L1GTDoubleObjectCond::fillDescriptions(edm::ConfigurationDescriptions& desc
edm::ParameterSetDescription desc;
edm::ParameterSetDescription collection1Desc;
- L1GTSingleCollectionCut::fillDescriptions(collection1Desc);
+ L1GTSingleCollectionCut::fillPSetDescription(collection1Desc);
desc.add<edm::ParameterSetDescription>("collection1", collection1Desc);
edm::ParameterSetDescription collection2Desc;
- L1GTSingleCollectionCut::fillDescriptions(collection2Desc);
+ L1GTSingleCollectionCut::fillPSetDescription(collection2Desc);
desc.add<edm::ParameterSetDescription>("collection2", collection2Desc);
- desc.addUntracked<bool>("sanity_checks");
- desc.addUntracked<bool>("inv_mass_checks");
+ desc.addUntracked<bool>("sanity_checks", false);
+ desc.addUntracked<bool>("inv_mass_checks", false);
- L1GTDeltaCut::fillDescriptions(desc);
+ L1GTDeltaCut::fillPSetDescription(desc);
L1GTDeltaCut::fillLUTDescriptions(desc);
edm::ParameterSetDescription scalesDesc;
- L1GTScales::fillDescriptions(scalesDesc);
+ L1GTScales::fillPSetDescription(scalesDesc);
desc.add<edm::ParameterSetDescription>("scales", scalesDesc);
descriptions.addWithDefaultLabel(desc);
@@ -153,7 +153,7 @@ bool L1GTDoubleObjectCond::filter(edm::StreamID, edm::Event& event, const edm::E
}
if (inv_mass_checks_) {
- event.put(std::move(std::make_unique<InvariantMassErrorCollection>(std::move(massErrors))), "");
+ event.put(std::make_unique<InvariantMassErrorCollection>(std::move(massErrors)), "");
}
return condition_result;
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTEvaluationInterface.h b/L1Trigger/Phase2L1GT/plugins/L1GTEvaluationInterface.h
index 9add8f2cd70..a79ab9a8de3 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTEvaluationInterface.h
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTEvaluationInterface.h
@@ -53,7 +53,7 @@ namespace l1t {
static constexpr std::size_t WIDTH = N;
- virtual std::size_t packed_width() const override { return WIDTH; }
+ std::size_t packed_width() const override { return WIDTH; }
};
template <std::size_t N>
@@ -68,11 +68,11 @@ namespace l1t {
virtual ap_uint<44> pack_common() const { return l1t_pack_int<ap_uint<44>>(valid, pT, phi, eta); }
- virtual ap_uint<N> pack() const override { return pack_common(); }
+ ap_uint<N> pack() const override { return pack_common(); }
- virtual ap_uint<N> unpack(const ap_uint<N>& packed) override { return l1t_unpack_int(packed, valid, pT, phi, eta); }
+ ap_uint<N> unpack(const ap_uint<N>& packed) override { return l1t_unpack_int(packed, valid, pT, phi, eta); }
- virtual P2GTCandidate to_GTObject() const override {
+ P2GTCandidate to_GTObject() const override {
P2GTCandidate gt_object;
gt_object.setHwPT(pT);
gt_object.setHwPhi(phi);
@@ -94,13 +94,13 @@ namespace l1t {
ap_uint<46> pack_common() const { return l1t_pack_int<ap_uint<46>>(valid, pT, phi, scalar_sum_pT); }
- virtual ap_uint<N> pack() const override { return pack_common(); }
+ ap_uint<N> pack() const override { return pack_common(); }
- virtual ap_uint<N> unpack(const ap_uint<N>& packed) override {
+ ap_uint<N> unpack(const ap_uint<N>& packed) override {
return l1t_unpack_int(packed, valid, pT, phi, scalar_sum_pT);
}
- virtual P2GTCandidate to_GTObject() const override {
+ P2GTCandidate to_GTObject() const override {
P2GTCandidate gt_object;
gt_object.setHwPT(pT);
gt_object.setHwPhi(phi);
@@ -166,7 +166,7 @@ namespace l1t {
return l1t_pack_int<ap_uint<WIDTH>>(L1TGT_Common3Vector::pack_common(), z0, d0, charge, qual);
}
- ap_uint<WIDTH> unpack(const ap_uint<WIDTH>& packed) {
+ ap_uint<WIDTH> unpack(const ap_uint<WIDTH>& packed) override {
return l1t_unpack_int(L1TGT_Common3Vector::unpack(packed), z0, d0, charge, qual);
}
@@ -467,7 +467,7 @@ namespace l1t {
return l1t_pack_int<ap_uint<WIDTH>>(L1TGT_Common3Vector::pack_common(), seed_pT, seed_z0, charge, type);
}
- ap_uint<WIDTH> unpack(const ap_uint<WIDTH>& packed) {
+ ap_uint<WIDTH> unpack(const ap_uint<WIDTH>& packed) override {
return l1t_unpack_int(L1TGT_Common3Vector::unpack(packed), seed_pT, seed_z0, charge, type);
}
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTEvaluationProducer.cc b/L1Trigger/Phase2L1GT/plugins/L1GTEvaluationProducer.cc
index 25c74b08437..723b6790143 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTEvaluationProducer.cc
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTEvaluationProducer.cc
@@ -106,13 +106,12 @@ static const l1t::demo::BoardDataWriter::ChannelMap_t CHANNEL_MAP_VU13P{
L1GTEvaluationProducer::L1GTEvaluationProducer(const edm::ParameterSet &config)
: randomGenerator_(config.exists("random_seed") ? config.getParameter<unsigned int>("random_seed")
: std::random_device()()),
- boardDataWriter_(config.exists("patternFormat")
- ? l1t::demo::parseFileFormat(config.getParameter<std::string>("patternFormat"))
- : l1t::demo::FileFormat::EMP,
+ boardDataWriter_(l1t::demo::parseFileFormat(config.getParameter<std::string>("patternFormat")),
config.getParameter<std::string>("outputFilename"),
+ config.getParameter<std::string>("outputFileExtension"),
9,
1,
- config.exists("maxLines") ? config.getParameter<unsigned int>("maxLines") : 1024,
+ config.getParameter<unsigned int>("maxLines"),
config.getParameter<std::string>("platform") == "VU13P" ? CHANNEL_MAP_VU13P : CHANNEL_MAP_VU9P) {
produces<P2GTCandidateCollection>("GCTNonIsoEg");
produces<P2GTCandidateCollection>("GCTIsoEg");
@@ -145,9 +144,10 @@ L1GTEvaluationProducer::L1GTEvaluationProducer(const edm::ParameterSet &config)
void L1GTEvaluationProducer::fillDescriptions(edm::ConfigurationDescriptions &description) {
edm::ParameterSetDescription desc;
desc.addOptional<unsigned int>("random_seed");
- desc.addOptional<unsigned int>("maxLines", 1024);
- desc.addOptional<std::string>("outputFilename");
- desc.addOptional<std::string>("patternFormat");
+ desc.add<unsigned int>("maxLines", 1024);
+ desc.add<std::string>("outputFilename");
+ desc.add<std::string>("outputFileExtension", "txt");
+ desc.add<std::string>("patternFormat", "EMPv2");
desc.ifValue(edm::ParameterDescription<std::string>("platform", "VU9P", true),
edm::allowedValues<std::string>("VU9P", "VU13P"));
description.addWithDefaultLabel(desc);
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTOptionalParam.h b/L1Trigger/Phase2L1GT/plugins/L1GTOptionalParam.h
index 403d919a990..f3a95988825 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTOptionalParam.h
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTOptionalParam.h
@@ -9,21 +9,6 @@
namespace l1t {
- template <typename T, typename K>
- inline std::vector<T> getParamVector(const std::string& name,
- const edm::ParameterSet& config,
- std::function<T(K)> conv) {
- if (config.exists(name)) {
- const std::vector<K>& values = config.getParameter<std::vector<K>>(name);
- std::vector<T> convertedValues(values.size());
- for (std::size_t i = 0; i < values.size(); i++) {
- convertedValues[i] = conv(values[i]);
- }
- return convertedValues;
- }
- return std::vector<T>();
- }
-
template <typename T, typename K>
inline std::optional<T> getOptionalParam(const std::string& name,
const edm::ParameterSet& config,
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc b/L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc
index c45ad3a7971..4e1cf7d93ec 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTProducer.cc
@@ -114,23 +114,23 @@ namespace l1t {
edm::ParameterSetDescription desc;
edm::ParameterSetDescription scalesDesc;
- L1GTScales::fillDescriptions(scalesDesc);
+ L1GTScales::fillPSetDescription(scalesDesc);
desc.add<edm::ParameterSetDescription>("scales", scalesDesc);
- desc.addOptional<edm::InputTag>("GTTPromptJets");
- desc.addOptional<edm::InputTag>("GTTDisplacedJets");
- desc.addOptional<edm::InputTag>("GTTPrimaryVert");
+ desc.add<edm::InputTag>("GTTPromptJets");
+ desc.add<edm::InputTag>("GTTDisplacedJets");
+ desc.add<edm::InputTag>("GTTPrimaryVert");
- desc.addOptional<edm::InputTag>("GMTSaPromptMuons");
- desc.addOptional<edm::InputTag>("GMTSaDisplacedMuons");
- desc.addOptional<edm::InputTag>("GMTTkMuons");
+ desc.add<edm::InputTag>("GMTSaPromptMuons");
+ desc.add<edm::InputTag>("GMTSaDisplacedMuons");
+ desc.add<edm::InputTag>("GMTTkMuons");
- desc.addOptional<edm::InputTag>("CL2Jets");
- desc.addOptional<edm::InputTag>("CL2Photons");
- desc.addOptional<edm::InputTag>("CL2Electrons");
- desc.addOptional<edm::InputTag>("CL2Taus");
- desc.addOptional<edm::InputTag>("CL2EtSum");
- desc.addOptional<edm::InputTag>("CL2HtSum");
+ desc.add<edm::InputTag>("CL2Jets");
+ desc.add<edm::InputTag>("CL2Photons");
+ desc.add<edm::InputTag>("CL2Electrons");
+ desc.add<edm::InputTag>("CL2Taus");
+ desc.add<edm::InputTag>("CL2EtSum");
+ desc.add<edm::InputTag>("CL2HtSum");
description.addWithDefaultLabel(desc);
}
@@ -140,79 +140,65 @@ namespace l1t {
const VertexWordCollection &collection = event.get(gttPrimaryVertexToken_);
for (std::size_t i = 0; i < collection.size() && i < 10; i++) {
const VertexWord &obj = collection[i];
- P2GTCandidate gtObj;
- gtObj.hwZ0_ = obj.z0Word().V.to_int() * 5;
+ int hwZ0 = obj.z0Word().V.to_int() * 5;
+ P2GTCandidate gtObj(
+ 0, reco::ParticleState::PolarLorentzVector(), reco::ParticleState::Point(0, 0, scales_.to_z0(hwZ0)));
+ gtObj.hwZ0_ = hwZ0;
gtObj.hwQual_ = obj.qualityWord().V.to_int();
gtObj.hwSum_pT_pv_ = obj.multiplicityWord().V.to_int();
gtObj.hwNumber_of_tracks_in_pv_ = obj.multiplicityWord().V.to_int();
gtObj.hwNumber_of_tracks_not_in_pv_ = obj.inverseMultiplicityWord().V.to_int();
gtObj.objectType_ = P2GTCandidate::GTTPrimaryVert;
- gtObj.z0_ = scales_.to_z0(gtObj.hwZ0());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "GTTPrimaryVert");
}
void L1GTProducer::produceGTTPromptJets(edm::Event &event) const {
- // static_assert(std::is_same<std::result_of<decltype (&TkJetWord::ptWord)(TkJetWord *)>::type,
- // ap_ufixed<16, 11, AP_TRN, AP_SAT>>::value);
- // static_assert(std::result_of<decltype (&TkJetWord::ptWord)(TkJetWord *)>::type::width == 16);
- // static_assert(std::result_of<decltype (&TkJetWord::glbPhiWord)(TkJetWord *)>::type::width == 13);
- // static_assert(std::result_of<decltype (&TkJetWord::glbEtaWord)(TkJetWord *)>::type::width == 14);
- // static_assert(std::result_of<decltype (&TkJetWord::z0Word)(TkJetWord *)>::type::width == 10);
- // static_assert(std::result_of<decltype (&TkJetWord::ntWord)(TkJetWord *)>::type::width == 5);
-
std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
const TkJetWordCollection &collection = event.get(gttPromptJetToken_);
for (std::size_t i = 0; i < collection.size() && i < 12; i++) {
const TkJetWord &obj = collection[i];
- P2GTCandidate gtObj;
+ int hwZ0 = obj.z0Word().V.to_int() << 7;
+ P2GTCandidate gtObj(0,
+ reco::ParticleState::PolarLorentzVector(scales_.to_pT(obj.ptWord().V.to_int()),
+ scales_.to_eta(obj.glbEtaWord().V.to_int()),
+ scales_.to_phi(obj.glbPhiWord().V.to_int()),
+ 0),
+ reco::ParticleState::Point(0, 0, scales_.to_z0(hwZ0)));
gtObj.hwPT_ = obj.ptWord().V.to_int();
gtObj.hwPhi_ = obj.glbPhiWord().V.to_int();
gtObj.hwEta_ = obj.glbEtaWord().V.to_int();
- gtObj.hwZ0_ = obj.z0Word().V.to_int() << 7;
+ gtObj.hwZ0_ = hwZ0;
gtObj.hwNumber_of_tracks_ = obj.ntWord().V.to_int();
gtObj.objectType_ = P2GTCandidate::GTTPromptJets;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.eta_ = scales_.to_eta(gtObj.hwEta());
- gtObj.z0_ = scales_.to_z0(gtObj.hwZ0());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "GTTPromptJets");
}
void L1GTProducer::produceGTTDisplacedJets(edm::Event &event) const {
- // static_assert(std::is_same<std::result_of<decltype (&TkJetWord::ptWord)(TkJetWord *)>::type,
- // ap_ufixed<16, 11, AP_TRN, AP_SAT>>::value);
- // static_assert(std::result_of<decltype (&TkJetWord::ptWord)(TkJetWord *)>::type::width == 16);
- // static_assert(std::result_of<decltype (&TkJetWord::glbPhiWord)(TkJetWord *)>::type::width == 13);
- // static_assert(std::result_of<decltype (&TkJetWord::glbEtaWord)(TkJetWord *)>::type::width == 14);
- // static_assert(std::result_of<decltype (&TkJetWord::z0Word)(TkJetWord *)>::type::width == 10);
- // static_assert(std::result_of<decltype (&TkJetWord::ntWord)(TkJetWord *)>::type::width == 5);
-
std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
const TkJetWordCollection &collection = event.get(gttDisplacedJetToken_);
for (std::size_t i = 0; i < collection.size() && i < 12; i++) {
const TkJetWord &obj = collection[i];
- P2GTCandidate gtObj;
+ int hwZ0 = obj.z0Word().V.to_int() << 7;
+ P2GTCandidate gtObj(0,
+ reco::ParticleState::PolarLorentzVector(scales_.to_pT(obj.ptWord().V.to_int()),
+ scales_.to_eta(obj.glbEtaWord().V.to_int()),
+ scales_.to_phi(obj.glbPhiWord().V.to_int()),
+ 0),
+ reco::ParticleState::Point(0, 0, scales_.to_z0(hwZ0)));
gtObj.hwPT_ = obj.ptWord().V.to_int();
gtObj.hwPhi_ = obj.glbPhiWord().V.to_int();
gtObj.hwEta_ = obj.glbEtaWord().V.to_int();
- gtObj.hwZ0_ = obj.z0Word().V.to_int() << 7;
+ gtObj.hwZ0_ = hwZ0;
gtObj.hwNumber_of_tracks_ = obj.ntWord().V.to_int();
gtObj.objectType_ = P2GTCandidate::GTTDisplacedJets;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.eta_ = scales_.to_eta(gtObj.hwEta());
- gtObj.z0_ = scales_.to_z0(gtObj.hwZ0());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "GTTDisplacedJets");
}
@@ -222,22 +208,23 @@ namespace l1t {
const SAMuonCollection &collection = event.get(gmtSaPromptMuonToken_);
for (size_t i = 0; i < collection.size() && i < 12; i++) {
const SAMuon &obj = collection[i];
- P2GTCandidate gtObj;
+ int hwZ0 = obj.apZ0().to_int() << 12;
+ P2GTCandidate gtObj(scales_.to_chg(obj.apCharge().to_int()),
+ reco::ParticleState::PolarLorentzVector(scales_.to_pT(obj.apPt().to_int()),
+ scales_.to_eta(obj.apEta().to_int()),
+ scales_.to_phi(obj.apPhi().to_int()),
+ 0),
+ reco::ParticleState::Point(0, 0, scales_.to_z0(hwZ0)));
gtObj.hwPT_ = obj.apPt().to_int();
gtObj.hwPhi_ = obj.apPhi().to_int();
gtObj.hwEta_ = obj.apEta().to_int();
- gtObj.hwZ0_ = obj.apZ0().to_int() << 12;
+ gtObj.hwZ0_ = hwZ0;
gtObj.hwQual_ = obj.apQual().to_int();
gtObj.hwCharge_ = obj.apCharge().to_int();
gtObj.hwD0_ = obj.apD0().to_int();
gtObj.objectType_ = P2GTCandidate::GMTSaPromptMuons;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.eta_ = scales_.to_eta(gtObj.hwEta());
- gtObj.z0_ = scales_.to_z0(gtObj.hwZ0());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "GMTSaPromptMuons");
}
@@ -247,22 +234,23 @@ namespace l1t {
const SAMuonCollection &collection = event.get(gmtSaDisplacedMuonToken_);
for (size_t i = 0; i < collection.size() && i < 12; i++) {
const SAMuon &obj = collection[i];
- P2GTCandidate gtObj;
+ int hwZ0 = obj.apZ0().to_int() << 12;
+ P2GTCandidate gtObj(scales_.to_chg(obj.apCharge().to_int()),
+ reco::ParticleState::PolarLorentzVector(scales_.to_pT(obj.apPt().to_int()),
+ scales_.to_eta(obj.apEta().to_int()),
+ scales_.to_phi(obj.apPhi().to_int()),
+ 0),
+ reco::ParticleState::Point(0, 0, scales_.to_z0(hwZ0)));
gtObj.hwPT_ = obj.apPt().to_int();
gtObj.hwPhi_ = obj.apPhi().to_int();
gtObj.hwEta_ = obj.apEta().to_int();
- gtObj.hwZ0_ = obj.apZ0().to_int() << 12;
+ gtObj.hwZ0_ = hwZ0;
gtObj.hwQual_ = obj.apQual().to_int();
gtObj.hwCharge_ = obj.apCharge().to_int();
gtObj.hwD0_ = obj.apD0().to_int();
gtObj.objectType_ = P2GTCandidate::GMTSaDisplacedMuons;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.eta_ = scales_.to_eta(gtObj.hwEta());
- gtObj.z0_ = scales_.to_z0(gtObj.hwZ0());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "GMTSaDisplacedMuons");
}
@@ -272,11 +260,17 @@ namespace l1t {
const TrackerMuonCollection &collection = event.get(gmtTkMuonToken_);
for (size_t i = 0; i < collection.size() && i < 12; i++) {
const TrackerMuon &obj = collection[i];
- P2GTCandidate gtObj;
+ int hwZ0 = obj.apZ0().to_int() << 7;
+ P2GTCandidate gtObj(scales_.to_chg(obj.apCharge().to_int()),
+ reco::ParticleState::PolarLorentzVector(scales_.to_pT(obj.apPt().to_int()),
+ scales_.to_eta(obj.apEta().to_int()),
+ scales_.to_phi(obj.apPhi().to_int()),
+ 0),
+ reco::ParticleState::Point(0, 0, scales_.to_z0(hwZ0)));
gtObj.hwPT_ = obj.apPt().to_int();
gtObj.hwPhi_ = obj.apPhi().to_int();
gtObj.hwEta_ = obj.apEta().to_int();
- gtObj.hwZ0_ = obj.apZ0().to_int() << 7;
+ gtObj.hwZ0_ = hwZ0;
gtObj.hwIso_ = obj.apIso().to_int();
gtObj.hwQual_ = obj.apQual().to_int();
gtObj.hwCharge_ = obj.apCharge().to_int();
@@ -284,12 +278,7 @@ namespace l1t {
gtObj.hwBeta_ = obj.apBeta().to_int();
gtObj.objectType_ = P2GTCandidate::GMTTkMuons;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.eta_ = scales_.to_eta(gtObj.hwEta());
- gtObj.z0_ = scales_.to_z0(gtObj.hwZ0());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "GMTTkMuons");
}
@@ -298,20 +287,21 @@ namespace l1t {
std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
const PFJetCollection &collection = event.get(cl2JetToken_);
for (size_t i = 0; i < collection.size() && i < 12; i++) {
- l1gt::Jet gtJet = collection[i].getHWJetGT();
- P2GTCandidate gtObj;
+ l1gt::Jet gtJet = l1gt::Jet::unpack(collection[i].getHWJetGT());
+ int hwZ0 = gtJet.z0.V.to_int() << 7;
+ P2GTCandidate gtObj(0,
+ reco::ParticleState::PolarLorentzVector(scales_.to_pT(gtJet.v3.pt.V.to_int()),
+ scales_.to_eta(gtJet.v3.eta.V.to_int()),
+ scales_.to_phi(gtJet.v3.phi.V.to_int()),
+ 0),
+ reco::ParticleState::Point(0, 0, scales_.to_z0(hwZ0)));
gtObj.hwPT_ = gtJet.v3.pt.V.to_int();
gtObj.hwPhi_ = gtJet.v3.phi.V.to_int();
gtObj.hwEta_ = gtJet.v3.eta.V.to_int();
- gtObj.hwZ0_ = gtJet.z0.V.to_int() << 7;
+ gtObj.hwZ0_ = hwZ0;
gtObj.objectType_ = P2GTCandidate::CL2Jets;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.eta_ = scales_.to_eta(gtObj.hwEta());
- gtObj.z0_ = scales_.to_z0(gtObj.hwZ0());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "CL2Jets");
}
@@ -321,7 +311,11 @@ namespace l1t {
const TkEmCollection &collection = event.get(cl2PhotonToken_);
for (size_t i = 0; i < collection.size() && i < 12; i++) {
l1gt::Photon gtPhoton = l1gt::Photon::unpack_ap(const_cast<TkEm &>(collection[i]).egBinaryWord<96>());
- P2GTCandidate gtObj;
+ P2GTCandidate gtObj(0,
+ reco::ParticleState::PolarLorentzVector(scales_.to_pT(gtPhoton.v3.pt.V.to_int()),
+ scales_.to_eta(gtPhoton.v3.eta.V.to_int()),
+ scales_.to_phi(gtPhoton.v3.phi.V.to_int()),
+ 0));
gtObj.hwPT_ = gtPhoton.v3.pt.V.to_int();
gtObj.hwPhi_ = gtPhoton.v3.phi.V.to_int();
gtObj.hwEta_ = gtPhoton.v3.eta.V.to_int();
@@ -329,11 +323,7 @@ namespace l1t {
gtObj.hwQual_ = gtPhoton.quality.V.to_int();
gtObj.objectType_ = P2GTCandidate::CL2Photons;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.eta_ = scales_.to_eta(gtObj.hwEta());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "CL2Photons");
}
@@ -343,22 +333,23 @@ namespace l1t {
const TkElectronCollection &collection = event.get(cl2ElectronToken_);
for (size_t i = 0; i < collection.size() && i < 12; i++) {
l1gt::Electron gtElectron = l1gt::Electron::unpack_ap(const_cast<TkElectron &>(collection[i]).egBinaryWord<96>());
- P2GTCandidate gtObj;
+ int hwZ0 = gtElectron.z0.V.to_int() << 7;
+ P2GTCandidate gtObj(scales_.to_chg(gtElectron.charge.V.to_int()),
+ reco::ParticleState::PolarLorentzVector(scales_.to_pT(gtElectron.v3.pt.V.to_int()),
+ scales_.to_eta(gtElectron.v3.eta.V.to_int()),
+ scales_.to_phi(gtElectron.v3.phi.V.to_int()),
+ 0),
+ reco::ParticleState::Point(0, 0, scales_.to_z0(hwZ0)));
gtObj.hwPT_ = gtElectron.v3.pt.V.to_int();
gtObj.hwPhi_ = gtElectron.v3.phi.V.to_int();
gtObj.hwEta_ = gtElectron.v3.eta.V.to_int();
- gtObj.hwZ0_ = gtElectron.z0.V.to_int() << 7;
+ gtObj.hwZ0_ = hwZ0;
gtObj.hwIso_ = gtElectron.isolation.V.to_int();
gtObj.hwQual_ = gtElectron.quality.V.to_int();
gtObj.hwCharge_ = gtElectron.charge.V.to_int();
gtObj.objectType_ = P2GTCandidate::CL2Electrons;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.eta_ = scales_.to_eta(gtObj.hwEta());
- gtObj.z0_ = scales_.to_z0(gtObj.hwZ0());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "CL2Electrons");
}
@@ -367,9 +358,12 @@ namespace l1t {
std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
const PFTauCollection &collection = event.get(cl2TauToken_);
for (size_t i = 0; i < collection.size() && i < 12; i++) {
- // l1gt::Tau gtTau = collection[i].getTauGT();
l1gt::Tau gtTau = collection[i].getHWTauGT();
- P2GTCandidate gtObj;
+ P2GTCandidate gtObj(scales_.to_chg(gtTau.charge.V.to_int()),
+ reco::ParticleState::PolarLorentzVector(scales_.to_pT(gtTau.v3.pt.V.to_int()),
+ scales_.to_eta(gtTau.v3.eta.V.to_int()),
+ scales_.to_phi(gtTau.v3.phi.V.to_int()),
+ 0));
gtObj.hwPT_ = gtTau.v3.pt.V.to_int();
gtObj.hwPhi_ = gtTau.v3.phi.V.to_int();
gtObj.hwEta_ = gtTau.v3.eta.V.to_int();
@@ -380,11 +374,7 @@ namespace l1t {
gtObj.hwIso_ = gtTau.isolation.V.to_int();
gtObj.objectType_ = P2GTCandidate::CL2Taus;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.eta_ = scales_.to_eta(gtObj.hwEta());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
}
event.put(std::move(outputCollection), "CL2Taus");
}
@@ -396,17 +386,15 @@ namespace l1t {
l1gt::Sum sum{true /* valid */, met.pt(), met.phi() / l1gt::Scales::ETAPHI_LSB, 0 /* scalar sum */};
- P2GTCandidate gtObj;
+ P2GTCandidate gtObj(0,
+ reco::ParticleState::PolarLorentzVector(
+ scales_.to_pT(sum.vector_pt.V.to_int()), 0, scales_.to_phi(sum.vector_phi.V.to_int()), 0));
gtObj.hwPT_ = sum.vector_pt.V.to_int();
gtObj.hwPhi_ = sum.vector_phi.V.to_int();
gtObj.hwSca_sum_ = sum.scalar_pt.V.to_int();
gtObj.objectType_ = P2GTCandidate::CL2EtSum;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.sca_sum_ = scales_.to_sca_sum(gtObj.hwSca_sum());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
event.put(std::move(outputCollection), "CL2EtSum");
}
@@ -416,17 +404,14 @@ namespace l1t {
const EtSum &ht = collection[0];
const EtSum &mht = collection[1];
- P2GTCandidate gtObj;
+ P2GTCandidate gtObj(
+ 0, reco::ParticleState::PolarLorentzVector(scales_.to_pT(mht.hwPt()), 0, scales_.to_phi(mht.hwPhi()), 0));
gtObj.hwPT_ = mht.hwPt();
gtObj.hwPhi_ = mht.hwPhi();
gtObj.hwSca_sum_ = ht.hwPt();
gtObj.objectType_ = P2GTCandidate::CL2HtSum;
- gtObj.pT_ = scales_.to_pT(gtObj.hwPT());
- gtObj.phi_ = scales_.to_phi(gtObj.hwPhi());
- gtObj.sca_sum_ = scales_.to_sca_sum(gtObj.hwSca_sum());
-
- outputCollection->push_back(std::move(gtObj));
+ outputCollection->push_back(gtObj);
event.put(std::move(outputCollection), "CL2HtSum");
}
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTQuadObjectCond.cc b/L1Trigger/Phase2L1GT/plugins/L1GTQuadObjectCond.cc
index dbff8f65aa5..994507dac10 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTQuadObjectCond.cc
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTQuadObjectCond.cc
@@ -65,36 +65,18 @@ L1GTQuadObjectCond::L1GTQuadObjectCond(const edm::ParameterSet& config)
collection4Cuts_(config.getParameter<edm::ParameterSet>("collection4"), config, scales_),
enable_sanity_checks_(config.getUntrackedParameter<bool>("sanity_checks")),
inv_mass_checks_(config.getUntrackedParameter<bool>("inv_mass_checks")),
- delta12Cuts_(config.exists("delta12") ? config.getParameter<edm::ParameterSet>("delta12") : edm::ParameterSet(),
- config,
- scales_,
- enable_sanity_checks_,
- inv_mass_checks_),
- delta13Cuts_(config.exists("delta13") ? config.getParameter<edm::ParameterSet>("delta13") : edm::ParameterSet(),
- config,
- scales_,
- enable_sanity_checks_,
- inv_mass_checks_),
- delta23Cuts_(config.exists("delta23") ? config.getParameter<edm::ParameterSet>("delta23") : edm::ParameterSet(),
- config,
- scales_,
- enable_sanity_checks_,
- inv_mass_checks_),
- delta14Cuts_(config.exists("delta14") ? config.getParameter<edm::ParameterSet>("delta14") : edm::ParameterSet(),
- config,
- scales_,
- enable_sanity_checks_,
- inv_mass_checks_),
- delta24Cuts_(config.exists("delta24") ? config.getParameter<edm::ParameterSet>("delta24") : edm::ParameterSet(),
- config,
- scales_,
- enable_sanity_checks_,
- inv_mass_checks_),
- delta34Cuts_(config.exists("delta34") ? config.getParameter<edm::ParameterSet>("delta34") : edm::ParameterSet(),
- config,
- scales_,
- enable_sanity_checks_,
- inv_mass_checks_),
+ delta12Cuts_(
+ config.getParameter<edm::ParameterSet>("delta12"), config, scales_, enable_sanity_checks_, inv_mass_checks_),
+ delta13Cuts_(
+ config.getParameter<edm::ParameterSet>("delta13"), config, scales_, enable_sanity_checks_, inv_mass_checks_),
+ delta23Cuts_(
+ config.getParameter<edm::ParameterSet>("delta23"), config, scales_, enable_sanity_checks_, inv_mass_checks_),
+ delta14Cuts_(
+ config.getParameter<edm::ParameterSet>("delta14"), config, scales_, enable_sanity_checks_, inv_mass_checks_),
+ delta24Cuts_(
+ config.getParameter<edm::ParameterSet>("delta24"), config, scales_, enable_sanity_checks_, inv_mass_checks_),
+ delta34Cuts_(
+ config.getParameter<edm::ParameterSet>("delta34"), config, scales_, enable_sanity_checks_, inv_mass_checks_),
token1_(consumes<P2GTCandidateCollection>(collection1Cuts_.tag())),
token2_(collection1Cuts_.tag() == collection2Cuts_.tag()
? token1_
@@ -135,50 +117,50 @@ void L1GTQuadObjectCond::fillDescriptions(edm::ConfigurationDescriptions& descri
edm::ParameterSetDescription desc;
edm::ParameterSetDescription collection1Desc;
- L1GTSingleCollectionCut::fillDescriptions(collection1Desc);
+ L1GTSingleCollectionCut::fillPSetDescription(collection1Desc);
desc.add<edm::ParameterSetDescription>("collection1", collection1Desc);
edm::ParameterSetDescription collection2Desc;
- L1GTSingleCollectionCut::fillDescriptions(collection2Desc);
+ L1GTSingleCollectionCut::fillPSetDescription(collection2Desc);
desc.add<edm::ParameterSetDescription>("collection2", collection2Desc);
edm::ParameterSetDescription collection3Desc;
- L1GTSingleCollectionCut::fillDescriptions(collection3Desc);
+ L1GTSingleCollectionCut::fillPSetDescription(collection3Desc);
desc.add<edm::ParameterSetDescription>("collection3", collection3Desc);
edm::ParameterSetDescription collection4Desc;
- L1GTSingleCollectionCut::fillDescriptions(collection4Desc);
+ L1GTSingleCollectionCut::fillPSetDescription(collection4Desc);
desc.add<edm::ParameterSetDescription>("collection4", collection4Desc);
edm::ParameterSetDescription scalesDesc;
- L1GTScales::fillDescriptions(scalesDesc);
+ L1GTScales::fillPSetDescription(scalesDesc);
desc.add<edm::ParameterSetDescription>("scales", scalesDesc);
- desc.addUntracked<bool>("sanity_checks");
- desc.addUntracked<bool>("inv_mass_checks");
+ desc.addUntracked<bool>("sanity_checks", false);
+ desc.addUntracked<bool>("inv_mass_checks", false);
edm::ParameterSetDescription delta12Desc;
- L1GTDeltaCut::fillDescriptions(delta12Desc);
+ L1GTDeltaCut::fillPSetDescription(delta12Desc);
desc.add<edm::ParameterSetDescription>("delta12", delta12Desc);
edm::ParameterSetDescription delta13Desc;
- L1GTDeltaCut::fillDescriptions(delta13Desc);
+ L1GTDeltaCut::fillPSetDescription(delta13Desc);
desc.add<edm::ParameterSetDescription>("delta13", delta13Desc);
edm::ParameterSetDescription delta23Desc;
- L1GTDeltaCut::fillDescriptions(delta23Desc);
+ L1GTDeltaCut::fillPSetDescription(delta23Desc);
desc.add<edm::ParameterSetDescription>("delta23", delta23Desc);
edm::ParameterSetDescription delta14Desc;
- L1GTDeltaCut::fillDescriptions(delta14Desc);
+ L1GTDeltaCut::fillPSetDescription(delta14Desc);
desc.add<edm::ParameterSetDescription>("delta14", delta14Desc);
edm::ParameterSetDescription delta24Desc;
- L1GTDeltaCut::fillDescriptions(delta24Desc);
+ L1GTDeltaCut::fillPSetDescription(delta24Desc);
desc.add<edm::ParameterSetDescription>("delta24", delta24Desc);
edm::ParameterSetDescription delta34Desc;
- L1GTDeltaCut::fillDescriptions(delta34Desc);
+ L1GTDeltaCut::fillPSetDescription(delta34Desc);
desc.add<edm::ParameterSetDescription>("delta34", delta34Desc);
L1GTDeltaCut::fillLUTDescriptions(desc);
@@ -313,7 +295,7 @@ bool L1GTQuadObjectCond::filter(edm::StreamID, edm::Event& event, const edm::Eve
}
if (inv_mass_checks_) {
- event.put(std::move(std::make_unique<InvariantMassErrorCollection>(std::move(massErrors))), "");
+ event.put(std::make_unique<InvariantMassErrorCollection>(std::move(massErrors)), "");
}
return condition_result;
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTSingleCollectionCut.h b/L1Trigger/Phase2L1GT/plugins/L1GTSingleCollectionCut.h
index 3e88e7b3af1..04663436434 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTSingleCollectionCut.h
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTSingleCollectionCut.h
@@ -9,11 +9,23 @@
#include "L1GTOptionalParam.h"
-#include <algorithm>
+#include <functional>
#include <optional>
namespace l1t {
+ template <typename T, typename K>
+ inline std::vector<T> getParamVector(const std::string& name,
+ const edm::ParameterSet& config,
+ std::function<T(K)> conv) {
+ const std::vector<K>& values = config.getParameter<std::vector<K>>(name);
+ std::vector<T> convertedValues(values.size());
+ for (std::size_t i = 0; i < values.size(); i++) {
+ convertedValues[i] = conv(values[i]);
+ }
+ return convertedValues;
+ }
+
class L1GTSingleCollectionCut {
public:
L1GTSingleCollectionCut(const edm::ParameterSet& config,
@@ -22,41 +34,40 @@ namespace l1t {
: scales_(scales),
tag_(config.getParameter<edm::InputTag>("tag")),
minPt_(getOptionalParam<int, double>(
- "minPt", config, std::bind(&L1GTScales::to_hw_pT, scales, std::placeholders::_1))),
+ "minPt", config, [&scales](double value) { return scales.to_hw_pT(value); })),
maxPt_(getOptionalParam<int, double>(
- "maxPt", config, std::bind(&L1GTScales::to_hw_pT, scales, std::placeholders::_1))),
+ "maxPt", config, [&scales](double value) { return scales.to_hw_pT(value); })),
minEta_(getOptionalParam<int, double>(
- "minEta", config, std::bind(&L1GTScales::to_hw_eta, scales, std::placeholders::_1))),
+ "minEta", config, [&scales](double value) { return scales.to_hw_eta(value); })),
maxEta_(getOptionalParam<int, double>(
- "maxEta", config, std::bind(&L1GTScales::to_hw_eta, scales, std::placeholders::_1))),
+ "maxEta", config, [&scales](double value) { return scales.to_hw_eta(value); })),
minPhi_(getOptionalParam<int, double>(
- "minPhi", config, std::bind(&L1GTScales::to_hw_phi, scales, std::placeholders::_1))),
+ "minPhi", config, [&scales](double value) { return scales.to_hw_phi(value); })),
maxPhi_(getOptionalParam<int, double>(
- "maxPhi", config, std::bind(&L1GTScales::to_hw_phi, scales, std::placeholders::_1))),
+ "maxPhi", config, [&scales](double value) { return scales.to_hw_phi(value); })),
minZ0_(getOptionalParam<int, double>(
- "minZ0", config, std::bind(&L1GTScales::to_hw_z0, scales, std::placeholders::_1))),
+ "minZ0", config, [&scales](double value) { return scales.to_hw_z0(value); })),
maxZ0_(getOptionalParam<int, double>(
- "maxZ0", config, std::bind(&L1GTScales::to_hw_z0, scales, std::placeholders::_1))),
+ "maxZ0", config, [&scales](double value) { return scales.to_hw_z0(value); })),
minScalarSumPt_(getOptionalParam<int, double>(
- "minScalarSumPt", config, std::bind(&L1GTScales::to_hw_pT, scales, std::placeholders::_1))),
- qual_(config.exists("qual") ? config.getParameter<std::vector<unsigned int>>("qual")
- : std::vector<unsigned int>()),
- minEtaAbs_(getOptionalParam<int, double>(
- "minEtaAbs", config, std::bind(&L1GTScales::to_hw_eta, scales, std::placeholders::_1))),
- maxEtaAbs_(getOptionalParam<int, double>(
- "maxEtaAbs", config, std::bind(&L1GTScales::to_hw_eta, scales, std::placeholders::_1))),
+ "minScalarSumPt", config, [&scales](double value) { return scales.to_hw_pT(value); })),
+ maxScalarSumPt_(getOptionalParam<int, double>(
+ "maxScalarSumPt", config, [&scales](double value) { return scales.to_hw_pT(value); })),
+ qual_(config.getParameter<std::vector<unsigned int>>("qual")),
+ minAbsEta_(getOptionalParam<int, double>(
+ "minAbsEta", config, [&scales](double value) { return scales.to_hw_eta(value); })),
+ maxAbsEta_(getOptionalParam<int, double>(
+ "maxAbsEta", config, [&scales](double value) { return scales.to_hw_eta(value); })),
maxIso_(getOptionalParam<int, double>(
- "maxIso", config, std::bind(&L1GTScales::to_hw_isolation, scales, std::placeholders::_1))),
+ "maxIso", config, [&scales](double value) { return scales.to_hw_isolation(value); })),
minHwIso_(getOptionalParam<int>("minHwIso", config)),
- regionsAbsEtaLowerBounds_(config.exists("regionsAbsEtaLowerBounds")
- ? config.getParameter<std::vector<double>>("regionsAbsEtaLowerBounds")
- : std::vector<double>()),
+ regionsAbsEtaLowerBounds_(getParamVector<int, double>(
+ "regionsAbsEtaLowerBounds", config, [&scales](double value) { return scales.to_hw_eta(value); })),
regionsMinPt_(getParamVector<int, double>(
- "regionsMinPt", config, std::bind(&L1GTScales::to_hw_pT, scales, std::placeholders::_1))),
+ "regionsMinPt", config, [&scales](double value) { return scales.to_hw_pT(value); })),
regionsMaxIso_(getParamVector<int, double>(
- "regionsMaxIso", config, std::bind(&L1GTScales::to_hw_isolation, scales, std::placeholders::_1))),
- regionsQual_(config.exists("regionsQual") ? config.getParameter<std::vector<unsigned int>>("regionsQual")
- : std::vector<unsigned int>()) {}
+ "regionsMaxIso", config, [&scales](double value) { return scales.to_hw_isolation(value); })),
+ regionsQual_(config.getParameter<std::vector<unsigned int>>("regionsQual")) {}
bool checkEtadependentcuts(const P2GTCandidate& obj) const {
bool res = true;
@@ -76,8 +87,7 @@ namespace l1t {
// If object abs(eta) < regionsAbsEtaLowerBounds_[0] the function returns the last index,
// Might be undesired behaviour
for (unsigned int i = 0; i < regionsAbsEtaLowerBounds_.size() - 1; i++) {
- if (std::abs(objeta) >= scales_.to_hw_eta(regionsAbsEtaLowerBounds_[i]) &&
- std::abs(objeta) < scales_.to_hw_eta(regionsAbsEtaLowerBounds_[i + 1])) {
+ if (std::abs(objeta) >= regionsAbsEtaLowerBounds_[i] && std::abs(objeta) < regionsAbsEtaLowerBounds_[i + 1]) {
return i;
}
}
@@ -99,10 +109,11 @@ namespace l1t {
result &= minZ0_ ? (obj.hwZ0() > minZ0_) : true;
result &= maxZ0_ ? (obj.hwZ0() < maxZ0_) : true;
- result &= minEtaAbs_ ? (abs(obj.hwEta()) > minEtaAbs_) : true;
- result &= maxEtaAbs_ ? (abs(obj.hwEta()) < maxEtaAbs_) : true;
+ result &= minAbsEta_ ? (abs(obj.hwEta()) > minAbsEta_) : true;
+ result &= maxAbsEta_ ? (abs(obj.hwEta()) < maxAbsEta_) : true;
result &= minScalarSumPt_ ? (obj.hwSca_sum() > minScalarSumPt_) : true;
+ result &= maxScalarSumPt_ ? (obj.hwSca_sum() < minScalarSumPt_) : true;
result &= qual_.empty() ? true : std::find(qual_.begin(), qual_.end(), obj.hwQual().to_uint()) != qual_.end();
result &=
@@ -113,7 +124,7 @@ namespace l1t {
return result;
}
- static void fillDescriptions(edm::ParameterSetDescription& desc) {
+ static void fillPSetDescription(edm::ParameterSetDescription& desc) {
desc.add<edm::InputTag>("tag");
desc.addOptional<double>("minPt");
desc.addOptional<double>("maxPt");
@@ -124,15 +135,16 @@ namespace l1t {
desc.addOptional<double>("minZ0");
desc.addOptional<double>("maxZ0");
desc.addOptional<double>("minScalarSumPt");
- desc.addOptional<std::vector<unsigned int>>("qual");
- desc.addOptional<double>("minEtaAbs");
- desc.addOptional<double>("maxEtaAbs");
+ desc.addOptional<double>("maxScalarSumPt");
+ desc.add<std::vector<unsigned int>>("qual", {});
+ desc.addOptional<double>("minAbsEta");
+ desc.addOptional<double>("maxAbsEta");
desc.addOptional<double>("maxIso");
desc.addOptional<int>("minHwIso");
- desc.addOptional<std::vector<double>>("regionsAbsEtaLowerBounds");
- desc.addOptional<std::vector<double>>("regionsMinPt");
- desc.addOptional<std::vector<double>>("regionsMaxIso");
- desc.addOptional<std::vector<unsigned int>>("regionsQual");
+ desc.add<std::vector<double>>("regionsAbsEtaLowerBounds", {});
+ desc.add<std::vector<double>>("regionsMinPt", {});
+ desc.add<std::vector<double>>("regionsMaxIso", {});
+ desc.add<std::vector<unsigned int>>("regionsQual", {});
}
const edm::InputTag& tag() const { return tag_; }
@@ -149,12 +161,13 @@ namespace l1t {
const std::optional<int> minZ0_;
const std::optional<int> maxZ0_;
const std::optional<int> minScalarSumPt_;
+ const std::optional<int> maxScalarSumPt_;
const std::vector<unsigned int> qual_;
- const std::optional<int> minEtaAbs_;
- const std::optional<int> maxEtaAbs_;
+ const std::optional<int> minAbsEta_;
+ const std::optional<int> maxAbsEta_;
const std::optional<int> maxIso_;
const std::optional<int> minHwIso_;
- const std::vector<double> regionsAbsEtaLowerBounds_;
+ const std::vector<int> regionsAbsEtaLowerBounds_;
const std::vector<int> regionsMinPt_;
const std::vector<int> regionsMaxIso_;
const std::vector<unsigned int> regionsQual_;
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTSingleObjectCond.cc b/L1Trigger/Phase2L1GT/plugins/L1GTSingleObjectCond.cc
index d0d1671a612..a89c6af56e6 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTSingleObjectCond.cc
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTSingleObjectCond.cc
@@ -45,10 +45,10 @@ L1GTSingleObjectCond::L1GTSingleObjectCond(const edm::ParameterSet& config)
void L1GTSingleObjectCond::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
- L1GTSingleCollectionCut::fillDescriptions(desc);
+ L1GTSingleCollectionCut::fillPSetDescription(desc);
edm::ParameterSetDescription scalesDesc;
- L1GTScales::fillDescriptions(scalesDesc);
+ L1GTScales::fillPSetDescription(scalesDesc);
desc.add<edm::ParameterSetDescription>("scales", scalesDesc);
descriptions.addWithDefaultLabel(desc);
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTTripleObjectCond.cc b/L1Trigger/Phase2L1GT/plugins/L1GTTripleObjectCond.cc
index 201501f3ebd..1e36748272e 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/plugins/L1GTTripleObjectCond.cc
+++ b/L1Trigger/Phase2L1GT/plugins/L1GTTripleObjectCond.cc
@@ -57,21 +57,12 @@ L1GTTripleObjectCond::L1GTTripleObjectCond(const edm::ParameterSet& config)
collection3Cuts_(config.getParameter<edm::ParameterSet>("collection3"), config, scales_),
enable_sanity_checks_(config.getUntrackedParameter<bool>("sanity_checks")),
inv_mass_checks_(config.getUntrackedParameter<bool>("inv_mass_checks")),
- delta12Cuts_(config.exists("delta12") ? config.getParameter<edm::ParameterSet>("delta12") : edm::ParameterSet(),
- config,
- scales_,
- enable_sanity_checks_,
- inv_mass_checks_),
- delta13Cuts_(config.exists("delta13") ? config.getParameter<edm::ParameterSet>("delta13") : edm::ParameterSet(),
- config,
- scales_,
- enable_sanity_checks_,
- inv_mass_checks_),
- delta23Cuts_(config.exists("delta23") ? config.getParameter<edm::ParameterSet>("delta23") : edm::ParameterSet(),
- config,
- scales_,
- enable_sanity_checks_,
- inv_mass_checks_),
+ delta12Cuts_(
+ config.getParameter<edm::ParameterSet>("delta12"), config, scales_, enable_sanity_checks_, inv_mass_checks_),
+ delta13Cuts_(
+ config.getParameter<edm::ParameterSet>("delta13"), config, scales_, enable_sanity_checks_, inv_mass_checks_),
+ delta23Cuts_(
+ config.getParameter<edm::ParameterSet>("delta23"), config, scales_, enable_sanity_checks_, inv_mass_checks_),
token1_(consumes<P2GTCandidateCollection>(collection1Cuts_.tag())),
token2_(collection1Cuts_.tag() == collection2Cuts_.tag()
? token1_
@@ -100,34 +91,34 @@ void L1GTTripleObjectCond::fillDescriptions(edm::ConfigurationDescriptions& desc
edm::ParameterSetDescription desc;
edm::ParameterSetDescription collection1Desc;
- L1GTSingleCollectionCut::fillDescriptions(collection1Desc);
+ L1GTSingleCollectionCut::fillPSetDescription(collection1Desc);
desc.add<edm::ParameterSetDescription>("collection1", collection1Desc);
edm::ParameterSetDescription collection2Desc;
- L1GTSingleCollectionCut::fillDescriptions(collection2Desc);
+ L1GTSingleCollectionCut::fillPSetDescription(collection2Desc);
desc.add<edm::ParameterSetDescription>("collection2", collection2Desc);
edm::ParameterSetDescription collection3Desc;
- L1GTSingleCollectionCut::fillDescriptions(collection3Desc);
+ L1GTSingleCollectionCut::fillPSetDescription(collection3Desc);
desc.add<edm::ParameterSetDescription>("collection3", collection3Desc);
edm::ParameterSetDescription scalesDesc;
- L1GTScales::fillDescriptions(scalesDesc);
+ L1GTScales::fillPSetDescription(scalesDesc);
desc.add<edm::ParameterSetDescription>("scales", scalesDesc);
- desc.addUntracked<bool>("sanity_checks");
- desc.addUntracked<bool>("inv_mass_checks");
+ desc.addUntracked<bool>("sanity_checks", false);
+ desc.addUntracked<bool>("inv_mass_checks", false);
edm::ParameterSetDescription delta12Desc;
- L1GTDeltaCut::fillDescriptions(delta12Desc);
+ L1GTDeltaCut::fillPSetDescription(delta12Desc);
desc.add<edm::ParameterSetDescription>("delta12", delta12Desc);
edm::ParameterSetDescription delta13Desc;
- L1GTDeltaCut::fillDescriptions(delta13Desc);
+ L1GTDeltaCut::fillPSetDescription(delta13Desc);
desc.add<edm::ParameterSetDescription>("delta13", delta13Desc);
edm::ParameterSetDescription delta23Desc;
- L1GTDeltaCut::fillDescriptions(delta23Desc);
+ L1GTDeltaCut::fillPSetDescription(delta23Desc);
desc.add<edm::ParameterSetDescription>("delta23", delta23Desc);
L1GTDeltaCut::fillLUTDescriptions(desc);
@@ -223,7 +214,7 @@ bool L1GTTripleObjectCond::filter(edm::StreamID, edm::Event& event, const edm::E
}
if (inv_mass_checks_) {
- event.put(std::move(std::make_unique<InvariantMassErrorCollection>(std::move(massErrors))), "");
+ event.put(std::make_unique<InvariantMassErrorCollection>(std::move(massErrors)), "");
}
return condition_result;
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTAlgoBlockProducer_cff.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTAlgoBlockProducer_cff.cpython-39.pyc
index e29b0333b6b..3b745af5049 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTAlgoBlockProducer_cff.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTAlgoBlockProducer_cff.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTDoubleObjectCond_cfi.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTDoubleObjectCond_cfi.cpython-39.pyc
index aa902fde819..59e678d5b42 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTDoubleObjectCond_cfi.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTDoubleObjectCond_cfi.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_cff.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_cff.cpython-39.pyc
index dd8b4baee18..60c16d44bf7 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_cff.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_cff.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_hadr_metSeeds_cff.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_hadr_metSeeds_cff.cpython-39.pyc
index 3ca08aa0952..6f747b30d97 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_hadr_metSeeds_cff.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_hadr_metSeeds_cff.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_lepSeeds_cff.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_lepSeeds_cff.cpython-39.pyc
index bb1ceaad197..845d419d7a3 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_lepSeeds_cff.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTMenu_lepSeeds_cff.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTProducer_cff.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTProducer_cff.cpython-39.pyc
index 764ae403869..73c1e8396c8 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTProducer_cff.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTProducer_cff.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTQuadObjectCond_cfi.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTQuadObjectCond_cfi.cpython-39.pyc
index 76954d8a7e2..14352aa7c3b 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTQuadObjectCond_cfi.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTQuadObjectCond_cfi.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTScales.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTScales.cpython-39.pyc
index 7fe6a5d7c9d..948d9b36bba 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTScales.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTScales.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTSingleInOutLUT.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTSingleInOutLUT.cpython-39.pyc
index 4f586cd4839..0aaac762516 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTSingleInOutLUT.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTSingleInOutLUT.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTSingleObjectCond_cfi.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTSingleObjectCond_cfi.cpython-39.pyc
index 705eddd60c5..f46b1fce940 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTSingleObjectCond_cfi.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTSingleObjectCond_cfi.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTTripleObjectCond_cfi.cpython-39.pyc b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTTripleObjectCond_cfi.cpython-39.pyc
index 7893e20dee5..0901e2394f9 100644
Binary files a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTTripleObjectCond_cfi.cpython-39.pyc and b/L1Trigger/Phase2L1GT/python/__pycache__/l1tGTTripleObjectCond_cfi.cpython-39.pyc differ
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/l1tGTAlgoBlockProducer_cff.py b/L1Trigger/Phase2L1GT/python/l1tGTAlgoBlockProducer_cff.py
index ea8258553c6..df8bbb732ec 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/l1tGTAlgoBlockProducer_cff.py
+++ b/L1Trigger/Phase2L1GT/python/l1tGTAlgoBlockProducer_cff.py
@@ -8,7 +8,7 @@ l1tGTAlgoBlockProducer = cms.EDProducer(
algorithms = algorithms
)
-def collectAlgorithmPaths(process) -> tuple[cms.Path]:
+def collectAlgorithmPaths(process) -> "tuple[cms.Path]":
str_paths = set()
for algorithm in algorithms:
algo_paths = re.sub(r'[()]'," " , algorithm.expression.value()).split()
@@ -21,7 +21,3 @@ def collectAlgorithmPaths(process) -> tuple[cms.Path]:
paths.add(getattr(process, str_path))
return tuple(paths)
-
-l1tGTAlgoBlockProducerSequence = cms.Sequence(
- l1tGTAlgoBlockProducer
-)
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/l1tGTProducer_cff.py b/L1Trigger/Phase2L1GT/python/l1tGTProducer_cff.py
index d164a527d09..e0ce27cc0fb 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/python/l1tGTProducer_cff.py
+++ b/L1Trigger/Phase2L1GT/python/l1tGTProducer_cff.py
@@ -17,8 +17,3 @@ l1tGTProducer = cms.EDProducer(
CL2EtSum = cms.InputTag("l1tMETPFProducer"),
CL2HtSum = cms.InputTag("l1tSCPFL1PuppiCorrectedEmulatorMHT")
)
-
-l1tGTProducerSequence = cms.Sequence(
- l1tGTProducer
-)
-
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/src/L1GTScales.cc b/L1Trigger/Phase2L1GT/src/L1GTScales.cc
index 47a021206f0..1c9050fa4c0 100644
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/src/L1GTScales.cc
+++ b/L1Trigger/Phase2L1GT/src/L1GTScales.cc
@@ -52,7 +52,7 @@ namespace l1t {
pos_chg_(config.getParameter<int>("pos_chg")),
neg_chg_(config.getParameter<int>("neg_chg")) {}
- void L1GTScales::fillDescriptions(edm::ParameterSetDescription& desc) {
+ void L1GTScales::fillPSetDescription(edm::ParameterSetDescription& desc) {
desc.add<double>("pT_lsb");
desc.add<double>("phi_lsb");
desc.add<double>("eta_lsb");
diff --git a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/test/menu_analyzer.py b/L1Trigger/Phase2L1GT/test/menu_analyzer.py
index a5960809310..95ee25e84e5 100755
--- a/afs/cern.ch/user/a/alobanov/work/L1T/phase2/menu/13X/6Jul_Snap3_wNtupler_PR/CMSSW_13_1_0/src/L1Trigger/Phase2L1GT/test/menu_analyzer.py
+++ b/L1Trigger/Phase2L1GT/test/menu_analyzer.py
@@ -70,14 +70,14 @@ if __name__ == "__main__":
for obj in algo_blk.trigObjects():
if object_name(obj.objectType()) in ["CL2Electron", "CL2Photon"]:
print(" {}: pt {:3.1f} eta {:3.2f} phi {:3.2f} iso: {:3.2f} relIso: {:3.2f}".format(
- object_name(obj.objectType()), obj.pT(), obj.eta(), obj.phi(),
+ object_name(obj.objectType()), obj.pt(), obj.eta(), obj.phi(),
obj.hwIso() * scale_parameter.isolation_lsb.value(),
obj.hwIso() * scale_parameter.isolation_lsb.value()/(obj.hwPT() * scale_parameter.pT_lsb.value())))
elif "Sum" not in object_name(obj.objectType()):
print(" {}: pt {:3.1f} eta {:3.2f} phi {:3.2f}".format(
- object_name(obj.objectType()), obj.pT(), obj.eta(), obj.phi()))
+ object_name(obj.objectType()), obj.pt(), obj.eta(), obj.phi()))
else:
print(" {}: pt {:3.1f} phi {:3.2f}".format(
- object_name(obj.objectType()), obj.pT(), obj.phi()))
+ object_name(obj.objectType()), obj.pt(), obj.phi()))
print('*' * 80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment