ATLAS Offline Software
Loading...
Searching...
No Matches
StepArrayBM.h
Go to the documentation of this file.
1/* -*- C++ -*- */
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef PILEUPCOMPS_STEPARRAYBM
8#define PILEUPCOMPS_STEPARRAYBM 1
18#include "GaudiKernel/ContextSpecificPtr.h"
19#include "Gaudi/Property.h"
20
23
24
25class StepArrayBM : public extends<AthService, IBeamIntensity>
26{
27public:
29
30 StepArrayBM(const std::string& name,ISvcLocator* svc);
31 virtual ~StepArrayBM();
33
35 virtual StatusCode initialize() override final;
37
39 virtual float normFactor(int iXing) const override final
40 {
41 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));
42 //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.
43 ATH_MSG_VERBOSE("normFactor for BCID " << iXing
44 << " (offset " << m_t0Offset
45 << " index " << index
48 }
49 virtual float largestElementInPattern() const override final { return m_largestElementInPattern; }
50 virtual void selectT0(unsigned int run, unsigned long long event) override final;
51 virtual unsigned int getCurrentT0BunchCrossing() const override final { return m_t0Offset; }
52 virtual unsigned int getBeamPatternLength() const override final { return m_ipLength; }
54private:
58 Gaudi::Hive::ContextSpecificData<unsigned int> m_t0Offset;
60 Gaudi::Hive::ContextSpecificData<unsigned int> m_signalOffset;
62 Gaudi::Property<std::vector<float>> m_intensityPatternProp;
64 Gaudi::Property<std::vector<float>> m_signalPatternProp;
66 unsigned int m_ipLength;
68 unsigned int m_spLength;
78};
79#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:39
unsigned int m_spLength
length of the signal pattern
Definition StepArrayBM.h:68
StepArrayBM(const std::string &name, ISvcLocator *svc)
virtual unsigned int getCurrentT0BunchCrossing() const override final
Definition StepArrayBM.h:51
unsigned int m_ipLength
length of the intensity pattern
Definition StepArrayBM.h:66
virtual unsigned int getBeamPatternLength() const override final
Definition StepArrayBM.h:52
unsigned int m_maxBunchCrossingPerOrbit
max bunch crossings per orbit
Definition StepArrayBM.h:56
bool * m_signalPattern
locally stored siganlPattern
Definition StepArrayBM.h:72
double * m_intensityPattern
normalized intensity pattern. C array to make clhep RandGeneral happy
Definition StepArrayBM.h:70
Gaudi::Property< std::vector< float > > m_intensityPatternProp
user-defined intensity pattern
Definition StepArrayBM.h:62
virtual ~StepArrayBM()
virtual float largestElementInPattern() const override final
Definition StepArrayBM.h:49
Gaudi::Hive::ContextSpecificData< unsigned int > m_t0Offset
offset of the t0 wrto our intensity pattern
Definition StepArrayBM.h:58
virtual StatusCode initialize() override final
virtual void selectT0(unsigned int run, unsigned long long event) override final
Gaudi::Hive::ContextSpecificData< unsigned int > m_signalOffset
offset of the current xing wrto the signal pattern
Definition StepArrayBM.h:60
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
Definition StepArrayBM.h:77
Gaudi::Property< std::vector< float > > m_signalPatternProp
user-defined signal pattern - non zero numbers means "Do Signal"
Definition StepArrayBM.h:64
Definition index.py:1
Definition run.py:1