33 bxMin_(iConfig.getParameter<int>(
"bxMin")),
34 bxMax_(iConfig.getParameter<int>(
"bxMax")) {
35 produces<L1GctEmCandCollection>(
"isoEm");
36 produces<L1GctEmCandCollection>(
"nonIsoEm");
37 produces<L1GctJetCandCollection>(
"cenJets");
38 produces<L1GctJetCandCollection>(
"forJets");
39 produces<L1GctJetCandCollection>(
"tauJets");
40 produces<L1GctJetCandCollection>(
"isoTauJets");
41 produces<L1GctInternJetDataCollection>();
42 produces<L1GctEtTotalCollection>();
43 produces<L1GctEtHadCollection>();
44 produces<L1GctEtMissCollection>();
45 produces<L1GctHtMissCollection>();
46 produces<L1GctInternEtSumCollection>();
47 produces<L1GctInternHtMissCollection>();
48 produces<L1GctHFBitCountsCollection>();
49 produces<L1GctHFRingEtSumsCollection>();
54 LogDebug(
"l1t|stage 1 Converter") <<
"L1TCaloUpgradeToGCTConverter::produce function called...\n";
103 for (
int itBX = EGamma->getFirstBX(); itBX <= EGamma->getLastBX(); ++itBX) {
115 bool iso = itEGamma->hwIso();
117 L1GctEmCand EmCand(itEGamma->hwPt(), itEGamma->hwPhi(), itEGamma->hwEta(), iso, 0, 0, itBX);
123 isoEmResult->push_back(EmCand);
127 if (nonIsoCount != 4) {
128 nonIsoEmResult->push_back(EmCand);
133 isoEmResult->resize(4 * bxCounter);
134 nonIsoEmResult->resize(4 * bxCounter);
138 for (
int itBX = RlxTau->getFirstBX(); itBX <= RlxTau->getLastBX(); ++itBX) {
149 const bool forward =
false;
151 L1GctJetCand TauCand(itTau->hwPt(), itTau->hwPhi(), itTau->hwEta(),
true, forward, 0, 0, itBX);
155 tauJetResult->push_back(TauCand);
159 tauJetResult->resize(4 * bxCounter);
163 for (
int itBX = IsoTau->getFirstBX(); itBX <= IsoTau->getLastBX(); ++itBX) {
174 const bool forward =
false;
176 L1GctJetCand TauCand(itTau->hwPt(), itTau->hwPhi(), itTau->hwEta(),
true, forward, 0, 0, itBX);
179 if (isoTauCount != 4) {
180 isoTauJetResult->push_back(TauCand);
184 isoTauJetResult->resize(4 * bxCounter);
188 for (
int itBX = Jet->getFirstBX(); itBX <= Jet->getLastBX(); ++itBX) {
200 const bool forward = ((itJet->hwQual() & 0x2) != 0);
201 L1GctJetCand JetCand(itJet->hwPt(), itJet->hwPhi(), itJet->hwEta(),
false, forward, 0, 0, itBX);
206 forJetResult->push_back(JetCand);
211 cenJetResult->push_back(JetCand);
216 forJetResult->resize(4 * bxCounter);
217 cenJetResult->resize(4 * bxCounter);
221 for (
int itBX = EtSum->getFirstBX(); itBX <= EtSum->getLastBX(); ++itBX) {
231 L1GctEtMiss Cand(itEtSum->hwPt(), itEtSum->hwPhi(), itEtSum->hwQual() & 0x1, itBX);
232 etMissResult->push_back(Cand);
234 L1GctHtMiss Cand(itEtSum->hwPt(), itEtSum->hwPhi(), itEtSum->hwQual() & 0x1, itBX);
235 htMissResult->push_back(Cand);
237 L1GctEtTotal Cand(itEtSum->hwPt(), itEtSum->hwQual() & 0x1, itBX);
238 etTotResult->push_back(Cand);
240 L1GctEtHad Cand(itEtSum->hwPt(), itEtSum->hwQual() & 0x1, itBX);
241 etHadResult->push_back(Cand);
243 LogError(
"l1t|stage 1 Converter") <<
" Unknown EtSumType --- EtSum collection will not be saved...\n ";
246 etMissResult->resize(1 * bxCounter);
247 htMissResult->resize(1 * bxCounter);
248 etTotResult->resize(1 * bxCounter);
249 etHadResult->resize(1 * bxCounter);
253 for (
int itBX = HfSums->getFirstBX(); itBX <= HfSums->getLastBX(); ++itBX) {
276 for (
int i = 0;
i < 4;
i++) {
280 hfRingEtSumResult->push_back(sum);
282 hfRingEtSumResult->resize(1 * bxCounter);
286 for (
int itBX = HfCounts->getFirstBX(); itBX <= HfCounts->getLastBX(); ++itBX) {
296 for (
int i = 0;
i < 4;
i++) {
300 hfBitCountResult->push_back(count);
301 hfBitCountResult->resize(1 * bxCounter);
325 desc.
add<
int>(
"bxMin", 0);
326 desc.
add<
int>(
"bxMax", 0);
332 descriptions.
add(
"L1TCaloUpgradeToGCTConverter", desc);
static L1GctHFRingEtSums fromGctEmulator(const int16_t bx, const uint16_t etSumPosEtaRing1, const uint16_t etSumNegEtaRing1, const uint16_t etSumPosEtaRing2, const uint16_t etSumNegEtaRing2)
named ctor for GCT emulator
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< L1GctEtMiss > L1GctEtMissCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
#define DEFINE_FWK_MODULE(type)
std::vector< L1GctEtHad > L1GctEtHadCollection
Level-1 Trigger jet candidate.
std::vector< L1GctInternHtMiss > L1GctInternHtMissCollection
void setBitCount(unsigned i, uint16_t c)
set a sum
Persistable copy of missing Et measured at Level-1.
Log< level::Error, false > LogError
Level-1 Trigger EM candidate at output of GCT.
std::vector< L1GctEtTotal > L1GctEtTotalCollection
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
std::vector< T >::const_iterator const_iterator
Persistable copy of total Et measured at Level-1.
void setEtSum(unsigned i, uint16_t et)
set a sum
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Persistable copy of total Ht measured at Level-1.
std::vector< L1GctHtMiss > L1GctHtMissCollection
Persistable copy of missing Et measured at Level-1.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< L1GctInternJetData > L1GctInternJetDataCollection
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< L1GctInternEtSum > L1GctInternEtSumCollection
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const override
static L1GctHFBitCounts fromGctEmulator(const int16_t bx, const uint16_t bitCountPosEtaRing1, const uint16_t bitCountNegEtaRing1, const uint16_t bitCountPosEtaRing2, const uint16_t bitCountNegEtaRing2)
named ctor for GCT emulator
std::vector< L1GctEmCand > L1GctEmCandCollection
L1TCaloUpgradeToGCTConverter(const edm::ParameterSet &)