Commit 24d19436 authored by Rachid Mazini's avatar Rachid Mazini Committed by Atlas Nightlybuild
Browse files

Merge branch '21.0-ATLASSIM-5297' into '21.0'

Retry simulation if FCal cell assignment fails

See merge request !45158

(cherry picked from commit a0287dbf)

7025132c Retry simulation if FCal cell assignment fails
6d531ca2 retrun type cast
parent 3ac47c59
Pipeline #2825130 passed with stage
in 0 seconds
File mode changed from 100644 to 100755
......@@ -16,12 +16,14 @@ FCSReturnCode TFCSHitCellMappingFCal::simulate_hit(Hit& hit,TFCSSimulationState&
int cs=calosample();
const CaloDetDescrElement* cellele=m_geo->getFCalDDE(cs,hit.x(),hit.y(),hit.z());
ATH_MSG_DEBUG("HIT: cellele="<<cellele<<" E="<<hit.E()<<" cs="<<cs<<" x="<<hit.x()<<" y="<<hit.y() << " z="<<hit.z());
if(cellele) {
simulstate.deposit(cellele,hit.E());
} else {
ATH_MSG_ERROR("TFCSLateralShapeParametrizationHitCellMapping::simulate_hit: cellele="<<cellele<<" E="<<hit.E()<<" cs="<<cs<<" eta="<<hit.eta()<<" phi="<<hit.phi());
return FCSFatal;
}
/// protection against cases where hits cannot be matched to a FCal cell
if((hit.x() == 0 && hit.y() == 0) || cellele == 0) {
ATH_MSG_WARNING("TFCSLateralShapeParametrizationHitCellMapping::simulate_hit: cellele="<<cellele<<" E="<<hit.E()<<" cs="<<cs<<" eta="<<hit.eta()<<" phi="<<hit.phi());
return (FCSReturnCode)(FCSRetry+5); // retry simulation up to 5 times
}
simulstate.deposit(cellele,hit.E());
return FCSSuccess;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment