ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PileUpComps
src
ArrayBM.h
Go to the documentation of this file.
1
/* -*- C++ -*- */
2
3
/*
4
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
#ifndef PILEUPCOMPS_ARRAYBM
8
#define PILEUPCOMPS_ARRAYBM 1
16
#include "GaudiKernel/ContextSpecificPtr.h"
17
#include "GaudiKernel/ServiceHandle.h"
18
#include "Gaudi/Property.h"
19
20
#include "
PileUpTools/IBeamIntensity.h
"
21
#include "
CxxUtils/checker_macros.h
"
22
#include "
AthenaBaseComps/AthService.h
"
23
#include "
AthenaKernel/IAthRNGSvc.h
"
24
25
#include <random>
26
27
namespace
CLHEP
28
{
29
class
RandGeneral;
30
}
31
32
class
ArrayBM
:
public
extends<AthService, IBeamIntensity>
33
{
34
public
:
36
37
ArrayBM
(
const
std::string& name,ISvcLocator* svc);
38
virtual
~ArrayBM
();
40
42
virtual
StatusCode
initialize
()
override
final
;
44
46
virtual
float
normFactor
(
int
iXing)
const
override
final
;
47
virtual
float
largestElementInPattern
()
const
override final {
return
m_largestElementInPattern
; }
48
virtual
void
selectT0
(
const
EventContext& ctx)
override
final
;
49
virtual
unsigned
int
getCurrentT0BunchCrossing
()
const
override final {
return
m_t0Offset
; }
50
virtual
unsigned
int
getBeamPatternLength
()
const
override final {
return
m_ipLength
; }
52
private
:
54
unsigned
int
m_maxBunchCrossingPerOrbit
;
56
Gaudi::Hive::ContextSpecificData<unsigned int>
m_t0Offset
;
58
Gaudi::Property<std::uint64_t>
m_seed
{
this
,
"Seed"
, 0,
"Seed for FastReseededPRNG. Zero seed switches to AthRNGSvc mode."
};
60
Gaudi::Property<std::vector<float>>
m_intensityPatternProp
;
62
unsigned
int
m_ipLength
;
64
double
*
m_intensityPattern
;
66
CLHEP::RandGeneral*
m_biRandom
;
68
std::unique_ptr<std::discrete_distribution<unsigned int>>
m_t0Dist
{
nullptr
};
70
ServiceHandle<IAthRNGSvc>
m_randomSvc
{
this
,
"RandomSvc"
,
"AthRNGSvc"
,
"The random number service that will be used."
};
71
ATHRNG::RNGWrapper
* m_rngWrapper
ATLAS_THREAD_SAFE
{};
76
float
m_largestElementInPattern
;
81
int
m_emptyBunches
;
84
double
*
m_signalPattern
;
85
};
86
#endif
AthService.h
IAthRNGSvc.h
IBeamIntensity.h
provides the relative beam intensity as a function of the bunch xing.
checker_macros.h
Define macros for attributes used to control the static checker.
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition
RNGWrapper.h:56
ArrayBM::m_intensityPattern
double * m_intensityPattern
normalized intensity pattern. C array to make clhep RandGeneral happy
Definition
ArrayBM.h:64
ArrayBM::initialize
virtual StatusCode initialize() override final
Definition
ArrayBM.cxx:45
ArrayBM::m_emptyBunches
int m_emptyBunches
Empty bunch option.
Definition
ArrayBM.h:81
ArrayBM::m_seed
Gaudi::Property< std::uint64_t > m_seed
seed for FastReseededPRNG. Non-zero switches to using FastReseededPRNG.
Definition
ArrayBM.h:58
ArrayBM::m_biRandom
CLHEP::RandGeneral * m_biRandom
shoot random number proportionally to m_intensityPattern
Definition
ArrayBM.h:66
ArrayBM::getCurrentT0BunchCrossing
virtual unsigned int getCurrentT0BunchCrossing() const override final
Definition
ArrayBM.h:49
ArrayBM::m_largestElementInPattern
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
Definition
ArrayBM.h:76
ArrayBM::m_maxBunchCrossingPerOrbit
unsigned int m_maxBunchCrossingPerOrbit
max bunch crossings per orbit
Definition
ArrayBM.h:54
ArrayBM::normFactor
virtual float normFactor(int iXing) const override final
Definition
ArrayBM.cxx:175
ArrayBM::ArrayBM
ArrayBM(const std::string &name, ISvcLocator *svc)
Definition
ArrayBM.cxx:20
ArrayBM::getBeamPatternLength
virtual unsigned int getBeamPatternLength() const override final
Definition
ArrayBM.h:50
ArrayBM::~ArrayBM
virtual ~ArrayBM()
Definition
ArrayBM.cxx:39
ArrayBM::m_intensityPatternProp
Gaudi::Property< std::vector< float > > m_intensityPatternProp
user-defined intensity pattern
Definition
ArrayBM.h:60
ArrayBM::largestElementInPattern
virtual float largestElementInPattern() const override final
Definition
ArrayBM.h:47
ArrayBM::ATLAS_THREAD_SAFE
ATHRNG::RNGWrapper *m_rngWrapper ATLAS_THREAD_SAFE
Definition
ArrayBM.h:71
ArrayBM::m_t0Offset
Gaudi::Hive::ContextSpecificData< unsigned int > m_t0Offset
offset of the t0 wrto our intensity pattern
Definition
ArrayBM.h:56
ArrayBM::selectT0
virtual void selectT0(const EventContext &ctx) override final
Definition
ArrayBM.cxx:157
ArrayBM::m_ipLength
unsigned int m_ipLength
length of the intensity pattern
Definition
ArrayBM.h:62
ArrayBM::m_t0Dist
std::unique_ptr< std::discrete_distribution< unsigned int > > m_t0Dist
as with m_biRandom, but for FastReseededPRNG
Definition
ArrayBM.h:68
ArrayBM::m_signalPattern
double * m_signalPattern
Additional array for keeping the locations we want signal in By default, will match the intensity pat...
Definition
ArrayBM.h:84
ArrayBM::m_randomSvc
ServiceHandle< IAthRNGSvc > m_randomSvc
the service managing our random seeds/sequences
Definition
ArrayBM.h:70
ServiceHandle
Definition
ClusterMakerTool.h:36
const
CLHEP
STD'S.
Definition
CaloNoiseCompCondAlg.h:57
Generated on
for ATLAS Offline Software by
1.17.0