30 const char*
const Mass_t =
"Mass";
31 const char*
const Volume_t =
"Volume";
41 int main(
int argc,
char **argv)
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);
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.
Double_t getXmin() const
Get minimal abscissa value.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
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.
Double_t getXmax() const
Get maximal abscissa value.
const Trk & get_primary(const Evt &evt)
Get primary.
static const double DENSITY_SEA_WATER
Fixed environment values.
Dynamic ROOT object management.
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})"
General purpose messaging.
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) ...
Utility class to parse command line options.
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.