Skip to content

Commit 29b63a7

Browse files
committed
TRandom creation inside if statement
1 parent 3a77b20 commit 29b63a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PWGEM/Dilepton/Core/Dilepton.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,9 +1310,9 @@ struct Dilepton {
13101310
}
13111311

13121312
std::vector<float> bootstrapweights = {};
1313-
int randomSeed = static_cast<int>(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
1314-
TRandom3 randomNumber(randomSeed);
13151313
if (cfgAnalysisType == static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kBootstrapv2)) { // bootstrapping for accepted events
1314+
int randomSeed = static_cast<int>(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
1315+
TRandom3 randomNumber(randomSeed);
13161316
for (int i = 0; i < cfgNumBootstrapSamples; i++) {
13171317
float poissonweight = 0.;
13181318
poissonweight = static_cast<float>(randomNumber.PoissonD(1.0));

0 commit comments

Comments
 (0)