|
ATLAS Offline Software
|
#include <ArrayBM.h>
Definition at line 33 of file ArrayBM.h.
◆ ArrayBM()
ArrayBM::ArrayBM |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
Definition at line 20 of file ArrayBM.cxx.
31 declareProperty(
"MaxBunchCrossingPerOrbit",
m_maxBunchCrossingPerOrbit,
"The number of slots in each LHC beam. Default: 3564.");
33 "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"
35 declareProperty(
"EmptyBunchOption",
m_emptyBunches=0,
"Option for empty bunches. 0: normal treatment. Positive N: first N BCIDs after filled. Negative N: any empty BCID is allowed.");
◆ ~ArrayBM()
◆ getBeamPatternLength()
virtual unsigned int ArrayBM::getBeamPatternLength |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ getCurrentT0BunchCrossing()
virtual unsigned int ArrayBM::getCurrentT0BunchCrossing |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ initialize()
StatusCode ArrayBM::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 45 of file ArrayBM.cxx.
55 std::vector<float>::const_iterator pBegin(rProp.begin());
56 std::vector<float>::const_iterator pEnd(rProp.end());
62 return StatusCode::FAILURE;
82 if (rProp[
i]>0) sinceFilled=0;
104 float nonZeroElementCount(
static_cast<float>(std::count_if(pBegin, pEnd, IsNonZero)));
105 if(nonZeroElementCount<1.0)
108 return StatusCode::FAILURE;
110 float elementSum(
static_cast<float>(
std::accumulate(pBegin, pEnd,0.0)));
114 float maxElement(*(std::max_element(pBegin, pEnd)));
115 float inv_maxElement = maxElement != 0 ? 1. / maxElement : 1;
124 ATH_MSG_ERROR(
"All IntensityPattern elements must be >=0. Please fix element #" <<
i );
125 return StatusCode::FAILURE;
149 std::make_unique<boost::random::discrete_distribution<unsigned int>>(
152 return StatusCode::SUCCESS;
◆ largestElementInPattern()
virtual float ArrayBM::largestElementInPattern |
( |
| ) |
const |
|
inlinefinaloverridevirtual |
◆ normFactor()
float ArrayBM::normFactor |
( |
int |
iXing | ) |
const |
|
finaloverridevirtual |
◆ selectT0()
void ArrayBM::selectT0 |
( |
unsigned int |
run, |
|
|
unsigned long long |
event |
|
) |
| |
|
finaloverridevirtual |
Definition at line 155 of file ArrayBM.cxx.
159 const EventContext& ctx =
160 Gaudi::Hive::currentContext();
163 m_rngWrapper->setSeed(
"BEAMINT", ctx.slot(),
event,
run, ctx.evt());
164 CLHEP::HepRandomEngine* rndmEngine = m_rngWrapper->getEngine(ctx);
◆ ATLAS_THREAD_SAFE
◆ m_biRandom
CLHEP::RandGeneral* ArrayBM::m_biRandom |
|
private |
shoot random number proportionally to m_intensityPattern
Definition at line 67 of file ArrayBM.h.
◆ m_emptyBunches
int ArrayBM::m_emptyBunches |
|
private |
Empty bunch option.
Default (0) means no special treatment of empty bunches, signal goes in filled bunches. Negative number means put signal in any empty bunch. Positive number means put signal in one of the first N bunches after a filled bunch.
Definition at line 82 of file ArrayBM.h.
◆ m_intensityPattern
double* ArrayBM::m_intensityPattern |
|
private |
normalized intensity pattern. C array to make clhep RandGeneral happy
Definition at line 65 of file ArrayBM.h.
◆ m_intensityPatternProp
Gaudi::Property<std::vector<float> > ArrayBM::m_intensityPatternProp |
|
private |
user-defined intensity pattern
Definition at line 61 of file ArrayBM.h.
◆ m_ipLength
unsigned int ArrayBM::m_ipLength |
|
private |
length of the intensity pattern
Definition at line 63 of file ArrayBM.h.
◆ m_largestElementInPattern
float ArrayBM::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 ArrayBM.h.
◆ m_maxBunchCrossingPerOrbit
unsigned int ArrayBM::m_maxBunchCrossingPerOrbit |
|
private |
max bunch crossings per orbit
Definition at line 55 of file ArrayBM.h.
◆ m_randomSvc
the service managing our random seeds/sequences
Definition at line 71 of file ArrayBM.h.
◆ m_seed
Gaudi::Property<std::uint64_t> ArrayBM::m_seed {this, "Seed", 0, "Seed for FastReseededPRNG. Zero seed switches to AthRNGSvc mode."} |
|
private |
◆ m_signalPattern
double* ArrayBM::m_signalPattern |
|
private |
Additional array for keeping the locations we want signal in By default, will match the intensity pattern.
Definition at line 85 of file ArrayBM.h.
◆ m_t0Dist
std::unique_ptr<const boost::random::discrete_distribution<unsigned int> > ArrayBM::m_t0Dist {nullptr} |
|
private |
◆ m_t0Offset
Gaudi::Hive::ContextSpecificData<unsigned int> ArrayBM::m_t0Offset |
|
private |
offset of the t0 wrto our intensity pattern
Definition at line 57 of file ArrayBM.h.
The documentation for this class was generated from the following files:
Gaudi::Property< std::uint64_t > m_seed
seed for FastReseededPRNG. Non-zero switches to using FastReseededPRNG.
unsigned int m_maxBunchCrossingPerOrbit
max bunch crossings per orbit
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Gaudi::Hive::ContextSpecificData< unsigned int > m_t0Offset
offset of the t0 wrto our intensity pattern
int run(int argc, char *argv[])
#define ATH_MSG_VERBOSE(x)
@ u
Enums for curvilinear frames.
int m_emptyBunches
Empty bunch option.
double * m_signalPattern
Additional array for keeping the locations we want signal in By default, will match the intensity pat...
POOL::TEvent event(POOL::TEvent::kClassAccess)
AthROOTErrorHandlerSvc * svc
Gaudi::Property< std::vector< float > > m_intensityPatternProp
user-defined intensity pattern
ServiceHandle< IAthRNGSvc > m_randomSvc
the service managing our random seeds/sequences
std::unique_ptr< const boost::random::discrete_distribution< unsigned int > > m_t0Dist
as with m_biRandom, but for FastReseededPRNG
unsigned int m_ipLength
length of the intensity pattern
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
double * m_intensityPattern
normalized intensity pattern. C array to make clhep RandGeneral happy
CLHEP::RandGeneral * m_biRandom
shoot random number proportionally to m_intensityPattern