35 #include "L1Trigger/L1TCaloLayer1/src/UCTLayer1.hh"
36 #include "L1Trigger/L1TCaloLayer1/src/UCTCrate.hh"
37 #include "L1Trigger/L1TCaloLayer1/src/UCTCard.hh"
38 #include "L1Trigger/L1TCaloLayer1/src/UCTRegion.hh"
39 #include "L1Trigger/L1TCaloLayer1/src/UCTTower.hh"
40 #include "L1Trigger/L1TCaloLayer1/src/UCTGeometry.hh"
42 #include "L1Trigger/L1TCaloLayer1/src/UCTObject.hh"
43 #include "L1Trigger/L1TCaloLayer1/src/UCTSummaryCard.hh"
44 #include "L1Trigger/L1TCaloLayer1/src/UCTGeometryExtended.hh"
58 #include "L1Trigger/L1TCaloLayer1/src/L1TCaloLayer1FetchLUTs.hh"
59 #include "L1Trigger/L1TCaloLayer1/src/UCTLogging.hh"
62 using namespace l1tcalo;
90 std::vector<std::vector<std::vector<uint32_t>>>
pumLUT;
122 :
nPumBins(iConfig.getParameter<unsigned
int>(
"nPumBins")),
125 jetSeed(iConfig.getParameter<unsigned
int>(
"jetSeed")),
126 tauSeed(iConfig.getParameter<unsigned
int>(
"tauSeed")),
128 eGammaSeed(iConfig.getParameter<unsigned
int>(
"eGammaSeed")),
132 fwVersion(iConfig.getParameter<
int>(
"firmwareVersion")),
134 std::vector<double> pumLUTData;
135 char pumLUTString[10];
136 for (uint32_t pumBin = 0; pumBin <
nPumBins; pumBin++) {
137 for (uint32_t side = 0; side < 2; side++) {
139 sprintf(pumLUTString,
"pumLUT%2.2dp", pumBin);
141 sprintf(pumLUTString,
"pumLUT%2.2dn", pumBin);
142 pumLUTData = iConfig.
getParameter<std::vector<double>>(pumLUTString);
143 for (uint32_t
iEta = 0;
iEta <
std::max((uint32_t)pumLUTData.size(), MaxUCTRegionsEta);
iEta++) {
146 if (pumLUTData.size() != (MaxUCTRegionsEta))
147 edm::LogError(
"L1TCaloSummary") <<
"PUM LUT Data size integrity check failed; Expected size = "
148 << MaxUCTRegionsEta <<
"; Provided size = " << pumLUTData.size()
149 <<
"; Will use what is provided :(" << std::endl;
152 produces<L1JetParticleCollection>(
"Boosted");
178 std::vector<UCTRegion*> inputRegions;
179 inputRegions.clear();
182 edm::LogError(
"L1TCaloSummary") <<
"UCT: Failed to get regions from region collection!";
185 UCTRegionIndex
r =
g.getUCTRegionIndexFromL1CaloRegion(
i.gctEta(),
i.gctPhi());
186 UCTTowerIndex
t =
g.getUCTTowerIndexFromL1CaloRegion(
r,
i.raw());
188 uint32_t absCaloPhi =
std::abs(
t.second);
189 bool negativeEta =
false;
192 uint32_t crate =
g.getCrate(
t.first,
t.second);
193 uint32_t card =
g.getCard(
t.first,
t.second);
194 uint32_t
region =
g.getRegion(absCaloEta, absCaloPhi);
196 test->setRegionSummary(
i.raw());
197 inputRegions.push_back(
test);
202 edm::LogError(
"L1TCaloSummary") <<
"UCT: Failed to process summary card" << std::endl;
211 std::list<UCTObject*> boostedJetObjs =
summaryCard->getBoostedJetObjs();
212 for (std::list<UCTObject*>::const_iterator
i = boostedJetObjs.begin();
i != boostedJetObjs.end();
i++) {
213 const UCTObject*
object = *
i;
217 bitset<3> activeRegionEtaPattern = 0;
219 bool activeStrip =
false;
220 for (uint32_t iPhi = 0; iPhi < 3; iPhi++) {
221 if (
object->boostedJetRegionET()[3 *
iEta + iPhi] > 30 &&
222 object->boostedJetRegionET()[3 *
iEta + iPhi] >
object->et() * 0.0625)
226 activeRegionEtaPattern |= (0x1 <<
iEta);
228 bitset<3> activeRegionPhiPattern = 0;
229 for (uint32_t iPhi = 0; iPhi < 3; iPhi++) {
230 bool activeStrip =
false;
232 if (
object->boostedJetRegionET()[3 *
iEta + iPhi] > 30 &&
233 object->boostedJetRegionET()[3 *
iEta + iPhi] >
object->et() * 0.0625)
237 activeRegionPhiPattern |= (0x1 << iPhi);
239 string regionEta = activeRegionEtaPattern.to_string<char, std::string::traits_type, std::string::allocator_type>();
240 string regionPhi = activeRegionPhiPattern.to_string<char, std::string::traits_type, std::string::allocator_type>();
241 if (
std::abs(
eta) < 2.5 && (regionEta ==
"010" || regionPhi ==
"010" || regionEta ==
"110" || regionPhi ==
"110" ||
242 regionEta ==
"011" || regionPhi ==
"011"))