#include <FixedArrayBM.h>
Definition at line 23 of file FixedArrayBM.h.
◆ FixedArrayBM()
FixedArrayBM::FixedArrayBM |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
Definition at line 12 of file FixedArrayBM.cxx.
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"
◆ ~FixedArrayBM()
FixedArrayBM::~FixedArrayBM |
( |
| ) |
|
|
virtual |
◆ getBCID()
virtual unsigned int FixedArrayBM::getBCID |
( |
int |
iXing | ) |
const |
|
inlineprivatevirtual |
◆ getBeamPatternLength()
virtual unsigned int FixedArrayBM::getBeamPatternLength |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ getCurrentT0BunchCrossing()
virtual unsigned int FixedArrayBM::getCurrentT0BunchCrossing |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ initialize()
StatusCode FixedArrayBM::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 36 of file FixedArrayBM.cxx.
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;
◆ largestElementInPattern()
virtual float FixedArrayBM::largestElementInPattern |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ normFactor()
float FixedArrayBM::normFactor |
( |
int |
iXing | ) |
const |
|
finaloverridevirtual |
◆ selectT0()
virtual void FixedArrayBM::selectT0 |
( |
unsigned int |
, |
|
|
unsigned long long |
|
|
) |
| |
|
inlinefinaloverridevirtual |
◆ m_allowEmptyT0BunchCrossing
Gaudi::Property<bool> FixedArrayBM::m_allowEmptyT0BunchCrossing |
|
private |
allow t0 to be in an empty bunch crossing
Definition at line 54 of file FixedArrayBM.h.
◆ m_intensityPattern
double* FixedArrayBM::m_intensityPattern |
|
private |
◆ m_intensityPatternProp
Gaudi::Property<std::vector<float> > FixedArrayBM::m_intensityPatternProp |
|
private |
◆ m_ipLength
unsigned int FixedArrayBM::m_ipLength |
|
private |
◆ m_largestElementInPattern
float FixedArrayBM::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 65 of file FixedArrayBM.h.
◆ m_maxBunchCrossingPerOrbit
unsigned int FixedArrayBM::m_maxBunchCrossingPerOrbit |
|
private |
◆ m_t0Offset
unsigned int FixedArrayBM::m_t0Offset |
|
private |
offset of the t0 wrto our intensity pattern
Definition at line 52 of file FixedArrayBM.h.
The documentation for this class was generated from the following files: