31 m_writeInternalData(ps.getParameter<bool>(
"writeInternalData")),
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();
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