22int main(
int argc,
char* argv[])
35 JParser<> zap(
"Example program to calculate singles rate.");
43 catch(
const exception &error) {
44 FATAL(error.what() << endl);
48 using namespace NAMESPACE;
53 const double wmin = 280.0;
54 const double wmax = 700.0;
59 double R[] = { 0.0, 0.0 };
60 double W[] = { 0.0, 0.0 };
62 const char* option[] = {
"1Dx1D",
"2D" };
64 for (
double x = -1.0, dx = 0.02; x <= +1.0; x += dx) {
69 const double dw = 1.5;
71 double norm[] = { 0.0, 0.0 };
73 for (
double w = wmin; w <= wmax; w += dw) {
77 for (
double x = -1.0, dx = 0.02; x <= +1.0; x += dx) {
83 norm[0] += W[0] * dw * getQE(w) / pow(w,cpow);
84 norm[1] += W[1] * dw / pow(w,cpow);
87 double avabs[] = { 0.0, 0.0 };
91 for (
int i = 0; i !=
sizeof(R)/
sizeof(R[0]); ++i) {
92 avabs[i] = R[i]/norm[i];
95 R[i] /= pow(wmin, 1.0-cpow) - pow(wmax,1.0-cpow);
97 R[i] *= bequerel * ng;
102 cout <<
"Rate " << setw(6) << left << option[i] <<
" [kHz]: " << R[i] << endl;
103 double corr = R[i]*(1.0-exp(-MODULE_RADIUS_M/avabs[i]));
104 cout <<
"Rcor "<< setw(6) << left << option[i] <<
" [kHz]: " << R[i]-corr <<
" <abs> [m]: "<< avabs[i] << endl;
Properties of Antares PMT and deep-sea water.
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
double getAbsorptionLength(const double lambda)
General purpose messaging.
PMT analogue signal processor.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, char *argv[])
Properties of KM3NeT PMT and deep-sea water.
Properties of KM3NeT PMT and deep-sea water.
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.
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.
virtual double getSurvivalProbability(const int NPE) const override
Probability that a hit survives the simulation of the PMT.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...