Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JDETECTOR Namespace Reference

file Auxiliary data structures and methods for detector calibration. More...

Classes

struct  getTransitionTime
 
struct  getTransitionTimeProbability
 
class  JAnchor
 Data structure for anchor position on sea bed. More...
 
struct  JAntares_t
 Antares More...
 
class  JCalibration
 Data structure for time 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...
 
struct  JCLBInput
 Wrapper for CLB input. More...
 
class  JCLBSimulator
 Interface for CLB simulation. More...
 
class  JCompass
 Data structure for compass in three dimensions. More...
 
struct  JCompassRotation_t
 Auxiliary data structure for compass rotation. 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  JDetectorBuilder
 Auxiliary interface for building detector. More...
 
class  JDetectorBuilder_t
 Template lookup table for detector builder. More...
 
class  JDetectorBuilder_t< JKM3NeT_t >
 Template specialisation of JDetectorBuilder for KM3NeT detector. More...
 
class  JDetectorBuilder_t< JKM3NeTFit_t >
 Template specialisation of JDetectorBuilder for KM3NeT detector with all known features. More...
 
class  JDetectorBuilder_t< JMonteCarlo_t >
 Template specialisation of JDetectorBuilder for Monte Carlo detector. More...
 
class  JDetectorBuilder_t< JObsolete_t >
 Template specialisation of JDetectorBuilder for obsolete detector. More...
 
class  JDetectorBuilder_t< JPPM_DU_t >
 Template specialisation of JDetectorBuilder for PPM_DU detector. More...
 
class  JDetectorHeader
 Data structure for detector header. More...
 
struct  JDetectorHelper_t
 Auxiliary class to extract detector address map from detector identifier. More...
 
struct  JDetectorHelper_t< JTypeList< JHead_t, JNullType > >
 
struct  JDetectorHelper_t< JTypeList< JHead_t, JTail_t > >
 
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 version to numerical value. More...
 
struct  JGetModuleStatusBit
 Auxiliary class to map key to module status bit. More...
 
struct  JGetPMTStatusBit
 Auxiliary class to map key to PMT status bit. More...
 
struct  JHVCalibration_t
 Data structure for PMT high-voltage calibration. More...
 
struct  JHydrophone
 Type definition of hydrophone. More...
 
class  JK40DefaultSimulator
 Default implementation of the simulation of K40 background. More...
 
class  JK40DefaultSimulatorInterface
 Default K40 simulator interface. More...
 
class  JK40Simulator
 Interface for simulation of K40 background. More...
 
struct  JKM3NeT_t
 KM3NeT default detector More...
 
struct  JKM3NeTFit_t
 KM3NeT with cable swaps, etc. (see e.g. JPMTSwapDB.cc) More...
 
class  JLocation
 Logical location of module. More...
 
class  JLocationRouter
 Router for direct addressing of location data in detector data structure. 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  JModuleAnalogueSignalProcessor
 Auxiliary container for PMT analogue signal processors in same optical module. More...
 
struct  JModuleAttributes
 Data structure for module address and module attributes. More...
 
struct  JModuleCalibration_t
 Auxiliary data structure for module time calibration. 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...
 
struct  JModuleMap_t
 Auxiliary data structure for module address map. 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  JModuleStatus_t
 Auxiliary data structure for module status. More...
 
struct  JMonteCarlo_t
 Monte Carlo. More...
 
class  JMonteCarloDetector
 Monte Carlo detector (i.e. ".det" file). More...
 
struct  JObsolete_t
 obsolete detector More...
 
struct  JPhotoElectron
 Data structure for single photo-electron. More...
 
class  JPMT
 Data structure for PMT geometry, calibration and status. 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 time 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...
 
struct  JPMTSignal
 Data structure for PMT analogue signal. More...
 
class  JPMTSignalProcessorInterface
 PMT signal processor interface. More...
 
class  JPMTSimulator
 Interface for PMT simulation. More...
 
struct  JPMTStatus_t
 Auxiliary data structure for PMT status. More...
 
struct  JPMTThresholdCalibration_t
 Data structure for PMT threshold calibration. More...
 
struct  JPPM_DU_t
 Type definitions for different detectors.PPM_DU. More...
 
struct  JPutDetectorVersion
 Auxiliary class to map numerical value to detector version. More...
 
struct  JRotation
 Auxiliary class to get rotation matrix between two optical modules. More...
 
struct  JStringCounter
 Auxiliary class for counting unique strings. More...
 
struct  JStringRouter
 Router for mapping of string identifier to index. More...
 
class  JTransferFunction1D
 Auxiliary class for a non-linear transfer function of TDC inside FPGA. More...
 
struct  JTransitionTimeGenerator
 Implementation to generate PMT transition times based on measurements by Oleg Kalekin et al. (see also examples/JDetector/JTTS.cc). More...
 
struct  JTransitionTimeGenerator38
 Implementation to generate PMT transition times based on measurements. More...
 
struct  JTransitionTimeGenerator41
 Implementation to generate PMT transition times based on measurements. More...
 
struct  JTransitionTimeGenerator67
 Implementation to generate PMT transition times based on measurements (see Calibration e-log entry 467). More...
 
struct  JTransitionTimeGenerator_t
 Auxiliary base class to generate PMT transition times based on measurements. More...
 
struct  JTransitionTimeGeneratorXX
 Implementation to generate PMT transition times based on measurements. More...
 
struct  JTransitionTimeProbability
 Implementation of 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  JTransitionTimeProbability38
 Implementation of probability distibution of the PMT transition times based on measurements. More...
 
struct  JTransitionTimeProbability41
 Implementation of probability distibution of the PMT transition times based on measurements. More...
 
struct  JTransitionTimeProbability67
 Implementation of probability distibution of the PMT transition times based on measurements (see Calibration e-log entry 467). More...
 
struct  JTransitionTimeProbability_t
 Auxiliary base class for probability distibution of the PMT transition times based on measurements. More...
 
struct  JTransitionTimeProbabilityXX
 Implementation of probability distibution of the PMT transition times based on measurements. More...
 
struct  JTransmitter
 Type definition of transmitter. More...
 
class  JTripod
 Data structure for tripod. More...
 
struct  JUTCDistance
 Auxiliary class for distance beteen UTC times. More...
 
struct  JVersion
 Auxiliary class for version identifier. More...
 

Typedefs

typedef JPMTData< JPMTPulseJPMTOutput
 Type definition of PMT base output.
 
typedef std::vector< JHVCalibration_tJHVCalibration
 PMT high voltage calibration.
 
typedef std::vector< JPMTThresholdCalibration_tJPMTThresholdCalibration
 PMT threshold calibration.
 
typedef std::vector< JModuleMap_tJModuleMap
 module map
 
typedef std::vector< JPMTCalibration_tJPMTCalibration
 PMT time calibration.
 
typedef std::vector< JPMTStatus_tJPMTStatus
 PMT status.
 
typedef std::vector< JModulePosition_tJModulePosition
 Module position.
 
typedef std::vector< JModuleRotation_tJModuleRotation
 Module rotation.
 
typedef std::vector< JModuleStatus_tJModuleStatus
 Module status.
 
typedef std::vector< JModuleCalibration_tJModuleCalibration
 Module time calibration.
 
typedef std::vector< JCompassRotation_tJCompassRotation
 Compass rotation.
 
typedef JLANG::JObjectID JDetectorID
 Type definition of detector identifier.
 
typedef JTYPELIST< JPPM_DU_t, JKM3NeTFit_t, JKM3NeT_t, JMonteCarlo_t >::typelist JDetectorTypes_t
 Type list of KM3NeT detector types (specific detectors first).
 
typedef JTOOLS::JRange< int > floor_range
 Type definition for range of floors.
 
typedef JLANG::JComparator< double(JVector3D::*)() const > JModuleComparator
 Type definition of a module comparator using 3D position information.
 
typedef JLANG::JObjectID JModuleIdentifier
 
typedef JPutStatusBit JPutModuleStatusBit
 Type definition to map module status bit to key.
 
typedef std::map< JPMTIdentifier, JPMTParametersJPMTParametersMap_t
 Type definition of map PMT identifier to PMT parameters.
 
typedef JPutStatusBit JPutPMTStatusBit
 Type definition to map PMT status bit to key.
 
typedef JTOOLS::JRange< double > JTimeRange
 Type definition for time range (unit [ns]).
 

Functions

bool operator< (const JAnchor &first, const JAnchor &second)
 Sort anchors in ascending distance from (0,0).
 
template<class T >
double getTime (const T &t1, const JCalibration &cal)
 Get calibrated time.
 
template<class T >
double putTime (const T &t1, const JCalibration &cal)
 Get de-calibrated time.
 
template<class T >
double getToT (const T &tot, const JCalibration &cal)
 Get calibrated time-over-threshold of hit.
 
template<class T >
double putToT (const T &tot, const JCalibration &cal)
 Get de-calibrated time-over-threshold of hit.
 
template<class T >
std::vector< std::string > get_string_array (T value)
 Cast single value to array of strings, conform the DB-format.
 
double retrieve_value (std::vector< std::string > string_value_array)
 Retrieve value from json array of strings.
 
JUTMGrid getARCAUTMGrid ()
 Get UTM grid for ARCA.
 
JUTMGrid getORCAUTMGrid ()
 Get UTM grid for ORCA.
 
JDetectorHeader getARCADetectorHeader ()
 Get detector header for ARCA.
 
JDetectorHeader getORCADetectorHeader ()
 Get detector header for ORCA.
 
bool isARCADetector (const JDetectorHeader &header)
 Check if given detector header is compatible with tat of ARCA.
 
bool isORCADetector (const JDetectorHeader &header)
 Check if given detector header is compatible with that of ORCA.
 
bool hasDetector (JType< JPPM_DU_t > type, const int id)
 Check validity of detector identifier.
 
bool hasDetector (JType< JKM3NeTFit_t > type, const int id)
 
bool hasDetector (JType< JKM3NeT_t > type, const int id)
 
bool hasDetector (JType< JMonteCarlo_t > type, const int id)
 
template<class JDetector_t >
JDetectorBuildergetDetectorBuilder ()
 Get detector builder.
 
template<class JDetector_t >
JDetectorAddressMapgetDetectorAddressMap ()
 Get detector address map.
 
template<class JDetector_t >
JModuleAddressMapgetModuleAddressMap (int id)
 Get module address map.
 
template<class JDetector_t >
const JPMTAddressTranslatorgetPMTAddressTranslator (int id, int tdc)
 Get PMT address translator for given module identifier and TDC channel.
 
template<class JDetector_t >
int getPMTLogicalIndex (int id, int tdc)
 Get PMT logical index for given module identifier and TDC channel.
 
JDetectorBuildergetDetectorBuilder (const int id)
 Get detector builder.
 
JDetectorAddressMapgetDetectorAddressMap (const int id)
 Get detector address map.
 
bool hasDetectorBuilder (const int id)
 Check if detector builder is available.
 
bool hasDetectorAddressMap (const int id)
 Check if detector address map is available.
 
template<class JDetector_t >
const JModulegetModule (const JType< JDetector_t > type, const int id, const JLocation &location=JLocation())
 Get module according given detector type.
 
const JModulegetModule (const JType< JAntares_t > type, const int id, const JLocation &location=JLocation())
 Get module according Antares detector type.
 
template<class JDetector_t >
const JModulegetModule (const int id, const JLocation &location=JLocation())
 Get module according detector template.
 
double getMaximalDistance (const JDetector &detector, const bool option=false)
 Get maximal distance between modules in detector.
 
double getMaximalTime (const JDetector &detector)
 Get maximal time between optical modules in detector following causality.
 
double getMaximalTime (const JDetector &detector, const double roadWidth_m)
 Get maximal time between optical modules in detector following causality.
 
JTimeRange getTimeRange (const JTimeRange &timeRange, const JModule &module)
 Get de-calibrated time range.
 
int getNumberOfPMTs (const JModule &module)
 Get number of PMTs.
 
int getNumberOfPMTs (const JDetector &detector)
 Get number of PMTs.
 
std::set< int > getStringIDs (const JDetector &detector)
 Get list of strings identifiers.
 
std::set< int > getModuleIDs (const JDetector &detector, const bool option=false)
 Get list of modules identifiers.
 
int getNumberOfFloors (const JDetector &detector)
 Get number of floors.
 
floor_range getRangeOfFloors (const JDetector &detector)
 Get range of floors.
 
int getNumberOfModules (const JDetector &detector, const bool option=false)
 Get number of modules.
 
double GetXrotationG4 (const JVersor3D &dir)
 Get rotation over X axis in Geant4 coordinate system.
 
double GetYrotationG4 (const JVersor3D &dir)
 Get rotation over Y axis in Geant4 coordinate system.
 
void read_gdml (std::istream &, JDetector &)
 
void write_gdml (std::ostream &out, const JDetector &detector)
 Writes KM3Sim GDML input file from detector.
 
void load (const std::string &file_name, JDetector &detector)
 Load detector from input file.
 
void store (const std::string &file_name, const JDetector &detector)
 Store detector to output file.
 
JPosition3D getPosition (const JModule &first, const JModule &second)
 Get position to go from first to second module.
 
JCalibration getCalibration (const JCalibration &first, const JCalibration &second)
 Get calibration to go from first to second calibration.
 
std::vector< std::string > getDetectorVersions (const JType< std::string > &type)
 Get detector versions.
 
std::vector< JDetectorVersion::JVersion_tgetDetectorVersions (const JType< JDetectorVersion::JVersion_t > &type)
 Get detector versions.
 
template<class T >
std::vector< T > getDetectorVersions ()
 Get detector versions.
 
std::string getLatestDetectorVersion (const JType< std::string > &type)
 Get latest detector version.
 
JVersion getLatestDetectorVersion (const JType< JVersion > &type)
 Get latest detector version.
 
JDetectorVersion::JVersion_t getLatestDetectorVersion (const JType< JDetectorVersion::JVersion_t > &type)
 Get latest detector version.
 
template<class T >
getLatestDetectorVersion ()
 Get latest detector version.
 
std::string getLabel (const JLocation &location)
 Get module label for monitoring and other applications.
 
template<class JAttributes_t >
void setAttributes (const JModule &first, const JModule &second, JAttributes_t &attributes)
 Template method to set module attributes.
 
template<>
void setAttributes< JNullType > (const JModule &first, const JModule &second, JNullType &attributes)
 Template specialisation to set no attributes for the default empty object.
 
std::vector< std::string > getModuleStatusBits (const JType< std::string > &type)
 Get module status bits.
 
std::vector< int > getModuleStatusBits (const JType< int > &type)
 Get module status bits.
 
template<class T >
std::vector< T > getModuleStatusBits ()
 Get module status bits.
 
JPosition3D getPiezoPosition ()
 Get relative position of piezo in optical module.
 
double getTimeOverThresholdProbability (const JPMTAnalogueSignalProcessor &pmt, const double tot_ns, const double NPE, const double precision=1.0e-4)
 Get time-over-threshold probability.
 
std::string getLabel (const JPMTIdentifier &id)
 Get PMT label for monitoring and other applications.
 
double getSurvivalProbability (const JPMTParameters &parameters)
 Get model dependent probability that a one photo-electron hit survives the simulation of the PMT assuming QE = 1.
 
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.
 
double getMaximalHitProbability (const double mu)
 Get maximal ratio of hit probabilities for given QE and expectation value of the number of photo-electrons.
 
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.
 
double getChargeProbability (const JPMTSignalProcessorInterface &pmt, const double npe, const double NPE, const double precision=1.0e-4)
 Get charge probability.
 
bool operator< (const JPhotoElectron &first, const JPhotoElectron &second)
 Less than operator for photo-elecrons.
 
bool operator< (const JPMTSignal &first, const JPMTSignal &second)
 Less than operator for PMT signals.
 
bool operator< (const JPMTPulse &first, const JPMTPulse &second)
 Less than operator for PMT pulses.
 
template<class T >
JTimeRange getTimeRange (const JPMTData< T > &input)
 Get time range (i.e. earliest and latest hit time) of PMT data.
 
JTimeRange getTimeRange (const JModuleData &input)
 Get time range (i.e. earlist and latest hit time) of module data.
 
std::vector< std::string > getPMTStatusBits (const JType< std::string > &type)
 Get PMT status bits.
 
std::vector< int > getPMTStatusBits (const JType< int > &type)
 Get PMT status bits.
 
template<class T >
std::vector< T > getPMTStatusBits ()
 Get PMT status bits.
 

Variables

const double TIME_OVER_THRESHOLD_NS = 25.08
 Specification for time-over-threshold corresponding to a one photo-electron pulse.
 
const double NOMINAL_GAIN = 1.0
 Specification for normalized gain corresponding to a one photo-electron pulse.
 
static const double ORCA_TBARZ_M = 0.91
 ORCA T-bar position relative to seabed [m].
 
static const double ARCA_TBARZ_M = 0.95
 ORCA T-bar position relative to seabed [m].
 
static const char *const GENDET_DETECTOR_FILE_FORMAT = "det"
 File name extensions.
 
static const char *const BINARY_DETECTOR_FILE_FORMAT [] = { "dat", "datx" }
 JIO binary file format.
 
static const char *const KM3NET_DETECTOR_FILE_FORMAT = "detx"
 KM3NeT standard ASCII format
 
static const char *const ZIPPED_DETECTOR_FILE_FORMAT = "gz"
 zipped KM3NeT standard ASCII format
 
static const char *const GDML_DETECTOR_FILE_FORMAT = "gdml"
 KM3Sim input format.
 
static const char *const GDML_SCHEMA = getenv("GDML_SCHEMA_DIR")
 directory necessary for correct GDML header output
 
static const char *const CAN_MARGIN_M = getenv("CAN_MARGIN_M")
 extension of the detector size to comply with the can definition
 
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.
 
static const JGetDetectorVersion getDetectorVersion
 Function object to map detector version to numerical value.
 
static const JPutDetectorVersion putDetectorVersion (getDetectorVersion)
 Function object to map numerical value to detector version.
 
static const JGetModuleStatusBit getModuleStatusBit
 Function object to map key to module status bit.
 
static const JPutModuleStatusBit putModuleStatusBit (getModuleStatusBit)
 Function object to map module status bit to key.
 
static const double PIEZO_V1_DELAYTIME_US = 170.3
 Piezo delay time [us].
 
static const double PIEZO_V2_DELAYTIME_US = 242.1
 Piezo delay time [us].
 
static const double PIEZO_V3_DELAYTIME_US = 242.1
 Piezo delay time [us].
 
static const double HYDROPHONE_DELAYTIME_US = 50.7
 Hydrophone delay time [us].
 
static const int LED_BEACON_PMT_TYPE = 2
 PMT type of LED beacon.
 
static const JGetPMTStatusBit getPMTStatusBit
 Function object to map key to PMT status bit.
 
static const JPutPMTStatusBit putPMTStatusBit (getPMTStatusBit)
 Function object to map PMT status bit to key.
 
JDETECTOR::getTransitionTime getTransitionTime
 Function object to generate transition time.
 
JDETECTOR::getTransitionTimeProbability getTransitionTimeProbability
 Function object of transition time prabability.
 
static const JTransitionTimeProbability2D getTransitionTimeProbability2D
 Function object of twofold transition time prabability.
 
static const JStringCounter getNumberOfStrings
 Function object to count unique strings.
 

Detailed Description

file Auxiliary data structures and methods for detector calibration.

Auxiliary classes and methods for detector calibration and simulation.

Auxiliary classes and methods for detector calibration.

Author
mdejong
mdejong, bjung, acreusot

Typedef Documentation

◆ JPMTOutput

Type definition of PMT base output.

Definition at line 27 of file JCLBSimulator.hh.

◆ JHVCalibration

PMT high voltage calibration.

Definition at line 809 of file JDetectorCalibration.hh.

◆ JPMTThresholdCalibration

PMT threshold calibration.

Definition at line 810 of file JDetectorCalibration.hh.

◆ JModuleMap

module map

Definition at line 811 of file JDetectorCalibration.hh.

◆ JPMTCalibration

PMT time calibration.

Definition at line 812 of file JDetectorCalibration.hh.

◆ JPMTStatus

PMT status.

Definition at line 813 of file JDetectorCalibration.hh.

◆ JModulePosition

Module position.

Definition at line 814 of file JDetectorCalibration.hh.

◆ JModuleRotation

Module rotation.

Definition at line 815 of file JDetectorCalibration.hh.

◆ JModuleStatus

Module status.

Definition at line 816 of file JDetectorCalibration.hh.

◆ JModuleCalibration

Module time calibration.

Definition at line 817 of file JDetectorCalibration.hh.

◆ JCompassRotation

Compass rotation.

Definition at line 818 of file JDetectorCalibration.hh.

◆ JDetectorID

Type definition of detector identifier.

Definition at line 19 of file JDetectorID.hh.

◆ JDetectorTypes_t

Type list of KM3NeT detector types (specific detectors first).

Definition at line 54 of file JDetectorSupportkit.hh.

◆ floor_range

Type definition for range of floors.

Definition at line 258 of file JDetectorToolkit.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

◆ JPutModuleStatusBit

Type definition to map module status bit to key.

Definition at line 58 of file JModuleStatus.hh.

◆ JPMTParametersMap_t

Type definition of map PMT identifier to PMT parameters.

Definition at line 47 of file JPMTParametersMap.hh.

◆ JPutPMTStatusBit

Type definition to map PMT status bit to key.

Definition at line 59 of file JPMTStatus.hh.

◆ JTimeRange

Type definition for time range (unit [ns]).

Definition at line 19 of file JDetector/JTimeRange.hh.

Function Documentation

◆ operator<() [1/4]

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 }
double getLengthSquared() const
Get length squared.
Definition JVector2D.hh:188

◆ 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 222 of file JDetector/JCalibration.hh.

223 {
224 return JCalibrator<T>::getTime(t1, cal);
225 }
Auxiliary class to apply (de-)calibration to template hit.

◆ 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 236 of file JDetector/JCalibration.hh.

237 {
238 return JCalibrator<T>::putTime(t1, cal);
239 }

◆ 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 250 of file JDetector/JCalibration.hh.

251 {
252 return JCalibrator<T>::getToT(tot, cal);
253 }

◆ 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 264 of file JDetector/JCalibration.hh.

265 {
266 return JCalibrator<T>::putToT(tot, cal);
267 }

◆ get_string_array()

template<class T >
std::vector< std::string > JDETECTOR::get_string_array ( T value)
inline

Cast single value to array of strings, conform the DB-format.

Parameters
valuevalue
Returns
std::vector containing value casted to string

Definition at line 62 of file JDetectorCalibration.hh.

63 {
64 using namespace std;
65
66 return vector<string>{ to_string(value) };
67 }

◆ retrieve_value()

double JDETECTOR::retrieve_value ( std::vector< std::string > string_value_array)
inline

Retrieve value from json array of strings.

Parameters
string_value_arrayarray of string-casted values
Returns
double-casted value

Definition at line 76 of file JDetectorCalibration.hh.

77 {
78 return std::stod(string_value_array[0]);
79 }

◆ getARCAUTMGrid()

JUTMGrid JDETECTOR::getARCAUTMGrid ( )
inline

Get UTM grid for ARCA.

Returns
UTM grid

Definition at line 252 of file JDetectorHeader.hh.

253 {
254 return JUTMGrid("UTM", "WGS84", "33N");
255 }
Data structure for UTM grid.
Definition JUTMGrid.hh:39

◆ getORCAUTMGrid()

JUTMGrid JDETECTOR::getORCAUTMGrid ( )
inline

Get UTM grid for ORCA.

Returns
UTM grid

Definition at line 263 of file JDetectorHeader.hh.

264 {
265 return JUTMGrid("UTM", "WGS84", "32N");
266 }

◆ getARCADetectorHeader()

JDetectorHeader JDETECTOR::getARCADetectorHeader ( )
inline

Get detector header for ARCA.

Returns
detector header

Definition at line 274 of file JDetectorHeader.hh.

275 {
276 return JDetectorHeader(JUTCTimeRange(0.0, 999999999999.9), getARCAUTMGrid(), JUTMPosition(587600, 4016800, -3450));
277 }
Data structure for detector header.
UTC time range [s].
Data structure for UTM position.
JUTMGrid getARCAUTMGrid()
Get UTM grid for ARCA.

◆ getORCADetectorHeader()

JDetectorHeader JDETECTOR::getORCADetectorHeader ( )
inline

Get detector header for ORCA.

Returns
detector header

Definition at line 285 of file JDetectorHeader.hh.

286 {
287 return JDetectorHeader(JUTCTimeRange(0.0, 999999999999.9), getORCAUTMGrid(), JUTMPosition(256500, 4743000, -2440));
288 }
JUTMGrid getORCAUTMGrid()
Get UTM grid for ORCA.

◆ isARCADetector()

bool JDETECTOR::isARCADetector ( const JDetectorHeader & header)
inline

Check if given detector header is compatible with tat of ARCA.

Parameters
headerheader
Returns
true if ARCA; else false

Definition at line 297 of file JDetectorHeader.hh.

298 {
299 return header.getUTMGrid() == getARCADetectorHeader();
300 }
const JUTMGrid & getUTMGrid() const
Get UTM grid.
Definition JUTMGrid.hh:73
JDetectorHeader getARCADetectorHeader()
Get detector header for ARCA.

◆ isORCADetector()

bool JDETECTOR::isORCADetector ( const JDetectorHeader & header)
inline

Check if given detector header is compatible with that of ORCA.

Parameters
headerheader
Returns
true if ORCA; else false

Definition at line 309 of file JDetectorHeader.hh.

310 {
311 return header.getUTMGrid() == getORCADetectorHeader();
312 }
JDetectorHeader getORCADetectorHeader()
Get detector header for ORCA.

◆ hasDetector() [1/4]

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

Check validity of detector identifier.

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

Definition at line 64 of file JDetectorSupportkit.hh.

64{ return id == 1; }

◆ hasDetector() [2/4]

bool JDETECTOR::hasDetector ( JType< JKM3NeTFit_t > type,
const int id )
inline

Definition at line 65 of file JDetectorSupportkit.hh.

65{ return id >= 2 && id <= 2000000000; }

◆ hasDetector() [3/4]

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

Definition at line 66 of file JDetectorSupportkit.hh.

66{ return id >= 2 && id <= 2000000000; }

◆ hasDetector() [4/4]

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

Definition at line 67 of file JDetectorSupportkit.hh.

67{ return id >= -2000000000 && id <= -2; }

◆ getDetectorBuilder() [1/2]

template<class JDetector_t >
JDetectorBuilder & JDETECTOR::getDetectorBuilder ( )
inline

Get detector builder.

Returns
detector builder

Definition at line 528 of file JDetectorSupportkit.hh.

529 {
531
532 return demo;
533 }
Template lookup table for detector builder.

◆ getDetectorAddressMap() [1/2]

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

Get detector address map.

Returns
detector address map

Definition at line 542 of file JDetectorSupportkit.hh.

543 {
544 return getDetectorBuilder<JDetector_t>();
545 }

◆ 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 555 of file JDetectorSupportkit.hh.

556 {
557 return getDetectorAddressMap<JDetector_t>().get(id);
558 }

◆ 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 569 of file JDetectorSupportkit.hh.

570 {
571 return getModuleAddressMap<JDetector_t>(id).getAddressTranslator(tdc);
572 }

◆ 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 583 of file JDetectorSupportkit.hh.

584 {
585 return getModuleAddressMap<JDetector_t>(id).getIndex(tdc);
586 }

◆ getDetectorBuilder() [2/2]

JDetectorBuilder & JDETECTOR::getDetectorBuilder ( const int id)
inline

Get detector builder.

Parameters
iddetector identifier
Returns
detector builder

Definition at line 664 of file JDetectorSupportkit.hh.

665 {
667 }
Auxiliary class to extract detector address map from detector identifier.

◆ getDetectorAddressMap() [2/2]

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

Get detector address map.

Parameters
iddetector identifier
Returns
detector address map

Definition at line 676 of file JDetectorSupportkit.hh.

677 {
679 }

◆ hasDetectorBuilder()

bool JDETECTOR::hasDetectorBuilder ( const int id)
inline

Check if detector builder is available.

Parameters
iddetector identifier
Returns
true if detector builder available; else false

Definition at line 688 of file JDetectorSupportkit.hh.

689 {
691 }

◆ 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 700 of file JDetectorSupportkit.hh.

701 {
703 }

◆ getModule() [1/3]

template<class JDetector_t >
const JModule & JDETECTOR::getModule ( const JType< JDetector_t > type,
const int id,
const JLocation & location = JLocation() )
inline

Get module according given detector type.

Parameters
typedetector type
idmodule identifier
locationmodule location
Returns
module

Definition at line 715 of file JDetectorSupportkit.hh.

718 {
719 return getDetectorBuilder<JDetector_t>().getModule(id, location);
720 }

◆ getModule() [2/3]

const JModule & JDETECTOR::getModule ( const JType< JAntares_t > type,
const int id,
const JLocation & location = JLocation() )
inline

Get module according Antares detector type.

Parameters
typeAntares detector type
idmodule identifier
locationmodule location
Returns
module

Definition at line 731 of file JDetectorSupportkit.hh.

734 {
735 using namespace JPP;
736
737 static JModule module;
738
739 module.setID(id);
740
741 module.setLocation(location);
742
743 if (module.empty()) {
744
745 module.resize(3);
746
747 const double R = 0.5; // [m]
748
749 const double st = sin(0.75*PI);
750 const double ct = cos(0.75*PI);
751
752 for (int i = 0; i != 3; ++i) {
753
754 const double phi = (2.0*PI*i) / 3.0;
755 const double cp = cos(phi);
756 const double sp = sin(phi);
757
758 module[i] = JPMT(i, JAxis3D(JVector3D(R*st*cp, R*st*sp, R*ct), JVersor3D(st*cp, st*sp, ct)));
759 }
760 }
761
762 return module;
763 }
Data structure for a composite optical module.
Definition JModule.hh:75
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).

◆ getModule() [3/3]

template<class JDetector_t >
const JModule & JDETECTOR::getModule ( const int id,
const JLocation & location = JLocation() )
inline

Get module according detector template.

Parameters
idmodule identifier
locationmodule location
Returns
module

Definition at line 774 of file JDetectorSupportkit.hh.

776 {
777 return getModule(JType<JDetector_t>(), id, location);
778 }
const JModule & getModule(const JType< JDetector_t > type, const int id, const JLocation &location=JLocation())
Get module according given detector type.
Auxiliary class for a type holder.
Definition JType.hh:19

◆ getMaximalDistance()

double JDETECTOR::getMaximalDistance ( const JDetector & detector,
const bool option = false )
inline

Get maximal distance between modules in detector.

The option can be used to include base modules, if any.

Parameters
detectordetector
optionoption
Returns
maximal distance [m]

Definition at line 78 of file JDetectorToolkit.hh.

79 {
80 using namespace JPP;
81
82 double dmax = 0.0;
83
84 for (JDetector::const_iterator i1 = detector.begin(); i1 != detector.end(); ++i1) {
85 for (JDetector::const_iterator i2 = detector.begin(); i2 != i1; ++i2) {
86
87 if (option || (i1->getFloor() != 0 && i2->getFloor() != 0)) {
88
89 const double ds = getDistance(i1->getPosition(), i2->getPosition());
90
91 if (ds > dmax) {
92 dmax = ds;
93 }
94 }
95 }
96 }
97
98 return dmax;
99 }
Detector file.
Definition JHead.hh:227

◆ getMaximalTime() [1/2]

double JDETECTOR::getMaximalTime ( const JDetector & detector)
inline

Get maximal time between optical modules in detector following causality.

Parameters
detectordetector
Returns
maximal time [ns]

Definition at line 108 of file JDetectorToolkit.hh.

109 {
110 using namespace JPP;
111
112 return getMaximalDistance(detector) * getIndexOfRefraction() * getInverseSpeedOfLight();
113 }
double getMaximalDistance(const JDetector &detector, const bool option=false)
Get maximal distance between modules in detector.

◆ getMaximalTime() [2/2]

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

Get maximal time between optical 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 124 of file JDetectorToolkit.hh.

125 {
126 using namespace JPP;
127
128 const double Dmax_m = getMaximalDistance(detector);
129
130 return (sqrt((Dmax_m + roadWidth_m*getSinThetaC()) *
131 (Dmax_m - roadWidth_m*getSinThetaC())) +
132 roadWidth_m * getSinThetaC() * getTanThetaC()) * getInverseSpeedOfLight();
133 }

◆ getTimeRange() [1/3]

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

146 {
147 if (!module.empty()) {
148
149 JTimeRange time_range(JTimeRange::DEFAULT_RANGE());
150
151 for (JModule::const_iterator pmt = module.begin(); pmt != module.end(); ++pmt) {
152
153 const JCalibration& calibration = pmt->getCalibration();
154
155 time_range.include(putTime(timeRange.getLowerLimit(), calibration));
156 time_range.include(putTime(timeRange.getUpperLimit(), calibration));
157 }
158
159 return time_range;
160
161 } else {
162
163 return timeRange;
164 }
165 }
Data structure for time calibration.
const JCalibration & getCalibration() const
Get calibration.
T getLowerLimit() const
Get lower limit.
Definition JRange.hh:202
T getUpperLimit() const
Get upper limit.
Definition JRange.hh:213

◆ getNumberOfPMTs() [1/2]

int JDETECTOR::getNumberOfPMTs ( const JModule & module)
inline

Get number of PMTs.

Parameters
modulemodule
Returns
number of PMTs

Definition at line 174 of file JDetectorToolkit.hh.

175 {
176 return module.size();
177 }

◆ getNumberOfPMTs() [2/2]

int JDETECTOR::getNumberOfPMTs ( const JDetector & detector)
inline

Get number of PMTs.

Parameters
detectordetector
Returns
number of PMTs

Definition at line 186 of file JDetectorToolkit.hh.

187 {
188 int number_of_pmts = 0;
189
190 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
191 number_of_pmts += getNumberOfPMTs(*module);
192 }
193
194 return number_of_pmts;
195 }
int getNumberOfPMTs(const JModule &module)
Get number of PMTs.

◆ getStringIDs()

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

Get list of strings identifiers.

Parameters
detectordetector
Returns
list of string identifiers

Definition at line 204 of file JDetectorToolkit.hh.

205 {
206 std::set<int> buffer;
207
208 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
209 buffer.insert(module->getString());
210 }
211
212 return buffer;
213 }

◆ getModuleIDs()

std::set< int > JDETECTOR::getModuleIDs ( const JDetector & detector,
const bool option = false )
inline

Get list of modules identifiers.

Parameters
detectordetector
optionoption to include base modules
Returns
list of module identifiers

Definition at line 223 of file JDetectorToolkit.hh.

224 {
225 std::set<int> buffer;
226
227 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
228 if (option || !module->empty()) {
229 buffer.insert(module->getID());
230 }
231 }
232
233 return buffer;
234 }

◆ getNumberOfFloors()

int JDETECTOR::getNumberOfFloors ( const JDetector & detector)
inline

Get number of floors.

Parameters
detectordetector
Returns
number of floors

Definition at line 243 of file JDetectorToolkit.hh.

244 {
245 std::set<int> buffer;
246
247 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
248 buffer.insert(module->getFloor());
249 }
250
251 return buffer.size();
252 }

◆ getRangeOfFloors()

floor_range JDETECTOR::getRangeOfFloors ( const JDetector & detector)
inline

Get range of floors.

Parameters
detectordetector
Returns
range of floors

Definition at line 267 of file JDetectorToolkit.hh.

268 {
269 floor_range buffer = floor_range::DEFAULT_RANGE();
270
271 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
272 buffer.include(module->getFloor());
273 }
274
275 return buffer;
276 }
range_type & include(argument_type x)
Include given value to range.
Definition JRange.hh:397

◆ getNumberOfModules()

int JDETECTOR::getNumberOfModules ( const JDetector & detector,
const bool option = false )
inline

Get number of modules.

Parameters
detectordetector
optionoption to include base modules
Returns
number of modules

Definition at line 286 of file JDetectorToolkit.hh.

287 {
288 std::set<int> buffer;
289
290 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
291 if (option || !module->empty()) {
292 buffer.insert(module->getID());
293 }
294 }
295
296 return buffer.size();
297 }

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

307 {
308 using namespace JPP;
309
310 const double phi = atan2(dir.getDY(), dir.getDZ())*(180.0/PI);
311
312 if (phi < 0.0){
313 return phi + 360.0;
314 }
315 else{
316 return phi;
317 }
318 }
double getDY() const
Get y direction.
Definition JVersor3D.hh:106
double getDZ() const
Get z direction.
Definition JVersor3D.hh:117

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

328 {
329 using namespace JPP;
330
331 return asin(-dir.getDX())*(180.0/PI);
332 }
double getDX() const
Get x direction.
Definition JVersor3D.hh:95

◆ read_gdml()

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

Definition at line 335 of file JDetectorToolkit.hh.

336 {
337 THROW(JException, "Operation not defined.");
338 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
General exception.
Definition JException.hh:24

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

348 {
349 using namespace std;
350 using namespace JPP;
351
352 const double DEFAULT_CAN_MARGIN_M = 350.0; // default can margin [m]
353 const double DEFAULT_WORLD_MARGIN_M = 50.0; // default world margin [m]
354
355 const JCylinder3D cylinder(detector.begin(), detector.end());
356
357 double can_margin;
358
359 if (CAN_MARGIN_M) {
360 can_margin = atof(CAN_MARGIN_M);
361 } else {
362 cerr << "CAN_MARGIN_M not defined! Setting standard CAN_MARGIN_M " << DEFAULT_CAN_MARGIN_M << " m." << endl;
363 can_margin = DEFAULT_CAN_MARGIN_M; //this is given in meters like all the dimensions in the GDML file (look at the unit field of every position and solid definition)
364 }
365
366 const double WorldCylinderHeight = 2*(cylinder.getZmax() - cylinder.getZmin() + can_margin + DEFAULT_WORLD_MARGIN_M);
367 const double WorldRadius = cylinder.getLength() + cylinder.getRadius() + can_margin + DEFAULT_WORLD_MARGIN_M;
368
369 const double Crust_Z_size = WorldCylinderHeight/2;
370 const double Crust_Z_position = -WorldCylinderHeight/4;
371
372 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=\"";
373 if (!GDML_SCHEMA) {
374 cerr << "GDML_SCHEMA_DIR NOT DEFINED! Setting default path." << endl;
375 out << G4GDML_DEFAULT_SCHEMALOCATION << "\">\n\n\n";
376 } else {
377 out << GDML_SCHEMA << "gdml.xsd\">\n\n\n";
378 }
379 out << "<!-- Jpp version: "<< getGITVersion() << " -->\n";
380 out << "<define>\n";
381 out << "<rotation name=\"identity\"/>\n<position name=\"zero\"/>\n";
382
383 int PMTs_NO = 0;
384
385 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
386
387 if(module->empty()) continue;
388
389 const JVector3D center = module->getCenter();
390
391 out << "<position name=\"PosString" << module->getString() << "_Dom" << module->getID() << "\" unit=\"m\" x=\"" << module->getX() << "\" y=\"" << module->getY() << "\" z=\"" << module->getZ() << "\"/>\n";
392
393 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
394
395 const JVector3D vec = static_cast<JVector3D>(*pmt).sub(center);
396 out << "<position name=\"CathodPosition" << pmt->getID() << "_" << module->getID() << "\" unit=\"m\" x=\"" << vec.getX() << "\" y=\"" << vec.getY() << "\" z=\"" << vec.getZ() << "\"/>\n";
397 out << "<rotation name=\"CathodRotation" << pmt->getID() << "_" << module->getID() << "\" unit=\"deg\" x=\"" << GetXrotationG4(*pmt) << "\" y=\"" << GetYrotationG4(*pmt) << "\" z=\"0.000000\"/>\n";
398 out << "<constant name=\"CathodID_" << PMTs_NO << "\" value=\"" << pmt->getID() << "\"/>\n";
399 PMTs_NO++;
400 }
401
402 }
403
404 out << "<position name=\"OMShift\" unit=\"m\" x=\"0\" y=\"0\" z=\"0.0392\"/>\n";
405 out << "\n\n\n";
406 out << "<!-- end of DU position definitions -->\n<position name=\"CrustPosition\" unit=\"m\" x=\"0\" y=\"0\" z=\"" << Crust_Z_position << "\"/>\n";
407
408 out << "</define>\n";
409 out << "<materials>\n";
410 out << "</materials>\n";
411 out << "<solids>\n";
412 out << " <box name=\"CrustBox\" lunit=\"m\" x=\"2200\" y=\"2200\" z=\"" << Crust_Z_size << "\"/>\n";
413 out << " <box name=\"StoreyBox\" lunit=\"m\" x=\"0.6\" y=\"0.6\" z=\"0.6\"/>\n";
414 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";
415 out << " <tube name=\"CathodTube\" lunit=\"cm\" aunit=\"deg\" rmin=\"0.0\" rmax=\"4.7462\" z=\"0.5\" startphi=\"0.0\" deltaphi=\"360.0\"/>\n";
416 out << " <tube name=\"WorldTube\" lunit=\"m\" aunit=\"deg\" rmin=\"0.0\" rmax=\"" << WorldRadius << "\" z=\"" << WorldCylinderHeight << "\" startphi=\"0.0\" deltaphi=\"360.0\"/>\n";
417 out << "</solids>\n\n\n";
418
419 out << "<structure>\n";
420 out << " <volume name=\"CathodVolume\">\n";
421 out << " <materialref ref=\"Cathod\"/>\n";
422 out << " <solidref ref=\"CathodTube\"/>\n";
423 out << " </volume>\n";
424
425 out << "<!-- OMVolume(s) construction -->\n";
426
427 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
428
429 if(module->empty()) continue;
430 out << " <volume name=\"OMVolume" << module->getID() << "\">\n";
431 out << " <materialref ref=\"Water\"/>\n";
432 out << " <solidref ref=\"OMSphere\"/>\n";
433
434 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
435 out << " <physvol>\n";
436 out << " <volumeref ref=\"CathodVolume\"/>\n";
437 out << " <positionref ref=\"CathodPosition" << pmt->getID() << "_" << module->getID() << "\"/>\n";
438 out << " <rotationref ref=\"CathodRotation" << pmt->getID() << "_" << module->getID() << "\"/>\n";
439 out << " </physvol>\n";
440 }
441
442 out << " </volume>\n";
443 }
444
445 out << "<!-- StoreyVolume(s) construction -->\n";
446
447 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
448 if(module->empty()) continue;
449 out << " <volume name=\"StoreyVolume" << module->getID() << "\">\n";
450 out << " <materialref ref=\"Water\"/>\n";
451 out << " <solidref ref=\"StoreyBox\"/>\n";
452 out << " <physvol>\n";
453 out << " <volumeref ref=\"OMVolume" << module->getID() << "\"/>\n";
454 out << " <positionref ref=\"OMShift\"/>\n";
455 out << " <rotationref ref=\"identity\"/>\n";
456 out << " </physvol>\n";
457 out << " </volume>\n";
458 }
459
460 out << "<!-- Crust Volume construction-->\n";
461 out << "<volume name=\"CrustVolume\">\n";
462 out << " <materialref ref=\"Crust\"/>\n";
463 out << " <solidref ref=\"CrustBox\"/>\n";
464 out << "</volume>\n";
465
466 out << "<!-- World Volume construction-->\n";
467 out << "<volume name=\"WorldVolume\">\n";
468 out << " <materialref ref=\"Water\"/>\n";
469 out << " <solidref ref=\"WorldTube\"/>\n";
470
471 out << " <physvol>\n";
472 out << " <volumeref ref=\"CrustVolume\"/>\n";
473 out << " <positionref ref=\"CrustPosition\"/>\n";
474 out << " <rotationref ref=\"identity\"/>\n";
475 out << " </physvol>\n";
476
477 for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
478 if(module->empty()) continue;
479 out << " <physvol>\n";
480 out << " <volumeref ref=\"StoreyVolume" << module->getID() << "\"/>\n";
481 out << " <positionref ref=\"PosString" << module->getString() << "_Dom" << module->getID() << "\"/>\n";
482 out << " <rotationref ref=\"identity\"/>\n";
483 out << " </physvol>\n";
484 }
485
486 out << "</volume>\n";
487
488 out << "</structure>\n";
489 out << "<setup name=\"Default\" version=\"1.0\">\n";
490 out << "<world ref=\"WorldVolume\"/>\n";
491 out << "</setup>\n";
492 out << "</gdml>\n";
493 }
Data structure for vector in three dimensions.
Definition JVector3D.hh:36
JVector3D & sub(const JVector3D &vector)
Subtract vector.
Definition JVector3D.hh:158
static const char *const G4GDML_DEFAULT_SCHEMALOCATION
static const char *const GDML_SCHEMA
directory necessary for correct GDML header output
std::string getGITVersion(const std::string &tag)
Get GIT version for given GIT tag.

◆ load()

void JDETECTOR::load ( const std::string & file_name,
JDetector & detector )
inline

Load detector from input file.

Supported file formats:

Parameters
file_namefile name
detectordetector

Definition at line 508 of file JDetectorToolkit.hh.

509 {
510 using namespace std;
511 using namespace JPP;
512
513 if (getFilenameExtension(file_name) == GENDET_DETECTOR_FILE_FORMAT) {
514
515 JMonteCarloDetector buffer(true);
516
517 ifstream in(file_name.c_str());
518
519 if (!in) {
520 THROW(JFileOpenException, "File not opened for reading: " << file_name);
521 }
522
523 in >> buffer;
524
525 in.close();
526
527 detector.swap(buffer);
528
529 } else if (getFilenameExtension(file_name) == BINARY_DETECTOR_FILE_FORMAT[0] ||
530 getFilenameExtension(file_name) == BINARY_DETECTOR_FILE_FORMAT[1]) {
531
532 JFileStreamReader in(file_name.c_str());
533
534 if (!in) {
535 THROW(JFileOpenException, "File not opened for reading: " << file_name);
536 }
537
538 try {
539
540 detector.read(in);
541
542 } catch(const exception& error) {
543
544 // recovery procedure for old format of comments
545
546 JDetector::setStartOfComment(JDetector::OLD_START_OF_COMMENT);
547
548 in.clear();
549 in.rewind();
550
551 detector.read(in);
552
553 JDetector::setStartOfComment(JDetector::NEW_START_OF_COMMENT);
554 }
555
556 in.close();
557
558 } else if (getFilenameExtension(file_name) == KM3NET_DETECTOR_FILE_FORMAT) {
559
560 ifstream in(file_name.c_str());
561
562 if (!in) {
563 THROW(JFileOpenException, "File not opened for reading: " << file_name);
564 }
565
566 in >> detector;
567
568 in.close();
569
570 } else if (getFilenameExtension(file_name) == ZIPPED_DETECTOR_FILE_FORMAT) {
571
572 igzstream in(file_name.c_str());
573
574 if (!in) {
575 THROW(JFileOpenException, "File not opened for reading: " << file_name);
576 }
577
578 in >> detector;
579
580 in.close();
581
582 } else {
583
584 THROW(JProtocolException, "Protocol not defined: " << file_name);
585 }
586
587 if (!detector.hasVersion()) {
588 THROW(JValueOutOfRange, "Invalid version <" << detector.getVersion() << ">");
589 }
590 }
Monte Carlo detector (i.e. ".det" file).
Binary buffered file input.
Exception for opening of file.
Protocol exception.
Exception for accessing a value in a collection that is outside of its range.

◆ store()

void JDETECTOR::store ( const std::string & file_name,
const JDetector & detector )
inline

Store detector to output file.

Supported file formats:

Parameters
file_namefile name
detectordetector

Definition at line 605 of file JDetectorToolkit.hh.

606 {
607 using namespace std;
608 using namespace JPP;
609
610 if (getFilenameExtension(file_name) == BINARY_DETECTOR_FILE_FORMAT[1]) {
611
612 JFileStreamWriter out(file_name.c_str());
613
614 if (!out) {
615 THROW(JFileOpenException, "File not opened for writing: " << file_name);
616 }
617
618 detector.write(out);
619
620 out.close();
621
622 } else if (getFilenameExtension(file_name) == KM3NET_DETECTOR_FILE_FORMAT) {
623
624 std::ofstream out(file_name.c_str());
625
626 if (!out) {
627 THROW(JFileOpenException, "File not opened for writing: " << file_name);
628 }
629
630 out << detector;
631
632 out.close();
633
634 } else if (getFilenameExtension(file_name) == ZIPPED_DETECTOR_FILE_FORMAT) {
635
636 ogzstream out(file_name.c_str());
637
638 if (!out) {
639 THROW(JFileOpenException, "File not opened for writing: " << file_name);
640 }
641
642 out << detector;
643
644 out.close();
645
646 } else if (getFilenameExtension(file_name) == GDML_DETECTOR_FILE_FORMAT) {
647
648 std::ofstream out(file_name.c_str());
649
650 if (!out) {
651 THROW(JFileOpenException, "File not opened for writing: " << file_name);
652 }
653
654 write_gdml(out, detector);
655
656 out.close();
657
658 } else {
659
660 THROW(JProtocolException, "Protocol not defined: " << file_name);
661 }
662 }
Binary buffered file output.
void write_gdml(std::ostream &out, const JDetector &detector)
Writes KM3Sim GDML input file from detector.

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

800 {
801 return second.getPosition() - first.getPosition();
802 }
const JPosition3D & getPosition() const
Get position.

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

813 {
814 return JCalibration(second.getT0() - first.getT0());
815 }
double getT0() const
Get time offset.

◆ 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 328 of file JDetectorVersion.hh.

329 {
330 return JLANG::make_array(putDetectorVersion.rbegin(), putDetectorVersion.rend(), &JPutDetectorVersion::value_type::second);
331 }
static const JPutDetectorVersion putDetectorVersion(getDetectorVersion)
Function object to map numerical value to detector version.
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
Definition JVectorize.hh:54

◆ 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
numerical values

Definition at line 342 of file JDetectorVersion.hh.

343 {
344 return JLANG::make_array(putDetectorVersion.rbegin(), putDetectorVersion.rend(), &JPutDetectorVersion::value_type::first);
345 }

◆ getDetectorVersions() [3/3]

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

Get detector versions.

Returns
versions

Definition at line 354 of file JDetectorVersion.hh.

355 {
357 }
std::vector< std::string > getDetectorVersions(const JType< std::string > &type)
Get detector versions.

◆ getLatestDetectorVersion() [1/4]

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

Get latest detector version.

Parameters
typetype
Returns
version

Definition at line 366 of file JDetectorVersion.hh.

367 {
368 return putDetectorVersion.rbegin()->second;
369 }

◆ getLatestDetectorVersion() [2/4]

JVersion JDETECTOR::getLatestDetectorVersion ( const JType< JVersion > & type)
inline

Get latest detector version.

Parameters
typetype
Returns
version

Definition at line 378 of file JDetectorVersion.hh.

379 {
380 return putDetectorVersion.rbegin()->second;
381 }

◆ getLatestDetectorVersion() [3/4]

JDetectorVersion::JVersion_t JDETECTOR::getLatestDetectorVersion ( const JType< JDetectorVersion::JVersion_t > & type)
inline

Get latest detector version.

Parameters
typetype
Returns
version

Definition at line 390 of file JDetectorVersion.hh.

391 {
392 return putDetectorVersion.rbegin()->first;
393 }

◆ getLatestDetectorVersion() [4/4]

template<class T >
T JDETECTOR::getLatestDetectorVersion ( )
inline

Get latest detector version.

Returns
version

Definition at line 402 of file JDetectorVersion.hh.

403 {
405 }
std::string getLatestDetectorVersion(const JType< std::string > &type)
Get latest detector version.

◆ getLabel() [1/2]

std::string JDETECTOR::getLabel ( const JLocation & location)
inline

Get module label for monitoring and other applications.


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

Parameters
locationmodule location
Returns
label

Definition at line 247 of file JLocation.hh.

248 {
249 using namespace std;
250 using namespace JPP;
251
252 return MAKE_STRING("(" << FILL(4,'0') << location.getString() << "." << FILL(2,'0') << location.getFloor() << ")");
253 }
#define MAKE_STRING(A)
Make string.
Definition JPrint.hh:63
int getFloor() const
Get floor number.
Definition JLocation.hh:146
int getString() const
Get string number.
Definition JLocation.hh:135
Auxiliary data structure for sequence of same character.
Definition JManip.hh:330

◆ 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 49 of file JModuleMapper.hh.

52 {}

◆ getModuleStatusBits() [1/3]

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

Get module status bits.

Parameters
typetype
Returns
status bits

Definition at line 79 of file JModuleStatus.hh.

80 {
81 return JPP::get_keys(getModuleStatusBit);
82 }
const array_type< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.

◆ getModuleStatusBits() [2/3]

std::vector< int > JDETECTOR::getModuleStatusBits ( const JType< int > & type)
inline

Get module status bits.

Parameters
typetype
Returns
status bits

Definition at line 91 of file JModuleStatus.hh.

92 {
93 return JPP::get_keys(putModuleStatusBit);
94 }

◆ getModuleStatusBits() [3/3]

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

Get module status bits.

Returns
status bits

Definition at line 103 of file JModuleStatus.hh.

104 {
106 }
std::vector< std::string > getModuleStatusBits(const JType< std::string > &type)
Get module status bits.

◆ getPiezoPosition()

JPosition3D JDETECTOR::getPiezoPosition ( )
inline

Get relative position of piezo in optical module.

Returns
position [m]

Definition at line 30 of file JModuleSupportkit.hh.

31 {
32 return JPosition3D(0.0, 0.0, -0.20);
33 }
Data structure for position in three dimensions.

◆ getTimeOverThresholdProbability()

double JDETECTOR::getTimeOverThresholdProbability ( const JPMTAnalogueSignalProcessor & pmt,
const double tot_ns,
const double NPE,
const double precision = 1.0e-4 )
inline

Get time-over-threshold probability.

Parameters
pmtPMT signal processor
tot_nstime-over-threshold [ns]
NPEexpected number of photo-electrons
precisionprecision
Returns
probability

Definition at line 880 of file JPMTAnalogueSignalProcessor.hh.

884 {
885 int i = (int) (NPE - 5.0 * sqrt(NPE) - 0.5);
886 int M = (int) (NPE + 5.0 * sqrt(NPE) + 0.5);
887
888 if (i < 1) { i = 1; }
889 if (M < i) { M = i; }
890
891 double p = NPE * exp(-NPE) / (double) 1;
892
893 for (int __i = 1; __i != i; ++__i) {
894 p *= NPE / __i;
895 }
896
897 double P = 0.0;
898
899 for (double p0 = 0.0; (p >= p0 || p > precision) && i != M; ++i, p0 = p, p *= NPE / (double) i) {
900 P += pmt.getTimeOverThresholdProbability(tot_ns, i) * p;
901 }
902
903 return P;
904 }
double getTimeOverThresholdProbability(const double tot_ns, const int NPE) const
Get probability of having a pulse with specific time-over-threshold.

◆ getLabel() [2/2]

std::string JDETECTOR::getLabel ( const JPMTIdentifier & id)
inline

Get PMT label for monitoring and other applications.


The format is "(XXXXXXXXXX,YY)", where XXXXXXXXXX is the module idetifier and YY the PMT readout channel.

Parameters
idPMT identifier
Returns
label

Definition at line 193 of file JPMTIdentifier.hh.

194 {
195 using namespace std;
196 using namespace JPP;
197
198 return MAKE_STRING("(" << FILL(10,'0') << id.getID() << "," << FILL(2,'0') << id.getPMTAddress() << ")");
199 }

◆ 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 }
Data structure for PMT parameters.
virtual double getSurvivalProbability(const int NPE) const override
Probability that a hit survives the simulation of the PMT.

◆ 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 }
double getMaximalHitProbability(const double mu)
Get maximal ratio of hit probabilities for given QE and expectation value of the number of photo-elec...

◆ getChargeProbability()

double JDETECTOR::getChargeProbability ( const JPMTSignalProcessorInterface & pmt,
const double npe,
const double NPE,
const double precision = 1.0e-4 )
inline

Get charge probability.

Parameters
pmtPMT signal processor
npemeasured number of photo-electrons
NPEexpected number of photo-electrons
precisionprecision
Returns
probability

Definition at line 350 of file JPMTSignalProcessorInterface.hh.

354 {
355 int i = (int) (NPE - 5.0 * sqrt(NPE));
356
357 if (i < 1) {
358 i = 1;
359 }
360
361 double p = NPE * exp(-NPE) / (double) 1;
362
363 for (int __i = 1; __i != i; ++__i) {
364 p *= NPE / __i;
365 }
366
367 double P = 0.0;
368
369 for (double p0 = 0.0; (p >= p0 || p > precision); ++i, p0 = p, p *= NPE / (double) i) {
370 P += pmt.getChargeProbability(npe, i) * p;
371 }
372
373 return P;
374 }
virtual double getChargeProbability(const double npe, const int NPE) const
Get probability density for given charge.

◆ operator<() [2/4]

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 70 of file JPMTSimulator.hh.

71 {
72 return first.t_ns < second.t_ns;
73 }

◆ operator<() [3/4]

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 114 of file JPMTSimulator.hh.

115 {
116 return first.t_ns < second.t_ns;
117 }

◆ operator<() [4/4]

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 158 of file JPMTSimulator.hh.

159 {
160 return first.t_ns < second.t_ns;
161 }
double t_ns
time [ns]

◆ getTimeRange() [2/3]

template<class T >
JTimeRange JDETECTOR::getTimeRange ( const JPMTData< T > & input)
inline

Get time range (i.e. earliest and latest hit time) of PMT data.

Parameters
inputPMT data
Returns
time range

Definition at line 288 of file JPMTSimulator.hh.

289 {
290 JTimeRange range(JTimeRange::DEFAULT_RANGE());
291
292 for (typename JPMTData<T>::const_iterator hit = input.begin(); hit != input.end(); ++hit) {
293 range.include(hit->t_ns);
294 }
295
296 return range;
297 }
std::vector< JElement_t >::const_iterator const_iterator

◆ getTimeRange() [3/3]

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

307 {
308 JTimeRange range(JTimeRange::DEFAULT_RANGE());
309
310 for (JModuleData::const_iterator frame = input.begin(); frame != input.end(); ++frame) {
311 for (JModuleData::value_type::const_iterator hit = frame->begin(); hit != frame->end(); ++hit) {
312 range.include(hit->t_ns);
313 }
314 }
315
316 return range;
317 }

◆ 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 80 of file JPMTStatus.hh.

81 {
82 return JPP::get_keys(getPMTStatusBit);
83 }

◆ getPMTStatusBits() [2/3]

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

Get PMT status bits.

Parameters
typetype
Returns
status bits

Definition at line 92 of file JPMTStatus.hh.

93 {
94 return JPP::get_keys(putPMTStatusBit);
95 }

◆ getPMTStatusBits() [3/3]

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

Get PMT status bits.

Returns
status bits

Definition at line 104 of file JPMTStatus.hh.

105 {
106 return getPMTStatusBits(JType<T>());
107 }
std::vector< std::string > getPMTStatusBits(const JType< std::string > &type)
Get PMT status bits.
Definition JPMTStatus.hh:80

Variable Documentation

◆ TIME_OVER_THRESHOLD_NS

const double JDETECTOR::TIME_OVER_THRESHOLD_NS = 25.08

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

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

◆ NOMINAL_GAIN

const double JDETECTOR::NOMINAL_GAIN = 1.0

Specification for normalized gain corresponding to a one photo-electron pulse.

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

◆ ORCA_TBARZ_M

const double JDETECTOR::ORCA_TBARZ_M = 0.91
static

ORCA T-bar position relative to seabed [m].

Definition at line 36 of file JDetectorSupportkit.hh.

◆ ARCA_TBARZ_M

const double JDETECTOR::ARCA_TBARZ_M = 0.95
static

ORCA T-bar position relative to seabed [m].

Definition at line 37 of file JDetectorSupportkit.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 59 of file JDetectorToolkit.hh.

◆ BINARY_DETECTOR_FILE_FORMAT

const char* const JDETECTOR::BINARY_DETECTOR_FILE_FORMAT[] = { "dat", "datx" }
static

JIO binary file format.

Definition at line 60 of file JDetectorToolkit.hh.

60{ "dat", "datx" }; //!< JIO binary file format

◆ KM3NET_DETECTOR_FILE_FORMAT

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

KM3NeT standard ASCII format

Definition at line 61 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 62 of file JDetectorToolkit.hh.

◆ GDML_DETECTOR_FILE_FORMAT

const char* const JDETECTOR::GDML_DETECTOR_FILE_FORMAT = "gdml"
static

KM3Sim input format.

Definition at line 63 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 65 of file JDetectorToolkit.hh.

◆ CAN_MARGIN_M

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

extension of the detector size to comply with the can definition

Definition at line 66 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 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 789 of file JDetectorToolkit.hh.

◆ getDetectorVersion

const JGetDetectorVersion JDETECTOR::getDetectorVersion
static

Function object to map detector version to numerical value.

Definition at line 311 of file JDetectorVersion.hh.

◆ putDetectorVersion

const JPutDetectorVersion JDETECTOR::putDetectorVersion(getDetectorVersion) ( getDetectorVersion )
static

Function object to map numerical value to detector version.

◆ getModuleStatusBit

const JGetModuleStatusBit JDETECTOR::getModuleStatusBit
static

Function object to map key to module status bit.

Definition at line 64 of file JModuleStatus.hh.

◆ putModuleStatusBit

const JPutModuleStatusBit JDETECTOR::putModuleStatusBit(getModuleStatusBit) ( getModuleStatusBit )
static

Function object to map module status bit to key.

◆ PIEZO_V1_DELAYTIME_US

const double JDETECTOR::PIEZO_V1_DELAYTIME_US = 170.3
static

Piezo delay time [us].

Definition at line 19 of file JModuleSupportkit.hh.

◆ PIEZO_V2_DELAYTIME_US

const double JDETECTOR::PIEZO_V2_DELAYTIME_US = 242.1
static

Piezo delay time [us].

Definition at line 20 of file JModuleSupportkit.hh.

◆ PIEZO_V3_DELAYTIME_US

const double JDETECTOR::PIEZO_V3_DELAYTIME_US = 242.1
static

Piezo delay time [us].

Definition at line 21 of file JModuleSupportkit.hh.

◆ HYDROPHONE_DELAYTIME_US

const double JDETECTOR::HYDROPHONE_DELAYTIME_US = 50.7
static

Hydrophone delay time [us].

Definition at line 22 of file JModuleSupportkit.hh.

◆ 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 65 of file JPMTStatus.hh.

◆ putPMTStatusBit

const JPutPMTStatusBit JDETECTOR::putPMTStatusBit(getPMTStatusBit) ( getPMTStatusBit )
static

Function object to map PMT status bit to key.

◆ getTransitionTime

JDETECTOR::getTransitionTime JDETECTOR::getTransitionTime
static

Function object to generate transition time.

◆ getTransitionTimeProbability

JDETECTOR::getTransitionTimeProbability JDETECTOR::getTransitionTimeProbability
static

Function object of transition time prabability.

◆ getTransitionTimeProbability2D

const JTransitionTimeProbability2D JDETECTOR::getTransitionTimeProbability2D
static

Function object of twofold transition time prabability.

Definition at line 2660 of file JPMTTransitTimeProbability.hh.

◆ getNumberOfStrings

const JStringCounter JDETECTOR::getNumberOfStrings
static

Function object to count unique strings.

Definition at line 95 of file JStringCounter.hh.