25 declareProperty(
"PostPulseFracThresh",
m_forcePostPulseFracThresh,
"If there is a good pulse and post-pulse and size of post-pulse as a fraction of good pulse is less than or equal to this number, ignore post-pulse");
44 std::array<std::vector<float>, 2> finalOutputCalibFactors;
58 finalOutputCalibFactors.at(
RPDUtils::sideC) = std::vector<float>(16, 1.0);
59 finalOutputCalibFactors.at(
RPDUtils::sideA) = std::vector<float>(16, 1.0);
150 return StatusCode::SUCCESS;
154 return std::make_shared<ZDCMsg::MessageFunction>(
155 [
this] (
int const messageZdcLevel,
const std::string& message) ->
bool {
156 auto const messageAthenaLevel =
static_cast<MSG::Level
>(messageZdcLevel);
157 bool const passesStreamOutputLevel = messageAthenaLevel >= this->
msg().level();
158 if (passesStreamOutputLevel) {
159 this->
msg(messageAthenaLevel) << message <<
endmsg;
161 return passesStreamOutputLevel;
174 for (
auto const module : moduleContainer) {
180 if (module->zdcChannel() < 0 ||
static_cast<unsigned int>(module->zdcChannel()) >
RPDUtils::nChannels - 1) {
181 ATH_MSG_ERROR(
"Invalid RPD channel found on side " << side <<
": channel number = " << module->zdcChannel());
184 unsigned int const channel =
module->zdcChannel();
185 ATH_MSG_DEBUG(
"RPD side " << side <<
" channel " << module->zdcChannel());
187 auto const& waveform = accessor(*module);
194 analyzer->analyzeData();
220 for (
auto const module : moduleContainer) {
226 unsigned int const channel =
module->zdcChannel();
227 chBaseline(*module) =
m_dataAnalyzers.at(side)->getChBaseline(channel);
228 chPileupExpFitParams(*module) =
m_dataAnalyzers.at(side)->getChPileupExpFitParams(channel);
229 chPileupStretchedExpFitParams(*module) =
m_dataAnalyzers.at(side)->getChPileupStretchedExpFitParams(channel);
230 chPileupExpFitParamErrs(*module) =
m_dataAnalyzers.at(side)->getChPileupExpFitParamErrs(channel);
231 chPileupStretchedExpFitParamErrs(*module) =
m_dataAnalyzers.at(side)->getChPileupStretchedExpFitParamErrs(channel);
232 chPileupExpFitMSE(*module) =
m_dataAnalyzers.at(side)->getChPileupExpFitMSE(channel);
233 chPileupStretchedExpFitMSE(*module) =
m_dataAnalyzers.at(side)->getChPileupStretchedExpFitMSE(channel);
235 chAmplitudeCalib(*module) =
m_dataAnalyzers.at(side)->getChSumAdcCalib(channel);
237 chMaxADCCalib(*module) =
m_dataAnalyzers.at(side)->getChMaxAdcCalib(channel);
238 chMaxSample(*module) =
m_dataAnalyzers.at(side)->getChMaxSample(channel);
240 chPileupFrac(*module) =
m_dataAnalyzers.at(side)->getChPileupFrac(channel);
245 for (
auto const sum: moduleSumContainer) {
256 if (moduleContainer.
empty()) {
257 return StatusCode::SUCCESS;
262 return StatusCode::FAILURE;
267 return StatusCode::SUCCESS;
273 writeAOD(moduleContainer, moduleSumContainer);
275 return StatusCode::SUCCESS;
281 return StatusCode::FAILURE;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Define enumerations for event-level ZDC data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
bool empty() const noexcept
Returns true if the collection is empty.
Helper class to provide constant type-safe access to aux data.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Handle class for adding a decoration to an object.
@ ForwardDet
The forward detectors.
unsigned int ZDCSideToSideIndex(int const ZDCSide)
int constexpr ZDCSumsGlobalZDCSide
unsigned int constexpr nChannels
unsigned int constexpr ZDCModuleRPDType
unsigned int constexpr sideC
unsigned int constexpr sideA
std::initializer_list< unsigned int > constexpr sides
std::string vecToString(std::vector< T > const &v)
std::shared_ptr< MessageFunction > MessageFunctionPtr
ZdcModuleContainer_v1 ZdcModuleContainer
float postPulseFracThresh
unsigned int goodPulseSampleStop
float pulse2ndDerivThresh
unsigned int nBaselineSamples
unsigned int endSignalSample
float pileupBaselineStdDevThresh
unsigned int nNegativesAllowed
unsigned int goodPulseSampleStart
float pileupBaselineSumThresh