ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
BeamHaloGenerator
BeamHaloGenerator
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"
9
#include "
GeneratorModules/GenModule.h
"
10
#include "GaudiKernel/ITHistSvc.h"
11
#include "TH1F.h"
12
13
#include <string>
14
#include <memory>
15
16
class
BeamHaloGenerator
;
17
18
27
class
BeamHaloGeneratorAlg
:
public
GenModule
{
28
public
:
29
BeamHaloGeneratorAlg
(
const
std::string& name, ISvcLocator *svcLocator);
30
virtual
~BeamHaloGeneratorAlg
() =
default
;
31
virtual
StatusCode
genInitialize
();
32
virtual
StatusCode
genFinalize
();
33
37
virtual
StatusCode
callGenerator
();
38
42
virtual
StatusCode
fillEvt
(
HepMC::GenEvent
* evt);
43
44
private
:
45
48
StringProperty
m_inputTypeStr
{
this
,
"inputType"
,
"MARS-NM"
};
49
51
StringProperty
m_inputFile
{
this
,
"inputFile"
,
"bgi-b2l1.1"
};
52
54
DoubleProperty
m_interfacePlane
{
this
,
"interfacePlane"
, 20850.0};
// (mm)
55
57
BooleanProperty
m_enableFlip
{
this
,
"enableFlip"
,
false
};
58
60
FloatProperty
m_flipProbability
{
this
,
"flipProbability"
, 0.0};
61
63
BooleanProperty
m_enableSampling
{
this
,
"enableSampling"
,
false
};
64
67
StringProperty
m_bufferFileName
{
this
,
"bufferFileName"
,
"BinaryBuffer.bin"
};
68
70
StringArrayProperty
m_generatorSettings
{
this
,
"generatorSettings"
, {},
"A set of cuts to be applied to generated particles."
};
71
73
BooleanProperty
m_doMonitoringPlots
{
this
,
"doMonitoringPlots"
,
false
};
74
76
ServiceHandle<ITHistSvc>
m_tHistSvc
{
this
,
"THistSvc"
,
"THistSvc"
};
77
79
StringProperty
m_randomStream
{
this
,
"randomStream"
,
"BeamHalo"
};
80
82
BeamHaloGenerator
*
m_beamHaloGenerator
{};
83
86
HepMC::GenEvent
m_evt
{};
87
88
enum
validationPlotsEnum
{
89
PRI_R
,
90
PRI_Z
,
91
PRI_Z_TCT
,
92
SP_R_ALL
,
93
SP_E_ALL
,
94
SP_PZ_ALL
,
95
SP_PT_ALL
,
96
SP_R_PROTONS
,
97
SP_E_PROTONS
,
98
SP_PZ_PROTONS
,
99
SP_PT_PROTONS
,
100
SP_R_MUONS
,
101
SP_E_MUONS
,
102
SP_PZ_MUONS
,
103
SP_PT_MUONS
,
104
NPLOTS
};
105
107
TH1F *
m_validationPlots
[
NPLOTS
];
108
109
};
110
111
#endif
GenModule.h
BeamHaloGeneratorAlg::genInitialize
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition
BeamHaloGeneratorAlg.cxx:26
BeamHaloGeneratorAlg::m_enableFlip
BooleanProperty m_enableFlip
Flag for flipping event.
Definition
BeamHaloGeneratorAlg.h:57
BeamHaloGeneratorAlg::m_tHistSvc
ServiceHandle< ITHistSvc > m_tHistSvc
A pointer to the THist service for validation plots.
Definition
BeamHaloGeneratorAlg.h:76
BeamHaloGeneratorAlg::m_interfacePlane
DoubleProperty m_interfacePlane
The position of the interface plane in mm.
Definition
BeamHaloGeneratorAlg.h:54
BeamHaloGeneratorAlg::genFinalize
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition
BeamHaloGeneratorAlg.cxx:218
BeamHaloGeneratorAlg::m_inputFile
StringProperty m_inputFile
Input file name.
Definition
BeamHaloGeneratorAlg.h:51
BeamHaloGeneratorAlg::m_doMonitoringPlots
BooleanProperty m_doMonitoringPlots
A flag to allow monitoring plots to be turned on or off.
Definition
BeamHaloGeneratorAlg.h:73
BeamHaloGeneratorAlg::validationPlotsEnum
validationPlotsEnum
Definition
BeamHaloGeneratorAlg.h:88
BeamHaloGeneratorAlg::SP_R_PROTONS
@ SP_R_PROTONS
Definition
BeamHaloGeneratorAlg.h:96
BeamHaloGeneratorAlg::SP_PT_MUONS
@ SP_PT_MUONS
Definition
BeamHaloGeneratorAlg.h:103
BeamHaloGeneratorAlg::SP_E_PROTONS
@ SP_E_PROTONS
Definition
BeamHaloGeneratorAlg.h:97
BeamHaloGeneratorAlg::SP_PZ_MUONS
@ SP_PZ_MUONS
Definition
BeamHaloGeneratorAlg.h:102
BeamHaloGeneratorAlg::NPLOTS
@ NPLOTS
Definition
BeamHaloGeneratorAlg.h:104
BeamHaloGeneratorAlg::PRI_Z
@ PRI_Z
Definition
BeamHaloGeneratorAlg.h:90
BeamHaloGeneratorAlg::SP_PZ_PROTONS
@ SP_PZ_PROTONS
Definition
BeamHaloGeneratorAlg.h:98
BeamHaloGeneratorAlg::PRI_R
@ PRI_R
Definition
BeamHaloGeneratorAlg.h:89
BeamHaloGeneratorAlg::SP_PZ_ALL
@ SP_PZ_ALL
Definition
BeamHaloGeneratorAlg.h:94
BeamHaloGeneratorAlg::SP_R_MUONS
@ SP_R_MUONS
Definition
BeamHaloGeneratorAlg.h:100
BeamHaloGeneratorAlg::PRI_Z_TCT
@ PRI_Z_TCT
Definition
BeamHaloGeneratorAlg.h:91
BeamHaloGeneratorAlg::SP_PT_PROTONS
@ SP_PT_PROTONS
Definition
BeamHaloGeneratorAlg.h:99
BeamHaloGeneratorAlg::SP_PT_ALL
@ SP_PT_ALL
Definition
BeamHaloGeneratorAlg.h:95
BeamHaloGeneratorAlg::SP_E_ALL
@ SP_E_ALL
Definition
BeamHaloGeneratorAlg.h:93
BeamHaloGeneratorAlg::SP_E_MUONS
@ SP_E_MUONS
Definition
BeamHaloGeneratorAlg.h:101
BeamHaloGeneratorAlg::SP_R_ALL
@ SP_R_ALL
Definition
BeamHaloGeneratorAlg.h:92
BeamHaloGeneratorAlg::m_inputTypeStr
StringProperty m_inputTypeStr
Input file type and therefore associated beam halo generator that should be used.
Definition
BeamHaloGeneratorAlg.h:48
BeamHaloGeneratorAlg::fillEvt
virtual StatusCode fillEvt(HepMC::GenEvent *evt)
Fill the GenEvent pointer with the contents of the GenEvent cache.
Definition
BeamHaloGeneratorAlg.cxx:211
BeamHaloGeneratorAlg::m_validationPlots
TH1F * m_validationPlots[NPLOTS]
An array of TH1F pointers for validation plots.
Definition
BeamHaloGeneratorAlg.h:107
BeamHaloGeneratorAlg::~BeamHaloGeneratorAlg
virtual ~BeamHaloGeneratorAlg()=default
BeamHaloGeneratorAlg::m_bufferFileName
StringProperty m_bufferFileName
The name of the binary buffer file, needed for sampling from a converted file.
Definition
BeamHaloGeneratorAlg.h:67
BeamHaloGeneratorAlg::callGenerator
virtual StatusCode callGenerator()
Read one event from the selected input and convert it into GenEvent format.
Definition
BeamHaloGeneratorAlg.cxx:147
BeamHaloGeneratorAlg::m_flipProbability
FloatProperty m_flipProbability
Flip probability.
Definition
BeamHaloGeneratorAlg.h:60
BeamHaloGeneratorAlg::m_randomStream
StringProperty m_randomStream
Name of the random number stream.
Definition
BeamHaloGeneratorAlg.h:79
BeamHaloGeneratorAlg::m_beamHaloGenerator
BeamHaloGenerator * m_beamHaloGenerator
A pointer to the beam halo generator.
Definition
BeamHaloGeneratorAlg.h:82
BeamHaloGeneratorAlg::m_generatorSettings
StringArrayProperty m_generatorSettings
A vector of strings defining generator settings.
Definition
BeamHaloGeneratorAlg.h:70
BeamHaloGeneratorAlg::m_evt
HepMC::GenEvent m_evt
An empty GenEvent to cache the generate output between callGenerator and fillEvt.
Definition
BeamHaloGeneratorAlg.h:86
BeamHaloGeneratorAlg::m_enableSampling
BooleanProperty m_enableSampling
Flag to enable or disable sampling.
Definition
BeamHaloGeneratorAlg.h:63
BeamHaloGeneratorAlg::BeamHaloGeneratorAlg
BeamHaloGeneratorAlg(const std::string &name, ISvcLocator *svcLocator)
Definition
BeamHaloGeneratorAlg.cxx:16
BeamHaloGenerator
An abstract base class to provide generic beam halo generator functionality.
Definition
BeamHaloGenerator.h:30
GenModule::GenModule
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
GenModule.cxx:14
ServiceHandle
Definition
ClusterMakerTool.h:36
HepMC::GenEvent
HepMC3::GenEvent GenEvent
Definition
GenEvent.h:39
Generated on
for ATLAS Offline Software by
1.17.0