Skip to content

Commit 367fd4a

Browse files
authored
Revert "Vetoing loopers for FlatGas and \!collisioncontext"
This reverts commit 8f8606a.
1 parent 82fefbf commit 367fd4a

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

Generators/include/Generators/Generator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class Generator : public FairGenerator
173173
#ifdef GENERATORS_WITH_TPCLOOPERS
174174
// Loopers generator instance
175175
std::unique_ptr<o2::eventgen::GenTPCLoopers> mLoopersGen = nullptr;
176-
bool initLoopersGen();
176+
void initLoopersGen();
177177
#endif
178178

179179
ClassDefOverride(Generator, 2);

Generators/src/Generator.cxx

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ Generator::Generator() : FairGenerator("ALICEo2", "ALICEo2 Generator"),
5050
if (transport) {
5151
bool tpcActive = (std::find(simConfig.getReadoutDetectors().begin(), simConfig.getReadoutDetectors().end(), "TPC") != simConfig.getReadoutDetectors().end());
5252
if (tpcActive) {
53-
if(initLoopersGen()){
54-
mAddTPCLoopers = kTRUE;
55-
}
53+
mAddTPCLoopers = kTRUE;
54+
initLoopersGen();
5655
}
5756
}
5857
}
@@ -75,9 +74,8 @@ Generator::Generator(const Char_t* name, const Char_t* title) : FairGenerator(na
7574
if (transport) {
7675
bool tpcActive = (std::find(simConfig.getReadoutDetectors().begin(), simConfig.getReadoutDetectors().end(), "TPC") != simConfig.getReadoutDetectors().end());
7776
if (tpcActive) {
78-
if (initLoopersGen()) {
79-
mAddTPCLoopers = kTRUE;
80-
}
77+
mAddTPCLoopers = kTRUE;
78+
initLoopersGen();
8179
}
8280
}
8381
}
@@ -86,7 +84,7 @@ Generator::Generator(const Char_t* name, const Char_t* title) : FairGenerator(na
8684

8785
/*****************************************************************/
8886
#ifdef GENERATORS_WITH_TPCLOOPERS
89-
bool Generator::initLoopersGen()
87+
void Generator::initLoopersGen()
9088
{
9189
// Expand all environment paths
9290
const auto& loopersParam = o2::eventgen::GenTPCLoopersParam::Instance();
@@ -97,14 +95,6 @@ bool Generator::initLoopersGen()
9795
const auto& poisson = gSystem->ExpandPathName(loopersParam.poisson.c_str());
9896
const auto& gauss = gSystem->ExpandPathName(loopersParam.gauss.c_str());
9997
auto flat_gas = loopersParam.flat_gas;
100-
if (flat_gas) {
101-
bool isContext = std::filesystem::exists("collisioncontext.root");
102-
if (!isContext) {
103-
LOG(warning) << "Warning: No collisioncontext.root file found!";
104-
LOG(warning) << "Loopers will be kept OFF.";
105-
return kFALSE;
106-
}
107-
}
10898
const auto& nFlatGasLoopers = loopersParam.nFlatGasLoopers;
10999
auto fraction_pairs = loopersParam.fraction_pairs;
110100
std::array<float, 2> multiplier = {loopersParam.multiplier[0], loopersParam.multiplier[1]};
@@ -173,7 +163,6 @@ bool Generator::initLoopersGen()
173163
LOG(error) << "Failed to initialize TPC Loopers generator: " << e.what();
174164
mLoopersGen.reset();
175165
}
176-
return kTRUE;
177166
}
178167
#endif
179168

0 commit comments

Comments
 (0)