45 using namespace KM3NETDAQ;
57 JParser<> zap(
"Example program to histogram neutrino effective mass for triggered events.");
61 zap[
'X'] =
make_field(logx,
"Use logarithm of energy");
63 zap[
'O'] =
make_field(option,
"Result option") = Mass_t, Volume_t;
68 catch(
const exception &error) {
69 FATAL(error.what() << endl);
74 double Xmin = numeric_limits<double>::max();
75 double Xmax = numeric_limits<double>::lowest();
84 ERROR(
"Not a gSeaGen file; you may want to use JVolume1D" << endl);
87 const JVolume volume(header, logx);
89 if (volume.getXmin() < Xmin) { Xmin = volume.getXmin(); }
90 if (volume.getXmax() > Xmax) { Xmax = volume.getXmax(); }
101 NOTICE(
"Scanning file type " <<
distance(scanners.begin(), scanner) << endl);
102 DEBUG (header << endl);
104 while (scanner->hasNext()) {
106 STATUS(
"event: " << setw(10) << scanner->getCounter() <<
'\r');
DEBUG(endl);
108 const Evt*
event = scanner->next();
117 const double x = logx ?
log10(primary.
E) : primary.
E;
121 if (option == Mass_t) {
123 }
else if (option == Volume_t) {
127 hm[primary.
type]->Fill(x, y);
139 FATAL(error << endl <<
"You may want to use \"offline\" formatted file.");
Utility class to parse command line options.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
bool is_gseagen(const JHead &header)
Check for generator.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
double numberOfEvents
Number of events.
const Trk & get_primary(const Evt &evt)
Get primary.
static const double DENSITY_SEA_WATER
Fixed environment values.
double E
Energy [GeV] (either MC truth or reconstructed)
Auxiliary class for histogramming of effective volume.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
set_variable E_E log10(E_{fit}/E_{#mu})"
int type
MC: particle type in PDG encoding.
static const int W2LIST_GSEAGEN_WATER_INT_LEN
Interaction length in pure water in m.
Auxiliary base class for list of file names.
std::vector< filescanner_type >::iterator iterator
static const int W2LIST_GSEAGEN_P_EARTH
Transmission probability in the Earth (XSEC_MEAN and COLUMN_DEPTH used to compute PEarth) ...
static const int WEIGHTLIST_DIFFERENTIAL_EVENT_RATE
Event rate per unit of flux (c.f. taglist document) [GeV m2 sr].
const JHead & getHeader() const
Get header.
Auxiliary class for organising Monte Carlo file scanners associated with event weighters.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
std::vector< filescanner_type >::const_iterator const_iterator
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.