23 int main(
int argc,
char **argv)
35 JParser<> zap(
"Auxiliary program to decompose detector to separate calibrations.");
37 zap[
'a'] =
make_field(detectorFile,
"detector file");
44 catch(
const exception &error) {
45 FATAL(error.what() << endl);
59 FATAL(
"No detector address map for detector identier " <<
detector.getID() << endl);
67 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
69 if (module->getFloor() != 0) {
71 JModule buffer =
getModule(demo.get(module->getID()), module->getID(), module->getLocation());
77 if (!JModule::compare(buffer, *module, precision)) {
78 ERROR(
"Module " << setw(10) << module->getID() <<
' ' << module->getLocation() <<
" incompatible with reference." << endl);
88 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
90 const JModule& buffer =
getModule(demo.get(module->getID()), module->getID(), module->getLocation());
95 if (module->getFloor() != 0) {
99 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
115 ostream* out = open<ostream>(
outputFile.c_str());
117 *out << setw(2) << setprecision(8);
Utility class to parse command line options.
int main(int argc, char *argv[])
Data structure for a composite optical module.
static const std::string DOMPositions_t
static const std::string OK_t
bool hasDetectorAddressMap(const int id)
Check if detector address map is available.
static JRotation getRotation
Function object to get rotation matrix to go from first to second module.
JCalibration getCalibration(const JCalibration &first, const JCalibration &second)
Get calibration to go from first to second calibration.
Lookup table for PMT addresses in detector.
Data structure for time calibration.
Data structure for detector geometry and calibration.
static const std::string Result_t
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
void close(std::istream *pf)
Close file.
static const std::string DOMRotations_t
JPosition3D getPosition(const Vec &pos)
Get position.
JDetectorAddressMap & getDetectorAddressMap()
Get detector address map.
void rotate(const JRotation3D &R)
Rotate module.
General purpose messaging.
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable NORTH set_variable EAST set_variable SOUTH set_variable WEST set_variable WORKDIR tmp set_variable R set_variable CT set_variable YMAX set_variable YMIN if do_usage *then usage $script[distance] fi case set_variable R
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Utility class to parse command line options.
Auxiliary data structure for module rotation.
Auxiliary data structure for module position.
static const std::string PMTT0s_t
do set_variable DETECTOR_TXT $WORKDIR detector
static const std::string Data_t
Auxiliary data structure for PMT time calibration.
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number