26int main(
int argc,
char**argv)
39 JParser<> zap(
"Example program to test angle of incidence of a photon from a muon on a PMT.");
49 catch(
const exception &error) {
50 FATAL(error.what() << endl);
53 gRandom->SetSeed(seed);
56 const JVersor3D U(getSinThetaC(), 0.0, getCosThetaC());
58 int number_of_errors = 0;
59 int number_of_events = 0;
61 for (
int i = 0; i != numberOfEvents; ++i) {
65 const double x = gRandom->Uniform(-1.0, +1.0);
66 const double y = gRandom->Uniform(-1.0, +1.0);
67 const double z = gRandom->Uniform(-1.0, +1.0);
69 const double dx = gRandom->Uniform(-1.0, +1.0);
70 const double dy = gRandom->Uniform(-1.0, +1.0);
71 const double dz = gRandom->Uniform(-1.0, +1.0);
95 NOTICE(
"Number of errors: " << number_of_errors <<
" out of " << number_of_events <<
" events." << endl);
97 ASSERT(number_of_events > 0);
98 ASSERT(number_of_errors == 0);
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
int main(int argc, char **argv)
double getDistance(const JVector3D &pos) const
Get distance.
void transform(const JAxis3D &axis)
Transform axis to reference frame of given axis.
const JDirection3D & getDirection() const
Get direction.
double getDot(const JAngle3D &angle) const
Get dot product.
double getDot(const JAxis3D &axis) const
Get cosine angle of impact of Cherenkov light on PMT.
Data structure for vector in three dimensions.
Data structure for normalised vector in three dimensions.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).