Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DataFormats/L1GlobalTrigger/src/L1GtfeExtWord.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ L1GtfeExtWord::~L1GtfeExtWord() {
bool L1GtfeExtWord::operator==(const L1GtfeExtWord& result) const {
// base class

const L1GtfeWord gtfeResult = result;
const L1GtfeWord& gtfeResult = result;
const L1GtfeWord gtfeThis = *this;

if (gtfeThis != gtfeResult) {
Expand Down
2 changes: 1 addition & 1 deletion EventFilter/L1TRawToDigi/plugins/OmtfUnpacker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ namespace omtf {
// loop over AMC's
//
unsigned int blockNum = 0;
for (auto amc : packetAmc13.payload()) {
for (const auto& amc : packetAmc13.payload()) {
amc::BlockHeader bh = amc.blockHeader();
if (debug) {
std::ostringstream str;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace l1t {
namespace emtf {

int CountersBlockUnpacker::checkFormat(const Block& block) {
auto payload = block.payload();
const auto& payload = block.payload();
int errors = 0;

//Check the number of 16-bit words
Expand Down Expand Up @@ -91,7 +91,7 @@ namespace l1t {
// Get the payload for this block, made up of 16-bit words (0xffff)
// Format defined in MTF7Payload::getBlock() in src/Block.cc
// payload[0] = bits 0-15, payload[1] = 16-31, payload[3] = 32-47, etc.
auto payload = block.payload();
const auto& payload = block.payload();

// Check Format of Payload
l1t::emtf::Counters Counters_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace l1t {
namespace emtf {

int GEMBlockUnpacker::checkFormat(const Block& block) {
auto payload = block.payload();
const auto& payload = block.payload();
int errors = 0;

// Check the number of 16-bit words
Expand Down Expand Up @@ -125,7 +125,7 @@ namespace l1t {
// Get the payload for this block, made up of 16-bit words (0xffff)
// Format defined in MTF7Payload::getBlock() in src/Block.cc
// payload[0] = bits 0-15, payload[1] = 16-31, payload[3] = 32-47, etc.
auto payload = block.payload();
const auto& payload = block.payload();

// Run 3 has a different EMTF DAQ output format since August 26th
// Computed as (Year - 2000)*2^9 + Month*2^5 + Day (see Block.cc and EMTFBlockTrailers.cc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace l1t {
namespace emtf {

int HeadersBlockUnpacker::checkFormat(const Block& block) {
auto payload = block.payload();
const auto& payload = block.payload();
int errors = 0;

//Check the number of 16-bit words
Expand Down Expand Up @@ -163,7 +163,7 @@ namespace l1t {
// Get the payload for this block, made up of 16-bit words (0xffff)
// Format defined in MTF7Payload::getBlock() in src/Block.cc
// payload[0] = bits 0-15, payload[1] = 16-31, payload[3] = 32-47, etc.
auto payload = block.payload();
const auto& payload = block.payload();

// Check Format of Payload
l1t::emtf::AMC13Header AMC13Header_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace l1t {
namespace emtf {

int MEBlockUnpacker::checkFormat(const Block& block) {
auto payload = block.payload();
const auto& payload = block.payload();
int errors = 0;

// Check the number of 16-bit words
Expand Down Expand Up @@ -151,7 +151,7 @@ namespace l1t {
// Get the payload for this block, made up of 16-bit words (0xffff)
// Format defined in MTF7Payload::getBlock() in src/Block.cc
// payload[0] = bits 0-15, payload[1] = 16-31, payload[3] = 32-47, etc.
auto payload = block.payload();
const auto& payload = block.payload();

// Assign payload to 16-bit words
uint16_t MEa = payload[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace l1t {
namespace emtf {

int RPCBlockUnpacker::checkFormat(const Block& block) {
auto payload = block.payload();
const auto& payload = block.payload();
int errors = 0;

// Check the number of 16-bit words
Expand Down Expand Up @@ -119,7 +119,7 @@ namespace l1t {
// Get the payload for this block, made up of 16-bit words (0xffff)
// Format defined in MTF7Payload::getBlock() in src/Block.cc
// payload[0] = bits 0-15, payload[1] = 16-31, payload[3] = 32-47, etc.
auto payload = block.payload();
const auto& payload = block.payload();

// Run 3 has a different EMTF DAQ output format since August 26th
// Computed as (Year - 2000)*2^9 + Month*2^5 + Day (see Block.cc and EMTFBlockTrailers.cc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace l1t {
namespace emtf {

int SPBlockUnpacker::checkFormat(const Block& block) {
auto payload = block.payload();
const auto& payload = block.payload();
int errors = 0;

// Check the number of 16-bit words
Expand Down Expand Up @@ -174,7 +174,7 @@ namespace l1t {
// Get the payload for this block, made up of 16-bit words (0xffff)
// Format defined in MTF7Payload::getBlock() in src/Block.cc
// payload[0] = bits 0-15, payload[1] = 16-31, payload[3] = 32-47, etc.
auto payload = block.payload();
const auto& payload = block.payload();

// FW version is computed as (Year - 2000)*2^9 + Month*2^5 + Day (see Block.cc and EMTFBlockTrailers.cc)
bool useNNBits_ = getAlgoVersion() >= 11098; // FW versions >= 26.10.2021
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace l1t {
namespace emtf {

int TrailersBlockUnpacker::checkFormat(const Block& block) {
auto payload = block.payload();
const auto& payload = block.payload();
int errors = 0;

//Check the number of 16-bit words
Expand Down Expand Up @@ -128,7 +128,7 @@ namespace l1t {
// Get the payload for this block, made up of 16-bit words (0xffff)
// Format defined in MTF7Payload::getBlock() in src/Block.cc
// payload[0] = bits 0-15, payload[1] = 16-31, payload[3] = 32-47, etc.
auto payload = block.payload();
const auto& payload = block.payload();

// Check Format of Payload
l1t::emtf::AMC13Trailer AMC13Trailer_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace l1t {
return true;
}

auto payload = block.payload();
const auto& payload = block.payload();

int nBX, firstBX, lastBX;
// Check if per BX zero suppression was enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace l1t {
return true;
}

auto payload = block.payload();
const auto& payload = block.payload();

int nBX, firstBX, lastBX;
// Check if per BX zero suppression was enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace l1t {
return true;
}

auto payload = block.payload();
const auto& payload = block.payload();

int nBX, firstBX, lastBX;
// Check if per BX zero suppression was enabled
Expand Down
1 change: 1 addition & 0 deletions EventFilter/L1TRawToDigi/src/AMC13Spec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ namespace amc13 {
Header block_h(data++);
std::vector<amc::BlockHeader> headers;

headers.reserve(block_h.getNumberOfAMCs());
for (unsigned int i = 0; i < block_h.getNumberOfAMCs(); ++i)
headers.push_back(amc::BlockHeader(data++));

Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/CSCTriggerPrimitives/src/CSCGEMMatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ uint16_t CSCGEMMatcher::mitigatedSlopeByConsistency(const CSCCLCTDigi& clct,
const bool isME1a(station_ == 1 and clct.getKeyStrip() > CSCConstants::MAX_HALF_STRIP_ME1B);

// extract hit values from CLCT hit matrix
std::vector<std::vector<uint16_t>> CLCTHitMatrix = clct.getHits();
const std::vector<std::vector<uint16_t>>& CLCTHitMatrix = clct.getHits();
int CLCTHits[6] = {-1, -1, -1, -1, -1, -1};

for (unsigned layer = 0; layer < CLCTHitMatrix.size(); ++layer) {
Expand Down
1 change: 1 addition & 0 deletions L1Trigger/DTTriggerPhase2/src/LateralityCoarsedProvider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ std::vector<std::vector<short>> LateralityCoarsedProvider::convertString(std::st

for (size_t i = 0; i < chain.size(); i += 4) {
std::vector<short> group;
group.reserve(4);
for (size_t j = 0; j < 4; j++) {
group.push_back(chain[i + j] - '0'); // Convert the character to integer
}
Expand Down
1 change: 1 addition & 0 deletions L1Trigger/DTTriggerPhase2/src/MuonPathCorFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ void MuonPathCorFitter::fillLuts() {
ifin2sl >> line;

std::vector<int> myNumbers;
myNumbers.reserve(line.size());
for (size_t i = 0; i < line.size(); i++) {
// This converts the char into an int and pushes it into vec
myNumbers.push_back(line[i] - '0'); // The digits will be in the same order as before
Expand Down
7 changes: 5 additions & 2 deletions L1Trigger/DTTriggerPhase2/src/MuonPathSLFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void MuonPathSLFitter::run(edm::Event &iEvent,
// fit per SL (need to allow for multiple outputs for a single mpath)
// for (auto &muonpath : muonpaths) {
if (!muonpaths.empty()) {
auto muonpath = muonpaths[0];
const auto &muonpath = muonpaths[0];
int rawId = muonpath->primitive(0)->cameraId();
if (muonpath->primitive(0)->cameraId() == -1) {
rawId = muonpath->primitive(1)->cameraId();
Expand All @@ -79,7 +79,7 @@ void MuonPathSLFitter::run(edm::Event &iEvent,

for (size_t i = 0; i < muonpaths.size(); i++) {
auto muonpath = muonpaths[i];
auto lats = lateralities[i];
const auto &lats = lateralities[i];
analyze(muonpath, lats, metaPrimitives);
}
}
Expand Down Expand Up @@ -448,6 +448,7 @@ void MuonPathSLFitter::fillLuts() {
ifinsl1 >> line;

std::vector<int> myNumbers;
myNumbers.reserve(line.size());
for (size_t i = 0; i < line.size(); i++) {
// This converts the char into an int and pushes it into vec
myNumbers.push_back(line[i] - '0'); // The digits will be in the same order as before
Expand All @@ -461,6 +462,7 @@ void MuonPathSLFitter::fillLuts() {
ifinsl2 >> line;

std::vector<int> myNumbers;
myNumbers.reserve(line.size());
for (size_t i = 0; i < line.size(); i++) {
// This converts the char into an int and pushes it into vec
myNumbers.push_back(line[i] - '0'); // The digits will be in the same order as before
Expand All @@ -474,6 +476,7 @@ void MuonPathSLFitter::fillLuts() {
ifinsl3 >> line;

std::vector<int> myNumbers;
myNumbers.reserve(line.size());
for (size_t i = 0; i < line.size(); i++) {
// This converts the char into an int and pushes it into vec
myNumbers.push_back(line[i] - '0'); // The digits will be in the same order as before
Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/L1CaloTrigger/plugins/L1NNCaloTauEmulator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ void L1NNCaloTauEmulator::produce(edm::Event& iEvent, const edm::EventSetup& eSe

for (int clNxMIdx = 0; clNxMIdx < Nclusters_CE; clNxMIdx++) {
// Indexing of cl3ds is the same as the one of clNxMs
InputHGCluster HGClu = HGClusters[clNxMIdx];
const InputHGCluster& HGClu = HGClusters[clNxMIdx];

// Fill inputs for Tensorflow inference
for (int eta = 0; eta < IEta_dim; ++eta) {
Expand Down
40 changes: 20 additions & 20 deletions L1Trigger/L1TCaloLayer1/src/L1TCaloLayer1FetchLUTs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
using namespace l1tcalo;

bool L1TCaloLayer1FetchLUTs(
const L1TCaloLayer1FetchLUTsTokens &iTokens,
const edm::EventSetup &iSetup,
std::vector<std::array<std::array<std::array<uint32_t, nEtBins>, nCalSideBins>, nCalEtaBins> > &eLUT,
std::vector<std::array<std::array<std::array<uint32_t, nEtBins>, nCalSideBins>, nCalEtaBins> > &hLUT,
std::vector<std::array<std::array<uint32_t, nEtBins>, nHfEtaBins> > &hfLUT,
std::vector<unsigned long long int> &hcalFBLUT,
std::vector<unsigned int> &ePhiMap,
std::vector<unsigned int> &hPhiMap,
std::vector<unsigned int> &hfPhiMap,
const L1TCaloLayer1FetchLUTsTokens& iTokens,
const edm::EventSetup& iSetup,
std::vector<std::array<std::array<std::array<uint32_t, nEtBins>, nCalSideBins>, nCalEtaBins> >& eLUT,
std::vector<std::array<std::array<std::array<uint32_t, nEtBins>, nCalSideBins>, nCalEtaBins> >& hLUT,
std::vector<std::array<std::array<uint32_t, nEtBins>, nHfEtaBins> >& hfLUT,
std::vector<unsigned long long int>& hcalFBLUT,
std::vector<unsigned int>& ePhiMap,
std::vector<unsigned int>& hPhiMap,
std::vector<unsigned int>& hfPhiMap,
bool useLSB,
bool useCalib,
bool useECALLUT,
Expand All @@ -44,7 +44,7 @@ bool L1TCaloLayer1FetchLUTs(
bool useHCALFBLUT,
int fwVersion) {
int hfValid = 1;
const HcalTrigTowerGeometry &pG = iSetup.getData(iTokens.geom_);
const HcalTrigTowerGeometry& pG = iSetup.getData(iTokens.geom_);
if (!pG.use1x1()) {
edm::LogError("L1TCaloLayer1FetchLUTs")
<< "Using Stage2-Layer1 but HCAL Geometry has use1x1 = 0! HF will be suppressed. Check Global Tag, etc.";
Expand All @@ -71,7 +71,7 @@ bool L1TCaloLayer1FetchLUTs(
// etBin = size of Real ET Bins vector
// phiBin = max(Real Phi Bins vector)
// So, index = phiBin*etBin*28+etBin*28+ieta
auto ecalScaleETBins = caloParams.layer1ECalScaleETBins();
const auto& ecalScaleETBins = caloParams.layer1ECalScaleETBins();
auto ecalScalePhiBins = caloParams.layer1ECalScalePhiBins();
if (ecalScalePhiBins.empty()) {
// Backwards-compatibility (no phi binning)
Expand All @@ -81,14 +81,14 @@ bool L1TCaloLayer1FetchLUTs(
return false;
}
size_t numEcalPhiBins = (*std::max_element(ecalScalePhiBins.begin(), ecalScalePhiBins.end())) + 1;
auto ecalSF = caloParams.layer1ECalScaleFactors();
auto ecalZSF = caloParams.layer1ECalZSFactors();
const auto& ecalSF = caloParams.layer1ECalScaleFactors();
const auto& ecalZSF = caloParams.layer1ECalZSFactors();
if (ecalSF.size() != ecalScaleETBins.size() * numEcalPhiBins * 28) {
edm::LogError("L1TCaloLayer1FetchLUTs") << "caloParams.layer1ECalScaleFactors().size() != "
"caloParams.layer1ECalScaleETBins().size()*numEcalPhiBins*28 !!";
return false;
}
auto hcalScaleETBins = caloParams.layer1HCalScaleETBins();
const auto& hcalScaleETBins = caloParams.layer1HCalScaleETBins();
auto hcalScalePhiBins = caloParams.layer1HCalScalePhiBins();
if (hcalScalePhiBins.empty()) {
hcalScalePhiBins.resize(36, 0);
Expand All @@ -97,8 +97,8 @@ bool L1TCaloLayer1FetchLUTs(
return false;
}
size_t numHcalPhiBins = (*std::max_element(hcalScalePhiBins.begin(), hcalScalePhiBins.end())) + 1;
auto hcalSF = caloParams.layer1HCalScaleFactors();
auto hcalZSF = caloParams.layer1HCalZSFactors();
const auto& hcalSF = caloParams.layer1HCalScaleFactors();
const auto& hcalZSF = caloParams.layer1HCalZSFactors();
if (hcalSF.size() != hcalScaleETBins.size() * numHcalPhiBins * 28) {
edm::LogError("L1TCaloLayer1FetchLUTs") << "caloParams.layer1HCalScaleFactors().size() != "
"caloParams.layer1HCalScaleETBins().size()*numHcalPhiBins*28 !!";
Expand All @@ -110,7 +110,7 @@ bool L1TCaloLayer1FetchLUTs(
// etBin = size of Real ET Bins vector
// phiBin = max(Real Phi Bins vector)
// So, index = phiBin*etBin*12+etBin*12+ieta
auto hfScaleETBins = caloParams.layer1HFScaleETBins();
const auto& hfScaleETBins = caloParams.layer1HFScaleETBins();
auto hfScalePhiBins = caloParams.layer1HFScalePhiBins();
if (hfScalePhiBins.empty()) {
hfScalePhiBins.resize(36, 0);
Expand All @@ -119,7 +119,7 @@ bool L1TCaloLayer1FetchLUTs(
return false;
}
size_t numHFPhiBins = (*std::max_element(hfScalePhiBins.begin(), hfScalePhiBins.end())) + 1;
auto hfSF = caloParams.layer1HFScaleFactors();
const auto& hfSF = caloParams.layer1HFScaleFactors();
if (hfSF.size() != hfScaleETBins.size() * numHFPhiBins * 12) {
edm::LogError("L1TCaloLayer1FetchLUTs")
<< "caloParams.layer1HFScaleFactors().size() != caloParams.layer1HFScaleETBins().size()*numHFPhiBins*12 !!";
Expand All @@ -136,8 +136,8 @@ bool L1TCaloLayer1FetchLUTs(
// HCAL FB LUT will be a 1*28 array:
// ieta = 28 eta scale factors (1 .. 28)
// So, index = ieta
auto fbLUTUpper = caloParams.layer1HCalFBLUTUpper();
auto fbLUTLower = caloParams.layer1HCalFBLUTLower();
const auto& fbLUTUpper = caloParams.layer1HCalFBLUTUpper();
const auto& fbLUTLower = caloParams.layer1HCalFBLUTLower();
// Only check for HCAL FB LUT if useHCALFBLUT = true
if (useHCALFBLUT) {
if (fbLUTUpper.size() != nCalEtaBins) {
Expand Down
4 changes: 2 additions & 2 deletions L1Trigger/L1TCalorimeter/src/HardwareSortingMethods.cc
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ namespace l1t {
super_sort_matrix_rows(non_iso_stage2_row_sorted_matrix_sig, N_EGAMMA_SECOND_GROUP_SIZE, N_KEEP_EGAMMA);

//Prepare output
std::vector<l1t::L1Candidate> sorted_iso_egammas = iso_stage2_super_sorted_matrix_sig[0];
std::vector<l1t::L1Candidate> sorted_noniso_egammas = non_iso_stage2_super_sorted_matrix_sig[0];
const std::vector<l1t::L1Candidate>& sorted_iso_egammas = iso_stage2_super_sorted_matrix_sig[0];
const std::vector<l1t::L1Candidate>& sorted_noniso_egammas = non_iso_stage2_super_sorted_matrix_sig[0];

//verbose = false;

Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/L1TCalorimeter/src/PUSubtractionMethods.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace l1t {
void RegionCorrection(const std::vector<l1t::CaloRegion> &regions,
std::vector<l1t::CaloRegion> *subRegions,
CaloParamsHelper const *params) {
std::string regionPUSType = params->regionPUSType();
const std::string &regionPUSType = params->regionPUSType();

if (regionPUSType == "None") {
for (std::vector<CaloRegion>::const_iterator notCorrectedRegion = regions.begin();
Expand Down
4 changes: 2 additions & 2 deletions L1Trigger/L1TGEM/src/ME0StubAlgoPatUnit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ std::pair<std::vector<double>, double> l1t::me0::calculateCentroids(
std::vector<int> bxs;
for (int ly = 0; ly < static_cast<int>(maskedData.size()); ++ly) {
auto data = maskedData[ly];
auto bxData = partitionBxData[ly];
const auto& bxData = partitionBxData[ly];
const auto temp = findCentroid(data);
double curCentroid = temp.first;
std::vector<int> hitsIndices = temp.second;
Expand Down Expand Up @@ -199,4 +199,4 @@ ME0StubPrimitive l1t::me0::patUnit(const std::vector<uint64_t>& data,
best.updateQuality();

return best;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ L1TGlobalPrescalesVetosESProducer::L1TGlobalPrescalesVetosESProducer(const edm::

// veto mask
// Setting veto mask to default 0 (no veto)
triggerVetoMasks.reserve(m_numberPhysTriggers);
for (unsigned int iAlg = 0; iAlg < m_numberPhysTriggers; iAlg++)
triggerVetoMasks.push_back(0);

Expand Down
Loading