30 int main(
int argc,
char **argv)
34 using namespace KM3NETDAQ;
45 JParser<> zap(
"Example program to histogram neutrino effective volume for triggered events."\
46 "\nFor genie/gSeaGen events, use application JEffectiveMass1D.");
50 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
51 zap[
'X'] =
make_field(logx,
"Use logarithm of energy");
57 catch(
const exception &error) {
58 FATAL(error.what() << endl);
70 const JHead buffer(head);
73 FATAL(
"Use JEffectiveMass1D" << endl);
76 const JVolume volume(head, logx);
84 while (inputFile.hasNext()) {
86 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
90 const Evt*
event = ps;
95 const double E = neutrino.
E;
97 hV.Fill(volume.
getX(E), volume.
getW(hV.GetXaxis(),
E));
100 WARNING(
"JVolume1D: cannot find neutrino in triggered event " << inputFile.getCounter() );
Utility class to parse command line options.
Double_t getXmin() const
Get minimal abscissa value.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
Synchronously read DAQ events and Monte Carlo events (and optionally other events).
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
Double_t getXmax() const
Get maximal abscissa value.
Double_t getX(const Double_t E, double constrain=false) const
Get abscissa value.
double E
Energy [GeV] (either MC truth or reconstructed)
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
Auxiliary class for histogramming of effective volume.
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Double_t getW(TAxis *axis, const Double_t E) const
Get bin width corrected energy spectrum dependent weight.
General purpose messaging.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
bool is_genhen(const JHead &header)
Check for generator.
Utility class to parse command line options.
const JLimit & getLimit() const
Get limit.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
General purpose class for multiple pointers.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
int numberOfBins
number of bins for average CDF integral of optical module
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
#define DEBUG(A)
Message macros.