73 if (
nullptr == pCaloHit)
76 PandoraApi::CaloHit::Parameters caloHitParameters;
77 caloHitParameters.m_hitType = pandora::ECAL;
78 caloHitParameters.m_isDigital =
false;
83 float absorberCorrection(1.);
113 <<
" caloHitParameters.m_hitType = " << caloHitParameters.m_hitType.Get()
114 <<
" caloHitParameters.m_isDigital = " << caloHitParameters.m_isDigital.Get()
115 <<
" caloHitParameters.m_layer = " << caloHitParameters.m_layer.Get()
116 <<
" caloHitParameters.m_isInOuterSamplingLayer = " << caloHitParameters.m_isInOuterSamplingLayer.Get()
117 <<
" caloHitParameters.m_cellGeometry = " << caloHitParameters.m_cellGeometry.Get()
118 <<
" caloHitParameters.m_expectedDirection = " << caloHitParameters.m_expectedDirection.Get()
119 <<
" caloHitParameters.m_inputEnergy = " << caloHitParameters.m_inputEnergy.Get()
120 <<
" caloHitParameters.m_time = " << caloHitParameters.m_time.Get()
121 <<
" caloHitParameters.m_cellSize0 = " << caloHitParameters.m_cellSize0.Get()
122 <<
" caloHitParameters.m_cellSize1 = " << caloHitParameters.m_cellSize1.Get()
123 <<
" caloHitParameters.m_cellThickness = " << caloHitParameters.m_cellThickness.Get()
124 <<
" caloHitParameters.m_nCellRadiationLengths = " << caloHitParameters.m_nCellRadiationLengths.Get()
125 <<
" caloHitParameters.m_nCellInteractionLengths = " << caloHitParameters.m_nCellInteractionLengths.Get()
126 <<
" caloHitParameters.m_hadronicEnergy = " << caloHitParameters.m_hadronicEnergy.Get()
127 <<
" caloHitParameters.m_mipEquivalentEnergy = " << caloHitParameters.m_mipEquivalentEnergy.Get()
128 <<
" caloHitParameters.m_electromagneticEnergy = " << caloHitParameters.m_electromagneticEnergy.Get();
132 PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::CaloHit::Create(
m_pandora, caloHitParameters));
134 catch (pandora::StatusCodeException &statusCodeException)
137 <<
"Failed to extract ecal calo hit: " << statusCodeException.ToString();
142 <<
"Failed to extract ecal calo hit: " << exception.what();
146 return pandora::STATUS_CODE_SUCCESS;
static constexpr double cm
float m_eCalToHadGeVEndCap
The calibration from deposited ECal endcap energy to hadronic energy.
float m_eCalMipThreshold
Threshold for creating calo hits in the ECal, units mip.
void GetBarrelCaloHitProperties(const gar::rec::CaloHit *const pCaloHit, const std::vector< gar::geo::LayeredCalorimeterStruct::Layer > &layers, unsigned int barrelSymmetryOrder, PandoraApi::CaloHit::Parameters &caloHitParameters, FloatVector const &normalVector, float &absorberCorrection) const
raw::CellID_t CellID() const
float m_eCalToEMGeV
The calibration from deposited ECal energy to EM energy.
#define MF_LOG_ERROR(category)
gar::geo::BitFieldCoder const * m_fieldDecoder
int m_nOuterSamplingLayers
Number of layers from edge for hit to be flagged as an outer layer hit.
float m_eCalToHadGeVBarrel
The calibration from deposited ECal barrel energy to hadronic energy.
float m_eCalBarrelOuterZ
ECal barrel outer z coordinate.
int GetNLayersFromEdge(const gar::rec::CaloHit *const pCaloHit) const
float m_eCalBarrelOuterR
ECal barrel outer r coordinate.
const geo::GeometryCore * fGeo
const Settings m_settings
The calo hit creator settings.
CalorimeterHitVector artCalorimeterHitVector
FloatVector m_eCalBarrelNormalVector
ECal barrel normal vector.
void GetEndCapCaloHitProperties(const gar::rec::CaloHit *const pCaloHit, const std::vector< gar::geo::LayeredCalorimeterStruct::Layer > &layers, PandoraApi::CaloHit::Parameters &caloHitParameters, float &absorberCorrection) const
long64 get(long64 bitfield, size_t index) const
const float * Position() const
float m_eCalToMip
The calibration from deposited ECal energy to mip.
const pandora::Pandora & m_pandora
Reference to the pandora object to create calo hits.
void GetCommonCaloHitProperties(const gar::rec::CaloHit *const pCaloHit, PandoraApi::CaloHit::Parameters &caloHitParameters) const
#define MF_LOG_WARNING(category)
unsigned int m_eCalBarrelInnerSymmetry
ECal barrel inner symmetry order.
cet::coded_exception< error, detail::translate > exception
std::map< gar::geo::LayeredCalorimeterData::LayoutType, std::shared_ptr< gar::geo::LayeredCalorimeterData > > GetECALLayeredCalorimeterData() const