ATLAS Offline Software
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
9 
18 #include "GaudiKernel/ContextSpecificPtr.h"
19 #include "Gaudi/Property.h"
20 
23 
24 
25 class StepArrayBM : public extends<AthService, IBeamIntensity>
26 {
27 public:
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; }
54 private:
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
StepArrayBM
Definition: StepArrayBM.h:26
StepArrayBM::normFactor
virtual float normFactor(int iXing) const override final
Definition: StepArrayBM.h:39
StepArrayBM::initialize
virtual StatusCode initialize() override final
Definition: StepArrayBM.cxx:41
StepArrayBM::selectT0
virtual void selectT0(unsigned int run, unsigned long long event) override final
Definition: StepArrayBM.cxx:112
index
Definition: index.py:1
StepArrayBM::StepArrayBM
StepArrayBM(const std::string &name, ISvcLocator *svc)
Definition: StepArrayBM.cxx:12
StepArrayBM::m_intensityPatternProp
Gaudi::Property< std::vector< float > > m_intensityPatternProp
user-defined intensity pattern
Definition: StepArrayBM.h:62
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
StepArrayBM::m_largestElementInPattern
float m_largestElementInPattern
The largest value in the pattern assuming that the pattern has mean value 1.0.
Definition: StepArrayBM.h:77
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
StepArrayBM::m_ipLength
unsigned int m_ipLength
length of the intensity pattern
Definition: StepArrayBM.h:66
StepArrayBM::largestElementInPattern
virtual float largestElementInPattern() const override final
Definition: StepArrayBM.h:49
run
Definition: run.py:1
StepArrayBM::m_t0Offset
Gaudi::Hive::ContextSpecificData< unsigned int > m_t0Offset
offset of the t0 wrto our intensity pattern
Definition: StepArrayBM.h:58
StepArrayBM::m_maxBunchCrossingPerOrbit
unsigned int m_maxBunchCrossingPerOrbit
max bunch crossings per orbit
Definition: StepArrayBM.h:56
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
StepArrayBM::getBeamPatternLength
virtual unsigned int getBeamPatternLength() const override final
Definition: StepArrayBM.h:52
StepArrayBM::m_signalPattern
bool * m_signalPattern
locally stored siganlPattern
Definition: StepArrayBM.h:72
StepArrayBM::m_signalPatternProp
Gaudi::Property< std::vector< float > > m_signalPatternProp
user-defined signal pattern - non zero numbers means "Do Signal"
Definition: StepArrayBM.h:64
StepArrayBM::m_intensityPattern
double * m_intensityPattern
normalized intensity pattern. C array to make clhep RandGeneral happy
Definition: StepArrayBM.h:70
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
StepArrayBM::getCurrentT0BunchCrossing
virtual unsigned int getCurrentT0BunchCrossing() const override final
Definition: StepArrayBM.h:51
StepArrayBM::~StepArrayBM
virtual ~StepArrayBM()
Definition: StepArrayBM.cxx:35
DeMoScan.index
string index
Definition: DeMoScan.py:362
StepArrayBM::m_signalOffset
Gaudi::Hive::ContextSpecificData< unsigned int > m_signalOffset
offset of the current xing wrto the signal pattern
Definition: StepArrayBM.h:60
IBeamIntensity.h
provides the relative beam intensity as a function of the bunch xing.
AthService.h
StepArrayBM::m_spLength
unsigned int m_spLength
length of the signal pattern
Definition: StepArrayBM.h:68