16 constexpr int crateFED[18][6] = {{613, 614, 603, 702, 718, 1118},
17 {611, 612, 602, 700, 718, 1118},
18 {627, 610, 601, 716, 722, 1122},
19 {625, 626, 609, 714, 722, 1122},
20 {623, 624, 608, 712, 722, 1122},
21 {621, 622, 607, 710, 720, 1120},
22 {619, 620, 606, 708, 720, 1120},
23 {617, 618, 605, 706, 720, 1120},
24 {615, 616, 604, 704, 718, 1118},
25 {631, 632, 648, 703, 719, 1118},
26 {629, 630, 647, 701, 719, 1118},
27 {645, 628, 646, 717, 723, 1122},
28 {643, 644, 654, 715, 723, 1122},
29 {641, 642, 653, 713, 723, 1122},
30 {639, 640, 652, 711, 721, 1120},
31 {637, 638, 651, 709, 721, 1120},
32 {635, 636, 650, 707, 721, 1120},
33 {633, 634, 649, 705, 719, 1118}};
37 rct(new
L1RCT(rctLookupTables.
get())),
42 bunchCrossings(conf.getParameter<
std::
vector<
int>>(
"BunchCrossings")),
47 fedUpdatedMask(nullptr),
58 produces<L1CaloEmCollection>();
59 produces<L1CaloRegionCollection>();
68 for (
unsigned int ihc = 0; ihc <
hcalDigis.size(); ihc++) {
69 consumes<edm::SortedCollection<HcalTriggerPrimitiveDigi, edm::StrictWeakOrdering<HcalTriggerPrimitiveDigi>>>(
73 for (
unsigned int iec = 0; iec <
ecalDigis.size(); iec++) {
74 consumes<edm::SortedCollection<EcalTriggerPrimitiveDigi, edm::StrictWeakOrdering<EcalTriggerPrimitiveDigi>>>(
99 <<
"L1RCTProducer is being run with the configuration parameter getFedsFromOmds set true. " 100 <<
"Underlying Framework changes have broken the implementation of that option. " 101 <<
"It was not fixed because we believe this option is no longer used or needed. " 102 <<
"If you actually need this option, please report this failure to the Framework. " 103 <<
"For more details see GitHub Issue 43697.";
161 const std::vector<int> &Feds)
172 for (
int i = 0;
i < 18;
i++) {
173 for (
int j = 0;
j < 2;
j++) {
174 for (
int k = 0;
k < 28;
k++) {
178 for (
int k = 0;
k < 4;
k++) {
193 bool useUpgradedHF =
false;
195 std::vector<int> caloFeds;
198 for (std::vector<int>::const_iterator cf = Feds.begin(); cf != Feds.end(); ++cf) {
200 if ((fedNum > 600 && fedNum < 724) || fedNum == 1118 || fedNum == 1120 || fedNum == 1122)
201 caloFeds.push_back(fedNum);
203 if (fedNum == 1118 || fedNum == 1120 || fedNum == 1122)
204 useUpgradedHF =
true;
207 for (
int cr = 0; cr < 18; ++cr) {
209 bool fedFound =
false;
212 std::vector<int>::iterator fv =
std::find(caloFeds.begin(), caloFeds.end(), crateFED[cr][
cs]);
213 if (fv != caloFeds.end())
219 bool phi_even[2] = {
false};
282 for (
int even = 0; even <= 1; even++) {
283 if (phi_even[even]) {
291 for (
int even = 0; even <= 1; even++)
329 throw cms::Exception(
"BadInput") <<
"From what I see the number of your your ECAL input digi " 331 <<
"is different from the size of your HCAL digi input collections\n" 332 <<
"or the size of your BX factor collection" 333 <<
"They must be the same to correspond to the same Bxs\n" 334 <<
"It does not matter if one of them is empty\n";
350 rct->digiInput(ecalIn, hcalIn);
354 for (
int j = 0;
j < 18;
j++) {
357 for (
int i = 0;
i < 4;
i++) {
360 rctEmCands->push_back(isolatedEGObjects.at(
i));
361 rctEmCands->push_back(nonisolatedEGObjects.at(
i));
365 for (
int i = 0;
i < 18;
i++) {
366 std::vector<L1CaloRegion>
regions =
rct->getRegions(
i);
367 for (
int j = 0;
j < 22;
j++) {
369 rctRegions->push_back(
regions.at(
j));
381 std::cout <<
"Contents of given fedVector: ";
382 std::copy(fedVector.begin(), fedVector.end(), std::ostream_iterator<int>(
std::cout,
", "));
391 std::cout <<
"Trying to print contents of fedUpdatedMask, but it doesn't exist!" << std::endl;
399 std::cout <<
"Contents of fedUpdatedMask: ";
402 std::cout <<
"--> ECAL mask: " << std::endl;
403 for (
int i = 0;
i < 18;
i++) {
404 for (
int j = 0;
j < 2;
j++) {
405 for (
int k = 0;
k < 28;
k++) {
410 std::cout <<
"--> HCAL mask: " << std::endl;
411 for (
int i = 0;
i < 18;
i++) {
412 for (
int j = 0;
j < 2;
j++) {
413 for (
int k = 0;
k < 28;
k++) {
418 std::cout <<
"--> HF mask: " << std::endl;
419 for (
int i = 0;
i < 18;
i++) {
420 for (
int j = 0;
j < 2;
j++) {
421 for (
int k = 0;
k < 4;
k++) {
430 std::cout <<
"Trying to print contents of fedUpdatedMask, but it doesn't exist!" << std::endl;
edm::ESGetToken< RunInfo, RunInfoRcd > beginLumiRunInfoToken_
std::unique_ptr< L1RCT > rct
std::vector< L1CaloEmCand > L1CaloEmCollection
const edm::ESGetToken< RunInfo, RunInfoRcd > beginRunRunInfoToken_
const edm::ESGetToken< L1CaloEcalScale, L1CaloEcalScaleRcd > ecalScaleToken_
void produce(edm::Event &e, const edm::EventSetup &c) final
void updateFedVector(const L1RCTChannelMask &, const L1RCTNoisyChannelMask &, const std::vector< int > &Feds)
const std::vector< int > getFedVectorFromRunInfo(const edm::ESGetToken< RunInfo, RunInfoRcd > &, const edm::EventSetup &) const
void updateConfiguration(const edm::EventSetup &)
void printFedVector(const std::vector< int > &)
edm::ESGetToken< L1RCTNoisyChannelMask, L1RCTNoisyChannelMaskRcd > beginLumiHotChannelMaskToken_
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, const edm::EventSetup &context) final
void printUpdatedFedMaskVerbose()
L1RCTProducer(const edm::ParameterSet &ps)
std::unique_ptr< L1RCTLookupTables > rctLookupTables
static constexpr int minEndcap
std::unique_ptr< L1RCTChannelMask > fedUpdatedMask
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const edm::ESGetToken< L1CaloHcalScale, L1CaloHcalScaleRcd > hcalScaleToken_
const edm::ESGetToken< L1RCTChannelMask, L1RCTChannelMaskRcd > beginRunChannelMaskToken_
std::vector< edm::InputTag > hcalDigis
std::vector< edm::InputTag > ecalDigis
std::vector< int > bunchCrossings
std::vector< int > m_fed_in
void printUpdatedFedMask()
static constexpr int maxBarrel
static constexpr int minBarrel
void beginRun(edm::Run const &r, const edm::EventSetup &c) final
const edm::ESGetToken< L1CaloEtScale, L1EmEtScaleRcd > emScaleToken_
static constexpr int maxHF
const edm::ESGetToken< L1RCTNoisyChannelMask, L1RCTNoisyChannelMaskRcd > beginRunHotChannelMaskToken_
const edm::ESGetToken< L1RCTParameters, L1RCTParametersRcd > rctParamsToken_
const std::vector< int > getFedVectorFromOmds(const edm::EventSetup &) const
edm::ESGetToken< RunInfo, RunInfoRcd > omdsRunInfoToken_
std::vector< L1CaloRegion > L1CaloRegionCollection
edm::ESGetToken< L1RCTChannelMask, L1RCTChannelMaskRcd > beginLumiChannelMaskToken_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
static constexpr int minHF
static constexpr int maxEndcap