Go to the documentation of this file.
43 int main(
int argc,
char **argv)
50 JLimit_t& numberOfEvents = inputFile.getLimit();
57 JParser<> zap(
"Auxiliary program to convert fit results to AAnet format.\
58 \nThe option -L corresponds to the names of a shared library \
59 \nand function so to rearrange the order of fit results.");
63 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
70 catch(
const exception& error) {
71 FATAL(error.what() << endl);
77 typedef JParallelFileScanner_t::multi_pointer_type multi_pointer_type;
85 }
catch(
const exception& error) {}
90 buffer.
push(&JHead::DAQ);
105 STATUS(
"Processing: " << *i << endl);
107 JParallelFileScanner_t in(*i);
118 center = get<Vec>(head);
121 }
catch(
const exception& error) {}
124 while (in.hasNext()) {
126 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
128 multi_pointer_type ps = in.next();
133 JEvt::iterator __end = evt->end();
135 if (numberOfFits > 0) {
136 advance(__end = evt->begin(), min(numberOfFits, evt->size()));
140 partial_sort(evt->begin(), __end, evt->end(),
qualitySorter);
145 if (mc.getEntries() != 0) {
165 for (JEvt::const_iterator fit = evt->begin(); fit != __end; ++fit) {
169 tr.
id = out.
trks.size() + 1;
170 tr.
pos =
Vec(fit->getX(), fit->getY(), fit->getZ());
171 tr.
dir =
Vec(fit->getDX(), fit->getDY(), fit->getDZ());
174 tr.
lik = fit->getQ();
178 for (JHistory::const_iterator i = fit->getHistory().begin(); i != fit->getHistory().end(); ++i) {
182 for (
int i = 0; i != fit->getN(); ++i) {
183 tr.
fitinf.push_back(fit->getW(i));
186 out.
trks.push_back(tr);
189 out.
id = ++number_of_events;
std::vector< Trk > mc_trks
MC: list of MC truth tracks
Auxiliary class for defining the range of iterations of objects.
int mc_run_id
MC run identifier.
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
int rec_type
identifyer for the overall fitting algorithm/chain/strategy
JTriggerCounter_t getCounter() const
Get trigger counter.
bool qualitySorter(const JFIT::JFit &first, const JFIT::JFit &second)
Comparison of fit results.
Empty structure for specification of parser element that is initialised (i.e.
double E
Energy (either MC truth or reconstructed)
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
JAANET::start_run start_run
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Utility class to parse command line options.
double getLivetime(const std::string &file_name)
Get data taking live time.
double t
track time (when the particle is at pos )
Data structure for set of track fit results.
void copy(const Head &from, JHead &to)
Copy header from from to to.
double livetime_s
Live time [s].
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
int main(int argc, char **argv)
Auxiliary program to convert fit results to AAnet format.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
General purpose sorter of fit results.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
static const int JPP_RECONSTRUCTION_TYPE
Jpp reconstruction type for AAnet.
bool read(Vec &v, std::istream &is)
Read a Vec(tor) from a stream.
Vec pos
postion of the track at time t
void push(T JHead::*pd)
Push given data member to Head.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
std::vector< double > fitinf
place to store additional fit info, for jgandalf, see JFitParameters.hh
General purpose class for parallel reading of objects from a single file or multiple files.
#define DEBUG(A)
Message macros.
KM3NeT DAQ data structures and auxiliaries.
int id
offline event identifier
std::vector< int > rec_stages
list of identifyers of succesfull fitting stages resulting in this track
The Vec class is a straightforward 3-d vector, which also works in pyroot.
double lik
likelihood or lambda value (for aafit, lambda)
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
Long64_t counter_type
Type definition for counter.