ATLAS Offline Software
FixedArrayBM.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_FIXEDARRAYBM
8 #define PILEUPCOMPS_FIXEDARRAYBM 1
9 
18 #include "Gaudi/Property.h"
19 
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(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; }
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  }
52  unsigned int m_t0Offset;
54  Gaudi::Property<bool> m_allowEmptyT0BunchCrossing;
56  Gaudi::Property<std::vector<float>> m_intensityPatternProp;
58  unsigned int m_ipLength;
66 };
67 #endif
FixedArrayBM::getBeamPatternLength
virtual unsigned int getBeamPatternLength() const override final
Definition: FixedArrayBM.h:41
FixedArrayBM::FixedArrayBM
FixedArrayBM(const std::string &name, ISvcLocator *svc)
Definition: FixedArrayBM.cxx:12
FixedArrayBM::~FixedArrayBM
virtual ~FixedArrayBM()
Definition: FixedArrayBM.cxx:31
FixedArrayBM::m_intensityPatternProp
Gaudi::Property< std::vector< float > > m_intensityPatternProp
user-defined intensity pattern
Definition: FixedArrayBM.h:56
FixedArrayBM::m_largestElementInPattern
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
Definition: FixedArrayBM.h:65
FixedArrayBM::m_allowEmptyT0BunchCrossing
Gaudi::Property< bool > m_allowEmptyT0BunchCrossing
allow t0 to be in an empty bunch crossing
Definition: FixedArrayBM.h:54
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
FixedArrayBM::m_maxBunchCrossingPerOrbit
unsigned int m_maxBunchCrossingPerOrbit
max bunch crossings per orbit
Definition: FixedArrayBM.h:50
FixedArrayBM::getCurrentT0BunchCrossing
virtual unsigned int getCurrentT0BunchCrossing() const override final
Definition: FixedArrayBM.h:40
FixedArrayBM::m_t0Offset
unsigned int m_t0Offset
offset of the t0 wrto our intensity pattern
Definition: FixedArrayBM.h:52
FixedArrayBM::normFactor
virtual float normFactor(int iXing) const override final
Definition: FixedArrayBM.cxx:114
FixedArrayBM::m_ipLength
unsigned int m_ipLength
length of the intensity pattern
Definition: FixedArrayBM.h:58
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FixedArrayBM::largestElementInPattern
virtual float largestElementInPattern() const override final
Definition: FixedArrayBM.h:38
FixedArrayBM::getBCID
virtual unsigned int getBCID(int iXing) const
Definition: FixedArrayBM.h:44
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
FixedArrayBM::initialize
virtual StatusCode initialize() override final
Definition: FixedArrayBM.cxx:36
IBeamIntensity.h
provides the relative beam intensity as a function of the bunch xing.
AthService.h
FixedArrayBM
Definition: FixedArrayBM.h:24
FixedArrayBM::selectT0
virtual void selectT0(unsigned int, unsigned long long) override final
Definition: FixedArrayBM.h:39
FixedArrayBM::m_intensityPattern
double * m_intensityPattern
normalized intensity pattern.
Definition: FixedArrayBM.h:60