Skip to content

Commit 19e77a3

Browse files
committed
Fixed bug + cleaned code
1 parent c156a31 commit 19e77a3

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

Generators/include/Generators/TPCLoopersParam.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ struct GenTPCLoopersParam : public o2::conf::ConfigurableParamHelper<GenTPCLoope
3939
std::string colsys = "PbPb"; // collision system (PbPb or pp)
4040
int intrate = -1; // Automatic IR from collision context if -1, else user-defined interaction rate in Hz
4141
bool flat_gas = true; // if true, the gas density is considered flat in the TPC volume
42-
unsigned int nFlatGasLoopers = 500; // number of loopers to be generated per event in case of flat gas
43-
float fraction_pairs = 0.08; // fraction of loopers
42+
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]
43+
float fraction_pairs = 0.08; // fraction of loopers [currently unused, kept for possible future debug developments]
4444
float multiplier[2] = {1., 1.}; // multiplier for pairs and compton loopers for Poissonian and Gaussian sampling
4545
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
4646
float adjust_flatgas = 0.f; // adjustment for the number of flat gas loopers per orbit (in percentage, e.g. -0.1 = -10%) [-1, inf)]

Generators/src/Generator.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ bool Generator::initLoopersGen()
106106
return kFALSE;
107107
}
108108
}
109-
const auto& nFlatGasLoopers = loopersParam.nFlatGasLoopers;
110-
const auto& fraction_pairs = loopersParam.fraction_pairs;
111109
std::array<float, 2> multiplier = {loopersParam.multiplier[0], loopersParam.multiplier[1]};
112110
unsigned int nLoopersPairs = loopersParam.fixedNLoopers[0];
113111
unsigned int nLoopersCompton = loopersParam.fixedNLoopers[1];
@@ -170,7 +168,7 @@ bool Generator::initLoopersGen()
170168
mLoopersGen->SetAdjust(loopersParam.adjust_flatgas);
171169
}
172170
} else {
173-
// Otherwise, Poisson+Gauss sampling or fixed number of loopers will be used
171+
// Otherwise, Poisson+Gauss sampling or fixed number of loopers per event will be used
174172
// Multiplier is applied only with distribution sampling
175173
// This configuration can be used for testing purposes, in all other cases flat gas is recommended
176174
mLoopersGen->SetNLoopers(nLoopersPairs, nLoopersCompton);

Generators/src/TPCLoopers.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ void Scaler::load(const std::string &filename)
2727
normal_max = jsonArrayToVector(doc["normal"]["max"]);
2828
outlier_center = jsonArrayToVector(doc["outlier"]["center"]);
2929
outlier_scale = jsonArrayToVector(doc["outlier"]["scale"]);
30-
std::vector<double> normal_min;
31-
std::vector<double> normal_max;
32-
std::vector<double> outlier_center;
33-
std::vector<double> outlier_scale;
3430
}
3531

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

0 commit comments

Comments
 (0)