35int main(
int argc,
char* argv[])
56 JParser<> zap(
"Example program to calculate singles rate.");
59 zap[
'b'] =
make_field(bequerel,
"radioactivity") = 14687.6;
68 catch(
const exception &error) {
69 FATAL(error.what() << endl);
76 for (
const auto& i : fd) {
77 g1[i.first] = i.second;
87 const double wmin = 280.0;
88 const double wmax = 700.0;
89 const double ng = 47.11;
91 const double cpow = 2.156;
95 const double dx = 1.5;
96 const int nx = (int) ((wmax - wmin) / dx);
98 TH1D h0(
"h0", NULL, nx, wmin, wmax);
99 TH1D h1(
"h1", NULL, nx, wmin, wmax);
102 double R[] = { 0.0, 0.0 };
103 double W[] = { 0.0, 0.0 };
105 const string option[] = {
"1Dx1D",
"2D" };
107 for (
double x = -1.0, dx = 0.02; x <= +1.0; x += dx) {
114 Y /= pow(wmin, 1.0 - cpow) - pow(wmax, 1.0 - cpow);
122 double A[] = { 0.0, 0.0 };
124 for (
int ix = 1; ix <= h0.GetXaxis()->GetNbins(); ++ix) {
126 const double w = h0.GetXaxis()->GetBinCenter(ix);
127 const double dw = h0.GetXaxis()->GetBinWidth (ix);
131 for (
double x = -1.0, dx = 0.02; x <= +1.0; x += dx) {
135 double U = Y / pow(w,cpow);
146 A[0] += W[0] * U * dw * getQE(w);
147 A[1] += W[1] * U * dw;
152 double labs[] = { 0.0, 0.0 };
156 for (
int i = 0; i !=
sizeof(R)/
sizeof(R[0]); ++i) {
160 const double corr = R[i]*(1.0-exp(-MODULE_RADIUS_M/labs[i]));
162 cout << setw(6) << left << option[i] +
":" << right
163 <<
" rate " <<
FIXED(7,3) << R[i] <<
" [kHz]"
164 <<
" corrected " <<
FIXED(7,3) << R[i] - corr <<
" [kHz]"
165 <<
" <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.
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
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Double_t g1(const Double_t x)
Function.
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)...
Auxiliary data structure to customize absorption length.
static double getAbsorptionLength(const double lambda)
Get absorption length.