51 using namespace KM3NETDAQ;
65 JParser<> zap(
"Example program to histogram neutrino effective mass for triggered events.");
69 zap[
'R'] =
make_field(margin,
"Margin around the volume in which the considered events must reside") = 0.0;
70 zap[
'X'] =
make_field(logx,
"Use logarithm of energy");
73 zap[
'O'] =
make_field(option,
"Result option") = Mass_t, Volume_t;
78 catch(
const exception &error) {
79 FATAL(error.what() << endl);
84 double Xmin = numeric_limits<double>::max();
85 double Xmax = numeric_limits<double>::lowest();
91 const JVolume volume(scanner->getHeader(), logx);
93 if (volume.getXmin() < Xmin) { Xmin = volume.
getXmin(); }
94 if (volume.getXmax() > Xmax) { Xmax = volume.getXmax(); }
104 NOTICE(
"Scanning file type " << scanner->getName() << endl);
105 DEBUG (header << endl);
115 NOTICE(
"Cylinder, including margin: " << can << endl);
123 while (scanner->hasNext()) {
125 STATUS(
"event: " << setw(10) << scanner->getCounter() <<
'\r');
DEBUG(endl);
127 const Evt*
event = scanner->next();
131 if (event->mc_hits.empty()) {
135 const double x = logx ?
log10(primary.
E) : primary.
E;
138 hNM[primary.
type]->Fill(x);
144 ERROR(
"No events with zero hits -> use application JEffectiveMassOffline1D." << endl);
153 STATUS(
"event: " << setw(10) <<
in.getCounter() <<
'\r');
DEBUG(endl);
155 const Evt*
event =
in.next();
158 double x = logx ?
log10(primary.
E) : primary.
E;
161 if (option == Mass_t) {
163 }
else if (option == Volume_t) {
167 hM[primary.
type]->Fill(x, y);
177 hM[pdg]->Divide(hNM[pdg]);
187 FATAL(error << endl);
JVertex3D getVertex(const Trk &track)
Get vertex.
Utility class to parse command line options.
Double_t getXmin() const
Get minimal abscissa value.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
JCylinder3D getCylinder(const JHead &header)
Get cylinder corresponding to the positions of generated tracks (i.e.
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
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})"
void addMargin(const double D)
Add (safety) margin.
int type
MC: particle type in PDG encoding.
double getVolume() const
Get volume.
Auxiliary base class for list of file names.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
std::vector< filescanner_type >::iterator iterator
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
bool is_inside(const JVector3D &pos) const
Check whether given point is inside cylinder.
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
const array_type< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
#define DEBUG(A)
Message macros.
The cylinder used for photon tracking.