|
ATLAS Offline Software
|
Go to the documentation of this file.
14 , m_maxBunchCrossingPerOrbit(3564)
17 , m_intensityPatternProp()
18 , m_signalPatternProp()
21 , m_intensityPattern(
new double[m_ipLength])
22 , m_signalPattern(
new bool[m_spLength])
23 , m_largestElementInPattern(1.0)
25 declareProperty(
"MaxBunchCrossingPerOrbit",
m_maxBunchCrossingPerOrbit,
"The number of slots in each LHC beam. Default: 3564.");
27 "An array of floats containing the beam intensity distribution as a function of time in bins of 25ns. ArrayBM normalizes the distribution and uses it as a stencil to determine the relative intensity at each beam xing in the simulated range"
29 declareProperty(
"SignalPattern",
m_signalPatternProp,
"An array of booleans to complement the IntensityPattern to indicate where the signal event should happen (i.e. which events to actually simulate). Default behaviour is to do EVERY bunch crossing."
45 std::vector<float>::const_iterator pBegin(rProp.begin());
46 std::vector<float>::const_iterator pEnd(rProp.end());
52 return StatusCode::FAILURE;
56 float nonZeroElementCount(
static_cast<float>(std::count_if(pBegin, pEnd, IsNonZero)));
57 if(nonZeroElementCount<1.0)
60 return StatusCode::FAILURE;
62 float elementSum(
static_cast<float>(
std::accumulate(pBegin, pEnd,0.0)));
66 float maxElement(*(std::max_element(pBegin, pEnd)));
67 float inv_maxElement = maxElement != 0 ? 1. / maxElement : 1;
77 ATH_MSG_ERROR(
"All IntensityPattern elements must be >=0. Please fix element #" <<
i );
78 return StatusCode::FAILURE;
101 ATH_MSG_ERROR(
"SignalPattern MUST have at least one non-zero value in it.");
102 return StatusCode::FAILURE;
109 return StatusCode::SUCCESS;
virtual StatusCode initialize() override final
virtual void selectT0(unsigned int run, unsigned long long event) override final
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
StepArrayBM(const std::string &name, ISvcLocator *svc)
Gaudi::Property< std::vector< float > > m_intensityPatternProp
user-defined intensity pattern
prototypes for utility POOL collection funcs
A IBeamIntensity service configured with an intensity array and an optional signal pattern array The ...
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
::StatusCode StatusCode
StatusCode definition for legacy code.
unsigned int m_ipLength
length of the intensity pattern
Gaudi::Hive::ContextSpecificData< unsigned int > m_t0Offset
offset of the t0 wrto our intensity pattern
unsigned int m_maxBunchCrossingPerOrbit
max bunch crossings per orbit
AthROOTErrorHandlerSvc * svc
bool * m_signalPattern
locally stored siganlPattern
Gaudi::Property< std::vector< float > > m_signalPatternProp
user-defined signal pattern - non zero numbers means "Do Signal"
double * m_intensityPattern
normalized intensity pattern. C array to make clhep RandGeneral happy
Gaudi::Hive::ContextSpecificData< unsigned int > m_signalOffset
offset of the current xing wrto the signal pattern
setBGCode setTAP setLVL2ErrorBits bool
unsigned int m_spLength
length of the signal pattern