1 #ifndef __JDYNAMICS__JDYNAMICS__
2 #define __JDYNAMICS__JDYNAMICS__
44 namespace JDYNAMICS {}
45 namespace JPP {
using namespace JDYNAMICS; }
95 void set(
const double t0_s)
99 setRange(t0_s - Tmax_s, t0_s + Tmax_s);
148 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
149 if (module->getFloor() != 0) {
204 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
211 if (
calibration[module->getID()].getXmin() <= t1_s &&
220 return (
double) n1 / (double) n0;
241 for (JDetector::iterator module = detector.begin(); module != detector.end(); ++module) {
249 if (t1_s >= f1.getXmin() && t1_s <= f1.getXmax()) {
262 buffer[module->getID()] = Q1;
338 for (JACOUSTICS::JEvt::const_iterator i = evt->begin(); i != evt->end(); ++i) {
371 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
372 if (module->getFloor() != 0) {
373 string.insert(module->getString());
390 return (
double) n1 / (double) n0;
424 for (JDetector::iterator module = detector.begin(); module != detector.end(); ++module) {
426 if (module->getFloor() != 0) {
428 if (!buffer.
has(module->getString())) {
435 if (t1_s >= f1.getXmin() && t1_s <= f1.getXmax()) {
436 buffer[module->getString()] = f1(t1_s);
442 if (buffer.
has(module->getString())) {
443 module->set(geometry[module->getString()].getPosition(buffer[module->getString()], module->getFloor()) -
getPiezoPosition());
482 return static_cast<const JDetector&
>(*this);
491 template<
class JObjectIterator_t>
492 void load(JObjectIterator_t& input)
513 orientation.update(static_cast<JDetector&>(*
this), t1_s);
JTOOLS::JElement2D< double, JACOUSTICS::JMODEL::JString > element_type
void set(const double t0_s)
Set.
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]
const JDetector & getDetector() const
Get actual detector.
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.
ROOT TTree parameter settings.
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.
const std::string & getVersion() const
Get version.
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.
ROOT TTree parameter settings.
const JGeometry & getGeometry() const
Get detector geometry.
number of points for interpolation
const JQuaternion3D & getQuaternion() const
Get quaternion.
JACOUSTICS::JGeometry JGeometry
static const int COMPASS_DISABLE
Enable (disable) use of compass if this status bit is 0 (1);.
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.
Version with quaternion and time offset per module.
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.
static const JGetDetectorVersion getDetectorVersion
Function object to map detector version to numerical value.
data_type::const_iterator const_iterator
const_iterator end() const
end of calibration data
data_type::const_reverse_iterator const_reverse_iterator
Data structure for unit quaternion in three dimensions.
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
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.
number of degrees for interpolation
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.
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.
then usage $script< detector file >< tripodfile >< stage > input file nInput files correspond to the output of JAcousticsEventBuilder[.sh] nFirst stage eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY eval JPrintDetector a $DETECTOR O CAN source JAcoustics sh $DETECTOR_ID typeset A CONFIGURATION for key in Tmax_s
JQuaternion3D & conjugate()
Conjugate quaternion.