Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Nov 1, 2024
1 parent 31588a7 commit 2a40302
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 34 deletions.
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/CaloTopoClusterInputTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ StatusCode CaloTopoClusterInputTool::initialize() {
StatusCode CaloTopoClusterInputTool::finalize() { return AlgTool::finalize(); }

StatusCode CaloTopoClusterInputTool::cellIDMap(std::unordered_map<uint64_t, double>& aCells) {
uint totalNumberOfCells = 0;
[[maybe_unused]] uint totalNumberOfCells = 0;

// 1. ECAL barrel
// Get the input collection with calorimeter cells
Expand Down
4 changes: 0 additions & 4 deletions RecCalorimeter/src/components/CaloTowerTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ std::pair<dd4hep::DDSegmentation::Segmentation*, CaloTowerTool::SegmentationType
void CaloTowerTool::attachCells(float eta, float phi, uint halfEtaFin, uint halfPhiFin, edm4hep::MutableCluster& aEdmCluster, edm4hep::CalorimeterHitCollection* aEdmClusterCells, bool aEllipse) {
int etaId = idEta(eta);
int phiId = idPhi(phi);
int num1 = 0;
int num2 = 0;
std::vector<dd4hep::DDSegmentation::CellID> seen_cellIDs;
if (aEllipse) {
for (int iEta = etaId - halfEtaFin; iEta <= int(etaId + halfEtaFin); iEta++) {
Expand All @@ -458,7 +456,6 @@ void CaloTowerTool::attachCells(float eta, float phi, uint halfEtaFin, uint half
auto cellclone = cell.clone();
aEdmClusterCells->push_back(cellclone);
aEdmCluster.addToHits(cellclone);
num1++;
}
}
}
Expand All @@ -474,7 +471,6 @@ void CaloTowerTool::attachCells(float eta, float phi, uint halfEtaFin, uint half
auto cellclone = cell.clone();
aEdmClusterCells->push_back(cellclone);
aEdmCluster.addToHits(cellclone);
num2++;
}
}
}
Expand Down
9 changes: 0 additions & 9 deletions RecCalorimeter/src/components/CreateCaloCells.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,6 @@ class CreateCaloCells : public Gaudi::Algorithm {
"to to change segmentation (e.g. ID of the "
"ECal)"};

/** Temporary: for use with MergeLayer tool
* MergeLayer is going to be replaced by RedoSegmentation once we can define
* segmentation with variable cell (layer) size.
* This property won't be needed anymore.
*/
unsigned int m_activeVolumesNumber;
/// Use only volume ID? If false, using PhiEtaSegmentation
bool m_useVolumeIdOnly;

/// Pointer to the geometry service
ServiceHandle<IGeoSvc> m_geoSvc;
dd4hep::VolumeManager m_volman;
Expand Down
10 changes: 0 additions & 10 deletions RecCalorimeter/src/components/CreateCaloCellsNoise.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@ class CreateCaloCellsNoise : public Gaudi::Algorithm {
"Value of the field that identifies the volume "
"to to change segmentation (e.g. ID of the "
"ECal)"};

/** Temporary: for use with MergeLayer tool
* MergeLayer is going to be replaced by RedoSegmentation once we can define
* segmentation with variable cell (layer) size.
* This property won't be needed anymore.
*/
unsigned int m_activeVolumesNumber;
/// Use only volume ID? If false, using PhiEtaSegmentation
bool m_useVolumeIdOnly;

/// Pointer to the geometry service
ServiceHandle<IGeoSvc> m_geoSvc;
dd4hep::VolumeManager m_volman;
Expand Down
2 changes: 0 additions & 2 deletions RecCalorimeter/src/components/CreateCaloClusters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ StatusCode CreateCaloClusters::execute(const EventContext&) const {
posCell = m_cellPositionsHCalTool->xyzPosition(cellId);
if ( !calibECal && !m_doCryoCorrection)
cellEnergy = cellEnergy * (1/m_ehHCal);
else if ( m_doCryoCorrection )
cellEnergy = cellEnergy;
}

newCell.setEnergy(cellEnergy);
Expand Down
2 changes: 0 additions & 2 deletions RecCalorimeter/src/components/CreateCaloClusters.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ class CreateCaloClusters : public Gaudi::Algorithm {
/// Handle for tool to get positions in HCal Barrel and Ext Barrel, no Segmentation
ToolHandle<ICellPositionsTool> m_cellPositionsHCalNoSegTool{"CellPositionsHCalBarrelNoSegTool", this};

const char *types[2] = {"EM", "HAD"};

mutable TH1F* m_energyScale;
mutable TH1F* m_benchmark;
mutable TH1F* m_fractionEMcluster;
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/LayeredCaloTowerTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void LayeredCaloTowerTool::attachCells(float eta, float phi, uint halfEtaFin, ui
for (const auto& cell : *cells) {
float etaCell = m_segmentation->eta(cell.getCellID());
float phiCell = m_segmentation->phi(cell.getCellID());
if ((abs(static_cast<long int>(idEta(etaCell)) - static_cast<long int>(idEta(eta))) <= halfEtaFin) && (abs(static_cast<long int>(idPhi(phiCell)) - static_cast<long int>(idPhi(phi))) <= halfPhiFin)) {
if ((std::abs(static_cast<long int>(idEta(etaCell)) - static_cast<long int>(idEta(eta))) <= halfEtaFin) && (std::abs(static_cast<long int>(idPhi(phiCell)) - static_cast<long int>(idPhi(phi))) <= halfPhiFin)) {
aEdmClusterCells->push_back(cell);
aEdmCluster.addToHits(aEdmClusterCells->at(aEdmClusterCells->size() - 1));
}
Expand Down
2 changes: 1 addition & 1 deletion RecCalorimeter/src/components/PreparePileup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ StatusCode PreparePileup::initialize() {
debug() << "Number of calorimeter towers (eta x phi) : " << m_nEtaTower << " x " << m_nPhiTower << endmsg;
// OPTIMISATION OF CLUSTER SIZE
// sanity check
if (!(m_nEtaFinal.size() == 0 && m_nPhiFinal.size() == 0) & !(m_nEtaFinal.size() == m_numLayers && m_nPhiFinal.size() == m_numLayers)) {
if (!(m_nEtaFinal.size() == 0 && m_nPhiFinal.size() == 0) && !(m_nEtaFinal.size() == m_numLayers && m_nPhiFinal.size() == m_numLayers)) {
error() << "Size of optimised window should be equal to number of layers or empty" << endmsg;
return StatusCode::FAILURE;
}
Expand Down
4 changes: 0 additions & 4 deletions RecFCCeeCalorimeter/src/components/CaloTowerToolFCCee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,6 @@ std::pair<dd4hep::DDSegmentation::Segmentation*, CaloTowerToolFCCee::Segmentatio
void CaloTowerToolFCCee::attachCells(float theta, float phi, uint halfThetaFin, uint halfPhiFin, edm4hep::MutableCluster& aEdmCluster, edm4hep::CalorimeterHitCollection* aEdmClusterCells, bool aEllipse) {
int thetaId = idTheta(theta);
int phiId = idPhi(phi);
int num1 = 0;
int num2 = 0;
std::vector<dd4hep::DDSegmentation::CellID> seen_cellIDs;
if (aEllipse) {
for (int iTheta = thetaId - halfThetaFin; iTheta <= int(thetaId + halfThetaFin); iTheta++) {
Expand All @@ -394,7 +392,6 @@ void CaloTowerToolFCCee::attachCells(float theta, float phi, uint halfThetaFin,
auto cellclone = cell.clone();
aEdmClusterCells->push_back(cellclone);
aEdmCluster.addToHits(cellclone);
num1++;
}
}
}
Expand All @@ -410,7 +407,6 @@ void CaloTowerToolFCCee::attachCells(float theta, float phi, uint halfThetaFin,
auto cellclone = cell.clone();
aEdmClusterCells->push_back(cellclone);
aEdmCluster.addToHits(cellclone);
num2++;
}
}
}
Expand Down

0 comments on commit 2a40302

Please sign in to comment.