41 m_writeInternalData(ps.getParameter<
bool>(
"writeInternalData")),
42 m_verbose(ps.getUntrackedParameter<
bool>(
"verbose",
false)),
43 m_conditionsLabel(ps.getParameter<
std::
string>(
"conditionsLabel")) {
45 produces<L1GctEmCandCollection>(
"isoEm");
46 produces<L1GctEmCandCollection>(
"nonIsoEm");
47 produces<L1GctJetCandCollection>(
"cenJets");
48 produces<L1GctJetCandCollection>(
"forJets");
49 produces<L1GctJetCandCollection>(
"tauJets");
50 produces<L1GctInternJetDataCollection>();
51 produces<L1GctEtTotalCollection>();
52 produces<L1GctEtHadCollection>();
53 produces<L1GctEtMissCollection>();
54 produces<L1GctHtMissCollection>();
55 produces<L1GctInternEtSumCollection>();
56 produces<L1GctInternHtMissCollection>();
57 produces<L1GctHFBitCountsCollection>();
58 produces<L1GctHFRingEtSumsCollection>();
71 if (jfTypeStr ==
"tdrJetFinder") {
73 }
else if (jfTypeStr !=
"hardwareJetFinder") {
75 <<
"Unrecognised jetFinder option " << jfTypeStr <<
"\nHardware jetFinder will be used";
80 m_gct = std::make_unique<L1GlobalCaloTrigger>(jfType, mask);
81 edm::LogWarning(
"L1GctEmulatorSetup") <<
"Emulator has been configured in hardware test mode with mask " << mask
82 <<
"\nThis mode should NOT be used for Physics studies!";
84 m_gct = std::make_unique<L1GlobalCaloTrigger>(jfType);
86 m_gct->setBxRange(firstBx, lastBx);
92 nextLut->setEtaBin(
ieta);
98 bool useImprovedTauAlgo = ps.
getParameter<
bool>(
"useImprovedTauAlgorithm");
99 bool ignoreTauVetoBitsForIsolation = ps.
getParameter<
bool>(
"ignoreRCTTauVetoBitsForIsolation");
100 m_gct->setupTauAlgo(useImprovedTauAlgo, ignoreTauVetoBitsForIsolation);
129 if (jfPars.
product() ==
nullptr) {
133 <<
"Failed to find a L1GctJetFinderParamsRcd:L1GctJetFinderParams in EventSetup!" << std::endl;
137 if (chanMask.
product() ==
nullptr) {
141 <<
"Failed to find a L1GctChannelMaskRcd:L1GctChannelMask in EventSetup!" << std::endl;
145 if (hfRingEtScale.
product() ==
nullptr) {
149 <<
"Failed to find a L1HfRingEtScaleRcd:L1HfRingEtScaleRcd in EventSetup!" << std::endl;
170 edm::LogError(
"L1GctConfigError") <<
"Configuration failed - GCT emulator will not be run" << std::endl;
213 <<
" - GCT emulator will not be run" << std::endl;
218 <<
"Failed to get calo regions with label " <<
m_inputLabel <<
" - GCT emulator will not be run" << std::endl;
224 edm::LogError(
"L1GctInputFailedError") <<
"isValid() flag set to false for em candidates with label "
225 <<
m_inputLabel <<
" - GCT emulator will not be run" << std::endl;
229 if (gotRgn && !rgn.
isValid()) {
232 edm::LogError(
"L1GctInputFailedError") <<
"isValid() flag set to false for calo regions with label "
233 <<
m_inputLabel <<
" - GCT emulator will not be run" << std::endl;
238 if (gotEm && gotRgn) {
243 m_gct->fillEmCands(*em);
244 m_gct->fillRegions(*rgn);
250 *isoEmResult =
m_gct->getIsoElectrons();
251 *nonIsoEmResult =
m_gct->getNonIsoElectrons();
252 *cenJetResult =
m_gct->getCentralJets();
253 *forJetResult =
m_gct->getForwardJets();
254 *tauJetResult =
m_gct->getTauJets();
257 *etTotResult =
m_gct->getEtSumCollection();
258 *etHadResult =
m_gct->getEtHadCollection();
259 *etMissResult =
m_gct->getEtMissCollection();
260 *htMissResult =
m_gct->getHtMissCollection();
263 *hfBitCountResult =
m_gct->getHFBitCountsCollection();
264 *hfRingEtSumResult =
m_gct->getHFRingEtSumsCollection();
268 *internalJetResult =
m_gct->getInternalJets();
269 *internalEtSumResult =
m_gct->getInternalEtSums();
270 *internalHtMissResult =
m_gct->getInternalHtMiss();