#include <StepArrayBM.h>
Definition at line 25 of file StepArrayBM.h.
◆ StepArrayBM()
StepArrayBM::StepArrayBM |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
Definition at line 12 of file StepArrayBM.cxx.
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."
◆ ~StepArrayBM()
StepArrayBM::~StepArrayBM |
( |
| ) |
|
|
virtual |
◆ getBeamPatternLength()
virtual unsigned int StepArrayBM::getBeamPatternLength |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ getCurrentT0BunchCrossing()
virtual unsigned int StepArrayBM::getCurrentT0BunchCrossing |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ initialize()
StatusCode StepArrayBM::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 41 of file StepArrayBM.cxx.
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;
◆ largestElementInPattern()
virtual float StepArrayBM::largestElementInPattern |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ normFactor()
virtual float StepArrayBM::normFactor |
( |
int |
iXing | ) |
const |
|
inlinefinaloverridevirtual |
◆ selectT0()
void StepArrayBM::selectT0 |
( |
unsigned int |
run, |
|
|
unsigned long long |
event |
|
) |
| |
|
finaloverridevirtual |
◆ m_intensityPattern
double* StepArrayBM::m_intensityPattern |
|
private |
normalized intensity pattern. C array to make clhep RandGeneral happy
Definition at line 70 of file StepArrayBM.h.
◆ m_intensityPatternProp
Gaudi::Property<std::vector<float> > StepArrayBM::m_intensityPatternProp |
|
private |
user-defined intensity pattern
Definition at line 62 of file StepArrayBM.h.
◆ m_ipLength
unsigned int StepArrayBM::m_ipLength |
|
private |
length of the intensity pattern
Definition at line 66 of file StepArrayBM.h.
◆ m_largestElementInPattern
float StepArrayBM::m_largestElementInPattern |
|
private |
The largest value in the pattern assuming that the pattern has mean value 1.0.
Multiplying by this converts values in the m_intensityPattern from having max value 1.0 to having mean value 1.0.
Definition at line 77 of file StepArrayBM.h.
◆ m_maxBunchCrossingPerOrbit
unsigned int StepArrayBM::m_maxBunchCrossingPerOrbit |
|
private |
◆ m_signalOffset
Gaudi::Hive::ContextSpecificData<unsigned int> StepArrayBM::m_signalOffset |
|
private |
offset of the current xing wrto the signal pattern
Definition at line 60 of file StepArrayBM.h.
◆ m_signalPattern
bool* StepArrayBM::m_signalPattern |
|
private |
◆ m_signalPatternProp
Gaudi::Property<std::vector<float> > StepArrayBM::m_signalPatternProp |
|
private |
user-defined signal pattern - non zero numbers means "Do Signal"
Definition at line 64 of file StepArrayBM.h.
◆ m_spLength
unsigned int StepArrayBM::m_spLength |
|
private |
◆ m_t0Offset
Gaudi::Hive::ContextSpecificData<unsigned int> StepArrayBM::m_t0Offset |
|
private |
offset of the t0 wrto our intensity pattern
Definition at line 58 of file StepArrayBM.h.
The documentation for this class was generated from the following files: