207 center.setPosition(
JPosition3D(center.getX(), center.getY(), 0.0));
220 if (this->hasModule(
module.getID()) && range(
module.getFloor())) {
251 const double tx =
model.tx;
252 const double tz = sqrt((1.0 + tx) * (1.0 - tx));
260 const double ty =
model.ty;
261 const double tz = sqrt((1.0 + ty) * (1.0 - ty));
305 JParser<> zap(
"Auxiliary program to align two detectors.");
318 catch(
const exception &error) {
325 FATAL(
"No tripod file.");
353 if (fit.hasModule(
module->getID())) {
364 simplex.value =
JModel_t(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
366 simplex.step.resize(6);
368 simplex.step[0] =
JModel_t(0.01, 0.00, 0.00, 0.0, 0.0, 0.0);
369 simplex.step[1] =
JModel_t(0.00, 0.01, 0.00, 0.0, 0.0, 0.0);
370 simplex.step[2] =
JModel_t(0.00, 0.00, 0.01, 0.0, 0.0, 0.0);
371 simplex.step[3] =
JModel_t(0.00, 0.00, 0.00, 5.0e-4, 0.0, 0.0);
372 simplex.step[4] =
JModel_t(0.00, 0.00, 0.00, 0.0, 1.0e-4, 0.0);
373 simplex.step[5] =
JModel_t(0.00, 0.00, 0.00, 0.0, 0.0, 1.0e-4);
375 const double chi2 = simplex(fit, data.begin(), data.end());
377 cout <<
"Number of iterations " << simplex.numberOfIterations <<
endl;
401 module->add(p2 - p1);
422 tripod->add(p2 -
p1);
int main(int argc, char **argv)
Data structure for detector geometry and calibration.
Base class for data structures with artithmetic capabilities.
General purpose messaging.
Direct access to module in detector data structure.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary class to define a range between two values.
Data structure for tripod.
Router for direct addressing of module data in detector data structure.
Data structure for a composite optical module.
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++,...
Data structure for position in three dimensions.
double getDistanceSquared(const JVector3D &pos) const
Get squared of distance to point.
Template definition of a multi-dimensional oscillation probability interpolation table.
void load()
Load oscillation probability table.
JPosition3D getPosition(const Vec &pos)
Get position.
const JModule & getModule(const JType< JDetector_t > type, const int id, const JLocation &location=JLocation())
Get module according given detector type.
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.
void model(JModel_t &value)
Auxiliary function to constrain model during fit.
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
std::iterator_traits< T >::value_type getAverage(T __begin, T __end)
Get average.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Type definition of range.
void store(const char *file_name) const
Store to output file.
Auxiliary base class for aritmetic operations of derived class types.