ATLAS Offline Software
Loading...
Searching...
No Matches
FixedArrayBM.h
Go to the documentation of this file.
1/* -*- C++ -*- */
2
3/*
4 Copyright (C) 2002-2025 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
22
23class FixedArrayBM : public extends<AthService, IBeamIntensity>
24{
25public:
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(unsigned int /*run*/, unsigned long long /*event*/) override final { }
40 virtual unsigned int getCurrentT0BunchCrossing() const override final { return m_t0Offset; }
41 virtual unsigned int getBeamPatternLength() const override final { return m_ipLength; }
43private:
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};
73};
74#endif
provides the relative beam intensity as a function of the bunch xing.
virtual void selectT0(unsigned int, unsigned long long) override final
Gaudi::Property< unsigned int > m_maxBunchCrossingPerOrbit
Gaudi::Property< unsigned int > m_t0Offset
double * m_intensityPattern
normalized intensity pattern.
Gaudi::Property< std::vector< float > > m_intensityPatternProp
virtual unsigned int getBCID(int iXing) const
virtual StatusCode initialize() override final
virtual float largestElementInPattern() const override final
Gaudi::Property< bool > m_allowEmptyT0BunchCrossing
unsigned int m_ipLength
length of the intensity pattern
FixedArrayBM(const std::string &name, ISvcLocator *svc)
virtual unsigned int getBeamPatternLength() const override final
virtual ~FixedArrayBM()
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
virtual unsigned int getCurrentT0BunchCrossing() const override final
virtual float normFactor(int iXing) const override final