 |
ATLAS Offline Software
|
Go to the documentation of this file.
14 , m_intensityPattern(
new double[m_ipLength])
27 std::vector<float>::const_iterator pBegin(rProp.begin());
28 std::vector<float>::const_iterator pEnd(rProp.end());
33 return StatusCode::FAILURE;
39 return StatusCode::FAILURE;
43 float nonZeroElementCount(
static_cast<float>(std::count_if(pBegin, pEnd, IsNonZero)));
44 if(nonZeroElementCount<1.0)
47 return StatusCode::FAILURE;
49 float elementSum(
static_cast<float>(
std::accumulate(pBegin, pEnd,0.0)));
53 float maxElement(*(std::max_element(pBegin, pEnd)));
54 float inv_maxElement = maxElement != 0 ? 1. / maxElement : 1;
64 ATH_MSG_ERROR(
"All IntensityPattern elements must be >=0. Please fix element #" <<
i );
65 return StatusCode::FAILURE;
91 ATH_MSG_ERROR(
"Requested T0 offset (" <<
m_t0Offset <<
") coincides with an empty bunch crossing in the IntensityPattern provided. Please re-submit your job and select an offset corresponding to a bunch crossing with non-zero luminosity.");
92 return StatusCode::FAILURE;
96 ATH_MSG_INFO(
"Allowing T0 to coincide with an empty bunch crossing in the IntensityPattern provided. T0 offset set to " <<
m_t0Offset <<
" for all events in this run." );
99 return StatusCode::SUCCESS;
108 <<
" index " <<
index
FixedArrayBM(const std::string &name, ISvcLocator *svc)
Gaudi::Property< std::vector< float > > m_intensityPatternProp
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
Gaudi::Property< bool > m_allowEmptyT0BunchCrossing
#define ATH_MSG_VERBOSE(x)
virtual float normFactor(int iXing) const override final
unsigned int m_ipLength
length of the intensity pattern
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< unsigned int > m_maxBunchCrossingPerOrbit
AthROOTErrorHandlerSvc * svc
Gaudi::Property< unsigned int > m_t0Offset
Holds helper functions used by FixedArrayBM and ArrayBM.
A IBeamIntensity service configured with an intensity array The Gaudi::Property<std::vector<float>> d...
accumulate
Update flags based on parser line args.
virtual StatusCode initialize() override final
double * m_intensityPattern
normalized intensity pattern.