41 JKey(
const char* name,
56 friend inline bool operator<(
const JKey& first,
const JKey& second)
58 return first.index < second.index;
72#define make_key(PARAMETER) JKey(#PARAMETER, PARAMETER)
137 if (hA->GetEntries() != 0) { hA->Scale(1.0/hA->GetEntries()); }
138 if (hB->GetEntries() != 0) { hB->Scale(1.0/hB->GetEntries()); }
139 if (hC->GetEntries() != 0) { hC->Scale(1.0/hC->GetEntries()); }
140 if (hD->GetEntries() != 0) { hD->Scale(1.0/hD->GetEntries()); }
149 void Write(
TFile& out)
151 out.WriteTObject(hA);
152 out.WriteTObject(hB);
153 out.WriteTObject(hC);
154 out.WriteTObject(hD);
181 void insert(
const JKey& key,
185 const double logx =
false)
207 for (
iterator i = begin(); i != end(); ++i) {
209 const int index = i->first.index;
212 i->second.Fill(
fA.getQ(),
fB.getQ(), option);
213 }
else if (
fA.hasW(index) &&
fB.hasW(index)) {
214 i->second.Fill(
fA.getW(index),
fB.getW(index), option);
225 for (
iterator i = this->begin(); i != this->end(); ++i) {
236 void Write(
TFile& out)
238 for (
iterator i = this->begin(); i != this->end(); ++i) {
239 i->second.Write(out);
249 void Write(
const char* file_name)
251 TFile out(file_name,
"RECREATE");
273 typedef JTriggeredFileScanner_t::multi_pointer_type multi_pointer_type;
284 JParser<> zap(
"Example program to compare fit results from two files.");
295 catch(
const exception& error) {
326 TH1D hA(
"h[A]",
NULL, 100, -3.0, +2.3);
327 TH1D hB(
"h[B]",
NULL, 100, -3.0, +2.3);
332 360, -180.0, +180.0);
346 if (!
psA.is_valid()) {
continue; }
347 if (!
psB.is_valid()) {
continue; }
359 if (muon == event->mc_trks.end()) {
continue; }
361 if (
evtA->empty()) {
continue; }
362 if (
evtB->empty()) {
continue; }
364 JEvt::const_iterator
fitA =
evtA->begin();
365 JEvt::const_iterator
fitB =
evtB->begin();
375 const double Enu = neutrino.
E;
General purpose messaging.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, char **argv)
#define make_key(PARAMETER)
Make key.
ROOT TTree parameter settings of various packages.
Synchronously read DAQ events and Monte Carlo events (and optionally other events).
Wrapper class around template object.
JValue(T &object)
Constructor.
Template definition of a multi-dimensional oscillation probability interpolation table.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
static const int JENERGY_ENERGY
uncorrected energy [GeV] see JRECONSTRUCTION::JMuonEnergy
static const int JENERGY_CHI2
chi2 see JRECONSTRUCTION::JMuonEnergy
static const int JSTART_LENGTH_METRES
distance between projected positions on the track of optical modules for which the response does not ...
static const int JGANDALF_BETA0_RAD
ile KM3NeT Data Definitions v3.6.2 https://git.km3net.de/common/km3net-dataformat
static const int JGANDALF_BETA1_RAD
uncertainty on the reconstructed track direction from the error matrix [rad] see JRECONSTRUCTION::JMu...
static const int JGANDALF_NUMBER_OF_HITS
number of hits see JRECONSTRUCTION::JMuonGandalf
JDirection3D getDirection(const Vec &dir)
Get direction.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
bool operator<(const Head &first, const Head &second)
Less than operator.
Auxiliary classes and methods for linear and iterative data regression.
double getAngle(const JQuaternion3D &first, const JQuaternion3D &second)
Get space angle between quanternions.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
int mc_id
identifier of the MC event (as found in ascii or antcc file).
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
double E
Energy [GeV] (either MC truth or reconstructed)