Skip to content
Snippets Groups Projects
Commit 301e9175 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'egammaSuperCluster_select_passCaloDetDescrMgr' into 'master'

egammaSuperCluster pass the CaloDetDescrManager by value to the CaloCellList select

See merge request !32084
parents 235b59f3 4065c1e2
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!32084egammaSuperCluster pass the CaloDetDescrManager by value to the CaloCellList select
...@@ -189,10 +189,10 @@ bool egammaSuperClusterBuilder::matchesInWindow(const xAOD::CaloCluster *ref, ...@@ -189,10 +189,10 @@ bool egammaSuperClusterBuilder::matchesInWindow(const xAOD::CaloCluster *ref,
} }
std::unique_ptr<xAOD::CaloCluster> std::unique_ptr<xAOD::CaloCluster>
egammaSuperClusterBuilder::createNewCluster( egammaSuperClusterBuilder::createNewCluster(const std::vector<const xAOD::CaloCluster*>& clusters,
const std::vector<const xAOD::CaloCluster*>& clusters, const CaloDetDescrManager& mgr,
const CaloDetDescrManager& mgr, xAOD::EgammaParameters::EgammaType egType) const
xAOD::EgammaParameters::EgammaType egType) const { {
const auto acSize = clusters.size(); const auto acSize = clusters.size();
if (acSize == 0) { if (acSize == 0) {
...@@ -200,7 +200,8 @@ std::unique_ptr<xAOD::CaloCluster> ...@@ -200,7 +200,8 @@ std::unique_ptr<xAOD::CaloCluster>
return nullptr; return nullptr;
} }
std::unique_ptr<xAOD::CaloCluster> newCluster(CaloClusterStoreHelper::makeCluster(clusters.at(0)->getCellLinks()->getCellContainer())); std::unique_ptr<xAOD::CaloCluster> newCluster(
CaloClusterStoreHelper::makeCluster(clusters.at(0)->getCellLinks()->getCellContainer()));
if (!newCluster) { if (!newCluster) {
ATH_MSG_ERROR("CaloClusterStoreHelper::makeCluster failed."); ATH_MSG_ERROR("CaloClusterStoreHelper::makeCluster failed.");
return nullptr; return nullptr;
...@@ -231,7 +232,8 @@ std::unique_ptr<xAOD::CaloCluster> ...@@ -231,7 +232,8 @@ std::unique_ptr<xAOD::CaloCluster>
cp0.etaEC = dde->eta_raw(); cp0.etaEC = dde->eta_raw();
cp0.phiEC = dde->phi_raw(); cp0.phiEC = dde->phi_raw();
} else { } else {
ATH_MSG_WARNING("Couldn't get CaloDetDescrElement from mgr for eta = " << cpRef.etaEC << ", phi = " << cpRef.phiEC); ATH_MSG_WARNING("Couldn't get CaloDetDescrElement from mgr for eta = " << cpRef.etaEC
<< ", phi = " << cpRef.phiEC);
} }
} }
...@@ -252,7 +254,8 @@ std::unique_ptr<xAOD::CaloCluster> ...@@ -252,7 +254,8 @@ std::unique_ptr<xAOD::CaloCluster>
for (size_t i = 0; i < acSize; i++) { for (size_t i = 0; i < acSize; i++) {
//Add te EM cells of the accumulated to the cluster //Add te EM cells of the accumulated to the cluster
if (addEMCellsToCluster(newCluster.get(),clusters[i], cp0).isFailure()) { if (addEMCellsToCluster(newCluster.get(),clusters[i], cp0).isFailure()) {
ATH_MSG_DEBUG("There was problem adding the topocluster cells to the the cluster: potentially no L2 or L3 cells in cluster"); ATH_MSG_DEBUG(
"There was problem adding the topocluster cells to the the cluster: potentially no L2 or L3 cells in cluster");
return nullptr; return nullptr;
} }
//Set the element Link to the constitents //Set the element Link to the constitents
...@@ -276,7 +279,7 @@ std::unique_ptr<xAOD::CaloCluster> ...@@ -276,7 +279,7 @@ std::unique_ptr<xAOD::CaloCluster>
} }
// Apply SW-style summation of TileGap3 cells (if necessary). // Apply SW-style summation of TileGap3 cells (if necessary).
if (addTileGap3CellsinWindow(newCluster.get()).isFailure()) { if (addTileGap3CellsinWindow(newCluster.get(),mgr).isFailure()) {
ATH_MSG_ERROR("Problem with the input cluster when running AddTileGap3CellsinWindow?"); ATH_MSG_ERROR("Problem with the input cluster when running AddTileGap3CellsinWindow?");
return nullptr; return nullptr;
} }
...@@ -424,7 +427,6 @@ StatusCode egammaSuperClusterBuilder::addL0L1EMCellsToCluster(xAOD::CaloCluster ...@@ -424,7 +427,6 @@ StatusCode egammaSuperClusterBuilder::addL0L1EMCellsToCluster(xAOD::CaloCluster
} }
if (!addCell) continue; if (!addCell) continue;
const CaloDetDescrElement *dde = cell->caloDDE(); const CaloDetDescrElement *dde = cell->caloDDE();
if(!dde){ if(!dde){
continue; continue;
...@@ -574,7 +576,8 @@ StatusCode egammaSuperClusterBuilder::makeCorrection1(xAOD::CaloCluster* cluster ...@@ -574,7 +576,8 @@ StatusCode egammaSuperClusterBuilder::makeCorrection1(xAOD::CaloCluster* cluster
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
StatusCode egammaSuperClusterBuilder::addTileGap3CellsinWindow(xAOD::CaloCluster *myCluster) const{ StatusCode egammaSuperClusterBuilder::addTileGap3CellsinWindow(xAOD::CaloCluster *myCluster,
const CaloDetDescrManager& mgr) const{
if (!myCluster) { if (!myCluster) {
ATH_MSG_ERROR("Invalid input in addRemainingCellsToCluster"); ATH_MSG_ERROR("Invalid input in addRemainingCellsToCluster");
...@@ -597,7 +600,7 @@ StatusCode egammaSuperClusterBuilder::addTileGap3CellsinWindow(xAOD::CaloCluster ...@@ -597,7 +600,7 @@ StatusCode egammaSuperClusterBuilder::addTileGap3CellsinWindow(xAOD::CaloCluster
const std::vector<CaloSampling::CaloSample> samples = {CaloSampling::TileGap3}; const std::vector<CaloSampling::CaloSample> samples = {CaloSampling::TileGap3};
for ( auto samp : samples ) { for ( auto samp : samples ) {
myList.select(myCluster->eta0(), myCluster->phi0(), searchWindowEta, searchWindowPhi,samp); myList.select(mgr,myCluster->eta0(), myCluster->phi0(), searchWindowEta, searchWindowPhi,samp);
cells.insert(cells.end(), myList.begin(), myList.end()); cells.insert(cells.end(), myList.begin(), myList.end());
} }
...@@ -708,6 +711,5 @@ egammaSuperClusterBuilder::findPhiSize(const egammaSuperClusterBuilder::CentralP ...@@ -708,6 +711,5 @@ egammaSuperClusterBuilder::findPhiSize(const egammaSuperClusterBuilder::CentralP
ATH_MSG_WARNING("phiSizeMinusEC is large: " << phiSize.minusEC << ", capping at 1.0"); ATH_MSG_WARNING("phiSizeMinusEC is large: " << phiSize.minusEC << ", capping at 1.0");
phiSize.minusEC = 1.0; phiSize.minusEC = 1.0;
} }
return phiSize; return phiSize;
} }
...@@ -36,7 +36,7 @@ protected: ...@@ -36,7 +36,7 @@ protected:
egammaSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator); egammaSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator);
/** should be called by the derived class in the initialize phase */ /** should be called by the derived class in the initialize phase */
StatusCode initialize() override; virtual StatusCode initialize() override;
/** Is clus in window center around ref? */ /** Is clus in window center around ref? */
bool matchesInWindow(const xAOD::CaloCluster *ref, bool matchesInWindow(const xAOD::CaloCluster *ref,
...@@ -107,9 +107,9 @@ private: ...@@ -107,9 +107,9 @@ private:
const PhiSize& phiSize) const; const PhiSize& phiSize) const;
/** functions to add all tile Gap 3 cells in a window*/ /** functions to add all tile Gap 3 cells in a window*/
StatusCode addTileGap3CellsinWindow(xAOD::CaloCluster *myCluster) const; StatusCode addTileGap3CellsinWindow(xAOD::CaloCluster *myCluster,
const CaloDetDescrManager& mgr) const;
/** function to calibrate the new clusters energy */ /** function to calibrate the new clusters energy */
StatusCode calibrateCluster(xAOD::CaloCluster* newCluster, StatusCode calibrateCluster(xAOD::CaloCluster* newCluster,
const CaloDetDescrManager& mgr, const CaloDetDescrManager& mgr,
......
...@@ -24,9 +24,9 @@ class electronSuperClusterBuilder : public egammaSuperClusterBuilder { ...@@ -24,9 +24,9 @@ class electronSuperClusterBuilder : public egammaSuperClusterBuilder {
electronSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator); electronSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator);
//Tool standard routines. //Tool standard routines.
StatusCode initialize() override final; virtual StatusCode initialize() override final;
StatusCode finalize() override final; virtual StatusCode finalize() override final;
StatusCode execute() override final; virtual StatusCode execute() override final;
private: private:
......
...@@ -25,11 +25,11 @@ class photonSuperClusterBuilder : public egammaSuperClusterBuilder { ...@@ -25,11 +25,11 @@ class photonSuperClusterBuilder : public egammaSuperClusterBuilder {
photonSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator); photonSuperClusterBuilder(const std::string& name, ISvcLocator* pSvcLocator);
//Tool standard routines. //Tool standard routines.
StatusCode initialize() override final; virtual StatusCode initialize() override final;
StatusCode finalize() override final; virtual StatusCode finalize() override final;
StatusCode execute() override final; virtual StatusCode execute() override final;
private: private:
/** Return extra clusters that can be added to make supercluster */ /** Return extra clusters that can be added to make supercluster */
std::vector<std::size_t> std::vector<std::size_t>
searchForSecondaryClusters(std::size_t photonInd, searchForSecondaryClusters(std::size_t photonInd,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment