Skip to content

Commit

Permalink
Merge pull request #46987 from smuzaffar/simulation-upgrade-code-checks1
Browse files Browse the repository at this point in the history
[SIMULATION-UPGRADE] Apply code checks/format
  • Loading branch information
cmsbuild authored Dec 19, 2024
2 parents c812bd4 + da1bf58 commit 66e6d68
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ AllLayerClusterToTracksterAssociatorsProducer::AllLayerClusterToTracksterAssocia
const auto& tracksterCollections = pset.getParameter<std::vector<edm::InputTag>>("tracksterCollections");
for (const auto& tag : tracksterCollections) {
std::string label = tag.label();
if (tag.instance() != "") {
if (!tag.instance().empty()) {
label += tag.instance();
}
tracksterCollectionTokens_.emplace_back(label, consumes<std::vector<ticl::Trackster>>(tag));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "LCToCPAssociatorByEnergyScoreProducer.h"

#include <memory>

template <typename HIT>
LCToCPAssociatorByEnergyScoreProducer<HIT>::LCToCPAssociatorByEnergyScoreProducer(const edm::ParameterSet &ps)
: hitMap_(consumes<std::unordered_map<DetId, const unsigned int>>(ps.getParameter<edm::InputTag>("hitMapTag"))),
Expand All @@ -13,7 +15,7 @@ LCToCPAssociatorByEnergyScoreProducer<HIT>::LCToCPAssociatorByEnergyScoreProduce
hits_token_.push_back(consumes<std::vector<HIT>>(label));
}

rhtools_.reset(new hgcal::RecHitTools());
rhtools_ = std::make_shared<hgcal::RecHitTools>();

// Register the product
produces<ticl::LayerClusterToCaloParticleAssociator>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "LCToSCAssociatorByEnergyScoreProducer.h"

#include <memory>

template <typename HIT>
LCToSCAssociatorByEnergyScoreProducer<HIT>::LCToSCAssociatorByEnergyScoreProducer(const edm::ParameterSet &ps)
: hitMap_(consumes<std::unordered_map<DetId, const unsigned int>>(ps.getParameter<edm::InputTag>("hitMapTag"))),
Expand All @@ -13,7 +15,7 @@ LCToSCAssociatorByEnergyScoreProducer<HIT>::LCToSCAssociatorByEnergyScoreProduce
hits_token_.push_back(consumes<std::vector<HIT>>(label));
}

rhtools_.reset(new hgcal::RecHitTools());
rhtools_ = std::make_shared<hgcal::RecHitTools>();

// Register the product
produces<ticl::LayerClusterToSimClusterAssociator>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Original author: Leonardo Cristella

// user include files
#include <memory>

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"

Expand Down Expand Up @@ -29,7 +31,7 @@ class LCToSimTSAssociatorByEnergyScoreProducer : public edm::global::EDProducer<

LCToSimTSAssociatorByEnergyScoreProducer::LCToSimTSAssociatorByEnergyScoreProducer(const edm::ParameterSet &ps)
: caloGeometry_(esConsumes<CaloGeometry, CaloGeometryRecord>()) {
rhtools_.reset(new hgcal::RecHitTools());
rhtools_ = std::make_shared<hgcal::RecHitTools>();

// Register the product
produces<ticl::LayerClusterToSimTracksterAssociator>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Original author: Leonardo Cristella

// user include files
#include <memory>

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"

Expand Down Expand Up @@ -41,7 +43,7 @@ MultiClusterAssociatorByEnergyScoreProducer::MultiClusterAssociatorByEnergyScore
for (auto &label : hits_label_) {
hits_token_.push_back(consumes<HGCRecHitCollection>(label));
}
rhtools_.reset(new hgcal::RecHitTools());
rhtools_ = std::make_shared<hgcal::RecHitTools>();

// Register the product
produces<hgcal::MultiClusterToCaloParticleAssociator>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Original author: Leonardo Cristella

// user include files
#include <memory>

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"

Expand Down Expand Up @@ -38,7 +40,7 @@ TSToSCAssociatorByEnergyScoreProducer::TSToSCAssociatorByEnergyScoreProducer(con
caloGeometry_(esConsumes<CaloGeometry, CaloGeometryRecord>()),
hardScatterOnly_(ps.getParameter<bool>("hardScatterOnly")),
hits_label_(ps.getParameter<std::vector<edm::InputTag>>("hits")) {
rhtools_.reset(new hgcal::RecHitTools());
rhtools_ = std::make_shared<hgcal::RecHitTools>();

for (auto &label : hits_label_) {
hits_token_.push_back(consumes<HGCRecHitCollection>(label));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Original author: Leonardo Cristella

// user include files
#include <memory>

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"

Expand Down Expand Up @@ -38,7 +40,7 @@ TSToSimTSAssociatorByEnergyScoreProducer::TSToSimTSAssociatorByEnergyScoreProduc
caloGeometry_(esConsumes<CaloGeometry, CaloGeometryRecord>()),
hardScatterOnly_(ps.getParameter<bool>("hardScatterOnly")),
hits_label_(ps.getParameter<std::vector<edm::InputTag>>("hits")) {
rhtools_.reset(new hgcal::RecHitTools());
rhtools_ = std::make_shared<hgcal::RecHitTools>();

for (auto &label : hits_label_) {
hits_token_.push_back(consumes<HGCRecHitCollection>(label));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Original author: Leonardo Cristella

// user include files
#include <memory>

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"

Expand Down Expand Up @@ -38,7 +40,7 @@ TSToSimTSHitLCAssociatorByEnergyScoreProducer::TSToSimTSHitLCAssociatorByEnergyS
caloGeometry_(esConsumes<CaloGeometry, CaloGeometryRecord>()),
hardScatterOnly_(ps.getParameter<bool>("hardScatterOnly")),
hits_label_(ps.getParameter<std::vector<edm::InputTag>>("hits")) {
rhtools_.reset(new hgcal::RecHitTools());
rhtools_ = std::make_shared<hgcal::RecHitTools>();

for (auto &label : hits_label_) {
hits_token_.push_back(consumes<HGCRecHitCollection>(label));
Expand Down

0 comments on commit 66e6d68

Please sign in to comment.