17 {{613, 614, 603, 702, 718, 1118},
18 {611, 612, 602, 700, 718, 1118},
19 {627, 610, 601, 716, 722, 1122},
20 {625, 626, 609, 714, 722, 1122},
21 {623, 624, 608, 712, 722, 1122},
22 {621, 622, 607, 710, 720, 1120},
23 {619, 620, 606, 708, 720, 1120},
24 {617, 618, 605, 706, 720, 1120},
25 {615, 616, 604, 704, 718, 1118},
26 {631, 632, 648, 703, 719, 1118},
27 {629, 630, 647, 701, 719, 1118},
28 {645, 628, 646, 717, 723, 1122},
29 {643, 644, 654, 715, 723, 1122},
30 {641, 642, 653, 713, 723, 1122},
31 {639, 640, 652, 711, 721, 1120},
32 {637, 638, 651, 709, 721, 1120},
33 {635, 636, 650, 707, 721, 1120},
34 {633, 634, 649, 705, 719, 1118}};
38 rct(new
L1RCT(rctLookupTables)),
43 bunchCrossings(conf.getParameter<
std::vector<
int> >(
"BunchCrossings")),
44 getFedsFromOmds(conf.getParameter<
bool>(
"getFedsFromOmds")),
45 queryDelayInLS(conf.getParameter<unsigned
int>(
"queryDelayInLS")),
46 queryIntervalInLS(conf.getParameter<unsigned
int>(
"queryIntervalInLS")),
47 conditionsLabel(conf.getParameter<
std::
string>(
"conditionsLabel")),
50 produces<L1CaloEmCollection>();
51 produces<L1CaloRegionCollection>();
53 for(
unsigned int ihc=0;ihc<
hcalDigis.size();ihc++){
54 consumes<edm::SortedCollection<HcalTriggerPrimitiveDigi,edm::StrictWeakOrdering<HcalTriggerPrimitiveDigi> > >(
hcalDigis[ihc]);
57 for(
unsigned int iec=0;iec<
ecalDigis.size();iec++){
58 consumes<edm::SortedCollection<EcalTriggerPrimitiveDigi,edm::StrictWeakOrdering<EcalTriggerPrimitiveDigi> > >(
ecalDigis[iec]);
64 if(
rct !=
nullptr)
delete rct;
167 for (
int i = 0;
i < 18;
i++)
169 for (
int j = 0; j < 2; j++)
171 for (
int k = 0;
k < 28;
k++)
176 for (
int k = 0;
k < 4;
k++)
195 bool useUpgradedHF=
false;
197 std::vector<int> caloFeds;
200 for(std::vector<int>::const_iterator cf = Feds.begin(); cf != Feds.end(); ++cf)
203 if((fedNum > 600 && fedNum <724) || fedNum==1118 || fedNum == 1120 || fedNum == 1122)
204 caloFeds.push_back(fedNum);
206 if(fedNum==1118 || fedNum == 1120 || fedNum == 1122) useUpgradedHF=
true;
210 for(
int cr = 0; cr < 18; ++cr)
215 bool fedFound =
false;
218 std::vector<int>::iterator fv=
std::find(caloFeds.begin(),caloFeds.end(),
crateFED[cr][
cs]);
219 if(fv!=caloFeds.end())
227 bool phi_even[2] = {
false};
262 if(useUpgradedHF)
break;
273 if(!useUpgradedHF)
break;
288 for(
int ieta = eta_min; ieta <=
eta_max; ++ieta)
291 for(
int even = 0; even<=1 ; even++)
302 for(
int even = 0; even<=1 ; even++)
322 const std::vector<int> fedvector = summary->
m_fed_in;
339 const std::vector<int> fedvector = summary->
m_fed_in;
362 <<
"From what I see the number of your your ECAL input digi collections.\n" 363 <<
"is different from the size of your HCAL digi input collections\n" 364 <<
"or the size of your BX factor collection" 365 <<
"They must be the same to correspond to the same Bxs\n" 366 <<
"It does not matter if one of them is empty\n";
391 for (
int j = 0; j<18; j++)
395 for (
int i = 0;
i<4;
i++)
399 rctEmCands->push_back(isolatedEGObjects.at(
i));
400 rctEmCands->push_back(nonisolatedEGObjects.at(
i));
405 for (
int i = 0;
i < 18;
i++)
408 for (
int j = 0; j < 22; j++)
411 rctRegions->push_back(regions.at(j));
427 std::cout <<
"Contents of given fedVector: ";
428 std::copy(fedVector.begin(), fedVector.end(), std::ostream_iterator<int>(
std::cout,
", "));
429 std::cout << std::endl;
441 std::cout <<
"Trying to print contents of fedUpdatedMask, but it doesn't exist!" << std::endl;
451 std::cout <<
"Contents of fedUpdatedMask: ";
453 std::cout <<
"--> ECAL mask: " << std::endl;
454 for (
int i = 0;
i < 18;
i++)
456 for (
int j = 0; j < 2; j++)
458 for (
int k = 0;
k < 28;
k++)
464 std::cout <<
"--> HCAL mask: " << std::endl;
465 for (
int i = 0;
i < 18;
i++)
467 for (
int j = 0; j < 2; j++)
469 for (
int k = 0;
k < 28;
k++)
475 std::cout <<
"--> HF mask: " << std::endl;
476 for (
int i = 0;
i < 18;
i++)
478 for (
int j = 0; j < 2; j++)
480 for (
int k = 0;
k < 4;
k++)
492 std::cout <<
"Trying to print contents of fedUpdatedMask, but it doesn't exist!" << std::endl;
std::vector< L1CaloEmCand > L1CaloEmCollection
auto_ptr< ClusterSequence > cs
std::string conditionsLabel
void produce(edm::Event &e, const edm::EventSetup &c) final
const std::vector< int > getFedVectorFromRunInfo(const edm::EventSetup &)
void updateConfiguration(const edm::EventSetup &)
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
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)