30 int main(
int argc,
char **argv)
44 JParser<> zap(
"Test program for vertex fit.");
55 catch(
const exception& error) {
56 FATAL(error.what() << endl);
60 TH1D hx(
"hx", NULL, 101, -1.0, +1.0);
61 TH1D hy(
"hy", NULL, 101, -1.0, +1.0);
62 TH1D ht(
"ht", NULL, 101, -1.0, +1.0);
73 if (inputFile !=
"") {
75 ifstream in(inputFile.c_str());
77 for (
double x,
y, z; in >>
x >>
y >> z; ) {
87 for (
int i = 0; i != numberOfPMTs; ++i) {
95 const double xmin = -1.0;
96 const double xmax = +1.0;
98 const double tmin = -1.0;
99 const double tmax = +1.0;
101 for (
int i = 0; i != numberOfEvents; ++i) {
105 const double x = 0.0 + gRandom->Uniform(
xmin,
xmax);
106 const double y = 0.0 + gRandom->Uniform(
xmin,
xmax);
107 const double z = 0.0;
108 const double t = 0.0 + gRandom->Uniform(tmin, tmax);
122 for (JDetector_t::const_iterator pos =
detector.begin(); pos !=
detector.end(); ++pos) {
128 <<
FIXED(12,5) << hit->getX() <<
' '
129 <<
FIXED(12,5) << hit->getY() <<
' '
130 <<
FIXED(12,5) << hit->getZ() <<
' '
131 <<
FIXED(12,5) << hit->getT() << endl);
165 out << hx << hy << ht;
171 ASSERT(numberOfEvents > 0);
Linear fit of JFIT::JLine1Z.
int main(int argc, char **argv)
General purpose messaging.
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Linear fit of straight line parallel to z-axis to set of hits (objects with position and time).
Data structure for fit of straight line paralel to z-axis.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
double getZ(const JPosition3D &pos) const
Get point of emission of Cherenkov light along muon path.
Data structure for circle in two dimensions.
Data structure for vector in two dimensions.
Data structure for vector in three dimensions.
double getY() const
Get y position.
double getX() const
Get x position.
Utility class to parse command line options.
JVector3D getRandomPosition(const JSphere3D &sphere)
Get random position.
const double getSpeedOfLight()
Get speed of light.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Auxiliary class to set-up Hit.