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"
13
14#include <string>
15#include <memory>
16
18
19
29public:
30 BeamHaloGeneratorAlg(const std::string& name, ISvcLocator *svcLocator);
31 virtual ~BeamHaloGeneratorAlg() = default;
32 virtual StatusCode genInitialize();
33 virtual StatusCode genFinalize();
34
38 virtual StatusCode callGenerator();
39
43 virtual StatusCode fillEvt(HepMC::GenEvent* evt);
44
45private:
46
49 StringProperty m_inputTypeStr{this, "inputType", "MARS-NM"};
50
52 StringProperty m_inputFile{this, "inputFile", "bgi-b2l1.1"};
53
55 DoubleProperty m_interfacePlane{this, "interfacePlane", 20850.0}; // (mm)
56
58 BooleanProperty m_enableFlip{this, "enableFlip", false};
59
61 FloatProperty m_flipProbability{this, "flipProbability", 0.0};
62
64 BooleanProperty m_enableSampling{this, "enableSampling", false};
65
68 StringProperty m_bufferFileName{this, "bufferFileName", "BinaryBuffer.bin"};
69
71 StringArrayProperty m_generatorSettings{this, "generatorSettings", {}, "A set of cuts to be applied to generated particles."};
72
74 BooleanProperty m_doMonitoringPlots{this, "doMonitoringPlots", false};
75
77 ServiceHandle<ITHistSvc> m_tHistSvc{this, "THistSvc", "THistSvc"};
78
80 StringProperty m_randomStream{this, "randomStream", "BeamHalo"};
81
84
88
106
109 std::shared_ptr<GenData> m_gendata{nullptr};
110
111};
112
113#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.
std::shared_ptr< GenData > m_gendata
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
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39