1 #ifndef __JDETECTOR__JDETECTORSUPPORTKIT__
2 #define __JDETECTOR__JDETECTORSUPPORTKIT__
23 namespace JDETECTOR {}
24 namespace JPP {
using namespace JDETECTOR; }
92 module.resize(memo.size());
158 template<
class JDetector_t>
246 get(103).swap(24,30);
463 get(817802210).rotateL(
'B');
468 get(817351722).swapTDC(15, 17);
469 get(808972598).swapTDC(27, 28);
470 get(817315169).swapTDC(14, 18);
471 get(806481218).swapTDC( 9, 11);
473 get(817295048).rotateR(
'B');
477 get(817565802).swapTDC( 3, 4);
481 get(817801283).swapTDC(22, 24);
482 get(817801283).swapTDC(24, 26);
495 if (module.getID() == 817802210) {
497 const JRotation3Z
R(-60.0 *
PI / 180.0);
499 for (JModule::iterator pmt = module.begin(); pmt != module.end(); ++pmt) {
500 if (pmt->getDZ() < 0.0) {
514 template<
class JDetector_t>
528 template<
class JDetector_t>
531 return getDetectorBuilder<JDetector_t>();
541 template<
class JDetector_t>
544 return getDetectorAddressMap<JDetector_t>().
get(
id);
555 template<
class JDetector_t>
558 return getModuleAddressMap<JDetector_t>(id).getAddressTranslator(tdc);
569 template<
class JDetector_t>
572 return getModuleAddressMap<JDetector_t>(id).
getIndex(tdc);
583 template<
class JHead_t,
class JTail_t>
595 return getDetectorBuilder<JHead_t>();
607 static bool has(
const int id)
614 template<
class JHead_t>
626 return getDetectorBuilder<JHead_t>();
638 static bool has(
const int id)
701 template<
class JDetector_t>
706 return getDetectorBuilder<JDetector_t>().
getModule(
id, location);
728 module.setLocation(location);
730 if (module.empty()) {
734 const double R = 0.5;
736 const double st =
sin(0.75*
PI);
737 const double ct = cos(0.75*
PI);
739 for (
int i = 0;
i != 3; ++
i) {
741 const double phi = (2.0*
PI*
i) / 3.0;
742 const double cp = cos(phi);
743 const double sp =
sin(phi);
760 template<
class JDetector_t>
virtual const JModuleAddressMap & getDefaultModuleAddressMap() const override
Get default module address map.
static bool has(const int id)
Has detector address map.
virtual const JModuleAddressMap & getDefaultModuleAddressMap() const override
Get default module address map.
bool hasDetectorBuilder(const int id)
Check if detector builder is available.
Data structure for a composite optical module.
static const double ARCA_TBARZ_M
ORCA T-bar position relative to seabed [m].
static bool has(const int id)
Has detector address map.
void setLocation(const JLocation &location)
Set location.
Template lookup table for detector builder.
Auxiliary class to extract detector address map from detector identifier.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
bool hasDetectorAddressMap(const int id)
Check if detector address map is available.
Lookup table for PMT addresses in detector.
JDetectorBuilder_t()
Default constructor.
Auxiliary class for a type holder.
KM3NeT with cable swaps, etc. (see e.g. JPMTSwapDB.cc)
JDetectorBuilder_t()
Default constructor.
then set_variable PMT_FILE set_variable DAQ_FILE set_variable OUTPUT_FILE set_variable DETECTOR else fatal Wrong number of arguments fi JPrintTree f $DAQ_FILE type
JDetectorBuilder_t()
Default constructor.
static const double ORCA_TBARZ_M
ORCA T-bar position relative to seabed [m].
JTYPELIST< JPPM_DU_t, JKM3NeTFit_t, JKM3NeT_t, JMonteCarlo_t >::typelist JDetectorTypes_t
Type list of KM3NeT detector types (specific detectors first).
virtual const JModuleAddressMap & getDefaultModuleAddressMap() const override
Get default module address map.
Lookup table for PMT addresses in optical module.
virtual void configure() const
Configure module.
virtual void configure() const override
Configure module.
bool hasDetector(JType< JPPM_DU_t > type, const int id)
Check validity of detector identifier.
JDetectorBuilder_t()
Default constructor.
virtual const JModuleAddressMap & getDefaultModuleAddressMap() const override
Get default module address map.
Data structure for vector in three dimensions.
JDetectorBuilder_t()
Default constructor.
Logical location of module.
Auxiliary class for recursive type list generation.
const JPMTAddressTranslator & getPMTAddressTranslator(int id, int tdc)
Get PMT address translator for given module identifier and TDC channel.
Type definitions for different detectors.PPM_DU.
Data structure for PMT geometry, calibration and status.
void compile()
Compile module data.
Auxiliary class for no type definition.
JModuleAddressMap & getModuleAddressMap(int id)
Get module address map.
static const double PI
Mathematical constants.
Data structure to translate PMT physical to readout address.
int getPMTLogicalIndex(int id, int tdc)
Get PMT logical index for given module identifier and TDC channel.
int getIndex()
Get index for user I/O manipulation.
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.
then JCookie sh JDataQuality D $DETECTOR_ID R
Data structure for PMT readout address.
void setID(const int id)
Set identifier.
Data structure for PMT physical address.
Exception for accessing an index in a collection that is outside of its range.
JDetectorBuilder & getDetectorBuilder()
Get detector builder.
Data structure for normalised vector in three dimensions.
void configure()
Configure internal router.
JModule & set(const JVector3D &pos)
Set position.
Auxiliary interface for building detector.
bool has(const int index) const
Test whether index is available.
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
const JModule & getModule(const int id=-1, const JLocation &location=JLocation()) const
Get module.
Data structure for optical module.