ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PileUpComps
src
StepArrayBM.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_STEPARRAYBM
8
#define PILEUPCOMPS_STEPARRAYBM 1
17
#include "GaudiKernel/ContextSpecificPtr.h"
18
#include "Gaudi/Property.h"
19
20
#include "
PileUpTools/IBeamIntensity.h
"
21
#include "
AthenaBaseComps/AthService.h
"
22
23
24
class
StepArrayBM
:
public
extends<AthService, IBeamIntensity>
25
{
26
public
:
28
29
StepArrayBM
(
const
std::string& name,ISvcLocator* svc);
30
virtual
~StepArrayBM
();
32
34
virtual
StatusCode
initialize
()
override
final
;
36
38
virtual
float
normFactor
(
int
iXing)
const
override
final
39
{
40
unsigned
int
index
=
static_cast<
unsigned
int
>
((((iXing +
static_cast<
int
>
(
m_t0Offset
)) %
static_cast<
int
>
(
m_ipLength
)) +
static_cast<
int
>
(
m_ipLength
) ) %
static_cast<
int
>
(
m_ipLength
));
41
//The array itself has max-value 1.0, but we want it to have mean value 1.0 (for filled bunch crossings), so we multiple by the m_largestElementInPattern.
42
ATH_MSG_VERBOSE
(
"normFactor for BCID "
<< iXing
43
<<
" (offset "
<<
m_t0Offset
44
<<
" index "
<<
index
45
<<
") is = "
<<
m_largestElementInPattern
*
m_intensityPattern
[
index
]);
46
return
m_largestElementInPattern
*
m_intensityPattern
[
index
];
47
}
48
virtual
float
largestElementInPattern
()
const
override final {
return
m_largestElementInPattern
; }
49
virtual
void
selectT0
(
const
EventContext& ctx)
override
final
;
50
virtual
unsigned
int
getCurrentT0BunchCrossing
()
const
override final {
return
m_t0Offset
; }
51
virtual
unsigned
int
getBeamPatternLength
()
const
override final {
return
m_ipLength
; }
53
private
:
55
unsigned
int
m_maxBunchCrossingPerOrbit
;
57
Gaudi::Hive::ContextSpecificData<unsigned int>
m_t0Offset
;
59
Gaudi::Hive::ContextSpecificData<unsigned int>
m_signalOffset
;
61
Gaudi::Property<std::vector<float>>
m_intensityPatternProp
;
63
Gaudi::Property<std::vector<float>>
m_signalPatternProp
;
65
unsigned
int
m_ipLength
;
67
unsigned
int
m_spLength
;
69
double
*
m_intensityPattern
;
71
bool
*
m_signalPattern
;
76
float
m_largestElementInPattern
;
77
};
78
#endif
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
AthService.h
IBeamIntensity.h
provides the relative beam intensity as a function of the bunch xing.
StepArrayBM::normFactor
virtual float normFactor(int iXing) const override final
Definition
StepArrayBM.h:38
StepArrayBM::m_spLength
unsigned int m_spLength
length of the signal pattern
Definition
StepArrayBM.h:67
StepArrayBM::StepArrayBM
StepArrayBM(const std::string &name, ISvcLocator *svc)
Definition
StepArrayBM.cxx:12
StepArrayBM::getCurrentT0BunchCrossing
virtual unsigned int getCurrentT0BunchCrossing() const override final
Definition
StepArrayBM.h:50
StepArrayBM::selectT0
virtual void selectT0(const EventContext &ctx) override final
Definition
StepArrayBM.cxx:114
StepArrayBM::m_ipLength
unsigned int m_ipLength
length of the intensity pattern
Definition
StepArrayBM.h:65
StepArrayBM::getBeamPatternLength
virtual unsigned int getBeamPatternLength() const override final
Definition
StepArrayBM.h:51
StepArrayBM::m_maxBunchCrossingPerOrbit
unsigned int m_maxBunchCrossingPerOrbit
max bunch crossings per orbit
Definition
StepArrayBM.h:55
StepArrayBM::m_signalPattern
bool * m_signalPattern
locally stored siganlPattern
Definition
StepArrayBM.h:71
StepArrayBM::m_intensityPattern
double * m_intensityPattern
normalized intensity pattern. C array to make clhep RandGeneral happy
Definition
StepArrayBM.h:69
StepArrayBM::m_intensityPatternProp
Gaudi::Property< std::vector< float > > m_intensityPatternProp
user-defined intensity pattern
Definition
StepArrayBM.h:61
StepArrayBM::~StepArrayBM
virtual ~StepArrayBM()
Definition
StepArrayBM.cxx:35
StepArrayBM::largestElementInPattern
virtual float largestElementInPattern() const override final
Definition
StepArrayBM.h:48
StepArrayBM::m_t0Offset
Gaudi::Hive::ContextSpecificData< unsigned int > m_t0Offset
offset of the t0 wrto our intensity pattern
Definition
StepArrayBM.h:57
StepArrayBM::initialize
virtual StatusCode initialize() override final
Definition
StepArrayBM.cxx:41
StepArrayBM::m_signalOffset
Gaudi::Hive::ContextSpecificData< unsigned int > m_signalOffset
offset of the current xing wrto the signal pattern
Definition
StepArrayBM.h:59
StepArrayBM::m_largestElementInPattern
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
Definition
StepArrayBM.h:76
StepArrayBM::m_signalPatternProp
Gaudi::Property< std::vector< float > > m_signalPatternProp
user-defined signal pattern - non zero numbers means "Do Signal"
Definition
StepArrayBM.h:63
const
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0