15 constexpr
int crateFED[18][6] = {{613, 614, 603, 702, 718, 1118},
16 {611, 612, 602, 700, 718, 1118},
17 {627, 610, 601, 716, 722, 1122},
18 {625, 626, 609, 714, 722, 1122},
19 {623, 624, 608, 712, 722, 1122},
20 {621, 622, 607, 710, 720, 1120},
21 {619, 620, 606, 708, 720, 1120},
22 {617, 618, 605, 706, 720, 1120},
23 {615, 616, 604, 704, 718, 1118},
24 {631, 632, 648, 703, 719, 1118},
25 {629, 630, 647, 701, 719, 1118},
26 {645, 628, 646, 717, 723, 1122},
27 {643, 644, 654, 715, 723, 1122},
28 {641, 642, 653, 713, 723, 1122},
29 {639, 640, 652, 711, 721, 1120},
30 {637, 638, 651, 709, 721, 1120},
31 {635, 636, 650, 707, 721, 1120},
32 {633, 634, 649, 705, 719, 1118}};
36 rct(new
L1RCT(rctLookupTables.
get())),
41 bunchCrossings(conf.getParameter<
std::
vector<
int>>(
"BunchCrossings")),
46 fedUpdatedMask(nullptr),
57 produces<L1CaloEmCollection>();
58 produces<L1CaloRegionCollection>();
67 for (
unsigned int ihc = 0; ihc <
hcalDigis.size(); ihc++) {
68 consumes<edm::SortedCollection<HcalTriggerPrimitiveDigi, edm::StrictWeakOrdering<HcalTriggerPrimitiveDigi>>>(
72 for (
unsigned int iec = 0; iec <
ecalDigis.size(); iec++) {
73 consumes<edm::SortedCollection<EcalTriggerPrimitiveDigi, edm::StrictWeakOrdering<EcalTriggerPrimitiveDigi>>>(
152 const std::vector<int> &Feds)
163 for (
int i = 0;
i < 18;
i++) {
164 for (
int j = 0;
j < 2;
j++) {
165 for (
int k = 0;
k < 28;
k++) {
169 for (
int k = 0;
k < 4;
k++) {
184 bool useUpgradedHF =
false;
186 std::vector<int> caloFeds;
189 for (std::vector<int>::const_iterator cf = Feds.begin(); cf != Feds.end(); ++cf) {
191 if ((fedNum > 600 && fedNum < 724) || fedNum == 1118 || fedNum == 1120 || fedNum == 1122)
192 caloFeds.push_back(fedNum);
194 if (fedNum == 1118 || fedNum == 1120 || fedNum == 1122)
195 useUpgradedHF =
true;
198 for (
int cr = 0; cr < 18; ++cr) {
200 bool fedFound =
false;
203 std::vector<int>::iterator fv =
std::find(caloFeds.begin(), caloFeds.end(), crateFED[cr][
cs]);
204 if (fv != caloFeds.end())
210 bool phi_even[2] = {
false};
273 for (
int even = 0; even <= 1; even++) {
274 if (phi_even[even]) {
282 for (
int even = 0; even <= 1; even++)
320 throw cms::Exception(
"BadInput") <<
"From what I see the number of your your ECAL input digi " 322 <<
"is different from the size of your HCAL digi input collections\n" 323 <<
"or the size of your BX factor collection" 324 <<
"They must be the same to correspond to the same Bxs\n" 325 <<
"It does not matter if one of them is empty\n";
341 rct->digiInput(ecalIn, hcalIn);
345 for (
int j = 0;
j < 18;
j++) {
348 for (
int i = 0;
i < 4;
i++) {
351 rctEmCands->push_back(isolatedEGObjects.at(
i));
352 rctEmCands->push_back(nonisolatedEGObjects.at(
i));
356 for (
int i = 0;
i < 18;
i++) {
357 std::vector<L1CaloRegion>
regions =
rct->getRegions(
i);
358 for (
int j = 0;
j < 22;
j++) {
360 rctRegions->push_back(
regions.at(
j));
372 std::cout <<
"Contents of given fedVector: ";
373 std::copy(fedVector.begin(), fedVector.end(), std::ostream_iterator<int>(
std::cout,
", "));
382 std::cout <<
"Trying to print contents of fedUpdatedMask, but it doesn't exist!" << std::endl;
390 std::cout <<
"Contents of fedUpdatedMask: ";
393 std::cout <<
"--> ECAL mask: " << std::endl;
394 for (
int i = 0;
i < 18;
i++) {
395 for (
int j = 0;
j < 2;
j++) {
396 for (
int k = 0;
k < 28;
k++) {
401 std::cout <<
"--> HCAL mask: " << std::endl;
402 for (
int i = 0;
i < 18;
i++) {
403 for (
int j = 0;
j < 2;
j++) {
404 for (
int k = 0;
k < 28;
k++) {
409 std::cout <<
"--> HF mask: " << std::endl;
410 for (
int i = 0;
i < 18;
i++) {
411 for (
int j = 0;
j < 2;
j++) {
412 for (
int k = 0;
k < 4;
k++) {
421 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)
unsigned int queryDelayInLS
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_
unsigned int queryIntervalInLS
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.
LuminosityBlockNumber_t luminosityBlock() const
static constexpr int minHF
static constexpr int maxEndcap