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]() {
75 unique_lock<mutex> lock(
in);
77 cv.wait(lock, [
this]() {
return stop || this->input.
hasNext(); });
87 for (JSuperEvt::rx_type::const_iterator hit = evt->
rx.begin(); hit != evt->
rx.end(); ++hit) {
89 data.push_back(
JHit(emitters[hit->id],
100 const double chi2 = katoomba (data.begin(), data.end()) / katoomba.estimator->getRho(1.0);
101 const double ndf =
getWeight(data.begin(), data.end()) - katoomba.value.getN();
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.
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
JLANG::JObjectIterator< JSuperEvt > input_type
Logical location of module.
Interface of object iteration for a single data type.
virtual bool hasNext()=0
Check availability of next element.
virtual const pointer_type & next()=0
Get next element.
Auxiliary classes and methods for acoustic position calibration.
double getWeight(T __begin, T __end)
Get total weight of data points.
JModel getModel(const JEvt &evt)
Get model.
JMEstimator * getMEstimator(const int type)
Get M-Estimator.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double sigma_s
time-of-arrival resolution [s]
int mestimator
M-estimator.
Template definition of fit function of acoustic model.
Implementation for depth dependend velocity of sound.
Acoustic super event fit.
Auxiliary data structure for average.
void put(const double x)
Put value.