|
14 | 14 | #include <SimulationDataFormat/O2DatabasePDG.h> |
15 | 15 | #include <Generators/GeneratorFactory.h> |
16 | 16 | #include "FairGenerator.h" |
17 | | -#include "FairBoxGenerator.h" |
| 17 | +#include <Generators/BoxGenerator.h> |
18 | 18 | #include <fairlogger/Logger.h> |
19 | 19 | #include <SimConfig/SimConfig.h> |
20 | 20 | #include <Generators/GeneratorFromFile.h> |
@@ -60,13 +60,8 @@ void GeneratorFactory::setPrimaryGenerator(o2::conf::SimConfig const& conf, Fair |
60 | 60 |
|
61 | 61 | auto primGenO2 = dynamic_cast<PrimaryGenerator*>(primGen); |
62 | 62 |
|
63 | | - auto makeBoxGen = [](int pdgid, int mult, double etamin, double etamax, double pmin, double pmax, double phimin, double phimax, bool debug = false) { |
64 | | - auto gen = new FairBoxGenerator(pdgid, mult); |
65 | | - gen->SetEtaRange(etamin, etamax); |
66 | | - gen->SetPRange(pmin, pmax); |
67 | | - gen->SetPhiRange(phimin, phimax); |
68 | | - gen->SetDebug(debug); |
69 | | - return gen; |
| 63 | + auto makeBoxGen = [](int pdgid, int mult, double etamin, double etamax, double pmin, double pmax, double phimin, double phimax) { |
| 64 | + return new o2::eventgen::BoxGenerator(pdgid, mult, etamin, etamax, pmin, pmax, phimin, phimax); |
70 | 65 | }; |
71 | 66 |
|
72 | 67 | #ifdef GENERATORS_WITH_PYTHIA8 |
@@ -105,7 +100,7 @@ void GeneratorFactory::setPrimaryGenerator(o2::conf::SimConfig const& conf, Fair |
105 | 100 | auto& boxparam = BoxGunParam::Instance(); |
106 | 101 | LOG(info) << "Init generic box generator with following parameters"; |
107 | 102 | LOG(info) << boxparam; |
108 | | - auto boxGen = makeBoxGen(boxparam.pdg, boxparam.number, boxparam.eta[0], boxparam.eta[1], boxparam.prange[0], boxparam.prange[1], boxparam.phirange[0], boxparam.phirange[1], boxparam.debug); |
| 103 | + auto boxGen = makeBoxGen(boxparam.pdg, boxparam.number, boxparam.eta[0], boxparam.eta[1], boxparam.prange[0], boxparam.prange[1], boxparam.phirange[0], boxparam.phirange[1]); |
109 | 104 | primGen->AddGenerator(boxGen); |
110 | 105 | } else if (genconfig.compare("fwmugen") == 0) { |
111 | 106 | // a simple "box" generator for forward muons |
@@ -267,11 +262,7 @@ void GeneratorFactory::setPrimaryGenerator(o2::conf::SimConfig const& conf, Fair |
267 | 262 | LOG(info) << "Init tof test generator -> 1 muon per sector and per module"; |
268 | 263 | for (int i = 0; i < 18; i++) { |
269 | 264 | for (int j = 0; j < 5; j++) { |
270 | | - auto boxGen = new FairBoxGenerator(13, 1); /*protons*/ |
271 | | - boxGen->SetEtaRange(-0.8 + 0.32 * j + 0.15, -0.8 + 0.32 * j + 0.17); |
272 | | - boxGen->SetPRange(9, 10); |
273 | | - boxGen->SetPhiRange(10 + 20. * i - 1, 10 + 20. * i + 1); |
274 | | - boxGen->SetDebug(kTRUE); |
| 265 | + auto boxGen = makeBoxGen(13 /*muons*/, 1, -0.8 + 0.32 * j + 0.15, -0.8 + 0.32 * j + 0.17, 9, 10, 10 + 20. * i - 1, 10 + 20. * i + 1); |
275 | 266 | primGen->AddGenerator(boxGen); |
276 | 267 | } |
277 | 268 | } |
|
0 commit comments