1 #ifndef __JDYNAMICS__JDYNAMICS__
2 #define __JDYNAMICS__JDYNAMICS__
41 namespace JDYNAMICS {}
42 namespace JPP {
using namespace JDYNAMICS; }
92 void set(
const double t0_s)
96 setRange(t0_s - Tmax_s, t0_s + Tmax_s);
132 const double Tmax_s) :
141 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
142 if (module->getFloor() != 0) {
197 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
199 if (module->getFloor() != 0) {
204 if (
calibration[module->getID()].getXmin() <= t1_s &&
212 return (
double) n1 / (double) n0;
231 for (JDetector::iterator module = detector.begin(); module != detector.end(); ++module) {
239 if (t1_s >= f1.getXmin() && t1_s <= f1.getXmax()) {
252 buffer[module->getID()] = Q1;
300 const double Tmax_s) :
322 for (JACOUSTICS::JEvt::const_iterator i = evt->begin(); i != evt->end(); ++i) {
355 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
356 if (module->getFloor() != 0) {
357 string.insert(module->getString());
373 return (
double) n1 / (double) n0;
405 for (JDetector::iterator module = detector.begin(); module != detector.end(); ++module) {
407 if (module->getFloor() != 0) {
409 if (!buffer.
has(module->getString())) {
416 if (t1_s >= f1.getXmin() && t1_s <= f1.getXmax()) {
417 buffer[module->getString()] = f1(t1_s);
423 if (buffer.
has(module->getString())) {
424 module->set(geometry[module->getString()].getPosition(buffer[module->getString()], module->getFloor()) -
getPiezoPosition());
447 const double Tmax_s) :
461 template<
class JObjectIterator_t>
462 void load(JObjectIterator_t& input)
483 orientation.update(static_cast<JDetector&>(*
this), t1_s);
492 return static_cast<const JDetector&
>(*this);
JTOOLS::JElement2D< double, JACOUSTICS::JMODEL::JString > element_type
void set(const double t0_s)
Set.
number of points for interpolation
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
const_reverse_iterator rend() const
begin of reverse of calibration data
The elements in a collection are sorted according to their abscissa values and a given distance opera...
coverage_type getCoverage(const JDAQChronometer &chronometer) const
Get coverage at given time.
void update(JDetector &detector, const double t1_s)
Calibrate given detector at given UTC time.
coverage_type getCoverage(const double t1_s) const
Get coverage at given time.
Dynamic orientation calibration.
Dynamic position calibration.
double position
coverage of detector by available position calibration [0,1]
JDynamics(const JDetector &detector, const double Tmax_s)
Constructor.
JTOOLS::JHashMap< int, function_type > data_type
const_reverse_iterator rend() const
begin of reverse of calibration data
JQuaternion3D getQuaternion(const JQuaternion &Q)
Get quaternion.
JTOOLS::JPolfitFunction1D< NUMBER_OF_POINTS, NUMBER_OF_DEGREES, element_type, JTOOLS::JCollection > function_type
function_type::collection_type::container_type container_type
General purpose class for hash map of unique elements.
JPosition position
position calibration
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
bool hasDetectorAddressMap(const int id)
Check if detector address map is available.
const_reverse_iterator rbegin() const
begin of reverse of calibration data
const JDetector & update(const JDAQChronometer &chronometer)
Get detector calibrated at given time.
JOrientation orientation
orientation calibration
const_iterator begin() const
begin of calibration data
static JRotation getRotation
Function object to get rotation matrix to go from first to second module.
Lookup table for PMT addresses in detector.
Interface of object iteration for a single data type.
data_type::const_reverse_iterator const_reverse_iterator
const JDetector & update(const double t1_s)
Get detector calibrated at given time.
Data structure for detector geometry and calibration.
JTOOLS::JHashMap< int, JGEOMETRY3D::JQuaternion3D > buffer_type
const JModuleAddressMap & get(const int id) const
Get module address map.
const JGeometry & getGeometry() const
Get detector geometry.
const JQuaternion3D & getQuaternion() const
Get quaternion.
JACOUSTICS::JGeometry JGeometry
double orientation
coverage of detector by available orientation calibration [0,1]
void load(JObjectIterator_t &input)
Load calibration data.
const_reverse_iterator rbegin() const
begin of reverse of calibration data
JUTCTracker(const double Tmax_s)
Constructor.
void setUTCTimeRange(const JRange< double > &timerange)
Set UTC time range.
data_type::const_iterator const_iterator
double UNIXTimeStop
stop time
void load(JObjectIterator< JACOUSTICS::JEvt > &input)
Load calibration data.
JVector3D & sub(const JVector3D &vector)
Subtract vector.
const_iterator end() const
end of calibration data
virtual const pointer_type & next()=0
Get next element.
JPosition(const JDetector &detector, const double Tmax_s)
Constructor.
int getID() const
Get identifier.
coverage_type getCoverage() const
Get actual coverage.
virtual bool hasNext()=0
Check availability of next element.
General purpose class for a collection of sorted elements.
const JPosition3D & getPosition() const
Get position.
void update(JDetector &detector, const double t1_s)
Calibrate given detector at given UTC time.
double getCoverage(const JDetector &detector, const double t1_s) const
Get coverage.
void load(JObjectIterator< JCOMPASS::JOrientation > &input)
Load calibration data.
JUINT32_t getUTCseconds() const
Get time.
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.
JTOOLS::JElement2D< double, JGEOMETRY3D::JQuaternion3D > element_type
Data structure for coverage of dynamic calibrations.
data_type::const_iterator const_iterator
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi mv $WORKDIR/fit.root $MODULE_ROOT typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
const_iterator end() const
end of calibration data
data_type::const_reverse_iterator const_reverse_iterator
Data structure for unit quaternion in three dimensions.
Dynamic detector calibration.
double UNIXTimeStart
start time
Auxiliary class to define a range between two values.
JPosition3D getPiezoPosition()
Get relative position of piezo in optical module.
JTOOLS::JHashMap< int, function_type > data_type
const_iterator begin() const
begin of calibration data
JOrientation(const JDetector &detector, const double Tmax_s)
Constructor.
Data structure for position in three dimensions.
Exception for accessing a value in a collection that is outside of its range.
Compass event data types.
double getCoverage(const JDetector &detector, const double t1_s) const
Get coverage.
Model for fit to acoutsics data.
const JUTCTimeRange & getUTCTimeRange() const
Get UTC time range.
number of degrees for interpolation
JVector3D & add(const JVector3D &vector)
Add vector.
const JModule & getModule(const JModuleAddressMap &memo, const int id=-1, const JLocation &location=JLocation())
Get module according module address map.
JTOOLS::JPolfitFunction1D< NUMBER_OF_POINTS, NUMBER_OF_DEGREES, element_type, JTOOLS::JCollection > function_type
Auxiliary data structure to track applicability period of calibration data.
JQuaternion3D & conjugate()
Conjugate quaternion.