ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_FastCaloSim
ISF_FastCaloSimEvent
src
TFCSHitCellMappingFCal.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ISF_FastCaloSimEvent/TFCSHitCellMappingFCal.h
"
6
#include "
ISF_FastCaloSimEvent/ICaloGeometry.h
"
7
#include "
ISF_FastCaloSimEvent/TFCSSimulationState.h
"
8
9
//=============================================
10
//======= TFCSHitCellMappingFCal =========
11
//=============================================
12
13
FCSReturnCode
TFCSHitCellMappingFCal::simulate_hit
(
14
Hit
&
hit
,
TFCSSimulationState
&simulstate,
const
TFCSTruthState
*
/*truth*/
,
15
const
TFCSExtrapolationState
*
/*extrapol*/
) {
16
int
cs =
calosample
();
17
float
distance;
18
const
CaloDetDescrElement
* cellele=
m_geo
->getFCalDDE(cs,
hit
.x(),
hit
.y(),
hit
.z(),&distance);
19
ATH_MSG_DEBUG
(
"HIT: cellele="
<< cellele <<
" E="
<<
hit
.E() <<
" cs="
<< cs
20
<<
" x="
<<
hit
.x() <<
" y="
<<
hit
.y()
21
<<
" z="
<<
hit
.z());
22
24
if
((
hit
.x() == 0 &&
hit
.y() == 0) || cellele ==
nullptr
) {
25
ATH_MSG_WARNING
(
26
"TFCSLateralShapeParametrizationHitCellMapping::simulate_hit: cellele="
27
<< cellele <<
" E="
<<
hit
.E() <<
" cs="
<< cs <<
" eta="
<<
hit
.eta()
28
<<
" phi="
<<
hit
.phi());
29
return
(
FCSReturnCode
)(
FCSRetry
+ 5);
// retry simulation up to 5 times
30
}
31
32
// If the distance is positive then we are using the nearest cell rather than are inside a cell
33
// If we are more than 2.25mm from the nearest cell we don't create a hit to avoid the build-up of energy in edge cells
34
// For FCSV2 another hit can be created but with a cutoff to avoid looping,
35
// for FastCaloGAN the rest of the hits in the layer will be scaled up by the energy renormalization step.
36
if
(distance<2.25){
37
simulstate.
deposit
(cellele,
hit
.E());
38
}
else
{
39
hit
.setXYZE(
hit
.x(),
hit
.y(),
hit
.z(),0.0);
40
}
41
42
return
FCSSuccess
;
43
}
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ICaloGeometry.h
hit
bool hit(const Container &ids, int pdgId)
Definition
JetIRCSafeLabelTool.cxx:64
TFCSHitCellMappingFCal.h
FCSReturnCode
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
Definition
TFCSParametrizationBase.h:41
FCSRetry
@ FCSRetry
Definition
TFCSParametrizationBase.h:41
FCSSuccess
@ FCSSuccess
Definition
TFCSParametrizationBase.h:41
TFCSSimulationState.h
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell.
Definition
Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TFCSExtrapolationState
Definition
TFCSExtrapolationState.h:13
TFCSHitCellMappingFCal::simulate_hit
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) override
fills all hits into calorimeter cells
Definition
TFCSHitCellMappingFCal.cxx:13
TFCSHitCellMapping::m_geo
ICaloGeometry * m_geo
Definition
TFCSHitCellMapping.h:31
TFCSLateralShapeParametrizationHitBase::Hit
Definition
TFCSLateralShapeParametrizationHitBase.h:42
TFCSLateralShapeParametrization::calosample
int calosample() const
Definition
TFCSLateralShapeParametrization.h:34
TFCSSimulationState
Definition
TFCSSimulationState.h:32
TFCSSimulationState::deposit
void deposit(const CaloDetDescrElement *cellele, float E)
Definition
TFCSSimulationState.cxx:31
TFCSTruthState
Definition
TFCSTruthState.h:13
Generated on
for ATLAS Offline Software by
1.17.0