R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandGeneratorFactory.h
Go to the documentation of this file.
1#pragma once
2
3#include "FairBoxGenerator.h"
4#include "FairPrimaryGenerator.h"
5#include "R3BNeulandCommon.h"
6#include "R3BValueError.h"
7#include <Math/Vector3D.h> // NOLINT
8#include <Math/Vector3Dfwd.h>
9#include <R3BMinMaxValue.h>
10#include <TRandom3.h>
11#include <cstdint>
12#include <functional>
13#include <memory>
14#include <string>
15
16namespace R3B::Neuland
17{
18 enum class GeneratorType : uint8_t
19 {
22 };
23
25 {
26 public:
37
41 explicit GeneratorFactory(Options& options)
42 : options_{ options }
43 {
44 }
45
51 auto Create() -> std::unique_ptr<FairPrimaryGenerator>;
52
53 // setters:
54 void SetRandomGen(TRandom3* random_gen) { random_gen_ = random_gen; }
55 void SetNumOfPlanes(int num_of_planes) { num_of_planes_ = num_of_planes; }
56
57 private:
59 std::reference_wrapper<Options> options_;
60 TRandom3* random_gen_ = nullptr;
61 auto create_muon_generator() -> std::unique_ptr<FairPrimaryGenerator>;
62 auto create_box_generator() -> std::unique_ptr<FairPrimaryGenerator>;
63 };
64
65} // namespace R3B::Neuland
auto create_muon_generator() -> std::unique_ptr< FairPrimaryGenerator >
auto create_box_generator() -> std::unique_ptr< FairPrimaryGenerator >
std::reference_wrapper< Options > options_
auto Create() -> std::unique_ptr< FairPrimaryGenerator >
Create a primary generator.
void SetRandomGen(TRandom3 *random_gen)
GeneratorFactory(Options &options)
Default constructor.
Simulation of NeuLAND Bar/Paddle.
constexpr auto DEFAULT_BOX_GENERATOR_THETA
constexpr auto DEFAULT_GENERATOR_ENERGY
constexpr auto DEFAULT_BOX_GENERATOR_PHI
constexpr auto MaxNumberOfPlanes
MinMaxValue< double > MinMaxValueD
ValueError< double > ValueErrorD
MinMaxValueD theta
Theta min and max value for outgoing direction.
MinMaxValueD phi
Phi min and max value for outgoing direction.
ROOT::Math::XYZVectorD position
Location of particle generation.
ValueErrorD energy
energy value with error [MeV]