Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
08236648
Commit
08236648
authored
Jul 14, 2021
by
Ahmed Hasib
Committed by
Rachid Mazini
Jul 14, 2021
Browse files
Retry simulation if FCal cell assignment fails
parent
ca029ad8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSHitCellMappingFCal.cxx
View file @
08236648
...
...
@@ -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
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment