33int main(
int argc,
char* argv[])
51 JParser<> zap(
"Example program to calculate singles rate.");
54 zap[
'b'] =
make_field(bequerel,
"radioactivity") = 13.75e3;
62 catch(
const exception &error) {
63 FATAL(error.what() << endl);
67 using namespace NAMESPACE;
71 for (
const auto& i : fd) {
72 g1[i.first] = i.second;
82 const double wmin = 280.0;
83 const double wmax = 700.0;
84 const double ng = 47.11;
86 const double cpow = 2.156;
90 const double dx = 1.5;
91 const int nx = (int) ((wmax - wmin) / dx);
93 TH1D h0(
"h0", NULL, nx, wmin, wmax);
94 TH1D h1(
"h1", NULL, nx, wmin, wmax);
97 double R[] = { 0.0, 0.0 };
98 double W[] = { 0.0, 0.0 };
100 const string option[] = {
"1Dx1D",
"2D" };
102 for (
double x = -1.0, dx = 0.02; x <= +1.0; x += dx) {
109 Y /= pow(wmin, 1.0 - cpow) - pow(wmax, 1.0 - cpow);
117 double A[] = { 0.0, 0.0 };
119 for (
int ix = 1; ix <= h0.GetXaxis()->GetNbins(); ++ix) {
121 const double w = h0.GetXaxis()->GetBinCenter(ix);
122 const double dw = h0.GetXaxis()->GetBinWidth (ix);
126 for (
double x = -1.0, dx = 0.02; x <= +1.0; x += dx) {
130 double U = Y / pow(w,cpow);
141 A[0] += W[0] * U * dw * getQE(w);
142 A[1] += W[1] * U * dw;
148 double labs[] = { 0.0, 0.0 };
152 for (
int i = 0; i !=
sizeof(R)/
sizeof(R[0]); ++i) {
156 const double corr = R[i]*(1.0-exp(-MODULE_RADIUS_M/labs[i]));
158 cout << setw(6) << left << option[i] +
":" << right
159 <<
" rate " <<
FIXED(7,3) << R[i] <<
" [kHz]"
160 <<
" corrected " <<
FIXED(7,3) << R[i] - corr <<
" [kHz]"
161 <<
" <l_abs> " <<
FIXED(7,3) << labs[i] <<
" [m]" << 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
Double_t g1(const Double_t x)
Function.
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.
static const JZero zero
Function object to assign zero value.
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.
Auxiliary data structure for floating point format specification.
PMT analogue signal processor.
virtual double getSurvivalProbability(const int NPE) const override
Probability that a hit survives the simulation of the PMT.
Auxiliary wrapper for I/O of container with optional comment (see JComment).
Empty structure for specification of parser element that is initialised (i.e. does not require input)...