|
|
#include <L1Trigger/L1TCaloLayer1/plugins/L1TCaloLayer1.cc>
Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 58 of file L1TCaloLayer1.cc.
◆ L1TCaloLayer1()
Definition at line 114 of file L1TCaloLayer1.cc.
134 vector<UCTCrate*> crates =
layer1->getCrates();
135 for (uint32_t crt = 0; crt < crates.size(); crt++) {
136 vector<UCTCard*> cards = crates[crt]->getCards();
137 for (uint32_t crd = 0; crd < cards.size(); crd++) {
138 vector<UCTRegion*>
regions = cards[crd]->getRegions();
139 for (uint32_t rgn = 0; rgn <
regions.size(); rgn++) {
141 for (uint32_t twr = 0; twr <
towers.size(); twr++) {
151 return CaloTools::caloTowerHash(
a->caloEta(),
a->caloPhi()) < CaloTools::caloTowerHash(
b->caloEta(),
b->caloPhi());
◆ beginRun()
Definition at line 284 of file L1TCaloLayer1.cc.
298 LOG_ERROR <<
"L1TCaloLayer1::beginRun: failed to fetch LUTS - using unity" << std::endl;
299 std::array<std::array<std::array<uint32_t, nEtBins>, nCalSideBins>, nCalEtaBins> eCalLayer1EtaSideEtArray;
300 std::array<std::array<std::array<uint32_t, nEtBins>, nCalSideBins>, nCalEtaBins> hCalLayer1EtaSideEtArray;
301 std::array<std::array<uint32_t, nEtBins>, nHfEtaBins> hfLayer1EtaEtArray;
302 ecalLUT.push_back(eCalLayer1EtaSideEtArray);
303 hcalLUT.push_back(hCalLayer1EtaSideEtArray);
304 hfLUT.push_back(hfLayer1EtaEtArray);
306 for (uint32_t twr = 0; twr <
twrList.size(); twr++) {
References ecalLUT, ePhiMap, fwVersion, hcalLUT, hfLUT, hfPhiMap, hPhiMap, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, L1TCaloLayer1FetchLUTs(), LOG_ERROR, twrList, useCalib, useECALLUT, useHCALLUT, useHFLUT, and useLSB.
◆ fillDescriptions()
◆ produce()
Definition at line 160 of file L1TCaloLayer1.cc.
171 uint32_t expectedTotalET = 0;
172 if (!
layer1->clearEvent()) {
173 LOG_ERROR <<
"UCT: Failed to clear event" << std::endl;
177 for (
const auto& ecalTp : *ecalTPs) {
180 int caloEta = ecalTp.id().ieta();
181 int caloPhi = ecalTp.id().iphi();
182 int et = ecalTp.compressedEt();
183 bool fgVeto = ecalTp.fineGrain();
184 UCTTowerIndex
t = UCTTowerIndex(caloEta, caloPhi);
185 if (!
layer1->setECALData(
t, fgVeto,
et)) {
186 LOG_ERROR <<
"UCT: Failed loading an ECAL tower" << std::endl;
189 expectedTotalET +=
et;
193 for (
const auto& hcalTp : *hcalTPs) {
196 int caloEta = hcalTp.id().ieta();
197 uint32_t absCaloEta =
std::abs(caloEta);
199 if (absCaloEta == 29) {
203 else if (hcalTp.id().version() == 0 && absCaloEta > 29) {
205 }
else if (absCaloEta <= 41) {
206 int caloPhi = hcalTp.id().iphi();
207 int et = hcalTp.SOI_compressedEt();
208 bool fg = hcalTp.t0().fineGrain(0);
209 bool fg2 = hcalTp.t0().fineGrain(1);
211 UCTTowerIndex
t = UCTTowerIndex(caloEta, caloPhi);
212 uint32_t featureBits = 0;
216 if (absCaloEta > 29 && fg2)
218 if (!
layer1->setHCALData(
t, featureBits,
et)) {
219 LOG_ERROR <<
"caloEta = " << caloEta <<
"; caloPhi =" << caloPhi << std::endl;
220 LOG_ERROR <<
"UCT: Failed loading an HCAL tower" << std::endl;
223 expectedTotalET +=
et;
225 LOG_ERROR <<
"Illegal Tower: caloEta = " << caloEta <<
"; caloPhi =" << caloPhi <<
"; et = " <<
et
229 LOG_ERROR <<
"Illegal Tower: caloEta = " << caloEta << std::endl;
236 LOG_ERROR <<
"UCT: Failed to process layer 1" << std::endl;
241 for (uint32_t twr = 0; twr <
twrList.size(); twr++) {
256 vector<UCTCrate*> crates =
layer1->getCrates();
257 for (uint32_t crt = 0; crt < crates.size(); crt++) {
258 vector<UCTCard*> cards = crates[crt]->getCards();
259 for (uint32_t crd = 0; crd < cards.size(); crd++) {
260 vector<UCTRegion*>
regions = cards[crd]->getRegions();
261 for (uint32_t rgn = 0; rgn <
regions.size(); rgn++) {
263 uint32_t regionData =
rawData & 0x0000FFFF;
264 uint32_t crate =
regions[rgn]->getCrate();
265 uint32_t card =
regions[rgn]->getCard();
267 bool negativeEta =
regions[rgn]->isNegativeEta();
268 uint32_t rPhi =
g.getUCTRegionPhiIndex(crate, card);
269 if (
region < NRegionsInCard) {
275 rgnCollection.push_back(
L1CaloRegion((uint16_t)regionData, (
unsigned)rEta, (
unsigned)rPhi, (int16_t)0));
References funct::abs(), ecalTPSource, EgHLTOffHistBins_cfi::et, g, hcalTPSource, iEvent, edm::HandleBase::isValid(), layer1, LOG_ERROR, eostools::move(), BXVector< T >::push_back(), l1tstage2_dqm_sourceclient-live_cfg::rawData, HLT_2018_cff::region, regionPutToken, l1t::L1Candidate::setHwEta(), l1t::CaloTower::setHwEtEm(), l1t::CaloTower::setHwEtHad(), l1t::CaloTower::setHwEtRatio(), l1t::L1Candidate::setHwPhi(), l1t::L1Candidate::setHwPt(), l1t::L1Candidate::setHwQual(), OrderedSet::t, towerPutToken, twrList, unpackEcalMask, unpackHcalMask, and testProducerWithPsetDescEmpty_cfi::x1.
◆ ecalLUT
std::vector<std::array<std::array<std::array<uint32_t, nEtBins>, nCalSideBins>, nCalEtaBins> > L1TCaloLayer1::ecalLUT |
|
private |
◆ ecalTPSource
◆ ePhiMap
std::vector<unsigned int> L1TCaloLayer1::ePhiMap |
|
private |
◆ fwVersion
int L1TCaloLayer1::fwVersion |
|
private |
◆ hcalLUT
std::vector<std::array<std::array<std::array<uint32_t, nEtBins>, nCalSideBins>, nCalEtaBins> > L1TCaloLayer1::hcalLUT |
|
private |
◆ hcalTPSource
◆ hfLUT
std::vector<std::array<std::array<uint32_t, nEtBins>, nHfEtaBins> > L1TCaloLayer1::hfLUT |
|
private |
◆ hfPhiMap
std::vector<unsigned int> L1TCaloLayer1::hfPhiMap |
|
private |
◆ hPhiMap
std::vector<unsigned int> L1TCaloLayer1::hPhiMap |
|
private |
◆ layer1
std::unique_ptr<UCTLayer1> L1TCaloLayer1::layer1 |
|
private |
◆ regionPutToken
◆ towerPutToken
◆ twrList
std::vector<UCTTower*> L1TCaloLayer1::twrList |
|
private |
◆ unpackEcalMask
bool L1TCaloLayer1::unpackEcalMask |
|
private |
◆ unpackHcalMask
bool L1TCaloLayer1::unpackHcalMask |
|
private |
◆ useCalib
bool L1TCaloLayer1::useCalib |
|
private |
◆ useECALLUT
bool L1TCaloLayer1::useECALLUT |
|
private |
◆ useHCALLUT
bool L1TCaloLayer1::useHCALLUT |
|
private |
◆ useHFLUT
bool L1TCaloLayer1::useHFLUT |
|
private |
◆ useLSB
bool L1TCaloLayer1::useLSB |
|
private |
◆ verbose
bool L1TCaloLayer1::verbose |
|
private |
std::vector< unsigned int > hfPhiMap
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalTPSource
A calorimeter trigger region (sum of 4x4 trigger towers)
std::vector< std::array< std::array< std::array< uint32_t, nEtBins >, nCalSideBins >, nCalEtaBins > > ecalLUT
edm::EDPutTokenT< L1CaloRegionCollection > regionPutToken
void setHwEtRatio(int ratio)
std::vector< std::array< std::array< uint32_t, nEtBins >, nHfEtaBins > > hfLUT
std::unique_ptr< UCTLayer1 > layer1
std::vector< std::array< std::array< std::array< uint32_t, nEtBins >, nCalSideBins >, nCalEtaBins > > hcalLUT
std::vector< UCTTower * > twrList
bool L1TCaloLayer1FetchLUTs(const edm::EventSetup &iSetup, std::vector< std::array< std::array< std::array< uint32_t, nEtBins >, nCalSideBins >, nCalEtaBins > > &eLUT, std::vector< std::array< std::array< std::array< uint32_t, nEtBins >, nCalSideBins >, nCalEtaBins > > &hLUT, std::vector< std::array< std::array< uint32_t, nEtBins >, nHfEtaBins > > &hfLUT, std::vector< unsigned int > &ePhiMap, std::vector< unsigned int > &hPhiMap, std::vector< unsigned int > &hfPhiMap, bool useLSB, bool useCalib, bool useECALLUT, bool useHCALLUT, bool useHFLUT, int fwVersion)
std::vector< unsigned int > hPhiMap
edm::EDPutTokenT< CaloTowerBxCollection > towerPutToken
T getParameter(std::string const &) const
std::vector< L1CaloRegion > L1CaloRegionCollection
std::vector< unsigned int > ePhiMap
Abs< T >::type abs(const T &t)
void addDefault(ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalTPSource
void push_back(int bx, T object)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g