34 bxMin_(iConfig.getParameter<
int>(
"bxMin")),
35 bxMax_(iConfig.getParameter<
int>(
"bxMax")) {
36 produces<L1GctEmCandCollection>(
"isoEm");
37 produces<L1GctEmCandCollection>(
"nonIsoEm");
38 produces<L1GctJetCandCollection>(
"cenJets");
39 produces<L1GctJetCandCollection>(
"forJets");
40 produces<L1GctJetCandCollection>(
"tauJets");
41 produces<L1GctJetCandCollection>(
"isoTauJets");
42 produces<L1GctInternJetDataCollection>();
43 produces<L1GctEtTotalCollection>();
44 produces<L1GctEtHadCollection>();
45 produces<L1GctEtMissCollection>();
46 produces<L1GctHtMissCollection>();
47 produces<L1GctInternEtSumCollection>();
48 produces<L1GctInternHtMissCollection>();
49 produces<L1GctHFBitCountsCollection>();
50 produces<L1GctHFRingEtSumsCollection>();
55 LogDebug(
"l1t|stage 1 Converter") <<
"L1TCaloUpgradeToGCTConverter::produce function called...\n";
59 e.getByToken(EGammaToken_,
EGamma);
62 e.getByToken(RlxTauToken_, RlxTau);
65 e.getByToken(IsoTauToken_,
IsoTau);
68 e.getByToken(JetToken_,
Jet);
71 e.getByToken(EtSumToken_,
EtSum);
74 e.getByToken(HfSumsToken_, HfSums);
77 e.getByToken(HfCountsToken_, HfCounts);
104 for (
int itBX =
EGamma->getFirstBX(); itBX <=
EGamma->getLastBX(); ++itBX) {
116 bool iso = itEGamma->hwIso();
118 L1GctEmCand EmCand(itEGamma->hwPt(), itEGamma->hwPhi(), itEGamma->hwEta(), iso, 0, 0, itBX);
124 isoEmResult->push_back(EmCand);
128 if (nonIsoCount != 4) {
129 nonIsoEmResult->push_back(EmCand);
134 isoEmResult->resize(4 * bxCounter);
135 nonIsoEmResult->resize(4 * bxCounter);
150 const bool forward =
false;
152 L1GctJetCand TauCand(itTau->hwPt(), itTau->hwPhi(), itTau->hwEta(),
true, forward, 0, 0, itBX);
156 tauJetResult->push_back(TauCand);
160 tauJetResult->resize(4 * bxCounter);
164 for (
int itBX =
IsoTau->getFirstBX(); itBX <=
IsoTau->getLastBX(); ++itBX) {
175 const bool forward =
false;
177 L1GctJetCand TauCand(itTau->hwPt(), itTau->hwPhi(), itTau->hwEta(),
true, forward, 0, 0, itBX);
180 if (isoTauCount != 4) {
181 isoTauJetResult->push_back(TauCand);
185 isoTauJetResult->resize(4 * bxCounter);
189 for (
int itBX =
Jet->getFirstBX(); itBX <=
Jet->getLastBX(); ++itBX) {
201 const bool forward = ((itJet->hwQual() & 0x2) != 0);
202 L1GctJetCand JetCand(itJet->hwPt(), itJet->hwPhi(), itJet->hwEta(),
false, forward, 0, 0, itBX);
207 forJetResult->push_back(JetCand);
212 cenJetResult->push_back(JetCand);
217 forJetResult->resize(4 * bxCounter);
218 cenJetResult->resize(4 * bxCounter);
222 for (
int itBX =
EtSum->getFirstBX(); itBX <=
EtSum->getLastBX(); ++itBX) {
232 L1GctEtMiss Cand(itEtSum->hwPt(), itEtSum->hwPhi(), itEtSum->hwQual() & 0x1, itBX);
233 etMissResult->push_back(Cand);
235 L1GctHtMiss Cand(itEtSum->hwPt(), itEtSum->hwPhi(), itEtSum->hwQual() & 0x1, itBX);
236 htMissResult->push_back(Cand);
238 L1GctEtTotal Cand(itEtSum->hwPt(), itEtSum->hwQual() & 0x1, itBX);
239 etTotResult->push_back(Cand);
241 L1GctEtHad Cand(itEtSum->hwPt(), itEtSum->hwQual() & 0x1, itBX);
242 etHadResult->push_back(Cand);
244 LogError(
"l1t|stage 1 Converter") <<
" Unknown EtSumType --- EtSum collection will not be saved...\n ";
247 etMissResult->resize(1 * bxCounter);
248 htMissResult->resize(1 * bxCounter);
249 etTotResult->resize(1 * bxCounter);
250 etHadResult->resize(1 * bxCounter);
277 for (
int i = 0;
i < 4;
i++) {
281 hfRingEtSumResult->push_back(sum);
283 hfRingEtSumResult->resize(1 * bxCounter);
297 for (
int i = 0;
i < 4;
i++) {
298 count.setBitCount(
i, itCaloSpare->GetRing(
i));
301 hfBitCountResult->push_back(
count);
302 hfBitCountResult->resize(1 * bxCounter);
310 e.put(
std::move(isoTauJetResult),
"isoTauJets");
326 desc.
add<
int>(
"bxMin", 0);
327 desc.
add<
int>(
"bxMax", 0);
333 descriptions.
add(
"L1TCaloUpgradeToGCTConverter", desc);