counting.cc
1 #include "vector.hh"
2 #include "position.hh"
3 #include "counting.hh"
4 #include "Tools.h"
5 #include "TMath.h"
6 
7 Counting::Counting() {
8 
9  for (int i=0;i<2;i++) {
10  for (int j=0;j<2;j++) {
11  nl1triggers[i][j]=0;
12  }
13  }
14 
15  Tools::Zero(npass,2);
16  Tools::Zero(npassestrigger,2);
17  Tools::Zero(nchanceinhell2,2);
18  Tools::Zero(nviewanglecut,2);
19  Tools::Zero(nchanceinhell,2);
20  Tools::Zero(nchanceinhell_1overr,2);
21  Tools::Zero(nchanceinhell_fresnel,2);
22  Tools::Zero(nconverges,2);
23  Tools::Zero(nacceptablerf,2);
24  Tools::Zero(nraywithincontinent1,2); // reality check: exiting ray is within 30 degrees of south pole
25  Tools::Zero(nraywithincontinent2,2); // same, after next iteration.
26  Tools::Zero(nraypointsup1,2); // same, after next iteration.
27  Tools::Zero(nraypointsup2,2); // same, after next iteration.
28  Tools::Zero(nnottoosmall,2); // same, after next iteration.
29  Tools::Zero(nviewangle_lt_90,2); // same, after next iteration.
30  Tools::Zero(ngoodfracs,2); // same, after next iteration.
31  Tools::Zero(nbadfracs,2); // same, after next iteration.
32  Tools::Zero(nnottir,2); // same, after next iteration.
33  Tools::Zero(nentersice,2); // same, after next iteration.
34  Tools::Zero(nabsorbed,2); // same, after next iteration.
35  Tools::Zero(noway,2); // same, after next iteration.
36  Tools::Zero(wheredoesitleave_err,2); // same, after next iteration.
37  Tools::Zero(neverseesice,2); // same, after next iteration.
38  Tools::Zero(iceinteraction,2); // same, after next iteration.
39  Tools::Zero(inhorizon,2); // same, after next iteration.
40  Tools::Zero(wheredoesitenterice_err,2); // same, after next iteration.
41  Tools::Zero(toohigh,2); // same, after next iteration.
42  Tools::Zero(toolow,2); // same, after next iteration.
43  for (int i=0;i<NCOSTHETA;i++) {
44  Tools::Zero(weights_rin[i],NPHI); // same, after next iteration.
45  }
46 
47  Tools::Zero(ndeadtime,2);
48  // variables for counting neutrinos and reporting results.
49  nnu_e=0; //counting the number of e,mu,tau neutrinos
50  nnu_mu=0;
51  nnu_tau=0;
52 
53 
54 
55 }
56 void Counting::findCosthetaPhiBins(Position r_in,int &icostheta,int &iphi) {
57 
58  icostheta=(int)((cos(r_in.Theta())-COSTHETAMIN)/(COSTHETAMAX-COSTHETAMIN)*(double)NCOSTHETA);
59  iphi=(int)((r_in.Phi()-PHIMIN)/(PHIMAX-PHIMIN)*(double)NPHI);
60 
61 
62 }
63 void Counting::IncrementWeights_r_in(Position r_in,double weight) {
64  int iphi,icostheta;
65  findCosthetaPhiBins(r_in,icostheta,iphi);
66  weights_rin[icostheta][iphi]+=weight;
67 
68 }
This class is a 3-vector that represents a position on the Earth&#39;s surface.
Definition: position.hh:26