31 m_writeInternalData(ps.getParameter<
bool>(
"writeInternalData")),
32 m_verbose(ps.getUntrackedParameter<
bool>(
"verbose",
false)),
33 m_conditionsLabel(ps.getParameter<
std::
string>(
"conditionsLabel")) {
35 produces<L1GctEmCandCollection>(
"isoEm");
36 produces<L1GctEmCandCollection>(
"nonIsoEm");
37 produces<L1GctJetCandCollection>(
"cenJets");
38 produces<L1GctJetCandCollection>(
"forJets");
39 produces<L1GctJetCandCollection>(
"tauJets");
40 produces<L1GctInternJetDataCollection>();
41 produces<L1GctEtTotalCollection>();
42 produces<L1GctEtHadCollection>();
43 produces<L1GctEtMissCollection>();
44 produces<L1GctHtMissCollection>();
45 produces<L1GctInternEtSumCollection>();
46 produces<L1GctInternHtMissCollection>();
47 produces<L1GctHFBitCountsCollection>();
48 produces<L1GctHFRingEtSumsCollection>();
61 if (jfTypeStr ==
"tdrJetFinder") {
63 }
else if (jfTypeStr !=
"hardwareJetFinder") {
65 <<
"Unrecognised jetFinder option " << jfTypeStr <<
"\nHardware jetFinder will be used";
70 m_gct = std::make_unique<L1GlobalCaloTrigger>(jfType, mask);
71 edm::LogWarning(
"L1GctEmulatorSetup") <<
"Emulator has been configured in hardware test mode with mask " << mask
72 <<
"\nThis mode should NOT be used for Physics studies!";
74 m_gct = std::make_unique<L1GlobalCaloTrigger>(jfType);
76 m_gct->setBxRange(firstBx, lastBx);
82 nextLut->setEtaBin(
ieta);
88 bool useImprovedTauAlgo = ps.
getParameter<
bool>(
"useImprovedTauAlgorithm");
89 bool ignoreTauVetoBitsForIsolation = ps.
getParameter<
bool>(
"ignoreRCTTauVetoBitsForIsolation");
90 m_gct->setupTauAlgo(useImprovedTauAlgo, ignoreTauVetoBitsForIsolation);
119 if (jfPars.
product() ==
nullptr) {
123 <<
"Failed to find a L1GctJetFinderParamsRcd:L1GctJetFinderParams in EventSetup!" << std::endl;
127 if (chanMask.
product() ==
nullptr) {
131 <<
"Failed to find a L1GctChannelMaskRcd:L1GctChannelMask in EventSetup!" << std::endl;
135 if (hfRingEtScale.
product() ==
nullptr) {
139 <<
"Failed to find a L1HfRingEtScaleRcd:L1HfRingEtScaleRcd in EventSetup!" << std::endl;
160 edm::LogError(
"L1GctConfigError") <<
"Configuration failed - GCT emulator will not be run" << std::endl;
203 <<
" - GCT emulator will not be run" << std::endl;
208 <<
"Failed to get calo regions with label " <<
m_inputLabel <<
" - GCT emulator will not be run" << std::endl;
214 edm::LogError(
"L1GctInputFailedError") <<
"isValid() flag set to false for em candidates with label "
215 <<
m_inputLabel <<
" - GCT emulator will not be run" << std::endl;
219 if (gotRgn && !rgn.
isValid()) {
222 edm::LogError(
"L1GctInputFailedError") <<
"isValid() flag set to false for calo regions with label "
223 <<
m_inputLabel <<
" - GCT emulator will not be run" << std::endl;
228 if (gotEm && gotRgn) {
233 m_gct->fillEmCands(*em);
234 m_gct->fillRegions(*rgn);
240 *isoEmResult =
m_gct->getIsoElectrons();
241 *nonIsoEmResult =
m_gct->getNonIsoElectrons();
242 *cenJetResult =
m_gct->getCentralJets();
243 *forJetResult =
m_gct->getForwardJets();
244 *tauJetResult =
m_gct->getTauJets();
247 *etTotResult =
m_gct->getEtSumCollection();
248 *etHadResult =
m_gct->getEtHadCollection();
249 *etMissResult =
m_gct->getEtMissCollection();
250 *htMissResult =
m_gct->getHtMissCollection();
253 *hfBitCountResult =
m_gct->getHFBitCountsCollection();
254 *hfRingEtSumResult =
m_gct->getHFRingEtSumsCollection();
258 *internalJetResult =
m_gct->getInternalJets();
259 *internalEtSumResult =
m_gct->getInternalEtSums();
260 *internalHtMissResult =
m_gct->getInternalHtMiss();