19 const char nc_enabled =
'A';
20 const char nc_no_energy_loss =
'C';
21 const char nc_no_scattering =
'D';
22 const char nc_disabled =
'E';
23 const char nc_absorption =
'F';
33int main(
int argc,
char* argv[])
38 typedef long long int counter_type;
42 counter_type numberOfEvents;
49 JParser<> zap(
"Mickey-mouse program to propagate neutrinos through the Earth.");
53 zap[
'n'] =
make_field(numberOfEvents,
"number of generated events");
56 <<
nc_enabled <<
" -> " <<
"Neutral-current interactions as simulated." <<
endl
58 <<
nc_no_scattering <<
" -> " <<
"Neutral-current interactions with transverse energy set to zero." <<
endl
59 <<
nc_disabled <<
" -> " <<
"Neutral-current interactions which have no effect." <<
endl
60 <<
nc_absorption <<
" -> " <<
"Neutral-current interactions lead to absorption." <<
endl) =
71 catch(
const exception &error) {
84 const double Zmin = 0.0;
85 const double Zmax = R_EARTH_KM * 2.0e3;
93 const JCrossSection* sigma[N] = {
NULL };
117 for (counter_type count = 0; count != numberOfEvents; ++count) {
119 if (count%10000 == 0) {
123 const bool neutrino = (count%2 == 0);
129 sigma[
CC] = &cc_nubar;
130 sigma[
NC] = &nc_nubar;
134 const double r1 = sqrt(r2);
135 const double phi =
gRandom->Uniform(-PI, +PI);
139 double x = r1 *
cos(phi);
140 double y = r1 *
sin(phi);
157 for (
int i = 0; i != N; ++i) {
158 ls +=
li[i] = 1.0e+2 * (*sigma[i])(E) * DENSITY_EARTH * AVOGADRO;
183 if ((y-=
li[
CC]) < 0.0) {
190 if ((y-=
li[
NC]) < 0.0) {
200 double s = E * (MASS_PROTON + MASS_NEUTRON);
201 double ET = 0.5 * sqrt(s) *
gRandom->Uniform(0.0, 1.0);
202 double phi =
gRandom->Uniform(-PI, +PI);
207 while (
gRandom->Rndm() > (1.0 -
By) * (1.0 -
By)) {
272 if (
debug >= status_t) {
274 cout <<
' ' <<
setw(8) << right <<
"inside" <<
' ' <<
setw(8) << right <<
"outside" <<
endl;
int main(int argc, char *argv[])
General purpose messaging.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Auxiliary data structure to list files in directory.
Auxiliary data structure for floating point format specification.