22{
25
26 double bequerel;
29
30 try {
31
33
34 JParser<> zap(
"Example program to calculate singles rate.");
35
39
40 zap(argc, argv);
41 }
42 catch(const exception &error) {
43 FATAL(error.what() << endl);
44 }
45
46
47 using namespace NAMESPACE;
48
50
51 const double wmin = 280.0;
52 const double wmax = 700.0;
53 double ng = 41.0;
54 const int npe = 1;
55
56 ng *= (wmax-wmin) / (wmin*wmax) * (300.0*600.0)/(600.0-300.0);
57
58 double R[] = { 0.0, 0.0 };
59 double W[] = { 0.0, 0.0 };
60
61 const char* option[] = { "1Dx1D", "2D" };
62
63 for (
double x = -1.0, dx = 0.02;
x <= +1.0;
x += dx) {
65 }
66
67
68 const double dw = 1.5;
69
70 for (
double w = wmin;
w <= wmax;
w += dw) {
71
72 W[1] = 0.0;
73
74 for (
double x = -1.0, dx = 0.02;
x <= +1.0;
x += dx) {
76 }
77
80 }
81
82 for (int i = 0; i != sizeof(R)/sizeof(R[0]); ++i) {
83
84 R[i] *= wmax*wmin / (wmax - wmin);
85 R[i] *= bequerel * ng;
86
87 R[i] *= cpu.getSurvivalProbability(npe);
88 R[i] *= 0.5e-3;
89
90 cout << "Rate " << setw(6) << left << option[i] << " [kHz]: " << R[i] << endl;
91 }
92}
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
double getAbsorptionLength(const double lambda)
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for PMT parameters.
JProperties getProperties(const JEquationParameters &equation=JPMTParameters::getEquationParameters())
Get properties of this class.
Utility class to parse parameter values.
Utility class to parse command line options.
double getPhotocathodeArea()
Get photo-cathode area of PMT.
double getQE(const double R, const double mu)
Get QE for given ratio of hit probabilities and expectation value of the number of photo-electrons.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static const JPhotocathodeArea2D getPhotocathodeArea2D
Function object for effective photo-cathode area of PMT.
PMT analogue signal processor.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...