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) :
 
  163          THROW(JValueOutOfRange, 
"Detector version " << detector.getVersion() << 
" < " << JDetectorVersion::V4);
 
  168          const JDetectorBuilder& demo = getDetectorBuilder(detector.getID());
 
  170          for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
 
  171            if (module->getFloor() != 0) {
 
  172              buffer[module->getID()] = getRotation(demo.getModule(module->getID()), *module);
 
 
  228        for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  235              if (
calibration[module->getID()].getXmin() <= t1_s && 
 
  244          return (
double) n1 / (double) n0;
 
 
  266            for (JDetector::iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  268              if (module->getFloor() != 0 && !module->has(
COMPASS_DISABLE) && 
calibration.has(module->getID()) && buffer.has(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) :
 
  346          THROW(JValueOutOfRange, 
"Detector version " << detector.getVersion() << 
" < " << JDetectorVersion::V4);
 
 
  365          for (JACOUSTICS::JEvt::const_iterator i = evt->begin(); i != evt->end(); ++i) {
 
 
  398        for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  399          if (module->getFloor() != 0) {
 
  400            string.insert(module->getString());
 
  417          return (
double) n1 / (double) n0;
 
 
  448          if (!in_range(t1_s)) {
 
  452            for (JDetector::iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  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>
 
  530    void load(JObjectIterator_t& input)
 
 
  547      bool is_updated = 
false;
 
  549      if (!in_range(t1_s)) {
 
  557          setUTCTimeRange(range);
 
 
  585      return { 
orientation.getCoverage(*
this, t1_s), position.getCoverage(*
this, t1_s) };
 
 
  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.
 
virtual bool hasNext()=0
Check availability of next element.
 
virtual const pointer_type & next()=0
Get next element.
 
Exception for accessing a value in a collection that is outside of its range.
 
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
 
uint32_t getUTCseconds() const
Get major time.
 
static const int COMPASS_DISABLE
Enable (disable) use of compass if this status bit is 0 (1);.
 
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.
 
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.
 
void load(const std::string &file_name)
Load mechanical model parameters from file.
 
double UNIXTimeStop
stop time
 
double UNIXTimeStart
start time
 
@ V4
Version with quaternion and time offset per module.
 
Dynamic orientation calibration.
 
JTOOLS::JHashMap< int, JGEOMETRY3D::JQuaternion3D > buffer_type
 
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
 
data_type::const_reverse_iterator const_reverse_iterator
 
@ NUMBER_OF_DEGREES
number of degrees for interpolation
 
@ NUMBER_OF_POINTS
number of points for interpolation
 
JTOOLS::JPolfitFunction1D< NUMBER_OF_POINTS, NUMBER_OF_DEGREES, element_type, JTOOLS::JCollection > function_type
 
const_reverse_iterator rbegin() const
begin of reverse of calibration data
 
JTOOLS::JElement2D< double, JGEOMETRY3D::JQuaternion3D > element_type
 
void load(JObjectIterator< JCOMPASS::JOrientation > &input)
Load calibration data.
 
const_iterator begin() const
begin of calibration data
 
data_type::const_iterator const_iterator
 
function_type::collection_type::container_type container_type
 
JTOOLS::JHashMap< int, function_type > data_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
 
Dynamic position calibration.
 
data_type::const_reverse_iterator const_reverse_iterator
 
JTOOLS::JHashMap< int, function_type > data_type
 
JTOOLS::JElement2D< double, JACOUSTICS::JMODEL::JString > element_type
 
const_reverse_iterator rend() const
begin of reverse of calibration data
 
JPosition(const JDetector &detector, const double Tmax_s)
Constructor.
 
JACOUSTICS::JGeometry JGeometry
 
const_iterator end() const
end of calibration data
 
JTOOLS::JPolfitFunction1D< NUMBER_OF_POINTS, NUMBER_OF_DEGREES, element_type, JTOOLS::JCollection > function_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.
 
const_reverse_iterator rbegin() const
begin of reverse of calibration data
 
const_iterator begin() const
begin of calibration data
 
data_type::const_iterator const_iterator
 
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::coverage_type coverage_type
 
JDynamics(const JDetector &detector, const double Tmax_s)
Constructor.
 
JOrientation orientation
orientation calibration
 
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.