ATLAS Offline Software
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 
15 class BeamHaloGenerator;
16 
17 
27 public:
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 
43 private:
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
BeamHaloGeneratorAlg::m_inputFile
StringProperty m_inputFile
Input file name.
Definition: BeamHaloGeneratorAlg.h:50
BeamHaloGeneratorAlg::m_flipProbability
FloatProperty m_flipProbability
Flip probability.
Definition: BeamHaloGeneratorAlg.h:59
BeamHaloGeneratorAlg::m_enableFlip
BooleanProperty m_enableFlip
Flag for flipping event.
Definition: BeamHaloGeneratorAlg.h:56
BeamHaloGeneratorAlg::m_enableSampling
BooleanProperty m_enableSampling
Flag to enable or disable sampling.
Definition: BeamHaloGeneratorAlg.h:62
BeamHaloGeneratorAlg::genInitialize
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition: BeamHaloGeneratorAlg.cxx:27
BeamHaloGeneratorAlg::SP_PZ_MUONS
@ SP_PZ_MUONS
Definition: BeamHaloGeneratorAlg.h:101
BeamHaloGeneratorAlg::fillEvt
virtual StatusCode fillEvt(HepMC::GenEvent *evt)
Fill the GenEvent pointer with the contents of the GenEvent cache.
Definition: BeamHaloGeneratorAlg.cxx:212
BeamHaloGeneratorAlg::m_bufferFileName
StringProperty m_bufferFileName
The name of the binary buffer file, needed for sampling from a converted file.
Definition: BeamHaloGeneratorAlg.h:66
BeamHaloGeneratorAlg::m_generatorSettings
StringArrayProperty m_generatorSettings
A vector of strings defining generator settings.
Definition: BeamHaloGeneratorAlg.h:69
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
BeamHaloGeneratorAlg::SP_PZ_ALL
@ SP_PZ_ALL
Definition: BeamHaloGeneratorAlg.h:93
BeamHaloGeneratorAlg::SP_R_MUONS
@ SP_R_MUONS
Definition: BeamHaloGeneratorAlg.h:99
BeamHaloGeneratorAlg::PRI_Z
@ PRI_Z
Definition: BeamHaloGeneratorAlg.h:89
BeamHaloGeneratorAlg::m_interfacePlane
DoubleProperty m_interfacePlane
The position of the interface plane in mm.
Definition: BeamHaloGeneratorAlg.h:53
BeamHaloGeneratorAlg::SP_R_ALL
@ SP_R_ALL
Definition: BeamHaloGeneratorAlg.h:91
GenModule
Base class for common behaviour of generator interfaces.
Definition: GenModule.h:39
BeamHaloGeneratorAlg::m_beamHaloGenerator
BeamHaloGenerator * m_beamHaloGenerator
A pointer to the beam halo generator.
Definition: BeamHaloGeneratorAlg.h:81
BeamHaloGeneratorAlg::SP_PT_ALL
@ SP_PT_ALL
Definition: BeamHaloGeneratorAlg.h:94
BeamHaloGenerator
An abstract base class to provide generic beam halo generator functionality.
Definition: BeamHaloGenerator.h:31
BeamHaloGeneratorAlg::m_inputTypeStr
StringProperty m_inputTypeStr
Input file type and therefore associated beam halo generator that should be used.
Definition: BeamHaloGeneratorAlg.h:47
BeamHaloGeneratorAlg::genFinalize
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition: BeamHaloGeneratorAlg.cxx:219
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
BeamHaloGeneratorAlg::NPLOTS
@ NPLOTS
Definition: BeamHaloGeneratorAlg.h:103
BeamHaloGeneratorAlg::m_validationPlots
TH1F * m_validationPlots[NPLOTS]
An array of TH1F pointers for validation plots.
Definition: BeamHaloGeneratorAlg.h:106
BeamHaloGeneratorAlg::m_randomStream
StringProperty m_randomStream
Name of the random number stream.
Definition: BeamHaloGeneratorAlg.h:78
BeamHaloGeneratorAlg::callGenerator
virtual StatusCode callGenerator()
Read one event from the selected input and convert it into GenEvent format.
Definition: BeamHaloGeneratorAlg.cxx:148
BeamHaloGeneratorAlg::PRI_Z_TCT
@ PRI_Z_TCT
Definition: BeamHaloGeneratorAlg.h:90
BeamHaloGeneratorAlg::~BeamHaloGeneratorAlg
virtual ~BeamHaloGeneratorAlg()=default
BeamHaloGeneratorAlg::SP_R_PROTONS
@ SP_R_PROTONS
Definition: BeamHaloGeneratorAlg.h:95
BeamHaloGeneratorAlg::PRI_R
@ PRI_R
Definition: BeamHaloGeneratorAlg.h:88
BeamHaloGeneratorAlg::SP_E_MUONS
@ SP_E_MUONS
Definition: BeamHaloGeneratorAlg.h:100
BeamHaloGeneratorAlg::SP_E_ALL
@ SP_E_ALL
Definition: BeamHaloGeneratorAlg.h:92
BeamHaloGeneratorAlg::SP_E_PROTONS
@ SP_E_PROTONS
Definition: BeamHaloGeneratorAlg.h:96
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
BeamHaloGeneratorAlg::m_tHistSvc
ServiceHandle< ITHistSvc > m_tHistSvc
A pointer to the THist service for validation plots.
Definition: BeamHaloGeneratorAlg.h:75
BeamHaloGeneratorAlg::SP_PZ_PROTONS
@ SP_PZ_PROTONS
Definition: BeamHaloGeneratorAlg.h:97
GenModule.h
BeamHaloGeneratorAlg::SP_PT_PROTONS
@ SP_PT_PROTONS
Definition: BeamHaloGeneratorAlg.h:98
BeamHaloGeneratorAlg::m_evt
HepMC::GenEvent m_evt
An empty GenEvent to cache the generate output between callGenerator and fillEvt.
Definition: BeamHaloGeneratorAlg.h:85
BeamHaloGeneratorAlg::SP_PT_MUONS
@ SP_PT_MUONS
Definition: BeamHaloGeneratorAlg.h:102
BeamHaloGeneratorAlg::validationPlotsEnum
validationPlotsEnum
Definition: BeamHaloGeneratorAlg.h:87
BeamHaloGeneratorAlg::m_doMonitoringPlots
BooleanProperty m_doMonitoringPlots
A flag to allow monitoring plots to be turned on or off.
Definition: BeamHaloGeneratorAlg.h:72
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
BeamHaloGeneratorAlg::BeamHaloGeneratorAlg
BeamHaloGeneratorAlg(const std::string &name, ISvcLocator *svcLocator)
Definition: BeamHaloGeneratorAlg.cxx:17
BeamHaloGeneratorAlg
A GenModule algorithm to produce beam halo HepMC records from input ASCII files produced with MARS or...
Definition: BeamHaloGeneratorAlg.h:26
ServiceHandle< ITHistSvc >