ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PileUpComps
src
FixedArrayBM.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_FIXEDARRAYBM
8
#define PILEUPCOMPS_FIXEDARRAYBM 1
18
#include "Gaudi/Property.h"
19
20
#include "
PileUpTools/IBeamIntensity.h
"
21
#include "
AthenaBaseComps/AthService.h
"
22
23
class
FixedArrayBM
:
public
extends<AthService, IBeamIntensity>
24
{
25
public
:
27
28
FixedArrayBM
(
const
std::string& name,ISvcLocator* svc);
29
virtual
~FixedArrayBM
();
31
33
virtual
StatusCode
initialize
()
override
final
;
35
37
virtual
float
normFactor
(
int
iXing)
const
override
final
;
38
virtual
float
largestElementInPattern
()
const
override final {
return
m_largestElementInPattern
; }
39
virtual
void
selectT0
(
const
EventContext&
/*ctx*/
)
override
final
{ }
40
virtual
unsigned
int
getCurrentT0BunchCrossing
()
const
override final {
return
m_t0Offset
; }
41
virtual
unsigned
int
getBeamPatternLength
()
const
override final {
return
m_ipLength
; }
43
private
:
44
virtual
unsigned
int
getBCID
(
int
iXing)
const
45
{
46
//FIXME to be completely safe this should should probably depend on the bunch spacing too. Perhaps that concept should be deprecated though?
47
return
static_cast<
unsigned
int
>
((((iXing +
static_cast<
int
>
(
m_t0Offset
)) %
static_cast<
int
>
(
m_maxBunchCrossingPerOrbit
)) +
static_cast<
int
>
(
m_maxBunchCrossingPerOrbit
) ) %
static_cast<
int
>
(
m_maxBunchCrossingPerOrbit
));
48
}
49
50
Gaudi::Property<unsigned int>
m_maxBunchCrossingPerOrbit
{
this
,
"MaxBunchCrossingPerOrbit"
, 3564,
51
"The number of slots in each LHC beam. Default: 3564."
};
52
53
Gaudi::Property<unsigned int>
m_t0Offset
{
this
,
"T0Offset"
, 0,
54
"Offset of the T0 w.r.t. our intensity pattern"
};
55
56
Gaudi::Property<bool>
m_allowEmptyT0BunchCrossing
{
this
,
"AllowEmptyT0BunchCrossing"
,
false
,
57
"Allow the offset of the T0 to sit in an empty bunch crossing."
};
58
59
Gaudi::Property<std::vector<float>>
m_intensityPatternProp
{
this
,
"IntensityPattern"
, {},
60
"An array of floats containing the beam intensity distribution as a function of "
61
"time in bins of 25ns. FixedArrayBM normalizes the distribution and uses it as a "
62
"stencil to determine the relative intensity at each beam xing in the simulated range"
};
63
65
unsigned
int
m_ipLength
{1};
67
double
*
m_intensityPattern
;
72
float
m_largestElementInPattern
{1.0};
73
};
74
#endif
AthService.h
IBeamIntensity.h
provides the relative beam intensity as a function of the bunch xing.
FixedArrayBM::m_maxBunchCrossingPerOrbit
Gaudi::Property< unsigned int > m_maxBunchCrossingPerOrbit
Definition
FixedArrayBM.h:50
FixedArrayBM::m_t0Offset
Gaudi::Property< unsigned int > m_t0Offset
Definition
FixedArrayBM.h:53
FixedArrayBM::m_intensityPattern
double * m_intensityPattern
normalized intensity pattern.
Definition
FixedArrayBM.h:67
FixedArrayBM::m_intensityPatternProp
Gaudi::Property< std::vector< float > > m_intensityPatternProp
Definition
FixedArrayBM.h:59
FixedArrayBM::getBCID
virtual unsigned int getBCID(int iXing) const
Definition
FixedArrayBM.h:44
FixedArrayBM::initialize
virtual StatusCode initialize() override final
Definition
FixedArrayBM.cxx:24
FixedArrayBM::largestElementInPattern
virtual float largestElementInPattern() const override final
Definition
FixedArrayBM.h:38
FixedArrayBM::m_allowEmptyT0BunchCrossing
Gaudi::Property< bool > m_allowEmptyT0BunchCrossing
Definition
FixedArrayBM.h:56
FixedArrayBM::selectT0
virtual void selectT0(const EventContext &) override final
Definition
FixedArrayBM.h:39
FixedArrayBM::m_ipLength
unsigned int m_ipLength
length of the intensity pattern
Definition
FixedArrayBM.h:65
FixedArrayBM::FixedArrayBM
FixedArrayBM(const std::string &name, ISvcLocator *svc)
Definition
FixedArrayBM.cxx:12
FixedArrayBM::getBeamPatternLength
virtual unsigned int getBeamPatternLength() const override final
Definition
FixedArrayBM.h:41
FixedArrayBM::~FixedArrayBM
virtual ~FixedArrayBM()
Definition
FixedArrayBM.cxx:19
FixedArrayBM::m_largestElementInPattern
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
Definition
FixedArrayBM.h:72
FixedArrayBM::getCurrentT0BunchCrossing
virtual unsigned int getCurrentT0BunchCrossing() const override final
Definition
FixedArrayBM.h:40
FixedArrayBM::normFactor
virtual float normFactor(int iXing) const override final
Definition
FixedArrayBM.cxx:104
const
Generated on
for ATLAS Offline Software by
1.17.0