15 {613, 614, 603, 702, 718, 1118}, {611, 612, 602, 700, 718, 1118},
16 {627, 610, 601, 716, 722, 1122}, {625, 626, 609, 714, 722, 1122},
17 {623, 624, 608, 712, 722, 1122}, {621, 622, 607, 710, 720, 1120},
18 {619, 620, 606, 708, 720, 1120}, {617, 618, 605, 706, 720, 1120},
19 {615, 616, 604, 704, 718, 1118}, {631, 632, 648, 703, 719, 1118},
20 {629, 630, 647, 701, 719, 1118}, {645, 628, 646, 717, 723, 1122},
21 {643, 644, 654, 715, 723, 1122}, {641, 642, 653, 713, 723, 1122},
22 {639, 640, 652, 711, 721, 1120}, {637, 638, 651, 709, 721, 1120},
23 {635, 636, 650, 707, 721, 1120}, {633, 634, 649, 705, 719, 1118}};
29 ecalDigis(conf.getParameter<
std::vector<
edm::InputTag>>(
"ecalDigis")),
30 hcalDigis(conf.getParameter<
std::vector<
edm::InputTag>>(
"hcalDigis")),
31 bunchCrossings(conf.getParameter<
std::vector<
int>>(
"BunchCrossings")),
32 getFedsFromOmds(conf.getParameter<
bool>(
"getFedsFromOmds")),
33 queryDelayInLS(conf.getParameter<unsigned
int>(
"queryDelayInLS")),
34 queryIntervalInLS(conf.getParameter<unsigned
int>(
"queryIntervalInLS")),
35 conditionsLabel(conf.getParameter<
std::
string>(
"conditionsLabel")),
37 produces<L1CaloEmCollection>();
38 produces<L1CaloRegionCollection>();
40 for (
unsigned int ihc = 0; ihc <
hcalDigis.size(); ihc++) {
46 for (
unsigned int iec = 0; iec <
ecalDigis.size(); iec++) {
161 for (
int i = 0;
i < 18;
i++) {
162 for (
int j = 0; j < 2; j++) {
163 for (
int k = 0;
k < 28;
k++) {
167 for (
int k = 0;
k < 4;
k++) {
175 const std::vector<int> Feds = getFromOmds
187 bool useUpgradedHF =
false;
189 std::vector<int> caloFeds;
192 for (std::vector<int>::const_iterator cf = Feds.begin(); cf != Feds.end();
195 if ((fedNum > 600 && fedNum < 724) || fedNum == 1118 || fedNum == 1120 ||
197 caloFeds.push_back(fedNum);
199 if (fedNum == 1118 || fedNum == 1120 || fedNum == 1122)
200 useUpgradedHF =
true;
203 for (
int cr = 0; cr < 18; ++cr) {
206 bool fedFound =
false;
209 std::vector<int>::iterator fv =
211 if (fv != caloFeds.end())
217 bool phi_even[2] = {
false};
278 for (
int ieta = eta_min; ieta <=
eta_max; ++ieta) {
280 for (
int even = 0; even <= 1; even++) {
281 if (phi_even[even]) {
289 for (
int even = 0; even <= 1; even++)
300 const std::vector<int>
308 const std::vector<int> fedvector = summary->
m_fed_in;
313 const std::vector<int>
327 const std::vector<int> fedvector = summary->
m_fed_in;
339 std::unique_ptr<L1CaloRegionCollection> rctRegions(
345 <<
"From what I see the number of your your ECAL input digi " 347 <<
"is different from the size of your HCAL digi input collections\n" 348 <<
"or the size of your BX factor collection" 349 <<
"They must be the same to correspond to the same Bxs\n" 350 <<
"It does not matter if one of them is empty\n";
370 for (
int j = 0; j < 18; j++) {
373 for (
int i = 0;
i < 4;
i++) {
376 rctEmCands->push_back(isolatedEGObjects.at(
i));
377 rctEmCands->push_back(nonisolatedEGObjects.at(
i));
381 for (
int i = 0;
i < 18;
i++) {
383 for (
int j = 0; j < 22; j++) {
385 rctRegions->push_back(regions.at(j));
397 std::cout <<
"Contents of given fedVector: ";
398 std::copy(fedVector.begin(), fedVector.end(),
399 std::ostream_iterator<int>(
std::cout,
", "));
400 std::cout << std::endl;
409 <<
"Trying to print contents of fedUpdatedMask, but it doesn't exist!" 418 std::cout <<
"Contents of fedUpdatedMask: ";
421 std::cout <<
"--> ECAL mask: " << std::endl;
422 for (
int i = 0;
i < 18;
i++) {
423 for (
int j = 0; j < 2; j++) {
424 for (
int k = 0;
k < 28;
k++) {
429 std::cout <<
"--> HCAL mask: " << std::endl;
430 for (
int i = 0;
i < 18;
i++) {
431 for (
int j = 0; j < 2; j++) {
432 for (
int k = 0;
k < 28;
k++) {
437 std::cout <<
"--> HF mask: " << std::endl;
438 for (
int i = 0;
i < 18;
i++) {
439 for (
int j = 0; j < 2; j++) {
440 for (
int k = 0;
k < 4;
k++) {
450 <<
"Trying to print contents of fedUpdatedMask, but it doesn't exist!"
std::vector< L1CaloEmCand > L1CaloEmCollection
std::string conditionsLabel
void produce(edm::Event &e, const edm::EventSetup &c) final
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
const std::vector< int > getFedVectorFromRunInfo(const edm::EventSetup &)
void updateConfiguration(const edm::EventSetup &)
unique_ptr< ClusterSequence > cs
L1RCTLookupTables * rctLookupTables
std::vector< L1CaloRegion > getRegions(unsigned crate)
void printFedVector(const std::vector< int > &)
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, const edm::EventSetup &context) final
void printUpdatedFedMaskVerbose()
L1RCTProducer(const edm::ParameterSet &ps)
unsigned int queryDelayInLS
L1CaloEmCollection getNonisolatedEGObjects(unsigned crate)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< edm::InputTag > hcalDigis
void print(std::ostream &s) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
LuminosityBlockNumber_t luminosityBlock() const
~L1RCTProducer() override
void setHcalScale(const L1CaloHcalScale *hcalScale)
const std::vector< int > getFedVectorFromOmds(const edm::EventSetup &)
std::vector< edm::InputTag > ecalDigis
std::vector< int > bunchCrossings
std::vector< int > m_fed_in
L1CaloEmCollection getIsolatedEGObjects(unsigned crate)
void printUpdatedFedMask()
void updateFedVector(const edm::EventSetup &, bool getFromOmds, int)
void setL1CaloEtScale(const L1CaloEtScale *etScale)
static const int minBarrel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static const int minEndcap
void beginRun(edm::Run const &r, const edm::EventSetup &c) final
L1RCTChannelMask * fedUpdatedMask
static const int maxBarrel
void setEcalScale(const L1CaloEcalScale *ecalScale)
unsigned int queryIntervalInLS
void setRCTParameters(const L1RCTParameters *rctParameters)
static const int maxEndcap
void digiInput(const EcalTrigPrimDigiCollection &ecalCollection, const HcalTrigPrimDigiCollection &hcalCollection)
void setNoisyChannelMask(const L1RCTNoisyChannelMask *channelMask)
static const int crateFED[18][6]
std::vector< L1CaloRegion > L1CaloRegionCollection
T const * product() const
void setChannelMask(const L1RCTChannelMask *channelMask)