@@ -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