58 std::vector<edm::EDGetTokenT<l1t::PFClusterCollection>>
emCands_;
59 std::vector<edm::EDGetTokenT<l1t::PFClusterCollection>>
hadCands_;
88 debug_(iConfig.getUntrackedParameter<
int>(
"debug", 0)),
89 useStandaloneMuons_(iConfig.getParameter<
bool>(
"useStandaloneMuons")),
90 useTrackerMuons_(iConfig.getParameter<
bool>(
"useTrackerMuons")),
94 trkPt_(iConfig.getParameter<double>(
"trkPtCut")),
95 trkMaxChi2_(iConfig.getParameter<double>(
"trkMaxChi2")),
96 trkMinStubs_(iConfig.getParameter<unsigned>(
"trkMinStubs")),
99 emPtCut_(iConfig.getParameter<double>(
"emPtCut")),
100 hadPtCut_(iConfig.getParameter<double>(
"hadPtCut")),
104 regionDumpName_(iConfig.getUntrackedParameter<
std::
string>(
"dumpFileName",
"")),
105 regionCOEName_(iConfig.getUntrackedParameter<
std::
string>(
"coeFileName",
"")),
106 fRegionDump_(nullptr),
107 fRegionCOE_(nullptr),
108 neventscoemax_(iConfig.getUntrackedParameter<unsigned
int>(
"neventscoemax_", 0)),
110 debugEta_(iConfig.getUntrackedParameter<double>(
"debugEta", 0)),
111 debugPhi_(iConfig.getUntrackedParameter<double>(
"debugPhi", 0)),
112 debugR_(iConfig.getUntrackedParameter<double>(
"debugR", -1)) {
113 produces<l1t::PFCandidateCollection>(
"PF");
114 produces<l1t::PFCandidateCollection>(
"Puppi");
116 produces<l1t::PFCandidateCollection>(
"EmCalo");
117 produces<l1t::PFCandidateCollection>(
"Calo");
118 produces<l1t::PFCandidateCollection>(
"TK");
119 produces<l1t::PFCandidateCollection>(
"TKVtx");
121 produces<float>(
"z0");
123 for (
const auto&
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"emClusters")) {
124 emCands_.push_back(consumes<l1t::PFClusterCollection>(
tag));
126 for (
const auto&
tag : iConfig.
getParameter<std::vector<edm::InputTag>>(
"hadClusters")) {
127 hadCands_.push_back(consumes<l1t::PFClusterCollection>(
tag));
131 if (
algo ==
"PFAlgo3") {
132 l1pfalgo_ = std::make_unique<l1tpf_impl::PFAlgo3>(iConfig);
133 }
else if (
algo ==
"PFAlgo2HGC") {
134 l1pfalgo_ = std::make_unique<l1tpf_impl::PFAlgo2HGC>(iConfig);
135 }
else if (
algo ==
"BitwisePFAlgo") {
136 l1pfalgo_ = std::make_unique<l1tpf_impl::BitwisePFAlgo>(iConfig);
141 if (pualgo ==
"Puppi") {
142 l1pualgo_ = std::make_unique<l1tpf_impl::PuppiAlgo>(iConfig);
143 }
else if (pualgo ==
"LinearizedPuppi") {
144 l1pualgo_ = std::make_unique<l1tpf_impl::LinearizedPuppiAlgo>(iConfig);
153 else if (
vtxAlgo ==
"external") {
164 produces<float>(
label);
170 for (
int tot = 0; tot <= 1; ++tot) {
203 <<
"Job running with multiple streams, but dump file will have only events on stream zero.";
211 <<
"Job running with multiple streams, but COE file will dump only events on stream zero.";
225 const auto&
tracks = *htracks;
226 for (
unsigned int itk = 0, ntk =
tracks.size(); itk < ntk; ++itk) {
227 const auto& tk =
tracks[itk];
242 "setting useStandaloneMuons=True && useTrackerMuons=True is not to be done, as it would duplicate all muons\n");
248 for (
auto it =
muons->begin(0), ed =
muons->end(0); it != ed; ++it) {
259 for (
auto it =
muons->begin(), ed =
muons->end(); it != ed; ++it) {
271 const auto& calos = *caloHandle;
272 for (
unsigned int ic = 0, nc = calos.size(); ic < nc; ++ic) {
273 const auto&
calo = calos[ic];
282 const auto& calos = *caloHandle;
283 for (
unsigned int ic = 0, nc = calos.size(); ic < nc; ++ic) {
284 const auto&
calo = calos[ic];
322 if (ptsum == 0 ||
vtx.sum() > ptsum) {
328 throw cms::Exception(
"LogicError",
"Inconsistent vertex configuration");
331 iEvent.put(std::make_unique<float>(
z0),
"z0");
337 float genZ = genOrigin.Z();
353 std::vector<float> puGlobals;
355 const std::vector<std::string>& puGlobalNames =
l1pualgo_->puGlobalNames();
356 if (puGlobals.size() != puGlobalNames.size())
357 throw cms::Exception(
"LogicError",
"Mismatch in the number of global pileup inputs");
358 for (
unsigned int i = 0,
n = puGlobalNames.size();
i <
n; ++
i) {
359 iEvent.put(std::make_unique<float>(puGlobals[
i]), puGlobalNames[
i]);
367 l1pualgo_->runNeutralsPU(l1region, -1., puGlobals);
396 iEvent.put(std::make_unique<unsigned>(
value), iLabel);