ATLAS Offline Software
Loading...
Searching...
No Matches
BeamHaloGeneratorAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef BEAMHALOGENERATORALG_H
6#define BEAMHALOGENERATORALG_H
7
8#include "GaudiKernel/ServiceHandle.h"
10#include "GaudiKernel/ITHistSvc.h"
11#include "TH1F.h"
12
13#include <string>
14
16
17
27public:
28 BeamHaloGeneratorAlg(const std::string& name, ISvcLocator *svcLocator);
29 virtual ~BeamHaloGeneratorAlg() = default;
30 virtual StatusCode genInitialize();
31 virtual StatusCode genFinalize();
32
36 virtual StatusCode callGenerator();
37
41 virtual StatusCode fillEvt(HepMC::GenEvent* evt);
42
43private:
44
47 StringProperty m_inputTypeStr{this, "inputType", "MARS-NM"};
48
50 StringProperty m_inputFile{this, "inputFile", "bgi-b2l1.1"};
51
53 DoubleProperty m_interfacePlane{this, "interfacePlane", 20850.0}; // (mm)
54
56 BooleanProperty m_enableFlip{this, "enableFlip", false};
57
59 FloatProperty m_flipProbability{this, "flipProbability", 0.0};
60
62 BooleanProperty m_enableSampling{this, "enableSampling", false};
63
66 StringProperty m_bufferFileName{this, "bufferFileName", "BinaryBuffer.bin"};
67
69 StringArrayProperty m_generatorSettings{this, "generatorSettings", {}, "A set of cuts to be applied to generated particles."};
70
72 BooleanProperty m_doMonitoringPlots{this, "doMonitoringPlots", false};
73
75 ServiceHandle<ITHistSvc> m_tHistSvc{this, "THistSvc", "THistSvc"};
76
78 StringProperty m_randomStream{this, "randomStream", "BeamHalo"};
79
82
85 HepMC::GenEvent m_evt{};
86
104
107
108};
109
110#endif
virtual StatusCode genInitialize()
For initializing the generator, if required.
BooleanProperty m_enableFlip
Flag for flipping event.
ServiceHandle< ITHistSvc > m_tHistSvc
A pointer to the THist service for validation plots.
DoubleProperty m_interfacePlane
The position of the interface plane in mm.
virtual StatusCode genFinalize()
For finalising the generator, if required.
StringProperty m_inputFile
Input file name.
BooleanProperty m_doMonitoringPlots
A flag to allow monitoring plots to be turned on or off.
StringProperty m_inputTypeStr
Input file type and therefore associated beam halo generator that should be used.
virtual StatusCode fillEvt(HepMC::GenEvent *evt)
Fill the GenEvent pointer with the contents of the GenEvent cache.
TH1F * m_validationPlots[NPLOTS]
An array of TH1F pointers for validation plots.
virtual ~BeamHaloGeneratorAlg()=default
StringProperty m_bufferFileName
The name of the binary buffer file, needed for sampling from a converted file.
virtual StatusCode callGenerator()
Read one event from the selected input and convert it into GenEvent format.
FloatProperty m_flipProbability
Flip probability.
StringProperty m_randomStream
Name of the random number stream.
BeamHaloGenerator * m_beamHaloGenerator
A pointer to the beam halo generator.
StringArrayProperty m_generatorSettings
A vector of strings defining generator settings.
HepMC::GenEvent m_evt
An empty GenEvent to cache the generate output between callGenerator and fillEvt.
BooleanProperty m_enableSampling
Flag to enable or disable sampling.
BeamHaloGeneratorAlg(const std::string &name, ISvcLocator *svcLocator)
An abstract base class to provide generic beam halo generator functionality.
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenModule.cxx:14