1 #ifndef __JACOUSTICS__JPLATYPUS_T__
2 #define __JACOUSTICS__JPLATYPUS_T__
64 for (
size_t i = 0; i <
ns; ++i) {
66 thread worker([
this, geometry, emitters, velocity, parameters]() {
72 katoomba.estimator.reset(getMEstimator(parameters.mestimator));
75 unique_lock<mutex> lock(in);
77 cv.wait(lock, [this]() { return stop || this->input.hasNext(); });
79 if (stop && !this->input.hasNext()) {
83 const JSuperEvt* evt = this->input.next();
87 for (JSuperEvt::rx_type::const_iterator hit = evt->rx.begin(); hit != evt->rx.end(); ++hit) {
89 data.push_back(JHit(emitters[hit->id],
91 JLocation(hit->string, hit->floor),
97 katoomba.value = getModel(*evt);
100 const double chi2 = katoomba (
data.begin(),
data.end()) / katoomba.estimator->getRho(1.0);
104 unique_lock<mutex> lock(out);
111 workers.emplace_back(std::move(worker));
124 unique_lock<mutex> lock(
in);
143 std::condition_variable
cv;
General purpose class for hash map of unique elements.
Fit functions of acoustic model.
Thread pool for global fits using super events.
JLANG::JObjectIterator< JSuperEvt > input_type
std::condition_variable cv
JTOOLS::JHashMap< int, JEmitter > JEmitters
static JMATH::JQuantile_t Q
chi2/NDF
JPlatypus(const JGeometry &geometry, const JEmitters &emitters, const JSoundVelocity &velocity, const JFitParameters ¶meters, input_type &input, const size_t ns)
Constructor.
std::vector< std::thread > workers
Interface of object iteration for a single data type.
Auxiliary classes and methods for acoustic position calibration.
double getWeight(T __begin, T __end)
Get total weight of data points.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Template specialisation of fit function of acoustic model based on JGandalf minimiser.
Implementation for depth dependend velocity of sound.
Auxiliary data structure for average.