21 int main(
int argc,
char* argv[])
34 JParser<> zap(
"Example program to calculate singles rate.");
42 catch(
const exception &error) {
43 FATAL(error.what() << endl);
47 using namespace NAMESPACE;
51 const double wmin = 280.0;
52 const double wmax = 700.0;
56 ng *= (wmax-wmin) / (wmin*wmax) * (300.0*600.0)/(600.0-300.0);
58 double R[] = { 0.0, 0.0 };
59 double W[] = { 0.0, 0.0 };
61 const char* option[] = {
"1Dx1D",
"2D" };
63 for (
double x = -1.0, dx = 0.02;
x <= +1.0;
x += dx) {
68 const double dw = 1.5;
70 for (
double w = wmin;
w <= wmax;
w += dw) {
74 for (
double x = -1.0, dx = 0.02;
x <= +1.0;
x += dx) {
82 for (
int i = 0; i !=
sizeof(
R)/
sizeof(
R[0]); ++i) {
84 R[i] *= wmax*wmin / (wmax - wmin);
85 R[i] *= bequerel * ng;
87 R[i] *= cpu.getSurvivalProbability(npe);
90 cout <<
"Rate " << setw(6) << left << option[i] <<
" [kHz]: " <<
R[i] << endl;
Utility class to parse command line options.
int main(int argc, char *argv[])
Utility class to parse parameter values.
Properties of Antares PMT and deep-sea water.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Properties of KM3NeT PMT and deep-sea water.
Properties of KM3NeT PMT and deep-sea water.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
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...
double getPhotocathodeArea()
Get photo-cathode area of PMT.
General purpose messaging.
then JCookie sh JDataQuality D $DETECTOR_ID R
static const JPhotocathodeArea2D getPhotocathodeArea2D
Function object for effective photo-cathode area of PMT.
double getAbsorptionLength(const double lambda)
Get absorption length.
Utility class to parse command line options.
PMT analogue signal processor.
double getAngularAcceptance(const double x)
Angular acceptence of PMT.