Commit 7025132c authored by Ahmed Hasib's avatar Ahmed Hasib
Browse files

Retry simulation if FCal cell assignment fails

parent ca029ad8
......@@ -16,6 +16,13 @@ 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());
/// protection against cases where hits cannot be matched to a FCal cell
if((hit.x() == 0 && hit.y() == 0) || cellele == 0) {
FCSRetry == FCSRetry+5;
return FCSRetry; // retry simulation up to 5 times
}
if(cellele) {
simulstate.deposit(cellele,hit.E());
} else {
......
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