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 = ".gdml"
 KM3Sim input format. More...
 
static const char *const GDML_SCHEMA = getenv("GDML_SCHEMA_DIR")
 directory necessary for correct GDML header output More...
 
static const char *const CAN_MARGIN = getenv("CAN_MARGIN")
 
static const char *const G4GDML_DEFAULT_SCHEMALOCATION = "http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd"
 
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 78 of file JDetectorToolkit.hh.

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

◆ 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 100 of file JDetectorToolkit.hh.

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

◆ 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 119 of file JDetectorToolkit.hh.

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

◆ read_gdml()

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

Definition at line 125 of file JDetectorToolkit.hh.

126  {}

◆ 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 135 of file JDetectorToolkit.hh.

136  {
137 
138 
139  const JCylinder3D cylinder(detector.begin(), detector.end());
140  double can_margin;
141  if(CAN_MARGIN) can_margin = atof(CAN_MARGIN);
142  else{
143  std::cout<<"CAN_MARGIN not defined! Setting standard CAN_MARGIN = 280 m"<<std::endl;
144  can_margin = 4*70; //this is given in meters like all the dimensions in the GDML file (look at the unit field of every position and solid definition)
145  }
146  // Detector height is bascially just a distance between the highest and the lowest DOM
147  //double Detector_Height = cylinder.getZmax() - cylinder.getZmin();
148  // Distance from the center of the lowest DOM to the seabed
149  //double Seabed_Distance = cylinder.getZmin();
150 
151  // To translate Z coordinate from detx format which corresponds to the distance from the seabed one has to perform a following calculation
152  // Dom_Z_GDML = Dom_Z_Detx - Distance to the seabed from the lowest DOM - Detector_height/2
153 
154  //double DistanceOfSeabedFromLowestOM = Seabed_Distance;
155  // For now, the size of the WorldBox is fixed to 2200 meters
156  //const double WorldBoxHeight = 2200.;
157 
158  const double WorldCylinderHeight = 2*(cylinder.getZmax() - cylinder.getZmin() + can_margin); //
159  const double WorldRadius = cylinder.getRadius() + can_margin;
160 
161  std::cout<<WorldCylinderHeight/2<<std::endl;
162 
163  // Below formula comes directly from the note by Apostolos, can be used to reproduce the first GDML format of km3sim
164  //double Crust_Z_size = WorldBoxHeight/2-Detector_Height/2-DistanceOfSeabedFromLowestOM; Formula for obsolete coordinate covention, where Z_seabed != 0
165  //double Crust_Z_position = -WorldBoxHeight/4-Detector_Height/4-DistanceOfSeabedFromLowestOM/2; Formula for obsolete coordinate covention, where Z_seabed != 0
166 
167  //use this if you want to use WorldBox as the World Volume
168  //const double Crust_Z_size = WorldBoxHeight/2;
169  //const double Crust_Z_position= -WorldBoxHeight/4;
170 
171  const double Crust_Z_size = WorldCylinderHeight/2;
172  const double Crust_Z_position= -WorldCylinderHeight/4;
173 
174  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=\"";
175  if(!GDML_SCHEMA){
176  std::cout<<"GDML_SCHEMA_DIR NOT DEFINED! Setting default path"<<std::endl;
177  //out<<"http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd\">\n\n\n";
178  out<<G4GDML_DEFAULT_SCHEMALOCATION<<"\">\n\n\n";
179  }
180  else{
181  out<<GDML_SCHEMA<<"gdml.xsd\">\n\n\n";
182  }
183  out<<"<define>\n";
184  out<<"<rotation name=\"identity\"/>\n<position name=\"zero\"/>\n";
185 
186  int PMTs_NO = 0;
187  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
188 
189  const JFIT::JEstimator<JPoint3D> center(module->begin(), module->end());
190 
191  //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
192  out<<"<position name=\"PosString"<<module->getString()<<"_Dom"<<module->getID()<<"\" unit=\"m\" x=\""<<module->getX()<<"\" y=\""<<module->getY()<<"\" z=\""<<module->getZ()<<"\"/>\n";
193 
194  for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
195  //JVector3D vec;
196  //static_cast<JVector3D> (vec) = module->sub(*pmt);
197 
198  const JVector3D vec = static_cast<JVector3D>(*pmt).sub(center);
199  out<<"<position name=\"CathodPosition"<<pmt->getID()<<"_"<<module->getID()<<"\" unit=\"m\" x=\""<<vec.getX()<<"\" y=\""<<vec.getY()<<"\" z=\""<<vec.getZ()<<"\"/>\n";
200  out<<"<rotation name=\"CathodRotation"<<pmt->getID()<<"_"<<module->getID()<<"\" unit=\"deg\" x=\""<<GetXrotationG4(*pmt)<<"\" y=\""<<GetYrotationG4(*pmt)<<"\" z=\"0.000000\"/>\n";
201  out<<"<constant name=\"CathodID_"<<PMTs_NO<<"\" value=\""<<pmt->getID()<<"\"/>\n";
202  PMTs_NO++;
203  }
204 
205  }
206 
207  out<<"<position name=\"OMShift\" unit=\"m\" x=\"0\" y=\"0\" z=\"0.0392\"/>\n";
208  out<<"\n\n\n";
209  out<<"<!-- end of DU position definitions -->\n<position name=\"CrustPosition\" unit=\"m\" x=\"0\" y=\"0\" z=\""<<Crust_Z_position<<"\"/>\n";
210 
211  out<<"</define>\n";
212  out<<"<materials>\n";
213  out<<"</materials>\n";
214  out<<"<solids>\n";
215  //out<<" <box name=\"WorldBox\" lunit=\"m\" x=\"2200\" y=\"2200\" z=\"2200\"/>\n";
216  out<<" <box name=\"CrustBox\" lunit=\"m\" x=\"2200\" y=\"2200\" z=\""<<Crust_Z_size<<"\"/>\n";
217  out<<" <box name=\"StoreyBox\" lunit=\"m\" x=\"0.6\" y=\"0.6\" z=\"0.6\"/>\n";
218  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";
219  out<<" <tube name=\"CathodTube\" lunit=\"cm\" aunit=\"deg\" rmin=\"0.0\" rmax=\"4.7462\" z=\"0.5\" startphi=\"0.0\" deltaphi=\"360.0\"/>\n";
220  out<<" <tube name=\"WorldTube\" lunit=\"m\" aunit=\"deg\" rmin=\"0.0\" rmax=\""<<WorldRadius<<"\" z=\""<<WorldCylinderHeight<<"\" startphi=\"0.0\" deltaphi=\"360.0\"/>\n";
221  out<<"</solids>\n\n\n";
222 
223  out<<"<structure>\n";
224  out<<" <volume name=\"CathodVolume\">\n";
225  out<<" <materialref ref=\"Cathod\"/>\n";
226  out<<" <solidref ref=\"CathodTube\"/>\n";
227  out<<" </volume>\n";
228 
229  out<<"<!-- OMVolume(s) construction -->\n";
230 
231  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
232 
233  out<<" <volume name=\"OMVolume"<<module->getID()<<"\">\n";
234  out<<" <materialref ref=\"Water\"/>\n";
235  out<<" <solidref ref=\"OMSphere\"/>\n";
236 
237  for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
238  out<<" <physvol>\n";
239  out<<" <volumeref ref=\"CathodVolume\"/>\n";
240  out<<" <positionref ref=\"CathodPosition"<<pmt->getID()<<"_"<<module->getID()<<"\"/>\n";
241  out<<" <rotationref ref=\"CathodRotation"<<pmt->getID()<<"_"<<module->getID()<<"\"/>\n";
242  out<<" </physvol>\n";
243  }
244 
245  out<<" </volume>\n";
246  }
247 
248  out<<"<!-- StoreyVolume(s) construction -->\n";
249 
250  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
251  out<<" <volume name=\"StoreyVolume"<<module->getID()<<"\">\n";
252  out<<" <materialref ref=\"Water\"/>\n";
253  out<<" <solidref ref=\"StoreyBox\"/>\n";
254  out<<" <physvol>\n";
255  out<<" <volumeref ref=\"OMVolume"<<module->getID()<<"\"/>\n";
256  out<<" <positionref ref=\"OMShift\"/>\n";
257  //out<<" <positionref ref=\"zero\"/>\n";
258  out<<" <rotationref ref=\"identity\"/>\n";
259  out<<" </physvol>\n";
260  out<<" </volume>\n";
261  }
262 
263  out<<"<!-- Crust Volume construction-->\n";
264  out<<"<volume name=\"CrustVolume\">\n";
265  out<<" <materialref ref=\"Crust\"/>\n";
266  out<<" <solidref ref=\"CrustBox\"/>\n";
267  out<<"</volume>\n";
268 
269  out<<"<!-- World Volume construction-->\n";
270  out<<"<volume name=\"WorldVolume\">\n";
271  out<<" <materialref ref=\"Water\"/>\n";
272  //out<<" <solidref ref=\"WorldBox\"/>\n";
273  out<<" <solidref ref=\"WorldTube\"/>\n";
274 
275  out<<" <physvol>\n";
276  out<<" <volumeref ref=\"CrustVolume\"/>\n";
277  out<<" <positionref ref=\"CrustPosition\"/>\n";
278  out<<" <rotationref ref=\"identity\"/>\n";
279  out<<" </physvol>\n";
280 
281  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
282  out<<" <physvol>\n";
283  out<<" <volumeref ref=\"StoreyVolume"<<module->getID()<<"\"/>\n";
284  out<<" <positionref ref=\"PosString"<< module->getString() <<"_Dom"<< module->getID() <<"\"/>\n";
285  //out<<" <rotation x="{}" y="{}" z="0.0"/>\n'.format(Dom_Phi[i], Dom_Theta[i]))
286  out<<" <rotationref ref=\"identity\"/>\n";
287  out<<" </physvol>\n";
288  }
289 
290  out<<"</volume>\n";
291 
292  out<<"</structure>\n";
293  out<<"<setup name=\"Default\" version=\"1.0\">\n";
294  out<<"<world ref=\"WorldVolume\"/>\n";
295  out<<"</setup>\n";
296  out<<"</gdml>\n";
297  }

◆ 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 306 of file JDetectorToolkit.hh.

◆ 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 320 of file JDetectorToolkit.hh.

321  {
322  const double Dmax_m = getMaximalDistance(detector);
323 
324  return (sqrt((Dmax_m + roadWidth_m*getSinThetaC()) *
325  (Dmax_m - roadWidth_m*getSinThetaC())) +
326  roadWidth_m * getSinThetaC() * getTanThetaC()) * getInverseSpeedOfLight();
327  }

◆ 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 339 of file JDetectorToolkit.hh.

340  {
341  if (!module.empty()) {
342 
343  JTimeRange time_range(JTimeRange::DEFAULT_RANGE);
344 
345  for (JModule::const_iterator pmt = module.begin(); pmt != module.end(); ++pmt) {
346 
347  const JCalibration& calibration = pmt->getCalibration();
348 
349  time_range.include(putTime(timeRange.getLowerLimit(), calibration));
350  time_range.include(putTime(timeRange.getUpperLimit(), calibration));
351  }
352 
353  return time_range;
354 
355  } else {
356 
357  return timeRange;
358  }
359  }

◆ getNumberOfPMTs() [1/2]

int JDETECTOR::getNumberOfPMTs ( const JModule module)
inline

Get number of PMTs.

Parameters
modulemodule
Returns
number of PMTs

Definition at line 368 of file JDetectorToolkit.hh.

369  {
370  return module.size();
371  }

◆ getNumberOfPMTs() [2/2]

int JDETECTOR::getNumberOfPMTs ( const JDetector detector)
inline

Get number of PMTs.

Parameters
detectordetector
Returns
number of PMTs

Definition at line 380 of file JDetectorToolkit.hh.

381  {
382  int number_of_pmts = 0;
383 
384  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
385  number_of_pmts += getNumberOfPMTs(*module);
386  }
387 
388  return number_of_pmts;
389  }

◆ getNumberOfStrings()

int JDETECTOR::getNumberOfStrings ( const JDetector detector)
inline

Get number of strings.

Parameters
detectordetector
Returns
number of strings

Definition at line 398 of file JDetectorToolkit.hh.

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

◆ 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 416 of file JDetectorToolkit.hh.

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

◆ getNumberOfFloors()

int JDETECTOR::getNumberOfFloors ( const JDetector detector)
inline

Get number of floors.

Parameters
detectordetector
Returns
number of floors

Definition at line 434 of file JDetectorToolkit.hh.

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

◆ getNumberOfModules()

int JDETECTOR::getNumberOfModules ( const JDetector detector)
inline

Get number of modules.

Parameters
detectordetector
Returns
number of modules

Definition at line 452 of file JDetectorToolkit.hh.

453  {
454  std::set<int> buffer;
455 
456  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
457  buffer.insert(module->getID());
458  }
459 
460  return buffer.size();
461  }

◆ 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 476 of file JDetectorToolkit.hh.

477  {
478  using namespace std;
479  using namespace JIO;
480 
481  if (file_name.endsWith(GENDET_DETECTOR_FILE_FORMAT)) {
482 
483  JMonteCarloDetector buffer(true);
484 
485  ifstream in(file_name.c_str());
486 
487  if (!in) {
488  THROW(JFileOpenException, "File not opened: " << file_name);
489  }
490 
491  in >> buffer;
492 
493  in.close();
494 
495  detector.swap(buffer);
496 
497  } else if (file_name.endsWith(BINARY_DETECTOR_FILE_FORMAT)) {
498 
499  JFileStreamReader in(file_name.c_str());
500 
501  if (!in) {
502  THROW(JFileOpenException, "File not opened: " << file_name);
503  }
504 
505  detector.read(in);
506 
507  in.close();
508 
509  } else if (file_name.endsWith(KM3NET_DETECTOR_FILE_FORMAT)) {
510 
511  ifstream in(file_name.c_str());
512 
513  if (!in) {
514  THROW(JFileOpenException, "File not opened: " << file_name);
515  }
516 
517  in >> detector;
518 
519  in.close();
520 
521  } else if (file_name.endsWith(ZIPPED_DETECTOR_FILE_FORMAT)) {
522 
523  igzstream in(file_name.c_str());
524 
525  if (!in) {
526  THROW(JFileOpenException, "File not opened: " << file_name);
527  }
528 
529  in >> detector;
530 
531  in.close();
532 
533  } else {
534 
535  THROW(JProtocolException, "Protocol not defined: " << file_name);
536  }
537  }

◆ 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 552 of file JDetectorToolkit.hh.

553  {
554  using namespace std;
555  using namespace JIO;
556 
557  if (file_name.endsWith(BINARY_DETECTOR_FILE_FORMAT)) {
558 
559  JFileStreamWriter out(file_name.c_str());
560 
561  detector.write(out);
562 
563  out.close();
564 
565  } else if (file_name.endsWith(KM3NET_DETECTOR_FILE_FORMAT)) {
566 
567  std::ofstream out(file_name.c_str());
568 
569  out << detector;
570 
571  out.close();
572 
573  } else if (file_name.endsWith(ZIPPED_DETECTOR_FILE_FORMAT)) {
574 
575  ogzstream out(file_name.c_str());
576 
577  out << detector;
578 
579  out.close();
580 
581  } else if (file_name.endsWith(GDML_DETECTOR_FILE_FORMAT)) {
582 
583  std::ofstream out(file_name.c_str());
584 
585  write_gdml(out, detector);
586 
587  out.close();
588 
589  } else {
590 
591  throw JProtocolException("Protocol not defined.");
592  }
593  }

◆ 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 604 of file JDetectorToolkit.hh.

607  {
608  static JModule module;
609 
610 
611  module.setID(id);
612 
613  module.setLocation(location);
614 
615  module.resize(memo.size());
616 
617  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))); }
618 
619  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))); }
620  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))); }
621  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))); }
622  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))); }
623  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))); }
624  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))); }
625 
626  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))); }
627  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))); }
628  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))); }
629  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))); }
630  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))); }
631  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))); }
632 
633  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))); }
634  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))); }
635  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))); }
636  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))); }
637  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))); }
638  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))); }
639 
640  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))); }
641  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))); }
642  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))); }
643  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))); }
644  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))); }
645  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))); }
646 
647  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))); }
648  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))); }
649  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))); }
650  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))); }
651  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))); }
652  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))); }
653 
654  module.compile();
655 
656  return module;
657  }

◆ 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 667 of file JDetectorToolkit.hh.

669  {
670  using JTOOLS::PI;
671 
672  static JModule module;
673 
674  module.setID(id);
675 
676  module.setLocation(location);
677 
678  if (module.empty()) {
679 
680  module.resize(3);
681 
682  const double R = 0.5; // [m]
683 
684  const double st = sin(0.75*PI);
685  const double ct = cos(0.75*PI);
686 
687  for (int i = 0; i != 3; ++i) {
688 
689  const double phi = (2.0*PI*i) / 3.0;
690  const double cp = cos(phi);
691  const double sp = sin(phi);
692 
693  module[i] = JPMT(i, JAxis3D(JVector3D(R*st*cp, R*st*sp, R*ct), JVersor3D(st*cp, st*sp, ct)));
694  }
695  }
696 
697  return module;
698  }

◆ 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
Returns
label

Definition at line 708 of file JDetectorToolkit.hh.

709  {
710  using namespace std;
711 
712  ostringstream os;
713 
714  os << "(" << setfill('0') << setw(3) << location.getString() << "," << setfill('0') << setw(2) << location.getFloor() << ")";
715 
716  return os.str();
717  }

◆ 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 853 of file JDetectorToolkit.hh.

854  {
855  return second.getPosition() - first.getPosition();
856  }

◆ 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 866 of file JDetectorToolkit.hh.

867  {
868  return JCalibration(second.getT0() - first.getT0());
869  }

◆ 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 = ".gdml"
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.

◆ CAN_MARGIN

const char* const JDETECTOR::CAN_MARGIN = getenv("CAN_MARGIN")
static

Definition at line 68 of file JDetectorToolkit.hh.

◆ G4GDML_DEFAULT_SCHEMALOCATION

const char* const JDETECTOR::G4GDML_DEFAULT_SCHEMALOCATION = "http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd"
static

Definition at line 69 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 843 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
JGEOMETRY3D::JVersor3D::getDZ
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:114
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
JTOOLS::JRange::getLowerLimit
T getLowerLimit() const
Get lower limit.
Definition: JRange.hh:215
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
JTOOLS::JRange::getUpperLimit
T getUpperLimit() const
Get upper limit.
Definition: JRange.hh:226
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:78
JDETECTOR::putDetectorVersion
static const JPutDetectorVersion putDetectorVersion(getDetectorVersion)
Function object to map detector version to detector variant.
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
JGEOMETRY3D::JVector3D::getZ
double getZ() const
Get z position.
Definition: JVector3D.hh:114
JGEOMETRY3D::JAxis3D
Axis object.
Definition: JAxis3D.hh:38
JLANG::JFileOpenException
Exception for opening of file.
Definition: JException.hh:342
JGEOMETRY2D::JVector2D::getLengthSquared
double getLengthSquared() const
Get length squared.
Definition: JVector2D.hh:187
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:119
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::JRange< double >
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
JGEOMETRY3D::JVersor3D
Data structure for normalised vector in three dimensions.
Definition: JVersor3D.hh:23
ogzstream
Definition: gzstream.h:213
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 >
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
JGEOMETRY3D::JCylinder3D
Cylinder object.
Definition: JCylinder3D.hh:37
JLANG::JString::endsWith
bool endsWith(const std::string &suffix) const
Test if this string ends with the specified suffix.
Definition: JString.hh:175
JGEOMETRY3D::JVector3D
Data structure for vector in three dimensions.
Definition: JVector3D.hh:33
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:380
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:670
JGEOMETRY3D::JVersor3D::getDX
double getDX() const
Get x direction.
Definition: JVersor3D.hh:92
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
JLANG::JProtocolException
Protocol exception.
Definition: JException.hh:630
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
JGEOMETRY3D::JVersor3D::getDY
double getDY() const
Get y direction.
Definition: JVersor3D.hh:103
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::G4GDML_DEFAULT_SCHEMALOCATION
static const char *const G4GDML_DEFAULT_SCHEMALOCATION
Definition: JDetectorToolkit.hh:69
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
JAANET::detector
Detector file.
Definition: JHead.hh:130
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
JGEOMETRY3D::JVector3D::getY
double getY() const
Get y position.
Definition: JVector3D.hh:103
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
JGEOMETRY3D::JVector3D::sub
JVector3D & sub(const JVector3D &vector)
Subtract vector.
Definition: JVector3D.hh:157
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:100
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::CAN_MARGIN
static const char *const CAN_MARGIN
Definition: JDetectorToolkit.hh:68
JDETECTOR::write_gdml
void write_gdml(std::ostream &out, const JDetector &detector)
Writes KM3Sim GDML input file from detector.
Definition: JDetectorToolkit.hh:135
JDETECTOR::JPMTAnalogueSignalProcessor
PMT analogue signal processor.
Definition: JPMTAnalogueSignalProcessor.hh:46