21 int main(
int argc, 
char **argv)
 
   35     JParser<> zap(
"Example program to test PMT signal processor probability.");
 
   39     zap[
'p'] = 
make_field(pmt)              = JPMTIdentifier(-1,0);
 
   46   catch(
const exception &error) {
 
   47     FATAL(error.what() << endl);
 
   51   const double QEmax = 1.0;
 
   53   JPMTParameters buffer = 
parameters.getPMTParameters(pmt);
 
   55   DEBUG(
"PMT parameters:" << endl);
 
   58   if (buffer.QE > QEmax) {
 
   60     WARNING(
"PMT QE set to " << QEmax << endl);
 
   65   JPMTSignalProcessorInterface* cpu = 
new JPMTAnalogueSignalProcessor(buffer);
 
   70   int number_of_hits = 0;
 
   72   for (
int i = 0; i != numberOfHits; ++i) {
 
   76     for (
int __i = 0; __i != NPE; ++__i) {
 
   82     double x = cpu->getRandomCharge(npe);
 
   86       if (cpu->applyThreshold(x) >= cpu->ABOVE_THRESHOLD) {
 
   90     } 
catch (
const JValueOutOfRange& exception) {
 
   92       DEBUG(exception.what());
 
   98   const double P = (double) number_of_hits / (
double) numberOfHits; 
 
  100   DEBUG(
"Number of generated hits " << setw(8) << right << numberOfHits   << endl);
 
  101   DEBUG(
"Number of accepted  hits " << setw(8) << right << number_of_hits << endl);
 
  102   DEBUG(
"Probability (real) " << 
FIXED(8,5) << 
P                                  << endl);
 
  103   DEBUG(
"Probability (calc) " << 
FIXED(8,5) << cpu->getSurvivalProbability(NPE)   << endl);
 
  105   ASSERT(fabs(
P - cpu->getSurvivalProbability(NPE)) < precision * cpu->getSurvivalProbability(NPE));
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
*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
 
Simple data structure to support I/O of equations (see class JLANG::JEquation). 
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
Auxiliary data structure for floating point format specification. 
 
#define ASSERT(A,...)
Assert macro. 
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
PMT analogue signal processor.