Jpp
Classes | Typedefs | Functions | Variables
JDETECTOR Namespace Reference

Auxiliary classes and methods for detector calibration. More...

Classes

class  JAnchor
 Data structure for anchor position on sea bed. More...
 
class  JCalibration
 Data structure for PMT calibration. More...
 
struct  JCalibrator
 Auxiliary class to apply (de-)calibration to template hit. More...
 
struct  JCalibrator< JHit_t, false >
 Template specialisation of JCalibrator for non-primitive data types. More...
 
struct  JCalibrator< T, true >
 Template specialisation of JCalibrator for primitive data types. More...
 
class  JCLBDefaultSimulator
 Default CLB simulation. More...
 
class  JCLBDefaultSimulatorInterface
 Default CLB simulation. More...
 
class  JCLBSimulator
 Interface for CLB simulation. More...
 
class  JCompass
 Data structure for comapss in three dimensions. More...
 
class  JCompassMatrix
 Compass matrix. More...
 
class  JDAQHitRouter
 Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structure for DAQ hits. More...
 
class  JDetector
 Detector data structure. More...
 
class  JDetectorAddressMap
 Lookup table for PMT addresses in detector. More...
 
struct  JDetectorAddressMap_t
 Auxiliary class to extract detector address map from detector identifier. More...
 
struct  JDetectorAddressMap_t< JTypeList< JHead_t, JNullType > >
 
struct  JDetectorAddressMap_t< JTypeList< JHead_t, JTail_t > >
 
class  JDetectorHeader
 Data structure for detector header. More...
 
class  JDetectorParameters
 Data structure for parameters for detector geometry. More...
 
class  JDetectorParametersHelper
 Auxiliary class for I/O of JDetectorParameters data structure. More...
 
class  JDetectorSimulator
 Detector simulation. More...
 
class  JDetectorSubset
 Detector subset with binary search functionality. More...
 
class  JDetectorSubset_t
 Detector subset without binary search functionality. More...
 
struct  JDetectorVersion
 Detector version. More...
 
struct  JGetDetectorVersion
 Auxiliary class to map detector variant to detector version. More...
 
struct  JGetPMTStatusBit
 Auxiliary class to map key to PMT status bit. More...
 
class  JK40DefaultSimulator
 Default implementation of the simulation of K40 background. More...
 
class  JK40DefaultSimulatorInterface
 Default K40 simulator interface. More...
 
struct  JK40Rates
 Auxiliary class for K40 rates. More...
 
class  JK40RunByRunSimulator
 K40 simulation based on run-by-run information. More...
 
class  JK40Simulator
 Interface for simulation of K40 background. More...
 
struct  JKM3NeT_t
 KM3NeT. More...
 
struct  JMaximalDistance
 Auxiliary class to match modules according maximal distance. More...
 
class  JModule
 Data structure for a composite optical module. More...
 
class  JModuleAddress
 Address of module in detector data structure. More...
 
class  JModuleAddressMap
 Lookup table for PMT addresses in optical module. More...
 
struct  JModuleAttributes
 Data structure for module address and module attributes. More...
 
struct  JModuleComparator3D_t
 Module comparator according its distance to origin. More...
 
struct  JModuleComparator3Z_t
 Module comparator according its z-position. More...
 
class  JModuleData
 Data structure for PMT data corresponding to a detector module. More...
 
class  JModuleGeometry
 Module geometry. More...
 
class  JModuleLocation
 Logical location of module. More...
 
class  JModuleMapper
 Mapper for directly addressing of associated modules in the detector data structure. More...
 
struct  JModulePosition_t
 Auxiliary data structure for module position. More...
 
struct  JModuleRotation_t
 Auxiliary data structure for module rotation. More...
 
class  JModuleRouter
 Router for direct addressing of module data in detector data structure. More...
 
struct  JModuleSignalProcessor
 Auxiliary container for PMT signal processors in same optical module. More...
 
struct  JMonteCarlo_t
 Monte Carlo .detx file. More...
 
class  JMonteCarloDetector
 Monte Carlo detector (i.e. More...
 
struct  JObsolete_t
 obsolete detector More...
 
struct  JPhotoElectron
 Data structure for single photo-electron. More...
 
class  JPMT
 Data structure for PMT geometry and calibration. More...
 
class  JPMTAddress
 Address of PMT in detector data structure. More...
 
struct  JPMTAddressTranslator
 Data structure to translate PMT physical to readout address. More...
 
struct  JPMTAnalogueSignalProcessor
 PMT analogue signal processor. More...
 
struct  JPMTCalibration_t
 Auxiliary data structure for PMT calibration. More...
 
class  JPMTChannel
 Auxiliary class to uniquely identify PMT readout channel. More...
 
class  JPMTData
 Template data structure for PMT I/O. More...
 
class  JPMTDefaultSimulator
 Default PMT simulation. More...
 
class  JPMTDefaultSimulatorInterface
 Default PMT simulation interface. More...
 
class  JPMTIdentifier
 PMT identifier. More...
 
class  JPMTParameters
 Data structure for PMT parameters. More...
 
class  JPMTParametersMap
 Auxiliary class for map of PMT parameters. More...
 
class  JPMTPhysicalAddress
 Data structure for PMT physical address. More...
 
struct  JPMTPulse
 Data structure for PMT digital pulse. More...
 
struct  JPMTRateRange
 Data structure for range of PMT rates. More...
 
class  JPMTReadoutAddress
 Data structure for PMT readout address. More...
 
class  JPMTRouter
 Router for direct addressing of PMT data in detector data structure. More...
 
class  JPMTRunByRunSimulator
 PMT simulation based on run-by-run information. More...
 
struct  JPMTSignal
 Data structure for PMT analogue signal. More...
 
class  JPMTSignalProcessorInterface
 PMT signal processor interface. More...
 
class  JPMTSimulator
 Interface for PMT simulation. More...
 
struct  JPPM_DU_t
 Type definitions for different detectors.PPM_DU. More...
 
struct  JPutDetectorVersion
 Auxiliary class to map detector version to detector variant. More...
 
struct  JPutPMTStatusBit
 Auxiliary class to map PMT status bit to key. More...
 
struct  JRotation
 Auxiliary class to get rotation matrix between two optical modules. More...
 
class  JTemplateDetectorAddressMap
 Template lookup table for PMT addresses in detector. More...
 
class  JTemplateDetectorAddressMap< JKM3NeT_t >
 Template specialisation of JTemplateDetectorAddressMap for KM3NeT detector. More...
 
class  JTemplateDetectorAddressMap< JMonteCarlo_t >
 Template specialisation of JTemplateDetectorAddressMap for Monte Carlo detector. More...
 
class  JTemplateDetectorAddressMap< JObsolete_t >
 Template specialisation of JTemplateDetectorAddressMap for obsolete detector. More...
 
class  JTemplateDetectorAddressMap< JPPM_DU_t >
 Template specialisation of JTemplateDetectorAddressMap for PPM_DU detector. More...
 
class  JTransferFunction1D
 Auxiliary class for a non-linear transfer function of TDC inside FPGA. More...
 
class  JTransitionTimeGenerator
 Auxiliary class to generate PMT transition times based on measurements by Oleg Kalekin et al. More...
 
class  JTransitionTimeProbability
 Probability distibution of the PMT transition times based on measurements by Oleg Kalekin et al. More...
 
class  JTransitionTimeProbability2D
 Auxiliary class to generate twofold PMT transition times. More...
 
struct  JUTCDistance
 Auxiliary class for distance beteen UTC times. More...
 

Typedefs

typedef JPMTData< JPMTPulseJPMTOutput
 Type definition of PMT base output. More...
 
typedef std::vector< JPMTOutputJCLBInput
 Type definition of CLB input. More...
 
typedef JTYPELIST< JPPM_DU_t, JKM3NeT_t, JMonteCarlo_t >::typelist JDetectorTypes_t
 Type list of detector types. More...
 
typedef std::vector< JPMTCalibration_tJPMTCalibration
 PMT calibration. More...
 
typedef std::vector< JModulePosition_tJModulePosition
 Module position. More...
 
typedef std::vector< JModuleRotation_tJModuleRotation
 Module rotation. More...
 
typedef double JRateL0_t
 Type definition of singles rate [Hz]. More...
 
typedef std::vector< double > JRateL1_t
 Type definition of count rate as a function of multiplicty [Hz] The multiples rate start counting at two-fold coincidences. More...
 
typedef size_t multiplicity_type
 Type definition of multiplicity. More...
 
typedef JLANG::JComparator< double(JVector3D::*)() const > JModuleComparator
 Type definition of a module comparator using 3D position information. More...
 
typedef JLANG::JObjectID JModuleIdentifier
 
typedef std::map< JPMTIdentifier, JPMTParametersJPMTParametersMap_t
 Type definition of map PMT identifier to PMT parameters. More...
 

Functions

bool operator< (const JAnchor &first, const JAnchor &second)
 Sort anchors in ascending distance from (0,0). More...
 
template<class T >
double getTime (const T &t1, const JCalibration &cal)
 Get calibrated time. More...
 
template<class T >
double putTime (const T &t1, const JCalibration &cal)
 Get de-calibrated time. More...
 
template<class T >
double getToT (const T &tot, const JCalibration &cal)
 Get calibrated time-over-threshold of hit. More...
 
template<class T >
double putToT (const T &tot, const JCalibration &cal)
 Get de-calibrated time-over-threshold of hit. More...
 
void reset (JCLBInput &data, size_t size)
 Reset CLB buffers. More...
 
bool hasDetector (JType< JPPM_DU_t > type, const int id)
 Check validity of detector identifier. More...
 
bool hasDetector (JType< JKM3NeT_t > type, const int id)
 
bool hasDetector (JType< JMonteCarlo_t > type, const int id)
 
template<class JDetector_t >
JDetectorAddressMapgetDetectorAddressMap ()
 Get detector address map. More...
 
template<class JDetector_t >
JModuleAddressMapgetModuleAddressMap (int id)
 Get module address map. More...
 
template<class JDetector_t >
const JPMTAddressTranslatorgetPMTAddressTranslator (int id, int tdc)
 Get PMT address translator for given module identifier and TDC channel. More...
 
template<class JDetector_t >
int getPMTLogicalIndex (int id, int tdc)
 Get PMT logical index for given module identifier and TDC channel. More...
 
JDetectorAddressMapgetDetectorAddressMap (const int id)
 Get detector address map. More...
 
bool hasDetectorAddressMap (const int id)
 Check if detector address map is available. More...
 
bool is_valid (const json &js)
 Check validity of JSon data. More...
 
void to_json (json &js, const JPMTCalibration_t &object)
 Convert PMT calibration to JSon. More...
 
void from_json (const json &js, JPMTCalibration_t &object)
 Convert JSon to PMT calibration. More...
 
void to_json (json &js, const JModulePosition_t &object)
 Convert module position to JSon. More...
 
void from_json (const json &js, JModulePosition_t &object)
 Convert JSon to module position. More...
 
void to_json (json &js, const JModuleRotation_t &object)
 Convert module rotation to JSon. More...
 
void from_json (const json &js, JModuleRotation_t &object)
 Convert JSon to module rotation. More...
 
JDetectorHeader getARCADetectorHeader ()
 Get detector header for ARCA. More...
 
JDetectorHeader getORCADetectorHeader ()
 Get detector header for ORCA. More...
 
double getMaximalDistance (const JDetector &detector)
 Get maximal distance between modules in detector. More...
 
double GetXrotationG4 (const JVersor3D dir)
 Get rotation over X axis in Geant4 coordinate system. More...
 
double GetYrotationG4 (const JVersor3D dir)
 Get rotation over Y axis in Geant4 coordinate system. More...
 
void read_gdml (std::istream &, const JDetector &)
 
void write_gdml (std::ostream &out, const JDetector &detector)
 Writes KM3Sim GDML input file from detector. More...
 
double getMaximalTime (const JDetector &detector)
 Get maximal time between modules in detector following causality. More...
 
double getMaximalTime (const JDetector &detector, const double roadWidth_m)
 Get maximal time between modules in detector following causality. More...
 
JTimeRange getTimeRange (const JTimeRange &timeRange, const JModule &module)
 Get de-calibrated time range. More...
 
int getNumberOfPMTs (const JModule &module)
 Get number of PMTs. More...
 
int getNumberOfPMTs (const JDetector &detector)
 Get number of PMTs. More...
 
int getNumberOfStrings (const JDetector &detector)
 Get number of strings. More...
 
std::set< int > getStringIDs (const JDetector &detector)
 Get list of strings IDs. More...
 
int getNumberOfFloors (const JDetector &detector)
 Get number of floors. More...
 
int getNumberOfModules (const JDetector &detector)
 Get number of modules. More...
 
void load (const JString &file_name, JDetector &detector)
 Load detector from input file. More...
 
void store (const JString &file_name, const JDetector &detector)
 Store detector to output file. More...
 
const JModulegetModule (const JModuleAddressMap &memo, const int id, const JModuleLocation &location=JModuleLocation())
 Get module according module address map. More...
 
const JModulegetModule (const int id, const JModuleLocation &location=JModuleLocation())
 Get module corresponding to Antares storey. More...
 
std::string getModuleLabel (const JModuleLocation &location)
 Get module label for monitoring and other applications. More...
 
JPosition3D getPosition (const JModule &first, const JModule &second)
 Get position to go from first to second module. More...
 
JCalibration getCalibration (const JCalibration &first, const JCalibration &second)
 Get calibration to go from first to second calibration. More...
 
std::vector< std::string > getDetectorVersions (const JType< std::string > &type)
 Get detector versions. More...
 
std::vector< JDetectorVersion::JVersion_tgetDetectorVersions (const JType< JDetectorVersion::JVersion_t > &type)
 Get detector versions. More...
 
template<class T >
std::vector< T > getDetectorVersions ()
 Get detector versions. More...
 
template<class JAttributes_t >
void setAttributes (const JModule &first, const JModule &second, JAttributes_t &attributes)
 Template method to set module attributes. More...
 
template<>
void setAttributes< JNullType > (const JModule &first, const JModule &second, JNullType &attributes)
 Template specialisation to set no attributes for the default empty object. More...
 
std::vector< std::string > getPMTStatusBits (const JType< std::string > &type)
 Get PMT status bits. More...
 
std::vector< JPMT::JPMTStatusBits_tgetPMTStatusBits (const JType< JPMT::JPMTStatusBits_t > &type)
 Get PMT status bits. More...
 
template<class T >
std::vector< T > getPMTStatusBits ()
 Get PMT status bits. More...
 
bool operator< (const JPMTIdentifier &first, const JPMTIdentifier &second)
 Less than operator for PMT identifiers. More...
 
bool operator== (const JPMTIdentifier &first, const JPMTIdentifier &second)
 Equal operator for PMT identifiers. More...
 
double getSurvivalProbability (const JPMTParameters &parameters)
 Get model dependent probability that a one photo-electron hit survives the simulation of the PMT assuming QE = 1. More...
 
double getHitProbability (const double QE, const double mu)
 Get ratio of hit probabilities for given QE and expectation value of the number of photo-electrons. More...
 
double getMaximalHitProbability (const double mu)
 Get maximal ratio of hit probabilities for given QE and expectation value of the number of photo-electrons. More...
 
double getQE (const double R, const double mu)
 Get QE for given ratio of hit probabilities and expectation value of the number of photo-electrons. More...
 
bool operator< (const JPhotoElectron &first, const JPhotoElectron &second)
 Less than operator for photo-elecrons. More...
 
bool operator< (const JPMTSignal &first, const JPMTSignal &second)
 Less than operator for PMT signals. More...
 
bool operator< (const JPMTPulse &first, const JPMTPulse &second)
 Less than operator for PMT pulses. More...
 
JTimeRange getTimeRange (const JModuleData &input)
 Get time range (i.e. More...
 

Variables

const double TIME_OVER_THRESHOLD_NS = 26.4
 Specification for time-over-threshold corresponding to a one photo-electron pulse. More...
 
static const std::string Result_t = "Result"
 Detector calibration key words for JSON I/O. More...
 
static const std::string Comment_t = "Comment"
 
static const std::string Data_t = "Data"
 
static const std::string PMTT0s_t = "PMTT0s"
 
static const std::string DOMPositions_t = "DOMPositions"
 
static const std::string DOMRotations_t = "DOMRotations"
 
static const std::string PMTSerial_t = "PMTSerial"
 
static const std::string DOMSerial_t = "DOMSerial"
 
static const std::string DOMId_t = "DOMId"
 
static const std::string T0_t = "T0"
 
static const std::string PX_t = "PX"
 
static const std::string PY_t = "PY"
 
static const std::string PZ_t = "PZ"
 
static const std::string Q0_t = "Q0"
 
static const std::string QX_t = "QX"
 
static const std::string QY_t = "QY"
 
static const std::string QZ_t = "QZ"
 
static const std::string OK_t = "OK"
 
static const char *const GENDET_DETECTOR_FILE_FORMAT = ".det"
 File name extensions. More...
 
static const char *const BINARY_DETECTOR_FILE_FORMAT = ".dat"
 JIO binary file format. More...
 
static const char *const KM3NET_DETECTOR_FILE_FORMAT = ".detx"
 KM3NeT standard ASCII format. More...
 
static const char *const ZIPPED_DETECTOR_FILE_FORMAT = ".gz"
 zipped KM3NeT standard ASCII format More...
 
static const char *const GDML_DETECTOR_FILE_FORMAT = ".xml"
 KM3Sim input format. More...
 
static const char *const GDML_SCHEMA = getenv("GDML_SCHEMA_DIR")
 directory necessary for correct GDML header output More...
 
static JRotation getRotation
 Function object to get rotation matrix to go from first to second module. More...
 
static const JGetDetectorVersion getDetectorVersion
 Function object to map detector variant to detector version. More...
 
static const JPutDetectorVersion putDetectorVersion (getDetectorVersion)
 Function object to map detector version to detector variant. More...
 
static const int LED_BEACON_PMT_TYPE = 2
 PMT type of LED beacon. More...
 
static const JGetPMTStatusBit getPMTStatusBit
 Function object to map key to PMT status bit. More...
 
static const JPutPMTStatusBit putPMTStatusBit (getPMTStatusBit)
 Function object to map PMT status bit to key. More...
 
static const JTransitionTimeGenerator getTransitionTime
 Function object to generate transition time. More...
 
static const JTransitionTimeProbability getTransitionTimeProbability
 Function object of transition time prabability. More...
 
static const JTransitionTimeProbability2D getTransitionTimeProbability2D
 Function object of twofold transition time prabability. More...
 

Detailed Description

Auxiliary classes and methods for detector calibration.

Auxiliary classes and methods for detector calibration and simulation.

Author
mdejong

Typedef Documentation

◆ JPMTOutput

Type definition of PMT base output.

Definition at line 26 of file JCLBSimulator.hh.

◆ JCLBInput

Type definition of CLB input.

Definition at line 32 of file JCLBSimulator.hh.

◆ JDetectorTypes_t

Type list of detector types.

Definition at line 42 of file JDetectorAddressMapToolkit.hh.

◆ JPMTCalibration

PMT calibration.

Definition at line 241 of file JDetectorCalibration.hh.

◆ JModulePosition

Module position.

Definition at line 242 of file JDetectorCalibration.hh.

◆ JModuleRotation

Module rotation.

Definition at line 243 of file JDetectorCalibration.hh.

◆ JRateL0_t

typedef double JDETECTOR::JRateL0_t

Type definition of singles rate [Hz].

Definition at line 21 of file JK40Rates.hh.

◆ JRateL1_t

Type definition of count rate as a function of multiplicty [Hz] The multiples rate start counting at two-fold coincidences.

Definition at line 27 of file JK40Rates.hh.

◆ multiplicity_type

Type definition of multiplicity.

Definition at line 33 of file JK40Rates.hh.

◆ JModuleComparator

typedef JLANG::JComparator<double (JVector3D::*)() const> JDETECTOR::JModuleComparator

Type definition of a module comparator using 3D position information.

Definition at line 22 of file JModuleComparator.hh.

◆ JModuleIdentifier

Definition at line 16 of file JModuleIdentifier.hh.

◆ JPMTParametersMap_t

Type definition of map PMT identifier to PMT parameters.

Definition at line 47 of file JPMTParametersMap.hh.

Function Documentation

◆ operator<() [1/5]

bool JDETECTOR::operator< ( const JAnchor first,
const JAnchor second 
)
inline

Sort anchors in ascending distance from (0,0).

Parameters
firstfirst anchor
secondsecond anchor
Returns
true if first anchor closer to (0,0); else false

Definition at line 99 of file JAnchor.hh.

100  {
101  return first.getLengthSquared() < second.getLengthSquared();
102  }

◆ getTime()

template<class T >
double JDETECTOR::getTime ( const T &  t1,
const JCalibration cal 
)
inline

Get calibrated time.

Parameters
t1time [ns]
calcalibration
Returns
time [ns]

Definition at line 202 of file JDetector/JCalibration.hh.

203  {
204  return JCalibrator<T>::getTime(t1, cal);
205  }

◆ putTime()

template<class T >
double JDETECTOR::putTime ( const T &  t1,
const JCalibration cal 
)
inline

Get de-calibrated time.

Parameters
t1time [ns]
calcalibration
Returns
time [ns]

Definition at line 216 of file JDetector/JCalibration.hh.

217  {
218  return JCalibrator<T>::putTime(t1, cal);
219  }

◆ getToT()

template<class T >
double JDETECTOR::getToT ( const T &  tot,
const JCalibration cal 
)
inline

Get calibrated time-over-threshold of hit.

Parameters
tottime-over-threshold [ns]
calcalibration
Returns
time-over-threshold [ns]

Definition at line 230 of file JDetector/JCalibration.hh.

231  {
232  return JCalibrator<T>::getToT(tot, cal);
233  }

◆ putToT()

template<class T >
double JDETECTOR::putToT ( const T &  tot,
const JCalibration cal 
)
inline

Get de-calibrated time-over-threshold of hit.

Parameters
tottime-over-threshold [ns]
calcalibration
Returns
time-over-threshold [ns]

Definition at line 244 of file JDetector/JCalibration.hh.

245  {
246  return JCalibrator<T>::putToT(tot, cal);
247  }

◆ reset()

void JDETECTOR::reset ( JCLBInput data,
size_t  size 
)
inline

Reset CLB buffers.

Parameters
dataCLB input data
sizenumber of buffers

Definition at line 41 of file JCLBSimulator.hh.

42  {
43  data.resize(size);
44 
45  for (JCLBInput::iterator i = data.begin(); i != data.end(); ++i) {
46  i->clear();
47  }
48  }

◆ hasDetector() [1/3]

bool JDETECTOR::hasDetector ( JType< JPPM_DU_t type,
const int  id 
)

Check validity of detector identifier.

Parameters
typedetector type
iddetector identifier
Returns
true if valid match; else false

Definition at line 52 of file JDetectorAddressMapToolkit.hh.

52 { return id == 1; }

◆ hasDetector() [2/3]

bool JDETECTOR::hasDetector ( JType< JKM3NeT_t type,
const int  id 
)

Definition at line 53 of file JDetectorAddressMapToolkit.hh.

53 { return id >= 2 && id <= 100000; }

◆ hasDetector() [3/3]

bool JDETECTOR::hasDetector ( JType< JMonteCarlo_t type,
const int  id 
)

Definition at line 54 of file JDetectorAddressMapToolkit.hh.

54 { return id >= -100000 && id <= -2; }

◆ getDetectorAddressMap() [1/2]

template<class JDetector_t >
JDetectorAddressMap& JDETECTOR::getDetectorAddressMap ( )
inline

Get detector address map.

Returns
detector address map

Definition at line 363 of file JDetectorAddressMapToolkit.hh.

364  {
366 
367  return demo;
368  }

◆ getModuleAddressMap()

template<class JDetector_t >
JModuleAddressMap& JDETECTOR::getModuleAddressMap ( int  id)
inline

Get module address map.

Parameters
idmodule identifier
Returns
module address map

Definition at line 378 of file JDetectorAddressMapToolkit.hh.

379  {
380  return getDetectorAddressMap<JDetector_t>().get(id);
381  }

◆ getPMTAddressTranslator()

template<class JDetector_t >
const JPMTAddressTranslator& JDETECTOR::getPMTAddressTranslator ( int  id,
int  tdc 
)
inline

Get PMT address translator for given module identifier and TDC channel.

Parameters
idmodule identifier
tdcTDC
Returns
PMT address translator

Definition at line 392 of file JDetectorAddressMapToolkit.hh.

393  {
394  return getModuleAddressMap<JDetector_t>(id).getAddressTranslator(tdc);
395  }

◆ getPMTLogicalIndex()

template<class JDetector_t >
int JDETECTOR::getPMTLogicalIndex ( int  id,
int  tdc 
)
inline

Get PMT logical index for given module identifier and TDC channel.

Parameters
idmodule identifier
tdcTDC
Returns
PMT logical index

Definition at line 406 of file JDetectorAddressMapToolkit.hh.

407  {
408  return getModuleAddressMap<JDetector_t>(id).getIndex(tdc);
409  }

◆ getDetectorAddressMap() [2/2]

JDetectorAddressMap& JDETECTOR::getDetectorAddressMap ( const int  id)
inline

Get detector address map.

Parameters
iddetector identifier
Returns
detector address map

Definition at line 487 of file JDetectorAddressMapToolkit.hh.

488  {
490  }

◆ hasDetectorAddressMap()

bool JDETECTOR::hasDetectorAddressMap ( const int  id)
inline

Check if detector address map is available.

Parameters
iddetector identifier
Returns
true if detector address map available; else false

Definition at line 499 of file JDetectorAddressMapToolkit.hh.

500  {
502  }

◆ is_valid()

bool JDETECTOR::is_valid ( const json &  js)
inline

Check validity of JSon data.

Parameters
jsJSon data
Returns
true if valid; else false

Definition at line 63 of file JDetectorCalibration.hh.

64  {
65  return js.contains(Result_t) && js[Result_t] == OK_t;
66  }

◆ to_json() [1/3]

void JDETECTOR::to_json ( json &  js,
const JPMTCalibration_t object 
)
inline

Convert PMT calibration to JSon.

Parameters
jsjson
objectPMT calibration

Definition at line 103 of file JDetectorCalibration.hh.

104  {
105  js = json{ { PMTSerial_t, object.getID() },
106  { T0_t, object.getT0() } };
107  }

◆ from_json() [1/3]

void JDETECTOR::from_json ( const json &  js,
JPMTCalibration_t object 
)
inline

Convert JSon to PMT calibration.

Parameters
jsjson
objectPMT calibration

Definition at line 116 of file JDetectorCalibration.hh.

117  {
118  object.setID(js.at(PMTSerial_t).get<int>());
119 
120  object.setT0(js.at(T0_t).get<double>());
121  }

◆ to_json() [2/3]

void JDETECTOR::to_json ( json &  js,
const JModulePosition_t object 
)
inline

Convert module position to JSon.

Parameters
jsjson
objectmodule position

Definition at line 157 of file JDetectorCalibration.hh.

158  {
159  js = json{ { DOMId_t, object.getID() },
160  { PX_t, object.getX() },
161  { PY_t, object.getY() },
162  { PZ_t, object.getZ() } };
163  }

◆ from_json() [2/3]

void JDETECTOR::from_json ( const json &  js,
JModulePosition_t object 
)
inline

Convert JSon to module position.

Parameters
jsjson
objectmodule position

Definition at line 172 of file JDetectorCalibration.hh.

173  {
174  object.setID(js.at(DOMSerial_t).get<int>());
175 
176  object.setPosition(JPosition3D(js.at(PX_t).get<double>(),
177  js.at(PY_t).get<double>(),
178  js.at(PZ_t).get<double>()));
179  }

◆ to_json() [3/3]

void JDETECTOR::to_json ( json &  js,
const JModuleRotation_t object 
)
inline

Convert module rotation to JSon.

Parameters
jsjson
objectmodule rotation

Definition at line 215 of file JDetectorCalibration.hh.

216  {
217  js = json{ { DOMId_t, object.getID() },
218  { Q0_t, object.getA() },
219  { QX_t, object.getB() },
220  { QY_t, object.getC() },
221  { QZ_t, object.getD() } };
222  }

◆ from_json() [3/3]

void JDETECTOR::from_json ( const json &  js,
JModuleRotation_t object 
)
inline

Convert JSon to module rotation.

Parameters
jsjson
objectmodule rotation

Definition at line 231 of file JDetectorCalibration.hh.

232  {
233  object.setID(js.at(DOMSerial_t).get<int>());
234 
235  object.setQuaternion(JQuaternion3D(js.at(Q0_t).get<double>(),
236  js.at(QX_t).get<double>(),
237  js.at(QY_t).get<double>(),
238  js.at(QZ_t).get<double>()));
239  }

◆ getARCADetectorHeader()

JDetectorHeader JDETECTOR::getARCADetectorHeader ( )
inline

Get detector header for ARCA.

Returns
detector header

Definition at line 223 of file JDetectorHeader.hh.

224  {
225  return JDetectorHeader(JUTCTimeRange(0.0, 999999999999.9),
226  JUTMGrid ("UTM", "WGS84", "33N"),
227  JUTMPosition (587600, 4016800, -3450));
228  }

◆ getORCADetectorHeader()

JDetectorHeader JDETECTOR::getORCADetectorHeader ( )
inline

Get detector header for ORCA.

Returns
detector header

Definition at line 235 of file JDetectorHeader.hh.

236  {
237  return JDetectorHeader(JUTCTimeRange(0.0, 999999999999.9),
238  JUTMGrid ("UTM", "WGS84", "32N"),
239  JUTMPosition (256500, 4743000, -2425));
240  }

◆ getMaximalDistance()

double JDETECTOR::getMaximalDistance ( const JDetector detector)
inline

Get maximal distance between modules in detector.

Parameters
detectordetector
Returns
maximal distance [m]

Definition at line 76 of file JDetectorToolkit.hh.

77  {
78  double dmax = 0.0;
79 
80  for (JDetector::const_iterator i = detector.begin(); i != detector.end(); ++i) {
81  for (JDetector::const_iterator j = detector.begin(); j != i; ++j) {
82  if (i->getDistance(*j) > dmax) {
83  dmax = i->getDistance(*j);
84  }
85  }
86  }
87 
88  return dmax;
89  }

◆ GetXrotationG4()

double JDETECTOR::GetXrotationG4 ( const JVersor3D  dir)
inline

Get rotation over X axis in Geant4 coordinate system.

Parameters
dirdirection
Returns
X-rotation [deg]

Definition at line 98 of file JDetectorToolkit.hh.

99  {
100  const double phi = atan2(dir.getDY(), dir.getDZ())*(180.0/PI);
101 
102  if (phi < 0.0){
103  return phi + 360.0;
104  }
105  else{
106  return phi;
107  }
108  }

◆ GetYrotationG4()

double JDETECTOR::GetYrotationG4 ( const JVersor3D  dir)
inline

Get rotation over Y axis in Geant4 coordinate system.

Parameters
dirdirection
Returns
Y-rotation [deg]

Definition at line 117 of file JDetectorToolkit.hh.

118  {
119  return asin(-dir.getDX())*(180.0/PI);
120  }

◆ read_gdml()

void JDETECTOR::read_gdml ( std::istream &  ,
const JDetector  
)
inline

Definition at line 123 of file JDetectorToolkit.hh.

124  {}

◆ write_gdml()

void JDETECTOR::write_gdml ( std::ostream &  out,
const JDetector detector 
)
inline

Writes KM3Sim GDML input file from detector.

Parameters
outoutput stream
detectordetector

Definition at line 133 of file JDetectorToolkit.hh.

134  {
135 
136 
137  const JCylinder3D cylinder(detector.begin(), detector.end());
138 
139  // Detector height is bascially just a distance between the highest and the lowest DOM
140  //double Detector_Height = cylinder.getZmax() - cylinder.getZmin();
141  // Distance from the center of the lowest DOM to the seabed
142  //double Seabed_Distance = cylinder.getZmin();
143 
144  // To translate Z coordinate from detx format which corresponds to the distance from the seabed one has to perform a following calculation
145  // Dom_Z_GDML = Dom_Z_Detx - Distance to the seabed from the lowest DOM - Detector_height/2
146 
147  //double DistanceOfSeabedFromLowestOM = Seabed_Distance;
148  // For now, the size of the WorldBox is fixed to 2200 meters
149  const double WorldBoxHeight = 2200.;
150  // Below formula comes directly from the note by Apostolos
151  //double Crust_Z_size = WorldBoxHeight/2-Detector_Height/2-DistanceOfSeabedFromLowestOM; Formula for obsolete coordinate covention, where Z_seabed != 0
152  const double Crust_Z_size = WorldBoxHeight/2;
153  //double Crust_Z_position = -WorldBoxHeight/4-Detector_Height/4-DistanceOfSeabedFromLowestOM/2; Formula for obsolete coordinate covention, where Z_seabed != 0
154  const double Crust_Z_position= -WorldBoxHeight/4;
155 
156 
157  out<<"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<gdml xmlns:gdml=\"http://cern.ch/2001/Schemas/GDML\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"";
158  if(!GDML_SCHEMA){
159  std::cout<<"GDML_SCHEMA_DIR NOT DEFINED! Setting default path"<<std::endl;
160  out<<"/sps/km3net/users/jmanczak/km3sim/geant4.10.05/source/persistency/gdml/schema/gdml.xsd\">\n\n\n";
161  }
162  else{
163  out<<GDML_SCHEMA<<"gdml.xsd\">\n\n\n";
164  }
165  out<<"<define>\n";
166  out<<"<rotation name=\"identity\"/>\n<position name=\"zero\"/>\n";
167 
168  int PMTs_NO = 0;
169  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
170 
171  const JFIT::JEstimator<JPoint3D> center(module->begin(), module->end());
172 
173  //out<<"<position name=\"PosString"<<module->getString()<<"_Dom"<<module->getID()<<"\" unit=\"m\" x=\""<<module->getX()<<"\" y=\""<<module->getY()<<"\" z=\""<<module->getZ() - Seabed_Distance-Detector_Height/2<<"\"/>\n"; Formula for obsolete coordinate covention, where Z_seabed != 0
174  out<<"<position name=\"PosString"<<module->getString()<<"_Dom"<<module->getID()<<"\" unit=\"m\" x=\""<<module->getX()<<"\" y=\""<<module->getY()<<"\" z=\""<<module->getZ()<<"\"/>\n";
175 
176  for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
177  //JVector3D vec;
178  //static_cast<JVector3D> (vec) = module->sub(*pmt);
179 
180  const JVector3D vec = static_cast<JVector3D>(*pmt).sub(center);
181  out<<"<position name=\"CathodPosition"<<pmt->getID()<<"_"<<module->getID()<<"\" unit=\"m\" x=\""<<vec.getX()<<"\" y=\""<<vec.getY()<<"\" z=\""<<vec.getZ()<<"\"/>\n";
182  out<<"<rotation name=\"CathodRotation"<<pmt->getID()<<"_"<<module->getID()<<"\" unit=\"deg\" x=\""<<GetXrotationG4(*pmt)<<"\" y=\""<<GetYrotationG4(*pmt)<<"\" z=\"0.000000\"/>\n";
183  out<<"<constant name=\"CathodID_"<<PMTs_NO<<"\" value=\""<<pmt->getID()<<"\"/>\n";
184  PMTs_NO++;
185  }
186 
187  }
188 
189  out<<"<position name=\"OMShift\" unit=\"m\" x=\"0\" y=\"0\" z=\"0.0392\"/>\n";
190  out<<"\n\n\n";
191  out<<"<!-- end of DU position definitions -->\n<position name=\"CrustPosition\" unit=\"m\" x=\"0\" y=\"0\" z=\""<<Crust_Z_position<<"\"/>\n";
192 
193  out<<"</define>\n";
194  out<<"<materials>\n";
195  out<<"</materials>\n";
196  out<<"<solids>\n";
197  out<<" <box name=\"WorldBox\" lunit=\"m\" x=\"2200\" y=\"2200\" z=\"2200\"/>\n";
198  out<<" <box name=\"CrustBox\" lunit=\"m\" x=\"2200\" y=\"2200\" z=\""<<Crust_Z_size<<"\"/>\n";
199  out<<" <box name=\"StoreyBox\" lunit=\"m\" x=\"0.6\" y=\"0.6\" z=\"0.6\"/>\n";
200  out<<" <sphere name=\"OMSphere\" lunit=\"cm\" aunit=\"deg\" rmin=\"0.0\" rmax=\"21.6\" startphi=\"0.0\" deltaphi=\"360.0\" starttheta=\"0.0\" deltatheta=\"180.0\"/>\n";
201  out<<" <tube name=\"CathodTube\" lunit=\"cm\" aunit=\"deg\" rmin=\"0.0\" rmax=\"4.7462\" z=\"0.5\" startphi=\"0.0\" deltaphi=\"360.0\"/>\n";
202  out<<"</solids>\n\n\n";
203 
204  out<<"<structure>\n";
205  out<<" <volume name=\"CathodVolume\">\n";
206  out<<" <materialref ref=\"Cathod\"/>\n";
207  out<<" <solidref ref=\"CathodTube\"/>\n";
208  out<<" </volume>\n";
209 
210  out<<"<!-- OMVolume(s) construction -->\n";
211 
212  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
213 
214  out<<" <volume name=\"OMVolume"<<module->getID()<<"\">\n";
215  out<<" <materialref ref=\"Water\"/>\n";
216  out<<" <solidref ref=\"OMSphere\"/>\n";
217 
218  for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
219  out<<" <physvol>\n";
220  out<<" <volumeref ref=\"CathodVolume\"/>\n";
221  out<<" <positionref ref=\"CathodPosition"<<pmt->getID()<<"_"<<module->getID()<<"\"/>\n";
222  out<<" <rotationref ref=\"CathodRotation"<<pmt->getID()<<"_"<<module->getID()<<"\"/>\n";
223  out<<" </physvol>\n";
224  }
225 
226  out<<" </volume>\n";
227  }
228 
229  out<<"<!-- StoreyVolume(s) construction -->\n";
230 
231  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
232  out<<" <volume name=\"StoreyVolume"<<module->getID()<<"\">\n";
233  out<<" <materialref ref=\"Water\"/>\n";
234  out<<" <solidref ref=\"StoreyBox\"/>\n";
235  out<<" <physvol>\n";
236  out<<" <volumeref ref=\"OMVolume"<<module->getID()<<"\"/>\n";
237  out<<" <positionref ref=\"OMShift\"/>\n";
238  //out<<" <positionref ref=\"zero\"/>\n";
239  out<<" <rotationref ref=\"identity\"/>\n";
240  out<<" </physvol>\n";
241  out<<" </volume>\n";
242  }
243 
244  out<<"<!-- Crust Volume construction-->\n";
245  out<<"<volume name=\"CrustVolume\">\n";
246  out<<" <materialref ref=\"Crust\"/>\n";
247  out<<" <solidref ref=\"CrustBox\"/>\n";
248  out<<"</volume>\n";
249 
250  out<<"<!-- World Volume construction-->\n";
251  out<<"<volume name=\"WorldVolume\">\n";
252  out<<" <materialref ref=\"Water\"/>\n";
253  out<<" <solidref ref=\"WorldBox\"/>\n";
254 
255  out<<" <physvol>\n";
256  out<<" <volumeref ref=\"CrustVolume\"/>\n";
257  out<<" <positionref ref=\"CrustPosition\"/>\n";
258  out<<" <rotationref ref=\"identity\"/>\n";
259  out<<" </physvol>\n";
260 
261  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
262  out<<" <physvol>\n";
263  out<<" <volumeref ref=\"StoreyVolume"<<module->getID()<<"\"/>\n";
264  out<<" <positionref ref=\"PosString"<< module->getString() <<"_Dom"<< module->getID() <<"\"/>\n";
265  //out<<" <rotation x="{}" y="{}" z="0.0"/>\n'.format(Dom_Phi[i], Dom_Theta[i]))
266  out<<" <rotationref ref=\"identity\"/>\n";
267  out<<" </physvol>\n";
268  }
269 
270  out<<"</volume>\n";
271 
272  out<<"</structure>\n";
273  out<<"<setup name=\"Default\" version=\"1.0\">\n";
274  out<<"<world ref=\"WorldVolume\"/>\n";
275  out<<"</setup>\n";
276  out<<"</gdml>\n";
277  }

◆ getMaximalTime() [1/2]

double JDETECTOR::getMaximalTime ( const JDetector detector)
inline

Get maximal time between modules in detector following causality.

Parameters
detectordetector
Returns
maximal time [ns]

Definition at line 286 of file JDetectorToolkit.hh.

287  {
289  }

◆ getMaximalTime() [2/2]

double JDETECTOR::getMaximalTime ( const JDetector detector,
const double  roadWidth_m 
)
inline

Get maximal time between modules in detector following causality.

The road width corresponds to the maximal distance traveled by the light.

Parameters
detectordetector
roadWidth_mroad width [m]
Returns
maximal time [ns]

Definition at line 300 of file JDetectorToolkit.hh.

301  {
302  const double Dmax_m = getMaximalDistance(detector);
303 
304  return (sqrt((Dmax_m + roadWidth_m*getSinThetaC()) *
305  (Dmax_m - roadWidth_m*getSinThetaC())) +
306  roadWidth_m * getSinThetaC() * getTanThetaC()) * getInverseSpeedOfLight();
307  }

◆ getTimeRange() [1/2]

JTimeRange JDETECTOR::getTimeRange ( const JTimeRange &  timeRange,
const JModule module 
)
inline

Get de-calibrated time range.

The de-calibrated time range is corrected for minimal and maximal time offset of PMTs in given module.

Parameters
timeRangetime range [ns]
modulemodule
Returns
time range [ns]

Definition at line 319 of file JDetectorToolkit.hh.

320  {
321  if (!module.empty()) {
322 
323  JTimeRange time_range(JTimeRange::DEFAULT_RANGE);
324 
325  for (JModule::const_iterator pmt = module.begin(); pmt != module.end(); ++pmt) {
326 
327  const JCalibration& calibration = pmt->getCalibration();
328 
329  time_range.include(putTime(timeRange.getLowerLimit(), calibration));
330  time_range.include(putTime(timeRange.getUpperLimit(), calibration));
331  }
332 
333  return time_range;
334 
335  } else {
336 
337  return timeRange;
338  }
339  }

◆ getNumberOfPMTs() [1/2]

int JDETECTOR::getNumberOfPMTs ( const JModule module)
inline

Get number of PMTs.

Parameters
modulemodule
Returns
number of PMTs

Definition at line 348 of file JDetectorToolkit.hh.

349  {
350  return module.size();
351  }

◆ getNumberOfPMTs() [2/2]

int JDETECTOR::getNumberOfPMTs ( const JDetector detector)
inline

Get number of PMTs.

Parameters
detectordetector
Returns
number of PMTs

Definition at line 360 of file JDetectorToolkit.hh.

361  {
362  int number_of_pmts = 0;
363 
364  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
365  number_of_pmts += getNumberOfPMTs(*module);
366  }
367 
368  return number_of_pmts;
369  }

◆ getNumberOfStrings()

int JDETECTOR::getNumberOfStrings ( const JDetector detector)
inline

Get number of strings.

Parameters
detectordetector
Returns
number of strings

Definition at line 378 of file JDetectorToolkit.hh.

379  {
380  std::set<int> buffer;
381 
382  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
383  buffer.insert(module->getString());
384  }
385 
386  return buffer.size();
387  }

◆ getStringIDs()

std::set<int> JDETECTOR::getStringIDs ( const JDetector detector)
inline

Get list of strings IDs.

Parameters
detectordetector
Returns
list of string IDs

Definition at line 396 of file JDetectorToolkit.hh.

397  {
398  std::set<int> buffer;
399 
400  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
401  buffer.insert(module->getString());
402  }
403 
404  return buffer;
405  }

◆ getNumberOfFloors()

int JDETECTOR::getNumberOfFloors ( const JDetector detector)
inline

Get number of floors.

Parameters
detectordetector
Returns
number of floors

Definition at line 414 of file JDetectorToolkit.hh.

415  {
416  std::set<int> buffer;
417 
418  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
419  buffer.insert(module->getFloor());
420  }
421 
422  return buffer.size();
423  }

◆ getNumberOfModules()

int JDETECTOR::getNumberOfModules ( const JDetector detector)
inline

Get number of modules.

Parameters
detectordetector
Returns
number of modules

Definition at line 432 of file JDetectorToolkit.hh.

433  {
434  std::set<int> buffer;
435 
436  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
437  buffer.insert(module->getID());
438  }
439 
440  return buffer.size();
441  }

◆ load()

void JDETECTOR::load ( const JString file_name,
JDetector detector 
)
inline

Load detector from input file.

Supported file formats:

Parameters
file_namefile name
detectordetector

Definition at line 456 of file JDetectorToolkit.hh.

457  {
458  using namespace std;
459  using namespace JIO;
460 
461  if (file_name.endsWith(GENDET_DETECTOR_FILE_FORMAT)) {
462 
463  JMonteCarloDetector buffer(true);
464 
465  ifstream in(file_name.c_str());
466 
467  if (!in) {
468  THROW(JFileOpenException, "File not opened: " << file_name);
469  }
470 
471  in >> buffer;
472 
473  in.close();
474 
475  detector.swap(buffer);
476 
477  } else if (file_name.endsWith(BINARY_DETECTOR_FILE_FORMAT)) {
478 
479  JFileStreamReader in(file_name.c_str());
480 
481  if (!in) {
482  THROW(JFileOpenException, "File not opened: " << file_name);
483  }
484 
485  detector.read(in);
486 
487  in.close();
488 
489  } else if (file_name.endsWith(KM3NET_DETECTOR_FILE_FORMAT)) {
490 
491  ifstream in(file_name.c_str());
492 
493  if (!in) {
494  THROW(JFileOpenException, "File not opened: " << file_name);
495  }
496 
497  in >> detector;
498 
499  in.close();
500 
501  } else if (file_name.endsWith(ZIPPED_DETECTOR_FILE_FORMAT)) {
502 
503  igzstream in(file_name.c_str());
504 
505  if (!in) {
506  THROW(JFileOpenException, "File not opened: " << file_name);
507  }
508 
509  in >> detector;
510 
511  in.close();
512 
513  } else {
514 
515  THROW(JProtocolException, "Protocol not defined: " << file_name);
516  }
517  }

◆ store()

void JDETECTOR::store ( const JString file_name,
const JDetector detector 
)
inline

Store detector to output file.

Supported file formats:

Parameters
file_namefile name
detectordetector

Definition at line 532 of file JDetectorToolkit.hh.

533  {
534  using namespace std;
535  using namespace JIO;
536 
537  if (file_name.endsWith(BINARY_DETECTOR_FILE_FORMAT)) {
538 
539  JFileStreamWriter out(file_name.c_str());
540 
541  detector.write(out);
542 
543  out.close();
544 
545  } else if (file_name.endsWith(KM3NET_DETECTOR_FILE_FORMAT)) {
546 
547  std::ofstream out(file_name.c_str());
548 
549  out << detector;
550 
551  out.close();
552 
553  } else if (file_name.endsWith(ZIPPED_DETECTOR_FILE_FORMAT)) {
554 
555  ogzstream out(file_name.c_str());
556 
557  out << detector;
558 
559  out.close();
560 
561  } else if (file_name.endsWith(GDML_DETECTOR_FILE_FORMAT)) {
562 
563  std::ofstream out(file_name.c_str());
564 
565  write_gdml(out, detector);
566 
567  out.close();
568 
569  } else {
570 
571  throw JProtocolException("Protocol not defined.");
572  }
573  }

◆ getModule() [1/2]

const JModule& JDETECTOR::getModule ( const JModuleAddressMap memo,
const int  id,
const JModuleLocation location = JModuleLocation() 
)
inline

Get module according module address map.

Parameters
memomodule address map
idmodule identifier
locationmodule location
Returns
module

Definition at line 584 of file JDetectorToolkit.hh.

587  {
588  static JModule module;
589 
590 
591  module.setID(id);
592 
593  module.setLocation(location);
594 
595  module.resize(memo.size());
596 
597  if (memo.has( 0)) { module[memo[ 0].tdc] = JPMT( 1, JAxis3D(JVector3D(+0.000, +0.000, -0.200), JVersor3D(+0.000, +0.000, -1.000))); }
598 
599  if (memo.has( 1)) { module[memo[ 1].tdc] = JPMT( 2, JAxis3D(JVector3D(+0.000, +0.105, -0.170), JVersor3D(+0.000, +0.527, -0.850))); }
600  if (memo.has( 2)) { module[memo[ 2].tdc] = JPMT( 3, JAxis3D(JVector3D(+0.091, +0.053, -0.170), JVersor3D(+0.456, +0.263, -0.850))); }
601  if (memo.has( 3)) { module[memo[ 3].tdc] = JPMT( 4, JAxis3D(JVector3D(+0.091, -0.053, -0.170), JVersor3D(+0.456, -0.263, -0.850))); }
602  if (memo.has( 4)) { module[memo[ 4].tdc] = JPMT( 5, JAxis3D(JVector3D(+0.000, -0.105, -0.170), JVersor3D(+0.000, -0.527, -0.850))); }
603  if (memo.has( 5)) { module[memo[ 5].tdc] = JPMT( 6, JAxis3D(JVector3D(-0.091, -0.053, -0.170), JVersor3D(-0.456, -0.263, -0.850))); }
604  if (memo.has( 6)) { module[memo[ 6].tdc] = JPMT( 7, JAxis3D(JVector3D(-0.091, +0.053, -0.170), JVersor3D(-0.456, +0.263, -0.850))); }
605 
606  if (memo.has( 7)) { module[memo[ 7].tdc] = JPMT( 8, JAxis3D(JVector3D(+0.083, +0.144, -0.111), JVersor3D(+0.416, +0.720, -0.555))); }
607  if (memo.has( 8)) { module[memo[ 8].tdc] = JPMT( 9, JAxis3D(JVector3D(+0.166, +0.000, -0.111), JVersor3D(+0.832, +0.000, -0.555))); }
608  if (memo.has( 9)) { module[memo[ 9].tdc] = JPMT(10, JAxis3D(JVector3D(+0.083, -0.144, -0.111), JVersor3D(+0.416, -0.720, -0.555))); }
609  if (memo.has(10)) { module[memo[10].tdc] = JPMT(11, JAxis3D(JVector3D(-0.083, -0.144, -0.111), JVersor3D(-0.416, -0.720, -0.555))); }
610  if (memo.has(11)) { module[memo[11].tdc] = JPMT(12, JAxis3D(JVector3D(-0.166, +0.000, -0.111), JVersor3D(-0.832, +0.000, -0.555))); }
611  if (memo.has(12)) { module[memo[12].tdc] = JPMT(13, JAxis3D(JVector3D(-0.083, +0.144, -0.111), JVersor3D(-0.416, +0.720, -0.555))); }
612 
613  if (memo.has(13)) { module[memo[13].tdc] = JPMT(14, JAxis3D(JVector3D(+0.000, +0.191, -0.059), JVersor3D(+0.000, +0.955, -0.295))); }
614  if (memo.has(14)) { module[memo[14].tdc] = JPMT(15, JAxis3D(JVector3D(+0.165, +0.096, -0.059), JVersor3D(+0.827, +0.478, -0.295))); }
615  if (memo.has(15)) { module[memo[15].tdc] = JPMT(16, JAxis3D(JVector3D(+0.165, -0.096, -0.059), JVersor3D(+0.827, -0.478, -0.295))); }
616  if (memo.has(16)) { module[memo[16].tdc] = JPMT(17, JAxis3D(JVector3D(+0.000, -0.191, -0.059), JVersor3D(+0.000, -0.955, -0.295))); }
617  if (memo.has(17)) { module[memo[17].tdc] = JPMT(18, JAxis3D(JVector3D(-0.165, -0.096, -0.059), JVersor3D(-0.827, -0.478, -0.295))); }
618  if (memo.has(18)) { module[memo[18].tdc] = JPMT(19, JAxis3D(JVector3D(-0.165, +0.096, -0.059), JVersor3D(-0.827, +0.478, -0.295))); }
619 
620  if (memo.has(19)) { module[memo[19].tdc] = JPMT(20, JAxis3D(JVector3D(+0.096, +0.165, +0.059), JVersor3D(+0.478, +0.827, +0.295))); }
621  if (memo.has(20)) { module[memo[20].tdc] = JPMT(21, JAxis3D(JVector3D(+0.191, +0.000, +0.059), JVersor3D(+0.955, +0.000, +0.295))); }
622  if (memo.has(21)) { module[memo[21].tdc] = JPMT(22, JAxis3D(JVector3D(+0.096, -0.165, +0.059), JVersor3D(+0.478, -0.827, +0.295))); }
623  if (memo.has(22)) { module[memo[22].tdc] = JPMT(23, JAxis3D(JVector3D(-0.096, -0.165, +0.059), JVersor3D(-0.478, -0.827, +0.295))); }
624  if (memo.has(23)) { module[memo[23].tdc] = JPMT(24, JAxis3D(JVector3D(-0.191, +0.000, +0.059), JVersor3D(-0.955, +0.000, +0.295))); }
625  if (memo.has(24)) { module[memo[24].tdc] = JPMT(25, JAxis3D(JVector3D(-0.096, +0.165, +0.059), JVersor3D(-0.478, +0.827, +0.295))); }
626 
627  if (memo.has(25)) { module[memo[25].tdc] = JPMT(26, JAxis3D(JVector3D(+0.000, +0.166, +0.111), JVersor3D(+0.000, +0.832, +0.555))); }
628  if (memo.has(26)) { module[memo[26].tdc] = JPMT(27, JAxis3D(JVector3D(+0.144, +0.083, +0.111), JVersor3D(+0.720, +0.416, +0.555))); }
629  if (memo.has(27)) { module[memo[27].tdc] = JPMT(28, JAxis3D(JVector3D(+0.144, -0.083, +0.111), JVersor3D(+0.720, -0.416, +0.555))); }
630  if (memo.has(28)) { module[memo[28].tdc] = JPMT(29, JAxis3D(JVector3D(+0.000, -0.166, +0.111), JVersor3D(+0.000, -0.832, +0.555))); }
631  if (memo.has(29)) { module[memo[29].tdc] = JPMT(30, JAxis3D(JVector3D(-0.144, -0.083, +0.111), JVersor3D(-0.720, -0.416, +0.555))); }
632  if (memo.has(30)) { module[memo[30].tdc] = JPMT(31, JAxis3D(JVector3D(-0.144, +0.083, +0.111), JVersor3D(-0.720, +0.416, +0.555))); }
633 
634  module.compile();
635 
636  return module;
637  }

◆ getModule() [2/2]

const JModule& JDETECTOR::getModule ( const int  id,
const JModuleLocation location = JModuleLocation() 
)
inline

Get module corresponding to Antares storey.

Parameters
idmodule identifier
locationmodule location
Returns
module

Definition at line 647 of file JDetectorToolkit.hh.

649  {
650  using JTOOLS::PI;
651 
652  static JModule module;
653 
654  module.setID(id);
655 
656  module.setLocation(location);
657 
658  if (module.empty()) {
659 
660  module.resize(3);
661 
662  const double R = 0.5; // [m]
663 
664  const double st = sin(0.75*PI);
665  const double ct = cos(0.75*PI);
666 
667  for (int i = 0; i != 3; ++i) {
668 
669  const double phi = (2.0*PI*i) / 3.0;
670  const double cp = cos(phi);
671  const double sp = sin(phi);
672 
673  module[i] = JPMT(i, JAxis3D(JVector3D(R*st*cp, R*st*sp, R*ct), JVersor3D(st*cp, st*sp, ct)));
674  }
675  }
676 
677  return module;
678  }

◆ getModuleLabel()

std::string JDETECTOR::getModuleLabel ( const JModuleLocation location)
inline

Get module label for monitoring and other applications.

\ The format is "(XXX,YY)", where XXX is the string number and YY the floor.

Parameters
locationmodule location \retun label

Definition at line 688 of file JDetectorToolkit.hh.

689  {
690  using namespace std;
691 
692  ostringstream os;
693 
694  os << "(" << setfill('0') << setw(3) << location.getString() << "," << setfill('0') << setw(2) << location.getFloor() << ")";
695 
696  return os.str();
697  }

◆ getPosition()

JPosition3D JDETECTOR::getPosition ( const JModule first,
const JModule second 
)
inline

Get position to go from first to second module.

Parameters
firstfirst module
secondsecond module
Returns
position

Definition at line 833 of file JDetectorToolkit.hh.

834  {
835  return second.getPosition() - first.getPosition();
836  }

◆ getCalibration()

JCalibration JDETECTOR::getCalibration ( const JCalibration first,
const JCalibration second 
)
inline

Get calibration to go from first to second calibration.

Parameters
firstfirst calibration
secondsecond calibration
Returns
calibration

Definition at line 846 of file JDetectorToolkit.hh.

847  {
848  return JCalibration(second.getT0() - first.getT0());
849  }

◆ getDetectorVersions() [1/3]

std::vector<std::string> JDETECTOR::getDetectorVersions ( const JType< std::string > &  type)
inline

Get detector versions.

Note that the order of the versions is descending.

Parameters
typetype
Returns
versions

Definition at line 183 of file JDetectorVersion.hh.

184  {
185  return JLANG::make_array(putDetectorVersion.rbegin(), putDetectorVersion.rend(), &JPutDetectorVersion::value_type::second);
186  }

◆ getDetectorVersions() [2/3]

std::vector<JDetectorVersion::JVersion_t> JDETECTOR::getDetectorVersions ( const JType< JDetectorVersion::JVersion_t > &  type)
inline

Get detector versions.

Note that the order of the versions is descending.

Parameters
typetype
Returns
versions

Definition at line 197 of file JDetectorVersion.hh.

198  {
199  return JLANG::make_array(putDetectorVersion.rbegin(), putDetectorVersion.rend(), &JPutDetectorVersion::value_type::first);
200  }

◆ getDetectorVersions() [3/3]

template<class T >
std::vector<T> JDETECTOR::getDetectorVersions ( )
inline

Get detector versions.

Returns
versions

Definition at line 209 of file JDetectorVersion.hh.

210  {
211  return getDetectorVersions(JType<T>());
212  }

◆ setAttributes()

template<class JAttributes_t >
void JDETECTOR::setAttributes ( const JModule first,
const JModule second,
JAttributes_t &  attributes 
)

Template method to set module attributes.

This method should be overloaded for each type of module attributes.

Parameters
firstfirst module
secondsecond module
attributesmodule attributes

◆ setAttributes< JNullType >()

template<>
void JDETECTOR::setAttributes< JNullType > ( const JModule first,
const JModule second,
JNullType attributes 
)

Template specialisation to set no attributes for the default empty object.

Parameters
firstfirst module
secondsecond module
attributesmodule attributes

Definition at line 48 of file JModuleMapper.hh.

51  {}

◆ getPMTStatusBits() [1/3]

std::vector<std::string> JDETECTOR::getPMTStatusBits ( const JType< std::string > &  type)
inline

Get PMT status bits.

Parameters
typetype
Returns
status bits

Definition at line 362 of file JPMT.hh.

363  {
364  return JPP::make_array(getPMTStatusBit.begin(), getPMTStatusBit.end(), &JGetPMTStatusBit::value_type::first);
365  }

◆ getPMTStatusBits() [2/3]

std::vector<JPMT::JPMTStatusBits_t> JDETECTOR::getPMTStatusBits ( const JType< JPMT::JPMTStatusBits_t > &  type)
inline

Get PMT status bits.

Parameters
typetype
Returns
status bits

Definition at line 374 of file JPMT.hh.

375  {
376  return JPP::make_array(getPMTStatusBit.begin(), getPMTStatusBit.end(), &JGetPMTStatusBit::value_type::second);
377  }

◆ getPMTStatusBits() [3/3]

template<class T >
std::vector<T> JDETECTOR::getPMTStatusBits ( )
inline

Get PMT status bits.

Returns
status bits

Definition at line 386 of file JPMT.hh.

387  {
388  return getPMTStatusBits(JType<T>());
389  }

◆ operator<() [2/5]

bool JDETECTOR::operator< ( const JPMTIdentifier first,
const JPMTIdentifier second 
)
inline

Less than operator for PMT identifiers.

Parameters
firstPMT identifier
secondPMT identifier
Returns
true if first PMT lower than second PMT; else false

Definition at line 153 of file JPMTIdentifier.hh.

154  {
155  if (first.getModuleID() == second.getModuleID())
156  return first.getPMTAddress() < second.getPMTAddress();
157  else
158  return first.getModuleID() < second.getModuleID();
159  }

◆ operator==()

bool JDETECTOR::operator== ( const JPMTIdentifier first,
const JPMTIdentifier second 
)
inline

Equal operator for PMT identifiers.

Parameters
firstPMT identifier
secondPMT identifier
Returns
true if first PMT equal second PMT; else false

Definition at line 169 of file JPMTIdentifier.hh.

170  {
171  return (first.getModuleID() == second.getModuleID() &&
172  first.getPMTAddress() == second.getPMTAddress());
173  }

◆ getSurvivalProbability()

double JDETECTOR::getSurvivalProbability ( const JPMTParameters parameters)
inline

Get model dependent probability that a one photo-electron hit survives the simulation of the PMT assuming QE = 1.

Parameters
parametersPMT parameters
Returns
probability

Definition at line 32 of file JPMTParametersToolkit.hh.

33  {
34  JPMTParameters data = parameters;
35  const int NPE = 1;
36 
37  data.QE = 1.0;
38 
40  }

◆ getHitProbability()

double JDETECTOR::getHitProbability ( const double  QE,
const double  mu 
)
inline

Get ratio of hit probabilities for given QE and expectation value of the number of photo-electrons.


The ratio corresponds to the hit probability with given QE divided by that with QE = 1.
The expectation value is defined for a two-fold (or higher) coincidence.

Parameters
QEQE
muexpectation value
Returns
ratio

Definition at line 52 of file JPMTParametersToolkit.hh.

53  {
54  if (mu > 0.0)
55  return (1.0 - exp(-QE*mu)) / (1.0 - exp(-mu));
56  else
57  return QE;
58  }

◆ getMaximalHitProbability()

double JDETECTOR::getMaximalHitProbability ( const double  mu)
inline

Get maximal ratio of hit probabilities for given QE and expectation value of the number of photo-electrons.


The ratio corresponds to the hit probability with infinite QE divided by that with QE = 1.
The expectation value is defined for a two-fold (or higher) coincidence.

Parameters
muexpectation value
Returns
ratio

Definition at line 69 of file JPMTParametersToolkit.hh.

70  {
71  using namespace std;
72 
73  if (mu > 0.0)
74  return 1.0 / (1.0 - exp(-mu));
75  else
76  return numeric_limits<double>::max();
77  }

◆ getQE()

double JDETECTOR::getQE ( const double  R,
const double  mu 
)
inline

Get QE for given ratio of hit probabilities and expectation value of the number of photo-electrons.


The ratio corresponds to the hit probability with given QE divided by that with QE = 1.
The expectation value is defined for a two-fold (or higher) coincidence.

Parameters
Rratio
muexpectation value
Returns
QE

Definition at line 89 of file JPMTParametersToolkit.hh.

90  {
91  if (R < getMaximalHitProbability(mu)) {
92 
93  if (mu > 0.0)
94  return -log(1.0 - R*(1.0 - exp(-mu))) / mu;
95  else
96  return R;
97 
98  } else {
99 
100  THROW(JValueOutOfRange, "Inconsistent arguments at method getQE(" << R << "," << mu <<")");
101  }
102  }

◆ operator<() [3/5]

bool JDETECTOR::operator< ( const JPhotoElectron first,
const JPhotoElectron second 
)
inline

Less than operator for photo-elecrons.

Parameters
firstfirst photo-electron
secondsecond photo-electron
Returns
true if first photo-electron earlier than second; else false

Definition at line 67 of file JPMTSimulator.hh.

68  {
69  return first.t_ns < second.t_ns;
70  }

◆ operator<() [4/5]

bool JDETECTOR::operator< ( const JPMTSignal first,
const JPMTSignal second 
)
inline

Less than operator for PMT signals.

Parameters
firstfirst PMT signal
secondsecond PMT signal
Returns
true if first PMT signal earlier than second; else false

Definition at line 111 of file JPMTSimulator.hh.

112  {
113  return first.t_ns < second.t_ns;
114  }

◆ operator<() [5/5]

bool JDETECTOR::operator< ( const JPMTPulse first,
const JPMTPulse second 
)
inline

Less than operator for PMT pulses.

Parameters
firstfirst PMT pulse
secondsecond PMT pulse
Returns
true if first PMT pulse earlier than second; else false

Definition at line 155 of file JPMTSimulator.hh.

156  {
157  return first.t_ns < second.t_ns;
158  }

◆ getTimeRange() [2/2]

JTimeRange JDETECTOR::getTimeRange ( const JModuleData input)
inline

Get time range (i.e.

earlist and latest hit time) of module data.

Parameters
inputmodule data
Returns
time range

Definition at line 282 of file JPMTSimulator.hh.

283  {
284  JTimeRange timeRange(JTimeRange::DEFAULT_RANGE);
285 
286  for (JModuleData::const_iterator frame = input.begin(); frame != input.end(); ++frame) {
287  for (JModuleData::value_type::const_iterator hit = frame->begin(); hit != frame->end(); ++hit) {
288  timeRange.include(hit->t_ns);
289  }
290  }
291 
292  return timeRange;
293  }

Variable Documentation

◆ TIME_OVER_THRESHOLD_NS

const double JDETECTOR::TIME_OVER_THRESHOLD_NS = 26.4

Specification for time-over-threshold corresponding to a one photo-electron pulse.

Definition at line 29 of file JDetector/JCalibration.hh.

◆ Result_t

const std::string JDETECTOR::Result_t = "Result"
static

Detector calibration key words for JSON I/O.

Definition at line 34 of file JDetectorCalibration.hh.

◆ Comment_t

const std::string JDETECTOR::Comment_t = "Comment"
static

Definition at line 35 of file JDetectorCalibration.hh.

◆ Data_t

const std::string JDETECTOR::Data_t = "Data"
static

Definition at line 36 of file JDetectorCalibration.hh.

◆ PMTT0s_t

const std::string JDETECTOR::PMTT0s_t = "PMTT0s"
static

Definition at line 38 of file JDetectorCalibration.hh.

◆ DOMPositions_t

const std::string JDETECTOR::DOMPositions_t = "DOMPositions"
static

Definition at line 39 of file JDetectorCalibration.hh.

◆ DOMRotations_t

const std::string JDETECTOR::DOMRotations_t = "DOMRotations"
static

Definition at line 40 of file JDetectorCalibration.hh.

◆ PMTSerial_t

const std::string JDETECTOR::PMTSerial_t = "PMTSerial"
static

Definition at line 42 of file JDetectorCalibration.hh.

◆ DOMSerial_t

const std::string JDETECTOR::DOMSerial_t = "DOMSerial"
static

Definition at line 43 of file JDetectorCalibration.hh.

◆ DOMId_t

const std::string JDETECTOR::DOMId_t = "DOMId"
static

Definition at line 44 of file JDetectorCalibration.hh.

◆ T0_t

const std::string JDETECTOR::T0_t = "T0"
static

Definition at line 45 of file JDetectorCalibration.hh.

◆ PX_t

const std::string JDETECTOR::PX_t = "PX"
static

Definition at line 46 of file JDetectorCalibration.hh.

◆ PY_t

const std::string JDETECTOR::PY_t = "PY"
static

Definition at line 47 of file JDetectorCalibration.hh.

◆ PZ_t

const std::string JDETECTOR::PZ_t = "PZ"
static

Definition at line 48 of file JDetectorCalibration.hh.

◆ Q0_t

const std::string JDETECTOR::Q0_t = "Q0"
static

Definition at line 49 of file JDetectorCalibration.hh.

◆ QX_t

const std::string JDETECTOR::QX_t = "QX"
static

Definition at line 50 of file JDetectorCalibration.hh.

◆ QY_t

const std::string JDETECTOR::QY_t = "QY"
static

Definition at line 51 of file JDetectorCalibration.hh.

◆ QZ_t

const std::string JDETECTOR::QZ_t = "QZ"
static

Definition at line 52 of file JDetectorCalibration.hh.

◆ OK_t

const std::string JDETECTOR::OK_t = "OK"
static

Definition at line 54 of file JDetectorCalibration.hh.

◆ GENDET_DETECTOR_FILE_FORMAT

const char* const JDETECTOR::GENDET_DETECTOR_FILE_FORMAT = ".det"
static

File name extensions.

file format used by gendet

Definition at line 62 of file JDetectorToolkit.hh.

◆ BINARY_DETECTOR_FILE_FORMAT

const char* const JDETECTOR::BINARY_DETECTOR_FILE_FORMAT = ".dat"
static

JIO binary file format.

Definition at line 63 of file JDetectorToolkit.hh.

◆ KM3NET_DETECTOR_FILE_FORMAT

const char* const JDETECTOR::KM3NET_DETECTOR_FILE_FORMAT = ".detx"
static

KM3NeT standard ASCII format.

Definition at line 64 of file JDetectorToolkit.hh.

◆ ZIPPED_DETECTOR_FILE_FORMAT

const char* const JDETECTOR::ZIPPED_DETECTOR_FILE_FORMAT = ".gz"
static

zipped KM3NeT standard ASCII format

Definition at line 65 of file JDetectorToolkit.hh.

◆ GDML_DETECTOR_FILE_FORMAT

const char* const JDETECTOR::GDML_DETECTOR_FILE_FORMAT = ".xml"
static

KM3Sim input format.

Definition at line 66 of file JDetectorToolkit.hh.

◆ GDML_SCHEMA

const char* const JDETECTOR::GDML_SCHEMA = getenv("GDML_SCHEMA_DIR")
static

directory necessary for correct GDML header output

Definition at line 67 of file JDetectorToolkit.hh.

◆ getRotation

JRotation JDETECTOR::getRotation
static

Function object to get rotation matrix to go from first to second module.

Definition at line 823 of file JDetectorToolkit.hh.

◆ getDetectorVersion

const JGetDetectorVersion JDETECTOR::getDetectorVersion
static

Function object to map detector variant to detector version.

Definition at line 166 of file JDetectorVersion.hh.

◆ putDetectorVersion

const JPutDetectorVersion JDETECTOR::putDetectorVersion(getDetectorVersion)
static

Function object to map detector version to detector variant.

◆ LED_BEACON_PMT_TYPE

const int JDETECTOR::LED_BEACON_PMT_TYPE = 2
static

PMT type of LED beacon.

Definition at line 37 of file JMonteCarloDetector.hh.

◆ getPMTStatusBit

const JGetPMTStatusBit JDETECTOR::getPMTStatusBit
static

Function object to map key to PMT status bit.

Definition at line 347 of file JPMT.hh.

◆ putPMTStatusBit

const JPutPMTStatusBit JDETECTOR::putPMTStatusBit(getPMTStatusBit)
static

Function object to map PMT status bit to key.

◆ getTransitionTime

const JTransitionTimeGenerator JDETECTOR::getTransitionTime
static

Function object to generate transition time.

Definition at line 1071 of file JPMTTransitTimeGenerator.hh.

◆ getTransitionTimeProbability

const JTransitionTimeProbability JDETECTOR::getTransitionTimeProbability
static

Function object of transition time prabability.

Definition at line 1046 of file JPMTTransitTimeProbability.hh.

◆ getTransitionTimeProbability2D

const JTransitionTimeProbability2D JDETECTOR::getTransitionTimeProbability2D
static

Function object of twofold transition time prabability.

Definition at line 1096 of file JPMTTransitTimeProbability.hh.

JDETECTOR::getPMTStatusBits
std::vector< T > getPMTStatusBits()
Get PMT status bits.
Definition: JPMT.hh:386
JDETECTOR::getToT
double getToT(const T &tot, const JCalibration &cal)
Get calibrated time-over-threshold of hit.
Definition: JDetector/JCalibration.hh:230
JDETECTOR::KM3NET_DETECTOR_FILE_FORMAT
static const char *const KM3NET_DETECTOR_FILE_FORMAT
KM3NeT standard ASCII format.
Definition: JDetectorToolkit.hh:64
JIO::JFileStreamWriter
Binary buffered file output.
Definition: JFileStreamIO.hh:72
JDETECTOR::JPhotoElectron::t_ns
double t_ns
time [ns]
Definition: JPMTSimulator.hh:56
JTOOLS::getSinThetaC
double getSinThetaC()
Get average sine of Cherenkov angle of water.
Definition: JConstants.hh:155
JDETECTOR::JPMTAnalogueSignalProcessor::getSurvivalProbability
virtual double getSurvivalProbability(const int NPE) const
Probability that a hit survives the simulation of the PMT.
Definition: JPMTAnalogueSignalProcessor.hh:541
JIO::JFileStreamReader
Binary buffered file input.
Definition: JFileStreamIO.hh:22
JDETECTOR::JDetectorHeader
Data structure for detector header.
Definition: JDetectorHeader.hh:35
JDETECTOR::QZ_t
static const std::string QZ_t
Definition: JDetectorCalibration.hh:52
JDETECTOR::getMaximalDistance
double getMaximalDistance(const JDetector &detector)
Get maximal distance between modules in detector.
Definition: JDetectorToolkit.hh:76
JDETECTOR::putDetectorVersion
static const JPutDetectorVersion putDetectorVersion(getDetectorVersion)
Function object to map detector version to detector variant.
gzstreambase::close
void close()
Definition: gzstream.h:185
igzstream
Definition: gzstream.h:203
JDETECTOR::JModuleAddressMap::has
bool has(const int index) const
Test whether index is available.
Definition: JModuleAddressMap.hh:103
JDETECTOR::JPMTIdentifier::getModuleID
int getModuleID() const
Get module identifier.
Definition: JPMTIdentifier.hh:62
JGEOMETRY2D::JVector2D::getLengthSquared
double getLengthSquared() const
Get length squared.
Definition: JVector2D.hh:186
JDETECTOR::JCalibration
Data structure for PMT calibration.
Definition: JDetector/JCalibration.hh:35
JDETECTOR::GetYrotationG4
double GetYrotationG4(const JVersor3D dir)
Get rotation over Y axis in Geant4 coordinate system.
Definition: JDetectorToolkit.hh:117
JDETECTOR::JDetectorAddressMap_t
Auxiliary class to extract detector address map from detector identifier.
Definition: JDetectorAddressMapToolkit.hh:416
JDETECTOR::putTime
double putTime(const T &t1, const JCalibration &cal)
Get de-calibrated time.
Definition: JDetector/JCalibration.hh:216
JDETECTOR::JPMTPulse::t_ns
double t_ns
time [ns]
Definition: JPMTSimulator.hh:143
JDETECTOR::PZ_t
static const std::string PZ_t
Definition: JDetectorCalibration.hh:48
JDETECTOR::JCalibration::getT0
double getT0() const
Get time offset.
Definition: JDetector/JCalibration.hh:83
JTOOLS::j
int j
Definition: JPolint.hh:634
JDETECTOR::Q0_t
static const std::string Q0_t
Definition: JDetectorCalibration.hh:49
JDETECTOR::GDML_DETECTOR_FILE_FORMAT
static const char *const GDML_DETECTOR_FILE_FORMAT
KM3Sim input format.
Definition: JDetectorToolkit.hh:66
ogzstream
Definition: gzstream.h:213
JDETECTOR::JDetector::read
virtual JReader & read(JReader &in)
Read from input.
Definition: JDetector.hh:370
JDETECTOR::T0_t
static const std::string T0_t
Definition: JDetectorCalibration.hh:45
JDETECTOR::JPMTSignal::t_ns
double t_ns
time [ns]
Definition: JPMTSimulator.hh:99
JFIT::JEstimator< JPoint3D >
Linear fit of crossing point (position) between axes (objects with position and direction).
Definition: JPoint3DEstimator.hh:55
JDETECTOR::JTemplateDetectorAddressMap
Template lookup table for PMT addresses in detector.
Definition: JDetectorAddressMapToolkit.hh:64
std::set< int >
JDETECTOR::JDetector::write
virtual JWriter & write(JWriter &out) const
Write to output.
Definition: JDetector.hh:400
JTOOLS::JTimeRange
JRange< double > JTimeRange
Type definition for time range.
Definition: JTools/JTimeRange.hh:19
JDETECTOR::getPMTStatusBit
static const JGetPMTStatusBit getPMTStatusBit
Function object to map key to PMT status bit.
Definition: JPMT.hh:347
JTOOLS::getInverseSpeedOfLight
const double getInverseSpeedOfLight()
Get inverse speed of light.
Definition: JConstants.hh:100
JDETECTOR::getTime
double getTime(const T &t1, const JCalibration &cal)
Get calibrated time.
Definition: JDetector/JCalibration.hh:202
JDETECTOR::getNumberOfPMTs
int getNumberOfPMTs(const JDetector &detector)
Get number of PMTs.
Definition: JDetectorToolkit.hh:360
JLANG::JObjectID::setID
void setID(const int id)
Set identifier.
Definition: JObjectID.hh:66
JDETECTOR::GDML_SCHEMA
static const char *const GDML_SCHEMA
directory necessary for correct GDML header output
Definition: JDetectorToolkit.hh:67
JTOOLS::getIndexOfRefraction
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
JDETECTOR::JCalibration::getCalibration
const JCalibration & getCalibration() const
Get calibration.
Definition: JDetector/JCalibration.hh:61
JDETECTOR::ZIPPED_DETECTOR_FILE_FORMAT
static const char *const ZIPPED_DETECTOR_FILE_FORMAT
zipped KM3NeT standard ASCII format
Definition: JDetectorToolkit.hh:65
JDETECTOR::PY_t
static const std::string PY_t
Definition: JDetectorCalibration.hh:47
JDETECTOR::GENDET_DETECTOR_FILE_FORMAT
static const char *const GENDET_DETECTOR_FILE_FORMAT
File name extensions.
Definition: JDetectorToolkit.hh:62
THROW
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:669
JDETECTOR::getDetectorVersions
std::vector< T > getDetectorVersions()
Get detector versions.
Definition: JDetectorVersion.hh:209
JDETECTOR::JModule
Data structure for a composite optical module.
Definition: JModule.hh:49
JDETECTOR::QY_t
static const std::string QY_t
Definition: JDetectorCalibration.hh:51
JDETECTOR::BINARY_DETECTOR_FILE_FORMAT
static const char *const BINARY_DETECTOR_FILE_FORMAT
JIO binary file format.
Definition: JDetectorToolkit.hh:63
JDETECTOR::putToT
double putToT(const T &tot, const JCalibration &cal)
Get de-calibrated time-over-threshold of hit.
Definition: JDetector/JCalibration.hh:244
JDETECTOR::JPMT
Data structure for PMT geometry and calibration.
Definition: JPMT.hh:53
JDETECTOR::QX_t
static const std::string QX_t
Definition: JDetectorCalibration.hh:50
JDETECTOR::PX_t
static const std::string PX_t
Definition: JDetectorCalibration.hh:46
JDETECTOR::JPMTIdentifier::getPMTAddress
int getPMTAddress() const
Get PMT identifier (= TDC).
Definition: JPMTIdentifier.hh:73
JDETECTOR::JModuleLocation::setLocation
void setLocation(const JModuleLocation &location)
Set location.
Definition: JModuleLocation.hh:90
JTOOLS::getTanThetaC
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:133
JGEOMETRY3D::JPosition3D::getPosition
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
std
Definition: jaanetDictionary.h:36
JDETECTOR::OK_t
static const std::string OK_t
Definition: JDetectorCalibration.hh:54
JDETECTOR::PMTSerial_t
static const std::string PMTSerial_t
Definition: JDetectorCalibration.hh:42
JTOOLS::PI
static const double PI
Constants.
Definition: JConstants.hh:20
JDETECTOR::Result_t
static const std::string Result_t
Detector calibration key words for JSON I/O.
Definition: JDetectorCalibration.hh:34
JIO
Auxiliary classes and methods for binary I/O.
Definition: JBinaryFileReader.hh:17
JDETECTOR::DOMId_t
static const std::string DOMId_t
Definition: JDetectorCalibration.hh:44
JDETECTOR::DOMSerial_t
static const std::string DOMSerial_t
Definition: JDetectorCalibration.hh:43
JGEOMETRY3D::JVector3D::getX
double getX() const
Get x position.
Definition: JVector3D.hh:93
JAANET::get
T get(const JHead &header)
Get object from header.
Definition: JHeadToolkit.hh:295
JDETECTOR::JModuleLocation::getFloor
int getFloor() const
Get floor number.
Definition: JModuleLocation.hh:144
JDETECTOR::JModule::compile
void compile()
Compile position of module from the positions of the PMTs.
Definition: JModule.hh:210
JLANG::make_array
const std::vector< JValue_t > make_array(const JValue_t(&array)[N])
Method to create array of values.
Definition: JVectorize.hh:27
JDETECTOR::JPMTParameters::QE
double QE
relative quantum efficiency
Definition: JPMTParameters.hh:216
JDETECTOR::GetXrotationG4
double GetXrotationG4(const JVersor3D dir)
Get rotation over X axis in Geant4 coordinate system.
Definition: JDetectorToolkit.hh:98
JDETECTOR::JPMTParameters
Data structure for PMT parameters.
Definition: JPMTParameters.hh:29
JDETECTOR::getMaximalHitProbability
double getMaximalHitProbability(const double mu)
Get maximal ratio of hit probabilities for given QE and expectation value of the number of photo-elec...
Definition: JPMTParametersToolkit.hh:69
JDETECTOR::JMonteCarloDetector
Monte Carlo detector (i.e.
Definition: JMonteCarloDetector.hh:43
JDETECTOR::JModuleLocation::getString
int getString() const
Get string number.
Definition: JModuleLocation.hh:133
JDETECTOR::write_gdml
void write_gdml(std::ostream &out, const JDetector &detector)
Writes KM3Sim GDML input file from detector.
Definition: JDetectorToolkit.hh:133
JDETECTOR::JPMTAnalogueSignalProcessor
PMT analogue signal processor.
Definition: JPMTAnalogueSignalProcessor.hh:46