1#ifndef __JDYNAMICS__JDYNAMICS__
2#define __JDYNAMICS__JDYNAMICS__
117 void set(
const double t0_s)
121 setRange(t0_s - Tmax_s, t0_s + Tmax_s);
157 const double Tmax_s) :
171 if (
module->getFloor() != 0) {
172 buffer[
module->getID()] = getRotation(demo.getModule(module->getID()), *module);
192 while (input.hasNext()) {
230 if (
module->getFloor() != 0 && !
module->has(COMPASS_DISABLE)) {
268 if (
module->getFloor() != 0 && !
module->has(COMPASS_DISABLE) && calibration.has(module->getID()) && buffer.has(module->getID())) {
270 const function_type& f1 = calibration.get(module->getID());
274 if (
t1_s >= f1.getXmin() &&
t1_s <= f1.getXmax()) {
283 module->rotate(Q1 * Q0.conjugate());
287 buffer[
module->getID()] = Q1;
315 NUMBER_OF_POINTS = 7,
316 NUMBER_OF_DEGREES = 2
339 const double Tmax_s) :
360 while (input.hasNext()) {
365 for (JACOUSTICS::JEvt::const_iterator i = evt->begin(); i != evt->end(); ++i) {
399 if (
module->getFloor() != 0) {
400 string.insert(
module->getString());
448 if (!in_range(
t1_s)) {
454 if (
module->getFloor() != 0) {
456 if (!buffer.has(
module->getString())) {
463 if (
t1_s >= f1.getXmin() &&
t1_s <= f1.getXmax()) {
464 buffer[
module->getString()] = f1(t1_s);
470 if (buffer.has(
module->getString())) {
471 module->set(geometry[module->getString()].getPosition(buffer[module->getString()], module->getFloor()) - getPiezoPosition());
503 const double Tmax_s) :
520 return static_cast<const JDetector&
>(*this);
529 template<
class JObjectIterator_t>
549 if (!in_range(
t1_s)) {
557 setUTCTimeRange(range);
573 return update(
chronometer.getTimesliceStart().getUTCseconds());
597 return getCoverage(
chronometer.getTimesliceStart().getUTCseconds());
608 return getCoverage(0.5 * (getLowerLimit() + getUpperLimit()));
Model for fit to acoutsics data.
ROOT TTree parameter settings.
General purpose class for a collection of sorted elements.
Compass event data types.
ROOT TTree parameter settings.
Coverage of dynamical detector calibration.
Data structure for detector geometry and calibration.
The elements in a collection are sorted according to their abscissa values and a given distance opera...
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
General purpose class for hash map of unique elements.
Auxiliary class to define a range between two values.
Data structure for position in three dimensions.
Data structure for unit quaternion in three dimensions.
Interface of object iteration for a single data type.
Exception for accessing a value in a collection that is outside of its range.
Template definition of a multi-dimensional oscillation probability interpolation table.
void load()
Load oscillation probability table.
JMODEL::JString getString(const JFit &fit)
Get model parameters of string.
static JDetectorMechanics getMechanics
Function object to get string mechanics.
JQuaternion3D getQuaternion(const JQuaternion &Q)
Get quaternion.
JDetectorBuilder & getDetectorBuilder()
Get detector builder.
static const JGetDetectorVersion getDetectorVersion
Function object to map detector version to numerical value.
bool hasDetectorBuilder(const int id)
Check if detector builder is available.
Main namespace for dynamic position and orientation calibration.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JDAQUTCTimeRange getUTCTimeRange()
Get UTC time range.
double UNIXTimeStop
stop time
double UNIXTimeStart
start time
Auxiliary interface for building detector.
@ V4
Version with quaternion and time offset per module.
Dynamic orientation calibration.
bool update(JDetector &detector, const double t1_s)
Calibrate given detector at given UTC time.
const_reverse_iterator rend() const
begin of reverse of calibration data
@ NUMBER_OF_DEGREES
number of degrees for interpolation
@ NUMBER_OF_POINTS
number of points for interpolation
const_reverse_iterator rbegin() const
begin of reverse of calibration data
JTOOLS::JPolfitFunction1D< NUMBER_OF_POINTS, NUMBER_OF_DEGREES, element_type, JTOOLS::JCollection > function_type
JTOOLS::JHashMap< int, function_type > data_type
data_type::const_reverse_iterator const_reverse_iterator
void load(JObjectIterator< JCOMPASS::JOrientation > &input)
Load calibration data.
const_iterator begin() const
begin of calibration data
JTOOLS::JHashMap< int, JGEOMETRY3D::JQuaternion3D > buffer_type
data_type::const_iterator const_iterator
JTOOLS::JElement2D< double, JGEOMETRY3D::JQuaternion3D > element_type
double getCoverage(const JDetector &detector, const double t1_s) const
Get coverage.
JOrientation(const JDetector &detector, const double Tmax_s)
Constructor.
const_iterator end() const
end of calibration data
function_type::collection_type::container_type container_type
Dynamic position calibration.
data_type::const_iterator const_iterator
const_reverse_iterator rend() const
begin of reverse of calibration data
JPosition(const JDetector &detector, const double Tmax_s)
Constructor.
const_iterator end() const
end of calibration data
JACOUSTICS::JGeometry JGeometry
JTOOLS::JPolfitFunction1D< NUMBER_OF_POINTS, NUMBER_OF_DEGREES, element_type, JTOOLS::JCollection > function_type
JTOOLS::JHashMap< int, function_type > data_type
void load(JObjectIterator< JACOUSTICS::JEvt > &input)
Load calibration data.
double getCoverage(const JDetector &detector, const double t1_s) const
Get coverage.
bool update(JDetector &detector, const double t1_s)
Calibrate given detector at given UTC time.
const JGeometry & getGeometry() const
Get detector geometry.
data_type::const_reverse_iterator const_reverse_iterator
const_reverse_iterator rbegin() const
begin of reverse of calibration data
JTOOLS::JElement2D< double, JACOUSTICS::JMODEL::JString > element_type
const_iterator begin() const
begin of calibration data
Auxiliary data structure to track applicability period of calibration data.
JUTCTracker(const double Tmax_s)
Constructor.
void set(const double t0_s)
Set.
Dynamic detector calibration.
JPosition position
position calibration
JDynamics(const JDetector &detector, const double Tmax_s)
Constructor.
JOrientation orientation
orientation calibration
JDYNAMICS::coverage_type coverage_type
bool update(const double t1_s)
Get detector calibrated at given time.
coverage_type getCoverage(const JDAQChronometer &chronometer) const
Get coverage at given time.
coverage_type getCoverage(const double t1_s) const
Get coverage at given time.
coverage_type getCoverage() const
Get actual coverage.
bool update(const JDAQChronometer &chronometer)
Get detector calibrated at given time.
const JDetector & getDetector() const
Get actual detector.
void load(JObjectIterator_t &input)
Load calibration data.
Auxiliary data structure to pre-load auxiliary data in memory.
JPreloader(const int id)
Constructor.
Data structure for coverage of detector by dynamical calibrations.