Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed bug + cleaned code
  • Loading branch information
jackal1-66 committed Nov 24, 2025
commit 19e77a34afacafea149ce4d49dcd28fe08b232c6
4 changes: 2 additions & 2 deletions Generators/include/Generators/TPCLoopersParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ struct GenTPCLoopersParam : public o2::conf::ConfigurableParamHelper<GenTPCLoope
std::string colsys = "PbPb"; // collision system (PbPb or pp)
int intrate = -1; // Automatic IR from collision context if -1, else user-defined interaction rate in Hz
bool flat_gas = true; // if true, the gas density is considered flat in the TPC volume
unsigned int nFlatGasLoopers = 500; // number of loopers to be generated per event in case of flat gas
float fraction_pairs = 0.08; // fraction of loopers
unsigned int nFlatGasLoopers = 500; // number of loopers to be generated per event in case of flat gas [currently unused, kept for possible future debug developments]
float fraction_pairs = 0.08; // fraction of loopers [currently unused, kept for possible future debug developments]
float multiplier[2] = {1., 1.}; // multiplier for pairs and compton loopers for Poissonian and Gaussian sampling
unsigned int fixedNLoopers[2] = {1, 1}; // fixed number of loopers coming from pairs and compton electrons - valid if flat gas is false and both Poisson and Gaussian params files are empty
float adjust_flatgas = 0.f; // adjustment for the number of flat gas loopers per orbit (in percentage, e.g. -0.1 = -10%) [-1, inf)]
Expand Down
4 changes: 1 addition & 3 deletions Generators/src/Generator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ bool Generator::initLoopersGen()
return kFALSE;
}
}
const auto& nFlatGasLoopers = loopersParam.nFlatGasLoopers;
const auto& fraction_pairs = loopersParam.fraction_pairs;
std::array<float, 2> multiplier = {loopersParam.multiplier[0], loopersParam.multiplier[1]};
unsigned int nLoopersPairs = loopersParam.fixedNLoopers[0];
unsigned int nLoopersCompton = loopersParam.fixedNLoopers[1];
Expand Down Expand Up @@ -170,7 +168,7 @@ bool Generator::initLoopersGen()
mLoopersGen->SetAdjust(loopersParam.adjust_flatgas);
}
} else {
// Otherwise, Poisson+Gauss sampling or fixed number of loopers will be used
// Otherwise, Poisson+Gauss sampling or fixed number of loopers per event will be used
// Multiplier is applied only with distribution sampling
// This configuration can be used for testing purposes, in all other cases flat gas is recommended
mLoopersGen->SetNLoopers(nLoopersPairs, nLoopersCompton);
Expand Down
4 changes: 0 additions & 4 deletions Generators/src/TPCLoopers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ void Scaler::load(const std::string &filename)
normal_max = jsonArrayToVector(doc["normal"]["max"]);
outlier_center = jsonArrayToVector(doc["outlier"]["center"]);
outlier_scale = jsonArrayToVector(doc["outlier"]["scale"]);
std::vector<double> normal_min;
std::vector<double> normal_max;
std::vector<double> outlier_center;
std::vector<double> outlier_scale;
}

std::vector<double> Scaler::inverse_transform(const std::vector<double> &input)
Expand Down