30 m_writeInternalData(ps.getParameter<bool>(
"writeInternalData")),
32 m_conditionsLabel(ps.getParameter<std::
string>(
"conditionsLabel")) {
34 produces<L1GctEmCandCollection>(
"isoEm");
35 produces<L1GctEmCandCollection>(
"nonIsoEm");
36 produces<L1GctJetCandCollection>(
"cenJets");
37 produces<L1GctJetCandCollection>(
"forJets");
38 produces<L1GctJetCandCollection>(
"tauJets");
39 produces<L1GctInternJetDataCollection>();
40 produces<L1GctEtTotalCollection>();
41 produces<L1GctEtHadCollection>();
42 produces<L1GctEtMissCollection>();
43 produces<L1GctHtMissCollection>();
44 produces<L1GctInternEtSumCollection>();
45 produces<L1GctInternHtMissCollection>();
46 produces<L1GctHFBitCountsCollection>();
47 produces<L1GctHFRingEtSumsCollection>();
60 if (jfTypeStr ==
"tdrJetFinder") {
62 }
else if (jfTypeStr !=
"hardwareJetFinder") {
64 <<
"Unrecognised jetFinder option " << jfTypeStr <<
"\nHardware jetFinder will be used";
69 m_gct = std::make_unique<L1GlobalCaloTrigger>(jfType, mask);
70 edm::LogWarning(
"L1GctEmulatorSetup") <<
"Emulator has been configured in hardware test mode with mask " << mask
71 <<
"\nThis mode should NOT be used for Physics studies!";
73 m_gct = std::make_unique<L1GlobalCaloTrigger>(jfType);
75 m_gct->setBxRange(firstBx, lastBx);
81 nextLut->setEtaBin(ieta);
87 bool useImprovedTauAlgo = ps.
getParameter<
bool>(
"useImprovedTauAlgorithm");
88 bool ignoreTauVetoBitsForIsolation = ps.
getParameter<
bool>(
"ignoreRCTTauVetoBitsForIsolation");
89 m_gct->setupTauAlgo(useImprovedTauAlgo, ignoreTauVetoBitsForIsolation);
118 if (jfPars.
product() ==
nullptr) {
122 <<
"Failed to find a L1GctJetFinderParamsRcd:L1GctJetFinderParams in EventSetup!" << std::endl;
126 if (chanMask.
product() ==
nullptr) {
130 <<
"Failed to find a L1GctChannelMaskRcd:L1GctChannelMask in EventSetup!" << std::endl;
134 if (hfRingEtScale.
product() ==
nullptr) {
138 <<
"Failed to find a L1HfRingEtScaleRcd:L1HfRingEtScaleRcd in EventSetup!" << std::endl;
159 edm::LogError(
"L1GctConfigError") <<
"Configuration failed - GCT emulator will not be run" << std::endl;
202 <<
" - GCT emulator will not be run" << std::endl;
207 <<
"Failed to get calo regions with label " <<
m_inputLabel <<
" - GCT emulator will not be run" << std::endl;
213 edm::LogError(
"L1GctInputFailedError") <<
"isValid() flag set to false for em candidates with label "
214 <<
m_inputLabel <<
" - GCT emulator will not be run" << std::endl;
218 if (gotRgn && !rgn.
isValid()) {
221 edm::LogError(
"L1GctInputFailedError") <<
"isValid() flag set to false for calo regions with label "
222 <<
m_inputLabel <<
" - GCT emulator will not be run" << std::endl;
227 if (gotEm && gotRgn) {
232 m_gct->fillEmCands(*em);
233 m_gct->fillRegions(*rgn);
239 *isoEmResult =
m_gct->getIsoElectrons();
240 *nonIsoEmResult =
m_gct->getNonIsoElectrons();
241 *cenJetResult =
m_gct->getCentralJets();
242 *forJetResult =
m_gct->getForwardJets();
243 *tauJetResult =
m_gct->getTauJets();
246 *etTotResult =
m_gct->getEtSumCollection();
247 *etHadResult =
m_gct->getEtHadCollection();
248 *etMissResult =
m_gct->getEtMissCollection();
249 *htMissResult =
m_gct->getHtMissCollection();
252 *hfBitCountResult =
m_gct->getHFBitCountsCollection();
253 *hfRingEtSumResult =
m_gct->getHFRingEtSumsCollection();
257 *internalJetResult =
m_gct->getInternalJets();
258 *internalEtSumResult =
m_gct->getInternalEtSums();
259 *internalHtMissResult =
m_gct->getInternalHtMiss();
void produce(edm::Event &e, const edm::EventSetup &c) override
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< L1GctJetFinderParams, L1GctJetFinderParamsRcd > m_jfParsToken
edm::EDGetTokenT< L1CaloEmCollection > m_emToken
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EventSetup & c
std::vector< L1GctEtMiss > L1GctEtMissCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
m_verbose(ps.getUntrackedParameter< bool >("verbose"))
#define DEFINE_FWK_MODULE(type)
std::vector< L1GctEtHad > L1GctEtHadCollection
std::vector< L1GctInternHtMiss > L1GctInternHtMissCollection
L1GlobalCaloTrigger::lutPtr lutPtr
typedefs
Log< level::Error, false > LogError
edm::ESGetToken< L1CaloEtScale, L1HfRingEtScaleRcd > m_hfRingEtScaleToken
std::vector< L1GctEtTotal > L1GctEtTotalCollection
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
edm::ESGetToken< L1CaloEtScale, L1HtMissScaleRcd > m_htMissScaleToken
const std::string m_conditionsLabel
edm::ESGetToken< L1GctChannelMask, L1GctChannelMaskRcd > m_chanMaskToken
std::unique_ptr< L1GlobalCaloTrigger > m_gct
static const unsigned NUMBER_ETA_VALUES
Number of eta bins used in correction.
std::vector< L1GctHtMiss > L1GctHtMissCollection
lutPtrVector m_jetEtCalibLuts
T const * product() const
T getParameter(std::string const &) const
std::vector< L1GctInternJetData > L1GctInternJetDataCollection
edm::ESGetToken< L1CaloEtScale, L1JetEtScaleRcd > m_etScaleToken
std::vector< L1GctInternEtSum > L1GctInternEtSumCollection
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Log< level::Warning, false > LogWarning
int configureGct(const edm::EventSetup &c)
const bool m_writeInternalData
L1GctEmulator(const edm::ParameterSet &ps)
constructor
edm::EDGetTokenT< L1CaloRegionCollection > m_regionToken
std::vector< L1GctEmCand > L1GctEmCandCollection