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);
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) {
508 if (module.getID() == 817603901) {
510 const JRotation3Z
R(+60.0 *
PI / 180.0);
512 for (JModule::iterator pmt = module.begin(); pmt != module.end(); ++pmt) {
513 if (pmt->getDZ() < 0.0) {
527 template<
class JDetector_t>
541 template<
class JDetector_t>
544 return getDetectorBuilder<JDetector_t>();
554 template<
class JDetector_t>
557 return getDetectorAddressMap<JDetector_t>().
get(
id);
568 template<
class JDetector_t>
571 return getModuleAddressMap<JDetector_t>(id).getAddressTranslator(tdc);
582 template<
class JDetector_t>
585 return getModuleAddressMap<JDetector_t>(id).
getIndex(tdc);
596 template<
class JHead_t,
class JTail_t>
608 return getDetectorBuilder<JHead_t>();
620 static bool has(
const int id)
627 template<
class JHead_t>
639 return getDetectorBuilder<JHead_t>();
651 static bool has(
const int id)
714 template<
class JDetector_t>
719 return getDetectorBuilder<JDetector_t>().
getModule(
id, location);
741 module.setLocation(location);
743 if (module.empty()) {
747 const double R = 0.5;
749 const double st =
sin(0.75*
PI);
750 const double ct = cos(0.75*
PI);
752 for (
int i = 0;
i != 3; ++
i) {
754 const double phi = (2.0*
PI*
i) / 3.0;
755 const double cp = cos(phi);
756 const double sp =
sin(phi);
773 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.
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.
then set_variable DETECTOR set_variable OUTPUT_FILE set_variable DAQ_FILE set_variable PMT_FILE else fatal Wrong number of arguments fi JPrintTree f $DAQ_FILE type
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.