Commit 5da17fcf authored by Johannes Elmsheuser's avatar Johannes Elmsheuser
Browse files

Merge branch 'cherry-pick-a0287dbf-master' into 'master'

Sweeping !45158 from 21.0 to master.
Retry simulation if FCal cell assignment fails

See merge request !45192
parents 29b3e9ed 24d19436
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