|
ATLAS Offline Software
|
Go to the documentation of this file.
14 , m_maxBunchCrossingPerOrbit(3564)
16 , m_allowEmptyT0BunchCrossing(false)
17 , m_intensityPatternProp()
19 , m_intensityPattern(
new double[m_ipLength])
20 , m_largestElementInPattern(1.0)
22 declareProperty(
"MaxBunchCrossingPerOrbit",
m_maxBunchCrossingPerOrbit,
"The number of slots in each LHC beam. Default: 3564.");
23 declareProperty(
"T0Offset",
m_t0Offset,
"Offset of the T0 w.r.t. our intensity pattern" );
24 declareProperty(
"AllowEmptyT0BunchCrossing",
m_allowEmptyT0BunchCrossing,
"Allow the offset of the T0 to sit in an empty bunch crossing." );
26 "An array of floats containing the beam intensity distribution as a function of time in bins of 25ns. FixedArrayBM normalizes the distribution and uses it as a stencil to determine the relative intensity at each beam xing in the simulated range"
39 std::vector<float>::const_iterator pBegin(rProp.begin());
40 std::vector<float>::const_iterator pEnd(rProp.end());
45 return StatusCode::FAILURE;
51 return StatusCode::FAILURE;
55 float nonZeroElementCount(
static_cast<float>(std::count_if(pBegin, pEnd, IsNonZero)));
56 if(nonZeroElementCount<1.0)
59 return StatusCode::FAILURE;
61 float elementSum(
static_cast<float>(
std::accumulate(pBegin, pEnd,0.0)));
65 float maxElement(*(std::max_element(pBegin, pEnd)));
66 float inv_maxElement = maxElement != 0 ? 1. / maxElement : 1;
76 ATH_MSG_ERROR(
"All IntensityPattern elements must be >=0. Please fix element #" <<
i );
77 return StatusCode::FAILURE;
103 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.");
104 return StatusCode::FAILURE;
108 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." );
111 return StatusCode::SUCCESS;
120 <<
" index " <<
index
FixedArrayBM(const std::string &name, ISvcLocator *svc)
Gaudi::Property< std::vector< float > > m_intensityPatternProp
user-defined intensity pattern
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
Gaudi::Property< bool > m_allowEmptyT0BunchCrossing
allow t0 to be in an empty bunch crossing
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
#define ATH_MSG_VERBOSE(x)
unsigned int m_maxBunchCrossingPerOrbit
max bunch crossings per orbit
unsigned int m_t0Offset
offset of the t0 wrto our intensity pattern
virtual float normFactor(int iXing) const override final
prototypes for utility POOL collection funcs
unsigned int m_ipLength
length of the intensity pattern
::StatusCode StatusCode
StatusCode definition for legacy code.
AthROOTErrorHandlerSvc * svc
A IBeamIntensity service configured with an intensity array The Gaudi::Property<std::vector<float>> d...
virtual StatusCode initialize() override final
double * m_intensityPattern
normalized intensity pattern.