ATLAS Offline Software
Loading...
Searching...
No Matches
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
22
23
24class StepArrayBM : public extends<AthService, IBeamIntensity>
25{
26public:
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
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; }
53private:
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;
77};
78#endif
#define ATH_MSG_VERBOSE(x)
provides the relative beam intensity as a function of the bunch xing.
virtual float normFactor(int iXing) const override final
Definition StepArrayBM.h:38
unsigned int m_spLength
length of the signal pattern
Definition StepArrayBM.h:67
StepArrayBM(const std::string &name, ISvcLocator *svc)
virtual unsigned int getCurrentT0BunchCrossing() const override final
Definition StepArrayBM.h:50
virtual void selectT0(const EventContext &ctx) override final
unsigned int m_ipLength
length of the intensity pattern
Definition StepArrayBM.h:65
virtual unsigned int getBeamPatternLength() const override final
Definition StepArrayBM.h:51
unsigned int m_maxBunchCrossingPerOrbit
max bunch crossings per orbit
Definition StepArrayBM.h:55
bool * m_signalPattern
locally stored siganlPattern
Definition StepArrayBM.h:71
double * m_intensityPattern
normalized intensity pattern. C array to make clhep RandGeneral happy
Definition StepArrayBM.h:69
Gaudi::Property< std::vector< float > > m_intensityPatternProp
user-defined intensity pattern
Definition StepArrayBM.h:61
virtual ~StepArrayBM()
virtual float largestElementInPattern() const override final
Definition StepArrayBM.h:48
Gaudi::Hive::ContextSpecificData< unsigned int > m_t0Offset
offset of the t0 wrto our intensity pattern
Definition StepArrayBM.h:57
virtual StatusCode initialize() override final
Gaudi::Hive::ContextSpecificData< unsigned int > m_signalOffset
offset of the current xing wrto the signal pattern
Definition StepArrayBM.h:59
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
Definition StepArrayBM.h:76
Gaudi::Property< std::vector< float > > m_signalPatternProp
user-defined signal pattern - non zero numbers means "Do Signal"
Definition StepArrayBM.h:63
Definition index.py:1